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
16DUALCASE=1; export DUALCASE # for MKS sh
17if 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
24else
25  case `(set -o) 2>/dev/null` in #(
26  *posix*) :
27    set -o posix ;; #(
28  *) :
29     ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_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.
43if 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 --'
47elif (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'
50else
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'
70fi
71
72# The user is always right.
73if 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  }
79fi
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.)
87IFS=" ""	$as_nl"
88
89# Find who we are.  Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92  *[\\/]* ) as_myself=$0 ;;
93  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
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
100IFS=$as_save_IFS
101
102     ;;
103esac
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.
106if test "x$as_myself" = x; then
107  as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111  exit 1
112fi
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.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export 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.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147  *v*x* | *x*v* ) as_opts=-vx ;;
148  *v* ) as_opts=-v ;;
149  *x* ) as_opts=-x ;;
150  * ) as_opts= ;;
151esac
152exec $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
156as_fn_exit 255
157  fi
158  # We don't want this to propagate to other subprocesses.
159          { _as_can_reexec=; unset _as_can_reexec;}
160if 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
168else
169  case \`(set -o) 2>/dev/null\` in #(
170  *posix*) :
171    set -o posix ;; #(
172  *) :
173     ;;
174esac
175fi
176"
177  as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191  exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -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
199test \$(( 1 + 1 )) = 2 || exit 1"
200  if (eval "$as_required") 2>/dev/null; then :
201  as_have_required=yes
202else
203  as_have_required=no
204fi
205  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
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
225fi
226fi
227	   done;;
228       esac
229  as_found=false
230done
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
234fi; }
235IFS=$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.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248  *v*x* | *x*v* ) as_opts=-vx ;;
249  *v* ) as_opts=-v ;;
250  *x* ) as_opts=-x ;;
251  * ) as_opts= ;;
252esac
253exec $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
257exit 255
258fi
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
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290  { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_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.
305as_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.
315as_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.
363as_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.
373if (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  }'
378else
379  as_fn_append ()
380  {
381    eval $1=\$$1\$2
382  }
383fi # 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.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391  eval 'as_fn_arith ()
392  {
393    as_val=$(( $* ))
394  }'
395else
396  as_fn_arith ()
397  {
398    as_val=`expr "$@" || test $? -eq 1`
399  }
400fi # 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.
408as_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
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420   test "X`expr 00001 : '.*\(...\)'`" = X001; then
421  as_expr=expr
422else
423  as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427  as_basename=basename
428else
429  as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433  as_dirname=dirname
434else
435  as_dirname=false
436fi
437
438as_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.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_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
500ECHO_C= ECHO_N= ECHO_T=
501case `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';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515  rm -f conf$$.dir/conf$$.file
516else
517  rm -f conf$$.dir
518  mkdir conf$$.dir 2>/dev/null
519fi
520if (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
534else
535  as_ln_s='cp -pR'
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541  as_mkdir_p='mkdir -p "$as_dir"'
542else
543  test -d ./-p && rmdir ./-p
544  as_mkdir_p=false
545fi
546
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
549
550# Sed expression to map a string onto a valid CPP name.
551as_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.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 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.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
583PACKAGE_URL=
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_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
622enable_option_checking=no
623ac_header_list=
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
628XSLTPROC
629NM_H
630GDB_NM_FILE
631LTLIBXXHASH
632LIBXXHASH
633HAVE_LIBXXHASH
634CTF_DEPS
635LIBCTF
636LTLIBBABELTRACE
637LIBBABELTRACE
638HAVE_LIBBABELTRACE
639HAVE_NATIVE_GCORE_HOST
640NAT_GENERATED_FILES
641XM_CLIBS
642MH_CFLAGS
643LOADLIBES
644NAT_CDEPS
645NATDEPFILES
646NAT_FILE
647target_subdir
648CONFIG_UNINSTALL
649CONFIG_INSTALL
650CONFIG_CLEAN
651CONFIG_ALL
652CONFIG_SRCS
653CONFIG_DEPS
654CONFIG_OBS
655PROFILE_CFLAGS
656ENABLE_CFLAGS
657SIM_OBS
658SIM
659XMKMF
660GDBTK_SRC_DIR
661GDBTK_CFLAGS
662GDBTKLIBS
663X_LIBS
664X_LDFLAGS
665X_CFLAGS
666TK_XINCLUDES
667TK_DEPS
668TK_LIBRARY
669TK_INCLUDE
670TK_STUB_LIB_SPEC
671TK_STUB_LIB_FLAG
672TK_STUB_LIB_FILE
673TK_LIB_SPEC
674TK_LIB_FLAG
675TK_LIB_FILE
676TK_SRC_DIR
677TK_BIN_DIR
678TK_VERSION
679TCL_DEPS
680TCL_LIBRARY
681TCL_INCLUDE
682TCL_STUB_LIB_SPEC
683TCL_STUB_LIB_FLAG
684TCL_STUB_LIB_FILE
685TCL_LIB_SPEC
686TCL_LIB_FLAG
687TCL_LIB_FILE
688TCL_SRC_DIR
689TCL_BIN_DIR
690TCL_PATCH_LEVEL
691TCL_VERSION
692WIN32LDAPP
693WIN32LIBS
694GUI_CFLAGS_X
695LIBGUI
696LTLIBLZMA
697LIBLZMA
698HAVE_LIBLZMA
699SER_HARDWIRE
700WERROR_CFLAGS
701WARN_CFLAGS
702SYSTEM_GDBINIT_DIR
703SYSTEM_GDBINIT
704TARGET_SYSTEM_ROOT
705CONFIG_LDFLAGS
706RDYNAMIC
707LTLIBIPT
708LIBIPT
709HAVE_LIBIPT
710PTHREAD_CFLAGS
711PTHREAD_LIBS
712PTHREAD_CC
713ax_pthread_config
714SED
715ALLOCA
716SRCHIGH_CFLAGS
717SRCHIGH_LIBS
718HAVE_GUILE_FALSE
719HAVE_GUILE_TRUE
720GUILE_LIBS
721GUILE_CPPFLAGS
722GUILD_TARGET_FLAG
723GUILD
724pkg_config_prog_path
725HAVE_PYTHON_FALSE
726HAVE_PYTHON_TRUE
727PYTHON_LIBS
728PYTHON_CPPFLAGS
729PYTHON_CFLAGS
730python_prog_path
731LTLIBMPFR
732LIBMPFR
733HAVE_LIBMPFR
734LTLIBGMP
735LIBGMP
736HAVE_LIBGMP
737LTLIBEXPAT
738LIBEXPAT
739HAVE_LIBEXPAT
740JIT_READER_DIR
741TARGET_PTR
742READLINE_TEXI_INCFLAG
743READLINE_CFLAGS
744READLINE_DEPS
745READLINE
746LTLIBICONV
747LIBICONV
748zlibinc
749zlibdir
750MIG
751WINDRES
752DLLTOOL
753AR
754YFLAGS
755YACC
756RANLIB
757LN_S
758INSTALL_DATA
759INSTALL_SCRIPT
760INSTALL_PROGRAM
761AWK
762REPORT_BUGS_TEXI
763REPORT_BUGS_TO
764PKGVERSION
765CODESIGN_CERT
766DEBUGINFOD_LIBS
767DEBUGINFOD_CFLAGS
768PKG_CONFIG_LIBDIR
769PKG_CONFIG_PATH
770PKG_CONFIG
771HAVE_NATIVE_GCORE_TARGET
772TARGET_OBS
773subdirs
774GDB_DATADIR
775DEBUGDIR
776MAKEINFO_EXTRA_FLAGS
777MAKEINFOFLAGS
778MAKEINFO
779PACKAGE
780CATOBJEXT
781GENCAT
782INSTOBJEXT
783DATADIRNAME
784CATALOGS
785POSUB
786GMSGFMT
787XGETTEXT
788INCINTL
789LIBINTL_DEP
790LIBINTL
791USE_NLS
792CCDEPMODE
793DEPDIR
794am__leading_dot
795CXX_DIALECT
796HAVE_CXX11
797target_noncanonical
798INSTALL_STRIP_PROGRAM
799STRIP
800install_sh
801LARGEFILE_CPPFLAGS
802target_os
803target_vendor
804target_cpu
805target
806host_os
807host_vendor
808host_cpu
809host
810build_os
811build_vendor
812build_cpu
813build
814EGREP
815GREP
816CPP
817ac_ct_CXX
818CXXFLAGS
819CXX
820OBJEXT
821EXEEXT
822ac_ct_CC
823CPPFLAGS
824LDFLAGS
825CFLAGS
826CC
827MAINT
828MAINTAINER_MODE_FALSE
829MAINTAINER_MODE_TRUE
830target_alias
831host_alias
832build_alias
833LIBS
834ECHO_T
835ECHO_N
836ECHO_C
837DEFS
838mandir
839localedir
840libdir
841psdir
842pdfdir
843dvidir
844htmldir
845infodir
846docdir
847oldincludedir
848includedir
849localstatedir
850sharedstatedir
851sysconfdir
852datadir
853datarootdir
854libexecdir
855sbindir
856bindir
857program_transform_name
858prefix
859exec_prefix
860PACKAGE_URL
861PACKAGE_BUGREPORT
862PACKAGE_STRING
863PACKAGE_VERSION
864PACKAGE_TARNAME
865PACKAGE_NAME
866PATH_SEPARATOR
867SHELL'
868ac_subst_files='nat_makefile_frag'
869ac_user_opts='
870enable_option_checking
871enable_maintainer_mode
872enable_plugins
873enable_largefile
874with_separate_debug_dir
875with_gdb_datadir
876with_relocated_sources
877with_auto_load_dir
878with_auto_load_safe_path
879enable_targets
880enable_64_bit_bfd
881enable_gdbmi
882enable_tui
883enable_gdbtk
884with_debuginfod
885with_libunwind_ia64
886with_curses
887enable_profiling
888enable_codesign
889with_pkgversion
890with_bugurl
891with_system_zlib
892with_gnu_ld
893enable_rpath
894with_libiconv_prefix
895with_libiconv_type
896with_iconv_bin
897with_system_readline
898with_jit_reader_dir
899with_expat
900with_libexpat_prefix
901with_libexpat_type
902with_libgmp_prefix
903with_libgmp_type
904with_mpfr
905with_libmpfr_prefix
906with_libmpfr_type
907with_python
908with_python_libdir
909with_guile
910enable_source_highlight
911with_intel_pt
912with_libipt_prefix
913with_libipt_type
914with_sysroot
915with_system_gdbinit
916with_system_gdbinit_dir
917enable_werror
918enable_build_warnings
919enable_gdb_build_warnings
920enable_ubsan
921with_lzma
922with_liblzma_prefix
923with_liblzma_type
924with_tcl
925with_tk
926with_x
927enable_sim
928with_babeltrace
929with_libbabeltrace_prefix
930with_libbabeltrace_type
931with_xxhash
932enable_libctf
933with_libxxhash_prefix
934with_libxxhash_type
935enable_unit_tests
936'
937      ac_precious_vars='build_alias
938host_alias
939target_alias
940CC
941CFLAGS
942LDFLAGS
943LIBS
944CPPFLAGS
945CXX
946CXXFLAGS
947CCC
948CPP
949MAKEINFO
950MAKEINFOFLAGS
951PKG_CONFIG
952PKG_CONFIG_PATH
953PKG_CONFIG_LIBDIR
954DEBUGINFOD_CFLAGS
955DEBUGINFOD_LIBS
956YACC
957YFLAGS
958XMKMF'
959ac_subdirs_all='testsuite
960gdbtk'
961
962# Initialize some variables set by options.
963ac_init_help=
964ac_init_version=false
965ac_unrecognized_opts=
966ac_unrecognized_sep=
967# The variables have the same names as the options, with
968# dashes changed to underlines.
969cache_file=/dev/null
970exec_prefix=NONE
971no_create=
972no_recursion=
973prefix=NONE
974program_prefix=NONE
975program_suffix=NONE
976program_transform_name=s,x,x,
977silent=
978site=
979srcdir=
980verbose=
981x_includes=NONE
982x_libraries=NONE
983
984# Installation directory options.
985# These are left unexpanded so users can "make install exec_prefix=/foo"
986# and all the variables that are supposed to be based on exec_prefix
987# by default will actually change.
988# Use braces instead of parens because sh, perl, etc. also accept them.
989# (The list follows the same order as the GNU Coding Standards.)
990bindir='${exec_prefix}/bin'
991sbindir='${exec_prefix}/sbin'
992libexecdir='${exec_prefix}/libexec'
993datarootdir='${prefix}/share'
994datadir='${datarootdir}'
995sysconfdir='${prefix}/etc'
996sharedstatedir='${prefix}/com'
997localstatedir='${prefix}/var'
998includedir='${prefix}/include'
999oldincludedir='/usr/include'
1000docdir='${datarootdir}/doc/${PACKAGE}'
1001infodir='${datarootdir}/info'
1002htmldir='${docdir}'
1003dvidir='${docdir}'
1004pdfdir='${docdir}'
1005psdir='${docdir}'
1006libdir='${exec_prefix}/lib'
1007localedir='${datarootdir}/locale'
1008mandir='${datarootdir}/man'
1009
1010ac_prev=
1011ac_dashdash=
1012for ac_option
1013do
1014  # If the previous option needs an argument, assign it.
1015  if test -n "$ac_prev"; then
1016    eval $ac_prev=\$ac_option
1017    ac_prev=
1018    continue
1019  fi
1020
1021  case $ac_option in
1022  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1023  *=)   ac_optarg= ;;
1024  *)    ac_optarg=yes ;;
1025  esac
1026
1027  # Accept the important Cygnus configure options, so we can diagnose typos.
1028
1029  case $ac_dashdash$ac_option in
1030  --)
1031    ac_dashdash=yes ;;
1032
1033  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1034    ac_prev=bindir ;;
1035  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1036    bindir=$ac_optarg ;;
1037
1038  -build | --build | --buil | --bui | --bu)
1039    ac_prev=build_alias ;;
1040  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1041    build_alias=$ac_optarg ;;
1042
1043  -cache-file | --cache-file | --cache-fil | --cache-fi \
1044  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1045    ac_prev=cache_file ;;
1046  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1047  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1048    cache_file=$ac_optarg ;;
1049
1050  --config-cache | -C)
1051    cache_file=config.cache ;;
1052
1053  -datadir | --datadir | --datadi | --datad)
1054    ac_prev=datadir ;;
1055  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1056    datadir=$ac_optarg ;;
1057
1058  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1059  | --dataroo | --dataro | --datar)
1060    ac_prev=datarootdir ;;
1061  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1062  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1063    datarootdir=$ac_optarg ;;
1064
1065  -disable-* | --disable-*)
1066    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1067    # Reject names that are not valid shell variable names.
1068    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1069      as_fn_error $? "invalid feature name: $ac_useropt"
1070    ac_useropt_orig=$ac_useropt
1071    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1072    case $ac_user_opts in
1073      *"
1074"enable_$ac_useropt"
1075"*) ;;
1076      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1077	 ac_unrecognized_sep=', ';;
1078    esac
1079    eval enable_$ac_useropt=no ;;
1080
1081  -docdir | --docdir | --docdi | --doc | --do)
1082    ac_prev=docdir ;;
1083  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1084    docdir=$ac_optarg ;;
1085
1086  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1087    ac_prev=dvidir ;;
1088  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1089    dvidir=$ac_optarg ;;
1090
1091  -enable-* | --enable-*)
1092    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1093    # Reject names that are not valid shell variable names.
1094    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1095      as_fn_error $? "invalid feature name: $ac_useropt"
1096    ac_useropt_orig=$ac_useropt
1097    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1098    case $ac_user_opts in
1099      *"
1100"enable_$ac_useropt"
1101"*) ;;
1102      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1103	 ac_unrecognized_sep=', ';;
1104    esac
1105    eval enable_$ac_useropt=\$ac_optarg ;;
1106
1107  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1108  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1109  | --exec | --exe | --ex)
1110    ac_prev=exec_prefix ;;
1111  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1112  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1113  | --exec=* | --exe=* | --ex=*)
1114    exec_prefix=$ac_optarg ;;
1115
1116  -gas | --gas | --ga | --g)
1117    # Obsolete; use --with-gas.
1118    with_gas=yes ;;
1119
1120  -help | --help | --hel | --he | -h)
1121    ac_init_help=long ;;
1122  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1123    ac_init_help=recursive ;;
1124  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1125    ac_init_help=short ;;
1126
1127  -host | --host | --hos | --ho)
1128    ac_prev=host_alias ;;
1129  -host=* | --host=* | --hos=* | --ho=*)
1130    host_alias=$ac_optarg ;;
1131
1132  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1133    ac_prev=htmldir ;;
1134  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1135  | --ht=*)
1136    htmldir=$ac_optarg ;;
1137
1138  -includedir | --includedir | --includedi | --included | --include \
1139  | --includ | --inclu | --incl | --inc)
1140    ac_prev=includedir ;;
1141  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1142  | --includ=* | --inclu=* | --incl=* | --inc=*)
1143    includedir=$ac_optarg ;;
1144
1145  -infodir | --infodir | --infodi | --infod | --info | --inf)
1146    ac_prev=infodir ;;
1147  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1148    infodir=$ac_optarg ;;
1149
1150  -libdir | --libdir | --libdi | --libd)
1151    ac_prev=libdir ;;
1152  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1153    libdir=$ac_optarg ;;
1154
1155  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1156  | --libexe | --libex | --libe)
1157    ac_prev=libexecdir ;;
1158  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1159  | --libexe=* | --libex=* | --libe=*)
1160    libexecdir=$ac_optarg ;;
1161
1162  -localedir | --localedir | --localedi | --localed | --locale)
1163    ac_prev=localedir ;;
1164  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1165    localedir=$ac_optarg ;;
1166
1167  -localstatedir | --localstatedir | --localstatedi | --localstated \
1168  | --localstate | --localstat | --localsta | --localst | --locals)
1169    ac_prev=localstatedir ;;
1170  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1171  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1172    localstatedir=$ac_optarg ;;
1173
1174  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1175    ac_prev=mandir ;;
1176  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1177    mandir=$ac_optarg ;;
1178
1179  -nfp | --nfp | --nf)
1180    # Obsolete; use --without-fp.
1181    with_fp=no ;;
1182
1183  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1184  | --no-cr | --no-c | -n)
1185    no_create=yes ;;
1186
1187  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1188  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1189    no_recursion=yes ;;
1190
1191  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1192  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1193  | --oldin | --oldi | --old | --ol | --o)
1194    ac_prev=oldincludedir ;;
1195  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1196  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1197  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1198    oldincludedir=$ac_optarg ;;
1199
1200  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1201    ac_prev=prefix ;;
1202  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1203    prefix=$ac_optarg ;;
1204
1205  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1206  | --program-pre | --program-pr | --program-p)
1207    ac_prev=program_prefix ;;
1208  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1209  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1210    program_prefix=$ac_optarg ;;
1211
1212  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1213  | --program-suf | --program-su | --program-s)
1214    ac_prev=program_suffix ;;
1215  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1216  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1217    program_suffix=$ac_optarg ;;
1218
1219  -program-transform-name | --program-transform-name \
1220  | --program-transform-nam | --program-transform-na \
1221  | --program-transform-n | --program-transform- \
1222  | --program-transform | --program-transfor \
1223  | --program-transfo | --program-transf \
1224  | --program-trans | --program-tran \
1225  | --progr-tra | --program-tr | --program-t)
1226    ac_prev=program_transform_name ;;
1227  -program-transform-name=* | --program-transform-name=* \
1228  | --program-transform-nam=* | --program-transform-na=* \
1229  | --program-transform-n=* | --program-transform-=* \
1230  | --program-transform=* | --program-transfor=* \
1231  | --program-transfo=* | --program-transf=* \
1232  | --program-trans=* | --program-tran=* \
1233  | --progr-tra=* | --program-tr=* | --program-t=*)
1234    program_transform_name=$ac_optarg ;;
1235
1236  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1237    ac_prev=pdfdir ;;
1238  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1239    pdfdir=$ac_optarg ;;
1240
1241  -psdir | --psdir | --psdi | --psd | --ps)
1242    ac_prev=psdir ;;
1243  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1244    psdir=$ac_optarg ;;
1245
1246  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1247  | -silent | --silent | --silen | --sile | --sil)
1248    silent=yes ;;
1249
1250  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1251    ac_prev=sbindir ;;
1252  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1253  | --sbi=* | --sb=*)
1254    sbindir=$ac_optarg ;;
1255
1256  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1257  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1258  | --sharedst | --shareds | --shared | --share | --shar \
1259  | --sha | --sh)
1260    ac_prev=sharedstatedir ;;
1261  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1262  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1263  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1264  | --sha=* | --sh=*)
1265    sharedstatedir=$ac_optarg ;;
1266
1267  -site | --site | --sit)
1268    ac_prev=site ;;
1269  -site=* | --site=* | --sit=*)
1270    site=$ac_optarg ;;
1271
1272  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1273    ac_prev=srcdir ;;
1274  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1275    srcdir=$ac_optarg ;;
1276
1277  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1278  | --syscon | --sysco | --sysc | --sys | --sy)
1279    ac_prev=sysconfdir ;;
1280  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1281  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1282    sysconfdir=$ac_optarg ;;
1283
1284  -target | --target | --targe | --targ | --tar | --ta | --t)
1285    ac_prev=target_alias ;;
1286  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1287    target_alias=$ac_optarg ;;
1288
1289  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1290    verbose=yes ;;
1291
1292  -version | --version | --versio | --versi | --vers | -V)
1293    ac_init_version=: ;;
1294
1295  -with-* | --with-*)
1296    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1297    # Reject names that are not valid shell variable names.
1298    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1299      as_fn_error $? "invalid package name: $ac_useropt"
1300    ac_useropt_orig=$ac_useropt
1301    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1302    case $ac_user_opts in
1303      *"
1304"with_$ac_useropt"
1305"*) ;;
1306      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1307	 ac_unrecognized_sep=', ';;
1308    esac
1309    eval with_$ac_useropt=\$ac_optarg ;;
1310
1311  -without-* | --without-*)
1312    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1313    # Reject names that are not valid shell variable names.
1314    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1315      as_fn_error $? "invalid package name: $ac_useropt"
1316    ac_useropt_orig=$ac_useropt
1317    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1318    case $ac_user_opts in
1319      *"
1320"with_$ac_useropt"
1321"*) ;;
1322      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1323	 ac_unrecognized_sep=', ';;
1324    esac
1325    eval with_$ac_useropt=no ;;
1326
1327  --x)
1328    # Obsolete; use --with-x.
1329    with_x=yes ;;
1330
1331  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1332  | --x-incl | --x-inc | --x-in | --x-i)
1333    ac_prev=x_includes ;;
1334  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1335  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1336    x_includes=$ac_optarg ;;
1337
1338  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1339  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1340    ac_prev=x_libraries ;;
1341  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1342  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1343    x_libraries=$ac_optarg ;;
1344
1345  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1346Try \`$0 --help' for more information"
1347    ;;
1348
1349  *=*)
1350    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1351    # Reject names that are not valid shell variable names.
1352    case $ac_envvar in #(
1353      '' | [0-9]* | *[!_$as_cr_alnum]* )
1354      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1355    esac
1356    eval $ac_envvar=\$ac_optarg
1357    export $ac_envvar ;;
1358
1359  *)
1360    # FIXME: should be removed in autoconf 3.0.
1361    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1362    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1363      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1364    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1365    ;;
1366
1367  esac
1368done
1369
1370if test -n "$ac_prev"; then
1371  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1372  as_fn_error $? "missing argument to $ac_option"
1373fi
1374
1375if test -n "$ac_unrecognized_opts"; then
1376  case $enable_option_checking in
1377    no) ;;
1378    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1379    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1380  esac
1381fi
1382
1383# Check all directory arguments for consistency.
1384for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1385		datadir sysconfdir sharedstatedir localstatedir includedir \
1386		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1387		libdir localedir mandir
1388do
1389  eval ac_val=\$$ac_var
1390  # Remove trailing slashes.
1391  case $ac_val in
1392    */ )
1393      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1394      eval $ac_var=\$ac_val;;
1395  esac
1396  # Be sure to have absolute directory names.
1397  case $ac_val in
1398    [\\/$]* | ?:[\\/]* )  continue;;
1399    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1400  esac
1401  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1402done
1403
1404# There might be people who depend on the old broken behavior: `$host'
1405# used to hold the argument of --host etc.
1406# FIXME: To remove some day.
1407build=$build_alias
1408host=$host_alias
1409target=$target_alias
1410
1411# FIXME: To remove some day.
1412if test "x$host_alias" != x; then
1413  if test "x$build_alias" = x; then
1414    cross_compiling=maybe
1415  elif test "x$build_alias" != "x$host_alias"; then
1416    cross_compiling=yes
1417  fi
1418fi
1419
1420ac_tool_prefix=
1421test -n "$host_alias" && ac_tool_prefix=$host_alias-
1422
1423test "$silent" = yes && exec 6>/dev/null
1424
1425
1426ac_pwd=`pwd` && test -n "$ac_pwd" &&
1427ac_ls_di=`ls -di .` &&
1428ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1429  as_fn_error $? "working directory cannot be determined"
1430test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1431  as_fn_error $? "pwd does not report name of working directory"
1432
1433
1434# Find the source files, if location was not specified.
1435if test -z "$srcdir"; then
1436  ac_srcdir_defaulted=yes
1437  # Try the directory containing this script, then the parent directory.
1438  ac_confdir=`$as_dirname -- "$as_myself" ||
1439$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1440	 X"$as_myself" : 'X\(//\)[^/]' \| \
1441	 X"$as_myself" : 'X\(//\)$' \| \
1442	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1443$as_echo X"$as_myself" |
1444    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1445	    s//\1/
1446	    q
1447	  }
1448	  /^X\(\/\/\)[^/].*/{
1449	    s//\1/
1450	    q
1451	  }
1452	  /^X\(\/\/\)$/{
1453	    s//\1/
1454	    q
1455	  }
1456	  /^X\(\/\).*/{
1457	    s//\1/
1458	    q
1459	  }
1460	  s/.*/./; q'`
1461  srcdir=$ac_confdir
1462  if test ! -r "$srcdir/$ac_unique_file"; then
1463    srcdir=..
1464  fi
1465else
1466  ac_srcdir_defaulted=no
1467fi
1468if test ! -r "$srcdir/$ac_unique_file"; then
1469  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1470  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1471fi
1472ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1473ac_abs_confdir=`(
1474	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1475	pwd)`
1476# When building in place, set srcdir=.
1477if test "$ac_abs_confdir" = "$ac_pwd"; then
1478  srcdir=.
1479fi
1480# Remove unnecessary trailing slashes from srcdir.
1481# Double slashes in file names in object file debugging info
1482# mess up M-x gdb in Emacs.
1483case $srcdir in
1484*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1485esac
1486for ac_var in $ac_precious_vars; do
1487  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1488  eval ac_env_${ac_var}_value=\$${ac_var}
1489  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1490  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1491done
1492
1493#
1494# Report the --help message.
1495#
1496if test "$ac_init_help" = "long"; then
1497  # Omit some internal or obsolete options to make the list less imposing.
1498  # This message is too long to be a string in the A/UX 3.1 sh.
1499  cat <<_ACEOF
1500\`configure' configures this package to adapt to many kinds of systems.
1501
1502Usage: $0 [OPTION]... [VAR=VALUE]...
1503
1504To assign environment variables (e.g., CC, CFLAGS...), specify them as
1505VAR=VALUE.  See below for descriptions of some of the useful variables.
1506
1507Defaults for the options are specified in brackets.
1508
1509Configuration:
1510  -h, --help              display this help and exit
1511      --help=short        display options specific to this package
1512      --help=recursive    display the short help of all the included packages
1513  -V, --version           display version information and exit
1514  -q, --quiet, --silent   do not print \`checking ...' messages
1515      --cache-file=FILE   cache test results in FILE [disabled]
1516  -C, --config-cache      alias for \`--cache-file=config.cache'
1517  -n, --no-create         do not create output files
1518      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1519
1520Installation directories:
1521  --prefix=PREFIX         install architecture-independent files in PREFIX
1522                          [$ac_default_prefix]
1523  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1524                          [PREFIX]
1525
1526By default, \`make install' will install all the files in
1527\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1528an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1529for instance \`--prefix=\$HOME'.
1530
1531For better control, use the options below.
1532
1533Fine tuning of the installation directories:
1534  --bindir=DIR            user executables [EPREFIX/bin]
1535  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1536  --libexecdir=DIR        program executables [EPREFIX/libexec]
1537  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1538  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1539  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1540  --libdir=DIR            object code libraries [EPREFIX/lib]
1541  --includedir=DIR        C header files [PREFIX/include]
1542  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1543  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1544  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1545  --infodir=DIR           info documentation [DATAROOTDIR/info]
1546  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1547  --mandir=DIR            man documentation [DATAROOTDIR/man]
1548  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1549  --htmldir=DIR           html documentation [DOCDIR]
1550  --dvidir=DIR            dvi documentation [DOCDIR]
1551  --pdfdir=DIR            pdf documentation [DOCDIR]
1552  --psdir=DIR             ps documentation [DOCDIR]
1553_ACEOF
1554
1555  cat <<\_ACEOF
1556
1557Program names:
1558  --program-prefix=PREFIX            prepend PREFIX to installed program names
1559  --program-suffix=SUFFIX            append SUFFIX to installed program names
1560  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1561
1562X features:
1563  --x-includes=DIR    X include files are in DIR
1564  --x-libraries=DIR   X library files are in DIR
1565
1566System types:
1567  --build=BUILD     configure for building on BUILD [guessed]
1568  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1569  --target=TARGET   configure for building compilers for TARGET [HOST]
1570_ACEOF
1571fi
1572
1573if test -n "$ac_init_help"; then
1574
1575  cat <<\_ACEOF
1576
1577Optional Features:
1578  --disable-option-checking  ignore unrecognized --enable/--with options
1579  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1580  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1581  --enable-maintainer-mode
1582                          enable make rules and dependencies not useful (and
1583                          sometimes confusing) to the casual installer
1584  --enable-plugins        Enable support for plugins
1585  --disable-largefile     omit support for large files
1586  --enable-targets=TARGETS
1587                          alternative target configurations
1588  --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
1589  --disable-gdbmi         disable machine-interface (MI)
1590  --enable-tui            enable full-screen terminal user interface (TUI)
1591  --enable-gdbtk          enable gdbtk graphical user interface (GUI)
1592  --enable-profiling      enable profiling of GDB
1593  --enable-codesign=CERT  sign gdb with 'codesign -s CERT'
1594  --disable-rpath         do not hardcode runtime library paths
1595  --enable-source-highlight
1596                          enable source-highlight for source listings
1597  --enable-werror         treat compile warnings as errors
1598  --enable-build-warnings enable build-time compiler warnings if gcc is used
1599  --enable-gdb-build-warnings
1600                          enable GDB specific build-time compiler warnings if
1601                          gcc is used
1602  --enable-ubsan          enable undefined behavior sanitizer (auto/yes/no)
1603  --enable-sim            link gdb with simulator
1604  --enable-libctf         Handle .ctf type-info sections [default=yes]
1605  --enable-unit-tests     Enable the inclusion of unit tests when compiling
1606                          GDB
1607
1608Optional Packages:
1609  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1610  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1611  --with-separate-debug-dir=PATH
1612                          look for global separate debug info in this path
1613                          [LIBDIR/debug]
1614  --with-gdb-datadir=PATH look for global separate data files in this path
1615                          [DATADIR/gdb]
1616  --with-relocated-sources=PATH
1617                          automatically relocate this path for source files
1618  --with-auto-load-dir=PATH
1619                          directories from which to load auto-loaded scripts
1620                          [$debugdir:$datadir/auto-load]
1621  --with-auto-load-safe-path=PATH
1622                          directories safe to hold auto-loaded files
1623                          [--with-auto-load-dir]
1624  --without-auto-load-safe-path
1625                          do not restrict auto-loaded files locations
1626  --with-debuginfod       Enable debuginfo lookups with debuginfod
1627                          (auto/yes/no)
1628  --with-libunwind-ia64   use libunwind frame unwinding for ia64 targets
1629  --with-curses           use the curses library instead of the termcap
1630                          library
1631  --with-pkgversion=PKG   Use PKG in the version string in place of "GDB"
1632  --with-bugurl=URL       Direct users to URL to report a bug
1633  --with-system-zlib      use installed libz
1634  --with-gnu-ld           assume the C compiler uses GNU ld default=no
1635  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
1636  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
1637  --with-libiconv-type=TYPE     type of library to search for (auto/static/shared)
1638  --with-iconv-bin=PATH   specify where to find the iconv program
1639  --with-system-readline  use installed readline library
1640  --with-jit-reader-dir=PATH
1641                          directory to load the JIT readers from
1642  --with-expat            include expat support (auto/yes/no)
1643  --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
1644  --without-libexpat-prefix     don't search for libexpat in includedir and libdir
1645  --with-libexpat-type=TYPE     type of library to search for (auto/static/shared)
1646  --with-libgmp-prefix[=DIR]  search for libgmp in DIR/include and DIR/lib
1647  --without-libgmp-prefix     don't search for libgmp in includedir and libdir
1648  --with-libgmp-type=TYPE     type of library to search for (auto/static/shared)
1649  --with-mpfr             include MPFR support (auto/yes/no)
1650  --with-libmpfr-prefix[=DIR]  search for libmpfr in DIR/include and DIR/lib
1651  --without-libmpfr-prefix     don't search for libmpfr in includedir and libdir
1652  --with-libmpfr-type=TYPE     type of library to search for (auto/static/shared)
1653  --with-python[=PYTHON]  include python support
1654                          (auto/yes/no/<python-program>)
1655  --with-python-libdir[=DIR]
1656                          search for python's libraries in DIR
1657  --with-guile[=GUILE]    include guile support
1658                          (auto/yes/no/<guile-version>/<pkg-config-program>)
1659  --with-intel-pt         include Intel Processor Trace support (auto/yes/no)
1660  --with-libipt-prefix[=DIR]  search for libipt in DIR/include and DIR/lib
1661  --without-libipt-prefix     don't search for libipt in includedir and libdir
1662  --with-libipt-type=TYPE     type of library to search for (auto/static/shared)
1663  --with-sysroot[=DIR]    search for usr/lib et al within DIR
1664  --with-system-gdbinit=PATH
1665                          automatically load a system-wide gdbinit file
1666  --with-system-gdbinit-dir=PATH
1667                          automatically load system-wide gdbinit files from
1668                          this directory
1669  --with-lzma             support lzma compression (auto/yes/no)
1670  --with-liblzma-prefix[=DIR]  search for liblzma in DIR/include and DIR/lib
1671  --without-liblzma-prefix     don't search for liblzma in includedir and libdir
1672  --with-liblzma-type=TYPE     type of library to search for (auto/static/shared)
1673  --with-tcl              directory containing tcl configuration (tclConfig.sh)
1674  --with-tk               directory containing tk configuration (tkConfig.sh)
1675  --with-x                use the X Window System
1676  --with-babeltrace       include babeltrace support (auto/yes/no)
1677  --with-libbabeltrace-prefix[=DIR]  search for libbabeltrace in DIR/include and DIR/lib
1678  --without-libbabeltrace-prefix     don't search for libbabeltrace in includedir and libdir
1679  --with-libbabeltrace-type=TYPE     type of library to search for (auto/static/shared)
1680  --with-xxhash           use libxxhash for hashing (faster) (auto/yes/no)
1681  --with-libxxhash-prefix[=DIR]  search for libxxhash in DIR/include and DIR/lib
1682  --without-libxxhash-prefix     don't search for libxxhash in includedir and libdir
1683  --with-libxxhash-type=TYPE     type of library to search for (auto/static/shared)
1684
1685Some influential environment variables:
1686  CC          C compiler command
1687  CFLAGS      C compiler flags
1688  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1689              nonstandard directory <lib dir>
1690  LIBS        libraries to pass to the linker, e.g. -l<library>
1691  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1692              you have headers in a nonstandard directory <include dir>
1693  CXX         C++ compiler command
1694  CXXFLAGS    C++ compiler flags
1695  CPP         C preprocessor
1696  MAKEINFO    Parent configure detects if it is of sufficient version.
1697  MAKEINFOFLAGS
1698              Parameters for MAKEINFO.
1699  PKG_CONFIG  path to pkg-config utility
1700  PKG_CONFIG_PATH
1701              directories to add to pkg-config's search path
1702  PKG_CONFIG_LIBDIR
1703              path overriding pkg-config's built-in search path
1704  DEBUGINFOD_CFLAGS
1705              C compiler flags for DEBUGINFOD, overriding pkg-config
1706  DEBUGINFOD_LIBS
1707              linker flags for DEBUGINFOD, overriding pkg-config
1708  YACC        The `Yet Another Compiler Compiler' implementation to use.
1709              Defaults to the first program found out of: `bison -y', `byacc',
1710              `yacc'.
1711  YFLAGS      The list of arguments that will be passed by default to $YACC.
1712              This script will default YFLAGS to the empty string to avoid a
1713              default value of `-d' given by some make applications.
1714  XMKMF       Path to xmkmf, Makefile generator for X Window System
1715
1716Use these variables to override the choices made by `configure' or to help
1717it to find libraries and programs with nonstandard names/locations.
1718
1719Report bugs to the package provider.
1720_ACEOF
1721ac_status=$?
1722fi
1723
1724if test "$ac_init_help" = "recursive"; then
1725  # If there are subdirs, report their specific --help.
1726  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1727    test -d "$ac_dir" ||
1728      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1729      continue
1730    ac_builddir=.
1731
1732case "$ac_dir" in
1733.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1734*)
1735  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1736  # A ".." for each directory in $ac_dir_suffix.
1737  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1738  case $ac_top_builddir_sub in
1739  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1740  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1741  esac ;;
1742esac
1743ac_abs_top_builddir=$ac_pwd
1744ac_abs_builddir=$ac_pwd$ac_dir_suffix
1745# for backward compatibility:
1746ac_top_builddir=$ac_top_build_prefix
1747
1748case $srcdir in
1749  .)  # We are building in place.
1750    ac_srcdir=.
1751    ac_top_srcdir=$ac_top_builddir_sub
1752    ac_abs_top_srcdir=$ac_pwd ;;
1753  [\\/]* | ?:[\\/]* )  # Absolute name.
1754    ac_srcdir=$srcdir$ac_dir_suffix;
1755    ac_top_srcdir=$srcdir
1756    ac_abs_top_srcdir=$srcdir ;;
1757  *) # Relative name.
1758    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1759    ac_top_srcdir=$ac_top_build_prefix$srcdir
1760    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1761esac
1762ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1763
1764    cd "$ac_dir" || { ac_status=$?; continue; }
1765    # Check for guested configure.
1766    if test -f "$ac_srcdir/configure.gnu"; then
1767      echo &&
1768      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1769    elif test -f "$ac_srcdir/configure"; then
1770      echo &&
1771      $SHELL "$ac_srcdir/configure" --help=recursive
1772    else
1773      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1774    fi || ac_status=$?
1775    cd "$ac_pwd" || { ac_status=$?; break; }
1776  done
1777fi
1778
1779test -n "$ac_init_help" && exit $ac_status
1780if $ac_init_version; then
1781  cat <<\_ACEOF
1782configure
1783generated by GNU Autoconf 2.69
1784
1785Copyright (C) 2012 Free Software Foundation, Inc.
1786This configure script is free software; the Free Software Foundation
1787gives unlimited permission to copy, distribute and modify it.
1788_ACEOF
1789  exit
1790fi
1791
1792## ------------------------ ##
1793## Autoconf initialization. ##
1794## ------------------------ ##
1795
1796# ac_fn_c_try_compile LINENO
1797# --------------------------
1798# Try to compile conftest.$ac_ext, and return whether this succeeded.
1799ac_fn_c_try_compile ()
1800{
1801  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1802  rm -f conftest.$ac_objext
1803  if { { ac_try="$ac_compile"
1804case "(($ac_try" in
1805  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1806  *) ac_try_echo=$ac_try;;
1807esac
1808eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1809$as_echo "$ac_try_echo"; } >&5
1810  (eval "$ac_compile") 2>conftest.err
1811  ac_status=$?
1812  if test -s conftest.err; then
1813    grep -v '^ *+' conftest.err >conftest.er1
1814    cat conftest.er1 >&5
1815    mv -f conftest.er1 conftest.err
1816  fi
1817  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1818  test $ac_status = 0; } && {
1819	 test -z "$ac_c_werror_flag" ||
1820	 test ! -s conftest.err
1821       } && test -s conftest.$ac_objext; then :
1822  ac_retval=0
1823else
1824  $as_echo "$as_me: failed program was:" >&5
1825sed 's/^/| /' conftest.$ac_ext >&5
1826
1827	ac_retval=1
1828fi
1829  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1830  as_fn_set_status $ac_retval
1831
1832} # ac_fn_c_try_compile
1833
1834# ac_fn_cxx_try_compile LINENO
1835# ----------------------------
1836# Try to compile conftest.$ac_ext, and return whether this succeeded.
1837ac_fn_cxx_try_compile ()
1838{
1839  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1840  rm -f conftest.$ac_objext
1841  if { { ac_try="$ac_compile"
1842case "(($ac_try" in
1843  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1844  *) ac_try_echo=$ac_try;;
1845esac
1846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1847$as_echo "$ac_try_echo"; } >&5
1848  (eval "$ac_compile") 2>conftest.err
1849  ac_status=$?
1850  if test -s conftest.err; then
1851    grep -v '^ *+' conftest.err >conftest.er1
1852    cat conftest.er1 >&5
1853    mv -f conftest.er1 conftest.err
1854  fi
1855  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1856  test $ac_status = 0; } && {
1857	 test -z "$ac_cxx_werror_flag" ||
1858	 test ! -s conftest.err
1859       } && test -s conftest.$ac_objext; then :
1860  ac_retval=0
1861else
1862  $as_echo "$as_me: failed program was:" >&5
1863sed 's/^/| /' conftest.$ac_ext >&5
1864
1865	ac_retval=1
1866fi
1867  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1868  as_fn_set_status $ac_retval
1869
1870} # ac_fn_cxx_try_compile
1871
1872# ac_fn_c_try_cpp LINENO
1873# ----------------------
1874# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1875ac_fn_c_try_cpp ()
1876{
1877  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1878  if { { ac_try="$ac_cpp conftest.$ac_ext"
1879case "(($ac_try" in
1880  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881  *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1886  ac_status=$?
1887  if test -s conftest.err; then
1888    grep -v '^ *+' conftest.err >conftest.er1
1889    cat conftest.er1 >&5
1890    mv -f conftest.er1 conftest.err
1891  fi
1892  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1893  test $ac_status = 0; } > conftest.i && {
1894	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1895	 test ! -s conftest.err
1896       }; then :
1897  ac_retval=0
1898else
1899  $as_echo "$as_me: failed program was:" >&5
1900sed 's/^/| /' conftest.$ac_ext >&5
1901
1902    ac_retval=1
1903fi
1904  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1905  as_fn_set_status $ac_retval
1906
1907} # ac_fn_c_try_cpp
1908
1909# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1910# -------------------------------------------------------
1911# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1912# the include files in INCLUDES and setting the cache variable VAR
1913# accordingly.
1914ac_fn_c_check_header_mongrel ()
1915{
1916  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1917  if eval \${$3+:} false; then :
1918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
1920if eval \${$3+:} false; then :
1921  $as_echo_n "(cached) " >&6
1922fi
1923eval ac_res=\$$3
1924	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
1926else
1927  # Is the header compilable?
1928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1929$as_echo_n "checking $2 usability... " >&6; }
1930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1931/* end confdefs.h.  */
1932$4
1933#include <$2>
1934_ACEOF
1935if ac_fn_c_try_compile "$LINENO"; then :
1936  ac_header_compiler=yes
1937else
1938  ac_header_compiler=no
1939fi
1940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1942$as_echo "$ac_header_compiler" >&6; }
1943
1944# Is the header present?
1945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1946$as_echo_n "checking $2 presence... " >&6; }
1947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h.  */
1949#include <$2>
1950_ACEOF
1951if ac_fn_c_try_cpp "$LINENO"; then :
1952  ac_header_preproc=yes
1953else
1954  ac_header_preproc=no
1955fi
1956rm -f conftest.err conftest.i conftest.$ac_ext
1957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1958$as_echo "$ac_header_preproc" >&6; }
1959
1960# So?  What about this header?
1961case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1962  yes:no: )
1963    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1964$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1965    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1966$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1967    ;;
1968  no:yes:* )
1969    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1970$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1971    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1972$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1973    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1974$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1975    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1976$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1977    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1978$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1979    ;;
1980esac
1981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1982$as_echo_n "checking for $2... " >&6; }
1983if eval \${$3+:} false; then :
1984  $as_echo_n "(cached) " >&6
1985else
1986  eval "$3=\$ac_header_compiler"
1987fi
1988eval ac_res=\$$3
1989	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1990$as_echo "$ac_res" >&6; }
1991fi
1992  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1993
1994} # ac_fn_c_check_header_mongrel
1995
1996# ac_fn_c_try_run LINENO
1997# ----------------------
1998# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1999# that executables *can* be run.
2000ac_fn_c_try_run ()
2001{
2002  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2003  if { { ac_try="$ac_link"
2004case "(($ac_try" in
2005  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2006  *) ac_try_echo=$ac_try;;
2007esac
2008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2009$as_echo "$ac_try_echo"; } >&5
2010  (eval "$ac_link") 2>&5
2011  ac_status=$?
2012  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2013  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2014  { { case "(($ac_try" in
2015  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2016  *) ac_try_echo=$ac_try;;
2017esac
2018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2019$as_echo "$ac_try_echo"; } >&5
2020  (eval "$ac_try") 2>&5
2021  ac_status=$?
2022  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2023  test $ac_status = 0; }; }; then :
2024  ac_retval=0
2025else
2026  $as_echo "$as_me: program exited with status $ac_status" >&5
2027       $as_echo "$as_me: failed program was:" >&5
2028sed 's/^/| /' conftest.$ac_ext >&5
2029
2030       ac_retval=$ac_status
2031fi
2032  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2033  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2034  as_fn_set_status $ac_retval
2035
2036} # ac_fn_c_try_run
2037
2038# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2039# -------------------------------------------------------
2040# Tests whether HEADER exists and can be compiled using the include files in
2041# INCLUDES, setting the cache variable VAR accordingly.
2042ac_fn_c_check_header_compile ()
2043{
2044  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2045  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2046$as_echo_n "checking for $2... " >&6; }
2047if eval \${$3+:} false; then :
2048  $as_echo_n "(cached) " >&6
2049else
2050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h.  */
2052$4
2053#include <$2>
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056  eval "$3=yes"
2057else
2058  eval "$3=no"
2059fi
2060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2061fi
2062eval ac_res=\$$3
2063	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2064$as_echo "$ac_res" >&6; }
2065  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2066
2067} # ac_fn_c_check_header_compile
2068
2069# ac_fn_c_try_link LINENO
2070# -----------------------
2071# Try to link conftest.$ac_ext, and return whether this succeeded.
2072ac_fn_c_try_link ()
2073{
2074  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2075  rm -f conftest.$ac_objext conftest$ac_exeext
2076  if { { ac_try="$ac_link"
2077case "(($ac_try" in
2078  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2079  *) ac_try_echo=$ac_try;;
2080esac
2081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2082$as_echo "$ac_try_echo"; } >&5
2083  (eval "$ac_link") 2>conftest.err
2084  ac_status=$?
2085  if test -s conftest.err; then
2086    grep -v '^ *+' conftest.err >conftest.er1
2087    cat conftest.er1 >&5
2088    mv -f conftest.er1 conftest.err
2089  fi
2090  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2091  test $ac_status = 0; } && {
2092	 test -z "$ac_c_werror_flag" ||
2093	 test ! -s conftest.err
2094       } && test -s conftest$ac_exeext && {
2095	 test "$cross_compiling" = yes ||
2096	 test -x conftest$ac_exeext
2097       }; then :
2098  ac_retval=0
2099else
2100  $as_echo "$as_me: failed program was:" >&5
2101sed 's/^/| /' conftest.$ac_ext >&5
2102
2103	ac_retval=1
2104fi
2105  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2106  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2107  # interfere with the next link command; also delete a directory that is
2108  # left behind by Apple's compiler.  We do this before executing the actions.
2109  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2110  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2111  as_fn_set_status $ac_retval
2112
2113} # ac_fn_c_try_link
2114
2115# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2116# --------------------------------------------
2117# Tries to find the compile-time value of EXPR in a program that includes
2118# INCLUDES, setting VAR accordingly. Returns whether the value could be
2119# computed
2120ac_fn_c_compute_int ()
2121{
2122  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2123  if test "$cross_compiling" = yes; then
2124    # Depending upon the size, compute the lo and hi bounds.
2125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h.  */
2127$4
2128int
2129main ()
2130{
2131static int test_array [1 - 2 * !(($2) >= 0)];
2132test_array [0] = 0;
2133return test_array [0];
2134
2135  ;
2136  return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_compile "$LINENO"; then :
2140  ac_lo=0 ac_mid=0
2141  while :; do
2142    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143/* end confdefs.h.  */
2144$4
2145int
2146main ()
2147{
2148static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2149test_array [0] = 0;
2150return test_array [0];
2151
2152  ;
2153  return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_compile "$LINENO"; then :
2157  ac_hi=$ac_mid; break
2158else
2159  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2160			if test $ac_lo -le $ac_mid; then
2161			  ac_lo= ac_hi=
2162			  break
2163			fi
2164			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167  done
2168else
2169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2170/* end confdefs.h.  */
2171$4
2172int
2173main ()
2174{
2175static int test_array [1 - 2 * !(($2) < 0)];
2176test_array [0] = 0;
2177return test_array [0];
2178
2179  ;
2180  return 0;
2181}
2182_ACEOF
2183if ac_fn_c_try_compile "$LINENO"; then :
2184  ac_hi=-1 ac_mid=-1
2185  while :; do
2186    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187/* end confdefs.h.  */
2188$4
2189int
2190main ()
2191{
2192static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2193test_array [0] = 0;
2194return test_array [0];
2195
2196  ;
2197  return 0;
2198}
2199_ACEOF
2200if ac_fn_c_try_compile "$LINENO"; then :
2201  ac_lo=$ac_mid; break
2202else
2203  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2204			if test $ac_mid -le $ac_hi; then
2205			  ac_lo= ac_hi=
2206			  break
2207			fi
2208			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2209fi
2210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2211  done
2212else
2213  ac_lo= ac_hi=
2214fi
2215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2216fi
2217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218# Binary search between lo and hi bounds.
2219while test "x$ac_lo" != "x$ac_hi"; do
2220  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2221  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2222/* end confdefs.h.  */
2223$4
2224int
2225main ()
2226{
2227static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2228test_array [0] = 0;
2229return test_array [0];
2230
2231  ;
2232  return 0;
2233}
2234_ACEOF
2235if ac_fn_c_try_compile "$LINENO"; then :
2236  ac_hi=$ac_mid
2237else
2238  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2239fi
2240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2241done
2242case $ac_lo in #((
2243?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2244'') ac_retval=1 ;;
2245esac
2246  else
2247    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h.  */
2249$4
2250static long int longval () { return $2; }
2251static unsigned long int ulongval () { return $2; }
2252#include <stdio.h>
2253#include <stdlib.h>
2254int
2255main ()
2256{
2257
2258  FILE *f = fopen ("conftest.val", "w");
2259  if (! f)
2260    return 1;
2261  if (($2) < 0)
2262    {
2263      long int i = longval ();
2264      if (i != ($2))
2265	return 1;
2266      fprintf (f, "%ld", i);
2267    }
2268  else
2269    {
2270      unsigned long int i = ulongval ();
2271      if (i != ($2))
2272	return 1;
2273      fprintf (f, "%lu", i);
2274    }
2275  /* Do not output a trailing newline, as this causes \r\n confusion
2276     on some platforms.  */
2277  return ferror (f) || fclose (f) != 0;
2278
2279  ;
2280  return 0;
2281}
2282_ACEOF
2283if ac_fn_c_try_run "$LINENO"; then :
2284  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2285else
2286  ac_retval=1
2287fi
2288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2289  conftest.$ac_objext conftest.beam conftest.$ac_ext
2290rm -f conftest.val
2291
2292  fi
2293  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2294  as_fn_set_status $ac_retval
2295
2296} # ac_fn_c_compute_int
2297
2298# ac_fn_c_check_func LINENO FUNC VAR
2299# ----------------------------------
2300# Tests whether FUNC exists, setting the cache variable VAR accordingly
2301ac_fn_c_check_func ()
2302{
2303  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2305$as_echo_n "checking for $2... " >&6; }
2306if eval \${$3+:} false; then :
2307  $as_echo_n "(cached) " >&6
2308else
2309  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h.  */
2311/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2312   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2313#define $2 innocuous_$2
2314
2315/* System header to define __stub macros and hopefully few prototypes,
2316    which can conflict with char $2 (); below.
2317    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2318    <limits.h> exists even on freestanding compilers.  */
2319
2320#ifdef __STDC__
2321# include <limits.h>
2322#else
2323# include <assert.h>
2324#endif
2325
2326#undef $2
2327
2328/* Override any GCC internal prototype to avoid an error.
2329   Use char because int might match the return type of a GCC
2330   builtin and then its argument prototype would still apply.  */
2331#ifdef __cplusplus
2332extern "C"
2333#endif
2334char $2 ();
2335/* The GNU C library defines this for functions which it implements
2336    to always fail with ENOSYS.  Some functions are actually named
2337    something starting with __ and the normal name is an alias.  */
2338#if defined __stub_$2 || defined __stub___$2
2339choke me
2340#endif
2341
2342int
2343main ()
2344{
2345return $2 ();
2346  ;
2347  return 0;
2348}
2349_ACEOF
2350if ac_fn_c_try_link "$LINENO"; then :
2351  eval "$3=yes"
2352else
2353  eval "$3=no"
2354fi
2355rm -f core conftest.err conftest.$ac_objext \
2356    conftest$ac_exeext conftest.$ac_ext
2357fi
2358eval ac_res=\$$3
2359	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2360$as_echo "$ac_res" >&6; }
2361  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2362
2363} # ac_fn_c_check_func
2364
2365# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2366# -------------------------------------------
2367# Tests whether TYPE exists after having included INCLUDES, setting cache
2368# variable VAR accordingly.
2369ac_fn_c_check_type ()
2370{
2371  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2373$as_echo_n "checking for $2... " >&6; }
2374if eval \${$3+:} false; then :
2375  $as_echo_n "(cached) " >&6
2376else
2377  eval "$3=no"
2378  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379/* end confdefs.h.  */
2380$4
2381int
2382main ()
2383{
2384if (sizeof ($2))
2385	 return 0;
2386  ;
2387  return 0;
2388}
2389_ACEOF
2390if ac_fn_c_try_compile "$LINENO"; then :
2391  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h.  */
2393$4
2394int
2395main ()
2396{
2397if (sizeof (($2)))
2398	    return 0;
2399  ;
2400  return 0;
2401}
2402_ACEOF
2403if ac_fn_c_try_compile "$LINENO"; then :
2404
2405else
2406  eval "$3=yes"
2407fi
2408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409fi
2410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2411fi
2412eval ac_res=\$$3
2413	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2414$as_echo "$ac_res" >&6; }
2415  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2416
2417} # ac_fn_c_check_type
2418
2419# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2420# ---------------------------------------------
2421# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2422# accordingly.
2423ac_fn_c_check_decl ()
2424{
2425  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2426  as_decl_name=`echo $2|sed 's/ *(.*//'`
2427  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2429$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2430if eval \${$3+:} false; then :
2431  $as_echo_n "(cached) " >&6
2432else
2433  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434/* end confdefs.h.  */
2435$4
2436int
2437main ()
2438{
2439#ifndef $as_decl_name
2440#ifdef __cplusplus
2441  (void) $as_decl_use;
2442#else
2443  (void) $as_decl_name;
2444#endif
2445#endif
2446
2447  ;
2448  return 0;
2449}
2450_ACEOF
2451if ac_fn_c_try_compile "$LINENO"; then :
2452  eval "$3=yes"
2453else
2454  eval "$3=no"
2455fi
2456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2457fi
2458eval ac_res=\$$3
2459	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2460$as_echo "$ac_res" >&6; }
2461  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2462
2463} # ac_fn_c_check_decl
2464
2465# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2466# ----------------------------------------------------
2467# Tries to find if the field MEMBER exists in type AGGR, after including
2468# INCLUDES, setting cache variable VAR accordingly.
2469ac_fn_c_check_member ()
2470{
2471  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2473$as_echo_n "checking for $2.$3... " >&6; }
2474if eval \${$4+:} false; then :
2475  $as_echo_n "(cached) " >&6
2476else
2477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2478/* end confdefs.h.  */
2479$5
2480int
2481main ()
2482{
2483static $2 ac_aggr;
2484if (ac_aggr.$3)
2485return 0;
2486  ;
2487  return 0;
2488}
2489_ACEOF
2490if ac_fn_c_try_compile "$LINENO"; then :
2491  eval "$4=yes"
2492else
2493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2494/* end confdefs.h.  */
2495$5
2496int
2497main ()
2498{
2499static $2 ac_aggr;
2500if (sizeof ac_aggr.$3)
2501return 0;
2502  ;
2503  return 0;
2504}
2505_ACEOF
2506if ac_fn_c_try_compile "$LINENO"; then :
2507  eval "$4=yes"
2508else
2509  eval "$4=no"
2510fi
2511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2512fi
2513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2514fi
2515eval ac_res=\$$4
2516	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2517$as_echo "$ac_res" >&6; }
2518  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2519
2520} # ac_fn_c_check_member
2521
2522# ac_fn_cxx_try_link LINENO
2523# -------------------------
2524# Try to link conftest.$ac_ext, and return whether this succeeded.
2525ac_fn_cxx_try_link ()
2526{
2527  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528  rm -f conftest.$ac_objext conftest$ac_exeext
2529  if { { ac_try="$ac_link"
2530case "(($ac_try" in
2531  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2532  *) ac_try_echo=$ac_try;;
2533esac
2534eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2535$as_echo "$ac_try_echo"; } >&5
2536  (eval "$ac_link") 2>conftest.err
2537  ac_status=$?
2538  if test -s conftest.err; then
2539    grep -v '^ *+' conftest.err >conftest.er1
2540    cat conftest.er1 >&5
2541    mv -f conftest.er1 conftest.err
2542  fi
2543  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2544  test $ac_status = 0; } && {
2545	 test -z "$ac_cxx_werror_flag" ||
2546	 test ! -s conftest.err
2547       } && test -s conftest$ac_exeext && {
2548	 test "$cross_compiling" = yes ||
2549	 test -x conftest$ac_exeext
2550       }; then :
2551  ac_retval=0
2552else
2553  $as_echo "$as_me: failed program was:" >&5
2554sed 's/^/| /' conftest.$ac_ext >&5
2555
2556	ac_retval=1
2557fi
2558  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2559  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2560  # interfere with the next link command; also delete a directory that is
2561  # left behind by Apple's compiler.  We do this before executing the actions.
2562  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2563  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2564  as_fn_set_status $ac_retval
2565
2566} # ac_fn_cxx_try_link
2567
2568# ac_fn_cxx_check_func LINENO FUNC VAR
2569# ------------------------------------
2570# Tests whether FUNC exists, setting the cache variable VAR accordingly
2571ac_fn_cxx_check_func ()
2572{
2573  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2575$as_echo_n "checking for $2... " >&6; }
2576if eval \${$3+:} false; then :
2577  $as_echo_n "(cached) " >&6
2578else
2579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2580/* end confdefs.h.  */
2581/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2582   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2583#define $2 innocuous_$2
2584
2585/* System header to define __stub macros and hopefully few prototypes,
2586    which can conflict with char $2 (); below.
2587    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2588    <limits.h> exists even on freestanding compilers.  */
2589
2590#ifdef __STDC__
2591# include <limits.h>
2592#else
2593# include <assert.h>
2594#endif
2595
2596#undef $2
2597
2598/* Override any GCC internal prototype to avoid an error.
2599   Use char because int might match the return type of a GCC
2600   builtin and then its argument prototype would still apply.  */
2601#ifdef __cplusplus
2602extern "C"
2603#endif
2604char $2 ();
2605/* The GNU C library defines this for functions which it implements
2606    to always fail with ENOSYS.  Some functions are actually named
2607    something starting with __ and the normal name is an alias.  */
2608#if defined __stub_$2 || defined __stub___$2
2609choke me
2610#endif
2611
2612int
2613main ()
2614{
2615return $2 ();
2616  ;
2617  return 0;
2618}
2619_ACEOF
2620if ac_fn_cxx_try_link "$LINENO"; then :
2621  eval "$3=yes"
2622else
2623  eval "$3=no"
2624fi
2625rm -f core conftest.err conftest.$ac_objext \
2626    conftest$ac_exeext conftest.$ac_ext
2627fi
2628eval ac_res=\$$3
2629	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2630$as_echo "$ac_res" >&6; }
2631  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2632
2633} # ac_fn_cxx_check_func
2634cat >config.log <<_ACEOF
2635This file contains any messages produced by compilers while
2636running configure, to aid debugging if configure makes a mistake.
2637
2638It was created by $as_me, which was
2639generated by GNU Autoconf 2.69.  Invocation command line was
2640
2641  $ $0 $@
2642
2643_ACEOF
2644exec 5>>config.log
2645{
2646cat <<_ASUNAME
2647## --------- ##
2648## Platform. ##
2649## --------- ##
2650
2651hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2652uname -m = `(uname -m) 2>/dev/null || echo unknown`
2653uname -r = `(uname -r) 2>/dev/null || echo unknown`
2654uname -s = `(uname -s) 2>/dev/null || echo unknown`
2655uname -v = `(uname -v) 2>/dev/null || echo unknown`
2656
2657/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2658/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2659
2660/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2661/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2662/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2663/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2664/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2665/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2666/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2667
2668_ASUNAME
2669
2670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2671for as_dir in $PATH
2672do
2673  IFS=$as_save_IFS
2674  test -z "$as_dir" && as_dir=.
2675    $as_echo "PATH: $as_dir"
2676  done
2677IFS=$as_save_IFS
2678
2679} >&5
2680
2681cat >&5 <<_ACEOF
2682
2683
2684## ----------- ##
2685## Core tests. ##
2686## ----------- ##
2687
2688_ACEOF
2689
2690
2691# Keep a trace of the command line.
2692# Strip out --no-create and --no-recursion so they do not pile up.
2693# Strip out --silent because we don't want to record it for future runs.
2694# Also quote any args containing shell meta-characters.
2695# Make two passes to allow for proper duplicate-argument suppression.
2696ac_configure_args=
2697ac_configure_args0=
2698ac_configure_args1=
2699ac_must_keep_next=false
2700for ac_pass in 1 2
2701do
2702  for ac_arg
2703  do
2704    case $ac_arg in
2705    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2706    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2707    | -silent | --silent | --silen | --sile | --sil)
2708      continue ;;
2709    *\'*)
2710      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2711    esac
2712    case $ac_pass in
2713    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2714    2)
2715      as_fn_append ac_configure_args1 " '$ac_arg'"
2716      if test $ac_must_keep_next = true; then
2717	ac_must_keep_next=false # Got value, back to normal.
2718      else
2719	case $ac_arg in
2720	  *=* | --config-cache | -C | -disable-* | --disable-* \
2721	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2722	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2723	  | -with-* | --with-* | -without-* | --without-* | --x)
2724	    case "$ac_configure_args0 " in
2725	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2726	    esac
2727	    ;;
2728	  -* ) ac_must_keep_next=true ;;
2729	esac
2730      fi
2731      as_fn_append ac_configure_args " '$ac_arg'"
2732      ;;
2733    esac
2734  done
2735done
2736{ ac_configure_args0=; unset ac_configure_args0;}
2737{ ac_configure_args1=; unset ac_configure_args1;}
2738
2739# When interrupted or exit'd, cleanup temporary files, and complete
2740# config.log.  We remove comments because anyway the quotes in there
2741# would cause problems or look ugly.
2742# WARNING: Use '\'' to represent an apostrophe within the trap.
2743# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2744trap 'exit_status=$?
2745  # Save into config.log some information that might help in debugging.
2746  {
2747    echo
2748
2749    $as_echo "## ---------------- ##
2750## Cache variables. ##
2751## ---------------- ##"
2752    echo
2753    # The following way of writing the cache mishandles newlines in values,
2754(
2755  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2756    eval ac_val=\$$ac_var
2757    case $ac_val in #(
2758    *${as_nl}*)
2759      case $ac_var in #(
2760      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2761$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2762      esac
2763      case $ac_var in #(
2764      _ | IFS | as_nl) ;; #(
2765      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2766      *) { eval $ac_var=; unset $ac_var;} ;;
2767      esac ;;
2768    esac
2769  done
2770  (set) 2>&1 |
2771    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2772    *${as_nl}ac_space=\ *)
2773      sed -n \
2774	"s/'\''/'\''\\\\'\'''\''/g;
2775	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2776      ;; #(
2777    *)
2778      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2779      ;;
2780    esac |
2781    sort
2782)
2783    echo
2784
2785    $as_echo "## ----------------- ##
2786## Output variables. ##
2787## ----------------- ##"
2788    echo
2789    for ac_var in $ac_subst_vars
2790    do
2791      eval ac_val=\$$ac_var
2792      case $ac_val in
2793      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2794      esac
2795      $as_echo "$ac_var='\''$ac_val'\''"
2796    done | sort
2797    echo
2798
2799    if test -n "$ac_subst_files"; then
2800      $as_echo "## ------------------- ##
2801## File substitutions. ##
2802## ------------------- ##"
2803      echo
2804      for ac_var in $ac_subst_files
2805      do
2806	eval ac_val=\$$ac_var
2807	case $ac_val in
2808	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2809	esac
2810	$as_echo "$ac_var='\''$ac_val'\''"
2811      done | sort
2812      echo
2813    fi
2814
2815    if test -s confdefs.h; then
2816      $as_echo "## ----------- ##
2817## confdefs.h. ##
2818## ----------- ##"
2819      echo
2820      cat confdefs.h
2821      echo
2822    fi
2823    test "$ac_signal" != 0 &&
2824      $as_echo "$as_me: caught signal $ac_signal"
2825    $as_echo "$as_me: exit $exit_status"
2826  } >&5
2827  rm -f core *.core core.conftest.* &&
2828    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2829    exit $exit_status
2830' 0
2831for ac_signal in 1 2 13 15; do
2832  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2833done
2834ac_signal=0
2835
2836# confdefs.h avoids OS command line length limits that DEFS can exceed.
2837rm -f -r conftest* confdefs.h
2838
2839$as_echo "/* confdefs.h */" > confdefs.h
2840
2841# Predefined preprocessor variables.
2842
2843cat >>confdefs.h <<_ACEOF
2844#define PACKAGE_NAME "$PACKAGE_NAME"
2845_ACEOF
2846
2847cat >>confdefs.h <<_ACEOF
2848#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2849_ACEOF
2850
2851cat >>confdefs.h <<_ACEOF
2852#define PACKAGE_VERSION "$PACKAGE_VERSION"
2853_ACEOF
2854
2855cat >>confdefs.h <<_ACEOF
2856#define PACKAGE_STRING "$PACKAGE_STRING"
2857_ACEOF
2858
2859cat >>confdefs.h <<_ACEOF
2860#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2861_ACEOF
2862
2863cat >>confdefs.h <<_ACEOF
2864#define PACKAGE_URL "$PACKAGE_URL"
2865_ACEOF
2866
2867
2868# Let the site file select an alternate cache file if it wants to.
2869# Prefer an explicitly selected file to automatically selected ones.
2870ac_site_file1=NONE
2871ac_site_file2=NONE
2872if test -n "$CONFIG_SITE"; then
2873  # We do not want a PATH search for config.site.
2874  case $CONFIG_SITE in #((
2875    -*)  ac_site_file1=./$CONFIG_SITE;;
2876    */*) ac_site_file1=$CONFIG_SITE;;
2877    *)   ac_site_file1=./$CONFIG_SITE;;
2878  esac
2879elif test "x$prefix" != xNONE; then
2880  ac_site_file1=$prefix/share/config.site
2881  ac_site_file2=$prefix/etc/config.site
2882else
2883  ac_site_file1=$ac_default_prefix/share/config.site
2884  ac_site_file2=$ac_default_prefix/etc/config.site
2885fi
2886for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2887do
2888  test "x$ac_site_file" = xNONE && continue
2889  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2890    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2891$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2892    sed 's/^/| /' "$ac_site_file" >&5
2893    . "$ac_site_file" \
2894      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2896as_fn_error $? "failed to load site script $ac_site_file
2897See \`config.log' for more details" "$LINENO" 5; }
2898  fi
2899done
2900
2901if test -r "$cache_file"; then
2902  # Some versions of bash will fail to source /dev/null (special files
2903  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2904  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2905    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2906$as_echo "$as_me: loading cache $cache_file" >&6;}
2907    case $cache_file in
2908      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2909      *)                      . "./$cache_file";;
2910    esac
2911  fi
2912else
2913  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2914$as_echo "$as_me: creating cache $cache_file" >&6;}
2915  >$cache_file
2916fi
2917
2918as_fn_append ac_header_list " stdlib.h"
2919as_fn_append ac_header_list " unistd.h"
2920as_fn_append ac_header_list " sys/param.h"
2921# Check that the precious variables saved in the cache have kept the same
2922# value.
2923ac_cache_corrupted=false
2924for ac_var in $ac_precious_vars; do
2925  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2926  eval ac_new_set=\$ac_env_${ac_var}_set
2927  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2928  eval ac_new_val=\$ac_env_${ac_var}_value
2929  case $ac_old_set,$ac_new_set in
2930    set,)
2931      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2932$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2933      ac_cache_corrupted=: ;;
2934    ,set)
2935      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2936$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2937      ac_cache_corrupted=: ;;
2938    ,);;
2939    *)
2940      if test "x$ac_old_val" != "x$ac_new_val"; then
2941	# differences in whitespace do not lead to failure.
2942	ac_old_val_w=`echo x $ac_old_val`
2943	ac_new_val_w=`echo x $ac_new_val`
2944	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2945	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2946$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2947	  ac_cache_corrupted=:
2948	else
2949	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2950$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2951	  eval $ac_var=\$ac_old_val
2952	fi
2953	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2954$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2955	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2956$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2957      fi;;
2958  esac
2959  # Pass precious variables to config.status.
2960  if test "$ac_new_set" = set; then
2961    case $ac_new_val in
2962    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2963    *) ac_arg=$ac_var=$ac_new_val ;;
2964    esac
2965    case " $ac_configure_args " in
2966      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2967      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2968    esac
2969  fi
2970done
2971if $ac_cache_corrupted; then
2972  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2974  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2975$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2976  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2977fi
2978## -------------------- ##
2979## Main body of script. ##
2980## -------------------- ##
2981
2982ac_ext=c
2983ac_cpp='$CPP $CPPFLAGS'
2984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2986ac_compiler_gnu=$ac_cv_c_compiler_gnu
2987
2988
2989
2990
2991
2992
2993
2994ac_config_headers="$ac_config_headers config.h:config.in"
2995
2996
2997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2998$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2999    # Check whether --enable-maintainer-mode was given.
3000if test "${enable_maintainer_mode+set}" = set; then :
3001  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3002else
3003  USE_MAINTAINER_MODE=no
3004fi
3005
3006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3007$as_echo "$USE_MAINTAINER_MODE" >&6; }
3008   if test $USE_MAINTAINER_MODE = yes; then
3009  MAINTAINER_MODE_TRUE=
3010  MAINTAINER_MODE_FALSE='#'
3011else
3012  MAINTAINER_MODE_TRUE='#'
3013  MAINTAINER_MODE_FALSE=
3014fi
3015
3016  MAINT=$MAINTAINER_MODE_TRUE
3017
3018
3019
3020ac_ext=c
3021ac_cpp='$CPP $CPPFLAGS'
3022ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3023ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3024ac_compiler_gnu=$ac_cv_c_compiler_gnu
3025if test -n "$ac_tool_prefix"; then
3026  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3027set dummy ${ac_tool_prefix}gcc; ac_word=$2
3028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3029$as_echo_n "checking for $ac_word... " >&6; }
3030if ${ac_cv_prog_CC+:} false; then :
3031  $as_echo_n "(cached) " >&6
3032else
3033  if test -n "$CC"; then
3034  ac_cv_prog_CC="$CC" # Let the user override the test.
3035else
3036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3037for as_dir in $PATH
3038do
3039  IFS=$as_save_IFS
3040  test -z "$as_dir" && as_dir=.
3041    for ac_exec_ext in '' $ac_executable_extensions; do
3042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3043    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3045    break 2
3046  fi
3047done
3048  done
3049IFS=$as_save_IFS
3050
3051fi
3052fi
3053CC=$ac_cv_prog_CC
3054if test -n "$CC"; then
3055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3056$as_echo "$CC" >&6; }
3057else
3058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3059$as_echo "no" >&6; }
3060fi
3061
3062
3063fi
3064if test -z "$ac_cv_prog_CC"; then
3065  ac_ct_CC=$CC
3066  # Extract the first word of "gcc", so it can be a program name with args.
3067set dummy gcc; ac_word=$2
3068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3069$as_echo_n "checking for $ac_word... " >&6; }
3070if ${ac_cv_prog_ac_ct_CC+:} false; then :
3071  $as_echo_n "(cached) " >&6
3072else
3073  if test -n "$ac_ct_CC"; then
3074  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3075else
3076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3077for as_dir in $PATH
3078do
3079  IFS=$as_save_IFS
3080  test -z "$as_dir" && as_dir=.
3081    for ac_exec_ext in '' $ac_executable_extensions; do
3082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3083    ac_cv_prog_ac_ct_CC="gcc"
3084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3085    break 2
3086  fi
3087done
3088  done
3089IFS=$as_save_IFS
3090
3091fi
3092fi
3093ac_ct_CC=$ac_cv_prog_ac_ct_CC
3094if test -n "$ac_ct_CC"; then
3095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3096$as_echo "$ac_ct_CC" >&6; }
3097else
3098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3099$as_echo "no" >&6; }
3100fi
3101
3102  if test "x$ac_ct_CC" = x; then
3103    CC=""
3104  else
3105    case $cross_compiling:$ac_tool_warned in
3106yes:)
3107{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3108$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3109ac_tool_warned=yes ;;
3110esac
3111    CC=$ac_ct_CC
3112  fi
3113else
3114  CC="$ac_cv_prog_CC"
3115fi
3116
3117if test -z "$CC"; then
3118          if test -n "$ac_tool_prefix"; then
3119    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3120set dummy ${ac_tool_prefix}cc; ac_word=$2
3121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3122$as_echo_n "checking for $ac_word... " >&6; }
3123if ${ac_cv_prog_CC+:} false; then :
3124  $as_echo_n "(cached) " >&6
3125else
3126  if test -n "$CC"; then
3127  ac_cv_prog_CC="$CC" # Let the user override the test.
3128else
3129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3130for as_dir in $PATH
3131do
3132  IFS=$as_save_IFS
3133  test -z "$as_dir" && as_dir=.
3134    for ac_exec_ext in '' $ac_executable_extensions; do
3135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3136    ac_cv_prog_CC="${ac_tool_prefix}cc"
3137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3138    break 2
3139  fi
3140done
3141  done
3142IFS=$as_save_IFS
3143
3144fi
3145fi
3146CC=$ac_cv_prog_CC
3147if test -n "$CC"; then
3148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3149$as_echo "$CC" >&6; }
3150else
3151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3152$as_echo "no" >&6; }
3153fi
3154
3155
3156  fi
3157fi
3158if test -z "$CC"; then
3159  # Extract the first word of "cc", so it can be a program name with args.
3160set dummy cc; ac_word=$2
3161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3162$as_echo_n "checking for $ac_word... " >&6; }
3163if ${ac_cv_prog_CC+:} false; then :
3164  $as_echo_n "(cached) " >&6
3165else
3166  if test -n "$CC"; then
3167  ac_cv_prog_CC="$CC" # Let the user override the test.
3168else
3169  ac_prog_rejected=no
3170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3171for as_dir in $PATH
3172do
3173  IFS=$as_save_IFS
3174  test -z "$as_dir" && as_dir=.
3175    for ac_exec_ext in '' $ac_executable_extensions; do
3176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3177    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3178       ac_prog_rejected=yes
3179       continue
3180     fi
3181    ac_cv_prog_CC="cc"
3182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3183    break 2
3184  fi
3185done
3186  done
3187IFS=$as_save_IFS
3188
3189if test $ac_prog_rejected = yes; then
3190  # We found a bogon in the path, so make sure we never use it.
3191  set dummy $ac_cv_prog_CC
3192  shift
3193  if test $# != 0; then
3194    # We chose a different compiler from the bogus one.
3195    # However, it has the same basename, so the bogon will be chosen
3196    # first if we set CC to just the basename; use the full file name.
3197    shift
3198    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3199  fi
3200fi
3201fi
3202fi
3203CC=$ac_cv_prog_CC
3204if test -n "$CC"; then
3205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3206$as_echo "$CC" >&6; }
3207else
3208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3209$as_echo "no" >&6; }
3210fi
3211
3212
3213fi
3214if test -z "$CC"; then
3215  if test -n "$ac_tool_prefix"; then
3216  for ac_prog in cl.exe
3217  do
3218    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3219set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3221$as_echo_n "checking for $ac_word... " >&6; }
3222if ${ac_cv_prog_CC+:} false; then :
3223  $as_echo_n "(cached) " >&6
3224else
3225  if test -n "$CC"; then
3226  ac_cv_prog_CC="$CC" # Let the user override the test.
3227else
3228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3229for as_dir in $PATH
3230do
3231  IFS=$as_save_IFS
3232  test -z "$as_dir" && as_dir=.
3233    for ac_exec_ext in '' $ac_executable_extensions; do
3234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3235    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3237    break 2
3238  fi
3239done
3240  done
3241IFS=$as_save_IFS
3242
3243fi
3244fi
3245CC=$ac_cv_prog_CC
3246if test -n "$CC"; then
3247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3248$as_echo "$CC" >&6; }
3249else
3250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3251$as_echo "no" >&6; }
3252fi
3253
3254
3255    test -n "$CC" && break
3256  done
3257fi
3258if test -z "$CC"; then
3259  ac_ct_CC=$CC
3260  for ac_prog in cl.exe
3261do
3262  # Extract the first word of "$ac_prog", so it can be a program name with args.
3263set dummy $ac_prog; ac_word=$2
3264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3265$as_echo_n "checking for $ac_word... " >&6; }
3266if ${ac_cv_prog_ac_ct_CC+:} false; then :
3267  $as_echo_n "(cached) " >&6
3268else
3269  if test -n "$ac_ct_CC"; then
3270  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3271else
3272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3273for as_dir in $PATH
3274do
3275  IFS=$as_save_IFS
3276  test -z "$as_dir" && as_dir=.
3277    for ac_exec_ext in '' $ac_executable_extensions; do
3278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3279    ac_cv_prog_ac_ct_CC="$ac_prog"
3280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3281    break 2
3282  fi
3283done
3284  done
3285IFS=$as_save_IFS
3286
3287fi
3288fi
3289ac_ct_CC=$ac_cv_prog_ac_ct_CC
3290if test -n "$ac_ct_CC"; then
3291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3292$as_echo "$ac_ct_CC" >&6; }
3293else
3294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3295$as_echo "no" >&6; }
3296fi
3297
3298
3299  test -n "$ac_ct_CC" && break
3300done
3301
3302  if test "x$ac_ct_CC" = x; then
3303    CC=""
3304  else
3305    case $cross_compiling:$ac_tool_warned in
3306yes:)
3307{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3308$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3309ac_tool_warned=yes ;;
3310esac
3311    CC=$ac_ct_CC
3312  fi
3313fi
3314
3315fi
3316
3317
3318test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3320as_fn_error $? "no acceptable C compiler found in \$PATH
3321See \`config.log' for more details" "$LINENO" 5; }
3322
3323# Provide some information about the compiler.
3324$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3325set X $ac_compile
3326ac_compiler=$2
3327for ac_option in --version -v -V -qversion; do
3328  { { ac_try="$ac_compiler $ac_option >&5"
3329case "(($ac_try" in
3330  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3331  *) ac_try_echo=$ac_try;;
3332esac
3333eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3334$as_echo "$ac_try_echo"; } >&5
3335  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3336  ac_status=$?
3337  if test -s conftest.err; then
3338    sed '10a\
3339... rest of stderr output deleted ...
3340         10q' conftest.err >conftest.er1
3341    cat conftest.er1 >&5
3342  fi
3343  rm -f conftest.er1 conftest.err
3344  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3345  test $ac_status = 0; }
3346done
3347
3348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3349/* end confdefs.h.  */
3350
3351int
3352main ()
3353{
3354
3355  ;
3356  return 0;
3357}
3358_ACEOF
3359ac_clean_files_save=$ac_clean_files
3360ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3361# Try to create an executable without -o first, disregard a.out.
3362# It will help us diagnose broken compilers, and finding out an intuition
3363# of exeext.
3364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3365$as_echo_n "checking whether the C compiler works... " >&6; }
3366ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3367
3368# The possible output files:
3369ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3370
3371ac_rmfiles=
3372for ac_file in $ac_files
3373do
3374  case $ac_file in
3375    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3376    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3377  esac
3378done
3379rm -f $ac_rmfiles
3380
3381if { { ac_try="$ac_link_default"
3382case "(($ac_try" in
3383  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3384  *) ac_try_echo=$ac_try;;
3385esac
3386eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3387$as_echo "$ac_try_echo"; } >&5
3388  (eval "$ac_link_default") 2>&5
3389  ac_status=$?
3390  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3391  test $ac_status = 0; }; then :
3392  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3393# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3394# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3395# so that the user can short-circuit this test for compilers unknown to
3396# Autoconf.
3397for ac_file in $ac_files ''
3398do
3399  test -f "$ac_file" || continue
3400  case $ac_file in
3401    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3402	;;
3403    [ab].out )
3404	# We found the default executable, but exeext='' is most
3405	# certainly right.
3406	break;;
3407    *.* )
3408	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3409	then :; else
3410	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3411	fi
3412	# We set ac_cv_exeext here because the later test for it is not
3413	# safe: cross compilers may not add the suffix if given an `-o'
3414	# argument, so we may need to know it at that point already.
3415	# Even if this section looks crufty: it has the advantage of
3416	# actually working.
3417	break;;
3418    * )
3419	break;;
3420  esac
3421done
3422test "$ac_cv_exeext" = no && ac_cv_exeext=
3423
3424else
3425  ac_file=''
3426fi
3427if test -z "$ac_file"; then :
3428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3429$as_echo "no" >&6; }
3430$as_echo "$as_me: failed program was:" >&5
3431sed 's/^/| /' conftest.$ac_ext >&5
3432
3433{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3434$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3435as_fn_error 77 "C compiler cannot create executables
3436See \`config.log' for more details" "$LINENO" 5; }
3437else
3438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3439$as_echo "yes" >&6; }
3440fi
3441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3442$as_echo_n "checking for C compiler default output file name... " >&6; }
3443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3444$as_echo "$ac_file" >&6; }
3445ac_exeext=$ac_cv_exeext
3446
3447rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3448ac_clean_files=$ac_clean_files_save
3449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3450$as_echo_n "checking for suffix of executables... " >&6; }
3451if { { ac_try="$ac_link"
3452case "(($ac_try" in
3453  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3454  *) ac_try_echo=$ac_try;;
3455esac
3456eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3457$as_echo "$ac_try_echo"; } >&5
3458  (eval "$ac_link") 2>&5
3459  ac_status=$?
3460  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3461  test $ac_status = 0; }; then :
3462  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3463# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3464# work properly (i.e., refer to `conftest.exe'), while it won't with
3465# `rm'.
3466for ac_file in conftest.exe conftest conftest.*; do
3467  test -f "$ac_file" || continue
3468  case $ac_file in
3469    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3470    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3471	  break;;
3472    * ) break;;
3473  esac
3474done
3475else
3476  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3477$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3478as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3479See \`config.log' for more details" "$LINENO" 5; }
3480fi
3481rm -f conftest conftest$ac_cv_exeext
3482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3483$as_echo "$ac_cv_exeext" >&6; }
3484
3485rm -f conftest.$ac_ext
3486EXEEXT=$ac_cv_exeext
3487ac_exeext=$EXEEXT
3488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3489/* end confdefs.h.  */
3490#include <stdio.h>
3491int
3492main ()
3493{
3494FILE *f = fopen ("conftest.out", "w");
3495 return ferror (f) || fclose (f) != 0;
3496
3497  ;
3498  return 0;
3499}
3500_ACEOF
3501ac_clean_files="$ac_clean_files conftest.out"
3502# Check that the compiler produces executables we can run.  If not, either
3503# the compiler is broken, or we cross compile.
3504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3505$as_echo_n "checking whether we are cross compiling... " >&6; }
3506if test "$cross_compiling" != yes; then
3507  { { ac_try="$ac_link"
3508case "(($ac_try" in
3509  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3510  *) ac_try_echo=$ac_try;;
3511esac
3512eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3513$as_echo "$ac_try_echo"; } >&5
3514  (eval "$ac_link") 2>&5
3515  ac_status=$?
3516  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3517  test $ac_status = 0; }
3518  if { ac_try='./conftest$ac_cv_exeext'
3519  { { case "(($ac_try" in
3520  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3521  *) ac_try_echo=$ac_try;;
3522esac
3523eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3524$as_echo "$ac_try_echo"; } >&5
3525  (eval "$ac_try") 2>&5
3526  ac_status=$?
3527  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3528  test $ac_status = 0; }; }; then
3529    cross_compiling=no
3530  else
3531    if test "$cross_compiling" = maybe; then
3532	cross_compiling=yes
3533    else
3534	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3535$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3536as_fn_error $? "cannot run C compiled programs.
3537If you meant to cross compile, use \`--host'.
3538See \`config.log' for more details" "$LINENO" 5; }
3539    fi
3540  fi
3541fi
3542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3543$as_echo "$cross_compiling" >&6; }
3544
3545rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3546ac_clean_files=$ac_clean_files_save
3547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3548$as_echo_n "checking for suffix of object files... " >&6; }
3549if ${ac_cv_objext+:} false; then :
3550  $as_echo_n "(cached) " >&6
3551else
3552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3553/* end confdefs.h.  */
3554
3555int
3556main ()
3557{
3558
3559  ;
3560  return 0;
3561}
3562_ACEOF
3563rm -f conftest.o conftest.obj
3564if { { ac_try="$ac_compile"
3565case "(($ac_try" in
3566  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3567  *) ac_try_echo=$ac_try;;
3568esac
3569eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3570$as_echo "$ac_try_echo"; } >&5
3571  (eval "$ac_compile") 2>&5
3572  ac_status=$?
3573  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3574  test $ac_status = 0; }; then :
3575  for ac_file in conftest.o conftest.obj conftest.*; do
3576  test -f "$ac_file" || continue;
3577  case $ac_file in
3578    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3579    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3580       break;;
3581  esac
3582done
3583else
3584  $as_echo "$as_me: failed program was:" >&5
3585sed 's/^/| /' conftest.$ac_ext >&5
3586
3587{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3588$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3589as_fn_error $? "cannot compute suffix of object files: cannot compile
3590See \`config.log' for more details" "$LINENO" 5; }
3591fi
3592rm -f conftest.$ac_cv_objext conftest.$ac_ext
3593fi
3594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3595$as_echo "$ac_cv_objext" >&6; }
3596OBJEXT=$ac_cv_objext
3597ac_objext=$OBJEXT
3598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3599$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3600if ${ac_cv_c_compiler_gnu+:} false; then :
3601  $as_echo_n "(cached) " >&6
3602else
3603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3604/* end confdefs.h.  */
3605
3606int
3607main ()
3608{
3609#ifndef __GNUC__
3610       choke me
3611#endif
3612
3613  ;
3614  return 0;
3615}
3616_ACEOF
3617if ac_fn_c_try_compile "$LINENO"; then :
3618  ac_compiler_gnu=yes
3619else
3620  ac_compiler_gnu=no
3621fi
3622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3623ac_cv_c_compiler_gnu=$ac_compiler_gnu
3624
3625fi
3626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3627$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3628if test $ac_compiler_gnu = yes; then
3629  GCC=yes
3630else
3631  GCC=
3632fi
3633ac_test_CFLAGS=${CFLAGS+set}
3634ac_save_CFLAGS=$CFLAGS
3635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3636$as_echo_n "checking whether $CC accepts -g... " >&6; }
3637if ${ac_cv_prog_cc_g+:} false; then :
3638  $as_echo_n "(cached) " >&6
3639else
3640  ac_save_c_werror_flag=$ac_c_werror_flag
3641   ac_c_werror_flag=yes
3642   ac_cv_prog_cc_g=no
3643   CFLAGS="-g"
3644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3645/* end confdefs.h.  */
3646
3647int
3648main ()
3649{
3650
3651  ;
3652  return 0;
3653}
3654_ACEOF
3655if ac_fn_c_try_compile "$LINENO"; then :
3656  ac_cv_prog_cc_g=yes
3657else
3658  CFLAGS=""
3659      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3660/* end confdefs.h.  */
3661
3662int
3663main ()
3664{
3665
3666  ;
3667  return 0;
3668}
3669_ACEOF
3670if ac_fn_c_try_compile "$LINENO"; then :
3671
3672else
3673  ac_c_werror_flag=$ac_save_c_werror_flag
3674	 CFLAGS="-g"
3675	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3676/* end confdefs.h.  */
3677
3678int
3679main ()
3680{
3681
3682  ;
3683  return 0;
3684}
3685_ACEOF
3686if ac_fn_c_try_compile "$LINENO"; then :
3687  ac_cv_prog_cc_g=yes
3688fi
3689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3690fi
3691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3692fi
3693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3694   ac_c_werror_flag=$ac_save_c_werror_flag
3695fi
3696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3697$as_echo "$ac_cv_prog_cc_g" >&6; }
3698if test "$ac_test_CFLAGS" = set; then
3699  CFLAGS=$ac_save_CFLAGS
3700elif test $ac_cv_prog_cc_g = yes; then
3701  if test "$GCC" = yes; then
3702    CFLAGS="-g -O2"
3703  else
3704    CFLAGS="-g"
3705  fi
3706else
3707  if test "$GCC" = yes; then
3708    CFLAGS="-O2"
3709  else
3710    CFLAGS=
3711  fi
3712fi
3713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3714$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3715if ${ac_cv_prog_cc_c89+:} false; then :
3716  $as_echo_n "(cached) " >&6
3717else
3718  ac_cv_prog_cc_c89=no
3719ac_save_CC=$CC
3720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3721/* end confdefs.h.  */
3722#include <stdarg.h>
3723#include <stdio.h>
3724struct stat;
3725/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3726struct buf { int x; };
3727FILE * (*rcsopen) (struct buf *, struct stat *, int);
3728static char *e (p, i)
3729     char **p;
3730     int i;
3731{
3732  return p[i];
3733}
3734static char *f (char * (*g) (char **, int), char **p, ...)
3735{
3736  char *s;
3737  va_list v;
3738  va_start (v,p);
3739  s = g (p, va_arg (v,int));
3740  va_end (v);
3741  return s;
3742}
3743
3744/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3745   function prototypes and stuff, but not '\xHH' hex character constants.
3746   These don't provoke an error unfortunately, instead are silently treated
3747   as 'x'.  The following induces an error, until -std is added to get
3748   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3749   array size at least.  It's necessary to write '\x00'==0 to get something
3750   that's true only with -std.  */
3751int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3752
3753/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3754   inside strings and character constants.  */
3755#define FOO(x) 'x'
3756int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3757
3758int test (int i, double x);
3759struct s1 {int (*f) (int a);};
3760struct s2 {int (*f) (double a);};
3761int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3762int argc;
3763char **argv;
3764int
3765main ()
3766{
3767return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3768  ;
3769  return 0;
3770}
3771_ACEOF
3772for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3773	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3774do
3775  CC="$ac_save_CC $ac_arg"
3776  if ac_fn_c_try_compile "$LINENO"; then :
3777  ac_cv_prog_cc_c89=$ac_arg
3778fi
3779rm -f core conftest.err conftest.$ac_objext
3780  test "x$ac_cv_prog_cc_c89" != "xno" && break
3781done
3782rm -f conftest.$ac_ext
3783CC=$ac_save_CC
3784
3785fi
3786# AC_CACHE_VAL
3787case "x$ac_cv_prog_cc_c89" in
3788  x)
3789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3790$as_echo "none needed" >&6; } ;;
3791  xno)
3792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3793$as_echo "unsupported" >&6; } ;;
3794  *)
3795    CC="$CC $ac_cv_prog_cc_c89"
3796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3797$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3798esac
3799if test "x$ac_cv_prog_cc_c89" != xno; then :
3800
3801fi
3802
3803ac_ext=c
3804ac_cpp='$CPP $CPPFLAGS'
3805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3807ac_compiler_gnu=$ac_cv_c_compiler_gnu
3808
3809ac_ext=cpp
3810ac_cpp='$CXXCPP $CPPFLAGS'
3811ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3812ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3813ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3814if test -z "$CXX"; then
3815  if test -n "$CCC"; then
3816    CXX=$CCC
3817  else
3818    if test -n "$ac_tool_prefix"; then
3819  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3820  do
3821    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3822set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3824$as_echo_n "checking for $ac_word... " >&6; }
3825if ${ac_cv_prog_CXX+:} false; then :
3826  $as_echo_n "(cached) " >&6
3827else
3828  if test -n "$CXX"; then
3829  ac_cv_prog_CXX="$CXX" # Let the user override the test.
3830else
3831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3832for as_dir in $PATH
3833do
3834  IFS=$as_save_IFS
3835  test -z "$as_dir" && as_dir=.
3836    for ac_exec_ext in '' $ac_executable_extensions; do
3837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3838    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3840    break 2
3841  fi
3842done
3843  done
3844IFS=$as_save_IFS
3845
3846fi
3847fi
3848CXX=$ac_cv_prog_CXX
3849if test -n "$CXX"; then
3850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3851$as_echo "$CXX" >&6; }
3852else
3853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3854$as_echo "no" >&6; }
3855fi
3856
3857
3858    test -n "$CXX" && break
3859  done
3860fi
3861if test -z "$CXX"; then
3862  ac_ct_CXX=$CXX
3863  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3864do
3865  # Extract the first word of "$ac_prog", so it can be a program name with args.
3866set dummy $ac_prog; ac_word=$2
3867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3868$as_echo_n "checking for $ac_word... " >&6; }
3869if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3870  $as_echo_n "(cached) " >&6
3871else
3872  if test -n "$ac_ct_CXX"; then
3873  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3874else
3875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3876for as_dir in $PATH
3877do
3878  IFS=$as_save_IFS
3879  test -z "$as_dir" && as_dir=.
3880    for ac_exec_ext in '' $ac_executable_extensions; do
3881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3882    ac_cv_prog_ac_ct_CXX="$ac_prog"
3883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3884    break 2
3885  fi
3886done
3887  done
3888IFS=$as_save_IFS
3889
3890fi
3891fi
3892ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3893if test -n "$ac_ct_CXX"; then
3894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3895$as_echo "$ac_ct_CXX" >&6; }
3896else
3897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3898$as_echo "no" >&6; }
3899fi
3900
3901
3902  test -n "$ac_ct_CXX" && break
3903done
3904
3905  if test "x$ac_ct_CXX" = x; then
3906    CXX="g++"
3907  else
3908    case $cross_compiling:$ac_tool_warned in
3909yes:)
3910{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3911$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3912ac_tool_warned=yes ;;
3913esac
3914    CXX=$ac_ct_CXX
3915  fi
3916fi
3917
3918  fi
3919fi
3920# Provide some information about the compiler.
3921$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3922set X $ac_compile
3923ac_compiler=$2
3924for ac_option in --version -v -V -qversion; do
3925  { { ac_try="$ac_compiler $ac_option >&5"
3926case "(($ac_try" in
3927  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3928  *) ac_try_echo=$ac_try;;
3929esac
3930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3931$as_echo "$ac_try_echo"; } >&5
3932  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3933  ac_status=$?
3934  if test -s conftest.err; then
3935    sed '10a\
3936... rest of stderr output deleted ...
3937         10q' conftest.err >conftest.er1
3938    cat conftest.er1 >&5
3939  fi
3940  rm -f conftest.er1 conftest.err
3941  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3942  test $ac_status = 0; }
3943done
3944
3945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3946$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3947if ${ac_cv_cxx_compiler_gnu+:} false; then :
3948  $as_echo_n "(cached) " >&6
3949else
3950  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3951/* end confdefs.h.  */
3952
3953int
3954main ()
3955{
3956#ifndef __GNUC__
3957       choke me
3958#endif
3959
3960  ;
3961  return 0;
3962}
3963_ACEOF
3964if ac_fn_cxx_try_compile "$LINENO"; then :
3965  ac_compiler_gnu=yes
3966else
3967  ac_compiler_gnu=no
3968fi
3969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3970ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3971
3972fi
3973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3974$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3975if test $ac_compiler_gnu = yes; then
3976  GXX=yes
3977else
3978  GXX=
3979fi
3980ac_test_CXXFLAGS=${CXXFLAGS+set}
3981ac_save_CXXFLAGS=$CXXFLAGS
3982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3983$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3984if ${ac_cv_prog_cxx_g+:} false; then :
3985  $as_echo_n "(cached) " >&6
3986else
3987  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3988   ac_cxx_werror_flag=yes
3989   ac_cv_prog_cxx_g=no
3990   CXXFLAGS="-g"
3991   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3992/* end confdefs.h.  */
3993
3994int
3995main ()
3996{
3997
3998  ;
3999  return 0;
4000}
4001_ACEOF
4002if ac_fn_cxx_try_compile "$LINENO"; then :
4003  ac_cv_prog_cxx_g=yes
4004else
4005  CXXFLAGS=""
4006      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4007/* end confdefs.h.  */
4008
4009int
4010main ()
4011{
4012
4013  ;
4014  return 0;
4015}
4016_ACEOF
4017if ac_fn_cxx_try_compile "$LINENO"; then :
4018
4019else
4020  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4021	 CXXFLAGS="-g"
4022	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4023/* end confdefs.h.  */
4024
4025int
4026main ()
4027{
4028
4029  ;
4030  return 0;
4031}
4032_ACEOF
4033if ac_fn_cxx_try_compile "$LINENO"; then :
4034  ac_cv_prog_cxx_g=yes
4035fi
4036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4037fi
4038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4039fi
4040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4041   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4042fi
4043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4044$as_echo "$ac_cv_prog_cxx_g" >&6; }
4045if test "$ac_test_CXXFLAGS" = set; then
4046  CXXFLAGS=$ac_save_CXXFLAGS
4047elif test $ac_cv_prog_cxx_g = yes; then
4048  if test "$GXX" = yes; then
4049    CXXFLAGS="-g -O2"
4050  else
4051    CXXFLAGS="-g"
4052  fi
4053else
4054  if test "$GXX" = yes; then
4055    CXXFLAGS="-O2"
4056  else
4057    CXXFLAGS=
4058  fi
4059fi
4060ac_ext=c
4061ac_cpp='$CPP $CPPFLAGS'
4062ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4063ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4064ac_compiler_gnu=$ac_cv_c_compiler_gnu
4065
4066
4067
4068ac_ext=c
4069ac_cpp='$CPP $CPPFLAGS'
4070ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4071ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4072ac_compiler_gnu=$ac_cv_c_compiler_gnu
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4074$as_echo_n "checking how to run the C preprocessor... " >&6; }
4075# On Suns, sometimes $CPP names a directory.
4076if test -n "$CPP" && test -d "$CPP"; then
4077  CPP=
4078fi
4079if test -z "$CPP"; then
4080  if ${ac_cv_prog_CPP+:} false; then :
4081  $as_echo_n "(cached) " >&6
4082else
4083      # Double quotes because CPP needs to be expanded
4084    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4085    do
4086      ac_preproc_ok=false
4087for ac_c_preproc_warn_flag in '' yes
4088do
4089  # Use a header file that comes with gcc, so configuring glibc
4090  # with a fresh cross-compiler works.
4091  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4092  # <limits.h> exists even on freestanding compilers.
4093  # On the NeXT, cc -E runs the code through the compiler's parser,
4094  # not just through cpp. "Syntax error" is here to catch this case.
4095  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4096/* end confdefs.h.  */
4097#ifdef __STDC__
4098# include <limits.h>
4099#else
4100# include <assert.h>
4101#endif
4102		     Syntax error
4103_ACEOF
4104if ac_fn_c_try_cpp "$LINENO"; then :
4105
4106else
4107  # Broken: fails on valid input.
4108continue
4109fi
4110rm -f conftest.err conftest.i conftest.$ac_ext
4111
4112  # OK, works on sane cases.  Now check whether nonexistent headers
4113  # can be detected and how.
4114  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4115/* end confdefs.h.  */
4116#include <ac_nonexistent.h>
4117_ACEOF
4118if ac_fn_c_try_cpp "$LINENO"; then :
4119  # Broken: success on invalid input.
4120continue
4121else
4122  # Passes both tests.
4123ac_preproc_ok=:
4124break
4125fi
4126rm -f conftest.err conftest.i conftest.$ac_ext
4127
4128done
4129# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4130rm -f conftest.i conftest.err conftest.$ac_ext
4131if $ac_preproc_ok; then :
4132  break
4133fi
4134
4135    done
4136    ac_cv_prog_CPP=$CPP
4137
4138fi
4139  CPP=$ac_cv_prog_CPP
4140else
4141  ac_cv_prog_CPP=$CPP
4142fi
4143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4144$as_echo "$CPP" >&6; }
4145ac_preproc_ok=false
4146for ac_c_preproc_warn_flag in '' yes
4147do
4148  # Use a header file that comes with gcc, so configuring glibc
4149  # with a fresh cross-compiler works.
4150  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4151  # <limits.h> exists even on freestanding compilers.
4152  # On the NeXT, cc -E runs the code through the compiler's parser,
4153  # not just through cpp. "Syntax error" is here to catch this case.
4154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4155/* end confdefs.h.  */
4156#ifdef __STDC__
4157# include <limits.h>
4158#else
4159# include <assert.h>
4160#endif
4161		     Syntax error
4162_ACEOF
4163if ac_fn_c_try_cpp "$LINENO"; then :
4164
4165else
4166  # Broken: fails on valid input.
4167continue
4168fi
4169rm -f conftest.err conftest.i conftest.$ac_ext
4170
4171  # OK, works on sane cases.  Now check whether nonexistent headers
4172  # can be detected and how.
4173  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4174/* end confdefs.h.  */
4175#include <ac_nonexistent.h>
4176_ACEOF
4177if ac_fn_c_try_cpp "$LINENO"; then :
4178  # Broken: success on invalid input.
4179continue
4180else
4181  # Passes both tests.
4182ac_preproc_ok=:
4183break
4184fi
4185rm -f conftest.err conftest.i conftest.$ac_ext
4186
4187done
4188# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4189rm -f conftest.i conftest.err conftest.$ac_ext
4190if $ac_preproc_ok; then :
4191
4192else
4193  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4194$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4195as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4196See \`config.log' for more details" "$LINENO" 5; }
4197fi
4198
4199ac_ext=c
4200ac_cpp='$CPP $CPPFLAGS'
4201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4203ac_compiler_gnu=$ac_cv_c_compiler_gnu
4204
4205
4206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4207$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4208if ${ac_cv_path_GREP+:} false; then :
4209  $as_echo_n "(cached) " >&6
4210else
4211  if test -z "$GREP"; then
4212  ac_path_GREP_found=false
4213  # Loop through the user's path and test for each of PROGNAME-LIST
4214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4215for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4216do
4217  IFS=$as_save_IFS
4218  test -z "$as_dir" && as_dir=.
4219    for ac_prog in grep ggrep; do
4220    for ac_exec_ext in '' $ac_executable_extensions; do
4221      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4222      as_fn_executable_p "$ac_path_GREP" || continue
4223# Check for GNU ac_path_GREP and select it if it is found.
4224  # Check for GNU $ac_path_GREP
4225case `"$ac_path_GREP" --version 2>&1` in
4226*GNU*)
4227  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4228*)
4229  ac_count=0
4230  $as_echo_n 0123456789 >"conftest.in"
4231  while :
4232  do
4233    cat "conftest.in" "conftest.in" >"conftest.tmp"
4234    mv "conftest.tmp" "conftest.in"
4235    cp "conftest.in" "conftest.nl"
4236    $as_echo 'GREP' >> "conftest.nl"
4237    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4238    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4239    as_fn_arith $ac_count + 1 && ac_count=$as_val
4240    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4241      # Best one so far, save it but keep looking for a better one
4242      ac_cv_path_GREP="$ac_path_GREP"
4243      ac_path_GREP_max=$ac_count
4244    fi
4245    # 10*(2^10) chars as input seems more than enough
4246    test $ac_count -gt 10 && break
4247  done
4248  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4249esac
4250
4251      $ac_path_GREP_found && break 3
4252    done
4253  done
4254  done
4255IFS=$as_save_IFS
4256  if test -z "$ac_cv_path_GREP"; then
4257    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4258  fi
4259else
4260  ac_cv_path_GREP=$GREP
4261fi
4262
4263fi
4264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4265$as_echo "$ac_cv_path_GREP" >&6; }
4266 GREP="$ac_cv_path_GREP"
4267
4268
4269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4270$as_echo_n "checking for egrep... " >&6; }
4271if ${ac_cv_path_EGREP+:} false; then :
4272  $as_echo_n "(cached) " >&6
4273else
4274  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4275   then ac_cv_path_EGREP="$GREP -E"
4276   else
4277     if test -z "$EGREP"; then
4278  ac_path_EGREP_found=false
4279  # Loop through the user's path and test for each of PROGNAME-LIST
4280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4281for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4282do
4283  IFS=$as_save_IFS
4284  test -z "$as_dir" && as_dir=.
4285    for ac_prog in egrep; do
4286    for ac_exec_ext in '' $ac_executable_extensions; do
4287      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4288      as_fn_executable_p "$ac_path_EGREP" || continue
4289# Check for GNU ac_path_EGREP and select it if it is found.
4290  # Check for GNU $ac_path_EGREP
4291case `"$ac_path_EGREP" --version 2>&1` in
4292*GNU*)
4293  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4294*)
4295  ac_count=0
4296  $as_echo_n 0123456789 >"conftest.in"
4297  while :
4298  do
4299    cat "conftest.in" "conftest.in" >"conftest.tmp"
4300    mv "conftest.tmp" "conftest.in"
4301    cp "conftest.in" "conftest.nl"
4302    $as_echo 'EGREP' >> "conftest.nl"
4303    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4304    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4305    as_fn_arith $ac_count + 1 && ac_count=$as_val
4306    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4307      # Best one so far, save it but keep looking for a better one
4308      ac_cv_path_EGREP="$ac_path_EGREP"
4309      ac_path_EGREP_max=$ac_count
4310    fi
4311    # 10*(2^10) chars as input seems more than enough
4312    test $ac_count -gt 10 && break
4313  done
4314  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4315esac
4316
4317      $ac_path_EGREP_found && break 3
4318    done
4319  done
4320  done
4321IFS=$as_save_IFS
4322  if test -z "$ac_cv_path_EGREP"; then
4323    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4324  fi
4325else
4326  ac_cv_path_EGREP=$EGREP
4327fi
4328
4329   fi
4330fi
4331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4332$as_echo "$ac_cv_path_EGREP" >&6; }
4333 EGREP="$ac_cv_path_EGREP"
4334
4335
4336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4337$as_echo_n "checking for ANSI C header files... " >&6; }
4338if ${ac_cv_header_stdc+:} false; then :
4339  $as_echo_n "(cached) " >&6
4340else
4341  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342/* end confdefs.h.  */
4343#include <stdlib.h>
4344#include <stdarg.h>
4345#include <string.h>
4346#include <float.h>
4347
4348int
4349main ()
4350{
4351
4352  ;
4353  return 0;
4354}
4355_ACEOF
4356if ac_fn_c_try_compile "$LINENO"; then :
4357  ac_cv_header_stdc=yes
4358else
4359  ac_cv_header_stdc=no
4360fi
4361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4362
4363if test $ac_cv_header_stdc = yes; then
4364  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4366/* end confdefs.h.  */
4367#include <string.h>
4368
4369_ACEOF
4370if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4371  $EGREP "memchr" >/dev/null 2>&1; then :
4372
4373else
4374  ac_cv_header_stdc=no
4375fi
4376rm -f conftest*
4377
4378fi
4379
4380if test $ac_cv_header_stdc = yes; then
4381  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4382  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4383/* end confdefs.h.  */
4384#include <stdlib.h>
4385
4386_ACEOF
4387if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4388  $EGREP "free" >/dev/null 2>&1; then :
4389
4390else
4391  ac_cv_header_stdc=no
4392fi
4393rm -f conftest*
4394
4395fi
4396
4397if test $ac_cv_header_stdc = yes; then
4398  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4399  if test "$cross_compiling" = yes; then :
4400  :
4401else
4402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4403/* end confdefs.h.  */
4404#include <ctype.h>
4405#include <stdlib.h>
4406#if ((' ' & 0x0FF) == 0x020)
4407# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4408# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4409#else
4410# define ISLOWER(c) \
4411		   (('a' <= (c) && (c) <= 'i') \
4412		     || ('j' <= (c) && (c) <= 'r') \
4413		     || ('s' <= (c) && (c) <= 'z'))
4414# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4415#endif
4416
4417#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4418int
4419main ()
4420{
4421  int i;
4422  for (i = 0; i < 256; i++)
4423    if (XOR (islower (i), ISLOWER (i))
4424	|| toupper (i) != TOUPPER (i))
4425      return 2;
4426  return 0;
4427}
4428_ACEOF
4429if ac_fn_c_try_run "$LINENO"; then :
4430
4431else
4432  ac_cv_header_stdc=no
4433fi
4434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4435  conftest.$ac_objext conftest.beam conftest.$ac_ext
4436fi
4437
4438fi
4439fi
4440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4441$as_echo "$ac_cv_header_stdc" >&6; }
4442if test $ac_cv_header_stdc = yes; then
4443
4444$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4445
4446fi
4447
4448# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4449for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4450		  inttypes.h stdint.h unistd.h
4451do :
4452  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4453ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4454"
4455if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4456  cat >>confdefs.h <<_ACEOF
4457#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4458_ACEOF
4459
4460fi
4461
4462done
4463
4464
4465
4466  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4467if test "x$ac_cv_header_minix_config_h" = xyes; then :
4468  MINIX=yes
4469else
4470  MINIX=
4471fi
4472
4473
4474  if test "$MINIX" = yes; then
4475
4476$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4477
4478
4479$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4480
4481
4482$as_echo "#define _MINIX 1" >>confdefs.h
4483
4484  fi
4485
4486
4487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4488$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4489if ${ac_cv_safe_to_define___extensions__+:} false; then :
4490  $as_echo_n "(cached) " >&6
4491else
4492  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4493/* end confdefs.h.  */
4494
4495#         define __EXTENSIONS__ 1
4496          $ac_includes_default
4497int
4498main ()
4499{
4500
4501  ;
4502  return 0;
4503}
4504_ACEOF
4505if ac_fn_c_try_compile "$LINENO"; then :
4506  ac_cv_safe_to_define___extensions__=yes
4507else
4508  ac_cv_safe_to_define___extensions__=no
4509fi
4510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4511fi
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4513$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4514  test $ac_cv_safe_to_define___extensions__ = yes &&
4515    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4516
4517  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4518
4519  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4520
4521  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4522
4523  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4524
4525
4526ac_aux_dir=
4527for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4528  if test -f "$ac_dir/install-sh"; then
4529    ac_aux_dir=$ac_dir
4530    ac_install_sh="$ac_aux_dir/install-sh -c"
4531    break
4532  elif test -f "$ac_dir/install.sh"; then
4533    ac_aux_dir=$ac_dir
4534    ac_install_sh="$ac_aux_dir/install.sh -c"
4535    break
4536  elif test -f "$ac_dir/shtool"; then
4537    ac_aux_dir=$ac_dir
4538    ac_install_sh="$ac_aux_dir/shtool install -c"
4539    break
4540  fi
4541done
4542if test -z "$ac_aux_dir"; then
4543  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4544fi
4545
4546# These three variables are undocumented and unsupported,
4547# and are intended to be withdrawn in a future Autoconf release.
4548# They can cause serious problems if a builder's source tree is in a directory
4549# whose full name contains unusual characters.
4550ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4551ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4552ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4553
4554
4555# Make sure we can run config.sub.
4556$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4557  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4558
4559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4560$as_echo_n "checking build system type... " >&6; }
4561if ${ac_cv_build+:} false; then :
4562  $as_echo_n "(cached) " >&6
4563else
4564  ac_build_alias=$build_alias
4565test "x$ac_build_alias" = x &&
4566  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4567test "x$ac_build_alias" = x &&
4568  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4569ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4570  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4571
4572fi
4573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4574$as_echo "$ac_cv_build" >&6; }
4575case $ac_cv_build in
4576*-*-*) ;;
4577*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4578esac
4579build=$ac_cv_build
4580ac_save_IFS=$IFS; IFS='-'
4581set x $ac_cv_build
4582shift
4583build_cpu=$1
4584build_vendor=$2
4585shift; shift
4586# Remember, the first character of IFS is used to create $*,
4587# except with old shells:
4588build_os=$*
4589IFS=$ac_save_IFS
4590case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4591
4592
4593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4594$as_echo_n "checking host system type... " >&6; }
4595if ${ac_cv_host+:} false; then :
4596  $as_echo_n "(cached) " >&6
4597else
4598  if test "x$host_alias" = x; then
4599  ac_cv_host=$ac_cv_build
4600else
4601  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4602    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4603fi
4604
4605fi
4606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4607$as_echo "$ac_cv_host" >&6; }
4608case $ac_cv_host in
4609*-*-*) ;;
4610*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4611esac
4612host=$ac_cv_host
4613ac_save_IFS=$IFS; IFS='-'
4614set x $ac_cv_host
4615shift
4616host_cpu=$1
4617host_vendor=$2
4618shift; shift
4619# Remember, the first character of IFS is used to create $*,
4620# except with old shells:
4621host_os=$*
4622IFS=$ac_save_IFS
4623case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4624
4625
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4627$as_echo_n "checking target system type... " >&6; }
4628if ${ac_cv_target+:} false; then :
4629  $as_echo_n "(cached) " >&6
4630else
4631  if test "x$target_alias" = x; then
4632  ac_cv_target=$ac_cv_host
4633else
4634  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4635    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4636fi
4637
4638fi
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4640$as_echo "$ac_cv_target" >&6; }
4641case $ac_cv_target in
4642*-*-*) ;;
4643*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4644esac
4645target=$ac_cv_target
4646ac_save_IFS=$IFS; IFS='-'
4647set x $ac_cv_target
4648shift
4649target_cpu=$1
4650target_vendor=$2
4651shift; shift
4652# Remember, the first character of IFS is used to create $*,
4653# except with old shells:
4654target_os=$*
4655IFS=$ac_save_IFS
4656case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4657
4658
4659# The aliases save the names the user supplied, while $host etc.
4660# will get canonicalized.
4661test -n "$target_alias" &&
4662  test "$program_prefix$program_suffix$program_transform_name" = \
4663    NONENONEs,x,x, &&
4664  program_prefix=${target_alias}-
4665
4666# The tests for host and target for $enable_largefile require
4667# canonical names.
4668
4669
4670
4671# As the $enable_largefile decision depends on --enable-plugins we must set it
4672# even in directories otherwise not depending on the $plugins option.
4673
4674
4675  maybe_plugins=no
4676  for ac_header in dlfcn.h
4677do :
4678  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4679"
4680if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4681  cat >>confdefs.h <<_ACEOF
4682#define HAVE_DLFCN_H 1
4683_ACEOF
4684 maybe_plugins=yes
4685fi
4686
4687done
4688
4689  for ac_header in windows.h
4690do :
4691  ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4692"
4693if test "x$ac_cv_header_windows_h" = xyes; then :
4694  cat >>confdefs.h <<_ACEOF
4695#define HAVE_WINDOWS_H 1
4696_ACEOF
4697 maybe_plugins=yes
4698fi
4699
4700done
4701
4702
4703  # Check whether --enable-plugins was given.
4704if test "${enable_plugins+set}" = set; then :
4705  enableval=$enable_plugins; case "${enableval}" in
4706      no) plugins=no ;;
4707      *) plugins=yes
4708         if test "$maybe_plugins" != "yes" ; then
4709	   as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4710	 fi ;;
4711     esac
4712else
4713  plugins=$maybe_plugins
4714
4715fi
4716
4717  if test "$plugins" = "yes"; then
4718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4719$as_echo_n "checking for library containing dlsym... " >&6; }
4720if ${ac_cv_search_dlsym+:} false; then :
4721  $as_echo_n "(cached) " >&6
4722else
4723  ac_func_search_save_LIBS=$LIBS
4724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4725/* end confdefs.h.  */
4726
4727/* Override any GCC internal prototype to avoid an error.
4728   Use char because int might match the return type of a GCC
4729   builtin and then its argument prototype would still apply.  */
4730#ifdef __cplusplus
4731extern "C"
4732#endif
4733char dlsym ();
4734int
4735main ()
4736{
4737return dlsym ();
4738  ;
4739  return 0;
4740}
4741_ACEOF
4742for ac_lib in '' dl; do
4743  if test -z "$ac_lib"; then
4744    ac_res="none required"
4745  else
4746    ac_res=-l$ac_lib
4747    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4748  fi
4749  if ac_fn_c_try_link "$LINENO"; then :
4750  ac_cv_search_dlsym=$ac_res
4751fi
4752rm -f core conftest.err conftest.$ac_objext \
4753    conftest$ac_exeext
4754  if ${ac_cv_search_dlsym+:} false; then :
4755  break
4756fi
4757done
4758if ${ac_cv_search_dlsym+:} false; then :
4759
4760else
4761  ac_cv_search_dlsym=no
4762fi
4763rm conftest.$ac_ext
4764LIBS=$ac_func_search_save_LIBS
4765fi
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4767$as_echo "$ac_cv_search_dlsym" >&6; }
4768ac_res=$ac_cv_search_dlsym
4769if test "$ac_res" != no; then :
4770  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4771
4772fi
4773
4774  fi
4775
4776
4777case "${host}" in
4778  sparc-*-solaris*|i?86-*-solaris*)
4779    # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4780    # were mutually exclusive until Solaris 11.3.  Without procfs support,
4781    # the bfd/ elf module cannot provide certain routines such as
4782    # elfcore_write_prpsinfo or elfcore_write_prstatus.  So unless the user
4783    # explicitly requested large-file support through the
4784    # --enable-largefile switch, disable large-file support in favor of
4785    # procfs support.
4786    #
4787    # Check if <sys/procfs.h> is incompatible with large-file support.
4788    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4789/* end confdefs.h.  */
4790#define _FILE_OFFSET_BITS 64
4791#define _STRUCTURED_PROC 1
4792#include <sys/procfs.h>
4793int
4794main ()
4795{
4796
4797  ;
4798  return 0;
4799}
4800_ACEOF
4801if ac_fn_c_try_compile "$LINENO"; then :
4802  acx_cv_procfs_lfs=yes
4803else
4804  acx_cv_procfs_lfs=no
4805fi
4806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4807    #
4808    # Forcefully disable large-file support only if necessary, gdb is in
4809    # tree and enabled.
4810    if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4811         -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4812      : ${enable_largefile="no"}
4813      if test "$plugins" = yes; then
4814	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4815plugin support disabled; require large-file support which is incompatible with GDB." >&5
4816$as_echo "$as_me: WARNING:
4817plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4818	plugins=no
4819      fi
4820    fi
4821    #
4822    # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4823    # benefit of g++ 9+ which predefines it on Solaris.
4824    if test "$enable_largefile" = no; then
4825      LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4826
4827    fi
4828    ;;
4829esac
4830
4831# Check whether --enable-largefile was given.
4832if test "${enable_largefile+set}" = set; then :
4833  enableval=$enable_largefile;
4834fi
4835
4836if test "$enable_largefile" != no; then
4837
4838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4839$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4840if ${ac_cv_sys_largefile_CC+:} false; then :
4841  $as_echo_n "(cached) " >&6
4842else
4843  ac_cv_sys_largefile_CC=no
4844     if test "$GCC" != yes; then
4845       ac_save_CC=$CC
4846       while :; do
4847	 # IRIX 6.2 and later do not support large files by default,
4848	 # so use the C compiler's -n32 option if that helps.
4849	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4850/* end confdefs.h.  */
4851#include <sys/types.h>
4852 /* Check that off_t can represent 2**63 - 1 correctly.
4853    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4854    since some C++ compilers masquerading as C compilers
4855    incorrectly reject 9223372036854775807.  */
4856#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4857  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4858		       && LARGE_OFF_T % 2147483647 == 1)
4859		      ? 1 : -1];
4860int
4861main ()
4862{
4863
4864  ;
4865  return 0;
4866}
4867_ACEOF
4868	 if ac_fn_c_try_compile "$LINENO"; then :
4869  break
4870fi
4871rm -f core conftest.err conftest.$ac_objext
4872	 CC="$CC -n32"
4873	 if ac_fn_c_try_compile "$LINENO"; then :
4874  ac_cv_sys_largefile_CC=' -n32'; break
4875fi
4876rm -f core conftest.err conftest.$ac_objext
4877	 break
4878       done
4879       CC=$ac_save_CC
4880       rm -f conftest.$ac_ext
4881    fi
4882fi
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4884$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4885  if test "$ac_cv_sys_largefile_CC" != no; then
4886    CC=$CC$ac_cv_sys_largefile_CC
4887  fi
4888
4889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4890$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4891if ${ac_cv_sys_file_offset_bits+:} false; then :
4892  $as_echo_n "(cached) " >&6
4893else
4894  while :; do
4895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4896/* end confdefs.h.  */
4897#include <sys/types.h>
4898 /* Check that off_t can represent 2**63 - 1 correctly.
4899    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4900    since some C++ compilers masquerading as C compilers
4901    incorrectly reject 9223372036854775807.  */
4902#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4903  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4904		       && LARGE_OFF_T % 2147483647 == 1)
4905		      ? 1 : -1];
4906int
4907main ()
4908{
4909
4910  ;
4911  return 0;
4912}
4913_ACEOF
4914if ac_fn_c_try_compile "$LINENO"; then :
4915  ac_cv_sys_file_offset_bits=no; break
4916fi
4917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4919/* end confdefs.h.  */
4920#define _FILE_OFFSET_BITS 64
4921#include <sys/types.h>
4922 /* Check that off_t can represent 2**63 - 1 correctly.
4923    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4924    since some C++ compilers masquerading as C compilers
4925    incorrectly reject 9223372036854775807.  */
4926#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4927  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4928		       && LARGE_OFF_T % 2147483647 == 1)
4929		      ? 1 : -1];
4930int
4931main ()
4932{
4933
4934  ;
4935  return 0;
4936}
4937_ACEOF
4938if ac_fn_c_try_compile "$LINENO"; then :
4939  ac_cv_sys_file_offset_bits=64; break
4940fi
4941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4942  ac_cv_sys_file_offset_bits=unknown
4943  break
4944done
4945fi
4946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4947$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4948case $ac_cv_sys_file_offset_bits in #(
4949  no | unknown) ;;
4950  *)
4951cat >>confdefs.h <<_ACEOF
4952#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4953_ACEOF
4954;;
4955esac
4956rm -rf conftest*
4957  if test $ac_cv_sys_file_offset_bits = unknown; then
4958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4959$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4960if ${ac_cv_sys_large_files+:} false; then :
4961  $as_echo_n "(cached) " >&6
4962else
4963  while :; do
4964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4965/* end confdefs.h.  */
4966#include <sys/types.h>
4967 /* Check that off_t can represent 2**63 - 1 correctly.
4968    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4969    since some C++ compilers masquerading as C compilers
4970    incorrectly reject 9223372036854775807.  */
4971#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4972  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4973		       && LARGE_OFF_T % 2147483647 == 1)
4974		      ? 1 : -1];
4975int
4976main ()
4977{
4978
4979  ;
4980  return 0;
4981}
4982_ACEOF
4983if ac_fn_c_try_compile "$LINENO"; then :
4984  ac_cv_sys_large_files=no; break
4985fi
4986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4988/* end confdefs.h.  */
4989#define _LARGE_FILES 1
4990#include <sys/types.h>
4991 /* Check that off_t can represent 2**63 - 1 correctly.
4992    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4993    since some C++ compilers masquerading as C compilers
4994    incorrectly reject 9223372036854775807.  */
4995#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4996  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4997		       && LARGE_OFF_T % 2147483647 == 1)
4998		      ? 1 : -1];
4999int
5000main ()
5001{
5002
5003  ;
5004  return 0;
5005}
5006_ACEOF
5007if ac_fn_c_try_compile "$LINENO"; then :
5008  ac_cv_sys_large_files=1; break
5009fi
5010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5011  ac_cv_sys_large_files=unknown
5012  break
5013done
5014fi
5015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5016$as_echo "$ac_cv_sys_large_files" >&6; }
5017case $ac_cv_sys_large_files in #(
5018  no | unknown) ;;
5019  *)
5020cat >>confdefs.h <<_ACEOF
5021#define _LARGE_FILES $ac_cv_sys_large_files
5022_ACEOF
5023;;
5024esac
5025rm -rf conftest*
5026  fi
5027
5028
5029fi
5030
5031
5032# Expand $ac_aux_dir to an absolute path.
5033am_aux_dir=`cd "$ac_aux_dir" && pwd`
5034
5035if test x"${install_sh+set}" != xset; then
5036  case $am_aux_dir in
5037  *\ * | *\	*)
5038    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5039  *)
5040    install_sh="\${SHELL} $am_aux_dir/install-sh"
5041  esac
5042fi
5043
5044# Installed binaries are usually stripped using 'strip' when the user
5045# run "make install-strip".  However 'strip' might not be the right
5046# tool to use in cross-compilation environments, therefore Automake
5047# will honor the 'STRIP' environment variable to overrule this program.
5048if test "$cross_compiling" != no; then
5049  if test -n "$ac_tool_prefix"; then
5050  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5051set dummy ${ac_tool_prefix}strip; ac_word=$2
5052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5053$as_echo_n "checking for $ac_word... " >&6; }
5054if ${ac_cv_prog_STRIP+:} false; then :
5055  $as_echo_n "(cached) " >&6
5056else
5057  if test -n "$STRIP"; then
5058  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5059else
5060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5061for as_dir in $PATH
5062do
5063  IFS=$as_save_IFS
5064  test -z "$as_dir" && as_dir=.
5065    for ac_exec_ext in '' $ac_executable_extensions; do
5066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5067    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5069    break 2
5070  fi
5071done
5072  done
5073IFS=$as_save_IFS
5074
5075fi
5076fi
5077STRIP=$ac_cv_prog_STRIP
5078if test -n "$STRIP"; then
5079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5080$as_echo "$STRIP" >&6; }
5081else
5082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5083$as_echo "no" >&6; }
5084fi
5085
5086
5087fi
5088if test -z "$ac_cv_prog_STRIP"; then
5089  ac_ct_STRIP=$STRIP
5090  # Extract the first word of "strip", so it can be a program name with args.
5091set dummy strip; ac_word=$2
5092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5093$as_echo_n "checking for $ac_word... " >&6; }
5094if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5095  $as_echo_n "(cached) " >&6
5096else
5097  if test -n "$ac_ct_STRIP"; then
5098  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5099else
5100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5101for as_dir in $PATH
5102do
5103  IFS=$as_save_IFS
5104  test -z "$as_dir" && as_dir=.
5105    for ac_exec_ext in '' $ac_executable_extensions; do
5106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5107    ac_cv_prog_ac_ct_STRIP="strip"
5108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5109    break 2
5110  fi
5111done
5112  done
5113IFS=$as_save_IFS
5114
5115fi
5116fi
5117ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5118if test -n "$ac_ct_STRIP"; then
5119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5120$as_echo "$ac_ct_STRIP" >&6; }
5121else
5122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5123$as_echo "no" >&6; }
5124fi
5125
5126  if test "x$ac_ct_STRIP" = x; then
5127    STRIP=":"
5128  else
5129    case $cross_compiling:$ac_tool_warned in
5130yes:)
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5132$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5133ac_tool_warned=yes ;;
5134esac
5135    STRIP=$ac_ct_STRIP
5136  fi
5137else
5138  STRIP="$ac_cv_prog_STRIP"
5139fi
5140
5141fi
5142INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5143
5144
5145ac_aux_dir=
5146for ac_dir in .. "$srcdir"/..; do
5147  if test -f "$ac_dir/install-sh"; then
5148    ac_aux_dir=$ac_dir
5149    ac_install_sh="$ac_aux_dir/install-sh -c"
5150    break
5151  elif test -f "$ac_dir/install.sh"; then
5152    ac_aux_dir=$ac_dir
5153    ac_install_sh="$ac_aux_dir/install.sh -c"
5154    break
5155  elif test -f "$ac_dir/shtool"; then
5156    ac_aux_dir=$ac_dir
5157    ac_install_sh="$ac_aux_dir/shtool install -c"
5158    break
5159  fi
5160done
5161if test -z "$ac_aux_dir"; then
5162  as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5163fi
5164
5165# These three variables are undocumented and unsupported,
5166# and are intended to be withdrawn in a future Autoconf release.
5167# They can cause serious problems if a builder's source tree is in a directory
5168# whose full name contains unusual characters.
5169ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
5170ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
5171ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
5172
5173
5174
5175# Set build, build_cpu, build_vendor and build_os.
5176
5177
5178# Set host, host_cpu, host_vendor, and host_os.
5179
5180
5181# Set target, target_cpu, target_vendor, and target_os.
5182
5183
5184 case ${build_alias} in
5185  "") build_noncanonical=${build} ;;
5186  *) build_noncanonical=${build_alias} ;;
5187esac
5188
5189 case ${host_alias} in
5190  "") host_noncanonical=${build_noncanonical} ;;
5191  *) host_noncanonical=${host_alias} ;;
5192esac
5193
5194 case ${target_alias} in
5195  "") target_noncanonical=${host_noncanonical} ;;
5196  *) target_noncanonical=${target_alias} ;;
5197esac
5198
5199
5200
5201
5202test "$program_prefix" != NONE &&
5203  program_transform_name="s&^&$program_prefix&;$program_transform_name"
5204# Use a double $ so make ignores it.
5205test "$program_suffix" != NONE &&
5206  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5207# Double any \ or $.
5208# By default was `s,x,x', remove it if useless.
5209ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5210program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5211
5212
5213# We require a C++11 compiler.  Check if one is available, and if
5214# necessary, set CXX_DIALECT to some -std=xxx switch.
5215
5216  ax_cxx_compile_alternatives="11 0x"    ax_cxx_compile_cxx11_required=true
5217  ac_ext=cpp
5218ac_cpp='$CXXCPP $CPPFLAGS'
5219ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5220ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5221ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5222  CXX_DIALECT=""
5223  ac_success=no
5224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5225$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5226if ${ax_cv_cxx_compile_cxx11+:} false; then :
5227  $as_echo_n "(cached) " >&6
5228else
5229  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5230/* end confdefs.h.  */
5231
5232
5233// If the compiler admits that it is not ready for C++11, why torture it?
5234// Hopefully, this will speed up the test.
5235
5236#ifndef __cplusplus
5237
5238#error "This is not a C++ compiler"
5239
5240#elif __cplusplus < 201103L
5241
5242#error "This is not a C++11 compiler"
5243
5244#else
5245
5246namespace cxx11
5247{
5248
5249  namespace test_static_assert
5250  {
5251
5252    template <typename T>
5253    struct check
5254    {
5255      static_assert(sizeof(int) <= sizeof(T), "not big enough");
5256    };
5257
5258  }
5259
5260  namespace test_final_override
5261  {
5262
5263    struct Base
5264    {
5265      virtual void f() {}
5266    };
5267
5268    struct Derived : public Base
5269    {
5270      virtual void f() override {}
5271    };
5272
5273  }
5274
5275  namespace test_double_right_angle_brackets
5276  {
5277
5278    template < typename T >
5279    struct check {};
5280
5281    typedef check<void> single_type;
5282    typedef check<check<void>> double_type;
5283    typedef check<check<check<void>>> triple_type;
5284    typedef check<check<check<check<void>>>> quadruple_type;
5285
5286  }
5287
5288  namespace test_decltype
5289  {
5290
5291    int
5292    f()
5293    {
5294      int a = 1;
5295      decltype(a) b = 2;
5296      return a + b;
5297    }
5298
5299  }
5300
5301  namespace test_type_deduction
5302  {
5303
5304    template < typename T1, typename T2 >
5305    struct is_same
5306    {
5307      static const bool value = false;
5308    };
5309
5310    template < typename T >
5311    struct is_same<T, T>
5312    {
5313      static const bool value = true;
5314    };
5315
5316    template < typename T1, typename T2 >
5317    auto
5318    add(T1 a1, T2 a2) -> decltype(a1 + a2)
5319    {
5320      return a1 + a2;
5321    }
5322
5323    int
5324    test(const int c, volatile int v)
5325    {
5326      static_assert(is_same<int, decltype(0)>::value == true, "");
5327      static_assert(is_same<int, decltype(c)>::value == false, "");
5328      static_assert(is_same<int, decltype(v)>::value == false, "");
5329      auto ac = c;
5330      auto av = v;
5331      auto sumi = ac + av + 'x';
5332      auto sumf = ac + av + 1.0;
5333      static_assert(is_same<int, decltype(ac)>::value == true, "");
5334      static_assert(is_same<int, decltype(av)>::value == true, "");
5335      static_assert(is_same<int, decltype(sumi)>::value == true, "");
5336      static_assert(is_same<int, decltype(sumf)>::value == false, "");
5337      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5338      return (sumf > 0.0) ? sumi : add(c, v);
5339    }
5340
5341  }
5342
5343  namespace test_noexcept
5344  {
5345
5346    int f() { return 0; }
5347    int g() noexcept { return 0; }
5348
5349    static_assert(noexcept(f()) == false, "");
5350    static_assert(noexcept(g()) == true, "");
5351
5352  }
5353
5354  namespace test_constexpr
5355  {
5356
5357    template < typename CharT >
5358    unsigned long constexpr
5359    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5360    {
5361      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5362    }
5363
5364    template < typename CharT >
5365    unsigned long constexpr
5366    strlen_c(const CharT *const s) noexcept
5367    {
5368      return strlen_c_r(s, 0UL);
5369    }
5370
5371    static_assert(strlen_c("") == 0UL, "");
5372    static_assert(strlen_c("1") == 1UL, "");
5373    static_assert(strlen_c("example") == 7UL, "");
5374    static_assert(strlen_c("another\0example") == 7UL, "");
5375
5376  }
5377
5378  namespace test_rvalue_references
5379  {
5380
5381    template < int N >
5382    struct answer
5383    {
5384      static constexpr int value = N;
5385    };
5386
5387    answer<1> f(int&)       { return answer<1>(); }
5388    answer<2> f(const int&) { return answer<2>(); }
5389    answer<3> f(int&&)      { return answer<3>(); }
5390
5391    void
5392    test()
5393    {
5394      int i = 0;
5395      const int c = 0;
5396      static_assert(decltype(f(i))::value == 1, "");
5397      static_assert(decltype(f(c))::value == 2, "");
5398      static_assert(decltype(f(0))::value == 3, "");
5399    }
5400
5401  }
5402
5403  namespace test_uniform_initialization
5404  {
5405
5406    struct test
5407    {
5408      static const int zero {};
5409      static const int one {1};
5410    };
5411
5412    static_assert(test::zero == 0, "");
5413    static_assert(test::one == 1, "");
5414
5415  }
5416
5417  namespace test_lambdas
5418  {
5419
5420    void
5421    test1()
5422    {
5423      auto lambda1 = [](){};
5424      auto lambda2 = lambda1;
5425      lambda1();
5426      lambda2();
5427    }
5428
5429    int
5430    test2()
5431    {
5432      auto a = [](int i, int j){ return i + j; }(1, 2);
5433      auto b = []() -> int { return '0'; }();
5434      auto c = [=](){ return a + b; }();
5435      auto d = [&](){ return c; }();
5436      auto e = [a, &b](int x) mutable {
5437        const auto identity = [](int y){ return y; };
5438        for (auto i = 0; i < a; ++i)
5439          a += b--;
5440        return x + identity(a + b);
5441      }(0);
5442      return a + b + c + d + e;
5443    }
5444
5445    int
5446    test3()
5447    {
5448      const auto nullary = [](){ return 0; };
5449      const auto unary = [](int x){ return x; };
5450      using nullary_t = decltype(nullary);
5451      using unary_t = decltype(unary);
5452      const auto higher1st = [](nullary_t f){ return f(); };
5453      const auto higher2nd = [unary](nullary_t f1){
5454        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5455      };
5456      return higher1st(nullary) + higher2nd(nullary)(unary);
5457    }
5458
5459  }
5460
5461  namespace test_variadic_templates
5462  {
5463
5464    template <int...>
5465    struct sum;
5466
5467    template <int N0, int... N1toN>
5468    struct sum<N0, N1toN...>
5469    {
5470      static constexpr auto value = N0 + sum<N1toN...>::value;
5471    };
5472
5473    template <>
5474    struct sum<>
5475    {
5476      static constexpr auto value = 0;
5477    };
5478
5479    static_assert(sum<>::value == 0, "");
5480    static_assert(sum<1>::value == 1, "");
5481    static_assert(sum<23>::value == 23, "");
5482    static_assert(sum<1, 2>::value == 3, "");
5483    static_assert(sum<5, 5, 11>::value == 21, "");
5484    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5485
5486  }
5487
5488  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5489  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5490  // because of this.
5491  namespace test_template_alias_sfinae
5492  {
5493
5494    struct foo {};
5495
5496    template<typename T>
5497    using member = typename T::member_type;
5498
5499    template<typename T>
5500    void func(...) {}
5501
5502    template<typename T>
5503    void func(member<T>*) {}
5504
5505    void test();
5506
5507    void test() { func<foo>(0); }
5508
5509  }
5510
5511}  // namespace cxx11
5512
5513#endif  // __cplusplus >= 201103L
5514
5515
5516
5517_ACEOF
5518if ac_fn_cxx_try_compile "$LINENO"; then :
5519  ax_cv_cxx_compile_cxx11=yes
5520else
5521  ax_cv_cxx_compile_cxx11=no
5522fi
5523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5524fi
5525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5526$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5527  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5528    ac_success=yes
5529  fi
5530
5531    if test x$ac_success = xno; then
5532    for alternative in ${ax_cxx_compile_alternatives}; do
5533      switch="-std=gnu++${alternative}"
5534      cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5535      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5536$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5537if eval \${$cachevar+:} false; then :
5538  $as_echo_n "(cached) " >&6
5539else
5540  ac_save_CXX="$CXX"
5541         CXX="$CXX $switch"
5542         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5543/* end confdefs.h.  */
5544
5545
5546// If the compiler admits that it is not ready for C++11, why torture it?
5547// Hopefully, this will speed up the test.
5548
5549#ifndef __cplusplus
5550
5551#error "This is not a C++ compiler"
5552
5553#elif __cplusplus < 201103L
5554
5555#error "This is not a C++11 compiler"
5556
5557#else
5558
5559namespace cxx11
5560{
5561
5562  namespace test_static_assert
5563  {
5564
5565    template <typename T>
5566    struct check
5567    {
5568      static_assert(sizeof(int) <= sizeof(T), "not big enough");
5569    };
5570
5571  }
5572
5573  namespace test_final_override
5574  {
5575
5576    struct Base
5577    {
5578      virtual void f() {}
5579    };
5580
5581    struct Derived : public Base
5582    {
5583      virtual void f() override {}
5584    };
5585
5586  }
5587
5588  namespace test_double_right_angle_brackets
5589  {
5590
5591    template < typename T >
5592    struct check {};
5593
5594    typedef check<void> single_type;
5595    typedef check<check<void>> double_type;
5596    typedef check<check<check<void>>> triple_type;
5597    typedef check<check<check<check<void>>>> quadruple_type;
5598
5599  }
5600
5601  namespace test_decltype
5602  {
5603
5604    int
5605    f()
5606    {
5607      int a = 1;
5608      decltype(a) b = 2;
5609      return a + b;
5610    }
5611
5612  }
5613
5614  namespace test_type_deduction
5615  {
5616
5617    template < typename T1, typename T2 >
5618    struct is_same
5619    {
5620      static const bool value = false;
5621    };
5622
5623    template < typename T >
5624    struct is_same<T, T>
5625    {
5626      static const bool value = true;
5627    };
5628
5629    template < typename T1, typename T2 >
5630    auto
5631    add(T1 a1, T2 a2) -> decltype(a1 + a2)
5632    {
5633      return a1 + a2;
5634    }
5635
5636    int
5637    test(const int c, volatile int v)
5638    {
5639      static_assert(is_same<int, decltype(0)>::value == true, "");
5640      static_assert(is_same<int, decltype(c)>::value == false, "");
5641      static_assert(is_same<int, decltype(v)>::value == false, "");
5642      auto ac = c;
5643      auto av = v;
5644      auto sumi = ac + av + 'x';
5645      auto sumf = ac + av + 1.0;
5646      static_assert(is_same<int, decltype(ac)>::value == true, "");
5647      static_assert(is_same<int, decltype(av)>::value == true, "");
5648      static_assert(is_same<int, decltype(sumi)>::value == true, "");
5649      static_assert(is_same<int, decltype(sumf)>::value == false, "");
5650      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5651      return (sumf > 0.0) ? sumi : add(c, v);
5652    }
5653
5654  }
5655
5656  namespace test_noexcept
5657  {
5658
5659    int f() { return 0; }
5660    int g() noexcept { return 0; }
5661
5662    static_assert(noexcept(f()) == false, "");
5663    static_assert(noexcept(g()) == true, "");
5664
5665  }
5666
5667  namespace test_constexpr
5668  {
5669
5670    template < typename CharT >
5671    unsigned long constexpr
5672    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5673    {
5674      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5675    }
5676
5677    template < typename CharT >
5678    unsigned long constexpr
5679    strlen_c(const CharT *const s) noexcept
5680    {
5681      return strlen_c_r(s, 0UL);
5682    }
5683
5684    static_assert(strlen_c("") == 0UL, "");
5685    static_assert(strlen_c("1") == 1UL, "");
5686    static_assert(strlen_c("example") == 7UL, "");
5687    static_assert(strlen_c("another\0example") == 7UL, "");
5688
5689  }
5690
5691  namespace test_rvalue_references
5692  {
5693
5694    template < int N >
5695    struct answer
5696    {
5697      static constexpr int value = N;
5698    };
5699
5700    answer<1> f(int&)       { return answer<1>(); }
5701    answer<2> f(const int&) { return answer<2>(); }
5702    answer<3> f(int&&)      { return answer<3>(); }
5703
5704    void
5705    test()
5706    {
5707      int i = 0;
5708      const int c = 0;
5709      static_assert(decltype(f(i))::value == 1, "");
5710      static_assert(decltype(f(c))::value == 2, "");
5711      static_assert(decltype(f(0))::value == 3, "");
5712    }
5713
5714  }
5715
5716  namespace test_uniform_initialization
5717  {
5718
5719    struct test
5720    {
5721      static const int zero {};
5722      static const int one {1};
5723    };
5724
5725    static_assert(test::zero == 0, "");
5726    static_assert(test::one == 1, "");
5727
5728  }
5729
5730  namespace test_lambdas
5731  {
5732
5733    void
5734    test1()
5735    {
5736      auto lambda1 = [](){};
5737      auto lambda2 = lambda1;
5738      lambda1();
5739      lambda2();
5740    }
5741
5742    int
5743    test2()
5744    {
5745      auto a = [](int i, int j){ return i + j; }(1, 2);
5746      auto b = []() -> int { return '0'; }();
5747      auto c = [=](){ return a + b; }();
5748      auto d = [&](){ return c; }();
5749      auto e = [a, &b](int x) mutable {
5750        const auto identity = [](int y){ return y; };
5751        for (auto i = 0; i < a; ++i)
5752          a += b--;
5753        return x + identity(a + b);
5754      }(0);
5755      return a + b + c + d + e;
5756    }
5757
5758    int
5759    test3()
5760    {
5761      const auto nullary = [](){ return 0; };
5762      const auto unary = [](int x){ return x; };
5763      using nullary_t = decltype(nullary);
5764      using unary_t = decltype(unary);
5765      const auto higher1st = [](nullary_t f){ return f(); };
5766      const auto higher2nd = [unary](nullary_t f1){
5767        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5768      };
5769      return higher1st(nullary) + higher2nd(nullary)(unary);
5770    }
5771
5772  }
5773
5774  namespace test_variadic_templates
5775  {
5776
5777    template <int...>
5778    struct sum;
5779
5780    template <int N0, int... N1toN>
5781    struct sum<N0, N1toN...>
5782    {
5783      static constexpr auto value = N0 + sum<N1toN...>::value;
5784    };
5785
5786    template <>
5787    struct sum<>
5788    {
5789      static constexpr auto value = 0;
5790    };
5791
5792    static_assert(sum<>::value == 0, "");
5793    static_assert(sum<1>::value == 1, "");
5794    static_assert(sum<23>::value == 23, "");
5795    static_assert(sum<1, 2>::value == 3, "");
5796    static_assert(sum<5, 5, 11>::value == 21, "");
5797    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5798
5799  }
5800
5801  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5802  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5803  // because of this.
5804  namespace test_template_alias_sfinae
5805  {
5806
5807    struct foo {};
5808
5809    template<typename T>
5810    using member = typename T::member_type;
5811
5812    template<typename T>
5813    void func(...) {}
5814
5815    template<typename T>
5816    void func(member<T>*) {}
5817
5818    void test();
5819
5820    void test() { func<foo>(0); }
5821
5822  }
5823
5824}  // namespace cxx11
5825
5826#endif  // __cplusplus >= 201103L
5827
5828
5829
5830_ACEOF
5831if ac_fn_cxx_try_compile "$LINENO"; then :
5832  eval $cachevar=yes
5833else
5834  eval $cachevar=no
5835fi
5836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5837         CXX="$ac_save_CXX"
5838fi
5839eval ac_res=\$$cachevar
5840	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5841$as_echo "$ac_res" >&6; }
5842      if eval test x\$$cachevar = xyes; then
5843        CXX_DIALECT="$switch"
5844        ac_success=yes
5845        break
5846      fi
5847    done
5848  fi
5849
5850    if test x$ac_success = xno; then
5851                for alternative in ${ax_cxx_compile_alternatives}; do
5852      for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5853        cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5855$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5856if eval \${$cachevar+:} false; then :
5857  $as_echo_n "(cached) " >&6
5858else
5859  ac_save_CXX="$CXX"
5860           CXX="$CXX $switch"
5861           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5862/* end confdefs.h.  */
5863
5864
5865// If the compiler admits that it is not ready for C++11, why torture it?
5866// Hopefully, this will speed up the test.
5867
5868#ifndef __cplusplus
5869
5870#error "This is not a C++ compiler"
5871
5872#elif __cplusplus < 201103L
5873
5874#error "This is not a C++11 compiler"
5875
5876#else
5877
5878namespace cxx11
5879{
5880
5881  namespace test_static_assert
5882  {
5883
5884    template <typename T>
5885    struct check
5886    {
5887      static_assert(sizeof(int) <= sizeof(T), "not big enough");
5888    };
5889
5890  }
5891
5892  namespace test_final_override
5893  {
5894
5895    struct Base
5896    {
5897      virtual void f() {}
5898    };
5899
5900    struct Derived : public Base
5901    {
5902      virtual void f() override {}
5903    };
5904
5905  }
5906
5907  namespace test_double_right_angle_brackets
5908  {
5909
5910    template < typename T >
5911    struct check {};
5912
5913    typedef check<void> single_type;
5914    typedef check<check<void>> double_type;
5915    typedef check<check<check<void>>> triple_type;
5916    typedef check<check<check<check<void>>>> quadruple_type;
5917
5918  }
5919
5920  namespace test_decltype
5921  {
5922
5923    int
5924    f()
5925    {
5926      int a = 1;
5927      decltype(a) b = 2;
5928      return a + b;
5929    }
5930
5931  }
5932
5933  namespace test_type_deduction
5934  {
5935
5936    template < typename T1, typename T2 >
5937    struct is_same
5938    {
5939      static const bool value = false;
5940    };
5941
5942    template < typename T >
5943    struct is_same<T, T>
5944    {
5945      static const bool value = true;
5946    };
5947
5948    template < typename T1, typename T2 >
5949    auto
5950    add(T1 a1, T2 a2) -> decltype(a1 + a2)
5951    {
5952      return a1 + a2;
5953    }
5954
5955    int
5956    test(const int c, volatile int v)
5957    {
5958      static_assert(is_same<int, decltype(0)>::value == true, "");
5959      static_assert(is_same<int, decltype(c)>::value == false, "");
5960      static_assert(is_same<int, decltype(v)>::value == false, "");
5961      auto ac = c;
5962      auto av = v;
5963      auto sumi = ac + av + 'x';
5964      auto sumf = ac + av + 1.0;
5965      static_assert(is_same<int, decltype(ac)>::value == true, "");
5966      static_assert(is_same<int, decltype(av)>::value == true, "");
5967      static_assert(is_same<int, decltype(sumi)>::value == true, "");
5968      static_assert(is_same<int, decltype(sumf)>::value == false, "");
5969      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5970      return (sumf > 0.0) ? sumi : add(c, v);
5971    }
5972
5973  }
5974
5975  namespace test_noexcept
5976  {
5977
5978    int f() { return 0; }
5979    int g() noexcept { return 0; }
5980
5981    static_assert(noexcept(f()) == false, "");
5982    static_assert(noexcept(g()) == true, "");
5983
5984  }
5985
5986  namespace test_constexpr
5987  {
5988
5989    template < typename CharT >
5990    unsigned long constexpr
5991    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5992    {
5993      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5994    }
5995
5996    template < typename CharT >
5997    unsigned long constexpr
5998    strlen_c(const CharT *const s) noexcept
5999    {
6000      return strlen_c_r(s, 0UL);
6001    }
6002
6003    static_assert(strlen_c("") == 0UL, "");
6004    static_assert(strlen_c("1") == 1UL, "");
6005    static_assert(strlen_c("example") == 7UL, "");
6006    static_assert(strlen_c("another\0example") == 7UL, "");
6007
6008  }
6009
6010  namespace test_rvalue_references
6011  {
6012
6013    template < int N >
6014    struct answer
6015    {
6016      static constexpr int value = N;
6017    };
6018
6019    answer<1> f(int&)       { return answer<1>(); }
6020    answer<2> f(const int&) { return answer<2>(); }
6021    answer<3> f(int&&)      { return answer<3>(); }
6022
6023    void
6024    test()
6025    {
6026      int i = 0;
6027      const int c = 0;
6028      static_assert(decltype(f(i))::value == 1, "");
6029      static_assert(decltype(f(c))::value == 2, "");
6030      static_assert(decltype(f(0))::value == 3, "");
6031    }
6032
6033  }
6034
6035  namespace test_uniform_initialization
6036  {
6037
6038    struct test
6039    {
6040      static const int zero {};
6041      static const int one {1};
6042    };
6043
6044    static_assert(test::zero == 0, "");
6045    static_assert(test::one == 1, "");
6046
6047  }
6048
6049  namespace test_lambdas
6050  {
6051
6052    void
6053    test1()
6054    {
6055      auto lambda1 = [](){};
6056      auto lambda2 = lambda1;
6057      lambda1();
6058      lambda2();
6059    }
6060
6061    int
6062    test2()
6063    {
6064      auto a = [](int i, int j){ return i + j; }(1, 2);
6065      auto b = []() -> int { return '0'; }();
6066      auto c = [=](){ return a + b; }();
6067      auto d = [&](){ return c; }();
6068      auto e = [a, &b](int x) mutable {
6069        const auto identity = [](int y){ return y; };
6070        for (auto i = 0; i < a; ++i)
6071          a += b--;
6072        return x + identity(a + b);
6073      }(0);
6074      return a + b + c + d + e;
6075    }
6076
6077    int
6078    test3()
6079    {
6080      const auto nullary = [](){ return 0; };
6081      const auto unary = [](int x){ return x; };
6082      using nullary_t = decltype(nullary);
6083      using unary_t = decltype(unary);
6084      const auto higher1st = [](nullary_t f){ return f(); };
6085      const auto higher2nd = [unary](nullary_t f1){
6086        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6087      };
6088      return higher1st(nullary) + higher2nd(nullary)(unary);
6089    }
6090
6091  }
6092
6093  namespace test_variadic_templates
6094  {
6095
6096    template <int...>
6097    struct sum;
6098
6099    template <int N0, int... N1toN>
6100    struct sum<N0, N1toN...>
6101    {
6102      static constexpr auto value = N0 + sum<N1toN...>::value;
6103    };
6104
6105    template <>
6106    struct sum<>
6107    {
6108      static constexpr auto value = 0;
6109    };
6110
6111    static_assert(sum<>::value == 0, "");
6112    static_assert(sum<1>::value == 1, "");
6113    static_assert(sum<23>::value == 23, "");
6114    static_assert(sum<1, 2>::value == 3, "");
6115    static_assert(sum<5, 5, 11>::value == 21, "");
6116    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6117
6118  }
6119
6120  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6121  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6122  // because of this.
6123  namespace test_template_alias_sfinae
6124  {
6125
6126    struct foo {};
6127
6128    template<typename T>
6129    using member = typename T::member_type;
6130
6131    template<typename T>
6132    void func(...) {}
6133
6134    template<typename T>
6135    void func(member<T>*) {}
6136
6137    void test();
6138
6139    void test() { func<foo>(0); }
6140
6141  }
6142
6143}  // namespace cxx11
6144
6145#endif  // __cplusplus >= 201103L
6146
6147
6148
6149_ACEOF
6150if ac_fn_cxx_try_compile "$LINENO"; then :
6151  eval $cachevar=yes
6152else
6153  eval $cachevar=no
6154fi
6155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6156           CXX="$ac_save_CXX"
6157fi
6158eval ac_res=\$$cachevar
6159	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6160$as_echo "$ac_res" >&6; }
6161        if eval test x\$$cachevar = xyes; then
6162          CXX_DIALECT="$switch"
6163          ac_success=yes
6164          break
6165        fi
6166      done
6167      if test x$ac_success = xyes; then
6168        break
6169      fi
6170    done
6171  fi
6172  ac_ext=c
6173ac_cpp='$CPP $CPPFLAGS'
6174ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6175ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6176ac_compiler_gnu=$ac_cv_c_compiler_gnu
6177
6178  if test x$ax_cxx_compile_cxx11_required = xtrue; then
6179    if test x$ac_success = xno; then
6180      as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6181    fi
6182  fi
6183  if test x$ac_success = xno; then
6184    HAVE_CXX11=0
6185    { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6186$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6187  else
6188    HAVE_CXX11=1
6189
6190$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6191
6192  fi
6193
6194
6195
6196
6197# Dependency checking.
6198rm -rf .tst 2>/dev/null
6199mkdir .tst 2>/dev/null
6200if test -d .tst; then
6201  am__leading_dot=.
6202else
6203  am__leading_dot=_
6204fi
6205rmdir .tst 2>/dev/null
6206
6207DEPDIR="${am__leading_dot}deps"
6208
6209ac_config_commands="$ac_config_commands depdir"
6210
6211
6212depcc="$CC"   am_compiler_list=
6213
6214am_depcomp=$ac_aux_dir/depcomp
6215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6216$as_echo_n "checking dependency style of $depcc... " >&6; }
6217if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6218  $as_echo_n "(cached) " >&6
6219else
6220  if test -f "$am_depcomp"; then
6221  # We make a subdir and do the tests there.  Otherwise we can end up
6222  # making bogus files that we don't know about and never remove.  For
6223  # instance it was reported that on HP-UX the gcc test will end up
6224  # making a dummy file named `D' -- because `-MD' means `put the output
6225  # in D'.
6226  mkdir conftest.dir
6227  # Copy depcomp to subdir because otherwise we won't find it if we're
6228  # using a relative directory.
6229  cp "$am_depcomp" conftest.dir
6230  cd conftest.dir
6231  # We will build objects and dependencies in a subdirectory because
6232  # it helps to detect inapplicable dependency modes.  For instance
6233  # both Tru64's cc and ICC support -MD to output dependencies as a
6234  # side effect of compilation, but ICC will put the dependencies in
6235  # the current directory while Tru64 will put them in the object
6236  # directory.
6237  mkdir sub
6238
6239  am_cv_CC_dependencies_compiler_type=none
6240  if test "$am_compiler_list" = ""; then
6241     am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6242  fi
6243  for depmode in $am_compiler_list; do
6244    if test $depmode = none; then break; fi
6245
6246    $as_echo "$as_me:$LINENO: trying $depmode" >&5
6247    # Setup a source with many dependencies, because some compilers
6248    # like to wrap large dependency lists on column 80 (with \), and
6249    # we should not choose a depcomp mode which is confused by this.
6250    #
6251    # We need to recreate these files for each test, as the compiler may
6252    # overwrite some of them when testing with obscure command lines.
6253    # This happens at least with the AIX C compiler.
6254    : > sub/conftest.c
6255    for i in 1 2 3 4 5 6; do
6256      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6257      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6258      # Solaris 8's {/usr,}/bin/sh.
6259      touch sub/conftst$i.h
6260    done
6261    echo "include sub/conftest.Po" > confmf
6262
6263    # We check with `-c' and `-o' for the sake of the "dashmstdout"
6264    # mode.  It turns out that the SunPro C++ compiler does not properly
6265    # handle `-M -o', and we need to detect this.
6266    depcmd="depmode=$depmode \
6267       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6268       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6269       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6270    echo "| $depcmd" | sed -e 's/  */ /g' >&5
6271    if env $depcmd > conftest.err 2>&1 &&
6272       grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6273       grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6274       ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6275      # icc doesn't choke on unknown options, it will just issue warnings
6276      # or remarks (even with -Werror).  So we grep stderr for any message
6277      # that says an option was ignored or not supported.
6278      # When given -MP, icc 7.0 and 7.1 complain thusly:
6279      #   icc: Command line warning: ignoring option '-M'; no argument required
6280      # The diagnosis changed in icc 8.0:
6281      #   icc: Command line remark: option '-MP' not supported
6282      if (grep 'ignoring option' conftest.err ||
6283          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6284        am_cv_CC_dependencies_compiler_type=$depmode
6285	$as_echo "$as_me:$LINENO: success" >&5
6286        break
6287      fi
6288    fi
6289    $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6290    sed -e 's/^/| /' < conftest.err >&5
6291  done
6292
6293  cd ..
6294  rm -rf conftest.dir
6295else
6296  am_cv_CC_dependencies_compiler_type=none
6297fi
6298
6299fi
6300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6301$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6302if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6303then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6304else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6305
6306fi
6307
6308
6309
6310CONFIG_OBS=
6311CONFIG_DEPS=
6312CONFIG_SRCS=
6313ENABLE_CFLAGS=
6314
6315CONFIG_ALL=
6316CONFIG_CLEAN=
6317CONFIG_INSTALL=
6318CONFIG_UNINSTALL=
6319
6320# If we haven't got the data from the intl directory,
6321# assume NLS is disabled.
6322USE_NLS=no
6323LIBINTL=
6324LIBINTL_DEP=
6325INCINTL=
6326XGETTEXT=
6327GMSGFMT=
6328POSUB=
6329
6330if test -f  ../intl/config.intl; then
6331  .  ../intl/config.intl
6332fi
6333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6334$as_echo_n "checking whether NLS is requested... " >&6; }
6335if test x"$USE_NLS" != xyes; then
6336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6337$as_echo "no" >&6; }
6338else
6339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6340$as_echo "yes" >&6; }
6341
6342$as_echo "#define ENABLE_NLS 1" >>confdefs.h
6343
6344
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6346$as_echo_n "checking for catalogs to be installed... " >&6; }
6347  # Look for .po and .gmo files in the source directory.
6348  CATALOGS=
6349  XLINGUAS=
6350  for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6351    # If there aren't any .gmo files the shell will give us the
6352    # literal string "../path/to/srcdir/po/*.gmo" which has to be
6353    # weeded out.
6354    case "$cat" in *\**)
6355      continue;;
6356    esac
6357    # The quadruple backslash is collapsed to a double backslash
6358    # by the backticks, then collapsed again by the double quotes,
6359    # leaving us with one backslash in the sed expression (right
6360    # before the dot that mustn't act as a wildcard).
6361    cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6362    lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6363    # The user is allowed to set LINGUAS to a list of languages to
6364    # install catalogs for.  If it's empty that means "all of them."
6365    if test "x$LINGUAS" = x; then
6366      CATALOGS="$CATALOGS $cat"
6367      XLINGUAS="$XLINGUAS $lang"
6368    else
6369      case "$LINGUAS" in *$lang*)
6370        CATALOGS="$CATALOGS $cat"
6371        XLINGUAS="$XLINGUAS $lang"
6372        ;;
6373      esac
6374    fi
6375  done
6376  LINGUAS="$XLINGUAS"
6377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6378$as_echo "$LINGUAS" >&6; }
6379
6380
6381    DATADIRNAME=share
6382
6383  INSTOBJEXT=.mo
6384
6385  GENCAT=gencat
6386
6387  CATOBJEXT=.gmo
6388
6389fi
6390
6391localedir='${datadir}/locale'
6392
6393
6394if test x"$USE_NLS" = xyes; then
6395   CONFIG_ALL="$CONFIG_ALL all-po"
6396   CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6397   CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6398   CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6399fi
6400
6401PACKAGE=gdb
6402
6403cat >>confdefs.h <<_ACEOF
6404#define PACKAGE "$PACKAGE"
6405_ACEOF
6406
6407
6408
6409# We never need to detect it in this sub-configure.
6410# But preserve it for config.status --recheck.
6411
6412
6413
6414MAKEINFO_EXTRA_FLAGS=""
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6416$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6417if ${gdb_cv_have_makeinfo_click+:} false; then :
6418  $as_echo_n "(cached) " >&6
6419else
6420  echo '@clicksequence{a @click{} b}' >conftest.texinfo
6421  if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6422    gdb_cv_have_makeinfo_click=yes
6423  else
6424    gdb_cv_have_makeinfo_click=no
6425  fi
6426fi
6427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6428$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6429if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6430  MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6431fi
6432
6433
6434
6435
6436# Check whether --with-separate-debug-dir was given.
6437if test "${with_separate_debug_dir+set}" = set; then :
6438  withval=$with_separate_debug_dir;
6439    DEBUGDIR=$withval
6440else
6441  DEBUGDIR=${libdir}/debug
6442fi
6443
6444
6445  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6446  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6447  ac_define_dir=`eval echo $DEBUGDIR`
6448  ac_define_dir=`eval echo $ac_define_dir`
6449
6450cat >>confdefs.h <<_ACEOF
6451#define DEBUGDIR "$ac_define_dir"
6452_ACEOF
6453
6454
6455
6456
6457  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6458     if test "x$prefix" = xNONE; then
6459     	test_prefix=/usr/local
6460     else
6461	test_prefix=$prefix
6462     fi
6463  else
6464     test_prefix=$exec_prefix
6465  fi
6466  value=0
6467  case ${ac_define_dir} in
6468     "${test_prefix}"|"${test_prefix}/"*|\
6469	'${exec_prefix}'|'${exec_prefix}/'*)
6470     value=1
6471     ;;
6472  esac
6473
6474cat >>confdefs.h <<_ACEOF
6475#define DEBUGDIR_RELOCATABLE $value
6476_ACEOF
6477
6478
6479
6480
6481# We can't pass paths as command line arguments.
6482# Mingw32 tries to be clever and will convert the paths for us.
6483# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6484# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6485# This breaks GDB's relocatable path conversions since paths passed in
6486# config.h would not get so translated, the path prefixes no longer match.
6487
6488  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6489  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6490  ac_define_dir=`eval echo $bindir`
6491  ac_define_dir=`eval echo $ac_define_dir`
6492
6493cat >>confdefs.h <<_ACEOF
6494#define BINDIR "$ac_define_dir"
6495_ACEOF
6496
6497
6498
6499# GDB's datadir relocation
6500
6501
6502
6503# Check whether --with-gdb-datadir was given.
6504if test "${with_gdb_datadir+set}" = set; then :
6505  withval=$with_gdb_datadir;
6506    GDB_DATADIR=$withval
6507else
6508  GDB_DATADIR=${datadir}/gdb
6509fi
6510
6511
6512  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6513  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6514  ac_define_dir=`eval echo $GDB_DATADIR`
6515  ac_define_dir=`eval echo $ac_define_dir`
6516
6517cat >>confdefs.h <<_ACEOF
6518#define GDB_DATADIR "$ac_define_dir"
6519_ACEOF
6520
6521
6522
6523
6524  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6525     if test "x$prefix" = xNONE; then
6526     	test_prefix=/usr/local
6527     else
6528	test_prefix=$prefix
6529     fi
6530  else
6531     test_prefix=$exec_prefix
6532  fi
6533  value=0
6534  case ${ac_define_dir} in
6535     "${test_prefix}"|"${test_prefix}/"*|\
6536	'${exec_prefix}'|'${exec_prefix}/'*)
6537     value=1
6538     ;;
6539  esac
6540
6541cat >>confdefs.h <<_ACEOF
6542#define GDB_DATADIR_RELOCATABLE $value
6543_ACEOF
6544
6545
6546
6547
6548
6549# Check whether --with-relocated-sources was given.
6550if test "${with_relocated_sources+set}" = set; then :
6551  withval=$with_relocated_sources; reloc_srcdir="${withval}"
6552
6553  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6554  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6555  ac_define_dir=`eval echo $reloc_srcdir`
6556  ac_define_dir=`eval echo $ac_define_dir`
6557
6558cat >>confdefs.h <<_ACEOF
6559#define RELOC_SRCDIR "$ac_define_dir"
6560_ACEOF
6561
6562
6563
6564fi
6565
6566
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6568$as_echo_n "checking for default auto-load directory... " >&6; }
6569
6570# Check whether --with-auto-load-dir was given.
6571if test "${with_auto_load_dir+set}" = set; then :
6572  withval=$with_auto_load_dir;
6573else
6574  with_auto_load_dir='$debugdir:$datadir/auto-load'
6575fi
6576
6577escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6578
6579  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6580  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6581  ac_define_dir=`eval echo $escape_dir`
6582  ac_define_dir=`eval echo $ac_define_dir`
6583
6584cat >>confdefs.h <<_ACEOF
6585#define AUTO_LOAD_DIR "$ac_define_dir"
6586_ACEOF
6587
6588
6589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6590$as_echo "$with_auto_load_dir" >&6; }
6591
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6593$as_echo_n "checking for default auto-load safe-path... " >&6; }
6594
6595# Check whether --with-auto-load-safe-path was given.
6596if test "${with_auto_load_safe_path+set}" = set; then :
6597  withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6598     with_auto_load_safe_path="/"
6599     fi
6600else
6601  with_auto_load_safe_path="$with_auto_load_dir"
6602fi
6603
6604escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6605
6606  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6607  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6608  ac_define_dir=`eval echo $escape_dir`
6609  ac_define_dir=`eval echo $ac_define_dir`
6610
6611cat >>confdefs.h <<_ACEOF
6612#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6613_ACEOF
6614
6615
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6617$as_echo "$with_auto_load_safe_path" >&6; }
6618
6619
6620
6621subdirs="$subdirs testsuite"
6622
6623
6624# Check whether to support alternative target configurations
6625# Check whether --enable-targets was given.
6626if test "${enable_targets+set}" = set; then :
6627  enableval=$enable_targets; case "${enableval}" in
6628  yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6629            ;;
6630  no)       enable_targets= ;;
6631  *)        enable_targets=$enableval ;;
6632esac
6633fi
6634
6635
6636# Check whether to enable 64-bit support on 32-bit hosts
6637# Check whether --enable-64-bit-bfd was given.
6638if test "${enable_64_bit_bfd+set}" = set; then :
6639  enableval=$enable_64_bit_bfd; case "${enableval}" in
6640  yes)  want64=true  ;;
6641  no)   want64=false ;;
6642  *)    as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6643esac
6644else
6645  want64=false
6646fi
6647
6648# Provide defaults for some variables set by the per-host and per-target
6649# configuration.
6650gdb_host_obs=posix-hdep.o
6651
6652if test "${target}" = "${host}"; then
6653  gdb_native=yes
6654else
6655  gdb_native=no
6656fi
6657
6658. $srcdir/configure.host
6659
6660# Accumulate some settings from configure.tgt over all enabled targets
6661
6662TARGET_OBS=
6663all_targets=
6664HAVE_NATIVE_GCORE_TARGET=
6665
6666for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6667do
6668  if test "$targ_alias" = "all"; then
6669    all_targets=true
6670  else
6671    # Canonicalize the secondary target names.
6672    result=`$ac_config_sub $targ_alias 2>/dev/null`
6673    if test -n "$result"; then
6674        targ=$result
6675    else
6676        targ=$targ_alias
6677    fi
6678
6679    . ${srcdir}/configure.tgt
6680
6681    if test -z "${gdb_target_obs}"; then :
6682  as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6683fi
6684
6685    # Target-specific object files
6686    for i in ${gdb_target_obs}; do
6687        case " $TARGET_OBS " in
6688        *" ${i} "*) ;;
6689        *)
6690          TARGET_OBS="$TARGET_OBS ${i}"
6691          ;;
6692        esac
6693    done
6694
6695    # Check whether this target needs 64-bit CORE_ADDR
6696    if test x${want64} = xfalse; then
6697      . ${srcdir}/../bfd/config.bfd
6698    fi
6699
6700    # Check whether this target is native and supports gcore.
6701    if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6702       && $gdb_have_gcore; then
6703      HAVE_NATIVE_GCORE_TARGET=1
6704    fi
6705  fi
6706done
6707
6708if test x${all_targets} = xtrue; then
6709
6710  # We want all 64-bit targets if we either:
6711  #  - run on a 64-bit host  or
6712  #  - already require 64-bit support for some other target  or
6713  #  - the --enable-64-bit-bfd option was supplied
6714  # Otherwise we only support all 32-bit targets.
6715  #
6716  # NOTE: This test must be in sync with the corresponding
6717  #       tests in BFD!
6718
6719  if test x${want64} = xfalse; then
6720    # The cast to long int works around a bug in the HP C Compiler
6721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6723# This bug is HP SR number 8606223364.
6724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6725$as_echo_n "checking size of long... " >&6; }
6726if ${ac_cv_sizeof_long+:} false; then :
6727  $as_echo_n "(cached) " >&6
6728else
6729  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
6730
6731else
6732  if test "$ac_cv_type_long" = yes; then
6733     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6735as_fn_error 77 "cannot compute sizeof (long)
6736See \`config.log' for more details" "$LINENO" 5; }
6737   else
6738     ac_cv_sizeof_long=0
6739   fi
6740fi
6741
6742fi
6743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6744$as_echo "$ac_cv_sizeof_long" >&6; }
6745
6746
6747
6748cat >>confdefs.h <<_ACEOF
6749#define SIZEOF_LONG $ac_cv_sizeof_long
6750_ACEOF
6751
6752
6753    if test "x${ac_cv_sizeof_long}" = "x8"; then
6754      want64=true
6755    fi
6756  fi
6757  if test x${want64} = xtrue; then
6758    TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6759  else
6760    TARGET_OBS='$(ALL_TARGET_OBS)'
6761  fi
6762fi
6763
6764
6765
6766
6767# For other settings, only the main target counts.
6768gdb_sim=
6769gdb_osabi=
6770targ=$target; . ${srcdir}/configure.tgt
6771
6772# Fetch the default architecture and default target vector from BFD.
6773targ=$target; . $srcdir/../bfd/config.bfd
6774
6775# We only want the first architecture, so strip off the others if
6776# there is more than one.
6777targ_archs=`echo $targ_archs | sed 's/ .*//'`
6778
6779if test "x$targ_archs" != x; then
6780
6781cat >>confdefs.h <<_ACEOF
6782#define DEFAULT_BFD_ARCH $targ_archs
6783_ACEOF
6784
6785fi
6786if test "x$targ_defvec" != x; then
6787
6788cat >>confdefs.h <<_ACEOF
6789#define DEFAULT_BFD_VEC $targ_defvec
6790_ACEOF
6791
6792fi
6793
6794# Enable MI.
6795# Check whether --enable-gdbmi was given.
6796if test "${enable_gdbmi+set}" = set; then :
6797  enableval=$enable_gdbmi; case $enableval in
6798    yes | no)
6799      ;;
6800    *)
6801      as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6802  esac
6803else
6804  enable_gdbmi=yes
6805fi
6806
6807if test x"$enable_gdbmi" = xyes; then
6808  if test -d "$srcdir/mi"; then
6809    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6810    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6811    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6812    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6813  fi
6814fi
6815
6816# Enable TUI.
6817# Check whether --enable-tui was given.
6818if test "${enable_tui+set}" = set; then :
6819  enableval=$enable_tui; case $enableval in
6820    yes | no | auto)
6821      ;;
6822    *)
6823      as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6824  esac
6825else
6826  enable_tui=auto
6827fi
6828
6829
6830# Enable gdbtk.
6831# Check whether --enable-gdbtk was given.
6832if test "${enable_gdbtk+set}" = set; then :
6833  enableval=$enable_gdbtk; case $enableval in
6834    yes | no)
6835      ;;
6836    *)
6837      as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6838  esac
6839else
6840  if test -d "$srcdir/gdbtk"; then
6841    enable_gdbtk=yes
6842  else
6843    enable_gdbtk=no
6844  fi
6845fi
6846
6847# We unconditionally disable gdbtk tests on selected platforms.
6848case $host_os in
6849  go32* | windows*)
6850    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6851$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6852    enable_gdbtk=no ;;
6853esac
6854
6855# Handle optional debuginfod support
6856
6857
6858
6859
6860
6861
6862
6863if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6864	if test -n "$ac_tool_prefix"; then
6865  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6866set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6868$as_echo_n "checking for $ac_word... " >&6; }
6869if ${ac_cv_path_PKG_CONFIG+:} false; then :
6870  $as_echo_n "(cached) " >&6
6871else
6872  case $PKG_CONFIG in
6873  [\\/]* | ?:[\\/]*)
6874  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6875  ;;
6876  *)
6877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6878for as_dir in $PATH
6879do
6880  IFS=$as_save_IFS
6881  test -z "$as_dir" && as_dir=.
6882    for ac_exec_ext in '' $ac_executable_extensions; do
6883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6884    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6886    break 2
6887  fi
6888done
6889  done
6890IFS=$as_save_IFS
6891
6892  ;;
6893esac
6894fi
6895PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6896if test -n "$PKG_CONFIG"; then
6897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6898$as_echo "$PKG_CONFIG" >&6; }
6899else
6900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6901$as_echo "no" >&6; }
6902fi
6903
6904
6905fi
6906if test -z "$ac_cv_path_PKG_CONFIG"; then
6907  ac_pt_PKG_CONFIG=$PKG_CONFIG
6908  # Extract the first word of "pkg-config", so it can be a program name with args.
6909set dummy pkg-config; ac_word=$2
6910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6911$as_echo_n "checking for $ac_word... " >&6; }
6912if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6913  $as_echo_n "(cached) " >&6
6914else
6915  case $ac_pt_PKG_CONFIG in
6916  [\\/]* | ?:[\\/]*)
6917  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6918  ;;
6919  *)
6920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6921for as_dir in $PATH
6922do
6923  IFS=$as_save_IFS
6924  test -z "$as_dir" && as_dir=.
6925    for ac_exec_ext in '' $ac_executable_extensions; do
6926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6927    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6929    break 2
6930  fi
6931done
6932  done
6933IFS=$as_save_IFS
6934
6935  ;;
6936esac
6937fi
6938ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6939if test -n "$ac_pt_PKG_CONFIG"; then
6940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6941$as_echo "$ac_pt_PKG_CONFIG" >&6; }
6942else
6943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6944$as_echo "no" >&6; }
6945fi
6946
6947  if test "x$ac_pt_PKG_CONFIG" = x; then
6948    PKG_CONFIG=""
6949  else
6950    case $cross_compiling:$ac_tool_warned in
6951yes:)
6952{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6953$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6954ac_tool_warned=yes ;;
6955esac
6956    PKG_CONFIG=$ac_pt_PKG_CONFIG
6957  fi
6958else
6959  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6960fi
6961
6962fi
6963if test -n "$PKG_CONFIG"; then
6964	_pkg_min_version=0.9.0
6965	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6966$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6967	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6968		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6969$as_echo "yes" >&6; }
6970	else
6971		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6972$as_echo "no" >&6; }
6973		PKG_CONFIG=""
6974	fi
6975fi
6976
6977# Handle optional debuginfod support
6978
6979# Check whether --with-debuginfod was given.
6980if test "${with_debuginfod+set}" = set; then :
6981  withval=$with_debuginfod;
6982else
6983  with_debuginfod=auto
6984fi
6985
6986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
6987$as_echo_n "checking whether to use debuginfod... " >&6; }
6988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
6989$as_echo "$with_debuginfod" >&6; }
6990
6991if test "x$with_debuginfod" != xno; then
6992
6993pkg_failed=no
6994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
6995$as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
6996
6997if test -n "$DEBUGINFOD_CFLAGS"; then
6998    pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
6999 elif test -n "$PKG_CONFIG"; then
7000    if test -n "$PKG_CONFIG" && \
7001    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7002  ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7003  ac_status=$?
7004  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7005  test $ac_status = 0; }; then
7006  pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
7007		      test "x$?" != "x0" && pkg_failed=yes
7008else
7009  pkg_failed=yes
7010fi
7011 else
7012    pkg_failed=untried
7013fi
7014if test -n "$DEBUGINFOD_LIBS"; then
7015    pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
7016 elif test -n "$PKG_CONFIG"; then
7017    if test -n "$PKG_CONFIG" && \
7018    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7019  ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7020  ac_status=$?
7021  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7022  test $ac_status = 0; }; then
7023  pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7024		      test "x$?" != "x0" && pkg_failed=yes
7025else
7026  pkg_failed=yes
7027fi
7028 else
7029    pkg_failed=untried
7030fi
7031
7032if test $pkg_failed = no; then
7033  pkg_save_LDFLAGS="$LDFLAGS"
7034  LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7036/* end confdefs.h.  */
7037
7038int
7039main ()
7040{
7041
7042  ;
7043  return 0;
7044}
7045_ACEOF
7046if ac_fn_c_try_link "$LINENO"; then :
7047
7048else
7049  pkg_failed=yes
7050fi
7051rm -f core conftest.err conftest.$ac_objext \
7052    conftest$ac_exeext conftest.$ac_ext
7053  LDFLAGS=$pkg_save_LDFLAGS
7054fi
7055
7056
7057
7058if test $pkg_failed = yes; then
7059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060$as_echo "no" >&6; }
7061
7062if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7063        _pkg_short_errors_supported=yes
7064else
7065        _pkg_short_errors_supported=no
7066fi
7067        if test $_pkg_short_errors_supported = yes; then
7068	        DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7069        else
7070	        DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7071        fi
7072	# Put the nasty error message in config.log where it belongs
7073	echo "$DEBUGINFOD_PKG_ERRORS" >&5
7074
7075	if test "x$with_debuginfod" = xyes; then
7076       as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7077     else
7078       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7079$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7080     fi
7081elif test $pkg_failed = untried; then
7082        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7083$as_echo "no" >&6; }
7084	if test "x$with_debuginfod" = xyes; then
7085       as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7086     else
7087       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7088$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7089     fi
7090else
7091	DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7092	DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7094$as_echo "yes" >&6; }
7095
7096$as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7097
7098fi
7099else
7100  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7101$as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
7102fi
7103
7104
7105# Libunwind support for ia64.
7106
7107# Check whether --with-libunwind-ia64 was given.
7108if test "${with_libunwind_ia64+set}" = set; then :
7109  withval=$with_libunwind_ia64;
7110else
7111  with_libunwind_ia64=auto
7112fi
7113
7114
7115# Backward compatibility option.
7116if test "${with_libunwind+set}" = set; then
7117  if test x"$with_libunwind_ia64" != xauto; then
7118    as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
7119  fi
7120  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7121$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7122  with_libunwind_ia64="$with_libunwind"
7123fi
7124
7125case "$with_libunwind_ia64" in
7126  yes | no)
7127    ;;
7128  auto)
7129    for ac_header in libunwind-ia64.h
7130do :
7131  ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7132if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7133  cat >>confdefs.h <<_ACEOF
7134#define HAVE_LIBUNWIND_IA64_H 1
7135_ACEOF
7136
7137fi
7138
7139done
7140
7141    with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7142    ;;
7143  *)
7144    as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
7145    ;;
7146esac
7147
7148if test x"$with_libunwind_ia64" = xyes; then
7149  for ac_header in libunwind-ia64.h
7150do :
7151  ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7152if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7153  cat >>confdefs.h <<_ACEOF
7154#define HAVE_LIBUNWIND_IA64_H 1
7155_ACEOF
7156
7157fi
7158
7159done
7160
7161  if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
7162    as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
7163  fi
7164  CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7165  CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7166  CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
7167fi
7168
7169opt_curses=no
7170
7171# Check whether --with-curses was given.
7172if test "${with_curses+set}" = set; then :
7173  withval=$with_curses; opt_curses=$withval
7174fi
7175
7176
7177prefer_curses=no
7178if test "$opt_curses" = "yes"; then
7179  prefer_curses=yes
7180fi
7181
7182# Profiling support.
7183# Check whether --enable-profiling was given.
7184if test "${enable_profiling+set}" = set; then :
7185  enableval=$enable_profiling; case $enableval in
7186    yes | no)
7187      ;;
7188    *)
7189      as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
7190  esac
7191else
7192  enable_profiling=no
7193fi
7194
7195
7196for ac_func in monstartup _mcleanup
7197do :
7198  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7199ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7200if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7201  cat >>confdefs.h <<_ACEOF
7202#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7203_ACEOF
7204
7205fi
7206done
7207
7208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7209$as_echo_n "checking for _etext... " >&6; }
7210if ${ac_cv_var__etext+:} false; then :
7211  $as_echo_n "(cached) " >&6
7212else
7213  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7214/* end confdefs.h.  */
7215#include <stdlib.h>
7216	 extern char _etext;
7217int
7218main ()
7219{
7220free (&_etext);
7221
7222  ;
7223  return 0;
7224}
7225_ACEOF
7226if ac_fn_c_try_link "$LINENO"; then :
7227  ac_cv_var__etext=yes
7228else
7229  ac_cv_var__etext=no
7230
7231fi
7232rm -f core conftest.err conftest.$ac_objext \
7233    conftest$ac_exeext conftest.$ac_ext
7234
7235fi
7236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7237$as_echo "$ac_cv_var__etext" >&6; }
7238if test "$ac_cv_var__etext" = yes; then
7239
7240$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
7241
7242fi
7243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7244$as_echo_n "checking for etext... " >&6; }
7245if ${ac_cv_var_etext+:} false; then :
7246  $as_echo_n "(cached) " >&6
7247else
7248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7249/* end confdefs.h.  */
7250#include <stdlib.h>
7251	 extern char etext;
7252int
7253main ()
7254{
7255free (&etext);
7256
7257  ;
7258  return 0;
7259}
7260_ACEOF
7261if ac_fn_c_try_link "$LINENO"; then :
7262  ac_cv_var_etext=yes
7263else
7264  ac_cv_var_etext=no
7265
7266fi
7267rm -f core conftest.err conftest.$ac_objext \
7268    conftest$ac_exeext conftest.$ac_ext
7269
7270fi
7271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7272$as_echo "$ac_cv_var_etext" >&6; }
7273if test "$ac_cv_var_etext" = yes; then
7274
7275$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7276
7277fi
7278if test "$enable_profiling" = yes ; then
7279  if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
7280    as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7281  fi
7282  PROFILE_CFLAGS=-pg
7283  OLD_CFLAGS="$CFLAGS"
7284  CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7285
7286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7287$as_echo_n "checking whether $CC supports -pg... " >&6; }
7288if ${ac_cv_cc_supports_pg+:} false; then :
7289  $as_echo_n "(cached) " >&6
7290else
7291  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7292/* end confdefs.h.  */
7293
7294int
7295main ()
7296{
7297int x;
7298  ;
7299  return 0;
7300}
7301_ACEOF
7302if ac_fn_c_try_compile "$LINENO"; then :
7303  ac_cv_cc_supports_pg=yes
7304else
7305  ac_cv_cc_supports_pg=no
7306
7307fi
7308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7309
7310fi
7311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7312$as_echo "$ac_cv_cc_supports_pg" >&6; }
7313
7314  if test "$ac_cv_cc_supports_pg" = no; then
7315    as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7316  fi
7317
7318  CFLAGS="$OLD_CFLAGS"
7319fi
7320
7321CODESIGN_CERT=
7322# Check whether --enable-codesign was given.
7323if test "${enable_codesign+set}" = set; then :
7324  enableval=$enable_codesign; CODESIGN_CERT=$enableval
7325fi
7326
7327
7328
7329
7330
7331# Check whether --with-pkgversion was given.
7332if test "${with_pkgversion+set}" = set; then :
7333  withval=$with_pkgversion; case "$withval" in
7334      yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7335      no)  PKGVERSION= ;;
7336      *)   PKGVERSION="($withval) " ;;
7337     esac
7338else
7339  PKGVERSION="(GDB) "
7340
7341fi
7342
7343
7344
7345
7346
7347# Check whether --with-bugurl was given.
7348if test "${with_bugurl+set}" = set; then :
7349  withval=$with_bugurl; case "$withval" in
7350      yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7351      no)  BUGURL=
7352	   ;;
7353      *)   BUGURL="$withval"
7354	   ;;
7355     esac
7356else
7357  BUGURL="https://www.gnu.org/software/gdb/bugs/"
7358
7359fi
7360
7361  case ${BUGURL} in
7362  "")
7363    REPORT_BUGS_TO=
7364    REPORT_BUGS_TEXI=
7365    ;;
7366  *)
7367    REPORT_BUGS_TO="<$BUGURL>"
7368    REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7369    ;;
7370  esac;
7371
7372
7373
7374
7375cat >>confdefs.h <<_ACEOF
7376#define PKGVERSION "$PKGVERSION"
7377_ACEOF
7378
7379
7380cat >>confdefs.h <<_ACEOF
7381#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7382_ACEOF
7383
7384
7385# --------------------- #
7386# Checks for programs.  #
7387# --------------------- #
7388
7389for ac_prog in gawk mawk nawk awk
7390do
7391  # Extract the first word of "$ac_prog", so it can be a program name with args.
7392set dummy $ac_prog; ac_word=$2
7393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7394$as_echo_n "checking for $ac_word... " >&6; }
7395if ${ac_cv_prog_AWK+:} false; then :
7396  $as_echo_n "(cached) " >&6
7397else
7398  if test -n "$AWK"; then
7399  ac_cv_prog_AWK="$AWK" # Let the user override the test.
7400else
7401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7402for as_dir in $PATH
7403do
7404  IFS=$as_save_IFS
7405  test -z "$as_dir" && as_dir=.
7406    for ac_exec_ext in '' $ac_executable_extensions; do
7407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7408    ac_cv_prog_AWK="$ac_prog"
7409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7410    break 2
7411  fi
7412done
7413  done
7414IFS=$as_save_IFS
7415
7416fi
7417fi
7418AWK=$ac_cv_prog_AWK
7419if test -n "$AWK"; then
7420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7421$as_echo "$AWK" >&6; }
7422else
7423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7424$as_echo "no" >&6; }
7425fi
7426
7427
7428  test -n "$AWK" && break
7429done
7430
7431# Find a good install program.  We prefer a C program (faster),
7432# so one script is as good as another.  But avoid the broken or
7433# incompatible versions:
7434# SysV /etc/install, /usr/sbin/install
7435# SunOS /usr/etc/install
7436# IRIX /sbin/install
7437# AIX /bin/install
7438# AmigaOS /C/install, which installs bootblocks on floppy discs
7439# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7440# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7441# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7442# OS/2's system install, which has a completely different semantic
7443# ./install, which can be erroneously created by make from ./install.sh.
7444# Reject install programs that cannot install multiple files.
7445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7446$as_echo_n "checking for a BSD-compatible install... " >&6; }
7447if test -z "$INSTALL"; then
7448if ${ac_cv_path_install+:} false; then :
7449  $as_echo_n "(cached) " >&6
7450else
7451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7452for as_dir in $PATH
7453do
7454  IFS=$as_save_IFS
7455  test -z "$as_dir" && as_dir=.
7456    # Account for people who put trailing slashes in PATH elements.
7457case $as_dir/ in #((
7458  ./ | .// | /[cC]/* | \
7459  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7460  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7461  /usr/ucb/* ) ;;
7462  *)
7463    # OSF1 and SCO ODT 3.0 have their own names for install.
7464    # Don't use installbsd from OSF since it installs stuff as root
7465    # by default.
7466    for ac_prog in ginstall scoinst install; do
7467      for ac_exec_ext in '' $ac_executable_extensions; do
7468	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7469	  if test $ac_prog = install &&
7470	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7471	    # AIX install.  It has an incompatible calling convention.
7472	    :
7473	  elif test $ac_prog = install &&
7474	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7475	    # program-specific install script used by HP pwplus--don't use.
7476	    :
7477	  else
7478	    rm -rf conftest.one conftest.two conftest.dir
7479	    echo one > conftest.one
7480	    echo two > conftest.two
7481	    mkdir conftest.dir
7482	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7483	      test -s conftest.one && test -s conftest.two &&
7484	      test -s conftest.dir/conftest.one &&
7485	      test -s conftest.dir/conftest.two
7486	    then
7487	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7488	      break 3
7489	    fi
7490	  fi
7491	fi
7492      done
7493    done
7494    ;;
7495esac
7496
7497  done
7498IFS=$as_save_IFS
7499
7500rm -rf conftest.one conftest.two conftest.dir
7501
7502fi
7503  if test "${ac_cv_path_install+set}" = set; then
7504    INSTALL=$ac_cv_path_install
7505  else
7506    # As a last resort, use the slow shell script.  Don't cache a
7507    # value for INSTALL within a source directory, because that will
7508    # break other packages using the cache if that directory is
7509    # removed, or if the value is a relative name.
7510    INSTALL=$ac_install_sh
7511  fi
7512fi
7513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7514$as_echo "$INSTALL" >&6; }
7515
7516# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7517# It thinks the first close brace ends the variable substitution.
7518test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7519
7520test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7521
7522test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7523
7524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7525$as_echo_n "checking whether ln -s works... " >&6; }
7526LN_S=$as_ln_s
7527if test "$LN_S" = "ln -s"; then
7528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7529$as_echo "yes" >&6; }
7530else
7531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7532$as_echo "no, using $LN_S" >&6; }
7533fi
7534
7535if test -n "$ac_tool_prefix"; then
7536  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7537set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7539$as_echo_n "checking for $ac_word... " >&6; }
7540if ${ac_cv_prog_RANLIB+:} false; then :
7541  $as_echo_n "(cached) " >&6
7542else
7543  if test -n "$RANLIB"; then
7544  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7545else
7546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7547for as_dir in $PATH
7548do
7549  IFS=$as_save_IFS
7550  test -z "$as_dir" && as_dir=.
7551    for ac_exec_ext in '' $ac_executable_extensions; do
7552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7553    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7555    break 2
7556  fi
7557done
7558  done
7559IFS=$as_save_IFS
7560
7561fi
7562fi
7563RANLIB=$ac_cv_prog_RANLIB
7564if test -n "$RANLIB"; then
7565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7566$as_echo "$RANLIB" >&6; }
7567else
7568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7569$as_echo "no" >&6; }
7570fi
7571
7572
7573fi
7574if test -z "$ac_cv_prog_RANLIB"; then
7575  ac_ct_RANLIB=$RANLIB
7576  # Extract the first word of "ranlib", so it can be a program name with args.
7577set dummy ranlib; ac_word=$2
7578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7579$as_echo_n "checking for $ac_word... " >&6; }
7580if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7581  $as_echo_n "(cached) " >&6
7582else
7583  if test -n "$ac_ct_RANLIB"; then
7584  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7585else
7586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7587for as_dir in $PATH
7588do
7589  IFS=$as_save_IFS
7590  test -z "$as_dir" && as_dir=.
7591    for ac_exec_ext in '' $ac_executable_extensions; do
7592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7593    ac_cv_prog_ac_ct_RANLIB="ranlib"
7594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7595    break 2
7596  fi
7597done
7598  done
7599IFS=$as_save_IFS
7600
7601fi
7602fi
7603ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7604if test -n "$ac_ct_RANLIB"; then
7605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7606$as_echo "$ac_ct_RANLIB" >&6; }
7607else
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609$as_echo "no" >&6; }
7610fi
7611
7612  if test "x$ac_ct_RANLIB" = x; then
7613    RANLIB=":"
7614  else
7615    case $cross_compiling:$ac_tool_warned in
7616yes:)
7617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7619ac_tool_warned=yes ;;
7620esac
7621    RANLIB=$ac_ct_RANLIB
7622  fi
7623else
7624  RANLIB="$ac_cv_prog_RANLIB"
7625fi
7626
7627for ac_prog in 'bison -y' byacc
7628do
7629  # Extract the first word of "$ac_prog", so it can be a program name with args.
7630set dummy $ac_prog; ac_word=$2
7631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7632$as_echo_n "checking for $ac_word... " >&6; }
7633if ${ac_cv_prog_YACC+:} false; then :
7634  $as_echo_n "(cached) " >&6
7635else
7636  if test -n "$YACC"; then
7637  ac_cv_prog_YACC="$YACC" # Let the user override the test.
7638else
7639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7640for as_dir in $PATH
7641do
7642  IFS=$as_save_IFS
7643  test -z "$as_dir" && as_dir=.
7644    for ac_exec_ext in '' $ac_executable_extensions; do
7645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7646    ac_cv_prog_YACC="$ac_prog"
7647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7648    break 2
7649  fi
7650done
7651  done
7652IFS=$as_save_IFS
7653
7654fi
7655fi
7656YACC=$ac_cv_prog_YACC
7657if test -n "$YACC"; then
7658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7659$as_echo "$YACC" >&6; }
7660else
7661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7662$as_echo "no" >&6; }
7663fi
7664
7665
7666  test -n "$YACC" && break
7667done
7668test -n "$YACC" || YACC="yacc"
7669
7670
7671if test -n "$ac_tool_prefix"; then
7672  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7673set dummy ${ac_tool_prefix}ar; ac_word=$2
7674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7675$as_echo_n "checking for $ac_word... " >&6; }
7676if ${ac_cv_prog_AR+:} false; then :
7677  $as_echo_n "(cached) " >&6
7678else
7679  if test -n "$AR"; then
7680  ac_cv_prog_AR="$AR" # Let the user override the test.
7681else
7682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683for as_dir in $PATH
7684do
7685  IFS=$as_save_IFS
7686  test -z "$as_dir" && as_dir=.
7687    for ac_exec_ext in '' $ac_executable_extensions; do
7688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7689    ac_cv_prog_AR="${ac_tool_prefix}ar"
7690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7691    break 2
7692  fi
7693done
7694  done
7695IFS=$as_save_IFS
7696
7697fi
7698fi
7699AR=$ac_cv_prog_AR
7700if test -n "$AR"; then
7701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7702$as_echo "$AR" >&6; }
7703else
7704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7705$as_echo "no" >&6; }
7706fi
7707
7708
7709fi
7710if test -z "$ac_cv_prog_AR"; then
7711  ac_ct_AR=$AR
7712  # Extract the first word of "ar", so it can be a program name with args.
7713set dummy ar; ac_word=$2
7714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7715$as_echo_n "checking for $ac_word... " >&6; }
7716if ${ac_cv_prog_ac_ct_AR+:} false; then :
7717  $as_echo_n "(cached) " >&6
7718else
7719  if test -n "$ac_ct_AR"; then
7720  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7721else
7722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7723for as_dir in $PATH
7724do
7725  IFS=$as_save_IFS
7726  test -z "$as_dir" && as_dir=.
7727    for ac_exec_ext in '' $ac_executable_extensions; do
7728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7729    ac_cv_prog_ac_ct_AR="ar"
7730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7731    break 2
7732  fi
7733done
7734  done
7735IFS=$as_save_IFS
7736
7737fi
7738fi
7739ac_ct_AR=$ac_cv_prog_ac_ct_AR
7740if test -n "$ac_ct_AR"; then
7741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7742$as_echo "$ac_ct_AR" >&6; }
7743else
7744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7745$as_echo "no" >&6; }
7746fi
7747
7748  if test "x$ac_ct_AR" = x; then
7749    AR=""
7750  else
7751    case $cross_compiling:$ac_tool_warned in
7752yes:)
7753{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7754$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7755ac_tool_warned=yes ;;
7756esac
7757    AR=$ac_ct_AR
7758  fi
7759else
7760  AR="$ac_cv_prog_AR"
7761fi
7762
7763if test -n "$ac_tool_prefix"; then
7764  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7765set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7767$as_echo_n "checking for $ac_word... " >&6; }
7768if ${ac_cv_prog_DLLTOOL+:} false; then :
7769  $as_echo_n "(cached) " >&6
7770else
7771  if test -n "$DLLTOOL"; then
7772  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7773else
7774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7775for as_dir in $PATH
7776do
7777  IFS=$as_save_IFS
7778  test -z "$as_dir" && as_dir=.
7779    for ac_exec_ext in '' $ac_executable_extensions; do
7780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7781    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7783    break 2
7784  fi
7785done
7786  done
7787IFS=$as_save_IFS
7788
7789fi
7790fi
7791DLLTOOL=$ac_cv_prog_DLLTOOL
7792if test -n "$DLLTOOL"; then
7793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7794$as_echo "$DLLTOOL" >&6; }
7795else
7796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7797$as_echo "no" >&6; }
7798fi
7799
7800
7801fi
7802if test -z "$ac_cv_prog_DLLTOOL"; then
7803  ac_ct_DLLTOOL=$DLLTOOL
7804  # Extract the first word of "dlltool", so it can be a program name with args.
7805set dummy dlltool; ac_word=$2
7806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7807$as_echo_n "checking for $ac_word... " >&6; }
7808if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7809  $as_echo_n "(cached) " >&6
7810else
7811  if test -n "$ac_ct_DLLTOOL"; then
7812  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7813else
7814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7815for as_dir in $PATH
7816do
7817  IFS=$as_save_IFS
7818  test -z "$as_dir" && as_dir=.
7819    for ac_exec_ext in '' $ac_executable_extensions; do
7820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7821    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7823    break 2
7824  fi
7825done
7826  done
7827IFS=$as_save_IFS
7828
7829fi
7830fi
7831ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7832if test -n "$ac_ct_DLLTOOL"; then
7833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7834$as_echo "$ac_ct_DLLTOOL" >&6; }
7835else
7836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7837$as_echo "no" >&6; }
7838fi
7839
7840  if test "x$ac_ct_DLLTOOL" = x; then
7841    DLLTOOL=""
7842  else
7843    case $cross_compiling:$ac_tool_warned in
7844yes:)
7845{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7846$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7847ac_tool_warned=yes ;;
7848esac
7849    DLLTOOL=$ac_ct_DLLTOOL
7850  fi
7851else
7852  DLLTOOL="$ac_cv_prog_DLLTOOL"
7853fi
7854
7855if test -n "$ac_tool_prefix"; then
7856  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7857set dummy ${ac_tool_prefix}windres; ac_word=$2
7858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7859$as_echo_n "checking for $ac_word... " >&6; }
7860if ${ac_cv_prog_WINDRES+:} false; then :
7861  $as_echo_n "(cached) " >&6
7862else
7863  if test -n "$WINDRES"; then
7864  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7865else
7866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7867for as_dir in $PATH
7868do
7869  IFS=$as_save_IFS
7870  test -z "$as_dir" && as_dir=.
7871    for ac_exec_ext in '' $ac_executable_extensions; do
7872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7873    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7875    break 2
7876  fi
7877done
7878  done
7879IFS=$as_save_IFS
7880
7881fi
7882fi
7883WINDRES=$ac_cv_prog_WINDRES
7884if test -n "$WINDRES"; then
7885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7886$as_echo "$WINDRES" >&6; }
7887else
7888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7889$as_echo "no" >&6; }
7890fi
7891
7892
7893fi
7894if test -z "$ac_cv_prog_WINDRES"; then
7895  ac_ct_WINDRES=$WINDRES
7896  # Extract the first word of "windres", so it can be a program name with args.
7897set dummy windres; ac_word=$2
7898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7899$as_echo_n "checking for $ac_word... " >&6; }
7900if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7901  $as_echo_n "(cached) " >&6
7902else
7903  if test -n "$ac_ct_WINDRES"; then
7904  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7905else
7906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7907for as_dir in $PATH
7908do
7909  IFS=$as_save_IFS
7910  test -z "$as_dir" && as_dir=.
7911    for ac_exec_ext in '' $ac_executable_extensions; do
7912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7913    ac_cv_prog_ac_ct_WINDRES="windres"
7914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7915    break 2
7916  fi
7917done
7918  done
7919IFS=$as_save_IFS
7920
7921fi
7922fi
7923ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7924if test -n "$ac_ct_WINDRES"; then
7925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7926$as_echo "$ac_ct_WINDRES" >&6; }
7927else
7928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7929$as_echo "no" >&6; }
7930fi
7931
7932  if test "x$ac_ct_WINDRES" = x; then
7933    WINDRES=""
7934  else
7935    case $cross_compiling:$ac_tool_warned in
7936yes:)
7937{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7938$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7939ac_tool_warned=yes ;;
7940esac
7941    WINDRES=$ac_ct_WINDRES
7942  fi
7943else
7944  WINDRES="$ac_cv_prog_WINDRES"
7945fi
7946
7947
7948case $host_os in
7949  gnu*)
7950    # Needed for GNU Hurd hosts.
7951    if test -n "$ac_tool_prefix"; then
7952  # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7953set dummy ${ac_tool_prefix}mig; ac_word=$2
7954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7955$as_echo_n "checking for $ac_word... " >&6; }
7956if ${ac_cv_prog_MIG+:} false; then :
7957  $as_echo_n "(cached) " >&6
7958else
7959  if test -n "$MIG"; then
7960  ac_cv_prog_MIG="$MIG" # Let the user override the test.
7961else
7962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7963for as_dir in $PATH
7964do
7965  IFS=$as_save_IFS
7966  test -z "$as_dir" && as_dir=.
7967    for ac_exec_ext in '' $ac_executable_extensions; do
7968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7969    ac_cv_prog_MIG="${ac_tool_prefix}mig"
7970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7971    break 2
7972  fi
7973done
7974  done
7975IFS=$as_save_IFS
7976
7977fi
7978fi
7979MIG=$ac_cv_prog_MIG
7980if test -n "$MIG"; then
7981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7982$as_echo "$MIG" >&6; }
7983else
7984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7985$as_echo "no" >&6; }
7986fi
7987
7988
7989fi
7990if test -z "$ac_cv_prog_MIG"; then
7991  ac_ct_MIG=$MIG
7992  # Extract the first word of "mig", so it can be a program name with args.
7993set dummy mig; ac_word=$2
7994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7995$as_echo_n "checking for $ac_word... " >&6; }
7996if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7997  $as_echo_n "(cached) " >&6
7998else
7999  if test -n "$ac_ct_MIG"; then
8000  ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8001else
8002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8003for as_dir in $PATH
8004do
8005  IFS=$as_save_IFS
8006  test -z "$as_dir" && as_dir=.
8007    for ac_exec_ext in '' $ac_executable_extensions; do
8008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8009    ac_cv_prog_ac_ct_MIG="mig"
8010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8011    break 2
8012  fi
8013done
8014  done
8015IFS=$as_save_IFS
8016
8017fi
8018fi
8019ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8020if test -n "$ac_ct_MIG"; then
8021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8022$as_echo "$ac_ct_MIG" >&6; }
8023else
8024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8025$as_echo "no" >&6; }
8026fi
8027
8028  if test "x$ac_ct_MIG" = x; then
8029    MIG=""
8030  else
8031    case $cross_compiling:$ac_tool_warned in
8032yes:)
8033{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8034$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8035ac_tool_warned=yes ;;
8036esac
8037    MIG=$ac_ct_MIG
8038  fi
8039else
8040  MIG="$ac_cv_prog_MIG"
8041fi
8042
8043    if test x"$MIG" = x; then
8044      as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
8045    fi
8046    ;;
8047esac
8048
8049# ---------------------- #
8050# Checks for libraries.  #
8051# ---------------------- #
8052
8053# We might need to link with -lm; most simulators need it.
8054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8055$as_echo_n "checking for main in -lm... " >&6; }
8056if ${ac_cv_lib_m_main+:} false; then :
8057  $as_echo_n "(cached) " >&6
8058else
8059  ac_check_lib_save_LIBS=$LIBS
8060LIBS="-lm  $LIBS"
8061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8062/* end confdefs.h.  */
8063
8064
8065int
8066main ()
8067{
8068return main ();
8069  ;
8070  return 0;
8071}
8072_ACEOF
8073if ac_fn_c_try_link "$LINENO"; then :
8074  ac_cv_lib_m_main=yes
8075else
8076  ac_cv_lib_m_main=no
8077fi
8078rm -f core conftest.err conftest.$ac_objext \
8079    conftest$ac_exeext conftest.$ac_ext
8080LIBS=$ac_check_lib_save_LIBS
8081fi
8082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8083$as_echo "$ac_cv_lib_m_main" >&6; }
8084if test "x$ac_cv_lib_m_main" = xyes; then :
8085  cat >>confdefs.h <<_ACEOF
8086#define HAVE_LIBM 1
8087_ACEOF
8088
8089  LIBS="-lm $LIBS"
8090
8091fi
8092
8093
8094# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
8095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8096$as_echo_n "checking for library containing gethostbyname... " >&6; }
8097if ${ac_cv_search_gethostbyname+:} false; then :
8098  $as_echo_n "(cached) " >&6
8099else
8100  ac_func_search_save_LIBS=$LIBS
8101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8102/* end confdefs.h.  */
8103
8104/* Override any GCC internal prototype to avoid an error.
8105   Use char because int might match the return type of a GCC
8106   builtin and then its argument prototype would still apply.  */
8107#ifdef __cplusplus
8108extern "C"
8109#endif
8110char gethostbyname ();
8111int
8112main ()
8113{
8114return gethostbyname ();
8115  ;
8116  return 0;
8117}
8118_ACEOF
8119for ac_lib in '' nsl; do
8120  if test -z "$ac_lib"; then
8121    ac_res="none required"
8122  else
8123    ac_res=-l$ac_lib
8124    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8125  fi
8126  if ac_fn_c_try_link "$LINENO"; then :
8127  ac_cv_search_gethostbyname=$ac_res
8128fi
8129rm -f core conftest.err conftest.$ac_objext \
8130    conftest$ac_exeext
8131  if ${ac_cv_search_gethostbyname+:} false; then :
8132  break
8133fi
8134done
8135if ${ac_cv_search_gethostbyname+:} false; then :
8136
8137else
8138  ac_cv_search_gethostbyname=no
8139fi
8140rm conftest.$ac_ext
8141LIBS=$ac_func_search_save_LIBS
8142fi
8143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8144$as_echo "$ac_cv_search_gethostbyname" >&6; }
8145ac_res=$ac_cv_search_gethostbyname
8146if test "$ac_res" != no; then :
8147  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8148
8149fi
8150
8151
8152# Some systems (e.g. Solaris) have `socketpair' in libsocket.
8153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8154$as_echo_n "checking for library containing socketpair... " >&6; }
8155if ${ac_cv_search_socketpair+:} false; then :
8156  $as_echo_n "(cached) " >&6
8157else
8158  ac_func_search_save_LIBS=$LIBS
8159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8160/* end confdefs.h.  */
8161
8162/* Override any GCC internal prototype to avoid an error.
8163   Use char because int might match the return type of a GCC
8164   builtin and then its argument prototype would still apply.  */
8165#ifdef __cplusplus
8166extern "C"
8167#endif
8168char socketpair ();
8169int
8170main ()
8171{
8172return socketpair ();
8173  ;
8174  return 0;
8175}
8176_ACEOF
8177for ac_lib in '' socket; do
8178  if test -z "$ac_lib"; then
8179    ac_res="none required"
8180  else
8181    ac_res=-l$ac_lib
8182    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8183  fi
8184  if ac_fn_c_try_link "$LINENO"; then :
8185  ac_cv_search_socketpair=$ac_res
8186fi
8187rm -f core conftest.err conftest.$ac_objext \
8188    conftest$ac_exeext
8189  if ${ac_cv_search_socketpair+:} false; then :
8190  break
8191fi
8192done
8193if ${ac_cv_search_socketpair+:} false; then :
8194
8195else
8196  ac_cv_search_socketpair=no
8197fi
8198rm conftest.$ac_ext
8199LIBS=$ac_func_search_save_LIBS
8200fi
8201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8202$as_echo "$ac_cv_search_socketpair" >&6; }
8203ac_res=$ac_cv_search_socketpair
8204if test "$ac_res" != no; then :
8205  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8206
8207fi
8208
8209
8210# Link in zlib if we can.  This allows us to read compressed debug sections.
8211
8212  # Use the system's zlib library.
8213  zlibdir="-L\$(top_builddir)/../zlib"
8214  zlibinc="-I\$(top_srcdir)/../zlib"
8215
8216# Check whether --with-system-zlib was given.
8217if test "${with_system_zlib+set}" = set; then :
8218  withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8219    zlibdir=
8220    zlibinc=
8221  fi
8222
8223fi
8224
8225
8226
8227
8228
8229
8230      if test "X$prefix" = "XNONE"; then
8231    acl_final_prefix="$ac_default_prefix"
8232  else
8233    acl_final_prefix="$prefix"
8234  fi
8235  if test "X$exec_prefix" = "XNONE"; then
8236    acl_final_exec_prefix='${prefix}'
8237  else
8238    acl_final_exec_prefix="$exec_prefix"
8239  fi
8240  acl_save_prefix="$prefix"
8241  prefix="$acl_final_prefix"
8242  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8243  prefix="$acl_save_prefix"
8244
8245
8246# Check whether --with-gnu-ld was given.
8247if test "${with_gnu_ld+set}" = set; then :
8248  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8249else
8250  with_gnu_ld=no
8251fi
8252
8253# Prepare PATH_SEPARATOR.
8254# The user is always right.
8255if test "${PATH_SEPARATOR+set}" != set; then
8256  echo "#! /bin/sh" >conf$$.sh
8257  echo  "exit 0"   >>conf$$.sh
8258  chmod +x conf$$.sh
8259  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8260    PATH_SEPARATOR=';'
8261  else
8262    PATH_SEPARATOR=:
8263  fi
8264  rm -f conf$$.sh
8265fi
8266ac_prog=ld
8267if test "$GCC" = yes; then
8268  # Check if gcc -print-prog-name=ld gives a path.
8269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8270$as_echo_n "checking for ld used by GCC... " >&6; }
8271  case $host in
8272  *-*-mingw*)
8273    # gcc leaves a trailing carriage return which upsets mingw
8274    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8275  *)
8276    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8277  esac
8278  case $ac_prog in
8279    # Accept absolute paths.
8280    [\\/]* | [A-Za-z]:[\\/]*)
8281      re_direlt='/[^/][^/]*/\.\./'
8282      # Canonicalize the path of ld
8283      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8284      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8285	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8286      done
8287      test -z "$LD" && LD="$ac_prog"
8288      ;;
8289  "")
8290    # If it fails, then pretend we aren't using GCC.
8291    ac_prog=ld
8292    ;;
8293  *)
8294    # If it is relative, then search for the first ld in PATH.
8295    with_gnu_ld=unknown
8296    ;;
8297  esac
8298elif test "$with_gnu_ld" = yes; then
8299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8300$as_echo_n "checking for GNU ld... " >&6; }
8301else
8302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8303$as_echo_n "checking for non-GNU ld... " >&6; }
8304fi
8305if ${acl_cv_path_LD+:} false; then :
8306  $as_echo_n "(cached) " >&6
8307else
8308  if test -z "$LD"; then
8309  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8310  for ac_dir in $PATH; do
8311    test -z "$ac_dir" && ac_dir=.
8312    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8313      acl_cv_path_LD="$ac_dir/$ac_prog"
8314      # Check to see if the program is GNU ld.  I'd rather use --version,
8315      # but apparently some GNU ld's only accept -v.
8316      # Break only if it was the GNU/non-GNU ld that we prefer.
8317      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8318	test "$with_gnu_ld" != no && break
8319      else
8320	test "$with_gnu_ld" != yes && break
8321      fi
8322    fi
8323  done
8324  IFS="$ac_save_ifs"
8325else
8326  acl_cv_path_LD="$LD" # Let the user override the test with a path.
8327fi
8328fi
8329
8330LD="$acl_cv_path_LD"
8331if test -n "$LD"; then
8332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8333$as_echo "$LD" >&6; }
8334else
8335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8336$as_echo "no" >&6; }
8337fi
8338test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8340$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8341if ${acl_cv_prog_gnu_ld+:} false; then :
8342  $as_echo_n "(cached) " >&6
8343else
8344  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8345if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8346  acl_cv_prog_gnu_ld=yes
8347else
8348  acl_cv_prog_gnu_ld=no
8349fi
8350fi
8351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8352$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8353with_gnu_ld=$acl_cv_prog_gnu_ld
8354
8355
8356
8357                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8358$as_echo_n "checking for shared library run path origin... " >&6; }
8359if ${acl_cv_rpath+:} false; then :
8360  $as_echo_n "(cached) " >&6
8361else
8362
8363    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8364    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8365    . ./conftest.sh
8366    rm -f ./conftest.sh
8367    acl_cv_rpath=done
8368
8369fi
8370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8371$as_echo "$acl_cv_rpath" >&6; }
8372  wl="$acl_cv_wl"
8373  libext="$acl_cv_libext"
8374  shlibext="$acl_cv_shlibext"
8375  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8376  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8377  hardcode_direct="$acl_cv_hardcode_direct"
8378  hardcode_minus_L="$acl_cv_hardcode_minus_L"
8379    # Check whether --enable-rpath was given.
8380if test "${enable_rpath+set}" = set; then :
8381  enableval=$enable_rpath; :
8382else
8383  enable_rpath=yes
8384fi
8385
8386
8387
8388
8389
8390
8391
8392
8393    use_additional=yes
8394
8395  acl_save_prefix="$prefix"
8396  prefix="$acl_final_prefix"
8397  acl_save_exec_prefix="$exec_prefix"
8398  exec_prefix="$acl_final_exec_prefix"
8399
8400    eval additional_includedir=\"$includedir\"
8401    eval additional_libdir=\"$libdir\"
8402
8403  exec_prefix="$acl_save_exec_prefix"
8404  prefix="$acl_save_prefix"
8405
8406
8407# Check whether --with-libiconv-prefix was given.
8408if test "${with_libiconv_prefix+set}" = set; then :
8409  withval=$with_libiconv_prefix;
8410    if test "X$withval" = "Xno"; then
8411      use_additional=no
8412    else
8413      if test "X$withval" = "X"; then
8414
8415  acl_save_prefix="$prefix"
8416  prefix="$acl_final_prefix"
8417  acl_save_exec_prefix="$exec_prefix"
8418  exec_prefix="$acl_final_exec_prefix"
8419
8420          eval additional_includedir=\"$includedir\"
8421          eval additional_libdir=\"$libdir\"
8422
8423  exec_prefix="$acl_save_exec_prefix"
8424  prefix="$acl_save_prefix"
8425
8426      else
8427        additional_includedir="$withval/include"
8428        additional_libdir="$withval/lib"
8429      fi
8430    fi
8431
8432fi
8433
8434
8435# Check whether --with-libiconv-type was given.
8436if test "${with_libiconv_type+set}" = set; then :
8437  withval=$with_libiconv_type;  with_libiconv_type=$withval
8438else
8439   with_libiconv_type=auto
8440fi
8441
8442  lib_type=`eval echo \$with_libiconv_type`
8443
8444      LIBICONV=
8445  LTLIBICONV=
8446  INCICONV=
8447  rpathdirs=
8448  ltrpathdirs=
8449  names_already_handled=
8450  names_next_round='iconv '
8451  while test -n "$names_next_round"; do
8452    names_this_round="$names_next_round"
8453    names_next_round=
8454    for name in $names_this_round; do
8455      already_handled=
8456      for n in $names_already_handled; do
8457        if test "$n" = "$name"; then
8458          already_handled=yes
8459          break
8460        fi
8461      done
8462      if test -z "$already_handled"; then
8463        names_already_handled="$names_already_handled $name"
8464                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8465        eval value=\"\$HAVE_LIB$uppername\"
8466        if test -n "$value"; then
8467          if test "$value" = yes; then
8468            eval value=\"\$LIB$uppername\"
8469            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8470            eval value=\"\$LTLIB$uppername\"
8471            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8472          else
8473                                    :
8474          fi
8475        else
8476                              found_dir=
8477          found_la=
8478          found_so=
8479          found_a=
8480          if test $use_additional = yes; then
8481            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8482              found_dir="$additional_libdir"
8483              found_so="$additional_libdir/lib$name.$shlibext"
8484              if test -f "$additional_libdir/lib$name.la"; then
8485                found_la="$additional_libdir/lib$name.la"
8486              fi
8487            elif test x$lib_type != xshared; then
8488              if test -f "$additional_libdir/lib$name.$libext"; then
8489                found_dir="$additional_libdir"
8490                found_a="$additional_libdir/lib$name.$libext"
8491                if test -f "$additional_libdir/lib$name.la"; then
8492                  found_la="$additional_libdir/lib$name.la"
8493                fi
8494              fi
8495            fi
8496          fi
8497          if test "X$found_dir" = "X"; then
8498            for x in $LDFLAGS $LTLIBICONV; do
8499
8500  acl_save_prefix="$prefix"
8501  prefix="$acl_final_prefix"
8502  acl_save_exec_prefix="$exec_prefix"
8503  exec_prefix="$acl_final_exec_prefix"
8504  eval x=\"$x\"
8505  exec_prefix="$acl_save_exec_prefix"
8506  prefix="$acl_save_prefix"
8507
8508              case "$x" in
8509                -L*)
8510                  dir=`echo "X$x" | sed -e 's/^X-L//'`
8511                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8512                    found_dir="$dir"
8513                    found_so="$dir/lib$name.$shlibext"
8514                    if test -f "$dir/lib$name.la"; then
8515                      found_la="$dir/lib$name.la"
8516                    fi
8517                  elif test x$lib_type != xshared; then
8518                    if test -f "$dir/lib$name.$libext"; then
8519                      found_dir="$dir"
8520                      found_a="$dir/lib$name.$libext"
8521                      if test -f "$dir/lib$name.la"; then
8522                        found_la="$dir/lib$name.la"
8523                      fi
8524                    fi
8525                  fi
8526                  ;;
8527              esac
8528              if test "X$found_dir" != "X"; then
8529                break
8530              fi
8531            done
8532          fi
8533          if test "X$found_dir" != "X"; then
8534                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8535            if test "X$found_so" != "X"; then
8536                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8537                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8538              else
8539                                                                                haveit=
8540                for x in $ltrpathdirs; do
8541                  if test "X$x" = "X$found_dir"; then
8542                    haveit=yes
8543                    break
8544                  fi
8545                done
8546                if test -z "$haveit"; then
8547                  ltrpathdirs="$ltrpathdirs $found_dir"
8548                fi
8549                                if test "$hardcode_direct" = yes; then
8550                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8551                else
8552                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8553                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8554                                                            haveit=
8555                    for x in $rpathdirs; do
8556                      if test "X$x" = "X$found_dir"; then
8557                        haveit=yes
8558                        break
8559                      fi
8560                    done
8561                    if test -z "$haveit"; then
8562                      rpathdirs="$rpathdirs $found_dir"
8563                    fi
8564                  else
8565                                                                                haveit=
8566                    for x in $LDFLAGS $LIBICONV; do
8567
8568  acl_save_prefix="$prefix"
8569  prefix="$acl_final_prefix"
8570  acl_save_exec_prefix="$exec_prefix"
8571  exec_prefix="$acl_final_exec_prefix"
8572  eval x=\"$x\"
8573  exec_prefix="$acl_save_exec_prefix"
8574  prefix="$acl_save_prefix"
8575
8576                      if test "X$x" = "X-L$found_dir"; then
8577                        haveit=yes
8578                        break
8579                      fi
8580                    done
8581                    if test -z "$haveit"; then
8582                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8583                    fi
8584                    if test "$hardcode_minus_L" != no; then
8585                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8586                    else
8587                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8588                    fi
8589                  fi
8590                fi
8591              fi
8592            else
8593              if test "X$found_a" != "X"; then
8594                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8595              else
8596                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8597              fi
8598            fi
8599                        additional_includedir=
8600            case "$found_dir" in
8601              */lib | */lib/)
8602                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8603                additional_includedir="$basedir/include"
8604                ;;
8605            esac
8606            if test "X$additional_includedir" != "X"; then
8607                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
8608                haveit=
8609                if test "X$additional_includedir" = "X/usr/local/include"; then
8610                  if test -n "$GCC"; then
8611                    case $host_os in
8612                      linux*) haveit=yes;;
8613                    esac
8614                  fi
8615                fi
8616                if test -z "$haveit"; then
8617                  for x in $CPPFLAGS $INCICONV; do
8618
8619  acl_save_prefix="$prefix"
8620  prefix="$acl_final_prefix"
8621  acl_save_exec_prefix="$exec_prefix"
8622  exec_prefix="$acl_final_exec_prefix"
8623  eval x=\"$x\"
8624  exec_prefix="$acl_save_exec_prefix"
8625  prefix="$acl_save_prefix"
8626
8627                    if test "X$x" = "X-I$additional_includedir"; then
8628                      haveit=yes
8629                      break
8630                    fi
8631                  done
8632                  if test -z "$haveit"; then
8633                    if test -d "$additional_includedir"; then
8634                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8635                    fi
8636                  fi
8637                fi
8638              fi
8639            fi
8640                        if test -n "$found_la"; then
8641                                                        save_libdir="$libdir"
8642              case "$found_la" in
8643                */* | *\\*) . "$found_la" ;;
8644                *) . "./$found_la" ;;
8645              esac
8646              libdir="$save_libdir"
8647                            for dep in $dependency_libs; do
8648                case "$dep" in
8649                  -L*)
8650                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8651                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
8652                      haveit=
8653                      if test "X$additional_libdir" = "X/usr/local/lib"; then
8654                        if test -n "$GCC"; then
8655                          case $host_os in
8656                            linux*) haveit=yes;;
8657                          esac
8658                        fi
8659                      fi
8660                      if test -z "$haveit"; then
8661                        haveit=
8662                        for x in $LDFLAGS $LIBICONV; do
8663
8664  acl_save_prefix="$prefix"
8665  prefix="$acl_final_prefix"
8666  acl_save_exec_prefix="$exec_prefix"
8667  exec_prefix="$acl_final_exec_prefix"
8668  eval x=\"$x\"
8669  exec_prefix="$acl_save_exec_prefix"
8670  prefix="$acl_save_prefix"
8671
8672                          if test "X$x" = "X-L$additional_libdir"; then
8673                            haveit=yes
8674                            break
8675                          fi
8676                        done
8677                        if test -z "$haveit"; then
8678                          if test -d "$additional_libdir"; then
8679                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8680                          fi
8681                        fi
8682                        haveit=
8683                        for x in $LDFLAGS $LTLIBICONV; do
8684
8685  acl_save_prefix="$prefix"
8686  prefix="$acl_final_prefix"
8687  acl_save_exec_prefix="$exec_prefix"
8688  exec_prefix="$acl_final_exec_prefix"
8689  eval x=\"$x\"
8690  exec_prefix="$acl_save_exec_prefix"
8691  prefix="$acl_save_prefix"
8692
8693                          if test "X$x" = "X-L$additional_libdir"; then
8694                            haveit=yes
8695                            break
8696                          fi
8697                        done
8698                        if test -z "$haveit"; then
8699                          if test -d "$additional_libdir"; then
8700                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8701                          fi
8702                        fi
8703                      fi
8704                    fi
8705                    ;;
8706                  -R*)
8707                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
8708                    if test "$enable_rpath" != no; then
8709                                                                  haveit=
8710                      for x in $rpathdirs; do
8711                        if test "X$x" = "X$dir"; then
8712                          haveit=yes
8713                          break
8714                        fi
8715                      done
8716                      if test -z "$haveit"; then
8717                        rpathdirs="$rpathdirs $dir"
8718                      fi
8719                                                                  haveit=
8720                      for x in $ltrpathdirs; do
8721                        if test "X$x" = "X$dir"; then
8722                          haveit=yes
8723                          break
8724                        fi
8725                      done
8726                      if test -z "$haveit"; then
8727                        ltrpathdirs="$ltrpathdirs $dir"
8728                      fi
8729                    fi
8730                    ;;
8731                  -l*)
8732                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8733                    ;;
8734                  *.la)
8735                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8736                    ;;
8737                  *)
8738                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8739                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8740                    ;;
8741                esac
8742              done
8743            fi
8744          else
8745                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8746              LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8747              LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8748            else
8749              LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8750              LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8751            fi
8752          fi
8753        fi
8754      fi
8755    done
8756  done
8757  if test "X$rpathdirs" != "X"; then
8758    if test -n "$hardcode_libdir_separator"; then
8759                        alldirs=
8760      for found_dir in $rpathdirs; do
8761        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8762      done
8763            acl_save_libdir="$libdir"
8764      libdir="$alldirs"
8765      eval flag=\"$hardcode_libdir_flag_spec\"
8766      libdir="$acl_save_libdir"
8767      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8768    else
8769            for found_dir in $rpathdirs; do
8770        acl_save_libdir="$libdir"
8771        libdir="$found_dir"
8772        eval flag=\"$hardcode_libdir_flag_spec\"
8773        libdir="$acl_save_libdir"
8774        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8775      done
8776    fi
8777  fi
8778  if test "X$ltrpathdirs" != "X"; then
8779            for found_dir in $ltrpathdirs; do
8780      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8781    done
8782  fi
8783
8784
8785
8786
8787
8788
8789
8790  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8791$as_echo_n "checking for iconv... " >&6; }
8792if ${am_cv_func_iconv+:} false; then :
8793  $as_echo_n "(cached) " >&6
8794else
8795
8796    am_cv_func_iconv="no, consider installing GNU libiconv"
8797    am_cv_lib_iconv=no
8798                    am_save_CPPFLAGS="$CPPFLAGS"
8799    CPPFLAGS="$CPPFLAGS $INCICONV"
8800    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8801/* end confdefs.h.  */
8802#include <stdlib.h>
8803#include <iconv.h>
8804int
8805main ()
8806{
8807iconv_t cd = iconv_open("","");
8808       iconv(cd,NULL,NULL,NULL,NULL);
8809       iconv_close(cd);
8810  ;
8811  return 0;
8812}
8813_ACEOF
8814if ac_fn_c_try_link "$LINENO"; then :
8815  am_cv_func_iconv=yes
8816fi
8817rm -f core conftest.err conftest.$ac_objext \
8818    conftest$ac_exeext conftest.$ac_ext
8819    CPPFLAGS="$am_save_CPPFLAGS"
8820
8821    if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8822      for _libs in .libs _libs; do
8823        am_save_CPPFLAGS="$CPPFLAGS"
8824        am_save_LIBS="$LIBS"
8825        CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8826        LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8827        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8828/* end confdefs.h.  */
8829#include <stdlib.h>
8830#include <iconv.h>
8831int
8832main ()
8833{
8834iconv_t cd = iconv_open("","");
8835           iconv(cd,NULL,NULL,NULL,NULL);
8836           iconv_close(cd);
8837  ;
8838  return 0;
8839}
8840_ACEOF
8841if ac_fn_c_try_link "$LINENO"; then :
8842  INCICONV="-I../libiconv/include"
8843          LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8844          LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8845          am_cv_lib_iconv=yes
8846          am_cv_func_iconv=yes
8847fi
8848rm -f core conftest.err conftest.$ac_objext \
8849    conftest$ac_exeext conftest.$ac_ext
8850        CPPFLAGS="$am_save_CPPFLAGS"
8851        LIBS="$am_save_LIBS"
8852        if test "$am_cv_func_iconv" = "yes"; then
8853          break
8854        fi
8855      done
8856    fi
8857
8858    if test "$am_cv_func_iconv" != yes; then
8859      am_save_CPPFLAGS="$CPPFLAGS"
8860      am_save_LIBS="$LIBS"
8861      CPPFLAGS="$CPPFLAGS $INCICONV"
8862      LIBS="$LIBS $LIBICONV"
8863      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8864/* end confdefs.h.  */
8865#include <stdlib.h>
8866#include <iconv.h>
8867int
8868main ()
8869{
8870iconv_t cd = iconv_open("","");
8871         iconv(cd,NULL,NULL,NULL,NULL);
8872         iconv_close(cd);
8873  ;
8874  return 0;
8875}
8876_ACEOF
8877if ac_fn_c_try_link "$LINENO"; then :
8878  am_cv_lib_iconv=yes
8879        am_cv_func_iconv=yes
8880fi
8881rm -f core conftest.err conftest.$ac_objext \
8882    conftest$ac_exeext conftest.$ac_ext
8883      CPPFLAGS="$am_save_CPPFLAGS"
8884      LIBS="$am_save_LIBS"
8885    fi
8886
8887fi
8888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8889$as_echo "$am_cv_func_iconv" >&6; }
8890  if test "$am_cv_func_iconv" = yes; then
8891
8892$as_echo "#define HAVE_ICONV 1" >>confdefs.h
8893
8894  fi
8895  if test "$am_cv_lib_iconv" = yes; then
8896
8897  for element in $INCICONV; do
8898    haveit=
8899    for x in $CPPFLAGS; do
8900
8901  acl_save_prefix="$prefix"
8902  prefix="$acl_final_prefix"
8903  acl_save_exec_prefix="$exec_prefix"
8904  exec_prefix="$acl_final_exec_prefix"
8905  eval x=\"$x\"
8906  exec_prefix="$acl_save_exec_prefix"
8907  prefix="$acl_save_prefix"
8908
8909      if test "X$x" = "X$element"; then
8910        haveit=yes
8911        break
8912      fi
8913    done
8914    if test -z "$haveit"; then
8915      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8916    fi
8917  done
8918
8919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8920$as_echo_n "checking how to link with libiconv... " >&6; }
8921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8922$as_echo "$LIBICONV" >&6; }
8923  else
8924    LIBICONV=
8925    LTLIBICONV=
8926  fi
8927
8928
8929
8930  if test "$am_cv_func_iconv" = yes; then
8931    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8932$as_echo_n "checking for iconv declaration... " >&6; }
8933    if ${am_cv_proto_iconv+:} false; then :
8934  $as_echo_n "(cached) " >&6
8935else
8936
8937      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8938/* end confdefs.h.  */
8939
8940#include <stdlib.h>
8941#include <iconv.h>
8942extern
8943#ifdef __cplusplus
8944"C"
8945#endif
8946#if defined(__STDC__) || defined(__cplusplus)
8947size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8948#else
8949size_t iconv();
8950#endif
8951
8952int
8953main ()
8954{
8955
8956  ;
8957  return 0;
8958}
8959_ACEOF
8960if ac_fn_c_try_compile "$LINENO"; then :
8961  am_cv_proto_iconv_arg1=""
8962else
8963  am_cv_proto_iconv_arg1="const"
8964fi
8965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8966      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);"
8967fi
8968
8969    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8971         }$am_cv_proto_iconv" >&5
8972$as_echo "${ac_t:-
8973         }$am_cv_proto_iconv" >&6; }
8974
8975cat >>confdefs.h <<_ACEOF
8976#define ICONV_CONST $am_cv_proto_iconv_arg1
8977_ACEOF
8978
8979  fi
8980
8981
8982# GDB may fork/exec the iconv program to get the list of supported character
8983# sets.  Allow the user to specify where to find it.
8984# There are several factors affecting the choice of option name:
8985# - There is already --with-libiconv-prefix but we can't use it, it specifies
8986#   the build-time location of libiconv files.
8987# - The program we need to find is iconv, which comes with glibc.  The user
8988#   doesn't necessarily have libiconv installed.  Therefore naming this
8989#   --with-libiconv-foo feels wrong.
8990# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8991#   defined to work on directories not files (though it really doesn't know
8992#   the difference).
8993# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8994#   with --with-libiconv-prefix.
8995# Putting these together is why the option name is --with-iconv-bin.
8996
8997
8998# Check whether --with-iconv-bin was given.
8999if test "${with_iconv_bin+set}" = set; then :
9000  withval=$with_iconv_bin; iconv_bin="${withval}"
9001
9002cat >>confdefs.h <<_ACEOF
9003#define ICONV_BIN "${iconv_bin}"
9004_ACEOF
9005
9006
9007  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9008     if test "x$prefix" = xNONE; then
9009     	test_prefix=/usr/local
9010     else
9011	test_prefix=$prefix
9012     fi
9013  else
9014     test_prefix=$exec_prefix
9015  fi
9016  value=0
9017  case ${iconv_bin} in
9018     "${test_prefix}"|"${test_prefix}/"*|\
9019	'${exec_prefix}'|'${exec_prefix}/'*)
9020     value=1
9021     ;;
9022  esac
9023
9024cat >>confdefs.h <<_ACEOF
9025#define ICONV_BIN_RELOCATABLE $value
9026_ACEOF
9027
9028
9029
9030fi
9031
9032
9033# For the TUI, we need enhanced curses functionality.
9034if test x"$enable_tui" != xno; then
9035  prefer_curses=yes
9036fi
9037
9038curses_found=no
9039if test x"$prefer_curses" = xyes; then
9040  # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9041  # curses library because the latter might not provide all the
9042  # functionality we need.  However, this leads to problems on systems
9043  # where the linker searches /usr/local/lib, but the compiler doesn't
9044  # search /usr/local/include, if ncurses is installed in /usr/local.  A
9045  # default installation of ncurses on alpha*-dec-osf* will lead to such
9046  # a situation.
9047  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9048$as_echo_n "checking for library containing waddstr... " >&6; }
9049if ${ac_cv_search_waddstr+:} false; then :
9050  $as_echo_n "(cached) " >&6
9051else
9052  ac_func_search_save_LIBS=$LIBS
9053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9054/* end confdefs.h.  */
9055
9056/* Override any GCC internal prototype to avoid an error.
9057   Use char because int might match the return type of a GCC
9058   builtin and then its argument prototype would still apply.  */
9059#ifdef __cplusplus
9060extern "C"
9061#endif
9062char waddstr ();
9063int
9064main ()
9065{
9066return waddstr ();
9067  ;
9068  return 0;
9069}
9070_ACEOF
9071for ac_lib in '' ncursesw ncurses cursesX curses; do
9072  if test -z "$ac_lib"; then
9073    ac_res="none required"
9074  else
9075    ac_res=-l$ac_lib
9076    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9077  fi
9078  if ac_fn_c_try_link "$LINENO"; then :
9079  ac_cv_search_waddstr=$ac_res
9080fi
9081rm -f core conftest.err conftest.$ac_objext \
9082    conftest$ac_exeext
9083  if ${ac_cv_search_waddstr+:} false; then :
9084  break
9085fi
9086done
9087if ${ac_cv_search_waddstr+:} false; then :
9088
9089else
9090  ac_cv_search_waddstr=no
9091fi
9092rm conftest.$ac_ext
9093LIBS=$ac_func_search_save_LIBS
9094fi
9095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9096$as_echo "$ac_cv_search_waddstr" >&6; }
9097ac_res=$ac_cv_search_waddstr
9098if test "$ac_res" != no; then :
9099  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9100
9101fi
9102
9103
9104  if test "$ac_cv_search_waddstr" != no; then
9105    curses_found=yes
9106  fi
9107fi
9108
9109# Check whether we should enable the TUI, but only do so if we really
9110# can.
9111if test x"$enable_tui" != xno; then
9112  if test -d "$srcdir/tui"; then
9113    if test "$curses_found" != no; then
9114      CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9115      CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9116      CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9117      ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9118    else
9119      if test x"$enable_tui" = xyes; then
9120	as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
9121      else
9122	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9123$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
9124      fi
9125    fi
9126  fi
9127fi
9128
9129# Since GDB uses Readline, we need termcap functionality.  In many
9130# cases this will be provided by the curses library, but some systems
9131# have a separate termcap library, or no curses library at all.
9132
9133case $host_os in
9134  cygwin*)
9135    if test -d "$srcdir/libtermcap"; then
9136      LIBS="../libtermcap/libtermcap.a $LIBS"
9137      ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9138    fi ;;
9139  go32* | *djgpp*)
9140    ac_cv_search_tgetent="none required"
9141    ;;
9142esac
9143
9144# These are the libraries checked by Readline.
9145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9146$as_echo_n "checking for library containing tgetent... " >&6; }
9147if ${ac_cv_search_tgetent+:} false; then :
9148  $as_echo_n "(cached) " >&6
9149else
9150  ac_func_search_save_LIBS=$LIBS
9151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9152/* end confdefs.h.  */
9153
9154/* Override any GCC internal prototype to avoid an error.
9155   Use char because int might match the return type of a GCC
9156   builtin and then its argument prototype would still apply.  */
9157#ifdef __cplusplus
9158extern "C"
9159#endif
9160char tgetent ();
9161int
9162main ()
9163{
9164return tgetent ();
9165  ;
9166  return 0;
9167}
9168_ACEOF
9169for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
9170  if test -z "$ac_lib"; then
9171    ac_res="none required"
9172  else
9173    ac_res=-l$ac_lib
9174    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9175  fi
9176  if ac_fn_c_try_link "$LINENO"; then :
9177  ac_cv_search_tgetent=$ac_res
9178fi
9179rm -f core conftest.err conftest.$ac_objext \
9180    conftest$ac_exeext
9181  if ${ac_cv_search_tgetent+:} false; then :
9182  break
9183fi
9184done
9185if ${ac_cv_search_tgetent+:} false; then :
9186
9187else
9188  ac_cv_search_tgetent=no
9189fi
9190rm conftest.$ac_ext
9191LIBS=$ac_func_search_save_LIBS
9192fi
9193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9194$as_echo "$ac_cv_search_tgetent" >&6; }
9195ac_res=$ac_cv_search_tgetent
9196if test "$ac_res" != no; then :
9197  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9198
9199fi
9200
9201
9202if test "$ac_cv_search_tgetent" = no; then
9203  CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9204fi
9205
9206
9207# Check whether --with-system-readline was given.
9208if test "${with_system_readline+set}" = set; then :
9209  withval=$with_system_readline;
9210fi
9211
9212
9213if test "$with_system_readline" = yes; then
9214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9215$as_echo_n "checking whether system readline is new enough... " >&6; }
9216if ${gdb_cv_readline_ok+:} false; then :
9217  $as_echo_n "(cached) " >&6
9218else
9219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9220/* end confdefs.h.  */
9221#include <stdio.h>
9222	   #include <readline/readline.h>
9223int
9224main ()
9225{
9226#if RL_VERSION_MAJOR < 7
9227	   # error "readline version 7 required"
9228	   #endif
9229
9230  ;
9231  return 0;
9232}
9233_ACEOF
9234if ac_fn_c_try_compile "$LINENO"; then :
9235  gdb_cv_readline_ok=yes
9236else
9237  gdb_cv_readline_ok=no
9238
9239fi
9240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9241
9242fi
9243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9244$as_echo "$gdb_cv_readline_ok" >&6; }
9245  if test "$gdb_cv_readline_ok" != yes; then
9246    as_fn_error $? "system readline is not new enough" "$LINENO" 5
9247  fi
9248
9249  READLINE=-lreadline
9250  READLINE_DEPS=
9251  READLINE_CFLAGS=
9252  READLINE_TEXI_INCFLAG=
9253else
9254  READLINE='$(READLINE_DIR)/libreadline.a'
9255  READLINE_DEPS='$(READLINE)'
9256  READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9257  READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9258fi
9259
9260
9261
9262
9263
9264# Generate jit-reader.h
9265
9266# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9267TARGET_PTR=
9268
9269# The cast to long int works around a bug in the HP C Compiler
9270# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9271# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9272# This bug is HP SR number 8606223364.
9273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9274$as_echo_n "checking size of unsigned long long... " >&6; }
9275if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9276  $as_echo_n "(cached) " >&6
9277else
9278  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :
9279
9280else
9281  if test "$ac_cv_type_unsigned_long_long" = yes; then
9282     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9283$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9284as_fn_error 77 "cannot compute sizeof (unsigned long long)
9285See \`config.log' for more details" "$LINENO" 5; }
9286   else
9287     ac_cv_sizeof_unsigned_long_long=0
9288   fi
9289fi
9290
9291fi
9292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9293$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9294
9295
9296
9297cat >>confdefs.h <<_ACEOF
9298#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9299_ACEOF
9300
9301
9302# The cast to long int works around a bug in the HP C Compiler
9303# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9304# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9305# This bug is HP SR number 8606223364.
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9307$as_echo_n "checking size of unsigned long... " >&6; }
9308if ${ac_cv_sizeof_unsigned_long+:} false; then :
9309  $as_echo_n "(cached) " >&6
9310else
9311  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
9312
9313else
9314  if test "$ac_cv_type_unsigned_long" = yes; then
9315     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9316$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9317as_fn_error 77 "cannot compute sizeof (unsigned long)
9318See \`config.log' for more details" "$LINENO" 5; }
9319   else
9320     ac_cv_sizeof_unsigned_long=0
9321   fi
9322fi
9323
9324fi
9325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9326$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9327
9328
9329
9330cat >>confdefs.h <<_ACEOF
9331#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9332_ACEOF
9333
9334
9335# The cast to long int works around a bug in the HP C Compiler
9336# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9337# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9338# This bug is HP SR number 8606223364.
9339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9340$as_echo_n "checking size of unsigned __int128... " >&6; }
9341if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9342  $as_echo_n "(cached) " >&6
9343else
9344  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128"        "$ac_includes_default"; then :
9345
9346else
9347  if test "$ac_cv_type_unsigned___int128" = yes; then
9348     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9349$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9350as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9351See \`config.log' for more details" "$LINENO" 5; }
9352   else
9353     ac_cv_sizeof_unsigned___int128=0
9354   fi
9355fi
9356
9357fi
9358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9359$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9360
9361
9362
9363cat >>confdefs.h <<_ACEOF
9364#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9365_ACEOF
9366
9367
9368
9369if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9370  TARGET_PTR="unsigned long"
9371elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9372  TARGET_PTR="unsigned long long"
9373elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9374  TARGET_PTR="unsigned __int128"
9375else
9376  TARGET_PTR="unsigned long"
9377fi
9378
9379
9380ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9381
9382
9383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9384$as_echo_n "checking for library containing dlopen... " >&6; }
9385if ${ac_cv_search_dlopen+:} false; then :
9386  $as_echo_n "(cached) " >&6
9387else
9388  ac_func_search_save_LIBS=$LIBS
9389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9390/* end confdefs.h.  */
9391
9392/* Override any GCC internal prototype to avoid an error.
9393   Use char because int might match the return type of a GCC
9394   builtin and then its argument prototype would still apply.  */
9395#ifdef __cplusplus
9396extern "C"
9397#endif
9398char dlopen ();
9399int
9400main ()
9401{
9402return dlopen ();
9403  ;
9404  return 0;
9405}
9406_ACEOF
9407for ac_lib in '' dl; do
9408  if test -z "$ac_lib"; then
9409    ac_res="none required"
9410  else
9411    ac_res=-l$ac_lib
9412    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9413  fi
9414  if ac_fn_c_try_link "$LINENO"; then :
9415  ac_cv_search_dlopen=$ac_res
9416fi
9417rm -f core conftest.err conftest.$ac_objext \
9418    conftest$ac_exeext
9419  if ${ac_cv_search_dlopen+:} false; then :
9420  break
9421fi
9422done
9423if ${ac_cv_search_dlopen+:} false; then :
9424
9425else
9426  ac_cv_search_dlopen=no
9427fi
9428rm conftest.$ac_ext
9429LIBS=$ac_func_search_save_LIBS
9430fi
9431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9432$as_echo "$ac_cv_search_dlopen" >&6; }
9433ac_res=$ac_cv_search_dlopen
9434if test "$ac_res" != no; then :
9435  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9436
9437fi
9438
9439
9440
9441
9442# Check whether --with-jit-reader-dir was given.
9443if test "${with_jit_reader_dir+set}" = set; then :
9444  withval=$with_jit_reader_dir;
9445    JIT_READER_DIR=$withval
9446else
9447  JIT_READER_DIR=${libdir}/gdb
9448fi
9449
9450
9451  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9452  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9453  ac_define_dir=`eval echo $JIT_READER_DIR`
9454  ac_define_dir=`eval echo $ac_define_dir`
9455
9456cat >>confdefs.h <<_ACEOF
9457#define JIT_READER_DIR "$ac_define_dir"
9458_ACEOF
9459
9460
9461
9462
9463  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9464     if test "x$prefix" = xNONE; then
9465     	test_prefix=/usr/local
9466     else
9467	test_prefix=$prefix
9468     fi
9469  else
9470     test_prefix=$exec_prefix
9471  fi
9472  value=0
9473  case ${ac_define_dir} in
9474     "${test_prefix}"|"${test_prefix}/"*|\
9475	'${exec_prefix}'|'${exec_prefix}/'*)
9476     value=1
9477     ;;
9478  esac
9479
9480cat >>confdefs.h <<_ACEOF
9481#define JIT_READER_DIR_RELOCATABLE $value
9482_ACEOF
9483
9484
9485
9486
9487
9488# Check whether --with-expat was given.
9489if test "${with_expat+set}" = set; then :
9490  withval=$with_expat;
9491else
9492  with_expat=auto
9493fi
9494
9495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9496$as_echo_n "checking whether to use expat... " >&6; }
9497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9498$as_echo "$with_expat" >&6; }
9499
9500if test "${with_expat}" = no; then
9501  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9502$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9503  HAVE_LIBEXPAT=no
9504else
9505
9506
9507
9508
9509
9510
9511
9512
9513    use_additional=yes
9514
9515  acl_save_prefix="$prefix"
9516  prefix="$acl_final_prefix"
9517  acl_save_exec_prefix="$exec_prefix"
9518  exec_prefix="$acl_final_exec_prefix"
9519
9520    eval additional_includedir=\"$includedir\"
9521    eval additional_libdir=\"$libdir\"
9522
9523  exec_prefix="$acl_save_exec_prefix"
9524  prefix="$acl_save_prefix"
9525
9526
9527# Check whether --with-libexpat-prefix was given.
9528if test "${with_libexpat_prefix+set}" = set; then :
9529  withval=$with_libexpat_prefix;
9530    if test "X$withval" = "Xno"; then
9531      use_additional=no
9532    else
9533      if test "X$withval" = "X"; then
9534
9535  acl_save_prefix="$prefix"
9536  prefix="$acl_final_prefix"
9537  acl_save_exec_prefix="$exec_prefix"
9538  exec_prefix="$acl_final_exec_prefix"
9539
9540          eval additional_includedir=\"$includedir\"
9541          eval additional_libdir=\"$libdir\"
9542
9543  exec_prefix="$acl_save_exec_prefix"
9544  prefix="$acl_save_prefix"
9545
9546      else
9547        additional_includedir="$withval/include"
9548        additional_libdir="$withval/lib"
9549      fi
9550    fi
9551
9552fi
9553
9554
9555# Check whether --with-libexpat-type was given.
9556if test "${with_libexpat_type+set}" = set; then :
9557  withval=$with_libexpat_type;  with_libexpat_type=$withval
9558else
9559   with_libexpat_type=auto
9560fi
9561
9562  lib_type=`eval echo \$with_libexpat_type`
9563
9564      LIBEXPAT=
9565  LTLIBEXPAT=
9566  INCEXPAT=
9567  rpathdirs=
9568  ltrpathdirs=
9569  names_already_handled=
9570  names_next_round='expat '
9571  while test -n "$names_next_round"; do
9572    names_this_round="$names_next_round"
9573    names_next_round=
9574    for name in $names_this_round; do
9575      already_handled=
9576      for n in $names_already_handled; do
9577        if test "$n" = "$name"; then
9578          already_handled=yes
9579          break
9580        fi
9581      done
9582      if test -z "$already_handled"; then
9583        names_already_handled="$names_already_handled $name"
9584                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9585        eval value=\"\$HAVE_LIB$uppername\"
9586        if test -n "$value"; then
9587          if test "$value" = yes; then
9588            eval value=\"\$LIB$uppername\"
9589            test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9590            eval value=\"\$LTLIB$uppername\"
9591            test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9592          else
9593                                    :
9594          fi
9595        else
9596                              found_dir=
9597          found_la=
9598          found_so=
9599          found_a=
9600          if test $use_additional = yes; then
9601            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9602              found_dir="$additional_libdir"
9603              found_so="$additional_libdir/lib$name.$shlibext"
9604              if test -f "$additional_libdir/lib$name.la"; then
9605                found_la="$additional_libdir/lib$name.la"
9606              fi
9607            elif test x$lib_type != xshared; then
9608              if test -f "$additional_libdir/lib$name.$libext"; then
9609                found_dir="$additional_libdir"
9610                found_a="$additional_libdir/lib$name.$libext"
9611                if test -f "$additional_libdir/lib$name.la"; then
9612                  found_la="$additional_libdir/lib$name.la"
9613                fi
9614              fi
9615            fi
9616          fi
9617          if test "X$found_dir" = "X"; then
9618            for x in $LDFLAGS $LTLIBEXPAT; do
9619
9620  acl_save_prefix="$prefix"
9621  prefix="$acl_final_prefix"
9622  acl_save_exec_prefix="$exec_prefix"
9623  exec_prefix="$acl_final_exec_prefix"
9624  eval x=\"$x\"
9625  exec_prefix="$acl_save_exec_prefix"
9626  prefix="$acl_save_prefix"
9627
9628              case "$x" in
9629                -L*)
9630                  dir=`echo "X$x" | sed -e 's/^X-L//'`
9631                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9632                    found_dir="$dir"
9633                    found_so="$dir/lib$name.$shlibext"
9634                    if test -f "$dir/lib$name.la"; then
9635                      found_la="$dir/lib$name.la"
9636                    fi
9637                  elif test x$lib_type != xshared; then
9638                    if test -f "$dir/lib$name.$libext"; then
9639                      found_dir="$dir"
9640                      found_a="$dir/lib$name.$libext"
9641                      if test -f "$dir/lib$name.la"; then
9642                        found_la="$dir/lib$name.la"
9643                      fi
9644                    fi
9645                  fi
9646                  ;;
9647              esac
9648              if test "X$found_dir" != "X"; then
9649                break
9650              fi
9651            done
9652          fi
9653          if test "X$found_dir" != "X"; then
9654                        LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9655            if test "X$found_so" != "X"; then
9656                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9657                                LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9658              else
9659                                                                                haveit=
9660                for x in $ltrpathdirs; do
9661                  if test "X$x" = "X$found_dir"; then
9662                    haveit=yes
9663                    break
9664                  fi
9665                done
9666                if test -z "$haveit"; then
9667                  ltrpathdirs="$ltrpathdirs $found_dir"
9668                fi
9669                                if test "$hardcode_direct" = yes; then
9670                                                      LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9671                else
9672                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9673                                                            LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9674                                                            haveit=
9675                    for x in $rpathdirs; do
9676                      if test "X$x" = "X$found_dir"; then
9677                        haveit=yes
9678                        break
9679                      fi
9680                    done
9681                    if test -z "$haveit"; then
9682                      rpathdirs="$rpathdirs $found_dir"
9683                    fi
9684                  else
9685                                                                                haveit=
9686                    for x in $LDFLAGS $LIBEXPAT; do
9687
9688  acl_save_prefix="$prefix"
9689  prefix="$acl_final_prefix"
9690  acl_save_exec_prefix="$exec_prefix"
9691  exec_prefix="$acl_final_exec_prefix"
9692  eval x=\"$x\"
9693  exec_prefix="$acl_save_exec_prefix"
9694  prefix="$acl_save_prefix"
9695
9696                      if test "X$x" = "X-L$found_dir"; then
9697                        haveit=yes
9698                        break
9699                      fi
9700                    done
9701                    if test -z "$haveit"; then
9702                      LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9703                    fi
9704                    if test "$hardcode_minus_L" != no; then
9705                                                                                        LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9706                    else
9707                                                                                                                                                                                LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9708                    fi
9709                  fi
9710                fi
9711              fi
9712            else
9713              if test "X$found_a" != "X"; then
9714                                LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9715              else
9716                                                LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9717              fi
9718            fi
9719                        additional_includedir=
9720            case "$found_dir" in
9721              */lib | */lib/)
9722                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9723                additional_includedir="$basedir/include"
9724                ;;
9725            esac
9726            if test "X$additional_includedir" != "X"; then
9727                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
9728                haveit=
9729                if test "X$additional_includedir" = "X/usr/local/include"; then
9730                  if test -n "$GCC"; then
9731                    case $host_os in
9732                      linux*) haveit=yes;;
9733                    esac
9734                  fi
9735                fi
9736                if test -z "$haveit"; then
9737                  for x in $CPPFLAGS $INCEXPAT; do
9738
9739  acl_save_prefix="$prefix"
9740  prefix="$acl_final_prefix"
9741  acl_save_exec_prefix="$exec_prefix"
9742  exec_prefix="$acl_final_exec_prefix"
9743  eval x=\"$x\"
9744  exec_prefix="$acl_save_exec_prefix"
9745  prefix="$acl_save_prefix"
9746
9747                    if test "X$x" = "X-I$additional_includedir"; then
9748                      haveit=yes
9749                      break
9750                    fi
9751                  done
9752                  if test -z "$haveit"; then
9753                    if test -d "$additional_includedir"; then
9754                                            INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9755                    fi
9756                  fi
9757                fi
9758              fi
9759            fi
9760                        if test -n "$found_la"; then
9761                                                        save_libdir="$libdir"
9762              case "$found_la" in
9763                */* | *\\*) . "$found_la" ;;
9764                *) . "./$found_la" ;;
9765              esac
9766              libdir="$save_libdir"
9767                            for dep in $dependency_libs; do
9768                case "$dep" in
9769                  -L*)
9770                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9771                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
9772                      haveit=
9773                      if test "X$additional_libdir" = "X/usr/local/lib"; then
9774                        if test -n "$GCC"; then
9775                          case $host_os in
9776                            linux*) haveit=yes;;
9777                          esac
9778                        fi
9779                      fi
9780                      if test -z "$haveit"; then
9781                        haveit=
9782                        for x in $LDFLAGS $LIBEXPAT; do
9783
9784  acl_save_prefix="$prefix"
9785  prefix="$acl_final_prefix"
9786  acl_save_exec_prefix="$exec_prefix"
9787  exec_prefix="$acl_final_exec_prefix"
9788  eval x=\"$x\"
9789  exec_prefix="$acl_save_exec_prefix"
9790  prefix="$acl_save_prefix"
9791
9792                          if test "X$x" = "X-L$additional_libdir"; then
9793                            haveit=yes
9794                            break
9795                          fi
9796                        done
9797                        if test -z "$haveit"; then
9798                          if test -d "$additional_libdir"; then
9799                                                        LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9800                          fi
9801                        fi
9802                        haveit=
9803                        for x in $LDFLAGS $LTLIBEXPAT; do
9804
9805  acl_save_prefix="$prefix"
9806  prefix="$acl_final_prefix"
9807  acl_save_exec_prefix="$exec_prefix"
9808  exec_prefix="$acl_final_exec_prefix"
9809  eval x=\"$x\"
9810  exec_prefix="$acl_save_exec_prefix"
9811  prefix="$acl_save_prefix"
9812
9813                          if test "X$x" = "X-L$additional_libdir"; then
9814                            haveit=yes
9815                            break
9816                          fi
9817                        done
9818                        if test -z "$haveit"; then
9819                          if test -d "$additional_libdir"; then
9820                                                        LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9821                          fi
9822                        fi
9823                      fi
9824                    fi
9825                    ;;
9826                  -R*)
9827                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
9828                    if test "$enable_rpath" != no; then
9829                                                                  haveit=
9830                      for x in $rpathdirs; do
9831                        if test "X$x" = "X$dir"; then
9832                          haveit=yes
9833                          break
9834                        fi
9835                      done
9836                      if test -z "$haveit"; then
9837                        rpathdirs="$rpathdirs $dir"
9838                      fi
9839                                                                  haveit=
9840                      for x in $ltrpathdirs; do
9841                        if test "X$x" = "X$dir"; then
9842                          haveit=yes
9843                          break
9844                        fi
9845                      done
9846                      if test -z "$haveit"; then
9847                        ltrpathdirs="$ltrpathdirs $dir"
9848                      fi
9849                    fi
9850                    ;;
9851                  -l*)
9852                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9853                    ;;
9854                  *.la)
9855                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9856                    ;;
9857                  *)
9858                                        LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9859                    LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9860                    ;;
9861                esac
9862              done
9863            fi
9864          else
9865                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9866              LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9867              LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9868            else
9869              LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9870              LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9871            fi
9872          fi
9873        fi
9874      fi
9875    done
9876  done
9877  if test "X$rpathdirs" != "X"; then
9878    if test -n "$hardcode_libdir_separator"; then
9879                        alldirs=
9880      for found_dir in $rpathdirs; do
9881        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9882      done
9883            acl_save_libdir="$libdir"
9884      libdir="$alldirs"
9885      eval flag=\"$hardcode_libdir_flag_spec\"
9886      libdir="$acl_save_libdir"
9887      LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9888    else
9889            for found_dir in $rpathdirs; do
9890        acl_save_libdir="$libdir"
9891        libdir="$found_dir"
9892        eval flag=\"$hardcode_libdir_flag_spec\"
9893        libdir="$acl_save_libdir"
9894        LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9895      done
9896    fi
9897  fi
9898  if test "X$ltrpathdirs" != "X"; then
9899            for found_dir in $ltrpathdirs; do
9900      LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9901    done
9902  fi
9903
9904
9905        ac_save_CPPFLAGS="$CPPFLAGS"
9906
9907  for element in $INCEXPAT; do
9908    haveit=
9909    for x in $CPPFLAGS; do
9910
9911  acl_save_prefix="$prefix"
9912  prefix="$acl_final_prefix"
9913  acl_save_exec_prefix="$exec_prefix"
9914  exec_prefix="$acl_final_exec_prefix"
9915  eval x=\"$x\"
9916  exec_prefix="$acl_save_exec_prefix"
9917  prefix="$acl_save_prefix"
9918
9919      if test "X$x" = "X$element"; then
9920        haveit=yes
9921        break
9922      fi
9923    done
9924    if test -z "$haveit"; then
9925      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9926    fi
9927  done
9928
9929
9930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9931$as_echo_n "checking for libexpat... " >&6; }
9932if ${ac_cv_libexpat+:} false; then :
9933  $as_echo_n "(cached) " >&6
9934else
9935
9936    ac_save_LIBS="$LIBS"
9937    LIBS="$LIBS $LIBEXPAT"
9938    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9939/* end confdefs.h.  */
9940#include "expat.h"
9941int
9942main ()
9943{
9944XML_Parser p = XML_ParserCreate (0);
9945  ;
9946  return 0;
9947}
9948_ACEOF
9949if ac_fn_c_try_link "$LINENO"; then :
9950  ac_cv_libexpat=yes
9951else
9952  ac_cv_libexpat=no
9953fi
9954rm -f core conftest.err conftest.$ac_objext \
9955    conftest$ac_exeext conftest.$ac_ext
9956    LIBS="$ac_save_LIBS"
9957
9958fi
9959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9960$as_echo "$ac_cv_libexpat" >&6; }
9961  if test "$ac_cv_libexpat" = yes; then
9962    HAVE_LIBEXPAT=yes
9963
9964$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9965
9966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9967$as_echo_n "checking how to link with libexpat... " >&6; }
9968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9969$as_echo "$LIBEXPAT" >&6; }
9970  else
9971    HAVE_LIBEXPAT=no
9972            CPPFLAGS="$ac_save_CPPFLAGS"
9973    LIBEXPAT=
9974    LTLIBEXPAT=
9975  fi
9976
9977
9978
9979
9980
9981
9982  if test "$HAVE_LIBEXPAT" != yes; then
9983    if test "$with_expat" = yes; then
9984      as_fn_error $? "expat is missing or unusable" "$LINENO" 5
9985    else
9986      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9987$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9988    fi
9989  else
9990    save_LIBS=$LIBS
9991    LIBS="$LIBS $LIBEXPAT"
9992    for ac_func in XML_StopParser
9993do :
9994  ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9995if test "x$ac_cv_func_XML_StopParser" = xyes; then :
9996  cat >>confdefs.h <<_ACEOF
9997#define HAVE_XML_STOPPARSER 1
9998_ACEOF
9999
10000fi
10001done
10002
10003    LIBS=$save_LIBS
10004  fi
10005fi
10006
10007# Verify that we have a usable GMP library.
10008
10009
10010
10011
10012
10013
10014
10015
10016    use_additional=yes
10017
10018  acl_save_prefix="$prefix"
10019  prefix="$acl_final_prefix"
10020  acl_save_exec_prefix="$exec_prefix"
10021  exec_prefix="$acl_final_exec_prefix"
10022
10023    eval additional_includedir=\"$includedir\"
10024    eval additional_libdir=\"$libdir\"
10025
10026  exec_prefix="$acl_save_exec_prefix"
10027  prefix="$acl_save_prefix"
10028
10029
10030# Check whether --with-libgmp-prefix was given.
10031if test "${with_libgmp_prefix+set}" = set; then :
10032  withval=$with_libgmp_prefix;
10033    if test "X$withval" = "Xno"; then
10034      use_additional=no
10035    else
10036      if test "X$withval" = "X"; then
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
10043          eval additional_includedir=\"$includedir\"
10044          eval additional_libdir=\"$libdir\"
10045
10046  exec_prefix="$acl_save_exec_prefix"
10047  prefix="$acl_save_prefix"
10048
10049      else
10050        additional_includedir="$withval/include"
10051        additional_libdir="$withval/lib"
10052      fi
10053    fi
10054
10055fi
10056
10057
10058# Check whether --with-libgmp-type was given.
10059if test "${with_libgmp_type+set}" = set; then :
10060  withval=$with_libgmp_type;  with_libgmp_type=$withval
10061else
10062   with_libgmp_type=auto
10063fi
10064
10065  lib_type=`eval echo \$with_libgmp_type`
10066
10067      LIBGMP=
10068  LTLIBGMP=
10069  INCGMP=
10070  rpathdirs=
10071  ltrpathdirs=
10072  names_already_handled=
10073  names_next_round='gmp '
10074  while test -n "$names_next_round"; do
10075    names_this_round="$names_next_round"
10076    names_next_round=
10077    for name in $names_this_round; do
10078      already_handled=
10079      for n in $names_already_handled; do
10080        if test "$n" = "$name"; then
10081          already_handled=yes
10082          break
10083        fi
10084      done
10085      if test -z "$already_handled"; then
10086        names_already_handled="$names_already_handled $name"
10087                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10088        eval value=\"\$HAVE_LIB$uppername\"
10089        if test -n "$value"; then
10090          if test "$value" = yes; then
10091            eval value=\"\$LIB$uppername\"
10092            test -z "$value" || LIBGMP="${LIBGMP}${LIBGMP:+ }$value"
10093            eval value=\"\$LTLIB$uppername\"
10094            test -z "$value" || LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$value"
10095          else
10096                                    :
10097          fi
10098        else
10099                              found_dir=
10100          found_la=
10101          found_so=
10102          found_a=
10103          if test $use_additional = yes; then
10104            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10105              found_dir="$additional_libdir"
10106              found_so="$additional_libdir/lib$name.$shlibext"
10107              if test -f "$additional_libdir/lib$name.la"; then
10108                found_la="$additional_libdir/lib$name.la"
10109              fi
10110            elif test x$lib_type != xshared; then
10111              if test -f "$additional_libdir/lib$name.$libext"; then
10112                found_dir="$additional_libdir"
10113                found_a="$additional_libdir/lib$name.$libext"
10114                if test -f "$additional_libdir/lib$name.la"; then
10115                  found_la="$additional_libdir/lib$name.la"
10116                fi
10117              fi
10118            fi
10119          fi
10120          if test "X$found_dir" = "X"; then
10121            for x in $LDFLAGS $LTLIBGMP; do
10122
10123  acl_save_prefix="$prefix"
10124  prefix="$acl_final_prefix"
10125  acl_save_exec_prefix="$exec_prefix"
10126  exec_prefix="$acl_final_exec_prefix"
10127  eval x=\"$x\"
10128  exec_prefix="$acl_save_exec_prefix"
10129  prefix="$acl_save_prefix"
10130
10131              case "$x" in
10132                -L*)
10133                  dir=`echo "X$x" | sed -e 's/^X-L//'`
10134                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10135                    found_dir="$dir"
10136                    found_so="$dir/lib$name.$shlibext"
10137                    if test -f "$dir/lib$name.la"; then
10138                      found_la="$dir/lib$name.la"
10139                    fi
10140                  elif test x$lib_type != xshared; then
10141                    if test -f "$dir/lib$name.$libext"; then
10142                      found_dir="$dir"
10143                      found_a="$dir/lib$name.$libext"
10144                      if test -f "$dir/lib$name.la"; then
10145                        found_la="$dir/lib$name.la"
10146                      fi
10147                    fi
10148                  fi
10149                  ;;
10150              esac
10151              if test "X$found_dir" != "X"; then
10152                break
10153              fi
10154            done
10155          fi
10156          if test "X$found_dir" != "X"; then
10157                        LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$found_dir -l$name"
10158            if test "X$found_so" != "X"; then
10159                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10160                                LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10161              else
10162                                                                                haveit=
10163                for x in $ltrpathdirs; do
10164                  if test "X$x" = "X$found_dir"; then
10165                    haveit=yes
10166                    break
10167                  fi
10168                done
10169                if test -z "$haveit"; then
10170                  ltrpathdirs="$ltrpathdirs $found_dir"
10171                fi
10172                                if test "$hardcode_direct" = yes; then
10173                                                      LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10174                else
10175                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10176                                                            LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10177                                                            haveit=
10178                    for x in $rpathdirs; do
10179                      if test "X$x" = "X$found_dir"; then
10180                        haveit=yes
10181                        break
10182                      fi
10183                    done
10184                    if test -z "$haveit"; then
10185                      rpathdirs="$rpathdirs $found_dir"
10186                    fi
10187                  else
10188                                                                                haveit=
10189                    for x in $LDFLAGS $LIBGMP; do
10190
10191  acl_save_prefix="$prefix"
10192  prefix="$acl_final_prefix"
10193  acl_save_exec_prefix="$exec_prefix"
10194  exec_prefix="$acl_final_exec_prefix"
10195  eval x=\"$x\"
10196  exec_prefix="$acl_save_exec_prefix"
10197  prefix="$acl_save_prefix"
10198
10199                      if test "X$x" = "X-L$found_dir"; then
10200                        haveit=yes
10201                        break
10202                      fi
10203                    done
10204                    if test -z "$haveit"; then
10205                      LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir"
10206                    fi
10207                    if test "$hardcode_minus_L" != no; then
10208                                                                                        LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10209                    else
10210                                                                                                                                                                                LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10211                    fi
10212                  fi
10213                fi
10214              fi
10215            else
10216              if test "X$found_a" != "X"; then
10217                                LIBGMP="${LIBGMP}${LIBGMP:+ }$found_a"
10218              else
10219                                                LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir -l$name"
10220              fi
10221            fi
10222                        additional_includedir=
10223            case "$found_dir" in
10224              */lib | */lib/)
10225                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10226                additional_includedir="$basedir/include"
10227                ;;
10228            esac
10229            if test "X$additional_includedir" != "X"; then
10230                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
10231                haveit=
10232                if test "X$additional_includedir" = "X/usr/local/include"; then
10233                  if test -n "$GCC"; then
10234                    case $host_os in
10235                      linux*) haveit=yes;;
10236                    esac
10237                  fi
10238                fi
10239                if test -z "$haveit"; then
10240                  for x in $CPPFLAGS $INCGMP; do
10241
10242  acl_save_prefix="$prefix"
10243  prefix="$acl_final_prefix"
10244  acl_save_exec_prefix="$exec_prefix"
10245  exec_prefix="$acl_final_exec_prefix"
10246  eval x=\"$x\"
10247  exec_prefix="$acl_save_exec_prefix"
10248  prefix="$acl_save_prefix"
10249
10250                    if test "X$x" = "X-I$additional_includedir"; then
10251                      haveit=yes
10252                      break
10253                    fi
10254                  done
10255                  if test -z "$haveit"; then
10256                    if test -d "$additional_includedir"; then
10257                                            INCGMP="${INCGMP}${INCGMP:+ }-I$additional_includedir"
10258                    fi
10259                  fi
10260                fi
10261              fi
10262            fi
10263                        if test -n "$found_la"; then
10264                                                        save_libdir="$libdir"
10265              case "$found_la" in
10266                */* | *\\*) . "$found_la" ;;
10267                *) . "./$found_la" ;;
10268              esac
10269              libdir="$save_libdir"
10270                            for dep in $dependency_libs; do
10271                case "$dep" in
10272                  -L*)
10273                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10274                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
10275                      haveit=
10276                      if test "X$additional_libdir" = "X/usr/local/lib"; then
10277                        if test -n "$GCC"; then
10278                          case $host_os in
10279                            linux*) haveit=yes;;
10280                          esac
10281                        fi
10282                      fi
10283                      if test -z "$haveit"; then
10284                        haveit=
10285                        for x in $LDFLAGS $LIBGMP; do
10286
10287  acl_save_prefix="$prefix"
10288  prefix="$acl_final_prefix"
10289  acl_save_exec_prefix="$exec_prefix"
10290  exec_prefix="$acl_final_exec_prefix"
10291  eval x=\"$x\"
10292  exec_prefix="$acl_save_exec_prefix"
10293  prefix="$acl_save_prefix"
10294
10295                          if test "X$x" = "X-L$additional_libdir"; then
10296                            haveit=yes
10297                            break
10298                          fi
10299                        done
10300                        if test -z "$haveit"; then
10301                          if test -d "$additional_libdir"; then
10302                                                        LIBGMP="${LIBGMP}${LIBGMP:+ }-L$additional_libdir"
10303                          fi
10304                        fi
10305                        haveit=
10306                        for x in $LDFLAGS $LTLIBGMP; do
10307
10308  acl_save_prefix="$prefix"
10309  prefix="$acl_final_prefix"
10310  acl_save_exec_prefix="$exec_prefix"
10311  exec_prefix="$acl_final_exec_prefix"
10312  eval x=\"$x\"
10313  exec_prefix="$acl_save_exec_prefix"
10314  prefix="$acl_save_prefix"
10315
10316                          if test "X$x" = "X-L$additional_libdir"; then
10317                            haveit=yes
10318                            break
10319                          fi
10320                        done
10321                        if test -z "$haveit"; then
10322                          if test -d "$additional_libdir"; then
10323                                                        LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$additional_libdir"
10324                          fi
10325                        fi
10326                      fi
10327                    fi
10328                    ;;
10329                  -R*)
10330                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
10331                    if test "$enable_rpath" != no; then
10332                                                                  haveit=
10333                      for x in $rpathdirs; do
10334                        if test "X$x" = "X$dir"; then
10335                          haveit=yes
10336                          break
10337                        fi
10338                      done
10339                      if test -z "$haveit"; then
10340                        rpathdirs="$rpathdirs $dir"
10341                      fi
10342                                                                  haveit=
10343                      for x in $ltrpathdirs; do
10344                        if test "X$x" = "X$dir"; then
10345                          haveit=yes
10346                          break
10347                        fi
10348                      done
10349                      if test -z "$haveit"; then
10350                        ltrpathdirs="$ltrpathdirs $dir"
10351                      fi
10352                    fi
10353                    ;;
10354                  -l*)
10355                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10356                    ;;
10357                  *.la)
10358                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10359                    ;;
10360                  *)
10361                                        LIBGMP="${LIBGMP}${LIBGMP:+ }$dep"
10362                    LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$dep"
10363                    ;;
10364                esac
10365              done
10366            fi
10367          else
10368                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10369              LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10370              LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l$name"
10371            else
10372              LIBGMP="${LIBGMP}${LIBGMP:+ }-l:lib$name.$libext"
10373              LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l:lib$name.$libext"
10374            fi
10375          fi
10376        fi
10377      fi
10378    done
10379  done
10380  if test "X$rpathdirs" != "X"; then
10381    if test -n "$hardcode_libdir_separator"; then
10382                        alldirs=
10383      for found_dir in $rpathdirs; do
10384        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10385      done
10386            acl_save_libdir="$libdir"
10387      libdir="$alldirs"
10388      eval flag=\"$hardcode_libdir_flag_spec\"
10389      libdir="$acl_save_libdir"
10390      LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10391    else
10392            for found_dir in $rpathdirs; do
10393        acl_save_libdir="$libdir"
10394        libdir="$found_dir"
10395        eval flag=\"$hardcode_libdir_flag_spec\"
10396        libdir="$acl_save_libdir"
10397        LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10398      done
10399    fi
10400  fi
10401  if test "X$ltrpathdirs" != "X"; then
10402            for found_dir in $ltrpathdirs; do
10403      LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-R$found_dir"
10404    done
10405  fi
10406
10407
10408        ac_save_CPPFLAGS="$CPPFLAGS"
10409
10410  for element in $INCGMP; do
10411    haveit=
10412    for x in $CPPFLAGS; do
10413
10414  acl_save_prefix="$prefix"
10415  prefix="$acl_final_prefix"
10416  acl_save_exec_prefix="$exec_prefix"
10417  exec_prefix="$acl_final_exec_prefix"
10418  eval x=\"$x\"
10419  exec_prefix="$acl_save_exec_prefix"
10420  prefix="$acl_save_prefix"
10421
10422      if test "X$x" = "X$element"; then
10423        haveit=yes
10424        break
10425      fi
10426    done
10427    if test -z "$haveit"; then
10428      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10429    fi
10430  done
10431
10432
10433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp" >&5
10434$as_echo_n "checking for libgmp... " >&6; }
10435if ${ac_cv_libgmp+:} false; then :
10436  $as_echo_n "(cached) " >&6
10437else
10438
10439    ac_save_LIBS="$LIBS"
10440    LIBS="$LIBS $LIBGMP"
10441    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10442/* end confdefs.h.  */
10443#include <gmp.h>
10444int
10445main ()
10446{
10447mpz_t n;
10448                       mpz_init (n);
10449  ;
10450  return 0;
10451}
10452_ACEOF
10453if ac_fn_c_try_link "$LINENO"; then :
10454  ac_cv_libgmp=yes
10455else
10456  ac_cv_libgmp=no
10457fi
10458rm -f core conftest.err conftest.$ac_objext \
10459    conftest$ac_exeext conftest.$ac_ext
10460    LIBS="$ac_save_LIBS"
10461
10462fi
10463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgmp" >&5
10464$as_echo "$ac_cv_libgmp" >&6; }
10465  if test "$ac_cv_libgmp" = yes; then
10466    HAVE_LIBGMP=yes
10467
10468$as_echo "#define HAVE_LIBGMP 1" >>confdefs.h
10469
10470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgmp" >&5
10471$as_echo_n "checking how to link with libgmp... " >&6; }
10472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGMP" >&5
10473$as_echo "$LIBGMP" >&6; }
10474  else
10475    HAVE_LIBGMP=no
10476            CPPFLAGS="$ac_save_CPPFLAGS"
10477    LIBGMP=
10478    LTLIBGMP=
10479  fi
10480
10481
10482
10483
10484
10485
10486if test "$HAVE_LIBGMP" != yes; then
10487  as_fn_error $? "GMP is missing or unusable" "$LINENO" 5
10488fi
10489
10490
10491# Check whether --with-mpfr was given.
10492if test "${with_mpfr+set}" = set; then :
10493  withval=$with_mpfr;
10494else
10495  with_mpfr=auto
10496fi
10497
10498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10499$as_echo_n "checking whether to use MPFR... " >&6; }
10500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10501$as_echo "$with_mpfr" >&6; }
10502
10503if test "${with_mpfr}" = no; then
10504  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10505$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10506  HAVE_LIBMPFR=no
10507else
10508
10509
10510
10511
10512
10513
10514
10515
10516    use_additional=yes
10517
10518  acl_save_prefix="$prefix"
10519  prefix="$acl_final_prefix"
10520  acl_save_exec_prefix="$exec_prefix"
10521  exec_prefix="$acl_final_exec_prefix"
10522
10523    eval additional_includedir=\"$includedir\"
10524    eval additional_libdir=\"$libdir\"
10525
10526  exec_prefix="$acl_save_exec_prefix"
10527  prefix="$acl_save_prefix"
10528
10529
10530# Check whether --with-libmpfr-prefix was given.
10531if test "${with_libmpfr_prefix+set}" = set; then :
10532  withval=$with_libmpfr_prefix;
10533    if test "X$withval" = "Xno"; then
10534      use_additional=no
10535    else
10536      if test "X$withval" = "X"; then
10537
10538  acl_save_prefix="$prefix"
10539  prefix="$acl_final_prefix"
10540  acl_save_exec_prefix="$exec_prefix"
10541  exec_prefix="$acl_final_exec_prefix"
10542
10543          eval additional_includedir=\"$includedir\"
10544          eval additional_libdir=\"$libdir\"
10545
10546  exec_prefix="$acl_save_exec_prefix"
10547  prefix="$acl_save_prefix"
10548
10549      else
10550        additional_includedir="$withval/include"
10551        additional_libdir="$withval/lib"
10552      fi
10553    fi
10554
10555fi
10556
10557
10558# Check whether --with-libmpfr-type was given.
10559if test "${with_libmpfr_type+set}" = set; then :
10560  withval=$with_libmpfr_type;  with_libmpfr_type=$withval
10561else
10562   with_libmpfr_type=auto
10563fi
10564
10565  lib_type=`eval echo \$with_libmpfr_type`
10566
10567      LIBMPFR=
10568  LTLIBMPFR=
10569  INCMPFR=
10570  rpathdirs=
10571  ltrpathdirs=
10572  names_already_handled=
10573  names_next_round='mpfr gmp'
10574  while test -n "$names_next_round"; do
10575    names_this_round="$names_next_round"
10576    names_next_round=
10577    for name in $names_this_round; do
10578      already_handled=
10579      for n in $names_already_handled; do
10580        if test "$n" = "$name"; then
10581          already_handled=yes
10582          break
10583        fi
10584      done
10585      if test -z "$already_handled"; then
10586        names_already_handled="$names_already_handled $name"
10587                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10588        eval value=\"\$HAVE_LIB$uppername\"
10589        if test -n "$value"; then
10590          if test "$value" = yes; then
10591            eval value=\"\$LIB$uppername\"
10592            test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10593            eval value=\"\$LTLIB$uppername\"
10594            test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10595          else
10596                                    :
10597          fi
10598        else
10599                              found_dir=
10600          found_la=
10601          found_so=
10602          found_a=
10603          if test $use_additional = yes; then
10604            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10605              found_dir="$additional_libdir"
10606              found_so="$additional_libdir/lib$name.$shlibext"
10607              if test -f "$additional_libdir/lib$name.la"; then
10608                found_la="$additional_libdir/lib$name.la"
10609              fi
10610            elif test x$lib_type != xshared; then
10611              if test -f "$additional_libdir/lib$name.$libext"; then
10612                found_dir="$additional_libdir"
10613                found_a="$additional_libdir/lib$name.$libext"
10614                if test -f "$additional_libdir/lib$name.la"; then
10615                  found_la="$additional_libdir/lib$name.la"
10616                fi
10617              fi
10618            fi
10619          fi
10620          if test "X$found_dir" = "X"; then
10621            for x in $LDFLAGS $LTLIBMPFR; do
10622
10623  acl_save_prefix="$prefix"
10624  prefix="$acl_final_prefix"
10625  acl_save_exec_prefix="$exec_prefix"
10626  exec_prefix="$acl_final_exec_prefix"
10627  eval x=\"$x\"
10628  exec_prefix="$acl_save_exec_prefix"
10629  prefix="$acl_save_prefix"
10630
10631              case "$x" in
10632                -L*)
10633                  dir=`echo "X$x" | sed -e 's/^X-L//'`
10634                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10635                    found_dir="$dir"
10636                    found_so="$dir/lib$name.$shlibext"
10637                    if test -f "$dir/lib$name.la"; then
10638                      found_la="$dir/lib$name.la"
10639                    fi
10640                  elif test x$lib_type != xshared; then
10641                    if test -f "$dir/lib$name.$libext"; then
10642                      found_dir="$dir"
10643                      found_a="$dir/lib$name.$libext"
10644                      if test -f "$dir/lib$name.la"; then
10645                        found_la="$dir/lib$name.la"
10646                      fi
10647                    fi
10648                  fi
10649                  ;;
10650              esac
10651              if test "X$found_dir" != "X"; then
10652                break
10653              fi
10654            done
10655          fi
10656          if test "X$found_dir" != "X"; then
10657                        LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10658            if test "X$found_so" != "X"; then
10659                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10660                                LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10661              else
10662                                                                                haveit=
10663                for x in $ltrpathdirs; do
10664                  if test "X$x" = "X$found_dir"; then
10665                    haveit=yes
10666                    break
10667                  fi
10668                done
10669                if test -z "$haveit"; then
10670                  ltrpathdirs="$ltrpathdirs $found_dir"
10671                fi
10672                                if test "$hardcode_direct" = yes; then
10673                                                      LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10674                else
10675                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10676                                                            LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10677                                                            haveit=
10678                    for x in $rpathdirs; do
10679                      if test "X$x" = "X$found_dir"; then
10680                        haveit=yes
10681                        break
10682                      fi
10683                    done
10684                    if test -z "$haveit"; then
10685                      rpathdirs="$rpathdirs $found_dir"
10686                    fi
10687                  else
10688                                                                                haveit=
10689                    for x in $LDFLAGS $LIBMPFR; do
10690
10691  acl_save_prefix="$prefix"
10692  prefix="$acl_final_prefix"
10693  acl_save_exec_prefix="$exec_prefix"
10694  exec_prefix="$acl_final_exec_prefix"
10695  eval x=\"$x\"
10696  exec_prefix="$acl_save_exec_prefix"
10697  prefix="$acl_save_prefix"
10698
10699                      if test "X$x" = "X-L$found_dir"; then
10700                        haveit=yes
10701                        break
10702                      fi
10703                    done
10704                    if test -z "$haveit"; then
10705                      LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10706                    fi
10707                    if test "$hardcode_minus_L" != no; then
10708                                                                                        LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10709                    else
10710                                                                                                                                                                                LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10711                    fi
10712                  fi
10713                fi
10714              fi
10715            else
10716              if test "X$found_a" != "X"; then
10717                                LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10718              else
10719                                                LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10720              fi
10721            fi
10722                        additional_includedir=
10723            case "$found_dir" in
10724              */lib | */lib/)
10725                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10726                additional_includedir="$basedir/include"
10727                ;;
10728            esac
10729            if test "X$additional_includedir" != "X"; then
10730                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
10731                haveit=
10732                if test "X$additional_includedir" = "X/usr/local/include"; then
10733                  if test -n "$GCC"; then
10734                    case $host_os in
10735                      linux*) haveit=yes;;
10736                    esac
10737                  fi
10738                fi
10739                if test -z "$haveit"; then
10740                  for x in $CPPFLAGS $INCMPFR; do
10741
10742  acl_save_prefix="$prefix"
10743  prefix="$acl_final_prefix"
10744  acl_save_exec_prefix="$exec_prefix"
10745  exec_prefix="$acl_final_exec_prefix"
10746  eval x=\"$x\"
10747  exec_prefix="$acl_save_exec_prefix"
10748  prefix="$acl_save_prefix"
10749
10750                    if test "X$x" = "X-I$additional_includedir"; then
10751                      haveit=yes
10752                      break
10753                    fi
10754                  done
10755                  if test -z "$haveit"; then
10756                    if test -d "$additional_includedir"; then
10757                                            INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10758                    fi
10759                  fi
10760                fi
10761              fi
10762            fi
10763                        if test -n "$found_la"; then
10764                                                        save_libdir="$libdir"
10765              case "$found_la" in
10766                */* | *\\*) . "$found_la" ;;
10767                *) . "./$found_la" ;;
10768              esac
10769              libdir="$save_libdir"
10770                            for dep in $dependency_libs; do
10771                case "$dep" in
10772                  -L*)
10773                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10774                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
10775                      haveit=
10776                      if test "X$additional_libdir" = "X/usr/local/lib"; then
10777                        if test -n "$GCC"; then
10778                          case $host_os in
10779                            linux*) haveit=yes;;
10780                          esac
10781                        fi
10782                      fi
10783                      if test -z "$haveit"; then
10784                        haveit=
10785                        for x in $LDFLAGS $LIBMPFR; do
10786
10787  acl_save_prefix="$prefix"
10788  prefix="$acl_final_prefix"
10789  acl_save_exec_prefix="$exec_prefix"
10790  exec_prefix="$acl_final_exec_prefix"
10791  eval x=\"$x\"
10792  exec_prefix="$acl_save_exec_prefix"
10793  prefix="$acl_save_prefix"
10794
10795                          if test "X$x" = "X-L$additional_libdir"; then
10796                            haveit=yes
10797                            break
10798                          fi
10799                        done
10800                        if test -z "$haveit"; then
10801                          if test -d "$additional_libdir"; then
10802                                                        LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10803                          fi
10804                        fi
10805                        haveit=
10806                        for x in $LDFLAGS $LTLIBMPFR; do
10807
10808  acl_save_prefix="$prefix"
10809  prefix="$acl_final_prefix"
10810  acl_save_exec_prefix="$exec_prefix"
10811  exec_prefix="$acl_final_exec_prefix"
10812  eval x=\"$x\"
10813  exec_prefix="$acl_save_exec_prefix"
10814  prefix="$acl_save_prefix"
10815
10816                          if test "X$x" = "X-L$additional_libdir"; then
10817                            haveit=yes
10818                            break
10819                          fi
10820                        done
10821                        if test -z "$haveit"; then
10822                          if test -d "$additional_libdir"; then
10823                                                        LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10824                          fi
10825                        fi
10826                      fi
10827                    fi
10828                    ;;
10829                  -R*)
10830                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
10831                    if test "$enable_rpath" != no; then
10832                                                                  haveit=
10833                      for x in $rpathdirs; do
10834                        if test "X$x" = "X$dir"; then
10835                          haveit=yes
10836                          break
10837                        fi
10838                      done
10839                      if test -z "$haveit"; then
10840                        rpathdirs="$rpathdirs $dir"
10841                      fi
10842                                                                  haveit=
10843                      for x in $ltrpathdirs; do
10844                        if test "X$x" = "X$dir"; then
10845                          haveit=yes
10846                          break
10847                        fi
10848                      done
10849                      if test -z "$haveit"; then
10850                        ltrpathdirs="$ltrpathdirs $dir"
10851                      fi
10852                    fi
10853                    ;;
10854                  -l*)
10855                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10856                    ;;
10857                  *.la)
10858                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10859                    ;;
10860                  *)
10861                                        LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10862                    LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10863                    ;;
10864                esac
10865              done
10866            fi
10867          else
10868                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10869              LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10870              LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10871            else
10872              LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10873              LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10874            fi
10875          fi
10876        fi
10877      fi
10878    done
10879  done
10880  if test "X$rpathdirs" != "X"; then
10881    if test -n "$hardcode_libdir_separator"; then
10882                        alldirs=
10883      for found_dir in $rpathdirs; do
10884        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10885      done
10886            acl_save_libdir="$libdir"
10887      libdir="$alldirs"
10888      eval flag=\"$hardcode_libdir_flag_spec\"
10889      libdir="$acl_save_libdir"
10890      LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10891    else
10892            for found_dir in $rpathdirs; do
10893        acl_save_libdir="$libdir"
10894        libdir="$found_dir"
10895        eval flag=\"$hardcode_libdir_flag_spec\"
10896        libdir="$acl_save_libdir"
10897        LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10898      done
10899    fi
10900  fi
10901  if test "X$ltrpathdirs" != "X"; then
10902            for found_dir in $ltrpathdirs; do
10903      LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10904    done
10905  fi
10906
10907
10908        ac_save_CPPFLAGS="$CPPFLAGS"
10909
10910  for element in $INCMPFR; do
10911    haveit=
10912    for x in $CPPFLAGS; do
10913
10914  acl_save_prefix="$prefix"
10915  prefix="$acl_final_prefix"
10916  acl_save_exec_prefix="$exec_prefix"
10917  exec_prefix="$acl_final_exec_prefix"
10918  eval x=\"$x\"
10919  exec_prefix="$acl_save_exec_prefix"
10920  prefix="$acl_save_prefix"
10921
10922      if test "X$x" = "X$element"; then
10923        haveit=yes
10924        break
10925      fi
10926    done
10927    if test -z "$haveit"; then
10928      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10929    fi
10930  done
10931
10932
10933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10934$as_echo_n "checking for libmpfr... " >&6; }
10935if ${ac_cv_libmpfr+:} false; then :
10936  $as_echo_n "(cached) " >&6
10937else
10938
10939    ac_save_LIBS="$LIBS"
10940    LIBS="$LIBS $LIBMPFR"
10941    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10942/* end confdefs.h.  */
10943#include <mpfr.h>
10944int
10945main ()
10946{
10947mpfr_exp_t exp; mpfr_t x;
10948			 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10949  ;
10950  return 0;
10951}
10952_ACEOF
10953if ac_fn_c_try_link "$LINENO"; then :
10954  ac_cv_libmpfr=yes
10955else
10956  ac_cv_libmpfr=no
10957fi
10958rm -f core conftest.err conftest.$ac_objext \
10959    conftest$ac_exeext conftest.$ac_ext
10960    LIBS="$ac_save_LIBS"
10961
10962fi
10963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10964$as_echo "$ac_cv_libmpfr" >&6; }
10965  if test "$ac_cv_libmpfr" = yes; then
10966    HAVE_LIBMPFR=yes
10967
10968$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10969
10970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10971$as_echo_n "checking how to link with libmpfr... " >&6; }
10972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10973$as_echo "$LIBMPFR" >&6; }
10974  else
10975    HAVE_LIBMPFR=no
10976            CPPFLAGS="$ac_save_CPPFLAGS"
10977    LIBMPFR=
10978    LTLIBMPFR=
10979  fi
10980
10981
10982
10983
10984
10985
10986  if test "$HAVE_LIBMPFR" != yes; then
10987    if test "$with_mpfr" = yes; then
10988      as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10989    else
10990      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10991$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10992    fi
10993  fi
10994fi
10995
10996# --------------------- #
10997# Check for libpython.  #
10998# --------------------- #
10999
11000
11001
11002
11003
11004
11005# Check whether --with-python was given.
11006if test "${with_python+set}" = set; then :
11007  withval=$with_python;
11008else
11009  with_python=auto
11010fi
11011
11012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
11013$as_echo_n "checking whether to use python... " >&6; }
11014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
11015$as_echo "$with_python" >&6; }
11016
11017if test "${with_python}" = no; then
11018  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
11019$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11020  have_libpython=no
11021else
11022  case "${with_python}" in
11023  [\\/]* | ?:[\\/]*)
11024    if test -d "${with_python}"; then
11025      # Assume the python binary is ${with_python}/bin/python.
11026      python_prog="${with_python}/bin/python"
11027      python_prefix=
11028      # If python does not exit ${with_python}/bin, then try in
11029      # ${with_python}.  On Windows/MinGW, this is where the Python
11030      # executable is.
11031      if test ! -x "${python_prog}"; then
11032        python_prog="${with_python}/python"
11033        python_prefix=
11034      fi
11035      if test ! -x "${python_prog}"; then
11036        # Fall back to gdb 7.0/7.1 behaviour.
11037        python_prog=missing
11038        python_prefix=${with_python}
11039      fi
11040    elif test -x "${with_python}"; then
11041      # While we can't run python compiled for $host (unless host == build),
11042      # the user could write a script that provides the needed information,
11043      # so we support that.
11044      python_prog=${with_python}
11045      python_prefix=
11046    else
11047      as_fn_error $? "invalid value for --with-python" "$LINENO" 5
11048    fi
11049    ;;
11050  */*)
11051    # Disallow --with-python=foo/bar.
11052    as_fn_error $? "invalid value for --with-python" "$LINENO" 5
11053    ;;
11054  *)
11055    # The user has either specified auto, yes, or the name of the python
11056    # program assumed to be in $PATH.
11057    python_prefix=
11058    case "${with_python}" in
11059    yes | auto)
11060      if test "${build}" = "${host}"; then
11061        # Extract the first word of "python", so it can be a program name with args.
11062set dummy python; ac_word=$2
11063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11064$as_echo_n "checking for $ac_word... " >&6; }
11065if ${ac_cv_path_python_prog_path+:} false; then :
11066  $as_echo_n "(cached) " >&6
11067else
11068  case $python_prog_path in
11069  [\\/]* | ?:[\\/]*)
11070  ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11071  ;;
11072  *)
11073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11074for as_dir in $PATH
11075do
11076  IFS=$as_save_IFS
11077  test -z "$as_dir" && as_dir=.
11078    for ac_exec_ext in '' $ac_executable_extensions; do
11079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11080    ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11082    break 2
11083  fi
11084done
11085  done
11086IFS=$as_save_IFS
11087
11088  test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11089  ;;
11090esac
11091fi
11092python_prog_path=$ac_cv_path_python_prog_path
11093if test -n "$python_prog_path"; then
11094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11095$as_echo "$python_prog_path" >&6; }
11096else
11097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11098$as_echo "no" >&6; }
11099fi
11100
11101
11102        if test "${python_prog_path}" = missing; then
11103          python_prog=missing
11104        else
11105          python_prog=${python_prog_path}
11106        fi
11107      else
11108        # Not much we can do except assume the cross-compiler will find the
11109        # right files.
11110        python_prog=missing
11111      fi
11112      ;;
11113    *)
11114      # While we can't run python compiled for $host (unless host == build),
11115      # the user could write a script that provides the needed information,
11116      # so we support that.
11117      python_prog="${with_python}"
11118      # Extract the first word of "${python_prog}", so it can be a program name with args.
11119set dummy ${python_prog}; ac_word=$2
11120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11121$as_echo_n "checking for $ac_word... " >&6; }
11122if ${ac_cv_path_python_prog_path+:} false; then :
11123  $as_echo_n "(cached) " >&6
11124else
11125  case $python_prog_path in
11126  [\\/]* | ?:[\\/]*)
11127  ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11128  ;;
11129  *)
11130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11131for as_dir in $PATH
11132do
11133  IFS=$as_save_IFS
11134  test -z "$as_dir" && as_dir=.
11135    for ac_exec_ext in '' $ac_executable_extensions; do
11136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11137    ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11139    break 2
11140  fi
11141done
11142  done
11143IFS=$as_save_IFS
11144
11145  test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11146  ;;
11147esac
11148fi
11149python_prog_path=$ac_cv_path_python_prog_path
11150if test -n "$python_prog_path"; then
11151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11152$as_echo "$python_prog_path" >&6; }
11153else
11154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11155$as_echo "no" >&6; }
11156fi
11157
11158
11159      if test "${python_prog_path}" = missing; then
11160	as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
11161      fi
11162      ;;
11163    esac
11164  esac
11165
11166  if test "${python_prog}" != missing; then
11167    # We have a python program to use, but it may be too old.
11168    # Don't flag an error for --with-python=auto (the default).
11169    have_python_config=yes
11170    python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
11171    if test $? != 0; then
11172      have_python_config=failed
11173      if test "${with_python}" != auto; then
11174	as_fn_error $? "failure running python-config --includes" "$LINENO" 5
11175      fi
11176    fi
11177    python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
11178    if test $? != 0; then
11179      have_python_config=failed
11180      if test "${with_python}" != auto; then
11181	as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
11182      fi
11183    fi
11184    python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
11185    if test $? != 0; then
11186      have_python_config=failed
11187      if test "${with_python}" != auto; then
11188	as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
11189      fi
11190    fi
11191  else
11192    # We do not have a python executable we can use to determine where
11193    # to find the Python headers and libs.  We cannot guess the include
11194    # path from the python_prefix either, because that include path
11195    # depends on the Python version.  So, there is nothing much we can
11196    # do except assume that the compiler will be able to find those files.
11197    python_includes=
11198    python_libs=
11199    have_python_config=no
11200  fi
11201
11202  # If we have python-config, only try the configuration it provides.
11203  # Otherwise fallback on the old way of trying different versions of
11204  # python in turn.
11205
11206  have_libpython=no
11207  if test "${have_python_config}" = yes; then
11208
11209
11210  new_CPPFLAGS=${python_includes}
11211  new_LIBS=${python_libs}
11212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11213$as_echo_n "checking for python... " >&6; }
11214  save_CPPFLAGS=$CPPFLAGS
11215  save_LIBS=$LIBS
11216  CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11217  LIBS="$new_LIBS $LIBS"
11218  found_usable_python=no
11219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11220/* end confdefs.h.  */
11221#include "Python.h"
11222int
11223main ()
11224{
11225Py_Initialize ();
11226  ;
11227  return 0;
11228}
11229_ACEOF
11230if ac_fn_c_try_link "$LINENO"; then :
11231  have_libpython=yes
11232                  found_usable_python=yes
11233                  PYTHON_CPPFLAGS=$new_CPPFLAGS
11234                  PYTHON_LIBS=$new_LIBS
11235fi
11236rm -f core conftest.err conftest.$ac_objext \
11237    conftest$ac_exeext conftest.$ac_ext
11238  CPPFLAGS=$save_CPPFLAGS
11239  LIBS=$save_LIBS
11240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11241$as_echo "${found_usable_python}" >&6; }
11242
11243  elif test "${have_python_config}" != failed; then
11244    if test "${have_libpython}" = no; then
11245
11246
11247  new_CPPFLAGS=${python_includes}
11248  new_LIBS="-lpython2.7 ${python_libs}"
11249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11250$as_echo_n "checking for python... " >&6; }
11251  save_CPPFLAGS=$CPPFLAGS
11252  save_LIBS=$LIBS
11253  CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11254  LIBS="$new_LIBS $LIBS"
11255  found_usable_python=no
11256  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11257/* end confdefs.h.  */
11258#include "Python.h"
11259int
11260main ()
11261{
11262Py_Initialize ();
11263  ;
11264  return 0;
11265}
11266_ACEOF
11267if ac_fn_c_try_link "$LINENO"; then :
11268  have_libpython=yes
11269                  found_usable_python=yes
11270                  PYTHON_CPPFLAGS=$new_CPPFLAGS
11271                  PYTHON_LIBS=$new_LIBS
11272fi
11273rm -f core conftest.err conftest.$ac_objext \
11274    conftest$ac_exeext conftest.$ac_ext
11275  CPPFLAGS=$save_CPPFLAGS
11276  LIBS=$save_LIBS
11277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11278$as_echo "${found_usable_python}" >&6; }
11279
11280    fi
11281    if test "${have_libpython}" = no; then
11282
11283
11284  new_CPPFLAGS=${python_includes}
11285  new_LIBS="-lpython2.6 ${python_libs}"
11286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11287$as_echo_n "checking for python... " >&6; }
11288  save_CPPFLAGS=$CPPFLAGS
11289  save_LIBS=$LIBS
11290  CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11291  LIBS="$new_LIBS $LIBS"
11292  found_usable_python=no
11293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11294/* end confdefs.h.  */
11295#include "Python.h"
11296int
11297main ()
11298{
11299Py_Initialize ();
11300  ;
11301  return 0;
11302}
11303_ACEOF
11304if ac_fn_c_try_link "$LINENO"; then :
11305  have_libpython=yes
11306                  found_usable_python=yes
11307                  PYTHON_CPPFLAGS=$new_CPPFLAGS
11308                  PYTHON_LIBS=$new_LIBS
11309fi
11310rm -f core conftest.err conftest.$ac_objext \
11311    conftest$ac_exeext conftest.$ac_ext
11312  CPPFLAGS=$save_CPPFLAGS
11313  LIBS=$save_LIBS
11314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11315$as_echo "${found_usable_python}" >&6; }
11316
11317    fi
11318  fi
11319
11320  if test "${have_libpython}" = no; then
11321    case "${with_python}" in
11322    yes)
11323      as_fn_error $? "python is missing or unusable" "$LINENO" 5
11324      ;;
11325    auto)
11326      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11327$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11328      ;;
11329    *)
11330      as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
11331      ;;
11332    esac
11333  else
11334    if test -n "${python_prefix}"; then
11335
11336cat >>confdefs.h <<_ACEOF
11337#define WITH_PYTHON_PATH "${python_prefix}"
11338_ACEOF
11339
11340
11341  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11342     if test "x$prefix" = xNONE; then
11343     	test_prefix=/usr/local
11344     else
11345	test_prefix=$prefix
11346     fi
11347  else
11348     test_prefix=$exec_prefix
11349  fi
11350  value=0
11351  case ${python_prefix} in
11352     "${test_prefix}"|"${test_prefix}/"*|\
11353	'${exec_prefix}'|'${exec_prefix}/'*)
11354     value=1
11355     ;;
11356  esac
11357
11358cat >>confdefs.h <<_ACEOF
11359#define PYTHON_PATH_RELOCATABLE $value
11360_ACEOF
11361
11362
11363    fi
11364  fi
11365fi
11366
11367
11368# Check whether --with-python-libdir was given.
11369if test "${with_python_libdir+set}" = set; then :
11370  withval=$with_python_libdir;
11371else
11372
11373    # If no python libdir is specified then select one based on
11374    # python's prefix path.
11375    if test -n "${python_prefix}"; then
11376      with_python_libdir=${python_prefix}/lib
11377    fi
11378
11379fi
11380
11381
11382if test "${have_libpython}" != no; then
11383
11384$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
11385
11386  CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11387  CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11388  CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11389  CONFIG_INSTALL="$CONFIG_INSTALL install-python"
11390  ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11391
11392  if test -n "${with_python_libdir}"; then
11393
11394cat >>confdefs.h <<_ACEOF
11395#define WITH_PYTHON_LIBDIR "${with_python_libdir}"
11396_ACEOF
11397
11398
11399  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11400     if test "x$prefix" = xNONE; then
11401     	test_prefix=/usr/local
11402     else
11403	test_prefix=$prefix
11404     fi
11405  else
11406     test_prefix=$exec_prefix
11407  fi
11408  value=0
11409  case ${with_python_libdir} in
11410     "${test_prefix}"|"${test_prefix}/"*|\
11411	'${exec_prefix}'|'${exec_prefix}/'*)
11412     value=1
11413     ;;
11414  esac
11415
11416cat >>confdefs.h <<_ACEOF
11417#define PYTHON_LIBDIR_RELOCATABLE $value
11418_ACEOF
11419
11420
11421  fi
11422
11423  # Flags needed to compile Python code (taken from python-config --cflags).
11424  # We cannot call python-config directly because it will output whatever was
11425  # used when compiling the Python interpreter itself, including flags which
11426  # would make the python-related objects be compiled differently from the
11427  # rest of GDB (e.g., -O2 and -fPIC).
11428  if test "${GCC}" = yes; then
11429    tentative_python_cflags="-fno-strict-aliasing -fwrapv"
11430    # Python headers recommend -DNDEBUG, but it's unclear if that just
11431    # refers to building Python itself.  In release mode, though, it
11432    # doesn't hurt for the Python code in gdb to follow.
11433    $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
11434  fi
11435
11436  if test "x${tentative_python_cflags}" != x; then
11437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11438$as_echo_n "checking compiler flags for python code... " >&6; }
11439    for flag in ${tentative_python_cflags}; do
11440      # Check that the compiler accepts it
11441      saved_CFLAGS="$CFLAGS"
11442      CFLAGS="$CFLAGS $flag"
11443      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11444/* end confdefs.h.  */
11445
11446int
11447main ()
11448{
11449
11450  ;
11451  return 0;
11452}
11453_ACEOF
11454if ac_fn_c_try_compile "$LINENO"; then :
11455  PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11456fi
11457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11458      CFLAGS="$saved_CFLAGS"
11459    done
11460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11461$as_echo "${PYTHON_CFLAGS}" >&6; }
11462  fi
11463
11464  # On x64 Windows, Python's include headers, and pyconfig.h in
11465  # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11466  # version of Windows.  Unfortunately, MS_WIN64 is only defined if
11467  # _MSC_VER, a Microsoft-specific macro, is defined.  So, when
11468  # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11469  # The issue was reported to the Python community, but still isn't
11470  # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11471
11472  case "$gdb_host" in
11473    mingw64)
11474           if test "${GCC}" = yes; then
11475             CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11476           fi
11477           ;;
11478  esac
11479else
11480  # Even if Python support is not compiled in, we need to have this file
11481  # included so that the "python" command, et.al., still exists.
11482  CONFIG_OBS="$CONFIG_OBS python/python.o"
11483  CONFIG_SRCS="$CONFIG_SRCS python/python.c"
11484fi
11485
11486# Work around Python http://bugs.python.org/issue10112.  See also
11487# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11488# no effect.  Note that the only test after this that uses Python is
11489# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11490# run without -export-dynamic too.
11491PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11492
11493
11494
11495
11496 if test "${have_libpython}" != no; then
11497  HAVE_PYTHON_TRUE=
11498  HAVE_PYTHON_FALSE='#'
11499else
11500  HAVE_PYTHON_TRUE='#'
11501  HAVE_PYTHON_FALSE=
11502fi
11503
11504
11505# -------------------- #
11506# Check for libguile.  #
11507# -------------------- #
11508
11509
11510
11511
11512
11513
11514# Check whether --with-guile was given.
11515if test "${with_guile+set}" = set; then :
11516  withval=$with_guile;
11517else
11518  with_guile=auto
11519fi
11520
11521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11522$as_echo_n "checking whether to use guile... " >&6; }
11523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11524$as_echo "$with_guile" >&6; }
11525
11526# Extract the first word of "pkg-config", so it can be a program name with args.
11527set dummy pkg-config; ac_word=$2
11528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11529$as_echo_n "checking for $ac_word... " >&6; }
11530if ${ac_cv_path_pkg_config_prog_path+:} false; then :
11531  $as_echo_n "(cached) " >&6
11532else
11533  case $pkg_config_prog_path in
11534  [\\/]* | ?:[\\/]*)
11535  ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11536  ;;
11537  *)
11538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11539for as_dir in $PATH
11540do
11541  IFS=$as_save_IFS
11542  test -z "$as_dir" && as_dir=.
11543    for ac_exec_ext in '' $ac_executable_extensions; do
11544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11545    ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11547    break 2
11548  fi
11549done
11550  done
11551IFS=$as_save_IFS
11552
11553  test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11554  ;;
11555esac
11556fi
11557pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11558if test -n "$pkg_config_prog_path"; then
11559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11560$as_echo "$pkg_config_prog_path" >&6; }
11561else
11562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11563$as_echo "no" >&6; }
11564fi
11565
11566
11567
11568try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
11569have_libguile=no
11570case "${with_guile}" in
11571no)
11572  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11573$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11574  ;;
11575auto)
11576  if test "${pkg_config_prog_path}" = "missing"; then
11577    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11578$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11579  else
11580
11581  pkg_config=${pkg_config_prog_path}
11582  guile_version_list=${try_guile_versions}
11583  flag_errors=no
11584
11585  found_usable_guile=checking
11586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11587$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11588  for guile_version in ${guile_version_list}; do
11589    ${pkg_config} --exists ${guile_version} 2>/dev/null
11590    if test $? != 0; then
11591      continue
11592    fi
11593            new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11594    if test $? != 0; then
11595      as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11596    fi
11597    new_LIBS=`${pkg_config} --libs ${guile_version}`
11598    if test $? != 0; then
11599      as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11600    fi
11601        found_usable_guile=${guile_version}
11602    break
11603  done
11604  if test "${found_usable_guile}" = "checking"; then
11605    if test "${flag_errors}" = "yes"; then
11606      as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11607    else
11608      found_usable_guile=no
11609    fi
11610  fi
11611      if test "${found_usable_guile}" != no; then
11612    save_CPPFLAGS=$CPPFLAGS
11613    save_LIBS=$LIBS
11614    CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11615    LIBS="$LIBS $new_LIBS"
11616    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11617/* end confdefs.h.  */
11618#include "libguile.h"
11619int
11620main ()
11621{
11622scm_init_guile ();
11623  ;
11624  return 0;
11625}
11626_ACEOF
11627if ac_fn_c_try_link "$LINENO"; then :
11628  have_libguile=yes
11629                    GUILE_CPPFLAGS=$new_CPPFLAGS
11630                    GUILE_LIBS=$new_LIBS
11631else
11632  found_usable_guile=no
11633fi
11634rm -f core conftest.err conftest.$ac_objext \
11635    conftest$ac_exeext conftest.$ac_ext
11636        ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11637if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11638
11639$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11640
11641
11642fi
11643
11644    CPPFLAGS=$save_CPPFLAGS
11645    LIBS=$save_LIBS
11646    if test "${found_usable_guile}" = no; then
11647      if test "${flag_errors}" = yes; then
11648        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11649$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11650as_fn_error $? "linking guile version ${guile_version} test program failed
11651See \`config.log' for more details" "$LINENO" 5; }
11652      fi
11653    fi
11654  fi
11655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11656$as_echo "${found_usable_guile}" >&6; }
11657
11658  fi
11659  ;;
11660yes)
11661  if test "${pkg_config_prog_path}" = "missing"; then
11662    as_fn_error $? "pkg-config not found" "$LINENO" 5
11663  fi
11664
11665  pkg_config=${pkg_config_prog_path}
11666  guile_version_list=${try_guile_versions}
11667  flag_errors=yes
11668
11669  found_usable_guile=checking
11670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11671$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11672  for guile_version in ${guile_version_list}; do
11673    ${pkg_config} --exists ${guile_version} 2>/dev/null
11674    if test $? != 0; then
11675      continue
11676    fi
11677            new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11678    if test $? != 0; then
11679      as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11680    fi
11681    new_LIBS=`${pkg_config} --libs ${guile_version}`
11682    if test $? != 0; then
11683      as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11684    fi
11685        found_usable_guile=${guile_version}
11686    break
11687  done
11688  if test "${found_usable_guile}" = "checking"; then
11689    if test "${flag_errors}" = "yes"; then
11690      as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11691    else
11692      found_usable_guile=no
11693    fi
11694  fi
11695      if test "${found_usable_guile}" != no; then
11696    save_CPPFLAGS=$CPPFLAGS
11697    save_LIBS=$LIBS
11698    CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11699    LIBS="$LIBS $new_LIBS"
11700    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11701/* end confdefs.h.  */
11702#include "libguile.h"
11703int
11704main ()
11705{
11706scm_init_guile ();
11707  ;
11708  return 0;
11709}
11710_ACEOF
11711if ac_fn_c_try_link "$LINENO"; then :
11712  have_libguile=yes
11713                    GUILE_CPPFLAGS=$new_CPPFLAGS
11714                    GUILE_LIBS=$new_LIBS
11715else
11716  found_usable_guile=no
11717fi
11718rm -f core conftest.err conftest.$ac_objext \
11719    conftest$ac_exeext conftest.$ac_ext
11720        ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11721if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11722
11723$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11724
11725
11726fi
11727
11728    CPPFLAGS=$save_CPPFLAGS
11729    LIBS=$save_LIBS
11730    if test "${found_usable_guile}" = no; then
11731      if test "${flag_errors}" = yes; then
11732        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11734as_fn_error $? "linking guile version ${guile_version} test program failed
11735See \`config.log' for more details" "$LINENO" 5; }
11736      fi
11737    fi
11738  fi
11739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11740$as_echo "${found_usable_guile}" >&6; }
11741
11742  ;;
11743[\\/]* | ?:[\\/]*)
11744  if test -x "${with_guile}"; then
11745
11746  pkg_config=${with_guile}
11747  guile_version_list=${try_guile_versions}
11748  flag_errors=yes
11749
11750  found_usable_guile=checking
11751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11752$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11753  for guile_version in ${guile_version_list}; do
11754    ${pkg_config} --exists ${guile_version} 2>/dev/null
11755    if test $? != 0; then
11756      continue
11757    fi
11758            new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11759    if test $? != 0; then
11760      as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11761    fi
11762    new_LIBS=`${pkg_config} --libs ${guile_version}`
11763    if test $? != 0; then
11764      as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11765    fi
11766        found_usable_guile=${guile_version}
11767    break
11768  done
11769  if test "${found_usable_guile}" = "checking"; then
11770    if test "${flag_errors}" = "yes"; then
11771      as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11772    else
11773      found_usable_guile=no
11774    fi
11775  fi
11776      if test "${found_usable_guile}" != no; then
11777    save_CPPFLAGS=$CPPFLAGS
11778    save_LIBS=$LIBS
11779    CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11780    LIBS="$LIBS $new_LIBS"
11781    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11782/* end confdefs.h.  */
11783#include "libguile.h"
11784int
11785main ()
11786{
11787scm_init_guile ();
11788  ;
11789  return 0;
11790}
11791_ACEOF
11792if ac_fn_c_try_link "$LINENO"; then :
11793  have_libguile=yes
11794                    GUILE_CPPFLAGS=$new_CPPFLAGS
11795                    GUILE_LIBS=$new_LIBS
11796else
11797  found_usable_guile=no
11798fi
11799rm -f core conftest.err conftest.$ac_objext \
11800    conftest$ac_exeext conftest.$ac_ext
11801        ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11802if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11803
11804$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11805
11806
11807fi
11808
11809    CPPFLAGS=$save_CPPFLAGS
11810    LIBS=$save_LIBS
11811    if test "${found_usable_guile}" = no; then
11812      if test "${flag_errors}" = yes; then
11813        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11814$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11815as_fn_error $? "linking guile version ${guile_version} test program failed
11816See \`config.log' for more details" "$LINENO" 5; }
11817      fi
11818    fi
11819  fi
11820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11821$as_echo "${found_usable_guile}" >&6; }
11822
11823  else
11824    as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11825  fi
11826  ;;
11827"" | */*)
11828  # Disallow --with=guile="" and --with-guile=foo/bar.
11829  as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11830  ;;
11831*)
11832  # A space separate list of guile versions to try, in order.
11833  if test "${pkg_config_prog_path}" = "missing"; then
11834    as_fn_error $? "pkg-config not found" "$LINENO" 5
11835  fi
11836
11837  pkg_config=${pkg_config_prog_path}
11838  guile_version_list=${with_guile}
11839  flag_errors=yes
11840
11841  found_usable_guile=checking
11842  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11843$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11844  for guile_version in ${guile_version_list}; do
11845    ${pkg_config} --exists ${guile_version} 2>/dev/null
11846    if test $? != 0; then
11847      continue
11848    fi
11849            new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11850    if test $? != 0; then
11851      as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11852    fi
11853    new_LIBS=`${pkg_config} --libs ${guile_version}`
11854    if test $? != 0; then
11855      as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11856    fi
11857        found_usable_guile=${guile_version}
11858    break
11859  done
11860  if test "${found_usable_guile}" = "checking"; then
11861    if test "${flag_errors}" = "yes"; then
11862      as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11863    else
11864      found_usable_guile=no
11865    fi
11866  fi
11867      if test "${found_usable_guile}" != no; then
11868    save_CPPFLAGS=$CPPFLAGS
11869    save_LIBS=$LIBS
11870    CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11871    LIBS="$LIBS $new_LIBS"
11872    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11873/* end confdefs.h.  */
11874#include "libguile.h"
11875int
11876main ()
11877{
11878scm_init_guile ();
11879  ;
11880  return 0;
11881}
11882_ACEOF
11883if ac_fn_c_try_link "$LINENO"; then :
11884  have_libguile=yes
11885                    GUILE_CPPFLAGS=$new_CPPFLAGS
11886                    GUILE_LIBS=$new_LIBS
11887else
11888  found_usable_guile=no
11889fi
11890rm -f core conftest.err conftest.$ac_objext \
11891    conftest$ac_exeext conftest.$ac_ext
11892        ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11893if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11894
11895$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11896
11897
11898fi
11899
11900    CPPFLAGS=$save_CPPFLAGS
11901    LIBS=$save_LIBS
11902    if test "${found_usable_guile}" = no; then
11903      if test "${flag_errors}" = yes; then
11904        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11906as_fn_error $? "linking guile version ${guile_version} test program failed
11907See \`config.log' for more details" "$LINENO" 5; }
11908      fi
11909    fi
11910  fi
11911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11912$as_echo "${found_usable_guile}" >&6; }
11913
11914  ;;
11915esac
11916
11917if test "${have_libguile}" != no; then
11918    case "${with_guile}" in
11919  [\\/]* | ?:[\\/]*)
11920
11921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11922$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11923if ${ac_cv_guild_program_name+:} false; then :
11924  $as_echo_n "(cached) " >&6
11925else
11926  ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11927
11928     # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11929     # the 'guild' and 'bindir' variables.  In that case, try to guess
11930     # what the program name is, at the risk of getting it wrong if
11931     # Guile was configured with '--program-suffix' or similar.
11932     if test "x$ac_cv_guild_program_name" = "x"; then
11933       guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11934       ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11935     fi
11936
11937fi
11938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11939$as_echo "$ac_cv_guild_program_name" >&6; }
11940
11941  if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11942    as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11943  fi
11944
11945  GUILD="$ac_cv_guild_program_name"
11946
11947
11948    ;;
11949  *)
11950
11951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11952$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11953if ${ac_cv_guild_program_name+:} false; then :
11954  $as_echo_n "(cached) " >&6
11955else
11956  ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11957
11958     # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11959     # the 'guild' and 'bindir' variables.  In that case, try to guess
11960     # what the program name is, at the risk of getting it wrong if
11961     # Guile was configured with '--program-suffix' or similar.
11962     if test "x$ac_cv_guild_program_name" = "x"; then
11963       guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11964       ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11965     fi
11966
11967fi
11968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11969$as_echo "$ac_cv_guild_program_name" >&6; }
11970
11971  if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11972    as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11973  fi
11974
11975  GUILD="$ac_cv_guild_program_name"
11976
11977
11978    ;;
11979  esac
11980
11981
11982  if test "$cross_compiling" = no; then
11983    GUILD_TARGET_FLAG=
11984  else
11985    GUILD_TARGET_FLAG="--target=$host"
11986  fi
11987
11988
11989
11990
11991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11992$as_echo_n "checking whether guild supports this host... " >&6; }
11993if ${ac_cv_guild_ok+:} false; then :
11994  $as_echo_n "(cached) " >&6
11995else
11996  echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11997     if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11998       ac_cv_guild_ok=yes
11999     else
12000       ac_cv_guild_ok=no
12001     fi
12002fi
12003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
12004$as_echo "$ac_cv_guild_ok" >&6; }
12005
12006    if test "$ac_cv_guild_ok" = no; then
12007    have_libguile=no
12008    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
12009$as_echo "$as_me: WARNING: disabling guile support" >&2;}
12010  fi
12011fi
12012
12013if test "${have_libguile}" != no; then
12014
12015$as_echo "#define HAVE_GUILE 1" >>confdefs.h
12016
12017  CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
12018  CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
12019  CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
12020  CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
12021  ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
12022
12023    save_LIBS="$LIBS"
12024  save_CPPFLAGS="$CPPFLAGS"
12025  LIBS="$GUILE_LIBS"
12026  CPPFLAGS="$GUILE_CPPFLAGS"
12027  for ac_func in scm_new_smob
12028do :
12029  ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
12030if test "x$ac_cv_func_scm_new_smob" = xyes; then :
12031  cat >>confdefs.h <<_ACEOF
12032#define HAVE_SCM_NEW_SMOB 1
12033_ACEOF
12034
12035fi
12036done
12037
12038  LIBS="$save_LIBS"
12039  CPPFLAGS="$save_CPPFLAGS"
12040else
12041  # Even if Guile support is not compiled in, we need to have these files
12042  # included.
12043  CONFIG_OBS="$CONFIG_OBS guile/guile.o"
12044  CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
12045fi
12046
12047
12048 if test "${have_libguile}" != no; then
12049  HAVE_GUILE_TRUE=
12050  HAVE_GUILE_FALSE='#'
12051else
12052  HAVE_GUILE_TRUE='#'
12053  HAVE_GUILE_FALSE=
12054fi
12055
12056
12057# ---------------------------- #
12058# Check for source highlight.  #
12059# ---------------------------- #
12060
12061SRCHIGH_LIBS=
12062SRCHIGH_CFLAGS=
12063
12064# Check whether --enable-source-highlight was given.
12065if test "${enable_source_highlight+set}" = set; then :
12066  enableval=$enable_source_highlight; case "${enableval}" in
12067  yes)  enable_source_highlight=yes ;;
12068  no)   enable_source_highlight=no  ;;
12069  *)    as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
12070esac
12071else
12072  enable_source_highlight=auto
12073fi
12074
12075
12076if test "${enable_source_highlight}" != "no"; then
12077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
12078$as_echo_n "checking for the source-highlight library... " >&6; }
12079  if test "${pkg_config_prog_path}" = "missing"; then
12080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
12081$as_echo "no - pkg-config not found" >&6; }
12082    if test "${enable_source_highlight}" = "yes"; then
12083      as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
12084    fi
12085  else
12086    if ${pkg_config_prog_path} --exists source-highlight; then
12087      case "$LDFLAGS" in
12088        *static-libstdc*)
12089          as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
12090          ;;
12091      esac
12092
12093      SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
12094      SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
12095
12096$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
12097
12098      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12099$as_echo "yes" >&6; }
12100    else
12101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12102$as_echo "no" >&6; }
12103      if test "${enable_source_highlight}" = "yes"; then
12104        as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
12105      fi
12106    fi
12107  fi
12108fi
12109
12110
12111
12112# ------------------------- #
12113# Checks for header files.  #
12114# ------------------------- #
12115
12116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12117$as_echo_n "checking for ANSI C header files... " >&6; }
12118if ${ac_cv_header_stdc+:} false; then :
12119  $as_echo_n "(cached) " >&6
12120else
12121  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12122/* end confdefs.h.  */
12123#include <stdlib.h>
12124#include <stdarg.h>
12125#include <string.h>
12126#include <float.h>
12127
12128int
12129main ()
12130{
12131
12132  ;
12133  return 0;
12134}
12135_ACEOF
12136if ac_fn_c_try_compile "$LINENO"; then :
12137  ac_cv_header_stdc=yes
12138else
12139  ac_cv_header_stdc=no
12140fi
12141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12142
12143if test $ac_cv_header_stdc = yes; then
12144  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12146/* end confdefs.h.  */
12147#include <string.h>
12148
12149_ACEOF
12150if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12151  $EGREP "memchr" >/dev/null 2>&1; then :
12152
12153else
12154  ac_cv_header_stdc=no
12155fi
12156rm -f conftest*
12157
12158fi
12159
12160if test $ac_cv_header_stdc = yes; then
12161  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12163/* end confdefs.h.  */
12164#include <stdlib.h>
12165
12166_ACEOF
12167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12168  $EGREP "free" >/dev/null 2>&1; then :
12169
12170else
12171  ac_cv_header_stdc=no
12172fi
12173rm -f conftest*
12174
12175fi
12176
12177if test $ac_cv_header_stdc = yes; then
12178  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12179  if test "$cross_compiling" = yes; then :
12180  :
12181else
12182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12183/* end confdefs.h.  */
12184#include <ctype.h>
12185#include <stdlib.h>
12186#if ((' ' & 0x0FF) == 0x020)
12187# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12188# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12189#else
12190# define ISLOWER(c) \
12191		   (('a' <= (c) && (c) <= 'i') \
12192		     || ('j' <= (c) && (c) <= 'r') \
12193		     || ('s' <= (c) && (c) <= 'z'))
12194# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12195#endif
12196
12197#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12198int
12199main ()
12200{
12201  int i;
12202  for (i = 0; i < 256; i++)
12203    if (XOR (islower (i), ISLOWER (i))
12204	|| toupper (i) != TOUPPER (i))
12205      return 2;
12206  return 0;
12207}
12208_ACEOF
12209if ac_fn_c_try_run "$LINENO"; then :
12210
12211else
12212  ac_cv_header_stdc=no
12213fi
12214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12215  conftest.$ac_objext conftest.beam conftest.$ac_ext
12216fi
12217
12218fi
12219fi
12220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12221$as_echo "$ac_cv_header_stdc" >&6; }
12222if test $ac_cv_header_stdc = yes; then
12223
12224$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12225
12226fi
12227
12228# elf_hp.h is for HP/UX 64-bit shared library support.
12229for ac_header in nlist.h machine/reg.h \
12230                  thread_db.h \
12231		  sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12232		  sys/procctl.h sys/resource.h sys/ptrace.h ptrace.h \
12233		  sys/reg.h sys/debugreg.h \
12234		  termios.h elf_hp.h
12235do :
12236  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12237ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12238if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12239  cat >>confdefs.h <<_ACEOF
12240#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12241_ACEOF
12242
12243fi
12244
12245done
12246
12247for ac_header in sys/user.h
12248do :
12249  ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12250# include <sys/param.h>
12251#endif
12252
12253"
12254if test "x$ac_cv_header_sys_user_h" = xyes; then :
12255  cat >>confdefs.h <<_ACEOF
12256#define HAVE_SYS_USER_H 1
12257_ACEOF
12258
12259fi
12260
12261done
12262
12263
12264for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12265do :
12266  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12267ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12268if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12269  cat >>confdefs.h <<_ACEOF
12270#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12271_ACEOF
12272
12273fi
12274
12275done
12276
12277for ac_header in term.h
12278do :
12279  ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12280# include <curses.h>
12281#endif
12282
12283"
12284if test "x$ac_cv_header_term_h" = xyes; then :
12285  cat >>confdefs.h <<_ACEOF
12286#define HAVE_TERM_H 1
12287_ACEOF
12288
12289fi
12290
12291done
12292
12293
12294for ac_header in sys/socket.h
12295do :
12296  ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
12297if test "x$ac_cv_header_sys_socket_h" = xyes; then :
12298  cat >>confdefs.h <<_ACEOF
12299#define HAVE_SYS_SOCKET_H 1
12300_ACEOF
12301
12302fi
12303
12304done
12305
12306for ac_header in ws2tcpip.h
12307do :
12308  ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
12309if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
12310  cat >>confdefs.h <<_ACEOF
12311#define HAVE_WS2TCPIP_H 1
12312_ACEOF
12313
12314fi
12315
12316done
12317
12318
12319# ------------------------- #
12320# Checks for declarations.  #
12321# ------------------------- #
12322
12323
12324  # Check for presence and size of long long.
12325  ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12326if test "x$ac_cv_type_long_long" = xyes; then :
12327
12328cat >>confdefs.h <<_ACEOF
12329#define HAVE_LONG_LONG 1
12330_ACEOF
12331
12332# The cast to long int works around a bug in the HP C Compiler
12333# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12334# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12335# This bug is HP SR number 8606223364.
12336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12337$as_echo_n "checking size of long long... " >&6; }
12338if ${ac_cv_sizeof_long_long+:} false; then :
12339  $as_echo_n "(cached) " >&6
12340else
12341  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
12342
12343else
12344  if test "$ac_cv_type_long_long" = yes; then
12345     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12347as_fn_error 77 "cannot compute sizeof (long long)
12348See \`config.log' for more details" "$LINENO" 5; }
12349   else
12350     ac_cv_sizeof_long_long=0
12351   fi
12352fi
12353
12354fi
12355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12356$as_echo "$ac_cv_sizeof_long_long" >&6; }
12357
12358
12359
12360cat >>confdefs.h <<_ACEOF
12361#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12362_ACEOF
12363
12364
12365fi
12366
12367
12368  as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12369ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12370if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12371  ac_have_decl=1
12372else
12373  ac_have_decl=0
12374fi
12375
12376cat >>confdefs.h <<_ACEOF
12377#define HAVE_DECL_BASENAME $ac_have_decl
12378_ACEOF
12379ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12380if test "x$ac_cv_have_decl_ffs" = xyes; then :
12381  ac_have_decl=1
12382else
12383  ac_have_decl=0
12384fi
12385
12386cat >>confdefs.h <<_ACEOF
12387#define HAVE_DECL_FFS $ac_have_decl
12388_ACEOF
12389ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12390if test "x$ac_cv_have_decl_asprintf" = xyes; then :
12391  ac_have_decl=1
12392else
12393  ac_have_decl=0
12394fi
12395
12396cat >>confdefs.h <<_ACEOF
12397#define HAVE_DECL_ASPRINTF $ac_have_decl
12398_ACEOF
12399ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12400if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
12401  ac_have_decl=1
12402else
12403  ac_have_decl=0
12404fi
12405
12406cat >>confdefs.h <<_ACEOF
12407#define HAVE_DECL_VASPRINTF $ac_have_decl
12408_ACEOF
12409ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12410if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12411  ac_have_decl=1
12412else
12413  ac_have_decl=0
12414fi
12415
12416cat >>confdefs.h <<_ACEOF
12417#define HAVE_DECL_SNPRINTF $ac_have_decl
12418_ACEOF
12419ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12420if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12421  ac_have_decl=1
12422else
12423  ac_have_decl=0
12424fi
12425
12426cat >>confdefs.h <<_ACEOF
12427#define HAVE_DECL_VSNPRINTF $ac_have_decl
12428_ACEOF
12429
12430  ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12431if test "x$ac_cv_have_decl_strtol" = xyes; then :
12432  ac_have_decl=1
12433else
12434  ac_have_decl=0
12435fi
12436
12437cat >>confdefs.h <<_ACEOF
12438#define HAVE_DECL_STRTOL $ac_have_decl
12439_ACEOF
12440ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12441if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12442  ac_have_decl=1
12443else
12444  ac_have_decl=0
12445fi
12446
12447cat >>confdefs.h <<_ACEOF
12448#define HAVE_DECL_STRTOUL $ac_have_decl
12449_ACEOF
12450ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12451if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12452  ac_have_decl=1
12453else
12454  ac_have_decl=0
12455fi
12456
12457cat >>confdefs.h <<_ACEOF
12458#define HAVE_DECL_STRTOLL $ac_have_decl
12459_ACEOF
12460ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12461if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12462  ac_have_decl=1
12463else
12464  ac_have_decl=0
12465fi
12466
12467cat >>confdefs.h <<_ACEOF
12468#define HAVE_DECL_STRTOULL $ac_have_decl
12469_ACEOF
12470
12471  ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12472if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12473  ac_have_decl=1
12474else
12475  ac_have_decl=0
12476fi
12477
12478cat >>confdefs.h <<_ACEOF
12479#define HAVE_DECL_STRVERSCMP $ac_have_decl
12480_ACEOF
12481
12482
12483
12484ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12485if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12486  ac_have_decl=1
12487else
12488  ac_have_decl=0
12489fi
12490
12491cat >>confdefs.h <<_ACEOF
12492#define HAVE_DECL_SNPRINTF $ac_have_decl
12493_ACEOF
12494
12495
12496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12497$as_echo_n "checking for LC_MESSAGES... " >&6; }
12498if ${am_cv_val_LC_MESSAGES+:} false; then :
12499  $as_echo_n "(cached) " >&6
12500else
12501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12502/* end confdefs.h.  */
12503#include <locale.h>
12504int
12505main ()
12506{
12507return LC_MESSAGES
12508  ;
12509  return 0;
12510}
12511_ACEOF
12512if ac_fn_c_try_link "$LINENO"; then :
12513  am_cv_val_LC_MESSAGES=yes
12514else
12515  am_cv_val_LC_MESSAGES=no
12516fi
12517rm -f core conftest.err conftest.$ac_objext \
12518    conftest$ac_exeext conftest.$ac_ext
12519fi
12520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12521$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12522  if test $am_cv_val_LC_MESSAGES = yes; then
12523
12524$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12525
12526  fi
12527
12528
12529# ------------------ #
12530# Checks for types.  #
12531# ------------------ #
12532
12533ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12534#if HAVE_SYS_SOCKET_H
12535# include <sys/socket.h>
12536#elif HAVE_WS2TCPIP_H
12537# include <ws2tcpip.h>
12538#endif
12539
12540"
12541if test "x$ac_cv_type_socklen_t" = xyes; then :
12542
12543cat >>confdefs.h <<_ACEOF
12544#define HAVE_SOCKLEN_T 1
12545_ACEOF
12546
12547
12548fi
12549
12550
12551# ------------------------------------- #
12552# Checks for compiler characteristics.  #
12553# ------------------------------------- #
12554
12555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12556$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12557if ${ac_cv_c_const+:} false; then :
12558  $as_echo_n "(cached) " >&6
12559else
12560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12561/* end confdefs.h.  */
12562
12563int
12564main ()
12565{
12566
12567#ifndef __cplusplus
12568  /* Ultrix mips cc rejects this sort of thing.  */
12569  typedef int charset[2];
12570  const charset cs = { 0, 0 };
12571  /* SunOS 4.1.1 cc rejects this.  */
12572  char const *const *pcpcc;
12573  char **ppc;
12574  /* NEC SVR4.0.2 mips cc rejects this.  */
12575  struct point {int x, y;};
12576  static struct point const zero = {0,0};
12577  /* AIX XL C 1.02.0.0 rejects this.
12578     It does not let you subtract one const X* pointer from another in
12579     an arm of an if-expression whose if-part is not a constant
12580     expression */
12581  const char *g = "string";
12582  pcpcc = &g + (g ? g-g : 0);
12583  /* HPUX 7.0 cc rejects these. */
12584  ++pcpcc;
12585  ppc = (char**) pcpcc;
12586  pcpcc = (char const *const *) ppc;
12587  { /* SCO 3.2v4 cc rejects this sort of thing.  */
12588    char tx;
12589    char *t = &tx;
12590    char const *s = 0 ? (char *) 0 : (char const *) 0;
12591
12592    *t++ = 0;
12593    if (s) return 0;
12594  }
12595  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12596    int x[] = {25, 17};
12597    const int *foo = &x[0];
12598    ++foo;
12599  }
12600  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12601    typedef const int *iptr;
12602    iptr p = 0;
12603    ++p;
12604  }
12605  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12606       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12607    struct s { int j; const int *ap[3]; } bx;
12608    struct s *b = &bx; b->j = 5;
12609  }
12610  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12611    const int foo = 10;
12612    if (!foo) return 0;
12613  }
12614  return !cs[0] && !zero.x;
12615#endif
12616
12617  ;
12618  return 0;
12619}
12620_ACEOF
12621if ac_fn_c_try_compile "$LINENO"; then :
12622  ac_cv_c_const=yes
12623else
12624  ac_cv_c_const=no
12625fi
12626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12627fi
12628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12629$as_echo "$ac_cv_c_const" >&6; }
12630if test $ac_cv_c_const = no; then
12631
12632$as_echo "#define const /**/" >>confdefs.h
12633
12634fi
12635
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12637$as_echo_n "checking for inline... " >&6; }
12638if ${ac_cv_c_inline+:} false; then :
12639  $as_echo_n "(cached) " >&6
12640else
12641  ac_cv_c_inline=no
12642for ac_kw in inline __inline__ __inline; do
12643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12644/* end confdefs.h.  */
12645#ifndef __cplusplus
12646typedef int foo_t;
12647static $ac_kw foo_t static_foo () {return 0; }
12648$ac_kw foo_t foo () {return 0; }
12649#endif
12650
12651_ACEOF
12652if ac_fn_c_try_compile "$LINENO"; then :
12653  ac_cv_c_inline=$ac_kw
12654fi
12655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12656  test "$ac_cv_c_inline" != no && break
12657done
12658
12659fi
12660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12661$as_echo "$ac_cv_c_inline" >&6; }
12662
12663case $ac_cv_c_inline in
12664  inline | yes) ;;
12665  *)
12666    case $ac_cv_c_inline in
12667      no) ac_val=;;
12668      *) ac_val=$ac_cv_c_inline;;
12669    esac
12670    cat >>confdefs.h <<_ACEOF
12671#ifndef __cplusplus
12672#define inline $ac_val
12673#endif
12674_ACEOF
12675    ;;
12676esac
12677
12678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12679$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12680if ${ac_cv_c_bigendian+:} false; then :
12681  $as_echo_n "(cached) " >&6
12682else
12683  ac_cv_c_bigendian=unknown
12684    # See if we're dealing with a universal compiler.
12685    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12686/* end confdefs.h.  */
12687#ifndef __APPLE_CC__
12688	       not a universal capable compiler
12689	     #endif
12690	     typedef int dummy;
12691
12692_ACEOF
12693if ac_fn_c_try_compile "$LINENO"; then :
12694
12695	# Check for potential -arch flags.  It is not universal unless
12696	# there are at least two -arch flags with different values.
12697	ac_arch=
12698	ac_prev=
12699	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12700	 if test -n "$ac_prev"; then
12701	   case $ac_word in
12702	     i?86 | x86_64 | ppc | ppc64)
12703	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12704		 ac_arch=$ac_word
12705	       else
12706		 ac_cv_c_bigendian=universal
12707		 break
12708	       fi
12709	       ;;
12710	   esac
12711	   ac_prev=
12712	 elif test "x$ac_word" = "x-arch"; then
12713	   ac_prev=arch
12714	 fi
12715       done
12716fi
12717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12718    if test $ac_cv_c_bigendian = unknown; then
12719      # See if sys/param.h defines the BYTE_ORDER macro.
12720      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12721/* end confdefs.h.  */
12722#include <sys/types.h>
12723	     #include <sys/param.h>
12724
12725int
12726main ()
12727{
12728#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12729		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12730		     && LITTLE_ENDIAN)
12731	      bogus endian macros
12732	     #endif
12733
12734  ;
12735  return 0;
12736}
12737_ACEOF
12738if ac_fn_c_try_compile "$LINENO"; then :
12739  # It does; now see whether it defined to BIG_ENDIAN or not.
12740	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12741/* end confdefs.h.  */
12742#include <sys/types.h>
12743		#include <sys/param.h>
12744
12745int
12746main ()
12747{
12748#if BYTE_ORDER != BIG_ENDIAN
12749		 not big endian
12750		#endif
12751
12752  ;
12753  return 0;
12754}
12755_ACEOF
12756if ac_fn_c_try_compile "$LINENO"; then :
12757  ac_cv_c_bigendian=yes
12758else
12759  ac_cv_c_bigendian=no
12760fi
12761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12762fi
12763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12764    fi
12765    if test $ac_cv_c_bigendian = unknown; then
12766      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12767      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12768/* end confdefs.h.  */
12769#include <limits.h>
12770
12771int
12772main ()
12773{
12774#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12775	      bogus endian macros
12776	     #endif
12777
12778  ;
12779  return 0;
12780}
12781_ACEOF
12782if ac_fn_c_try_compile "$LINENO"; then :
12783  # It does; now see whether it defined to _BIG_ENDIAN or not.
12784	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12785/* end confdefs.h.  */
12786#include <limits.h>
12787
12788int
12789main ()
12790{
12791#ifndef _BIG_ENDIAN
12792		 not big endian
12793		#endif
12794
12795  ;
12796  return 0;
12797}
12798_ACEOF
12799if ac_fn_c_try_compile "$LINENO"; then :
12800  ac_cv_c_bigendian=yes
12801else
12802  ac_cv_c_bigendian=no
12803fi
12804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12805fi
12806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12807    fi
12808    if test $ac_cv_c_bigendian = unknown; then
12809      # Compile a test program.
12810      if test "$cross_compiling" = yes; then :
12811  # Try to guess by grepping values from an object file.
12812	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12813/* end confdefs.h.  */
12814short int ascii_mm[] =
12815		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12816		short int ascii_ii[] =
12817		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12818		int use_ascii (int i) {
12819		  return ascii_mm[i] + ascii_ii[i];
12820		}
12821		short int ebcdic_ii[] =
12822		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12823		short int ebcdic_mm[] =
12824		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12825		int use_ebcdic (int i) {
12826		  return ebcdic_mm[i] + ebcdic_ii[i];
12827		}
12828		extern int foo;
12829
12830int
12831main ()
12832{
12833return use_ascii (foo) == use_ebcdic (foo);
12834  ;
12835  return 0;
12836}
12837_ACEOF
12838if ac_fn_c_try_compile "$LINENO"; then :
12839  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12840	      ac_cv_c_bigendian=yes
12841	    fi
12842	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12843	      if test "$ac_cv_c_bigendian" = unknown; then
12844		ac_cv_c_bigendian=no
12845	      else
12846		# finding both strings is unlikely to happen, but who knows?
12847		ac_cv_c_bigendian=unknown
12848	      fi
12849	    fi
12850fi
12851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12852else
12853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12854/* end confdefs.h.  */
12855$ac_includes_default
12856int
12857main ()
12858{
12859
12860	     /* Are we little or big endian?  From Harbison&Steele.  */
12861	     union
12862	     {
12863	       long int l;
12864	       char c[sizeof (long int)];
12865	     } u;
12866	     u.l = 1;
12867	     return u.c[sizeof (long int) - 1] == 1;
12868
12869  ;
12870  return 0;
12871}
12872_ACEOF
12873if ac_fn_c_try_run "$LINENO"; then :
12874  ac_cv_c_bigendian=no
12875else
12876  ac_cv_c_bigendian=yes
12877fi
12878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12879  conftest.$ac_objext conftest.beam conftest.$ac_ext
12880fi
12881
12882    fi
12883fi
12884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12885$as_echo "$ac_cv_c_bigendian" >&6; }
12886 case $ac_cv_c_bigendian in #(
12887   yes)
12888     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12889;; #(
12890   no)
12891      ;; #(
12892   universal)
12893
12894$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12895
12896     ;; #(
12897   *)
12898     as_fn_error $? "unknown endianness
12899 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12900 esac
12901
12902
12903# ------------------------------ #
12904# Checks for library functions.  #
12905# ------------------------------ #
12906
12907for ac_func in getuid getgid \
12908		pipe pread pread64 pwrite resize_term \
12909		getpgid setsid \
12910		sigaction sigsetmask socketpair \
12911		ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12912		setrlimit getrlimit posix_madvise waitpid \
12913		use_default_colors
12914do :
12915  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12916ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12917if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12918  cat >>confdefs.h <<_ACEOF
12919#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12920_ACEOF
12921
12922fi
12923done
12924
12925
12926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12927$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12928if ${am_cv_langinfo_codeset+:} false; then :
12929  $as_echo_n "(cached) " >&6
12930else
12931  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12932/* end confdefs.h.  */
12933#include <langinfo.h>
12934int
12935main ()
12936{
12937char* cs = nl_langinfo(CODESET);
12938  ;
12939  return 0;
12940}
12941_ACEOF
12942if ac_fn_c_try_link "$LINENO"; then :
12943  am_cv_langinfo_codeset=yes
12944else
12945  am_cv_langinfo_codeset=no
12946fi
12947rm -f core conftest.err conftest.$ac_objext \
12948    conftest$ac_exeext conftest.$ac_ext
12949
12950fi
12951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12952$as_echo "$am_cv_langinfo_codeset" >&6; }
12953  if test $am_cv_langinfo_codeset = yes; then
12954
12955$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12956
12957  fi
12958
12959ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12960if test "x$ac_cv_type_size_t" = xyes; then :
12961
12962else
12963
12964cat >>confdefs.h <<_ACEOF
12965#define size_t unsigned int
12966_ACEOF
12967
12968fi
12969
12970
12971
12972
12973  for ac_header in $ac_header_list
12974do :
12975  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12976ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12977"
12978if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12979  cat >>confdefs.h <<_ACEOF
12980#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12981_ACEOF
12982
12983fi
12984
12985done
12986
12987
12988
12989
12990
12991
12992
12993ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12994if test "x$ac_cv_type_pid_t" = xyes; then :
12995
12996else
12997
12998cat >>confdefs.h <<_ACEOF
12999#define pid_t int
13000_ACEOF
13001
13002fi
13003
13004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13005$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13006if ${ac_cv_path_SED+:} false; then :
13007  $as_echo_n "(cached) " >&6
13008else
13009            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13010     for ac_i in 1 2 3 4 5 6 7; do
13011       ac_script="$ac_script$as_nl$ac_script"
13012     done
13013     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13014     { ac_script=; unset ac_script;}
13015     if test -z "$SED"; then
13016  ac_path_SED_found=false
13017  # Loop through the user's path and test for each of PROGNAME-LIST
13018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13019for as_dir in $PATH
13020do
13021  IFS=$as_save_IFS
13022  test -z "$as_dir" && as_dir=.
13023    for ac_prog in sed gsed; do
13024    for ac_exec_ext in '' $ac_executable_extensions; do
13025      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13026      as_fn_executable_p "$ac_path_SED" || continue
13027# Check for GNU ac_path_SED and select it if it is found.
13028  # Check for GNU $ac_path_SED
13029case `"$ac_path_SED" --version 2>&1` in
13030*GNU*)
13031  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13032*)
13033  ac_count=0
13034  $as_echo_n 0123456789 >"conftest.in"
13035  while :
13036  do
13037    cat "conftest.in" "conftest.in" >"conftest.tmp"
13038    mv "conftest.tmp" "conftest.in"
13039    cp "conftest.in" "conftest.nl"
13040    $as_echo '' >> "conftest.nl"
13041    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13042    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13043    as_fn_arith $ac_count + 1 && ac_count=$as_val
13044    if test $ac_count -gt ${ac_path_SED_max-0}; then
13045      # Best one so far, save it but keep looking for a better one
13046      ac_cv_path_SED="$ac_path_SED"
13047      ac_path_SED_max=$ac_count
13048    fi
13049    # 10*(2^10) chars as input seems more than enough
13050    test $ac_count -gt 10 && break
13051  done
13052  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13053esac
13054
13055      $ac_path_SED_found && break 3
13056    done
13057  done
13058  done
13059IFS=$as_save_IFS
13060  if test -z "$ac_cv_path_SED"; then
13061    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13062  fi
13063else
13064  ac_cv_path_SED=$SED
13065fi
13066
13067fi
13068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13069$as_echo "$ac_cv_path_SED" >&6; }
13070 SED="$ac_cv_path_SED"
13071  rm -f conftest.sed
13072
13073
13074  # Set the 'development' global.
13075  . $srcdir/../bfd/development.sh
13076
13077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13078$as_echo_n "checking for ANSI C header files... " >&6; }
13079if ${ac_cv_header_stdc+:} false; then :
13080  $as_echo_n "(cached) " >&6
13081else
13082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13083/* end confdefs.h.  */
13084#include <stdlib.h>
13085#include <stdarg.h>
13086#include <string.h>
13087#include <float.h>
13088
13089int
13090main ()
13091{
13092
13093  ;
13094  return 0;
13095}
13096_ACEOF
13097if ac_fn_c_try_compile "$LINENO"; then :
13098  ac_cv_header_stdc=yes
13099else
13100  ac_cv_header_stdc=no
13101fi
13102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13103
13104if test $ac_cv_header_stdc = yes; then
13105  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13107/* end confdefs.h.  */
13108#include <string.h>
13109
13110_ACEOF
13111if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13112  $EGREP "memchr" >/dev/null 2>&1; then :
13113
13114else
13115  ac_cv_header_stdc=no
13116fi
13117rm -f conftest*
13118
13119fi
13120
13121if test $ac_cv_header_stdc = yes; then
13122  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13123  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13124/* end confdefs.h.  */
13125#include <stdlib.h>
13126
13127_ACEOF
13128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13129  $EGREP "free" >/dev/null 2>&1; then :
13130
13131else
13132  ac_cv_header_stdc=no
13133fi
13134rm -f conftest*
13135
13136fi
13137
13138if test $ac_cv_header_stdc = yes; then
13139  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13140  if test "$cross_compiling" = yes; then :
13141  :
13142else
13143  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13144/* end confdefs.h.  */
13145#include <ctype.h>
13146#include <stdlib.h>
13147#if ((' ' & 0x0FF) == 0x020)
13148# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13149# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13150#else
13151# define ISLOWER(c) \
13152		   (('a' <= (c) && (c) <= 'i') \
13153		     || ('j' <= (c) && (c) <= 'r') \
13154		     || ('s' <= (c) && (c) <= 'z'))
13155# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13156#endif
13157
13158#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13159int
13160main ()
13161{
13162  int i;
13163  for (i = 0; i < 256; i++)
13164    if (XOR (islower (i), ISLOWER (i))
13165	|| toupper (i) != TOUPPER (i))
13166      return 2;
13167  return 0;
13168}
13169_ACEOF
13170if ac_fn_c_try_run "$LINENO"; then :
13171
13172else
13173  ac_cv_header_stdc=no
13174fi
13175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13176  conftest.$ac_objext conftest.beam conftest.$ac_ext
13177fi
13178
13179fi
13180fi
13181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13182$as_echo "$ac_cv_header_stdc" >&6; }
13183if test $ac_cv_header_stdc = yes; then
13184
13185$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13186
13187fi
13188
13189  # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13190# for constant arguments.  Useless!
13191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13192$as_echo_n "checking for working alloca.h... " >&6; }
13193if ${ac_cv_working_alloca_h+:} false; then :
13194  $as_echo_n "(cached) " >&6
13195else
13196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13197/* end confdefs.h.  */
13198#include <alloca.h>
13199int
13200main ()
13201{
13202char *p = (char *) alloca (2 * sizeof (int));
13203			  if (p) return 0;
13204  ;
13205  return 0;
13206}
13207_ACEOF
13208if ac_fn_c_try_link "$LINENO"; then :
13209  ac_cv_working_alloca_h=yes
13210else
13211  ac_cv_working_alloca_h=no
13212fi
13213rm -f core conftest.err conftest.$ac_objext \
13214    conftest$ac_exeext conftest.$ac_ext
13215fi
13216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13217$as_echo "$ac_cv_working_alloca_h" >&6; }
13218if test $ac_cv_working_alloca_h = yes; then
13219
13220$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13221
13222fi
13223
13224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13225$as_echo_n "checking for alloca... " >&6; }
13226if ${ac_cv_func_alloca_works+:} false; then :
13227  $as_echo_n "(cached) " >&6
13228else
13229  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13230/* end confdefs.h.  */
13231#ifdef __GNUC__
13232# define alloca __builtin_alloca
13233#else
13234# ifdef _MSC_VER
13235#  include <malloc.h>
13236#  define alloca _alloca
13237# else
13238#  ifdef HAVE_ALLOCA_H
13239#   include <alloca.h>
13240#  else
13241#   ifdef _AIX
13242 #pragma alloca
13243#   else
13244#    ifndef alloca /* predefined by HP cc +Olibcalls */
13245void *alloca (size_t);
13246#    endif
13247#   endif
13248#  endif
13249# endif
13250#endif
13251
13252int
13253main ()
13254{
13255char *p = (char *) alloca (1);
13256				    if (p) return 0;
13257  ;
13258  return 0;
13259}
13260_ACEOF
13261if ac_fn_c_try_link "$LINENO"; then :
13262  ac_cv_func_alloca_works=yes
13263else
13264  ac_cv_func_alloca_works=no
13265fi
13266rm -f core conftest.err conftest.$ac_objext \
13267    conftest$ac_exeext conftest.$ac_ext
13268fi
13269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13270$as_echo "$ac_cv_func_alloca_works" >&6; }
13271
13272if test $ac_cv_func_alloca_works = yes; then
13273
13274$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13275
13276else
13277  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13278# that cause trouble.  Some versions do not even contain alloca or
13279# contain a buggy version.  If you still want to use their alloca,
13280# use ar to extract alloca.o from them instead of compiling alloca.c.
13281
13282ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13283
13284$as_echo "#define C_ALLOCA 1" >>confdefs.h
13285
13286
13287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13288$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13289if ${ac_cv_os_cray+:} false; then :
13290  $as_echo_n "(cached) " >&6
13291else
13292  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13293/* end confdefs.h.  */
13294#if defined CRAY && ! defined CRAY2
13295webecray
13296#else
13297wenotbecray
13298#endif
13299
13300_ACEOF
13301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13302  $EGREP "webecray" >/dev/null 2>&1; then :
13303  ac_cv_os_cray=yes
13304else
13305  ac_cv_os_cray=no
13306fi
13307rm -f conftest*
13308
13309fi
13310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13311$as_echo "$ac_cv_os_cray" >&6; }
13312if test $ac_cv_os_cray = yes; then
13313  for ac_func in _getb67 GETB67 getb67; do
13314    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13315ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13316if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13317
13318cat >>confdefs.h <<_ACEOF
13319#define CRAY_STACKSEG_END $ac_func
13320_ACEOF
13321
13322    break
13323fi
13324
13325  done
13326fi
13327
13328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13329$as_echo_n "checking stack direction for C alloca... " >&6; }
13330if ${ac_cv_c_stack_direction+:} false; then :
13331  $as_echo_n "(cached) " >&6
13332else
13333  if test "$cross_compiling" = yes; then :
13334  ac_cv_c_stack_direction=0
13335else
13336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13337/* end confdefs.h.  */
13338$ac_includes_default
13339int
13340find_stack_direction (int *addr, int depth)
13341{
13342  int dir, dummy = 0;
13343  if (! addr)
13344    addr = &dummy;
13345  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13346  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13347  return dir + dummy;
13348}
13349
13350int
13351main (int argc, char **argv)
13352{
13353  return find_stack_direction (0, argc + !argv + 20) < 0;
13354}
13355_ACEOF
13356if ac_fn_c_try_run "$LINENO"; then :
13357  ac_cv_c_stack_direction=1
13358else
13359  ac_cv_c_stack_direction=-1
13360fi
13361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13362  conftest.$ac_objext conftest.beam conftest.$ac_ext
13363fi
13364
13365fi
13366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13367$as_echo "$ac_cv_c_stack_direction" >&6; }
13368cat >>confdefs.h <<_ACEOF
13369#define STACK_DIRECTION $ac_cv_c_stack_direction
13370_ACEOF
13371
13372
13373fi
13374
13375
13376  WIN32APILIBS=
13377  case ${host} in
13378    *mingw32*)
13379
13380$as_echo "#define USE_WIN32API 1" >>confdefs.h
13381
13382      WIN32APILIBS="-lws2_32"
13383      ;;
13384  esac
13385
13386
13387  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13388$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13389if ${am_cv_langinfo_codeset+:} false; then :
13390  $as_echo_n "(cached) " >&6
13391else
13392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13393/* end confdefs.h.  */
13394#include <langinfo.h>
13395int
13396main ()
13397{
13398char* cs = nl_langinfo(CODESET);
13399  ;
13400  return 0;
13401}
13402_ACEOF
13403if ac_fn_c_try_link "$LINENO"; then :
13404  am_cv_langinfo_codeset=yes
13405else
13406  am_cv_langinfo_codeset=no
13407fi
13408rm -f core conftest.err conftest.$ac_objext \
13409    conftest$ac_exeext conftest.$ac_ext
13410
13411fi
13412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13413$as_echo "$am_cv_langinfo_codeset" >&6; }
13414  if test $am_cv_langinfo_codeset = yes; then
13415
13416$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13417
13418  fi
13419
13420
13421  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 		   dlfcn.h 		   linux/elf.h proc_service.h 		   poll.h sys/poll.h sys/select.h
13422do :
13423  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13424ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13425if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13426  cat >>confdefs.h <<_ACEOF
13427#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13428_ACEOF
13429
13430fi
13431
13432done
13433
13434
13435
13436for ac_func in getpagesize
13437do :
13438  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
13439if test "x$ac_cv_func_getpagesize" = xyes; then :
13440  cat >>confdefs.h <<_ACEOF
13441#define HAVE_GETPAGESIZE 1
13442_ACEOF
13443
13444fi
13445done
13446
13447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13448$as_echo_n "checking for working mmap... " >&6; }
13449if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
13450  $as_echo_n "(cached) " >&6
13451else
13452  if test "$cross_compiling" = yes; then :
13453  ac_cv_func_mmap_fixed_mapped=no
13454else
13455  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13456/* end confdefs.h.  */
13457$ac_includes_default
13458/* malloc might have been renamed as rpl_malloc. */
13459#undef malloc
13460
13461/* Thanks to Mike Haertel and Jim Avera for this test.
13462   Here is a matrix of mmap possibilities:
13463	mmap private not fixed
13464	mmap private fixed at somewhere currently unmapped
13465	mmap private fixed at somewhere already mapped
13466	mmap shared not fixed
13467	mmap shared fixed at somewhere currently unmapped
13468	mmap shared fixed at somewhere already mapped
13469   For private mappings, we should verify that changes cannot be read()
13470   back from the file, nor mmap's back from the file at a different
13471   address.  (There have been systems where private was not correctly
13472   implemented like the infamous i386 svr4.0, and systems where the
13473   VM page cache was not coherent with the file system buffer cache
13474   like early versions of FreeBSD and possibly contemporary NetBSD.)
13475   For shared mappings, we should conversely verify that changes get
13476   propagated back to all the places they're supposed to be.
13477
13478   Grep wants private fixed already mapped.
13479   The main things grep needs to know about mmap are:
13480   * does it exist and is it safe to write into the mmap'd area
13481   * how to use it (BSD variants)  */
13482
13483#include <fcntl.h>
13484#include <sys/mman.h>
13485
13486#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
13487char *malloc ();
13488#endif
13489
13490/* This mess was copied from the GNU getpagesize.h.  */
13491#ifndef HAVE_GETPAGESIZE
13492# ifdef _SC_PAGESIZE
13493#  define getpagesize() sysconf(_SC_PAGESIZE)
13494# else /* no _SC_PAGESIZE */
13495#  ifdef HAVE_SYS_PARAM_H
13496#   include <sys/param.h>
13497#   ifdef EXEC_PAGESIZE
13498#    define getpagesize() EXEC_PAGESIZE
13499#   else /* no EXEC_PAGESIZE */
13500#    ifdef NBPG
13501#     define getpagesize() NBPG * CLSIZE
13502#     ifndef CLSIZE
13503#      define CLSIZE 1
13504#     endif /* no CLSIZE */
13505#    else /* no NBPG */
13506#     ifdef NBPC
13507#      define getpagesize() NBPC
13508#     else /* no NBPC */
13509#      ifdef PAGESIZE
13510#       define getpagesize() PAGESIZE
13511#      endif /* PAGESIZE */
13512#     endif /* no NBPC */
13513#    endif /* no NBPG */
13514#   endif /* no EXEC_PAGESIZE */
13515#  else /* no HAVE_SYS_PARAM_H */
13516#   define getpagesize() 8192	/* punt totally */
13517#  endif /* no HAVE_SYS_PARAM_H */
13518# endif /* no _SC_PAGESIZE */
13519
13520#endif /* no HAVE_GETPAGESIZE */
13521
13522int
13523main ()
13524{
13525  char *data, *data2, *data3;
13526  const char *cdata2;
13527  int i, pagesize;
13528  int fd, fd2;
13529
13530  pagesize = getpagesize ();
13531
13532  /* First, make a file with some known garbage in it. */
13533  data = (char *) malloc (pagesize);
13534  if (!data)
13535    return 1;
13536  for (i = 0; i < pagesize; ++i)
13537    *(data + i) = rand ();
13538  umask (0);
13539  fd = creat ("conftest.mmap", 0600);
13540  if (fd < 0)
13541    return 2;
13542  if (write (fd, data, pagesize) != pagesize)
13543    return 3;
13544  close (fd);
13545
13546  /* Next, check that the tail of a page is zero-filled.  File must have
13547     non-zero length, otherwise we risk SIGBUS for entire page.  */
13548  fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13549  if (fd2 < 0)
13550    return 4;
13551  cdata2 = "";
13552  if (write (fd2, cdata2, 1) != 1)
13553    return 5;
13554  data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13555  if (data2 == MAP_FAILED)
13556    return 6;
13557  for (i = 0; i < pagesize; ++i)
13558    if (*(data2 + i))
13559      return 7;
13560  close (fd2);
13561  if (munmap (data2, pagesize))
13562    return 8;
13563
13564  /* Next, try to mmap the file at a fixed address which already has
13565     something else allocated at it.  If we can, also make sure that
13566     we see the same garbage.  */
13567  fd = open ("conftest.mmap", O_RDWR);
13568  if (fd < 0)
13569    return 9;
13570  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13571		     MAP_PRIVATE | MAP_FIXED, fd, 0L))
13572    return 10;
13573  for (i = 0; i < pagesize; ++i)
13574    if (*(data + i) != *(data2 + i))
13575      return 11;
13576
13577  /* Finally, make sure that changes to the mapped area do not
13578     percolate back to the file as seen by read().  (This is a bug on
13579     some variants of i386 svr4.0.)  */
13580  for (i = 0; i < pagesize; ++i)
13581    *(data2 + i) = *(data2 + i) + 1;
13582  data3 = (char *) malloc (pagesize);
13583  if (!data3)
13584    return 12;
13585  if (read (fd, data3, pagesize) != pagesize)
13586    return 13;
13587  for (i = 0; i < pagesize; ++i)
13588    if (*(data + i) != *(data3 + i))
13589      return 14;
13590  close (fd);
13591  return 0;
13592}
13593_ACEOF
13594if ac_fn_c_try_run "$LINENO"; then :
13595  ac_cv_func_mmap_fixed_mapped=yes
13596else
13597  ac_cv_func_mmap_fixed_mapped=no
13598fi
13599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13600  conftest.$ac_objext conftest.beam conftest.$ac_ext
13601fi
13602
13603fi
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13605$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13606if test $ac_cv_func_mmap_fixed_mapped = yes; then
13607
13608$as_echo "#define HAVE_MMAP 1" >>confdefs.h
13609
13610fi
13611rm -f conftest.mmap conftest.txt
13612
13613  for ac_header in vfork.h
13614do :
13615  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13616if test "x$ac_cv_header_vfork_h" = xyes; then :
13617  cat >>confdefs.h <<_ACEOF
13618#define HAVE_VFORK_H 1
13619_ACEOF
13620
13621fi
13622
13623done
13624
13625for ac_func in fork vfork
13626do :
13627  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13628ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13629if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13630  cat >>confdefs.h <<_ACEOF
13631#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13632_ACEOF
13633
13634fi
13635done
13636
13637if test "x$ac_cv_func_fork" = xyes; then
13638  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13639$as_echo_n "checking for working fork... " >&6; }
13640if ${ac_cv_func_fork_works+:} false; then :
13641  $as_echo_n "(cached) " >&6
13642else
13643  if test "$cross_compiling" = yes; then :
13644  ac_cv_func_fork_works=cross
13645else
13646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13647/* end confdefs.h.  */
13648$ac_includes_default
13649int
13650main ()
13651{
13652
13653	  /* By Ruediger Kuhlmann. */
13654	  return fork () < 0;
13655
13656  ;
13657  return 0;
13658}
13659_ACEOF
13660if ac_fn_c_try_run "$LINENO"; then :
13661  ac_cv_func_fork_works=yes
13662else
13663  ac_cv_func_fork_works=no
13664fi
13665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13666  conftest.$ac_objext conftest.beam conftest.$ac_ext
13667fi
13668
13669fi
13670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13671$as_echo "$ac_cv_func_fork_works" >&6; }
13672
13673else
13674  ac_cv_func_fork_works=$ac_cv_func_fork
13675fi
13676if test "x$ac_cv_func_fork_works" = xcross; then
13677  case $host in
13678    *-*-amigaos* | *-*-msdosdjgpp*)
13679      # Override, as these systems have only a dummy fork() stub
13680      ac_cv_func_fork_works=no
13681      ;;
13682    *)
13683      ac_cv_func_fork_works=yes
13684      ;;
13685  esac
13686  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13687$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13688fi
13689ac_cv_func_vfork_works=$ac_cv_func_vfork
13690if test "x$ac_cv_func_vfork" = xyes; then
13691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13692$as_echo_n "checking for working vfork... " >&6; }
13693if ${ac_cv_func_vfork_works+:} false; then :
13694  $as_echo_n "(cached) " >&6
13695else
13696  if test "$cross_compiling" = yes; then :
13697  ac_cv_func_vfork_works=cross
13698else
13699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13700/* end confdefs.h.  */
13701/* Thanks to Paul Eggert for this test.  */
13702$ac_includes_default
13703#include <sys/wait.h>
13704#ifdef HAVE_VFORK_H
13705# include <vfork.h>
13706#endif
13707/* On some sparc systems, changes by the child to local and incoming
13708   argument registers are propagated back to the parent.  The compiler
13709   is told about this with #include <vfork.h>, but some compilers
13710   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
13711   static variable whose address is put into a register that is
13712   clobbered by the vfork.  */
13713static void
13714#ifdef __cplusplus
13715sparc_address_test (int arg)
13716# else
13717sparc_address_test (arg) int arg;
13718#endif
13719{
13720  static pid_t child;
13721  if (!child) {
13722    child = vfork ();
13723    if (child < 0) {
13724      perror ("vfork");
13725      _exit(2);
13726    }
13727    if (!child) {
13728      arg = getpid();
13729      write(-1, "", 0);
13730      _exit (arg);
13731    }
13732  }
13733}
13734
13735int
13736main ()
13737{
13738  pid_t parent = getpid ();
13739  pid_t child;
13740
13741  sparc_address_test (0);
13742
13743  child = vfork ();
13744
13745  if (child == 0) {
13746    /* Here is another test for sparc vfork register problems.  This
13747       test uses lots of local variables, at least as many local
13748       variables as main has allocated so far including compiler
13749       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
13750       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
13751       reuse the register of parent for one of the local variables,
13752       since it will think that parent can't possibly be used any more
13753       in this routine.  Assigning to the local variable will thus
13754       munge parent in the parent process.  */
13755    pid_t
13756      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13757      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13758    /* Convince the compiler that p..p7 are live; otherwise, it might
13759       use the same hardware register for all 8 local variables.  */
13760    if (p != p1 || p != p2 || p != p3 || p != p4
13761	|| p != p5 || p != p6 || p != p7)
13762      _exit(1);
13763
13764    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13765       from child file descriptors.  If the child closes a descriptor
13766       before it execs or exits, this munges the parent's descriptor
13767       as well.  Test for this by closing stdout in the child.  */
13768    _exit(close(fileno(stdout)) != 0);
13769  } else {
13770    int status;
13771    struct stat st;
13772
13773    while (wait(&status) != child)
13774      ;
13775    return (
13776	 /* Was there some problem with vforking?  */
13777	 child < 0
13778
13779	 /* Did the child fail?  (This shouldn't happen.)  */
13780	 || status
13781
13782	 /* Did the vfork/compiler bug occur?  */
13783	 || parent != getpid()
13784
13785	 /* Did the file descriptor bug occur?  */
13786	 || fstat(fileno(stdout), &st) != 0
13787	 );
13788  }
13789}
13790_ACEOF
13791if ac_fn_c_try_run "$LINENO"; then :
13792  ac_cv_func_vfork_works=yes
13793else
13794  ac_cv_func_vfork_works=no
13795fi
13796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13797  conftest.$ac_objext conftest.beam conftest.$ac_ext
13798fi
13799
13800fi
13801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13802$as_echo "$ac_cv_func_vfork_works" >&6; }
13803
13804fi;
13805if test "x$ac_cv_func_fork_works" = xcross; then
13806  ac_cv_func_vfork_works=$ac_cv_func_vfork
13807  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13808$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13809fi
13810
13811if test "x$ac_cv_func_vfork_works" = xyes; then
13812
13813$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13814
13815else
13816
13817$as_echo "#define vfork fork" >>confdefs.h
13818
13819fi
13820if test "x$ac_cv_func_fork_works" = xyes; then
13821
13822$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13823
13824fi
13825
13826  for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
13827		  ptrace64 sbrk setns sigaltstack sigprocmask \
13828		  setpgid setpgrp getrusage getauxval sigtimedwait
13829do :
13830  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13831ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13832if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13833  cat >>confdefs.h <<_ACEOF
13834#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13835_ACEOF
13836
13837fi
13838done
13839
13840
13841  ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13842if test "x$ac_cv_have_decl_strstr" = xyes; then :
13843  ac_have_decl=1
13844else
13845  ac_have_decl=0
13846fi
13847
13848cat >>confdefs.h <<_ACEOF
13849#define HAVE_DECL_STRSTR $ac_have_decl
13850_ACEOF
13851
13852
13853  # ----------------------- #
13854  # Checks for structures.  #
13855  # ----------------------- #
13856
13857  ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13858if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13859
13860cat >>confdefs.h <<_ACEOF
13861#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13862_ACEOF
13863
13864
13865fi
13866ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13867if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13868
13869cat >>confdefs.h <<_ACEOF
13870#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13871_ACEOF
13872
13873
13874fi
13875
13876
13877  # On FreeBSD we need libutil for the kinfo_get* functions.  On
13878  # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
13879  # Figure out which one to use.
13880  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13881$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13882if ${ac_cv_search_kinfo_getfile+:} false; then :
13883  $as_echo_n "(cached) " >&6
13884else
13885  ac_func_search_save_LIBS=$LIBS
13886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887/* end confdefs.h.  */
13888
13889/* Override any GCC internal prototype to avoid an error.
13890   Use char because int might match the return type of a GCC
13891   builtin and then its argument prototype would still apply.  */
13892#ifdef __cplusplus
13893extern "C"
13894#endif
13895char kinfo_getfile ();
13896int
13897main ()
13898{
13899return kinfo_getfile ();
13900  ;
13901  return 0;
13902}
13903_ACEOF
13904for ac_lib in '' util util-freebsd; do
13905  if test -z "$ac_lib"; then
13906    ac_res="none required"
13907  else
13908    ac_res=-l$ac_lib
13909    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13910  fi
13911  if ac_fn_c_try_link "$LINENO"; then :
13912  ac_cv_search_kinfo_getfile=$ac_res
13913fi
13914rm -f core conftest.err conftest.$ac_objext \
13915    conftest$ac_exeext
13916  if ${ac_cv_search_kinfo_getfile+:} false; then :
13917  break
13918fi
13919done
13920if ${ac_cv_search_kinfo_getfile+:} false; then :
13921
13922else
13923  ac_cv_search_kinfo_getfile=no
13924fi
13925rm conftest.$ac_ext
13926LIBS=$ac_func_search_save_LIBS
13927fi
13928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13929$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13930ac_res=$ac_cv_search_kinfo_getfile
13931if test "$ac_res" != no; then :
13932  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13933
13934fi
13935
13936
13937  # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
13938  for ac_func in kinfo_getfile
13939do :
13940  ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
13941if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
13942  cat >>confdefs.h <<_ACEOF
13943#define HAVE_KINFO_GETFILE 1
13944_ACEOF
13945
13946fi
13947done
13948
13949
13950  # Check for std::thread.  This does not work on some platforms, like
13951  # mingw and DJGPP.
13952  ac_ext=cpp
13953ac_cpp='$CXXCPP $CPPFLAGS'
13954ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13955ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13956ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13957
13958
13959
13960
13961
13962ac_ext=c
13963ac_cpp='$CPP $CPPFLAGS'
13964ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13965ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13966ac_compiler_gnu=$ac_cv_c_compiler_gnu
13967
13968ax_pthread_ok=no
13969
13970# We used to check for pthread.h first, but this fails if pthread.h
13971# requires special compiler flags (e.g. on Tru64 or Sequent).
13972# It gets checked for in the link test anyway.
13973
13974# First of all, check if the user has set any of the PTHREAD_LIBS,
13975# etcetera environment variables, and if threads linking works using
13976# them:
13977if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13978        ax_pthread_save_CC="$CC"
13979        ax_pthread_save_CFLAGS="$CFLAGS"
13980        ax_pthread_save_LIBS="$LIBS"
13981        if test "x$PTHREAD_CC" != "x"; then :
13982  CC="$PTHREAD_CC"
13983fi
13984        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13985        LIBS="$PTHREAD_LIBS $LIBS"
13986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13987$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13988        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13989/* end confdefs.h.  */
13990
13991/* Override any GCC internal prototype to avoid an error.
13992   Use char because int might match the return type of a GCC
13993   builtin and then its argument prototype would still apply.  */
13994#ifdef __cplusplus
13995extern "C"
13996#endif
13997char pthread_join ();
13998int
13999main ()
14000{
14001return pthread_join ();
14002  ;
14003  return 0;
14004}
14005_ACEOF
14006if ac_fn_c_try_link "$LINENO"; then :
14007  ax_pthread_ok=yes
14008fi
14009rm -f core conftest.err conftest.$ac_objext \
14010    conftest$ac_exeext conftest.$ac_ext
14011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14012$as_echo "$ax_pthread_ok" >&6; }
14013        if test "x$ax_pthread_ok" = "xno"; then
14014                PTHREAD_LIBS=""
14015                PTHREAD_CFLAGS=""
14016        fi
14017        CC="$ax_pthread_save_CC"
14018        CFLAGS="$ax_pthread_save_CFLAGS"
14019        LIBS="$ax_pthread_save_LIBS"
14020fi
14021
14022# We must check for the threads library under a number of different
14023# names; the ordering is very important because some systems
14024# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
14025# libraries is broken (non-POSIX).
14026
14027# Create a list of thread flags to try.  Items starting with a "-" are
14028# C compiler flags, and other items are library names, except for "none"
14029# which indicates that we try without any flags at all, and "pthread-config"
14030# which is a program returning the flags for the Pth emulation library.
14031
14032ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
14033
14034# The ordering *is* (sometimes) important.  Some notes on the
14035# individual items follow:
14036
14037# pthreads: AIX (must check this before -lpthread)
14038# none: in case threads are in libc; should be tried before -Kthread and
14039#       other compiler flags to prevent continual compiler warnings
14040# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
14041# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
14042#           (Note: HP C rejects this with "bad form for `-t' option")
14043# -pthreads: Solaris/gcc (Note: HP C also rejects)
14044# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
14045#      doesn't hurt to check since this sometimes defines pthreads and
14046#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
14047#      is present but should not be used directly; and before -mthreads,
14048#      because the compiler interprets this as "-mt" + "-hreads")
14049# -mthreads: Mingw32/gcc, Lynx/gcc
14050# pthread: Linux, etcetera
14051# --thread-safe: KAI C++
14052# pthread-config: use pthread-config program (for GNU Pth library)
14053
14054case $host_os in
14055
14056        freebsd*)
14057
14058        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
14059        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
14060
14061        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
14062        ;;
14063
14064        hpux*)
14065
14066        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
14067        # multi-threading and also sets -lpthread."
14068
14069        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
14070        ;;
14071
14072        openedition*)
14073
14074        # IBM z/OS requires a feature-test macro to be defined in order to
14075        # enable POSIX threads at all, so give the user a hint if this is
14076        # not set. (We don't define these ourselves, as they can affect
14077        # other portions of the system API in unpredictable ways.)
14078
14079        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14080/* end confdefs.h.  */
14081
14082#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
14083             AX_PTHREAD_ZOS_MISSING
14084#            endif
14085
14086_ACEOF
14087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14088  $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
14089  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
14090$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
14091fi
14092rm -f conftest*
14093
14094        ;;
14095
14096        solaris*)
14097
14098        # On Solaris (at least, for some versions), libc contains stubbed
14099        # (non-functional) versions of the pthreads routines, so link-based
14100        # tests will erroneously succeed. (N.B.: The stubs are missing
14101        # pthread_cleanup_push, or rather a function called by this macro,
14102        # so we could check for that, but who knows whether they'll stub
14103        # that too in a future libc.)  So we'll check first for the
14104        # standard Solaris way of linking pthreads (-mt -lpthread).
14105
14106        ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
14107        ;;
14108esac
14109
14110# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
14111
14112if test "x$GCC" = "xyes"; then :
14113  ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
14114fi
14115
14116# The presence of a feature test macro requesting re-entrant function
14117# definitions is, on some systems, a strong hint that pthreads support is
14118# correctly enabled
14119
14120case $host_os in
14121        darwin* | hpux* | linux* | osf* | solaris*)
14122        ax_pthread_check_macro="_REENTRANT"
14123        ;;
14124
14125        aix*)
14126        ax_pthread_check_macro="_THREAD_SAFE"
14127        ;;
14128
14129        *)
14130        ax_pthread_check_macro="--"
14131        ;;
14132esac
14133if test "x$ax_pthread_check_macro" = "x--"; then :
14134  ax_pthread_check_cond=0
14135else
14136  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
14137fi
14138
14139# Are we compiling with Clang?
14140
14141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
14142$as_echo_n "checking whether $CC is Clang... " >&6; }
14143if ${ax_cv_PTHREAD_CLANG+:} false; then :
14144  $as_echo_n "(cached) " >&6
14145else
14146  ax_cv_PTHREAD_CLANG=no
14147     # Note that Autoconf sets GCC=yes for Clang as well as GCC
14148     if test "x$GCC" = "xyes"; then
14149        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14150/* end confdefs.h.  */
14151/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
14152#            if defined(__clang__) && defined(__llvm__)
14153             AX_PTHREAD_CC_IS_CLANG
14154#            endif
14155
14156_ACEOF
14157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14158  $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
14159  ax_cv_PTHREAD_CLANG=yes
14160fi
14161rm -f conftest*
14162
14163     fi
14164
14165fi
14166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
14167$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
14168ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
14169
14170ax_pthread_clang_warning=no
14171
14172# Clang needs special handling, because older versions handle the -pthread
14173# option in a rather... idiosyncratic way
14174
14175if test "x$ax_pthread_clang" = "xyes"; then
14176
14177        # Clang takes -pthread; it has never supported any other flag
14178
14179        # (Note 1: This will need to be revisited if a system that Clang
14180        # supports has POSIX threads in a separate library.  This tends not
14181        # to be the way of modern systems, but it's conceivable.)
14182
14183        # (Note 2: On some systems, notably Darwin, -pthread is not needed
14184        # to get POSIX threads support; the API is always present and
14185        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
14186        # -pthread does define _REENTRANT, and while the Darwin headers
14187        # ignore this macro, third-party headers might not.)
14188
14189        PTHREAD_CFLAGS="-pthread"
14190        PTHREAD_LIBS=
14191
14192        ax_pthread_ok=yes
14193
14194        # However, older versions of Clang make a point of warning the user
14195        # that, in an invocation where only linking and no compilation is
14196        # taking place, the -pthread option has no effect ("argument unused
14197        # during compilation").  They expect -pthread to be passed in only
14198        # when source code is being compiled.
14199        #
14200        # Problem is, this is at odds with the way Automake and most other
14201        # C build frameworks function, which is that the same flags used in
14202        # compilation (CFLAGS) are also used in linking.  Many systems
14203        # supported by AX_PTHREAD require exactly this for POSIX threads
14204        # support, and in fact it is often not straightforward to specify a
14205        # flag that is used only in the compilation phase and not in
14206        # linking.  Such a scenario is extremely rare in practice.
14207        #
14208        # Even though use of the -pthread flag in linking would only print
14209        # a warning, this can be a nuisance for well-run software projects
14210        # that build with -Werror.  So if the active version of Clang has
14211        # this misfeature, we search for an option to squash it.
14212
14213        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
14214$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
14215if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
14216  $as_echo_n "(cached) " >&6
14217else
14218  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
14219             # Create an alternate version of $ac_link that compiles and
14220             # links in two steps (.c -> .o, .o -> exe) instead of one
14221             # (.c -> exe), because the warning occurs only in the second
14222             # step
14223             ax_pthread_save_ac_link="$ac_link"
14224             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
14225             ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
14226             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
14227             ax_pthread_save_CFLAGS="$CFLAGS"
14228             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
14229                if test "x$ax_pthread_try" = "xunknown"; then :
14230  break
14231fi
14232                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
14233                ac_link="$ax_pthread_save_ac_link"
14234                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14235/* end confdefs.h.  */
14236int main(void){return 0;}
14237_ACEOF
14238if ac_fn_c_try_link "$LINENO"; then :
14239  ac_link="$ax_pthread_2step_ac_link"
14240                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14241/* end confdefs.h.  */
14242int main(void){return 0;}
14243_ACEOF
14244if ac_fn_c_try_link "$LINENO"; then :
14245  break
14246fi
14247rm -f core conftest.err conftest.$ac_objext \
14248    conftest$ac_exeext conftest.$ac_ext
14249
14250fi
14251rm -f core conftest.err conftest.$ac_objext \
14252    conftest$ac_exeext conftest.$ac_ext
14253             done
14254             ac_link="$ax_pthread_save_ac_link"
14255             CFLAGS="$ax_pthread_save_CFLAGS"
14256             if test "x$ax_pthread_try" = "x"; then :
14257  ax_pthread_try=no
14258fi
14259             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
14260
14261fi
14262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
14263$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
14264
14265        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
14266                no | unknown) ;;
14267                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
14268        esac
14269
14270fi # $ax_pthread_clang = yes
14271
14272if test "x$ax_pthread_ok" = "xno"; then
14273for ax_pthread_try_flag in $ax_pthread_flags; do
14274
14275        case $ax_pthread_try_flag in
14276                none)
14277                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
14278$as_echo_n "checking whether pthreads work without any flags... " >&6; }
14279                ;;
14280
14281                -mt,pthread)
14282                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
14283$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
14284                PTHREAD_CFLAGS="-mt"
14285                PTHREAD_LIBS="-lpthread"
14286                ;;
14287
14288                -*)
14289                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
14290$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
14291                PTHREAD_CFLAGS="$ax_pthread_try_flag"
14292                ;;
14293
14294                pthread-config)
14295                # Extract the first word of "pthread-config", so it can be a program name with args.
14296set dummy pthread-config; ac_word=$2
14297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14298$as_echo_n "checking for $ac_word... " >&6; }
14299if ${ac_cv_prog_ax_pthread_config+:} false; then :
14300  $as_echo_n "(cached) " >&6
14301else
14302  if test -n "$ax_pthread_config"; then
14303  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
14304else
14305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14306for as_dir in $PATH
14307do
14308  IFS=$as_save_IFS
14309  test -z "$as_dir" && as_dir=.
14310    for ac_exec_ext in '' $ac_executable_extensions; do
14311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14312    ac_cv_prog_ax_pthread_config="yes"
14313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14314    break 2
14315  fi
14316done
14317  done
14318IFS=$as_save_IFS
14319
14320  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
14321fi
14322fi
14323ax_pthread_config=$ac_cv_prog_ax_pthread_config
14324if test -n "$ax_pthread_config"; then
14325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
14326$as_echo "$ax_pthread_config" >&6; }
14327else
14328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14329$as_echo "no" >&6; }
14330fi
14331
14332
14333                if test "x$ax_pthread_config" = "xno"; then :
14334  continue
14335fi
14336                PTHREAD_CFLAGS="`pthread-config --cflags`"
14337                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
14338                ;;
14339
14340                *)
14341                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
14342$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
14343                PTHREAD_LIBS="-l$ax_pthread_try_flag"
14344                ;;
14345        esac
14346
14347        ax_pthread_save_CFLAGS="$CFLAGS"
14348        ax_pthread_save_LIBS="$LIBS"
14349        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14350        LIBS="$PTHREAD_LIBS $LIBS"
14351
14352        # Check for various functions.  We must include pthread.h,
14353        # since some functions may be macros.  (On the Sequent, we
14354        # need a special flag -Kthread to make this header compile.)
14355        # We check for pthread_join because it is in -lpthread on IRIX
14356        # while pthread_create is in libc.  We check for pthread_attr_init
14357        # due to DEC craziness with -lpthreads.  We check for
14358        # pthread_cleanup_push because it is one of the few pthread
14359        # functions on Solaris that doesn't have a non-functional libc stub.
14360        # We try pthread_create on general principles.
14361
14362        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14363/* end confdefs.h.  */
14364#include <pthread.h>
14365#                       if $ax_pthread_check_cond
14366#                        error "$ax_pthread_check_macro must be defined"
14367#                       endif
14368                        static void routine(void *a) { a = 0; }
14369                        static void *start_routine(void *a) { return a; }
14370int
14371main ()
14372{
14373pthread_t th; pthread_attr_t attr;
14374                        pthread_create(&th, 0, start_routine, 0);
14375                        pthread_join(th, 0);
14376                        pthread_attr_init(&attr);
14377                        pthread_cleanup_push(routine, 0);
14378                        pthread_cleanup_pop(0) /* ; */
14379  ;
14380  return 0;
14381}
14382_ACEOF
14383if ac_fn_c_try_link "$LINENO"; then :
14384  ax_pthread_ok=yes
14385fi
14386rm -f core conftest.err conftest.$ac_objext \
14387    conftest$ac_exeext conftest.$ac_ext
14388
14389        CFLAGS="$ax_pthread_save_CFLAGS"
14390        LIBS="$ax_pthread_save_LIBS"
14391
14392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14393$as_echo "$ax_pthread_ok" >&6; }
14394        if test "x$ax_pthread_ok" = "xyes"; then :
14395  break
14396fi
14397
14398        PTHREAD_LIBS=""
14399        PTHREAD_CFLAGS=""
14400done
14401fi
14402
14403# Various other checks:
14404if test "x$ax_pthread_ok" = "xyes"; then
14405        ax_pthread_save_CFLAGS="$CFLAGS"
14406        ax_pthread_save_LIBS="$LIBS"
14407        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14408        LIBS="$PTHREAD_LIBS $LIBS"
14409
14410        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14412$as_echo_n "checking for joinable pthread attribute... " >&6; }
14413if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14414  $as_echo_n "(cached) " >&6
14415else
14416  ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14417             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14418                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14419/* end confdefs.h.  */
14420#include <pthread.h>
14421int
14422main ()
14423{
14424int attr = $ax_pthread_attr; return attr /* ; */
14425  ;
14426  return 0;
14427}
14428_ACEOF
14429if ac_fn_c_try_link "$LINENO"; then :
14430  ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14431fi
14432rm -f core conftest.err conftest.$ac_objext \
14433    conftest$ac_exeext conftest.$ac_ext
14434             done
14435
14436fi
14437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14438$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14439        if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14440               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14441               test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
14442
14443cat >>confdefs.h <<_ACEOF
14444#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14445_ACEOF
14446
14447               ax_pthread_joinable_attr_defined=yes
14448
14449fi
14450
14451        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14452$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14453if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14454  $as_echo_n "(cached) " >&6
14455else
14456  ax_cv_PTHREAD_SPECIAL_FLAGS=no
14457             case $host_os in
14458             solaris*)
14459             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14460             ;;
14461             esac
14462
14463fi
14464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14465$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14466        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14467               test "x$ax_pthread_special_flags_added" != "xyes"; then :
14468  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14469               ax_pthread_special_flags_added=yes
14470fi
14471
14472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14473$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14474if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14475  $as_echo_n "(cached) " >&6
14476else
14477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14478/* end confdefs.h.  */
14479#include <pthread.h>
14480int
14481main ()
14482{
14483int i = PTHREAD_PRIO_INHERIT;
14484  ;
14485  return 0;
14486}
14487_ACEOF
14488if ac_fn_c_try_link "$LINENO"; then :
14489  ax_cv_PTHREAD_PRIO_INHERIT=yes
14490else
14491  ax_cv_PTHREAD_PRIO_INHERIT=no
14492fi
14493rm -f core conftest.err conftest.$ac_objext \
14494    conftest$ac_exeext conftest.$ac_ext
14495
14496fi
14497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14498$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14499        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14500               test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
14501
14502$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
14503
14504               ax_pthread_prio_inherit_defined=yes
14505
14506fi
14507
14508        CFLAGS="$ax_pthread_save_CFLAGS"
14509        LIBS="$ax_pthread_save_LIBS"
14510
14511        # More AIX lossage: compile with *_r variant
14512        if test "x$GCC" != "xyes"; then
14513            case $host_os in
14514                aix*)
14515                case "x/$CC" in #(
14516  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14517    #handle absolute path differently from PATH based program lookup
14518                     case "x$CC" in #(
14519  x/*) :
14520    if as_fn_executable_p ${CC}_r; then :
14521  PTHREAD_CC="${CC}_r"
14522fi ;; #(
14523  *) :
14524    for ac_prog in ${CC}_r
14525do
14526  # Extract the first word of "$ac_prog", so it can be a program name with args.
14527set dummy $ac_prog; ac_word=$2
14528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14529$as_echo_n "checking for $ac_word... " >&6; }
14530if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14531  $as_echo_n "(cached) " >&6
14532else
14533  if test -n "$PTHREAD_CC"; then
14534  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14535else
14536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14537for as_dir in $PATH
14538do
14539  IFS=$as_save_IFS
14540  test -z "$as_dir" && as_dir=.
14541    for ac_exec_ext in '' $ac_executable_extensions; do
14542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14543    ac_cv_prog_PTHREAD_CC="$ac_prog"
14544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14545    break 2
14546  fi
14547done
14548  done
14549IFS=$as_save_IFS
14550
14551fi
14552fi
14553PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14554if test -n "$PTHREAD_CC"; then
14555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14556$as_echo "$PTHREAD_CC" >&6; }
14557else
14558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14559$as_echo "no" >&6; }
14560fi
14561
14562
14563  test -n "$PTHREAD_CC" && break
14564done
14565test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14566 ;;
14567esac ;; #(
14568  *) :
14569     ;;
14570esac
14571                ;;
14572            esac
14573        fi
14574fi
14575
14576test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14577
14578
14579
14580
14581
14582# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14583if test "x$ax_pthread_ok" = "xyes"; then
14584        threads=yes
14585        :
14586else
14587        ax_pthread_ok=no
14588        threads=no
14589fi
14590ac_ext=cpp
14591ac_cpp='$CXXCPP $CPPFLAGS'
14592ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14593ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14594ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14595
14596
14597  if test "$threads" = "yes"; then
14598    save_LIBS="$LIBS"
14599    LIBS="$PTHREAD_LIBS $LIBS"
14600    save_CXXFLAGS="$CXXFLAGS"
14601    CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14603$as_echo_n "checking for std::thread... " >&6; }
14604if ${gdb_cv_cxx_std_thread+:} false; then :
14605  $as_echo_n "(cached) " >&6
14606else
14607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14608/* end confdefs.h.  */
14609#include <thread>
14610      void callback() { }
14611int
14612main ()
14613{
14614std::thread t(callback);
14615  ;
14616  return 0;
14617}
14618_ACEOF
14619if ac_fn_cxx_try_compile "$LINENO"; then :
14620  gdb_cv_cxx_std_thread=yes
14621else
14622  gdb_cv_cxx_std_thread=no
14623fi
14624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14625fi
14626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14627$as_echo "$gdb_cv_cxx_std_thread" >&6; }
14628
14629    # This check must be here, while LIBS includes any necessary
14630    # threading library.
14631    for ac_func in pthread_sigmask pthread_setname_np
14632do :
14633  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14634ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14635if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14636  cat >>confdefs.h <<_ACEOF
14637#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14638_ACEOF
14639
14640fi
14641done
14642
14643
14644    LIBS="$save_LIBS"
14645    CXXFLAGS="$save_CXXFLAGS"
14646  fi
14647  if test "$gdb_cv_cxx_std_thread" = "yes"; then
14648
14649$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
14650
14651  fi
14652  ac_ext=c
14653ac_cpp='$CPP $CPPFLAGS'
14654ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14655ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14656ac_compiler_gnu=$ac_cv_c_compiler_gnu
14657
14658
14659      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14660$as_echo_n "checking for sigsetjmp... " >&6; }
14661if ${gdb_cv_func_sigsetjmp+:} false; then :
14662  $as_echo_n "(cached) " >&6
14663else
14664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14665/* end confdefs.h.  */
14666#include <setjmp.h>
14667int
14668main ()
14669{
14670sigjmp_buf env;
14671           while (! sigsetjmp (env, 1))
14672             siglongjmp (env, 1);
14673
14674  ;
14675  return 0;
14676}
14677_ACEOF
14678if ac_fn_c_try_compile "$LINENO"; then :
14679  gdb_cv_func_sigsetjmp=yes
14680else
14681  gdb_cv_func_sigsetjmp=no
14682
14683fi
14684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14685
14686fi
14687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14688$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14689  if test "$gdb_cv_func_sigsetjmp" = "yes"; then
14690
14691$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14692
14693  fi
14694
14695
14696# Check whether --with-intel_pt was given.
14697if test "${with_intel_pt+set}" = set; then :
14698  withval=$with_intel_pt;
14699else
14700  with_intel_pt=auto
14701fi
14702
14703  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14704$as_echo_n "checking whether to use intel pt... " >&6; }
14705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14706$as_echo "$with_intel_pt" >&6; }
14707
14708  if test "${with_intel_pt}" = no; then
14709    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14710$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14711    HAVE_LIBIPT=no
14712  else
14713    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14714/* end confdefs.h.  */
14715
14716  #include <linux/perf_event.h>
14717  #ifndef PERF_ATTR_SIZE_VER5
14718  # error
14719  #endif
14720
14721_ACEOF
14722if ac_fn_c_try_cpp "$LINENO"; then :
14723  perf_event=yes
14724else
14725  perf_event=no
14726fi
14727rm -f conftest.err conftest.i conftest.$ac_ext
14728    if test "$perf_event" != yes; then
14729      if test "$with_intel_pt" = yes; then
14730	as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14731      else
14732	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14733$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14734      fi
14735    fi
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745    use_additional=yes
14746
14747  acl_save_prefix="$prefix"
14748  prefix="$acl_final_prefix"
14749  acl_save_exec_prefix="$exec_prefix"
14750  exec_prefix="$acl_final_exec_prefix"
14751
14752    eval additional_includedir=\"$includedir\"
14753    eval additional_libdir=\"$libdir\"
14754
14755  exec_prefix="$acl_save_exec_prefix"
14756  prefix="$acl_save_prefix"
14757
14758
14759# Check whether --with-libipt-prefix was given.
14760if test "${with_libipt_prefix+set}" = set; then :
14761  withval=$with_libipt_prefix;
14762    if test "X$withval" = "Xno"; then
14763      use_additional=no
14764    else
14765      if test "X$withval" = "X"; then
14766
14767  acl_save_prefix="$prefix"
14768  prefix="$acl_final_prefix"
14769  acl_save_exec_prefix="$exec_prefix"
14770  exec_prefix="$acl_final_exec_prefix"
14771
14772          eval additional_includedir=\"$includedir\"
14773          eval additional_libdir=\"$libdir\"
14774
14775  exec_prefix="$acl_save_exec_prefix"
14776  prefix="$acl_save_prefix"
14777
14778      else
14779        additional_includedir="$withval/include"
14780        additional_libdir="$withval/lib"
14781      fi
14782    fi
14783
14784fi
14785
14786
14787# Check whether --with-libipt-type was given.
14788if test "${with_libipt_type+set}" = set; then :
14789  withval=$with_libipt_type;  with_libipt_type=$withval
14790else
14791   with_libipt_type=auto
14792fi
14793
14794  lib_type=`eval echo \$with_libipt_type`
14795
14796      LIBIPT=
14797  LTLIBIPT=
14798  INCIPT=
14799  rpathdirs=
14800  ltrpathdirs=
14801  names_already_handled=
14802  names_next_round='ipt '
14803  while test -n "$names_next_round"; do
14804    names_this_round="$names_next_round"
14805    names_next_round=
14806    for name in $names_this_round; do
14807      already_handled=
14808      for n in $names_already_handled; do
14809        if test "$n" = "$name"; then
14810          already_handled=yes
14811          break
14812        fi
14813      done
14814      if test -z "$already_handled"; then
14815        names_already_handled="$names_already_handled $name"
14816                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14817        eval value=\"\$HAVE_LIB$uppername\"
14818        if test -n "$value"; then
14819          if test "$value" = yes; then
14820            eval value=\"\$LIB$uppername\"
14821            test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14822            eval value=\"\$LTLIB$uppername\"
14823            test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14824          else
14825                                    :
14826          fi
14827        else
14828                              found_dir=
14829          found_la=
14830          found_so=
14831          found_a=
14832          if test $use_additional = yes; then
14833            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14834              found_dir="$additional_libdir"
14835              found_so="$additional_libdir/lib$name.$shlibext"
14836              if test -f "$additional_libdir/lib$name.la"; then
14837                found_la="$additional_libdir/lib$name.la"
14838              fi
14839            elif test x$lib_type != xshared; then
14840              if test -f "$additional_libdir/lib$name.$libext"; then
14841                found_dir="$additional_libdir"
14842                found_a="$additional_libdir/lib$name.$libext"
14843                if test -f "$additional_libdir/lib$name.la"; then
14844                  found_la="$additional_libdir/lib$name.la"
14845                fi
14846              fi
14847            fi
14848          fi
14849          if test "X$found_dir" = "X"; then
14850            for x in $LDFLAGS $LTLIBIPT; do
14851
14852  acl_save_prefix="$prefix"
14853  prefix="$acl_final_prefix"
14854  acl_save_exec_prefix="$exec_prefix"
14855  exec_prefix="$acl_final_exec_prefix"
14856  eval x=\"$x\"
14857  exec_prefix="$acl_save_exec_prefix"
14858  prefix="$acl_save_prefix"
14859
14860              case "$x" in
14861                -L*)
14862                  dir=`echo "X$x" | sed -e 's/^X-L//'`
14863                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14864                    found_dir="$dir"
14865                    found_so="$dir/lib$name.$shlibext"
14866                    if test -f "$dir/lib$name.la"; then
14867                      found_la="$dir/lib$name.la"
14868                    fi
14869                  elif test x$lib_type != xshared; then
14870                    if test -f "$dir/lib$name.$libext"; then
14871                      found_dir="$dir"
14872                      found_a="$dir/lib$name.$libext"
14873                      if test -f "$dir/lib$name.la"; then
14874                        found_la="$dir/lib$name.la"
14875                      fi
14876                    fi
14877                  fi
14878                  ;;
14879              esac
14880              if test "X$found_dir" != "X"; then
14881                break
14882              fi
14883            done
14884          fi
14885          if test "X$found_dir" != "X"; then
14886                        LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14887            if test "X$found_so" != "X"; then
14888                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14889                                LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14890              else
14891                                                                                haveit=
14892                for x in $ltrpathdirs; do
14893                  if test "X$x" = "X$found_dir"; then
14894                    haveit=yes
14895                    break
14896                  fi
14897                done
14898                if test -z "$haveit"; then
14899                  ltrpathdirs="$ltrpathdirs $found_dir"
14900                fi
14901                                if test "$hardcode_direct" = yes; then
14902                                                      LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14903                else
14904                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14905                                                            LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14906                                                            haveit=
14907                    for x in $rpathdirs; do
14908                      if test "X$x" = "X$found_dir"; then
14909                        haveit=yes
14910                        break
14911                      fi
14912                    done
14913                    if test -z "$haveit"; then
14914                      rpathdirs="$rpathdirs $found_dir"
14915                    fi
14916                  else
14917                                                                                haveit=
14918                    for x in $LDFLAGS $LIBIPT; do
14919
14920  acl_save_prefix="$prefix"
14921  prefix="$acl_final_prefix"
14922  acl_save_exec_prefix="$exec_prefix"
14923  exec_prefix="$acl_final_exec_prefix"
14924  eval x=\"$x\"
14925  exec_prefix="$acl_save_exec_prefix"
14926  prefix="$acl_save_prefix"
14927
14928                      if test "X$x" = "X-L$found_dir"; then
14929                        haveit=yes
14930                        break
14931                      fi
14932                    done
14933                    if test -z "$haveit"; then
14934                      LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14935                    fi
14936                    if test "$hardcode_minus_L" != no; then
14937                                                                                        LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14938                    else
14939                                                                                                                                                                                LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14940                    fi
14941                  fi
14942                fi
14943              fi
14944            else
14945              if test "X$found_a" != "X"; then
14946                                LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14947              else
14948                                                LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14949              fi
14950            fi
14951                        additional_includedir=
14952            case "$found_dir" in
14953              */lib | */lib/)
14954                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14955                additional_includedir="$basedir/include"
14956                ;;
14957            esac
14958            if test "X$additional_includedir" != "X"; then
14959                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
14960                haveit=
14961                if test "X$additional_includedir" = "X/usr/local/include"; then
14962                  if test -n "$GCC"; then
14963                    case $host_os in
14964                      linux*) haveit=yes;;
14965                    esac
14966                  fi
14967                fi
14968                if test -z "$haveit"; then
14969                  for x in $CPPFLAGS $INCIPT; do
14970
14971  acl_save_prefix="$prefix"
14972  prefix="$acl_final_prefix"
14973  acl_save_exec_prefix="$exec_prefix"
14974  exec_prefix="$acl_final_exec_prefix"
14975  eval x=\"$x\"
14976  exec_prefix="$acl_save_exec_prefix"
14977  prefix="$acl_save_prefix"
14978
14979                    if test "X$x" = "X-I$additional_includedir"; then
14980                      haveit=yes
14981                      break
14982                    fi
14983                  done
14984                  if test -z "$haveit"; then
14985                    if test -d "$additional_includedir"; then
14986                                            INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14987                    fi
14988                  fi
14989                fi
14990              fi
14991            fi
14992                        if test -n "$found_la"; then
14993                                                        save_libdir="$libdir"
14994              case "$found_la" in
14995                */* | *\\*) . "$found_la" ;;
14996                *) . "./$found_la" ;;
14997              esac
14998              libdir="$save_libdir"
14999                            for dep in $dependency_libs; do
15000                case "$dep" in
15001                  -L*)
15002                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15003                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
15004                      haveit=
15005                      if test "X$additional_libdir" = "X/usr/local/lib"; then
15006                        if test -n "$GCC"; then
15007                          case $host_os in
15008                            linux*) haveit=yes;;
15009                          esac
15010                        fi
15011                      fi
15012                      if test -z "$haveit"; then
15013                        haveit=
15014                        for x in $LDFLAGS $LIBIPT; do
15015
15016  acl_save_prefix="$prefix"
15017  prefix="$acl_final_prefix"
15018  acl_save_exec_prefix="$exec_prefix"
15019  exec_prefix="$acl_final_exec_prefix"
15020  eval x=\"$x\"
15021  exec_prefix="$acl_save_exec_prefix"
15022  prefix="$acl_save_prefix"
15023
15024                          if test "X$x" = "X-L$additional_libdir"; then
15025                            haveit=yes
15026                            break
15027                          fi
15028                        done
15029                        if test -z "$haveit"; then
15030                          if test -d "$additional_libdir"; then
15031                                                        LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
15032                          fi
15033                        fi
15034                        haveit=
15035                        for x in $LDFLAGS $LTLIBIPT; do
15036
15037  acl_save_prefix="$prefix"
15038  prefix="$acl_final_prefix"
15039  acl_save_exec_prefix="$exec_prefix"
15040  exec_prefix="$acl_final_exec_prefix"
15041  eval x=\"$x\"
15042  exec_prefix="$acl_save_exec_prefix"
15043  prefix="$acl_save_prefix"
15044
15045                          if test "X$x" = "X-L$additional_libdir"; then
15046                            haveit=yes
15047                            break
15048                          fi
15049                        done
15050                        if test -z "$haveit"; then
15051                          if test -d "$additional_libdir"; then
15052                                                        LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
15053                          fi
15054                        fi
15055                      fi
15056                    fi
15057                    ;;
15058                  -R*)
15059                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
15060                    if test "$enable_rpath" != no; then
15061                                                                  haveit=
15062                      for x in $rpathdirs; do
15063                        if test "X$x" = "X$dir"; then
15064                          haveit=yes
15065                          break
15066                        fi
15067                      done
15068                      if test -z "$haveit"; then
15069                        rpathdirs="$rpathdirs $dir"
15070                      fi
15071                                                                  haveit=
15072                      for x in $ltrpathdirs; do
15073                        if test "X$x" = "X$dir"; then
15074                          haveit=yes
15075                          break
15076                        fi
15077                      done
15078                      if test -z "$haveit"; then
15079                        ltrpathdirs="$ltrpathdirs $dir"
15080                      fi
15081                    fi
15082                    ;;
15083                  -l*)
15084                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15085                    ;;
15086                  *.la)
15087                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15088                    ;;
15089                  *)
15090                                        LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
15091                    LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
15092                    ;;
15093                esac
15094              done
15095            fi
15096          else
15097                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
15098              LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15099              LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
15100            else
15101              LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
15102              LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
15103            fi
15104          fi
15105        fi
15106      fi
15107    done
15108  done
15109  if test "X$rpathdirs" != "X"; then
15110    if test -n "$hardcode_libdir_separator"; then
15111                        alldirs=
15112      for found_dir in $rpathdirs; do
15113        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15114      done
15115            acl_save_libdir="$libdir"
15116      libdir="$alldirs"
15117      eval flag=\"$hardcode_libdir_flag_spec\"
15118      libdir="$acl_save_libdir"
15119      LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15120    else
15121            for found_dir in $rpathdirs; do
15122        acl_save_libdir="$libdir"
15123        libdir="$found_dir"
15124        eval flag=\"$hardcode_libdir_flag_spec\"
15125        libdir="$acl_save_libdir"
15126        LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15127      done
15128    fi
15129  fi
15130  if test "X$ltrpathdirs" != "X"; then
15131            for found_dir in $ltrpathdirs; do
15132      LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
15133    done
15134  fi
15135
15136
15137        ac_save_CPPFLAGS="$CPPFLAGS"
15138
15139  for element in $INCIPT; do
15140    haveit=
15141    for x in $CPPFLAGS; do
15142
15143  acl_save_prefix="$prefix"
15144  prefix="$acl_final_prefix"
15145  acl_save_exec_prefix="$exec_prefix"
15146  exec_prefix="$acl_final_exec_prefix"
15147  eval x=\"$x\"
15148  exec_prefix="$acl_save_exec_prefix"
15149  prefix="$acl_save_prefix"
15150
15151      if test "X$x" = "X$element"; then
15152        haveit=yes
15153        break
15154      fi
15155    done
15156    if test -z "$haveit"; then
15157      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15158    fi
15159  done
15160
15161
15162  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
15163$as_echo_n "checking for libipt... " >&6; }
15164if ${ac_cv_libipt+:} false; then :
15165  $as_echo_n "(cached) " >&6
15166else
15167
15168    ac_save_LIBS="$LIBS"
15169    LIBS="$LIBS $LIBIPT"
15170    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15171/* end confdefs.h.  */
15172#include "intel-pt.h"
15173int
15174main ()
15175{
15176pt_insn_alloc_decoder (0);
15177  ;
15178  return 0;
15179}
15180_ACEOF
15181if ac_fn_c_try_link "$LINENO"; then :
15182  ac_cv_libipt=yes
15183else
15184  ac_cv_libipt=no
15185fi
15186rm -f core conftest.err conftest.$ac_objext \
15187    conftest$ac_exeext conftest.$ac_ext
15188    LIBS="$ac_save_LIBS"
15189
15190fi
15191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
15192$as_echo "$ac_cv_libipt" >&6; }
15193  if test "$ac_cv_libipt" = yes; then
15194    HAVE_LIBIPT=yes
15195
15196$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
15197
15198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
15199$as_echo_n "checking how to link with libipt... " >&6; }
15200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
15201$as_echo "$LIBIPT" >&6; }
15202  else
15203    HAVE_LIBIPT=no
15204            CPPFLAGS="$ac_save_CPPFLAGS"
15205    LIBIPT=
15206    LTLIBIPT=
15207  fi
15208
15209
15210
15211
15212
15213
15214    if test "$HAVE_LIBIPT" != yes; then
15215      if test "$with_intel_pt" = yes; then
15216	as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
15217      else
15218	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
15219$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
15220      fi
15221    else
15222      save_LIBS=$LIBS
15223      LIBS="$LIBS $LIBIPT"
15224      for ac_func in pt_insn_event
15225do :
15226  ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
15227if test "x$ac_cv_func_pt_insn_event" = xyes; then :
15228  cat >>confdefs.h <<_ACEOF
15229#define HAVE_PT_INSN_EVENT 1
15230_ACEOF
15231
15232fi
15233done
15234
15235      ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
15236"
15237if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
15238
15239cat >>confdefs.h <<_ACEOF
15240#define HAVE_STRUCT_PT_INSN_ENABLED 1
15241_ACEOF
15242
15243
15244fi
15245ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
15246"
15247if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
15248
15249cat >>confdefs.h <<_ACEOF
15250#define HAVE_STRUCT_PT_INSN_RESYNCED 1
15251_ACEOF
15252
15253
15254fi
15255
15256      LIBS=$save_LIBS
15257    fi
15258  fi
15259
15260
15261$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
15262
15263 for ac_header in sys/procfs.h
15264do :
15265  ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
15266if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
15267  cat >>confdefs.h <<_ACEOF
15268#define HAVE_SYS_PROCFS_H 1
15269_ACEOF
15270
15271fi
15272
15273done
15274
15275  if test "$ac_cv_header_sys_procfs_h" = yes; then
15276
15277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
15278$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
15279 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
15280  $as_echo_n "(cached) " >&6
15281else
15282  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15283/* end confdefs.h.  */
15284
15285#define _SYSCALL32
15286#include <sys/procfs.h>
15287int
15288main ()
15289{
15290gregset_t avar
15291  ;
15292  return 0;
15293}
15294_ACEOF
15295if ac_fn_c_try_compile "$LINENO"; then :
15296  bfd_cv_have_sys_procfs_type_gregset_t=yes
15297else
15298  bfd_cv_have_sys_procfs_type_gregset_t=no
15299
15300fi
15301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15302fi
15303
15304 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
15305
15306$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
15307
15308 fi
15309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
15310$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
15311
15312
15313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
15314$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
15315 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
15316  $as_echo_n "(cached) " >&6
15317else
15318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15319/* end confdefs.h.  */
15320
15321#define _SYSCALL32
15322#include <sys/procfs.h>
15323int
15324main ()
15325{
15326fpregset_t avar
15327  ;
15328  return 0;
15329}
15330_ACEOF
15331if ac_fn_c_try_compile "$LINENO"; then :
15332  bfd_cv_have_sys_procfs_type_fpregset_t=yes
15333else
15334  bfd_cv_have_sys_procfs_type_fpregset_t=no
15335
15336fi
15337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15338fi
15339
15340 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
15341
15342$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
15343
15344 fi
15345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
15346$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
15347
15348
15349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
15350$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
15351 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
15352  $as_echo_n "(cached) " >&6
15353else
15354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15355/* end confdefs.h.  */
15356
15357#define _SYSCALL32
15358#include <sys/procfs.h>
15359int
15360main ()
15361{
15362prgregset_t avar
15363  ;
15364  return 0;
15365}
15366_ACEOF
15367if ac_fn_c_try_compile "$LINENO"; then :
15368  bfd_cv_have_sys_procfs_type_prgregset_t=yes
15369else
15370  bfd_cv_have_sys_procfs_type_prgregset_t=no
15371
15372fi
15373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15374fi
15375
15376 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
15377
15378$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
15379
15380 fi
15381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15382$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
15383
15384
15385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
15386$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
15387 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
15388  $as_echo_n "(cached) " >&6
15389else
15390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15391/* end confdefs.h.  */
15392
15393#define _SYSCALL32
15394#include <sys/procfs.h>
15395int
15396main ()
15397{
15398prfpregset_t avar
15399  ;
15400  return 0;
15401}
15402_ACEOF
15403if ac_fn_c_try_compile "$LINENO"; then :
15404  bfd_cv_have_sys_procfs_type_prfpregset_t=yes
15405else
15406  bfd_cv_have_sys_procfs_type_prfpregset_t=no
15407
15408fi
15409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15410fi
15411
15412 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
15413
15414$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
15415
15416 fi
15417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15418$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
15419
15420
15421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
15422$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
15423 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
15424  $as_echo_n "(cached) " >&6
15425else
15426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15427/* end confdefs.h.  */
15428
15429#define _SYSCALL32
15430#include <sys/procfs.h>
15431int
15432main ()
15433{
15434prgregset32_t avar
15435  ;
15436  return 0;
15437}
15438_ACEOF
15439if ac_fn_c_try_compile "$LINENO"; then :
15440  bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15441else
15442  bfd_cv_have_sys_procfs_type_prgregset32_t=no
15443
15444fi
15445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15446fi
15447
15448 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
15449
15450$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
15451
15452 fi
15453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15454$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
15455
15456
15457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15458$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15459 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
15460  $as_echo_n "(cached) " >&6
15461else
15462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15463/* end confdefs.h.  */
15464
15465#define _SYSCALL32
15466#include <sys/procfs.h>
15467int
15468main ()
15469{
15470lwpid_t avar
15471  ;
15472  return 0;
15473}
15474_ACEOF
15475if ac_fn_c_try_compile "$LINENO"; then :
15476  bfd_cv_have_sys_procfs_type_lwpid_t=yes
15477else
15478  bfd_cv_have_sys_procfs_type_lwpid_t=no
15479
15480fi
15481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15482fi
15483
15484 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
15485
15486$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
15487
15488 fi
15489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15490$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
15491
15492
15493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15494$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15495 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
15496  $as_echo_n "(cached) " >&6
15497else
15498  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15499/* end confdefs.h.  */
15500
15501#define _SYSCALL32
15502#include <sys/procfs.h>
15503int
15504main ()
15505{
15506psaddr_t avar
15507  ;
15508  return 0;
15509}
15510_ACEOF
15511if ac_fn_c_try_compile "$LINENO"; then :
15512  bfd_cv_have_sys_procfs_type_psaddr_t=yes
15513else
15514  bfd_cv_have_sys_procfs_type_psaddr_t=no
15515
15516fi
15517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15518fi
15519
15520 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
15521
15522$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
15523
15524 fi
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15526$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15527
15528
15529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
15530$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15531 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
15532  $as_echo_n "(cached) " >&6
15533else
15534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15535/* end confdefs.h.  */
15536
15537#define _SYSCALL32
15538#include <sys/procfs.h>
15539int
15540main ()
15541{
15542elf_fpregset_t avar
15543  ;
15544  return 0;
15545}
15546_ACEOF
15547if ac_fn_c_try_compile "$LINENO"; then :
15548  bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
15549else
15550  bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15551
15552fi
15553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15554fi
15555
15556 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
15557
15558$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
15559
15560 fi
15561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15562$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
15563
15564  fi
15565
15566
15567# Check the return and argument types of ptrace.
15568
15569
15570for ac_header in sys/ptrace.h ptrace.h
15571do :
15572  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15573ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15574if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15575  cat >>confdefs.h <<_ACEOF
15576#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15577_ACEOF
15578
15579fi
15580
15581done
15582
15583
15584gdb_ptrace_headers='
15585#include <sys/types.h>
15586#if HAVE_SYS_PTRACE_H
15587# include <sys/ptrace.h>
15588#endif
15589#if HAVE_UNISTD_H
15590# include <unistd.h>
15591#endif
15592'
15593
15594# Check return type.  Varargs (used on GNU/Linux) conflict with the
15595# empty argument list, so check for that explicitly.
15596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15597$as_echo_n "checking return type of ptrace... " >&6; }
15598if ${gdb_cv_func_ptrace_ret+:} false; then :
15599  $as_echo_n "(cached) " >&6
15600else
15601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15602/* end confdefs.h.  */
15603 $gdb_ptrace_headers
15604int
15605main ()
15606{
15607extern long ptrace (enum __ptrace_request, ...);
15608
15609  ;
15610  return 0;
15611}
15612_ACEOF
15613if ac_fn_c_try_compile "$LINENO"; then :
15614  gdb_cv_func_ptrace_ret='long'
15615else
15616  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15617/* end confdefs.h.  */
15618$gdb_ptrace_headers
15619int
15620main ()
15621{
15622extern int ptrace ();
15623
15624  ;
15625  return 0;
15626}
15627_ACEOF
15628if ac_fn_c_try_compile "$LINENO"; then :
15629  gdb_cv_func_ptrace_ret='int'
15630else
15631  gdb_cv_func_ptrace_ret='long'
15632
15633fi
15634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15635
15636fi
15637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15638
15639fi
15640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15641$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
15642
15643
15644cat >>confdefs.h <<_ACEOF
15645#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
15646_ACEOF
15647
15648
15649# Check argument types.
15650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15651$as_echo_n "checking types of arguments for ptrace... " >&6; }
15652if ${gdb_cv_func_ptrace_args+:} false; then :
15653  $as_echo_n "(cached) " >&6
15654else
15655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15656/* end confdefs.h.  */
15657$gdb_ptrace_headers
15658int
15659main ()
15660{
15661extern long ptrace (enum __ptrace_request, ...);
15662
15663  ;
15664  return 0;
15665}
15666_ACEOF
15667if ac_fn_c_try_compile "$LINENO"; then :
15668  gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15669else
15670  for gdb_arg1 in 'int' 'long'; do
15671	for gdb_arg2 in 'pid_t' 'int' 'long'; do
15672	  for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15673	    for gdb_arg4 in 'int' 'long' 'void *'; do
15674	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15675/* end confdefs.h.  */
15676$gdb_ptrace_headers
15677int
15678main ()
15679{
15680extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15681
15682  ;
15683  return 0;
15684}
15685_ACEOF
15686if ac_fn_c_try_compile "$LINENO"; then :
15687  gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15688		 break 4;
15689
15690fi
15691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15692
15693	      for gdb_arg5 in 'int *' 'int' 'long'; do
15694		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15695/* end confdefs.h.  */
15696$gdb_ptrace_headers
15697int
15698main ()
15699{
15700extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15701
15702  ;
15703  return 0;
15704}
15705_ACEOF
15706if ac_fn_c_try_compile "$LINENO"; then :
15707  gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15708		   break 5;
15709
15710fi
15711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15712	      done
15713	    done
15714	  done
15715	done
15716      done
15717      # Provide a safe default value.
15718      : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15719
15720fi
15721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15722
15723fi
15724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15725$as_echo "$gdb_cv_func_ptrace_args" >&6; }
15726
15727ac_save_IFS=$IFS; IFS=','
15728set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15729IFS=$ac_save_IFS
15730shift
15731
15732cat >>confdefs.h <<_ACEOF
15733#define PTRACE_TYPE_ARG1 $1
15734_ACEOF
15735
15736
15737cat >>confdefs.h <<_ACEOF
15738#define PTRACE_TYPE_ARG3 $3
15739_ACEOF
15740
15741
15742cat >>confdefs.h <<_ACEOF
15743#define PTRACE_TYPE_ARG4 $4
15744_ACEOF
15745
15746if test -n "$5"; then
15747
15748cat >>confdefs.h <<_ACEOF
15749#define PTRACE_TYPE_ARG5 $5
15750_ACEOF
15751
15752fi
15753
15754
15755if test "$cross_compiling" = no; then
15756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15757$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15758if ${ac_cv_func_setpgrp_void+:} false; then :
15759  $as_echo_n "(cached) " >&6
15760else
15761  if test "$cross_compiling" = yes; then :
15762  as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
15763else
15764  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15765/* end confdefs.h.  */
15766$ac_includes_default
15767int
15768main ()
15769{
15770/* If this system has a BSD-style setpgrp which takes arguments,
15771  setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15772  exit successfully. */
15773  return setpgrp (1,1) != -1;
15774  ;
15775  return 0;
15776}
15777_ACEOF
15778if ac_fn_c_try_run "$LINENO"; then :
15779  ac_cv_func_setpgrp_void=no
15780else
15781  ac_cv_func_setpgrp_void=yes
15782fi
15783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15784  conftest.$ac_objext conftest.beam conftest.$ac_ext
15785fi
15786
15787fi
15788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15789$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15790if test $ac_cv_func_setpgrp_void = yes; then
15791
15792$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15793
15794fi
15795
15796else
15797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15798$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15799if ${ac_cv_func_setpgrp_void+:} false; then :
15800  $as_echo_n "(cached) " >&6
15801else
15802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15803/* end confdefs.h.  */
15804#include <unistd.h>
15805int
15806main ()
15807{
15808if (setpgrp(1,1) == -1)
15809	     exit (0);
15810	   else
15811	     exit (1);
15812
15813  ;
15814  return 0;
15815}
15816_ACEOF
15817if ac_fn_c_try_compile "$LINENO"; then :
15818  ac_cv_func_setpgrp_void=no
15819else
15820  ac_cv_func_setpgrp_void=yes
15821
15822fi
15823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15824
15825fi
15826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15827$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15828if test "$ac_cv_func_setpgrp_void" = yes; then
15829  $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15830
15831fi
15832fi
15833
15834# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15835ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15836#include <sys/proc.h>
15837
15838"
15839if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
15840
15841cat >>confdefs.h <<_ACEOF
15842#define HAVE_STRUCT_THREAD_TD_PCB 1
15843_ACEOF
15844
15845
15846fi
15847
15848
15849# See if <sys/lwp.h> defines `struct lwp`.
15850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15851$as_echo_n "checking for struct lwp... " >&6; }
15852if ${gdb_cv_struct_lwp+:} false; then :
15853  $as_echo_n "(cached) " >&6
15854else
15855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15856/* end confdefs.h.  */
15857#include <sys/param.h>
15858	 #define _KMEMUSER
15859	 #include <sys/lwp.h>
15860int
15861main ()
15862{
15863struct lwp l;
15864
15865  ;
15866  return 0;
15867}
15868_ACEOF
15869if ac_fn_c_try_compile "$LINENO"; then :
15870  gdb_cv_struct_lwp=yes
15871else
15872  gdb_cv_struct_lwp=no
15873
15874fi
15875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15876
15877fi
15878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15879$as_echo "$gdb_cv_struct_lwp" >&6; }
15880if test "$gdb_cv_struct_lwp" = yes; then
15881
15882$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
15883
15884fi
15885
15886# See if <machine/reg.h> degines `struct reg'.
15887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15888$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15889if ${gdb_cv_struct_reg+:} false; then :
15890  $as_echo_n "(cached) " >&6
15891else
15892  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15893/* end confdefs.h.  */
15894#include <sys/types.h>
15895	 #include <machine/reg.h>
15896int
15897main ()
15898{
15899struct reg r;
15900
15901  ;
15902  return 0;
15903}
15904_ACEOF
15905if ac_fn_c_try_compile "$LINENO"; then :
15906  gdb_cv_struct_reg=yes
15907else
15908  gdb_cv_struct_reg=no
15909
15910fi
15911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15912
15913fi
15914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15915$as_echo "$gdb_cv_struct_reg" >&6; }
15916if test "$gdb_cv_struct_reg" = yes; then
15917
15918$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
15919
15920fi
15921
15922# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15923# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15924ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15925#include <machine/reg.h>
15926"
15927if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
15928
15929cat >>confdefs.h <<_ACEOF
15930#define HAVE_STRUCT_REG_R_FS 1
15931_ACEOF
15932
15933
15934fi
15935ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15936#include <machine/reg.h>
15937"
15938if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15939
15940cat >>confdefs.h <<_ACEOF
15941#define HAVE_STRUCT_REG_R_GS 1
15942_ACEOF
15943
15944
15945fi
15946
15947
15948# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15950$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15951if ${gdb_cv_have_ptrace_getregs+:} false; then :
15952  $as_echo_n "(cached) " >&6
15953else
15954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15955/* end confdefs.h.  */
15956#include <sys/ptrace.h>
15957int
15958main ()
15959{
15960PTRACE_GETREGS;
15961  ;
15962  return 0;
15963}
15964_ACEOF
15965if ac_fn_c_try_compile "$LINENO"; then :
15966  gdb_cv_have_ptrace_getregs=yes
15967else
15968  gdb_cv_have_ptrace_getregs=no
15969
15970fi
15971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15972
15973fi
15974
15975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15976$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15977if test "$gdb_cv_have_ptrace_getregs" = yes; then
15978
15979$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
15980
15981fi
15982
15983# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15985$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15986if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
15987  $as_echo_n "(cached) " >&6
15988else
15989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15990/* end confdefs.h.  */
15991#include <sys/ptrace.h>
15992int
15993main ()
15994{
15995PTRACE_GETFPXREGS;
15996  ;
15997  return 0;
15998}
15999_ACEOF
16000if ac_fn_c_try_compile "$LINENO"; then :
16001  gdb_cv_have_ptrace_getfpxregs=yes
16002else
16003  gdb_cv_have_ptrace_getfpxregs=no
16004
16005fi
16006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16007
16008fi
16009
16010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
16011$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
16012if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
16013
16014$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
16015
16016fi
16017
16018# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
16019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
16020$as_echo_n "checking for PT_GETDBREGS... " >&6; }
16021if ${gdb_cv_have_pt_getdbregs+:} false; then :
16022  $as_echo_n "(cached) " >&6
16023else
16024  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16025/* end confdefs.h.  */
16026#include <sys/types.h>
16027	 #include <sys/ptrace.h>
16028int
16029main ()
16030{
16031PT_GETDBREGS;
16032
16033  ;
16034  return 0;
16035}
16036_ACEOF
16037if ac_fn_c_try_compile "$LINENO"; then :
16038  gdb_cv_have_pt_getdbregs=yes
16039else
16040  gdb_cv_have_pt_getdbregs=no
16041
16042fi
16043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16044
16045fi
16046
16047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
16048$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
16049if test "$gdb_cv_have_pt_getdbregs" = yes; then
16050
16051$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
16052
16053fi
16054
16055# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
16056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
16057$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
16058if ${gdb_cv_have_pt_getxmmregs+:} false; then :
16059  $as_echo_n "(cached) " >&6
16060else
16061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16062/* end confdefs.h.  */
16063#include <sys/types.h>
16064	 #include <sys/ptrace.h>
16065int
16066main ()
16067{
16068PT_GETXMMREGS;
16069
16070  ;
16071  return 0;
16072}
16073_ACEOF
16074if ac_fn_c_try_compile "$LINENO"; then :
16075  gdb_cv_have_pt_getxmmregs=yes
16076else
16077  gdb_cv_have_pt_getxmmregs=no
16078
16079fi
16080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16081
16082fi
16083
16084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
16085$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
16086if test "$gdb_cv_have_pt_getxmmregs" = yes; then
16087
16088$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
16089
16090fi
16091
16092# See if <sys/ptrace.h> supports LWP names on FreeBSD
16093# Older FreeBSD versions don't have the pl_tdname member of
16094# `struct ptrace_lwpinfo'.
16095ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
16096"
16097if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
16098
16099cat >>confdefs.h <<_ACEOF
16100#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
16101_ACEOF
16102
16103
16104fi
16105
16106
16107# See if <sys/ptrace.h> supports syscall fields on FreeBSD.  The
16108# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
16109# FreeBSD 10.3.
16110ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
16111"
16112if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
16113
16114cat >>confdefs.h <<_ACEOF
16115#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
16116_ACEOF
16117
16118
16119fi
16120
16121
16122# Check if the compiler supports the `long long' type.
16123
16124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
16125$as_echo_n "checking for long long support in compiler... " >&6; }
16126if ${gdb_cv_c_long_long+:} false; then :
16127  $as_echo_n "(cached) " >&6
16128else
16129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16130/* end confdefs.h.  */
16131extern long long foo;
16132int
16133main ()
16134{
16135switch (foo & 2) { case 0: return 1; }
16136  ;
16137  return 0;
16138}
16139_ACEOF
16140if ac_fn_c_try_compile "$LINENO"; then :
16141  gdb_cv_c_long_long=yes
16142else
16143  gdb_cv_c_long_long=no
16144fi
16145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16146fi
16147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
16148$as_echo "$gdb_cv_c_long_long" >&6; }
16149if test "$gdb_cv_c_long_long" != yes; then
16150  # libdecnumber requires long long.
16151  as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
16152fi
16153
16154# Check if the compiler and runtime support printing long longs.
16155
16156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
16157$as_echo_n "checking for long long support in printf... " >&6; }
16158if ${gdb_cv_printf_has_long_long+:} false; then :
16159  $as_echo_n "(cached) " >&6
16160else
16161  if test "$cross_compiling" = yes; then :
16162  gdb_cv_printf_has_long_long=no
16163else
16164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16165/* end confdefs.h.  */
16166$ac_includes_default
16167int
16168main ()
16169{
16170char buf[32];
16171  long long l = 0;
16172  l = (l << 16) + 0x0123;
16173  l = (l << 16) + 0x4567;
16174  l = (l << 16) + 0x89ab;
16175  l = (l << 16) + 0xcdef;
16176  sprintf (buf, "0x%016llx", l);
16177  return (strcmp ("0x0123456789abcdef", buf));
16178  ;
16179  return 0;
16180}
16181_ACEOF
16182if ac_fn_c_try_run "$LINENO"; then :
16183  gdb_cv_printf_has_long_long=yes
16184else
16185  gdb_cv_printf_has_long_long=no
16186fi
16187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16188  conftest.$ac_objext conftest.beam conftest.$ac_ext
16189fi
16190
16191fi
16192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
16193$as_echo "$gdb_cv_printf_has_long_long" >&6; }
16194if test "$gdb_cv_printf_has_long_long" = yes; then
16195
16196$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
16197
16198fi
16199
16200# Check if the compiler and runtime support printing decfloats.
16201
16202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
16203$as_echo_n "checking for decfloat support in printf... " >&6; }
16204if ${gdb_cv_printf_has_decfloat+:} false; then :
16205  $as_echo_n "(cached) " >&6
16206else
16207  if test "$cross_compiling" = yes; then :
16208  gdb_cv_printf_has_decfloat=no
16209else
16210  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16211/* end confdefs.h.  */
16212$ac_includes_default
16213int
16214main ()
16215{
16216char buf[64];
16217  _Decimal32 d32 = 1.2345df;
16218  _Decimal64 d64 = 1.2345dd;
16219  _Decimal128 d128 = 1.2345dl;
16220  sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
16221  return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
16222  ;
16223  return 0;
16224}
16225_ACEOF
16226if ac_fn_c_try_run "$LINENO"; then :
16227  gdb_cv_printf_has_decfloat=yes
16228else
16229  gdb_cv_printf_has_decfloat=no
16230fi
16231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16232  conftest.$ac_objext conftest.beam conftest.$ac_ext
16233fi
16234
16235fi
16236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
16237$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
16238if test "$gdb_cv_printf_has_decfloat" = yes; then
16239
16240$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
16241
16242fi
16243
16244# Check if the compiler supports the `long double' type.  We can't use
16245# AC_C_LONG_DOUBLE because that one does additional checks on the
16246# constants defined in <float.h> that fail on some systems,
16247# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
16248
16249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
16250$as_echo_n "checking for long double support in compiler... " >&6; }
16251if ${gdb_cv_c_long_double+:} false; then :
16252  $as_echo_n "(cached) " >&6
16253else
16254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16255/* end confdefs.h.  */
16256long double foo;
16257_ACEOF
16258if ac_fn_c_try_compile "$LINENO"; then :
16259  gdb_cv_c_long_double=yes
16260else
16261  gdb_cv_c_long_double=no
16262fi
16263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16264fi
16265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
16266$as_echo "$gdb_cv_c_long_double" >&6; }
16267if test "$gdb_cv_c_long_double" = yes; then
16268
16269$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
16270
16271fi
16272
16273# Check if the compiler and runtime support printing long doubles.
16274
16275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
16276$as_echo_n "checking for long double support in printf... " >&6; }
16277if ${gdb_cv_printf_has_long_double+:} false; then :
16278  $as_echo_n "(cached) " >&6
16279else
16280  if test "$cross_compiling" = yes; then :
16281  gdb_cv_printf_has_long_double=no
16282else
16283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16284/* end confdefs.h.  */
16285$ac_includes_default
16286int
16287main ()
16288{
16289char buf[16];
16290  long double f = 3.141592653;
16291  sprintf (buf, "%Lg", f);
16292  return (strncmp ("3.14159", buf, 7));
16293  ;
16294  return 0;
16295}
16296_ACEOF
16297if ac_fn_c_try_run "$LINENO"; then :
16298  gdb_cv_printf_has_long_double=yes
16299else
16300  gdb_cv_printf_has_long_double=no
16301fi
16302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16303  conftest.$ac_objext conftest.beam conftest.$ac_ext
16304fi
16305
16306fi
16307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
16308$as_echo "$gdb_cv_printf_has_long_double" >&6; }
16309if test "$gdb_cv_printf_has_long_double" = yes; then
16310
16311$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
16312
16313fi
16314
16315# Check if the compiler and runtime support scanning long doubles.
16316
16317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
16318$as_echo_n "checking for long double support in scanf... " >&6; }
16319if ${gdb_cv_scanf_has_long_double+:} false; then :
16320  $as_echo_n "(cached) " >&6
16321else
16322  if test "$cross_compiling" = yes; then :
16323  gdb_cv_scanf_has_long_double=no
16324else
16325  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16326/* end confdefs.h.  */
16327#include <stdio.h>
16328int
16329main ()
16330{
16331char *buf = "3.141592653";
16332  long double f = 0;
16333  sscanf (buf, "%Lg", &f);
16334  return !(f > 3.14159 && f < 3.14160);
16335  ;
16336  return 0;
16337}
16338_ACEOF
16339if ac_fn_c_try_run "$LINENO"; then :
16340  gdb_cv_scanf_has_long_double=yes
16341else
16342  gdb_cv_scanf_has_long_double=no
16343fi
16344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16345  conftest.$ac_objext conftest.beam conftest.$ac_ext
16346fi
16347
16348fi
16349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
16350$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
16351if test "$gdb_cv_scanf_has_long_double" = yes; then
16352
16353$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
16354
16355fi
16356
16357case ${host_os} in
16358aix*)
16359  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
16360$as_echo_n "checking for -bbigtoc option... " >&6; }
16361if ${gdb_cv_bigtoc+:} false; then :
16362  $as_echo_n "(cached) " >&6
16363else
16364  SAVE_LDFLAGS=$LDFLAGS
16365
16366     case $GCC in
16367       yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
16368       *) gdb_cv_bigtoc=-bbigtoc ;;
16369     esac
16370
16371     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
16372     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16373/* end confdefs.h.  */
16374
16375int
16376main ()
16377{
16378int i;
16379  ;
16380  return 0;
16381}
16382_ACEOF
16383if ac_fn_c_try_link "$LINENO"; then :
16384
16385else
16386  gdb_cv_bigtoc=
16387
16388fi
16389rm -f core conftest.err conftest.$ac_objext \
16390    conftest$ac_exeext conftest.$ac_ext
16391     LDFLAGS="${SAVE_LDFLAGS}"
16392
16393fi
16394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
16395$as_echo "$gdb_cv_bigtoc" >&6; }
16396  CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16397  ;;
16398esac
16399
16400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
16401$as_echo_n "checking for the dynamic export flag... " >&6; }
16402dynamic_list=false
16403if test "${gdb_native}" = yes; then
16404   # The dynamically loaded libthread_db needs access to symbols in the gdb
16405   # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
16406   # may not be supported there.
16407   old_LDFLAGS="$LDFLAGS"
16408   # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16409   RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16410   LDFLAGS="$LDFLAGS $RDYNAMIC"
16411   if test "${have_libpython}" = no; then
16412     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16413/* end confdefs.h.  */
16414
16415int
16416main ()
16417{
16418
16419  ;
16420  return 0;
16421}
16422_ACEOF
16423if ac_fn_c_try_link "$LINENO"; then :
16424  dynamic_list=true
16425fi
16426rm -f core conftest.err conftest.$ac_objext \
16427    conftest$ac_exeext conftest.$ac_ext
16428   else
16429     # Workaround http://bugs.python.org/issue4434 where static
16430     # libpythonX.Y.a would get its symbols required for
16431     # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16432     # Problem does not happen for the recommended libpythonX.Y.so linkage.
16433
16434     # Note the workaround for Python
16435     # http://bugs.python.org/issue10112 earlier has removed
16436     # -export-dynamic from PYTHON_LIBS.  That's exactly what we want
16437     # here too, as otherwise it'd make this -Wl,--dynamic-list test
16438     # always pass.
16439     old_CFLAGS="$CFLAGS"
16440     CFLAGS="$CFLAGS $PYTHON_CFLAGS"
16441     old_LIBS="$LIBS"
16442     LIBS="$LIBS $PYTHON_LIBS"
16443     old_CPPFLAGS="$CPPFLAGS"
16444     CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16445     if test "$cross_compiling" = yes; then :
16446  true
16447else
16448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16449/* end confdefs.h.  */
16450#include "Python.h"
16451int
16452main ()
16453{
16454int err;
16455          Py_Initialize ();
16456          err = PyRun_SimpleString ("import ctypes\n");
16457          Py_Finalize ();
16458          return err == 0 ? 0 : 1;
16459  ;
16460  return 0;
16461}
16462_ACEOF
16463if ac_fn_c_try_run "$LINENO"; then :
16464  dynamic_list=true
16465fi
16466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16467  conftest.$ac_objext conftest.beam conftest.$ac_ext
16468fi
16469
16470     LIBS="$old_LIBS"
16471     CFLAGS="$old_CFLAGS"
16472     CPPFLAGS="$old_CPPFLAGS"
16473   fi
16474   LDFLAGS="$old_LDFLAGS"
16475fi
16476if $dynamic_list; then
16477  found="-Wl,--dynamic-list"
16478  RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
16479else
16480  found="-rdynamic"
16481  RDYNAMIC="-rdynamic"
16482fi
16483
16484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
16485$as_echo "$found" >&6; }
16486
16487
16488if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
16489   case ${host_os} in
16490   aix*)
16491      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16492$as_echo_n "checking for AiX thread debugging library... " >&6; }
16493      if ${gdb_cv_have_aix_thread_debug+:} false; then :
16494  $as_echo_n "(cached) " >&6
16495else
16496  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16497/* end confdefs.h.  */
16498#include <sys/pthdebug.h>
16499int
16500main ()
16501{
16502#ifndef PTHDB_VERSION_3
16503	       #error
16504	       #endif
16505
16506  ;
16507  return 0;
16508}
16509_ACEOF
16510if ac_fn_c_try_compile "$LINENO"; then :
16511  gdb_cv_have_aix_thread_debug=yes
16512else
16513  gdb_cv_have_aix_thread_debug=no
16514
16515fi
16516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16517
16518fi
16519
16520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16521$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
16522      if test "$gdb_cv_have_aix_thread_debug" = yes; then
16523         CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
16524         CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
16525         LIBS="$LIBS -lpthdebug"
16526
16527         # Older versions of AIX do not provide the declaration for
16528         # the getthrds function (it appears that it was introduced
16529         # with AIX 6.x).
16530         ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16531"
16532if test "x$ac_cv_have_decl_getthrds" = xyes; then :
16533  ac_have_decl=1
16534else
16535  ac_have_decl=0
16536fi
16537
16538cat >>confdefs.h <<_ACEOF
16539#define HAVE_DECL_GETTHRDS $ac_have_decl
16540_ACEOF
16541
16542      fi
16543      ;;
16544   esac
16545
16546fi
16547
16548if test "x$ac_cv_header_thread_db_h" = "xyes"; then
16549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16550$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
16551if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
16552  $as_echo_n "(cached) " >&6
16553else
16554  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16555/* end confdefs.h.  */
16556#include <thread_db.h>
16557int
16558main ()
16559{
16560int i = TD_NOTALLOC;
16561
16562  ;
16563  return 0;
16564}
16565_ACEOF
16566if ac_fn_c_try_compile "$LINENO"; then :
16567  gdb_cv_thread_db_h_has_td_notalloc=yes
16568else
16569  gdb_cv_thread_db_h_has_td_notalloc=no
16570
16571fi
16572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16573
16574fi
16575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16576$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16577
16578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16579$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
16580if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
16581  $as_echo_n "(cached) " >&6
16582else
16583  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16584/* end confdefs.h.  */
16585#include <thread_db.h>
16586int
16587main ()
16588{
16589int i = TD_VERSION;
16590
16591  ;
16592  return 0;
16593}
16594_ACEOF
16595if ac_fn_c_try_compile "$LINENO"; then :
16596  gdb_cv_thread_db_h_has_td_version=yes
16597else
16598  gdb_cv_thread_db_h_has_td_version=no
16599
16600fi
16601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16602
16603fi
16604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16605$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16606
16607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16608$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
16609if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
16610  $as_echo_n "(cached) " >&6
16611else
16612  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16613/* end confdefs.h.  */
16614#include <thread_db.h>
16615int
16616main ()
16617{
16618int i = TD_NOTLS;
16619
16620  ;
16621  return 0;
16622}
16623_ACEOF
16624if ac_fn_c_try_compile "$LINENO"; then :
16625  gdb_cv_thread_db_h_has_td_notls=yes
16626else
16627  gdb_cv_thread_db_h_has_td_notls=no
16628
16629fi
16630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16631
16632fi
16633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16634$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
16635fi
16636if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
16637
16638$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
16639
16640fi
16641if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16642
16643$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
16644
16645fi
16646if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16647
16648$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
16649
16650fi
16651
16652case $host_os in
16653  go32* | *djgpp*)
16654    gdbinit=gdb.ini
16655    ;;
16656  *)
16657    gdbinit=.gdbinit
16658    ;;
16659esac
16660
16661cat >>confdefs.h <<_ACEOF
16662#define GDBINIT "$gdbinit"
16663_ACEOF
16664
16665
16666
16667cat >>confdefs.h <<_ACEOF
16668#define GDBEARLYINIT ".gdbearlyinit"
16669_ACEOF
16670
16671
16672
16673# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16674# except that the argument to --with-sysroot is optional.
16675# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16676if test "x$with_sysroot" = xyes; then
16677  with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16678fi
16679
16680# Check whether --with-sysroot was given.
16681if test "${with_sysroot+set}" = set; then :
16682  withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16683else
16684  TARGET_SYSTEM_ROOT=
16685fi
16686
16687
16688  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16689  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16690  ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16691  ac_define_dir=`eval echo $ac_define_dir`
16692
16693cat >>confdefs.h <<_ACEOF
16694#define TARGET_SYSTEM_ROOT "$ac_define_dir"
16695_ACEOF
16696
16697
16698
16699
16700  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16701     if test "x$prefix" = xNONE; then
16702     	test_prefix=/usr/local
16703     else
16704	test_prefix=$prefix
16705     fi
16706  else
16707     test_prefix=$exec_prefix
16708  fi
16709  value=0
16710  case ${ac_define_dir} in
16711     "${test_prefix}"|"${test_prefix}/"*|\
16712	'${exec_prefix}'|'${exec_prefix}/'*)
16713     value=1
16714     ;;
16715  esac
16716
16717cat >>confdefs.h <<_ACEOF
16718#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16719_ACEOF
16720
16721
16722
16723
16724
16725# Check whether --with-system-gdbinit was given.
16726if test "${with_system_gdbinit+set}" = set; then :
16727  withval=$with_system_gdbinit;
16728    SYSTEM_GDBINIT=$withval
16729else
16730  SYSTEM_GDBINIT=
16731fi
16732
16733
16734  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16735  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16736  ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16737  ac_define_dir=`eval echo $ac_define_dir`
16738
16739cat >>confdefs.h <<_ACEOF
16740#define SYSTEM_GDBINIT "$ac_define_dir"
16741_ACEOF
16742
16743
16744
16745
16746  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16747     if test "x$prefix" = xNONE; then
16748     	test_prefix=/usr/local
16749     else
16750	test_prefix=$prefix
16751     fi
16752  else
16753     test_prefix=$exec_prefix
16754  fi
16755  value=0
16756  case ${ac_define_dir} in
16757     "${test_prefix}"|"${test_prefix}/"*|\
16758	'${exec_prefix}'|'${exec_prefix}/'*)
16759     value=1
16760     ;;
16761  esac
16762
16763cat >>confdefs.h <<_ACEOF
16764#define SYSTEM_GDBINIT_RELOCATABLE $value
16765_ACEOF
16766
16767
16768
16769
16770
16771# Check whether --with-system-gdbinit-dir was given.
16772if test "${with_system_gdbinit_dir+set}" = set; then :
16773  withval=$with_system_gdbinit_dir;
16774    SYSTEM_GDBINIT_DIR=$withval
16775else
16776  SYSTEM_GDBINIT_DIR=
16777fi
16778
16779
16780  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16781  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16782  ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16783  ac_define_dir=`eval echo $ac_define_dir`
16784
16785cat >>confdefs.h <<_ACEOF
16786#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16787_ACEOF
16788
16789
16790
16791
16792  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16793     if test "x$prefix" = xNONE; then
16794     	test_prefix=/usr/local
16795     else
16796	test_prefix=$prefix
16797     fi
16798  else
16799     test_prefix=$exec_prefix
16800  fi
16801  value=0
16802  case ${ac_define_dir} in
16803     "${test_prefix}"|"${test_prefix}/"*|\
16804	'${exec_prefix}'|'${exec_prefix}/'*)
16805     value=1
16806     ;;
16807  esac
16808
16809cat >>confdefs.h <<_ACEOF
16810#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16811_ACEOF
16812
16813
16814
16815
16816
16817# Check whether --enable-werror was given.
16818if test "${enable_werror+set}" = set; then :
16819  enableval=$enable_werror; case "${enableval}" in
16820     yes | y) ERROR_ON_WARNING="yes" ;;
16821     no | n)  ERROR_ON_WARNING="no" ;;
16822     *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
16823   esac
16824fi
16825
16826
16827# Enable -Werror by default when using gcc.  Turn it off for releases.
16828if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
16829    ERROR_ON_WARNING=yes
16830fi
16831
16832WERROR_CFLAGS=""
16833if test "${ERROR_ON_WARNING}" = yes ; then
16834    WERROR_CFLAGS="-Werror"
16835fi
16836
16837# The options we'll try to enable.
16838build_warnings="-Wall -Wpointer-arith \
16839-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
16840-Wno-switch -Wno-char-subscripts \
16841-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
16842-Wno-sign-compare -Wno-error=maybe-uninitialized \
16843-Wno-mismatched-tags \
16844-Wno-error=deprecated-register \
16845-Wsuggest-override \
16846-Wimplicit-fallthrough=3 \
16847-Wduplicated-cond \
16848-Wshadow=local \
16849-Wdeprecated-copy \
16850-Wdeprecated-copy-dtor \
16851-Wredundant-move \
16852-Wmissing-declarations \
16853-Wmissing-prototypes \
16854-Wstrict-null-sentinel \
16855"
16856
16857case "${host}" in
16858  *-*-mingw32*)
16859    # Enable -Wno-format by default when using gcc on mingw since many
16860    # GCC versions complain about %I64.
16861    build_warnings="$build_warnings -Wno-format" ;;
16862  *-*-solaris*)
16863    # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16864    # doesn't understand.
16865    build_warnings="$build_warnings -Wno-unknown-pragmas"
16866    # Solaris 11 <unistd.h> marks vfork deprecated.
16867    build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
16868  *)
16869    # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16870    # but there's a special case for this below.
16871    build_warnings="$build_warnings -Wformat-nonliteral" ;;
16872esac
16873
16874# Check whether --enable-build-warnings was given.
16875if test "${enable_build_warnings+set}" = set; then :
16876  enableval=$enable_build_warnings; case "${enableval}" in
16877  yes)	;;
16878  no)	build_warnings="-w";;
16879  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
16880        build_warnings="${build_warnings} ${t}";;
16881  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
16882        build_warnings="${t} ${build_warnings}";;
16883  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16884esac
16885if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16886  echo "Setting compiler warning flags = $build_warnings" 6>&1
16887fi
16888fi
16889# Check whether --enable-gdb-build-warnings was given.
16890if test "${enable_gdb_build_warnings+set}" = set; then :
16891  enableval=$enable_gdb_build_warnings; case "${enableval}" in
16892  yes)	;;
16893  no)	build_warnings="-w";;
16894  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
16895        build_warnings="${build_warnings} ${t}";;
16896  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
16897        build_warnings="${t} ${build_warnings}";;
16898  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16899esac
16900if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16901  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16902fi
16903fi
16904
16905# The set of warnings supported by a C++ compiler is not the same as
16906# of the C compiler.
16907ac_ext=cpp
16908ac_cpp='$CXXCPP $CPPFLAGS'
16909ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16910ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16911ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16912
16913
16914WARN_CFLAGS=""
16915if test "x${build_warnings}" != x -a "x$GCC" = xyes
16916then
16917    { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16918$as_echo_n "checking compiler warning flags... " >&6; }
16919    # Separate out the -Werror flag as some files just cannot be
16920    # compiled with it enabled.
16921    for w in ${build_warnings}; do
16922	# GCC does not complain about -Wno-unknown-warning.  Invert
16923	# and test -Wunknown-warning instead.
16924	case $w in
16925	-Wno-*)
16926		wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
16927        -Wformat-nonliteral)
16928		# gcc requires -Wformat before -Wformat-nonliteral
16929		# will work, so stick them together.
16930		w="-Wformat $w"
16931		wtest="$w"
16932		;;
16933	*)
16934		wtest=$w ;;
16935	esac
16936
16937	case $w in
16938	-Werr*) WERROR_CFLAGS=-Werror ;;
16939	*)
16940	    # Check whether GCC accepts it.
16941	    saved_CFLAGS="$CFLAGS"
16942	    CFLAGS="$CFLAGS -Werror $wtest"
16943	    saved_CXXFLAGS="$CXXFLAGS"
16944	    CXXFLAGS="$CXXFLAGS -Werror $wtest"
16945	    if test "x$w" = "x-Wunused-variable"; then
16946	      # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16947	      # fixed in GCC 4.9.  This test is derived from the gdb
16948	      # source code that triggered this bug in GCC.
16949	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16950/* end confdefs.h.  */
16951struct scoped_restore_base {};
16952		    struct scoped_restore_tmpl : public scoped_restore_base {
16953		      ~scoped_restore_tmpl() {}
16954		    };
16955int
16956main ()
16957{
16958const scoped_restore_base &b = scoped_restore_tmpl();
16959
16960  ;
16961  return 0;
16962}
16963_ACEOF
16964if ac_fn_cxx_try_compile "$LINENO"; then :
16965  WARN_CFLAGS="${WARN_CFLAGS} $w"
16966fi
16967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16968	    else
16969	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16970/* end confdefs.h.  */
16971
16972int
16973main ()
16974{
16975
16976  ;
16977  return 0;
16978}
16979_ACEOF
16980if ac_fn_cxx_try_compile "$LINENO"; then :
16981  WARN_CFLAGS="${WARN_CFLAGS} $w"
16982fi
16983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16984	    fi
16985	    CFLAGS="$saved_CFLAGS"
16986	    CXXFLAGS="$saved_CXXFLAGS"
16987	esac
16988    done
16989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16990$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
16991fi
16992
16993
16994
16995ac_ext=c
16996ac_cpp='$CPP $CPPFLAGS'
16997ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16998ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16999ac_compiler_gnu=$ac_cv_c_compiler_gnu
17000
17001
17002
17003# Check whether --enable-ubsan was given.
17004if test "${enable_ubsan+set}" = set; then :
17005  enableval=$enable_ubsan;
17006else
17007  enable_ubsan=no
17008fi
17009
17010if test "x$enable_ubsan" = xauto; then
17011  if $development; then
17012    enable_ubsan=yes
17013  fi
17014fi
17015ac_ext=cpp
17016ac_cpp='$CXXCPP $CPPFLAGS'
17017ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17018ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17019ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17020
17021if test "x$enable_ubsan" = xyes; then
17022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
17023$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
17024  saved_CXXFLAGS="$CXXFLAGS"
17025  CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17026        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17027/* end confdefs.h.  */
17028
17029int
17030main ()
17031{
17032
17033  ;
17034  return 0;
17035}
17036_ACEOF
17037if ac_fn_cxx_try_link "$LINENO"; then :
17038  enable_ubsan=yes
17039else
17040  enable_ubsan=no
17041
17042fi
17043rm -f core conftest.err conftest.$ac_objext \
17044    conftest$ac_exeext conftest.$ac_ext
17045  CXXFLAGS="$saved_CXXFLAGS"
17046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
17047$as_echo "$enable_ubsan" >&6; }
17048  if test "x$enable_ubsan" = xyes; then
17049    WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17050    CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
17051  fi
17052fi
17053ac_ext=c
17054ac_cpp='$CPP $CPPFLAGS'
17055ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17056ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17057ac_compiler_gnu=$ac_cv_c_compiler_gnu
17058
17059
17060
17061# In the Cygwin environment, we need some additional flags.
17062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
17063$as_echo_n "checking for cygwin... " >&6; }
17064if ${gdb_cv_os_cygwin+:} false; then :
17065  $as_echo_n "(cached) " >&6
17066else
17067  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17068/* end confdefs.h.  */
17069
17070#if defined (__CYGWIN__) || defined (__CYGWIN32__)
17071lose
17072#endif
17073_ACEOF
17074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17075  $EGREP "^lose$" >/dev/null 2>&1; then :
17076  gdb_cv_os_cygwin=yes
17077else
17078  gdb_cv_os_cygwin=no
17079fi
17080rm -f conftest*
17081
17082fi
17083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
17084$as_echo "$gdb_cv_os_cygwin" >&6; }
17085
17086
17087SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
17088case ${host} in
17089  *go32* ) SER_HARDWIRE=ser-go32.o ;;
17090  *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
17091  *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
17092  *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
17093esac
17094
17095
17096# libreadline needs libuser32.a in a cygwin environment
17097WIN32LIBS=
17098if test x"$gdb_cv_os_cygwin" = xyes; then
17099    WIN32LIBS="-luser32"
17100    case "${target}" in
17101	*cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
17102	;;
17103    esac
17104fi
17105
17106# The ser-tcp.c module requires sockets.
17107# Note that WIN32APILIBS is set by GDB_AC_COMMON.
17108WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
17109
17110# Add ELF support to GDB, but only if BFD includes ELF support.
17111
17112  OLD_CFLAGS=$CFLAGS
17113  OLD_LDFLAGS=$LDFLAGS
17114  OLD_LIBS=$LIBS
17115  # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17116  # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
17117  # always want our bfd.
17118  CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
17119  ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17120  LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
17121  intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
17122  LIBS="-lbfd -liberty -lz $intl $LIBS"
17123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
17124$as_echo_n "checking for ELF support in BFD... " >&6; }
17125if ${gdb_cv_var_elf+:} false; then :
17126  $as_echo_n "(cached) " >&6
17127else
17128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17129/* end confdefs.h.  */
17130#include <stdlib.h>
17131	   #include <string.h>
17132	   #include "bfd.h"
17133	   #include "elf-bfd.h"
17134int
17135main ()
17136{
17137return bfd_get_elf_phdr_upper_bound (NULL);
17138
17139  ;
17140  return 0;
17141}
17142_ACEOF
17143if ac_fn_c_try_link "$LINENO"; then :
17144  gdb_cv_var_elf=yes
17145else
17146  gdb_cv_var_elf=no
17147
17148fi
17149rm -f core conftest.err conftest.$ac_objext \
17150    conftest$ac_exeext conftest.$ac_ext
17151
17152fi
17153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
17154$as_echo "$gdb_cv_var_elf" >&6; }
17155  CFLAGS=$OLD_CFLAGS
17156  LDFLAGS=$OLD_LDFLAGS
17157  LIBS=$OLD_LIBS
17158if test "$gdb_cv_var_elf" = yes; then
17159  CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \
17160		gcore-elf.o elf-none-tdep.o"
17161
17162$as_echo "#define HAVE_ELF 1" >>confdefs.h
17163
17164  # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
17165  if test "$plugins" = "yes"; then
17166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17167$as_echo_n "checking for library containing dlopen... " >&6; }
17168if ${ac_cv_search_dlopen+:} false; then :
17169  $as_echo_n "(cached) " >&6
17170else
17171  ac_func_search_save_LIBS=$LIBS
17172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17173/* end confdefs.h.  */
17174
17175/* Override any GCC internal prototype to avoid an error.
17176   Use char because int might match the return type of a GCC
17177   builtin and then its argument prototype would still apply.  */
17178#ifdef __cplusplus
17179extern "C"
17180#endif
17181char dlopen ();
17182int
17183main ()
17184{
17185return dlopen ();
17186  ;
17187  return 0;
17188}
17189_ACEOF
17190for ac_lib in '' dl; do
17191  if test -z "$ac_lib"; then
17192    ac_res="none required"
17193  else
17194    ac_res=-l$ac_lib
17195    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17196  fi
17197  if ac_fn_c_try_link "$LINENO"; then :
17198  ac_cv_search_dlopen=$ac_res
17199fi
17200rm -f core conftest.err conftest.$ac_objext \
17201    conftest$ac_exeext
17202  if ${ac_cv_search_dlopen+:} false; then :
17203  break
17204fi
17205done
17206if ${ac_cv_search_dlopen+:} false; then :
17207
17208else
17209  ac_cv_search_dlopen=no
17210fi
17211rm conftest.$ac_ext
17212LIBS=$ac_func_search_save_LIBS
17213fi
17214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17215$as_echo "$ac_cv_search_dlopen" >&6; }
17216ac_res=$ac_cv_search_dlopen
17217if test "$ac_res" != no; then :
17218  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17219
17220fi
17221
17222  fi
17223fi
17224
17225# Add macho support to GDB, but only if BFD includes it.
17226
17227  OLD_CFLAGS=$CFLAGS
17228  OLD_LDFLAGS=$LDFLAGS
17229  OLD_LIBS=$LIBS
17230  # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17231  # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
17232  # always want our bfd.
17233  CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
17234  ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17235  LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
17236  intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
17237  LIBS="-lbfd -liberty -lz $intl $LIBS"
17238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
17239$as_echo_n "checking for Mach-O support in BFD... " >&6; }
17240if ${gdb_cv_var_macho+:} false; then :
17241  $as_echo_n "(cached) " >&6
17242else
17243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17244/* end confdefs.h.  */
17245#include <stdlib.h>
17246	   #include <string.h>
17247	   #include "bfd.h"
17248	   #include "mach-o.h"
17249int
17250main ()
17251{
17252return bfd_mach_o_lookup_command (NULL, 0, NULL);
17253
17254  ;
17255  return 0;
17256}
17257_ACEOF
17258if ac_fn_c_try_link "$LINENO"; then :
17259  gdb_cv_var_macho=yes
17260else
17261  gdb_cv_var_macho=no
17262
17263fi
17264rm -f core conftest.err conftest.$ac_objext \
17265    conftest$ac_exeext conftest.$ac_ext
17266
17267fi
17268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
17269$as_echo "$gdb_cv_var_macho" >&6; }
17270  CFLAGS=$OLD_CFLAGS
17271  LDFLAGS=$OLD_LDFLAGS
17272  LIBS=$OLD_LIBS
17273if test "$gdb_cv_var_macho" = yes; then
17274  CONFIG_OBS="$CONFIG_OBS machoread.o"
17275fi
17276
17277# Add any host-specific objects to GDB.
17278CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
17279
17280# If building on ELF, look for lzma support for embedded compressed debug info.
17281if test "$gdb_cv_var_elf" = yes; then
17282
17283# Check whether --with-lzma was given.
17284if test "${with_lzma+set}" = set; then :
17285  withval=$with_lzma;
17286else
17287  with_lzma=auto
17288fi
17289
17290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
17291$as_echo_n "checking whether to use lzma... " >&6; }
17292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
17293$as_echo "$with_lzma" >&6; }
17294
17295  if test "${with_lzma}" != no; then
17296
17297
17298
17299
17300
17301
17302
17303
17304    use_additional=yes
17305
17306  acl_save_prefix="$prefix"
17307  prefix="$acl_final_prefix"
17308  acl_save_exec_prefix="$exec_prefix"
17309  exec_prefix="$acl_final_exec_prefix"
17310
17311    eval additional_includedir=\"$includedir\"
17312    eval additional_libdir=\"$libdir\"
17313
17314  exec_prefix="$acl_save_exec_prefix"
17315  prefix="$acl_save_prefix"
17316
17317
17318# Check whether --with-liblzma-prefix was given.
17319if test "${with_liblzma_prefix+set}" = set; then :
17320  withval=$with_liblzma_prefix;
17321    if test "X$withval" = "Xno"; then
17322      use_additional=no
17323    else
17324      if test "X$withval" = "X"; then
17325
17326  acl_save_prefix="$prefix"
17327  prefix="$acl_final_prefix"
17328  acl_save_exec_prefix="$exec_prefix"
17329  exec_prefix="$acl_final_exec_prefix"
17330
17331          eval additional_includedir=\"$includedir\"
17332          eval additional_libdir=\"$libdir\"
17333
17334  exec_prefix="$acl_save_exec_prefix"
17335  prefix="$acl_save_prefix"
17336
17337      else
17338        additional_includedir="$withval/include"
17339        additional_libdir="$withval/lib"
17340      fi
17341    fi
17342
17343fi
17344
17345
17346# Check whether --with-liblzma-type was given.
17347if test "${with_liblzma_type+set}" = set; then :
17348  withval=$with_liblzma_type;  with_liblzma_type=$withval
17349else
17350   with_liblzma_type=auto
17351fi
17352
17353  lib_type=`eval echo \$with_liblzma_type`
17354
17355      LIBLZMA=
17356  LTLIBLZMA=
17357  INCLZMA=
17358  rpathdirs=
17359  ltrpathdirs=
17360  names_already_handled=
17361  names_next_round='lzma '
17362  while test -n "$names_next_round"; do
17363    names_this_round="$names_next_round"
17364    names_next_round=
17365    for name in $names_this_round; do
17366      already_handled=
17367      for n in $names_already_handled; do
17368        if test "$n" = "$name"; then
17369          already_handled=yes
17370          break
17371        fi
17372      done
17373      if test -z "$already_handled"; then
17374        names_already_handled="$names_already_handled $name"
17375                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17376        eval value=\"\$HAVE_LIB$uppername\"
17377        if test -n "$value"; then
17378          if test "$value" = yes; then
17379            eval value=\"\$LIB$uppername\"
17380            test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
17381            eval value=\"\$LTLIB$uppername\"
17382            test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
17383          else
17384                                    :
17385          fi
17386        else
17387                              found_dir=
17388          found_la=
17389          found_so=
17390          found_a=
17391          if test $use_additional = yes; then
17392            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17393              found_dir="$additional_libdir"
17394              found_so="$additional_libdir/lib$name.$shlibext"
17395              if test -f "$additional_libdir/lib$name.la"; then
17396                found_la="$additional_libdir/lib$name.la"
17397              fi
17398            elif test x$lib_type != xshared; then
17399              if test -f "$additional_libdir/lib$name.$libext"; then
17400                found_dir="$additional_libdir"
17401                found_a="$additional_libdir/lib$name.$libext"
17402                if test -f "$additional_libdir/lib$name.la"; then
17403                  found_la="$additional_libdir/lib$name.la"
17404                fi
17405              fi
17406            fi
17407          fi
17408          if test "X$found_dir" = "X"; then
17409            for x in $LDFLAGS $LTLIBLZMA; do
17410
17411  acl_save_prefix="$prefix"
17412  prefix="$acl_final_prefix"
17413  acl_save_exec_prefix="$exec_prefix"
17414  exec_prefix="$acl_final_exec_prefix"
17415  eval x=\"$x\"
17416  exec_prefix="$acl_save_exec_prefix"
17417  prefix="$acl_save_prefix"
17418
17419              case "$x" in
17420                -L*)
17421                  dir=`echo "X$x" | sed -e 's/^X-L//'`
17422                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17423                    found_dir="$dir"
17424                    found_so="$dir/lib$name.$shlibext"
17425                    if test -f "$dir/lib$name.la"; then
17426                      found_la="$dir/lib$name.la"
17427                    fi
17428                  elif test x$lib_type != xshared; then
17429                    if test -f "$dir/lib$name.$libext"; then
17430                      found_dir="$dir"
17431                      found_a="$dir/lib$name.$libext"
17432                      if test -f "$dir/lib$name.la"; then
17433                        found_la="$dir/lib$name.la"
17434                      fi
17435                    fi
17436                  fi
17437                  ;;
17438              esac
17439              if test "X$found_dir" != "X"; then
17440                break
17441              fi
17442            done
17443          fi
17444          if test "X$found_dir" != "X"; then
17445                        LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17446            if test "X$found_so" != "X"; then
17447                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17448                                LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17449              else
17450                                                                                haveit=
17451                for x in $ltrpathdirs; do
17452                  if test "X$x" = "X$found_dir"; then
17453                    haveit=yes
17454                    break
17455                  fi
17456                done
17457                if test -z "$haveit"; then
17458                  ltrpathdirs="$ltrpathdirs $found_dir"
17459                fi
17460                                if test "$hardcode_direct" = yes; then
17461                                                      LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17462                else
17463                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17464                                                            LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17465                                                            haveit=
17466                    for x in $rpathdirs; do
17467                      if test "X$x" = "X$found_dir"; then
17468                        haveit=yes
17469                        break
17470                      fi
17471                    done
17472                    if test -z "$haveit"; then
17473                      rpathdirs="$rpathdirs $found_dir"
17474                    fi
17475                  else
17476                                                                                haveit=
17477                    for x in $LDFLAGS $LIBLZMA; do
17478
17479  acl_save_prefix="$prefix"
17480  prefix="$acl_final_prefix"
17481  acl_save_exec_prefix="$exec_prefix"
17482  exec_prefix="$acl_final_exec_prefix"
17483  eval x=\"$x\"
17484  exec_prefix="$acl_save_exec_prefix"
17485  prefix="$acl_save_prefix"
17486
17487                      if test "X$x" = "X-L$found_dir"; then
17488                        haveit=yes
17489                        break
17490                      fi
17491                    done
17492                    if test -z "$haveit"; then
17493                      LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17494                    fi
17495                    if test "$hardcode_minus_L" != no; then
17496                                                                                        LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17497                    else
17498                                                                                                                                                                                LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17499                    fi
17500                  fi
17501                fi
17502              fi
17503            else
17504              if test "X$found_a" != "X"; then
17505                                LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17506              else
17507                                                LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17508              fi
17509            fi
17510                        additional_includedir=
17511            case "$found_dir" in
17512              */lib | */lib/)
17513                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17514                additional_includedir="$basedir/include"
17515                ;;
17516            esac
17517            if test "X$additional_includedir" != "X"; then
17518                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
17519                haveit=
17520                if test "X$additional_includedir" = "X/usr/local/include"; then
17521                  if test -n "$GCC"; then
17522                    case $host_os in
17523                      linux*) haveit=yes;;
17524                    esac
17525                  fi
17526                fi
17527                if test -z "$haveit"; then
17528                  for x in $CPPFLAGS $INCLZMA; do
17529
17530  acl_save_prefix="$prefix"
17531  prefix="$acl_final_prefix"
17532  acl_save_exec_prefix="$exec_prefix"
17533  exec_prefix="$acl_final_exec_prefix"
17534  eval x=\"$x\"
17535  exec_prefix="$acl_save_exec_prefix"
17536  prefix="$acl_save_prefix"
17537
17538                    if test "X$x" = "X-I$additional_includedir"; then
17539                      haveit=yes
17540                      break
17541                    fi
17542                  done
17543                  if test -z "$haveit"; then
17544                    if test -d "$additional_includedir"; then
17545                                            INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17546                    fi
17547                  fi
17548                fi
17549              fi
17550            fi
17551                        if test -n "$found_la"; then
17552                                                        save_libdir="$libdir"
17553              case "$found_la" in
17554                */* | *\\*) . "$found_la" ;;
17555                *) . "./$found_la" ;;
17556              esac
17557              libdir="$save_libdir"
17558                            for dep in $dependency_libs; do
17559                case "$dep" in
17560                  -L*)
17561                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17562                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
17563                      haveit=
17564                      if test "X$additional_libdir" = "X/usr/local/lib"; then
17565                        if test -n "$GCC"; then
17566                          case $host_os in
17567                            linux*) haveit=yes;;
17568                          esac
17569                        fi
17570                      fi
17571                      if test -z "$haveit"; then
17572                        haveit=
17573                        for x in $LDFLAGS $LIBLZMA; do
17574
17575  acl_save_prefix="$prefix"
17576  prefix="$acl_final_prefix"
17577  acl_save_exec_prefix="$exec_prefix"
17578  exec_prefix="$acl_final_exec_prefix"
17579  eval x=\"$x\"
17580  exec_prefix="$acl_save_exec_prefix"
17581  prefix="$acl_save_prefix"
17582
17583                          if test "X$x" = "X-L$additional_libdir"; then
17584                            haveit=yes
17585                            break
17586                          fi
17587                        done
17588                        if test -z "$haveit"; then
17589                          if test -d "$additional_libdir"; then
17590                                                        LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17591                          fi
17592                        fi
17593                        haveit=
17594                        for x in $LDFLAGS $LTLIBLZMA; do
17595
17596  acl_save_prefix="$prefix"
17597  prefix="$acl_final_prefix"
17598  acl_save_exec_prefix="$exec_prefix"
17599  exec_prefix="$acl_final_exec_prefix"
17600  eval x=\"$x\"
17601  exec_prefix="$acl_save_exec_prefix"
17602  prefix="$acl_save_prefix"
17603
17604                          if test "X$x" = "X-L$additional_libdir"; then
17605                            haveit=yes
17606                            break
17607                          fi
17608                        done
17609                        if test -z "$haveit"; then
17610                          if test -d "$additional_libdir"; then
17611                                                        LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17612                          fi
17613                        fi
17614                      fi
17615                    fi
17616                    ;;
17617                  -R*)
17618                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
17619                    if test "$enable_rpath" != no; then
17620                                                                  haveit=
17621                      for x in $rpathdirs; do
17622                        if test "X$x" = "X$dir"; then
17623                          haveit=yes
17624                          break
17625                        fi
17626                      done
17627                      if test -z "$haveit"; then
17628                        rpathdirs="$rpathdirs $dir"
17629                      fi
17630                                                                  haveit=
17631                      for x in $ltrpathdirs; do
17632                        if test "X$x" = "X$dir"; then
17633                          haveit=yes
17634                          break
17635                        fi
17636                      done
17637                      if test -z "$haveit"; then
17638                        ltrpathdirs="$ltrpathdirs $dir"
17639                      fi
17640                    fi
17641                    ;;
17642                  -l*)
17643                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17644                    ;;
17645                  *.la)
17646                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17647                    ;;
17648                  *)
17649                                        LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17650                    LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17651                    ;;
17652                esac
17653              done
17654            fi
17655          else
17656                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17657              LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17658              LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17659            else
17660              LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17661              LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17662            fi
17663          fi
17664        fi
17665      fi
17666    done
17667  done
17668  if test "X$rpathdirs" != "X"; then
17669    if test -n "$hardcode_libdir_separator"; then
17670                        alldirs=
17671      for found_dir in $rpathdirs; do
17672        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17673      done
17674            acl_save_libdir="$libdir"
17675      libdir="$alldirs"
17676      eval flag=\"$hardcode_libdir_flag_spec\"
17677      libdir="$acl_save_libdir"
17678      LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17679    else
17680            for found_dir in $rpathdirs; do
17681        acl_save_libdir="$libdir"
17682        libdir="$found_dir"
17683        eval flag=\"$hardcode_libdir_flag_spec\"
17684        libdir="$acl_save_libdir"
17685        LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17686      done
17687    fi
17688  fi
17689  if test "X$ltrpathdirs" != "X"; then
17690            for found_dir in $ltrpathdirs; do
17691      LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17692    done
17693  fi
17694
17695
17696        ac_save_CPPFLAGS="$CPPFLAGS"
17697
17698  for element in $INCLZMA; do
17699    haveit=
17700    for x in $CPPFLAGS; do
17701
17702  acl_save_prefix="$prefix"
17703  prefix="$acl_final_prefix"
17704  acl_save_exec_prefix="$exec_prefix"
17705  exec_prefix="$acl_final_exec_prefix"
17706  eval x=\"$x\"
17707  exec_prefix="$acl_save_exec_prefix"
17708  prefix="$acl_save_prefix"
17709
17710      if test "X$x" = "X$element"; then
17711        haveit=yes
17712        break
17713      fi
17714    done
17715    if test -z "$haveit"; then
17716      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17717    fi
17718  done
17719
17720
17721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17722$as_echo_n "checking for liblzma... " >&6; }
17723if ${ac_cv_liblzma+:} false; then :
17724  $as_echo_n "(cached) " >&6
17725else
17726
17727    ac_save_LIBS="$LIBS"
17728    LIBS="$LIBS $LIBLZMA"
17729    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17730/* end confdefs.h.  */
17731#include "lzma.h"
17732int
17733main ()
17734{
17735lzma_index_iter iter;
17736			   lzma_index_iter_init (&iter, 0);
17737			   lzma_mf_is_supported (LZMA_MF_HC3);
17738  ;
17739  return 0;
17740}
17741_ACEOF
17742if ac_fn_c_try_link "$LINENO"; then :
17743  ac_cv_liblzma=yes
17744else
17745  ac_cv_liblzma=no
17746fi
17747rm -f core conftest.err conftest.$ac_objext \
17748    conftest$ac_exeext conftest.$ac_ext
17749    LIBS="$ac_save_LIBS"
17750
17751fi
17752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17753$as_echo "$ac_cv_liblzma" >&6; }
17754  if test "$ac_cv_liblzma" = yes; then
17755    HAVE_LIBLZMA=yes
17756
17757$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17758
17759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17760$as_echo_n "checking how to link with liblzma... " >&6; }
17761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17762$as_echo "$LIBLZMA" >&6; }
17763  else
17764    HAVE_LIBLZMA=no
17765            CPPFLAGS="$ac_save_CPPFLAGS"
17766    LIBLZMA=
17767    LTLIBLZMA=
17768  fi
17769
17770
17771
17772
17773
17774
17775    if test "$HAVE_LIBLZMA" != yes; then
17776      if test "$with_lzma" = yes; then
17777        as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17778      fi
17779    fi
17780  fi
17781fi
17782
17783LIBGUI="../libgui/src/libgui.a"
17784GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17785
17786
17787
17788WIN32LDAPP=
17789
17790
17791
17792case "${host}" in
17793*-*-cygwin* | *-*-mingw* )
17794    configdir="win"
17795    ;;
17796*)
17797    configdir="unix"
17798    ;;
17799esac
17800
17801GDBTKLIBS=
17802if test "${enable_gdbtk}" = "yes"; then
17803
17804    # Gdbtk must have an absolute path to srcdir in order to run
17805    # properly when not installed.
17806    here=`pwd`
17807    cd ${srcdir}
17808    GDBTK_SRC_DIR=`pwd`
17809    cd $here
17810
17811
17812    #
17813    # Ok, lets find the tcl configuration
17814    # First, look for one uninstalled.
17815    # the alternative search directory is invoked by --with-tcl
17816    #
17817
17818    if test x"${no_tcl}" = x ; then
17819	# we reset no_tcl in case something fails here
17820	no_tcl=true
17821
17822# Check whether --with-tcl was given.
17823if test "${with_tcl+set}" = set; then :
17824  withval=$with_tcl; with_tclconfig=${withval}
17825fi
17826
17827	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17828$as_echo_n "checking for Tcl configuration... " >&6; }
17829	if ${ac_cv_c_tclconfig+:} false; then :
17830  $as_echo_n "(cached) " >&6
17831else
17832
17833
17834	    # First check to see if --with-tcl was specified.
17835	    case "${host}" in
17836		*-*-cygwin*) platDir="win" ;;
17837		*) platDir="unix" ;;
17838	    esac
17839	    if test x"${with_tclconfig}" != x ; then
17840		if test -f "${with_tclconfig}/tclConfig.sh" ; then
17841		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17842		else
17843		    as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
17844		fi
17845	    fi
17846
17847	    # then check for a private Tcl installation
17848	    if test x"${ac_cv_c_tclconfig}" = x ; then
17849		for i in \
17850			../tcl \
17851			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17852			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17853			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17854			../../tcl \
17855			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17856			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17857			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17858			../../../tcl \
17859			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17860			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17861			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17862		    if test -f "$i/$platDir/tclConfig.sh" ; then
17863			ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17864			break
17865		    fi
17866		done
17867	    fi
17868
17869	    # on Darwin, check in Framework installation locations
17870	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17871		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17872			`ls -d /Library/Frameworks 2>/dev/null` \
17873			`ls -d /Network/Library/Frameworks 2>/dev/null` \
17874			`ls -d /System/Library/Frameworks 2>/dev/null` \
17875			; do
17876		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17877			ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17878			break
17879		    fi
17880		done
17881	    fi
17882
17883	    # check in a few common install locations
17884	    if test x"${ac_cv_c_tclconfig}" = x ; then
17885		for i in `ls -d ${libdir} 2>/dev/null` \
17886			`ls -d ${exec_prefix}/lib 2>/dev/null` \
17887			`ls -d ${prefix}/lib 2>/dev/null` \
17888			`ls -d /usr/local/lib 2>/dev/null` \
17889			`ls -d /usr/contrib/lib 2>/dev/null` \
17890			`ls -d /usr/lib 2>/dev/null` \
17891			; do
17892		    if test -f "$i/tclConfig.sh" ; then
17893			ac_cv_c_tclconfig=`(cd $i; pwd)`
17894			break
17895		    fi
17896		done
17897	    fi
17898
17899	    # check in a few other private locations
17900	    if test x"${ac_cv_c_tclconfig}" = x ; then
17901		for i in \
17902			${srcdir}/../tcl \
17903			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17904			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17905			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17906		    if test -f "$i/$platDir/tclConfig.sh" ; then
17907		    ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17908		    break
17909		fi
17910		done
17911	    fi
17912
17913fi
17914
17915
17916	if test x"${ac_cv_c_tclconfig}" = x ; then
17917	    TCL_BIN_DIR="# no Tcl configs found"
17918	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17919$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
17920	else
17921	    no_tcl=
17922	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
17923	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17924$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17925	fi
17926    fi
17927
17928
17929    # If $no_tk is nonempty, then we can't do Tk, and there is no
17930    # point to doing Tcl.
17931
17932    #
17933    # Ok, lets find the tk configuration
17934    # First, look for one uninstalled.
17935    # the alternative search directory is invoked by --with-tk
17936    #
17937
17938    if test x"${no_tk}" = x ; then
17939	# we reset no_tk in case something fails here
17940	no_tk=true
17941
17942# Check whether --with-tk was given.
17943if test "${with_tk+set}" = set; then :
17944  withval=$with_tk; with_tkconfig=${withval}
17945fi
17946
17947	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17948$as_echo_n "checking for Tk configuration... " >&6; }
17949	if ${ac_cv_c_tkconfig+:} false; then :
17950  $as_echo_n "(cached) " >&6
17951else
17952
17953
17954	    # First check to see if --with-tkconfig was specified.
17955	    if test x"${with_tkconfig}" != x ; then
17956		if test -f "${with_tkconfig}/tkConfig.sh" ; then
17957		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17958		else
17959		    as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
17960		fi
17961	    fi
17962
17963	    # then check for a private Tk library
17964	    case "${host}" in
17965		*-*-cygwin*) platDir="win" ;;
17966		*) platDir="unix" ;;
17967	    esac
17968	    if test x"${ac_cv_c_tkconfig}" = x ; then
17969		for i in \
17970			../tk \
17971			`ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17972			`ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17973			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17974			../../tk \
17975			`ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17976			`ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17977			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17978			../../../tk \
17979			`ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17980			`ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17981			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17982		    if test -f "$i/$platDir/tkConfig.sh" ; then
17983			ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17984			break
17985		    fi
17986		done
17987	    fi
17988
17989	    # on Darwin, check in Framework installation locations
17990	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17991		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17992			`ls -d /Library/Frameworks 2>/dev/null` \
17993			`ls -d /Network/Library/Frameworks 2>/dev/null` \
17994			`ls -d /System/Library/Frameworks 2>/dev/null` \
17995			; do
17996		    if test -f "$i/Tk.framework/tkConfig.sh" ; then
17997			ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17998			break
17999		    fi
18000		done
18001	    fi
18002
18003	    # check in a few common install locations
18004	    if test x"${ac_cv_c_tkconfig}" = x ; then
18005		for i in `ls -d ${libdir} 2>/dev/null` \
18006			`ls -d ${exec_prefix}/lib 2>/dev/null` \
18007			`ls -d ${prefix}/lib 2>/dev/null` \
18008			`ls -d /usr/local/lib 2>/dev/null` \
18009			`ls -d /usr/contrib/lib 2>/dev/null` \
18010			`ls -d /usr/lib 2>/dev/null` \
18011			; do
18012		    if test -f "$i/tkConfig.sh" ; then
18013			ac_cv_c_tkconfig=`(cd $i; pwd)`
18014			break
18015		    fi
18016		done
18017	    fi
18018	    # check in a few other private locations
18019	    if test x"${ac_cv_c_tkconfig}" = x ; then
18020		for i in \
18021			${srcdir}/../tk \
18022			`ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18023			`ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
18024			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
18025		    if test -f "$i/$platDir/tkConfig.sh" ; then
18026			ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18027			break
18028		    fi
18029		done
18030	    fi
18031
18032fi
18033
18034
18035	if test x"${ac_cv_c_tkconfig}" = x ; then
18036	    TK_BIN_DIR="# no Tk configs found"
18037	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
18038$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
18039	else
18040	    no_tk=
18041	    TK_BIN_DIR=${ac_cv_c_tkconfig}
18042	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
18043$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
18044	fi
18045    fi
18046
18047
18048    if test -z "${no_tcl}" -a -z "${no_tk}"; then
18049
18050    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
18051$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
18052
18053    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
18054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18055$as_echo "loading" >&6; }
18056	. ${TCL_BIN_DIR}/tclConfig.sh
18057    else
18058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
18059$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
18060    fi
18061
18062    # eval is required to do the TCL_DBGX substitution
18063    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
18064    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
18065
18066    # If the TCL_BIN_DIR is the build directory (not the install directory),
18067    # then set the common variable name to the value of the build variables.
18068    # For example, the variable TCL_LIB_SPEC will be set to the value
18069    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
18070    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
18071    # installed and uninstalled version of Tcl.
18072    if test -f "${TCL_BIN_DIR}/Makefile" ; then
18073        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
18074        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
18075        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
18076    elif test "`uname -s`" = "Darwin"; then
18077	# If Tcl was built as a framework, attempt to use the libraries
18078	# from the framework at the given location so that linking works
18079	# against Tcl.framework installed in an arbitrary location.
18080	case ${TCL_DEFS} in
18081	    *TCL_FRAMEWORK*)
18082		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
18083		    for i in "`cd ${TCL_BIN_DIR}; pwd`" \
18084			     "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
18085			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
18086			    TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
18087			    break
18088			fi
18089		    done
18090		fi
18091		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
18092		    TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
18093		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
18094		fi
18095		;;
18096	esac
18097    fi
18098
18099    # eval is required to do the TCL_DBGX substitution
18100    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
18101    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
18102    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
18103    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119        # Check for in-tree tcl
18120        here=`pwd`
18121        cd ${srcdir}/..
18122        topdir=`pwd`
18123        cd ${here}
18124
18125        intree="no"
18126        if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
18127          intree="yes"
18128        fi
18129
18130        # Find Tcl private headers
18131        if test x"${intree}" = xno; then
18132
18133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
18134$as_echo_n "checking for Tcl private headers... " >&6; }
18135  private_dir=""
18136  dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
18137  if test -f ${dir}/tclInt.h ; then
18138    private_dir=${dir}
18139  fi
18140
18141  if test x"${private_dir}" = x; then
18142    as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
18143  else
18144    TCL_PRIVATE_INCLUDE="-I${private_dir}"
18145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18146$as_echo "${private_dir}" >&6; }
18147  fi
18148
18149	  TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
18150          TCL_LIBRARY="${TCL_LIB_SPEC}"
18151          TCL_DEPS=""
18152        else
18153          # If building tcl in the same src tree, private headers
18154          # are not needed, but we need to be sure to use the right
18155          # headers library
18156	  TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
18157          TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
18158          TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
18159        fi
18160
18161
18162
18163
18164
18165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
18166$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
18167
18168    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
18169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18170$as_echo "loading" >&6; }
18171	. ${TK_BIN_DIR}/tkConfig.sh
18172    else
18173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
18174$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
18175    fi
18176
18177    # eval is required to do the TK_DBGX substitution
18178    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
18179    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
18180
18181    # If the TK_BIN_DIR is the build directory (not the install directory),
18182    # then set the common variable name to the value of the build variables.
18183    # For example, the variable TK_LIB_SPEC will be set to the value
18184    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
18185    # instead of TK_BUILD_LIB_SPEC since it will work with both an
18186    # installed and uninstalled version of Tcl.
18187    if test -f "${TK_BIN_DIR}/Makefile" ; then
18188        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
18189        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
18190        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
18191    elif test "`uname -s`" = "Darwin"; then
18192	# If Tk was built as a framework, attempt to use the libraries
18193	# from the framework at the given location so that linking works
18194	# against Tk.framework installed in an arbitrary location.
18195	case ${TK_DEFS} in
18196	    *TK_FRAMEWORK*)
18197		if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
18198		    for i in "`cd ${TK_BIN_DIR}; pwd`" \
18199			     "`cd ${TK_BIN_DIR}/../..; pwd`"; do
18200			if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
18201			    TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
18202			    break
18203			fi
18204		    done
18205		fi
18206		if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
18207		    TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
18208		    TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
18209		fi
18210		;;
18211	esac
18212    fi
18213
18214    # eval is required to do the TK_DBGX substitution
18215    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
18216    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
18217    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
18218    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233        # Check for in-tree Tk
18234        intree="no"
18235        if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
18236          intree="yes"
18237        fi
18238
18239        # Find Tk private headers
18240        if test x"${intree}" = xno; then
18241
18242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
18243$as_echo_n "checking for Tk private headers... " >&6; }
18244  private_dir=""
18245  dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
18246  if test -f ${dir}/tkInt.h; then
18247    private_dir=${dir}
18248  fi
18249
18250  if test x"${private_dir}" = x; then
18251    as_fn_error $? "could not find Tk private headers" "$LINENO" 5
18252  else
18253    TK_PRIVATE_INCLUDE="-I${private_dir}"
18254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18255$as_echo "${private_dir}" >&6; }
18256  fi
18257
18258	  TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
18259	  TK_LIBRARY=${TK_LIB_SPEC}
18260          TK_DEPS=""
18261        else
18262          TK_INCLUDE="-I${TK_SRC_DIR}/generic"
18263          TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
18264          TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
18265        fi
18266
18267
18268
18269
18270
18271        ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
18272
18273	# Include some libraries that Tcl and Tk want.
18274	TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
18275	# Yes, the ordering seems wrong here.  But it isn't.
18276	# TK_LIBS is the list of libraries that need to be linked
18277	# after Tcl/Tk.  Note that this isn't put into LIBS.  If it
18278	# were in LIBS then any link tests after this point would
18279	# try to include things like `$(LIBGUI)', which wouldn't work.
18280	GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
18281
18282        CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
18283        CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
18284        CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
18285	CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
18286	CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
18287	CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
18288	CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
18289
18290	if test x"$gdb_cv_os_cygwin" = xyes; then
18291	  WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
18292	  WIN32LDAPP="-Wl,--subsystem,console"
18293	  CONFIG_OBS="${CONFIG_OBS} gdbres.o"
18294	fi
18295
18296        subdirs="$subdirs gdbtk"
18297
18298    fi
18299fi
18300
18301
18302
18303
18304
18305
18306
18307
18308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
18309$as_echo_n "checking for X... " >&6; }
18310
18311
18312# Check whether --with-x was given.
18313if test "${with_x+set}" = set; then :
18314  withval=$with_x;
18315fi
18316
18317# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
18318if test "x$with_x" = xno; then
18319  # The user explicitly disabled X.
18320  have_x=disabled
18321else
18322  case $x_includes,$x_libraries in #(
18323    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
18324    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
18325  $as_echo_n "(cached) " >&6
18326else
18327  # One or both of the vars are not set, and there is no cached value.
18328ac_x_includes=no ac_x_libraries=no
18329rm -f -r conftest.dir
18330if mkdir conftest.dir; then
18331  cd conftest.dir
18332  cat >Imakefile <<'_ACEOF'
18333incroot:
18334	@echo incroot='${INCROOT}'
18335usrlibdir:
18336	@echo usrlibdir='${USRLIBDIR}'
18337libdir:
18338	@echo libdir='${LIBDIR}'
18339_ACEOF
18340  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
18341    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
18342    for ac_var in incroot usrlibdir libdir; do
18343      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
18344    done
18345    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
18346    for ac_extension in a so sl dylib la dll; do
18347      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
18348	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
18349	ac_im_usrlibdir=$ac_im_libdir; break
18350      fi
18351    done
18352    # Screen out bogus values from the imake configuration.  They are
18353    # bogus both because they are the default anyway, and because
18354    # using them would break gcc on systems where it needs fixed includes.
18355    case $ac_im_incroot in
18356	/usr/include) ac_x_includes= ;;
18357	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
18358    esac
18359    case $ac_im_usrlibdir in
18360	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
18361	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
18362    esac
18363  fi
18364  cd ..
18365  rm -f -r conftest.dir
18366fi
18367
18368# Standard set of common directories for X headers.
18369# Check X11 before X11Rn because it is often a symlink to the current release.
18370ac_x_header_dirs='
18371/usr/X11/include
18372/usr/X11R7/include
18373/usr/X11R6/include
18374/usr/X11R5/include
18375/usr/X11R4/include
18376
18377/usr/include/X11
18378/usr/include/X11R7
18379/usr/include/X11R6
18380/usr/include/X11R5
18381/usr/include/X11R4
18382
18383/usr/local/X11/include
18384/usr/local/X11R7/include
18385/usr/local/X11R6/include
18386/usr/local/X11R5/include
18387/usr/local/X11R4/include
18388
18389/usr/local/include/X11
18390/usr/local/include/X11R7
18391/usr/local/include/X11R6
18392/usr/local/include/X11R5
18393/usr/local/include/X11R4
18394
18395/usr/X386/include
18396/usr/x386/include
18397/usr/XFree86/include/X11
18398
18399/usr/include
18400/usr/local/include
18401/usr/unsupported/include
18402/usr/athena/include
18403/usr/local/x11r5/include
18404/usr/lpp/Xamples/include
18405
18406/usr/openwin/include
18407/usr/openwin/share/include'
18408
18409if test "$ac_x_includes" = no; then
18410  # Guess where to find include files, by looking for Xlib.h.
18411  # First, try using that file with no special directory specified.
18412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18413/* end confdefs.h.  */
18414#include <X11/Xlib.h>
18415_ACEOF
18416if ac_fn_c_try_cpp "$LINENO"; then :
18417  # We can compile using X headers with no special include directory.
18418ac_x_includes=
18419else
18420  for ac_dir in $ac_x_header_dirs; do
18421  if test -r "$ac_dir/X11/Xlib.h"; then
18422    ac_x_includes=$ac_dir
18423    break
18424  fi
18425done
18426fi
18427rm -f conftest.err conftest.i conftest.$ac_ext
18428fi # $ac_x_includes = no
18429
18430if test "$ac_x_libraries" = no; then
18431  # Check for the libraries.
18432  # See if we find them without any special options.
18433  # Don't add to $LIBS permanently.
18434  ac_save_LIBS=$LIBS
18435  LIBS="-lX11 $LIBS"
18436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18437/* end confdefs.h.  */
18438#include <X11/Xlib.h>
18439int
18440main ()
18441{
18442XrmInitialize ()
18443  ;
18444  return 0;
18445}
18446_ACEOF
18447if ac_fn_c_try_link "$LINENO"; then :
18448  LIBS=$ac_save_LIBS
18449# We can link X programs with no special library path.
18450ac_x_libraries=
18451else
18452  LIBS=$ac_save_LIBS
18453for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
18454do
18455  # Don't even attempt the hair of trying to link an X program!
18456  for ac_extension in a so sl dylib la dll; do
18457    if test -r "$ac_dir/libX11.$ac_extension"; then
18458      ac_x_libraries=$ac_dir
18459      break 2
18460    fi
18461  done
18462done
18463fi
18464rm -f core conftest.err conftest.$ac_objext \
18465    conftest$ac_exeext conftest.$ac_ext
18466fi # $ac_x_libraries = no
18467
18468case $ac_x_includes,$ac_x_libraries in #(
18469  no,* | *,no | *\'*)
18470    # Didn't find X, or a directory has "'" in its name.
18471    ac_cv_have_x="have_x=no";; #(
18472  *)
18473    # Record where we found X for the cache.
18474    ac_cv_have_x="have_x=yes\
18475	ac_x_includes='$ac_x_includes'\
18476	ac_x_libraries='$ac_x_libraries'"
18477esac
18478fi
18479;; #(
18480    *) have_x=yes;;
18481  esac
18482  eval "$ac_cv_have_x"
18483fi # $with_x != no
18484
18485if test "$have_x" != yes; then
18486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18487$as_echo "$have_x" >&6; }
18488  no_x=yes
18489else
18490  # If each of the values was on the command line, it overrides each guess.
18491  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18492  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18493  # Update the cache value to reflect the command line values.
18494  ac_cv_have_x="have_x=yes\
18495	ac_x_includes='$x_includes'\
18496	ac_x_libraries='$x_libraries'"
18497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18498$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
18499fi
18500
18501
18502# Unlike the sim directory, whether a simulator is linked is controlled by
18503# presence of a gdb_sim definition in the target configure.tgt entry.
18504# This code just checks for a few cases where we'd like to ignore those
18505# definitions, even when they're present in the '.mt' file.  These cases
18506# are when --disable-sim is specified, or if the simulator directory is
18507# not part of the source tree.
18508#
18509# Check whether --enable-sim was given.
18510if test "${enable_sim+set}" = set; then :
18511  enableval=$enable_sim; echo "enable_sim = $enable_sim";
18512 echo "enableval = ${enableval}";
18513 case "${enableval}" in
18514  yes) ignore_sim=false ;;
18515  no)  ignore_sim=true ;;
18516  *)   ignore_sim=false ;;
18517 esac
18518else
18519  ignore_sim=false
18520fi
18521
18522
18523if test ! -d "${srcdir}/../sim"; then
18524  ignore_sim=true
18525fi
18526
18527SIM=
18528SIM_OBS=
18529if test "${ignore_sim}" = "false"; then
18530  if test x"${gdb_sim}" != x ; then
18531    SIM="${gdb_sim}"
18532    SIM_OBS="remote-sim.o"
18533
18534$as_echo "#define WITH_SIM 1" >>confdefs.h
18535
18536
18537    # Some tdep code should only be compiled in when the ppc sim is
18538    # built.  PR sim/13418.
18539    case $target in
18540      powerpc*-*-*)
18541
18542$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18543
18544	;;
18545    esac
18546  fi
18547fi
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562# List of host floatformats.
18563
18564cat >>confdefs.h <<_ACEOF
18565#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
18566_ACEOF
18567
18568
18569cat >>confdefs.h <<_ACEOF
18570#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
18571_ACEOF
18572
18573
18574cat >>confdefs.h <<_ACEOF
18575#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
18576_ACEOF
18577
18578
18579# target_subdir is used by the testsuite to find the target libraries.
18580target_subdir=
18581if test "${host}" != "${target}"; then
18582    target_subdir="${target_alias}/"
18583fi
18584
18585
18586# Import nat definitions.
18587nat_makefile_frag=/dev/null
18588if test "${gdb_native}" = "yes"; then
18589  . ${srcdir}/configure.nat
18590  nativefile=$NAT_FILE
18591fi
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603if test x"${gdb_osabi}" != x ; then
18604
18605cat >>confdefs.h <<_ACEOF
18606#define GDB_OSABI_DEFAULT $gdb_osabi
18607_ACEOF
18608
18609fi
18610
18611# Check for babeltrace and babeltrace-ctf
18612
18613# Check whether --with-babeltrace was given.
18614if test "${with_babeltrace+set}" = set; then :
18615  withval=$with_babeltrace;
18616else
18617  with_babeltrace=auto
18618fi
18619
18620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18621$as_echo_n "checking whether to use babeltrace... " >&6; }
18622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18623$as_echo "$with_babeltrace" >&6; }
18624
18625if test "x$with_babeltrace" = "xno"; then
18626  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18627$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18628else
18629  # Append -Werror to CFLAGS so that configure can catch the warning
18630  # "assignment from incompatible pointer type", which is related to
18631  # the babeltrace change from 1.0.3 to 1.1.0.  Babeltrace 1.1.0 works
18632  # in GDB, while babeltrace 1.0.3 is broken.
18633  # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18634  # safe to save and restore CFLAGS here.
18635  saved_CFLAGS=$CFLAGS
18636  CFLAGS="$CFLAGS -Werror"
18637
18638
18639
18640
18641
18642
18643
18644
18645    use_additional=yes
18646
18647  acl_save_prefix="$prefix"
18648  prefix="$acl_final_prefix"
18649  acl_save_exec_prefix="$exec_prefix"
18650  exec_prefix="$acl_final_exec_prefix"
18651
18652    eval additional_includedir=\"$includedir\"
18653    eval additional_libdir=\"$libdir\"
18654
18655  exec_prefix="$acl_save_exec_prefix"
18656  prefix="$acl_save_prefix"
18657
18658
18659# Check whether --with-libbabeltrace-prefix was given.
18660if test "${with_libbabeltrace_prefix+set}" = set; then :
18661  withval=$with_libbabeltrace_prefix;
18662    if test "X$withval" = "Xno"; then
18663      use_additional=no
18664    else
18665      if test "X$withval" = "X"; then
18666
18667  acl_save_prefix="$prefix"
18668  prefix="$acl_final_prefix"
18669  acl_save_exec_prefix="$exec_prefix"
18670  exec_prefix="$acl_final_exec_prefix"
18671
18672          eval additional_includedir=\"$includedir\"
18673          eval additional_libdir=\"$libdir\"
18674
18675  exec_prefix="$acl_save_exec_prefix"
18676  prefix="$acl_save_prefix"
18677
18678      else
18679        additional_includedir="$withval/include"
18680        additional_libdir="$withval/lib"
18681      fi
18682    fi
18683
18684fi
18685
18686
18687# Check whether --with-libbabeltrace-type was given.
18688if test "${with_libbabeltrace_type+set}" = set; then :
18689  withval=$with_libbabeltrace_type;  with_libbabeltrace_type=$withval
18690else
18691   with_libbabeltrace_type=auto
18692fi
18693
18694  lib_type=`eval echo \$with_libbabeltrace_type`
18695
18696      LIBBABELTRACE=
18697  LTLIBBABELTRACE=
18698  INCBABELTRACE=
18699  rpathdirs=
18700  ltrpathdirs=
18701  names_already_handled=
18702  names_next_round='babeltrace babeltrace-ctf'
18703  while test -n "$names_next_round"; do
18704    names_this_round="$names_next_round"
18705    names_next_round=
18706    for name in $names_this_round; do
18707      already_handled=
18708      for n in $names_already_handled; do
18709        if test "$n" = "$name"; then
18710          already_handled=yes
18711          break
18712        fi
18713      done
18714      if test -z "$already_handled"; then
18715        names_already_handled="$names_already_handled $name"
18716                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18717        eval value=\"\$HAVE_LIB$uppername\"
18718        if test -n "$value"; then
18719          if test "$value" = yes; then
18720            eval value=\"\$LIB$uppername\"
18721            test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18722            eval value=\"\$LTLIB$uppername\"
18723            test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18724          else
18725                                    :
18726          fi
18727        else
18728                              found_dir=
18729          found_la=
18730          found_so=
18731          found_a=
18732          if test $use_additional = yes; then
18733            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18734              found_dir="$additional_libdir"
18735              found_so="$additional_libdir/lib$name.$shlibext"
18736              if test -f "$additional_libdir/lib$name.la"; then
18737                found_la="$additional_libdir/lib$name.la"
18738              fi
18739            elif test x$lib_type != xshared; then
18740              if test -f "$additional_libdir/lib$name.$libext"; then
18741                found_dir="$additional_libdir"
18742                found_a="$additional_libdir/lib$name.$libext"
18743                if test -f "$additional_libdir/lib$name.la"; then
18744                  found_la="$additional_libdir/lib$name.la"
18745                fi
18746              fi
18747            fi
18748          fi
18749          if test "X$found_dir" = "X"; then
18750            for x in $LDFLAGS $LTLIBBABELTRACE; do
18751
18752  acl_save_prefix="$prefix"
18753  prefix="$acl_final_prefix"
18754  acl_save_exec_prefix="$exec_prefix"
18755  exec_prefix="$acl_final_exec_prefix"
18756  eval x=\"$x\"
18757  exec_prefix="$acl_save_exec_prefix"
18758  prefix="$acl_save_prefix"
18759
18760              case "$x" in
18761                -L*)
18762                  dir=`echo "X$x" | sed -e 's/^X-L//'`
18763                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18764                    found_dir="$dir"
18765                    found_so="$dir/lib$name.$shlibext"
18766                    if test -f "$dir/lib$name.la"; then
18767                      found_la="$dir/lib$name.la"
18768                    fi
18769                  elif test x$lib_type != xshared; then
18770                    if test -f "$dir/lib$name.$libext"; then
18771                      found_dir="$dir"
18772                      found_a="$dir/lib$name.$libext"
18773                      if test -f "$dir/lib$name.la"; then
18774                        found_la="$dir/lib$name.la"
18775                      fi
18776                    fi
18777                  fi
18778                  ;;
18779              esac
18780              if test "X$found_dir" != "X"; then
18781                break
18782              fi
18783            done
18784          fi
18785          if test "X$found_dir" != "X"; then
18786                        LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18787            if test "X$found_so" != "X"; then
18788                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18789                                LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18790              else
18791                                                                                haveit=
18792                for x in $ltrpathdirs; do
18793                  if test "X$x" = "X$found_dir"; then
18794                    haveit=yes
18795                    break
18796                  fi
18797                done
18798                if test -z "$haveit"; then
18799                  ltrpathdirs="$ltrpathdirs $found_dir"
18800                fi
18801                                if test "$hardcode_direct" = yes; then
18802                                                      LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18803                else
18804                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18805                                                            LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18806                                                            haveit=
18807                    for x in $rpathdirs; do
18808                      if test "X$x" = "X$found_dir"; then
18809                        haveit=yes
18810                        break
18811                      fi
18812                    done
18813                    if test -z "$haveit"; then
18814                      rpathdirs="$rpathdirs $found_dir"
18815                    fi
18816                  else
18817                                                                                haveit=
18818                    for x in $LDFLAGS $LIBBABELTRACE; do
18819
18820  acl_save_prefix="$prefix"
18821  prefix="$acl_final_prefix"
18822  acl_save_exec_prefix="$exec_prefix"
18823  exec_prefix="$acl_final_exec_prefix"
18824  eval x=\"$x\"
18825  exec_prefix="$acl_save_exec_prefix"
18826  prefix="$acl_save_prefix"
18827
18828                      if test "X$x" = "X-L$found_dir"; then
18829                        haveit=yes
18830                        break
18831                      fi
18832                    done
18833                    if test -z "$haveit"; then
18834                      LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18835                    fi
18836                    if test "$hardcode_minus_L" != no; then
18837                                                                                        LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18838                    else
18839                                                                                                                                                                                LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18840                    fi
18841                  fi
18842                fi
18843              fi
18844            else
18845              if test "X$found_a" != "X"; then
18846                                LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18847              else
18848                                                LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18849              fi
18850            fi
18851                        additional_includedir=
18852            case "$found_dir" in
18853              */lib | */lib/)
18854                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18855                additional_includedir="$basedir/include"
18856                ;;
18857            esac
18858            if test "X$additional_includedir" != "X"; then
18859                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
18860                haveit=
18861                if test "X$additional_includedir" = "X/usr/local/include"; then
18862                  if test -n "$GCC"; then
18863                    case $host_os in
18864                      linux*) haveit=yes;;
18865                    esac
18866                  fi
18867                fi
18868                if test -z "$haveit"; then
18869                  for x in $CPPFLAGS $INCBABELTRACE; do
18870
18871  acl_save_prefix="$prefix"
18872  prefix="$acl_final_prefix"
18873  acl_save_exec_prefix="$exec_prefix"
18874  exec_prefix="$acl_final_exec_prefix"
18875  eval x=\"$x\"
18876  exec_prefix="$acl_save_exec_prefix"
18877  prefix="$acl_save_prefix"
18878
18879                    if test "X$x" = "X-I$additional_includedir"; then
18880                      haveit=yes
18881                      break
18882                    fi
18883                  done
18884                  if test -z "$haveit"; then
18885                    if test -d "$additional_includedir"; then
18886                                            INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18887                    fi
18888                  fi
18889                fi
18890              fi
18891            fi
18892                        if test -n "$found_la"; then
18893                                                        save_libdir="$libdir"
18894              case "$found_la" in
18895                */* | *\\*) . "$found_la" ;;
18896                *) . "./$found_la" ;;
18897              esac
18898              libdir="$save_libdir"
18899                            for dep in $dependency_libs; do
18900                case "$dep" in
18901                  -L*)
18902                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18903                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
18904                      haveit=
18905                      if test "X$additional_libdir" = "X/usr/local/lib"; then
18906                        if test -n "$GCC"; then
18907                          case $host_os in
18908                            linux*) haveit=yes;;
18909                          esac
18910                        fi
18911                      fi
18912                      if test -z "$haveit"; then
18913                        haveit=
18914                        for x in $LDFLAGS $LIBBABELTRACE; do
18915
18916  acl_save_prefix="$prefix"
18917  prefix="$acl_final_prefix"
18918  acl_save_exec_prefix="$exec_prefix"
18919  exec_prefix="$acl_final_exec_prefix"
18920  eval x=\"$x\"
18921  exec_prefix="$acl_save_exec_prefix"
18922  prefix="$acl_save_prefix"
18923
18924                          if test "X$x" = "X-L$additional_libdir"; then
18925                            haveit=yes
18926                            break
18927                          fi
18928                        done
18929                        if test -z "$haveit"; then
18930                          if test -d "$additional_libdir"; then
18931                                                        LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18932                          fi
18933                        fi
18934                        haveit=
18935                        for x in $LDFLAGS $LTLIBBABELTRACE; do
18936
18937  acl_save_prefix="$prefix"
18938  prefix="$acl_final_prefix"
18939  acl_save_exec_prefix="$exec_prefix"
18940  exec_prefix="$acl_final_exec_prefix"
18941  eval x=\"$x\"
18942  exec_prefix="$acl_save_exec_prefix"
18943  prefix="$acl_save_prefix"
18944
18945                          if test "X$x" = "X-L$additional_libdir"; then
18946                            haveit=yes
18947                            break
18948                          fi
18949                        done
18950                        if test -z "$haveit"; then
18951                          if test -d "$additional_libdir"; then
18952                                                        LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18953                          fi
18954                        fi
18955                      fi
18956                    fi
18957                    ;;
18958                  -R*)
18959                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
18960                    if test "$enable_rpath" != no; then
18961                                                                  haveit=
18962                      for x in $rpathdirs; do
18963                        if test "X$x" = "X$dir"; then
18964                          haveit=yes
18965                          break
18966                        fi
18967                      done
18968                      if test -z "$haveit"; then
18969                        rpathdirs="$rpathdirs $dir"
18970                      fi
18971                                                                  haveit=
18972                      for x in $ltrpathdirs; do
18973                        if test "X$x" = "X$dir"; then
18974                          haveit=yes
18975                          break
18976                        fi
18977                      done
18978                      if test -z "$haveit"; then
18979                        ltrpathdirs="$ltrpathdirs $dir"
18980                      fi
18981                    fi
18982                    ;;
18983                  -l*)
18984                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18985                    ;;
18986                  *.la)
18987                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18988                    ;;
18989                  *)
18990                                        LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18991                    LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18992                    ;;
18993                esac
18994              done
18995            fi
18996          else
18997                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18998              LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18999              LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
19000            else
19001              LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
19002              LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
19003            fi
19004          fi
19005        fi
19006      fi
19007    done
19008  done
19009  if test "X$rpathdirs" != "X"; then
19010    if test -n "$hardcode_libdir_separator"; then
19011                        alldirs=
19012      for found_dir in $rpathdirs; do
19013        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19014      done
19015            acl_save_libdir="$libdir"
19016      libdir="$alldirs"
19017      eval flag=\"$hardcode_libdir_flag_spec\"
19018      libdir="$acl_save_libdir"
19019      LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19020    else
19021            for found_dir in $rpathdirs; do
19022        acl_save_libdir="$libdir"
19023        libdir="$found_dir"
19024        eval flag=\"$hardcode_libdir_flag_spec\"
19025        libdir="$acl_save_libdir"
19026        LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19027      done
19028    fi
19029  fi
19030  if test "X$ltrpathdirs" != "X"; then
19031            for found_dir in $ltrpathdirs; do
19032      LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
19033    done
19034  fi
19035
19036
19037        ac_save_CPPFLAGS="$CPPFLAGS"
19038
19039  for element in $INCBABELTRACE; do
19040    haveit=
19041    for x in $CPPFLAGS; do
19042
19043  acl_save_prefix="$prefix"
19044  prefix="$acl_final_prefix"
19045  acl_save_exec_prefix="$exec_prefix"
19046  exec_prefix="$acl_final_exec_prefix"
19047  eval x=\"$x\"
19048  exec_prefix="$acl_save_exec_prefix"
19049  prefix="$acl_save_prefix"
19050
19051      if test "X$x" = "X$element"; then
19052        haveit=yes
19053        break
19054      fi
19055    done
19056    if test -z "$haveit"; then
19057      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19058    fi
19059  done
19060
19061
19062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
19063$as_echo_n "checking for libbabeltrace... " >&6; }
19064if ${ac_cv_libbabeltrace+:} false; then :
19065  $as_echo_n "(cached) " >&6
19066else
19067
19068    ac_save_LIBS="$LIBS"
19069    LIBS="$LIBS $LIBBABELTRACE"
19070    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19071/* end confdefs.h.  */
19072#include <babeltrace/babeltrace.h>
19073			 #include <babeltrace/ctf/events.h>
19074			 #include <babeltrace/ctf/iterator.h>
19075int
19076main ()
19077{
19078struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
19079			struct bt_ctf_event *event = NULL;
19080			const struct bt_definition *scope;
19081
19082			pos->type = BT_SEEK_BEGIN;
19083			bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
19084			scope = bt_ctf_get_top_level_scope (event,
19085			      				   BT_STREAM_EVENT_HEADER);
19086		        bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
19087
19088  ;
19089  return 0;
19090}
19091_ACEOF
19092if ac_fn_c_try_link "$LINENO"; then :
19093  ac_cv_libbabeltrace=yes
19094else
19095  ac_cv_libbabeltrace=no
19096fi
19097rm -f core conftest.err conftest.$ac_objext \
19098    conftest$ac_exeext conftest.$ac_ext
19099    LIBS="$ac_save_LIBS"
19100
19101fi
19102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
19103$as_echo "$ac_cv_libbabeltrace" >&6; }
19104  if test "$ac_cv_libbabeltrace" = yes; then
19105    HAVE_LIBBABELTRACE=yes
19106
19107$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
19108
19109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
19110$as_echo_n "checking how to link with libbabeltrace... " >&6; }
19111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
19112$as_echo "$LIBBABELTRACE" >&6; }
19113  else
19114    HAVE_LIBBABELTRACE=no
19115            CPPFLAGS="$ac_save_CPPFLAGS"
19116    LIBBABELTRACE=
19117    LTLIBBABELTRACE=
19118  fi
19119
19120
19121
19122
19123
19124
19125  CFLAGS=$saved_CFLAGS
19126
19127  if test "$HAVE_LIBBABELTRACE" != yes; then
19128     if test "$with_babeltrace" = yes; then
19129       as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
19130     else
19131       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
19132$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
19133     fi
19134  fi
19135fi
19136
19137# Check for xxhash
19138
19139# Check whether --with-xxhash was given.
19140if test "${with_xxhash+set}" = set; then :
19141  withval=$with_xxhash;
19142else
19143  with_xxhash=auto
19144fi
19145
19146
19147 # Check whether --enable-libctf was given.
19148if test "${enable_libctf+set}" = set; then :
19149  enableval=$enable_libctf;
19150      case "$enableval" in
19151       yes|no) ;;
19152       *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
19153      esac
19154
19155else
19156  enable_libctf=yes
19157fi
19158
19159
19160if test x${enable_static} = xno; then
19161  LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
19162  CTF_DEPS="../libctf/.libs/libctf.so"
19163else
19164  LIBCTF="../libctf/.libs/libctf.a"
19165  CTF_DEPS="$LIBCTF"
19166fi
19167if test "${enable_libctf}" = yes; then
19168
19169$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
19170
19171else
19172  LIBCTF=
19173  CTF_DEPS=
19174fi
19175
19176
19177
19178# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
19179# empty version.
19180
19181if test "x$with_xxhash" != "xno"; then
19182
19183
19184
19185
19186
19187
19188
19189
19190    use_additional=yes
19191
19192  acl_save_prefix="$prefix"
19193  prefix="$acl_final_prefix"
19194  acl_save_exec_prefix="$exec_prefix"
19195  exec_prefix="$acl_final_exec_prefix"
19196
19197    eval additional_includedir=\"$includedir\"
19198    eval additional_libdir=\"$libdir\"
19199
19200  exec_prefix="$acl_save_exec_prefix"
19201  prefix="$acl_save_prefix"
19202
19203
19204# Check whether --with-libxxhash-prefix was given.
19205if test "${with_libxxhash_prefix+set}" = set; then :
19206  withval=$with_libxxhash_prefix;
19207    if test "X$withval" = "Xno"; then
19208      use_additional=no
19209    else
19210      if test "X$withval" = "X"; then
19211
19212  acl_save_prefix="$prefix"
19213  prefix="$acl_final_prefix"
19214  acl_save_exec_prefix="$exec_prefix"
19215  exec_prefix="$acl_final_exec_prefix"
19216
19217          eval additional_includedir=\"$includedir\"
19218          eval additional_libdir=\"$libdir\"
19219
19220  exec_prefix="$acl_save_exec_prefix"
19221  prefix="$acl_save_prefix"
19222
19223      else
19224        additional_includedir="$withval/include"
19225        additional_libdir="$withval/lib"
19226      fi
19227    fi
19228
19229fi
19230
19231
19232# Check whether --with-libxxhash-type was given.
19233if test "${with_libxxhash_type+set}" = set; then :
19234  withval=$with_libxxhash_type;  with_libxxhash_type=$withval
19235else
19236   with_libxxhash_type=auto
19237fi
19238
19239  lib_type=`eval echo \$with_libxxhash_type`
19240
19241      LIBXXHASH=
19242  LTLIBXXHASH=
19243  INCXXHASH=
19244  rpathdirs=
19245  ltrpathdirs=
19246  names_already_handled=
19247  names_next_round='xxhash '
19248  while test -n "$names_next_round"; do
19249    names_this_round="$names_next_round"
19250    names_next_round=
19251    for name in $names_this_round; do
19252      already_handled=
19253      for n in $names_already_handled; do
19254        if test "$n" = "$name"; then
19255          already_handled=yes
19256          break
19257        fi
19258      done
19259      if test -z "$already_handled"; then
19260        names_already_handled="$names_already_handled $name"
19261                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
19262        eval value=\"\$HAVE_LIB$uppername\"
19263        if test -n "$value"; then
19264          if test "$value" = yes; then
19265            eval value=\"\$LIB$uppername\"
19266            test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
19267            eval value=\"\$LTLIB$uppername\"
19268            test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
19269          else
19270                                    :
19271          fi
19272        else
19273                              found_dir=
19274          found_la=
19275          found_so=
19276          found_a=
19277          if test $use_additional = yes; then
19278            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19279              found_dir="$additional_libdir"
19280              found_so="$additional_libdir/lib$name.$shlibext"
19281              if test -f "$additional_libdir/lib$name.la"; then
19282                found_la="$additional_libdir/lib$name.la"
19283              fi
19284            elif test x$lib_type != xshared; then
19285              if test -f "$additional_libdir/lib$name.$libext"; then
19286                found_dir="$additional_libdir"
19287                found_a="$additional_libdir/lib$name.$libext"
19288                if test -f "$additional_libdir/lib$name.la"; then
19289                  found_la="$additional_libdir/lib$name.la"
19290                fi
19291              fi
19292            fi
19293          fi
19294          if test "X$found_dir" = "X"; then
19295            for x in $LDFLAGS $LTLIBXXHASH; do
19296
19297  acl_save_prefix="$prefix"
19298  prefix="$acl_final_prefix"
19299  acl_save_exec_prefix="$exec_prefix"
19300  exec_prefix="$acl_final_exec_prefix"
19301  eval x=\"$x\"
19302  exec_prefix="$acl_save_exec_prefix"
19303  prefix="$acl_save_prefix"
19304
19305              case "$x" in
19306                -L*)
19307                  dir=`echo "X$x" | sed -e 's/^X-L//'`
19308                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19309                    found_dir="$dir"
19310                    found_so="$dir/lib$name.$shlibext"
19311                    if test -f "$dir/lib$name.la"; then
19312                      found_la="$dir/lib$name.la"
19313                    fi
19314                  elif test x$lib_type != xshared; then
19315                    if test -f "$dir/lib$name.$libext"; then
19316                      found_dir="$dir"
19317                      found_a="$dir/lib$name.$libext"
19318                      if test -f "$dir/lib$name.la"; then
19319                        found_la="$dir/lib$name.la"
19320                      fi
19321                    fi
19322                  fi
19323                  ;;
19324              esac
19325              if test "X$found_dir" != "X"; then
19326                break
19327              fi
19328            done
19329          fi
19330          if test "X$found_dir" != "X"; then
19331                        LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
19332            if test "X$found_so" != "X"; then
19333                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
19334                                LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19335              else
19336                                                                                haveit=
19337                for x in $ltrpathdirs; do
19338                  if test "X$x" = "X$found_dir"; then
19339                    haveit=yes
19340                    break
19341                  fi
19342                done
19343                if test -z "$haveit"; then
19344                  ltrpathdirs="$ltrpathdirs $found_dir"
19345                fi
19346                                if test "$hardcode_direct" = yes; then
19347                                                      LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19348                else
19349                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19350                                                            LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19351                                                            haveit=
19352                    for x in $rpathdirs; do
19353                      if test "X$x" = "X$found_dir"; then
19354                        haveit=yes
19355                        break
19356                      fi
19357                    done
19358                    if test -z "$haveit"; then
19359                      rpathdirs="$rpathdirs $found_dir"
19360                    fi
19361                  else
19362                                                                                haveit=
19363                    for x in $LDFLAGS $LIBXXHASH; do
19364
19365  acl_save_prefix="$prefix"
19366  prefix="$acl_final_prefix"
19367  acl_save_exec_prefix="$exec_prefix"
19368  exec_prefix="$acl_final_exec_prefix"
19369  eval x=\"$x\"
19370  exec_prefix="$acl_save_exec_prefix"
19371  prefix="$acl_save_prefix"
19372
19373                      if test "X$x" = "X-L$found_dir"; then
19374                        haveit=yes
19375                        break
19376                      fi
19377                    done
19378                    if test -z "$haveit"; then
19379                      LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
19380                    fi
19381                    if test "$hardcode_minus_L" != no; then
19382                                                                                        LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19383                    else
19384                                                                                                                                                                                LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19385                    fi
19386                  fi
19387                fi
19388              fi
19389            else
19390              if test "X$found_a" != "X"; then
19391                                LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
19392              else
19393                                                LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
19394              fi
19395            fi
19396                        additional_includedir=
19397            case "$found_dir" in
19398              */lib | */lib/)
19399                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19400                additional_includedir="$basedir/include"
19401                ;;
19402            esac
19403            if test "X$additional_includedir" != "X"; then
19404                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
19405                haveit=
19406                if test "X$additional_includedir" = "X/usr/local/include"; then
19407                  if test -n "$GCC"; then
19408                    case $host_os in
19409                      linux*) haveit=yes;;
19410                    esac
19411                  fi
19412                fi
19413                if test -z "$haveit"; then
19414                  for x in $CPPFLAGS $INCXXHASH; do
19415
19416  acl_save_prefix="$prefix"
19417  prefix="$acl_final_prefix"
19418  acl_save_exec_prefix="$exec_prefix"
19419  exec_prefix="$acl_final_exec_prefix"
19420  eval x=\"$x\"
19421  exec_prefix="$acl_save_exec_prefix"
19422  prefix="$acl_save_prefix"
19423
19424                    if test "X$x" = "X-I$additional_includedir"; then
19425                      haveit=yes
19426                      break
19427                    fi
19428                  done
19429                  if test -z "$haveit"; then
19430                    if test -d "$additional_includedir"; then
19431                                            INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19432                    fi
19433                  fi
19434                fi
19435              fi
19436            fi
19437                        if test -n "$found_la"; then
19438                                                        save_libdir="$libdir"
19439              case "$found_la" in
19440                */* | *\\*) . "$found_la" ;;
19441                *) . "./$found_la" ;;
19442              esac
19443              libdir="$save_libdir"
19444                            for dep in $dependency_libs; do
19445                case "$dep" in
19446                  -L*)
19447                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19448                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
19449                      haveit=
19450                      if test "X$additional_libdir" = "X/usr/local/lib"; then
19451                        if test -n "$GCC"; then
19452                          case $host_os in
19453                            linux*) haveit=yes;;
19454                          esac
19455                        fi
19456                      fi
19457                      if test -z "$haveit"; then
19458                        haveit=
19459                        for x in $LDFLAGS $LIBXXHASH; do
19460
19461  acl_save_prefix="$prefix"
19462  prefix="$acl_final_prefix"
19463  acl_save_exec_prefix="$exec_prefix"
19464  exec_prefix="$acl_final_exec_prefix"
19465  eval x=\"$x\"
19466  exec_prefix="$acl_save_exec_prefix"
19467  prefix="$acl_save_prefix"
19468
19469                          if test "X$x" = "X-L$additional_libdir"; then
19470                            haveit=yes
19471                            break
19472                          fi
19473                        done
19474                        if test -z "$haveit"; then
19475                          if test -d "$additional_libdir"; then
19476                                                        LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19477                          fi
19478                        fi
19479                        haveit=
19480                        for x in $LDFLAGS $LTLIBXXHASH; do
19481
19482  acl_save_prefix="$prefix"
19483  prefix="$acl_final_prefix"
19484  acl_save_exec_prefix="$exec_prefix"
19485  exec_prefix="$acl_final_exec_prefix"
19486  eval x=\"$x\"
19487  exec_prefix="$acl_save_exec_prefix"
19488  prefix="$acl_save_prefix"
19489
19490                          if test "X$x" = "X-L$additional_libdir"; then
19491                            haveit=yes
19492                            break
19493                          fi
19494                        done
19495                        if test -z "$haveit"; then
19496                          if test -d "$additional_libdir"; then
19497                                                        LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19498                          fi
19499                        fi
19500                      fi
19501                    fi
19502                    ;;
19503                  -R*)
19504                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
19505                    if test "$enable_rpath" != no; then
19506                                                                  haveit=
19507                      for x in $rpathdirs; do
19508                        if test "X$x" = "X$dir"; then
19509                          haveit=yes
19510                          break
19511                        fi
19512                      done
19513                      if test -z "$haveit"; then
19514                        rpathdirs="$rpathdirs $dir"
19515                      fi
19516                                                                  haveit=
19517                      for x in $ltrpathdirs; do
19518                        if test "X$x" = "X$dir"; then
19519                          haveit=yes
19520                          break
19521                        fi
19522                      done
19523                      if test -z "$haveit"; then
19524                        ltrpathdirs="$ltrpathdirs $dir"
19525                      fi
19526                    fi
19527                    ;;
19528                  -l*)
19529                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19530                    ;;
19531                  *.la)
19532                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19533                    ;;
19534                  *)
19535                                        LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19536                    LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19537                    ;;
19538                esac
19539              done
19540            fi
19541          else
19542                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19543              LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19544              LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19545            else
19546              LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19547              LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19548            fi
19549          fi
19550        fi
19551      fi
19552    done
19553  done
19554  if test "X$rpathdirs" != "X"; then
19555    if test -n "$hardcode_libdir_separator"; then
19556                        alldirs=
19557      for found_dir in $rpathdirs; do
19558        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19559      done
19560            acl_save_libdir="$libdir"
19561      libdir="$alldirs"
19562      eval flag=\"$hardcode_libdir_flag_spec\"
19563      libdir="$acl_save_libdir"
19564      LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19565    else
19566            for found_dir in $rpathdirs; do
19567        acl_save_libdir="$libdir"
19568        libdir="$found_dir"
19569        eval flag=\"$hardcode_libdir_flag_spec\"
19570        libdir="$acl_save_libdir"
19571        LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19572      done
19573    fi
19574  fi
19575  if test "X$ltrpathdirs" != "X"; then
19576            for found_dir in $ltrpathdirs; do
19577      LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19578    done
19579  fi
19580
19581
19582        ac_save_CPPFLAGS="$CPPFLAGS"
19583
19584  for element in $INCXXHASH; do
19585    haveit=
19586    for x in $CPPFLAGS; do
19587
19588  acl_save_prefix="$prefix"
19589  prefix="$acl_final_prefix"
19590  acl_save_exec_prefix="$exec_prefix"
19591  exec_prefix="$acl_final_exec_prefix"
19592  eval x=\"$x\"
19593  exec_prefix="$acl_save_exec_prefix"
19594  prefix="$acl_save_prefix"
19595
19596      if test "X$x" = "X$element"; then
19597        haveit=yes
19598        break
19599      fi
19600    done
19601    if test -z "$haveit"; then
19602      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19603    fi
19604  done
19605
19606
19607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19608$as_echo_n "checking for libxxhash... " >&6; }
19609if ${ac_cv_libxxhash+:} false; then :
19610  $as_echo_n "(cached) " >&6
19611else
19612
19613    ac_save_LIBS="$LIBS"
19614    LIBS="$LIBS $LIBXXHASH"
19615    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19616/* end confdefs.h.  */
19617#include <xxhash.h>
19618int
19619main ()
19620{
19621XXH32("foo", 3, 0);
19622
19623  ;
19624  return 0;
19625}
19626_ACEOF
19627if ac_fn_c_try_link "$LINENO"; then :
19628  ac_cv_libxxhash=yes
19629else
19630  ac_cv_libxxhash=no
19631fi
19632rm -f core conftest.err conftest.$ac_objext \
19633    conftest$ac_exeext conftest.$ac_ext
19634    LIBS="$ac_save_LIBS"
19635
19636fi
19637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19638$as_echo "$ac_cv_libxxhash" >&6; }
19639  if test "$ac_cv_libxxhash" = yes; then
19640    HAVE_LIBXXHASH=yes
19641
19642$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19643
19644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19645$as_echo_n "checking how to link with libxxhash... " >&6; }
19646    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19647$as_echo "$LIBXXHASH" >&6; }
19648  else
19649    HAVE_LIBXXHASH=no
19650            CPPFLAGS="$ac_save_CPPFLAGS"
19651    LIBXXHASH=
19652    LTLIBXXHASH=
19653  fi
19654
19655
19656
19657
19658
19659
19660  if test "$HAVE_LIBXXHASH" != yes; then
19661    if test "$with_xxhash" = yes; then
19662      as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19663    fi
19664  fi
19665  if test "x$with_xxhash" = "xauto"; then
19666    with_xxhash="$HAVE_LIBXXHASH"
19667  fi
19668fi
19669
19670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19671$as_echo_n "checking whether to use xxhash... " >&6; }
19672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19673$as_echo "$with_xxhash" >&6; }
19674
19675NM_H=
19676rm -f nm.h
19677if test "${nativefile}" != ""; then
19678    case "${nativefile}" in
19679      nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19680      * ) GDB_NM_FILE="${nativefile}"
19681    esac
19682    ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19683
19684
19685cat >>confdefs.h <<_ACEOF
19686#define GDB_NM_FILE "${GDB_NM_FILE}"
19687_ACEOF
19688
19689    NM_H=nm.h
19690fi
19691
19692
19693
19694for ac_prog in xsltproc
19695do
19696  # Extract the first word of "$ac_prog", so it can be a program name with args.
19697set dummy $ac_prog; ac_word=$2
19698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19699$as_echo_n "checking for $ac_word... " >&6; }
19700if ${ac_cv_path_XSLTPROC+:} false; then :
19701  $as_echo_n "(cached) " >&6
19702else
19703  case $XSLTPROC in
19704  [\\/]* | ?:[\\/]*)
19705  ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19706  ;;
19707  *)
19708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19709for as_dir in $PATH
19710do
19711  IFS=$as_save_IFS
19712  test -z "$as_dir" && as_dir=.
19713    for ac_exec_ext in '' $ac_executable_extensions; do
19714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19715    ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19717    break 2
19718  fi
19719done
19720  done
19721IFS=$as_save_IFS
19722
19723  ;;
19724esac
19725fi
19726XSLTPROC=$ac_cv_path_XSLTPROC
19727if test -n "$XSLTPROC"; then
19728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19729$as_echo "$XSLTPROC" >&6; }
19730else
19731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19732$as_echo "no" >&6; }
19733fi
19734
19735
19736  test -n "$XSLTPROC" && break
19737done
19738test -n "$XSLTPROC" || XSLTPROC="missing"
19739
19740if test "x$USE_MAINTAINER_MODE" = xyes; then
19741  if test "${XSLTPROC}" = missing; then
19742    as_fn_error $? "unable to find xsltproc.  maintainer-mode requires xsltproc." "$LINENO" 5
19743  fi
19744fi
19745
19746
19747
19748
19749
19750$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
19751
19752
19753
19754# Check whether we will enable the inclusion of unit tests when
19755# compiling GDB.
19756#
19757# The default value of this option changes depending whether we're on
19758# development mode (in which case it's "true") or not (in which case
19759# it's "false").  The $development variable is set by the GDB_AC_COMMON
19760# macro, which must therefore be used before GDB_AC_SELFTEST.
19761
19762if test "x$development" != xtrue && test "x$development" != xfalse; then :
19763  as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19764fi
19765
19766# Check whether --enable-unit-tests was given.
19767if test "${enable_unit_tests+set}" = set; then :
19768  enableval=$enable_unit_tests; case "${enableval}" in
19769  yes)  enable_unittests=true  ;;
19770  no)   enable_unittests=false ;;
19771  *)    as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19772esac
19773else
19774  enable_unittests=$development
19775fi
19776
19777
19778if $enable_unittests; then
19779
19780$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19781
19782
19783  CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19784  CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
19785
19786fi
19787
19788
19789
19790  gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19791  GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19792  if test "x$GDB_TRANSFORM_NAME" = x; then
19793     GDB_TRANSFORM_NAME=gdb
19794  fi
19795
19796
19797
19798  gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19799  GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19800  if test "x$GCORE_TRANSFORM_NAME" = x; then
19801     GCORE_TRANSFORM_NAME=gcore
19802  fi
19803
19804
19805ac_config_files="$ac_config_files gcore"
19806
19807ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
19808
19809
19810cat >confcache <<\_ACEOF
19811# This file is a shell script that caches the results of configure
19812# tests run on this system so they can be shared between configure
19813# scripts and configure runs, see configure's option --config-cache.
19814# It is not useful on other systems.  If it contains results you don't
19815# want to keep, you may remove or edit it.
19816#
19817# config.status only pays attention to the cache file if you give it
19818# the --recheck option to rerun configure.
19819#
19820# `ac_cv_env_foo' variables (set or unset) will be overridden when
19821# loading this file, other *unset* `ac_cv_foo' will be assigned the
19822# following values.
19823
19824_ACEOF
19825
19826# The following way of writing the cache mishandles newlines in values,
19827# but we know of no workaround that is simple, portable, and efficient.
19828# So, we kill variables containing newlines.
19829# Ultrix sh set writes to stderr and can't be redirected directly,
19830# and sets the high bit in the cache file unless we assign to the vars.
19831(
19832  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19833    eval ac_val=\$$ac_var
19834    case $ac_val in #(
19835    *${as_nl}*)
19836      case $ac_var in #(
19837      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19838$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19839      esac
19840      case $ac_var in #(
19841      _ | IFS | as_nl) ;; #(
19842      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19843      *) { eval $ac_var=; unset $ac_var;} ;;
19844      esac ;;
19845    esac
19846  done
19847
19848  (set) 2>&1 |
19849    case $as_nl`(ac_space=' '; set) 2>&1` in #(
19850    *${as_nl}ac_space=\ *)
19851      # `set' does not quote correctly, so add quotes: double-quote
19852      # substitution turns \\\\ into \\, and sed turns \\ into \.
19853      sed -n \
19854	"s/'/'\\\\''/g;
19855	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19856      ;; #(
19857    *)
19858      # `set' quotes correctly as required by POSIX, so do not add quotes.
19859      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19860      ;;
19861    esac |
19862    sort
19863) |
19864  sed '
19865     /^ac_cv_env_/b end
19866     t clear
19867     :clear
19868     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19869     t end
19870     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19871     :end' >>confcache
19872if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19873  if test -w "$cache_file"; then
19874    if test "x$cache_file" != "x/dev/null"; then
19875      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19876$as_echo "$as_me: updating cache $cache_file" >&6;}
19877      if test ! -f "$cache_file" || test -h "$cache_file"; then
19878	cat confcache >"$cache_file"
19879      else
19880        case $cache_file in #(
19881        */* | ?:*)
19882	  mv -f confcache "$cache_file"$$ &&
19883	  mv -f "$cache_file"$$ "$cache_file" ;; #(
19884        *)
19885	  mv -f confcache "$cache_file" ;;
19886	esac
19887      fi
19888    fi
19889  else
19890    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19891$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19892  fi
19893fi
19894rm -f confcache
19895
19896test "x$prefix" = xNONE && prefix=$ac_default_prefix
19897# Let make expand exec_prefix.
19898test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19899
19900DEFS=-DHAVE_CONFIG_H
19901
19902ac_libobjs=
19903ac_ltlibobjs=
19904U=
19905for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19906  # 1. Remove the extension, and $U if already installed.
19907  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19908  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19909  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19910  #    will be set to the directory where LIBOBJS objects are built.
19911  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19912  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19913done
19914LIBOBJS=$ac_libobjs
19915
19916LTLIBOBJS=$ac_ltlibobjs
19917
19918
19919if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
19920  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
19921Usually this means the macro was only invoked conditionally." "$LINENO" 5
19922fi
19923if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
19924  as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
19925Usually this means the macro was only invoked conditionally." "$LINENO" 5
19926fi
19927if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
19928  as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
19929Usually this means the macro was only invoked conditionally." "$LINENO" 5
19930fi
19931
19932
19933: "${CONFIG_STATUS=./config.status}"
19934ac_write_fail=0
19935ac_clean_files_save=$ac_clean_files
19936ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19937{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19938$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19939as_write_fail=0
19940cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19941#! $SHELL
19942# Generated by $as_me.
19943# Run this file to recreate the current configuration.
19944# Compiler output produced by configure, useful for debugging
19945# configure, is in config.log if it exists.
19946
19947debug=false
19948ac_cs_recheck=false
19949ac_cs_silent=false
19950
19951SHELL=\${CONFIG_SHELL-$SHELL}
19952export SHELL
19953_ASEOF
19954cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19955## -------------------- ##
19956## M4sh Initialization. ##
19957## -------------------- ##
19958
19959# Be more Bourne compatible
19960DUALCASE=1; export DUALCASE # for MKS sh
19961if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19962  emulate sh
19963  NULLCMD=:
19964  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19965  # is contrary to our usage.  Disable this feature.
19966  alias -g '${1+"$@"}'='"$@"'
19967  setopt NO_GLOB_SUBST
19968else
19969  case `(set -o) 2>/dev/null` in #(
19970  *posix*) :
19971    set -o posix ;; #(
19972  *) :
19973     ;;
19974esac
19975fi
19976
19977
19978as_nl='
19979'
19980export as_nl
19981# Printing a long string crashes Solaris 7 /usr/bin/printf.
19982as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19983as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19984as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19985# Prefer a ksh shell builtin over an external printf program on Solaris,
19986# but without wasting forks for bash or zsh.
19987if test -z "$BASH_VERSION$ZSH_VERSION" \
19988    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19989  as_echo='print -r --'
19990  as_echo_n='print -rn --'
19991elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19992  as_echo='printf %s\n'
19993  as_echo_n='printf %s'
19994else
19995  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19996    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19997    as_echo_n='/usr/ucb/echo -n'
19998  else
19999    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20000    as_echo_n_body='eval
20001      arg=$1;
20002      case $arg in #(
20003      *"$as_nl"*)
20004	expr "X$arg" : "X\\(.*\\)$as_nl";
20005	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20006      esac;
20007      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20008    '
20009    export as_echo_n_body
20010    as_echo_n='sh -c $as_echo_n_body as_echo'
20011  fi
20012  export as_echo_body
20013  as_echo='sh -c $as_echo_body as_echo'
20014fi
20015
20016# The user is always right.
20017if test "${PATH_SEPARATOR+set}" != set; then
20018  PATH_SEPARATOR=:
20019  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20020    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20021      PATH_SEPARATOR=';'
20022  }
20023fi
20024
20025
20026# IFS
20027# We need space, tab and new line, in precisely that order.  Quoting is
20028# there to prevent editors from complaining about space-tab.
20029# (If _AS_PATH_WALK were called with IFS unset, it would disable word
20030# splitting by setting IFS to empty value.)
20031IFS=" ""	$as_nl"
20032
20033# Find who we are.  Look in the path if we contain no directory separator.
20034as_myself=
20035case $0 in #((
20036  *[\\/]* ) as_myself=$0 ;;
20037  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20038for as_dir in $PATH
20039do
20040  IFS=$as_save_IFS
20041  test -z "$as_dir" && as_dir=.
20042    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20043  done
20044IFS=$as_save_IFS
20045
20046     ;;
20047esac
20048# We did not find ourselves, most probably we were run as `sh COMMAND'
20049# in which case we are not to be found in the path.
20050if test "x$as_myself" = x; then
20051  as_myself=$0
20052fi
20053if test ! -f "$as_myself"; then
20054  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20055  exit 1
20056fi
20057
20058# Unset variables that we do not need and which cause bugs (e.g. in
20059# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
20060# suppresses any "Segmentation fault" message there.  '((' could
20061# trigger a bug in pdksh 5.2.14.
20062for as_var in BASH_ENV ENV MAIL MAILPATH
20063do eval test x\${$as_var+set} = xset \
20064  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20065done
20066PS1='$ '
20067PS2='> '
20068PS4='+ '
20069
20070# NLS nuisances.
20071LC_ALL=C
20072export LC_ALL
20073LANGUAGE=C
20074export LANGUAGE
20075
20076# CDPATH.
20077(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20078
20079
20080# as_fn_error STATUS ERROR [LINENO LOG_FD]
20081# ----------------------------------------
20082# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20083# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20084# script with STATUS, using 1 if that was 0.
20085as_fn_error ()
20086{
20087  as_status=$1; test $as_status -eq 0 && as_status=1
20088  if test "$4"; then
20089    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20090    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20091  fi
20092  $as_echo "$as_me: error: $2" >&2
20093  as_fn_exit $as_status
20094} # as_fn_error
20095
20096
20097# as_fn_set_status STATUS
20098# -----------------------
20099# Set $? to STATUS, without forking.
20100as_fn_set_status ()
20101{
20102  return $1
20103} # as_fn_set_status
20104
20105# as_fn_exit STATUS
20106# -----------------
20107# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20108as_fn_exit ()
20109{
20110  set +e
20111  as_fn_set_status $1
20112  exit $1
20113} # as_fn_exit
20114
20115# as_fn_unset VAR
20116# ---------------
20117# Portably unset VAR.
20118as_fn_unset ()
20119{
20120  { eval $1=; unset $1;}
20121}
20122as_unset=as_fn_unset
20123# as_fn_append VAR VALUE
20124# ----------------------
20125# Append the text in VALUE to the end of the definition contained in VAR. Take
20126# advantage of any shell optimizations that allow amortized linear growth over
20127# repeated appends, instead of the typical quadratic growth present in naive
20128# implementations.
20129if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20130  eval 'as_fn_append ()
20131  {
20132    eval $1+=\$2
20133  }'
20134else
20135  as_fn_append ()
20136  {
20137    eval $1=\$$1\$2
20138  }
20139fi # as_fn_append
20140
20141# as_fn_arith ARG...
20142# ------------------
20143# Perform arithmetic evaluation on the ARGs, and store the result in the
20144# global $as_val. Take advantage of shells that can avoid forks. The arguments
20145# must be portable across $(()) and expr.
20146if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20147  eval 'as_fn_arith ()
20148  {
20149    as_val=$(( $* ))
20150  }'
20151else
20152  as_fn_arith ()
20153  {
20154    as_val=`expr "$@" || test $? -eq 1`
20155  }
20156fi # as_fn_arith
20157
20158
20159if expr a : '\(a\)' >/dev/null 2>&1 &&
20160   test "X`expr 00001 : '.*\(...\)'`" = X001; then
20161  as_expr=expr
20162else
20163  as_expr=false
20164fi
20165
20166if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20167  as_basename=basename
20168else
20169  as_basename=false
20170fi
20171
20172if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20173  as_dirname=dirname
20174else
20175  as_dirname=false
20176fi
20177
20178as_me=`$as_basename -- "$0" ||
20179$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20180	 X"$0" : 'X\(//\)$' \| \
20181	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20182$as_echo X/"$0" |
20183    sed '/^.*\/\([^/][^/]*\)\/*$/{
20184	    s//\1/
20185	    q
20186	  }
20187	  /^X\/\(\/\/\)$/{
20188	    s//\1/
20189	    q
20190	  }
20191	  /^X\/\(\/\).*/{
20192	    s//\1/
20193	    q
20194	  }
20195	  s/.*/./; q'`
20196
20197# Avoid depending upon Character Ranges.
20198as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20199as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20200as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20201as_cr_digits='0123456789'
20202as_cr_alnum=$as_cr_Letters$as_cr_digits
20203
20204ECHO_C= ECHO_N= ECHO_T=
20205case `echo -n x` in #(((((
20206-n*)
20207  case `echo 'xy\c'` in
20208  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
20209  xy)  ECHO_C='\c';;
20210  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
20211       ECHO_T='	';;
20212  esac;;
20213*)
20214  ECHO_N='-n';;
20215esac
20216
20217rm -f conf$$ conf$$.exe conf$$.file
20218if test -d conf$$.dir; then
20219  rm -f conf$$.dir/conf$$.file
20220else
20221  rm -f conf$$.dir
20222  mkdir conf$$.dir 2>/dev/null
20223fi
20224if (echo >conf$$.file) 2>/dev/null; then
20225  if ln -s conf$$.file conf$$ 2>/dev/null; then
20226    as_ln_s='ln -s'
20227    # ... but there are two gotchas:
20228    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20229    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20230    # In both cases, we have to default to `cp -pR'.
20231    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20232      as_ln_s='cp -pR'
20233  elif ln conf$$.file conf$$ 2>/dev/null; then
20234    as_ln_s=ln
20235  else
20236    as_ln_s='cp -pR'
20237  fi
20238else
20239  as_ln_s='cp -pR'
20240fi
20241rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20242rmdir conf$$.dir 2>/dev/null
20243
20244
20245# as_fn_mkdir_p
20246# -------------
20247# Create "$as_dir" as a directory, including parents if necessary.
20248as_fn_mkdir_p ()
20249{
20250
20251  case $as_dir in #(
20252  -*) as_dir=./$as_dir;;
20253  esac
20254  test -d "$as_dir" || eval $as_mkdir_p || {
20255    as_dirs=
20256    while :; do
20257      case $as_dir in #(
20258      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20259      *) as_qdir=$as_dir;;
20260      esac
20261      as_dirs="'$as_qdir' $as_dirs"
20262      as_dir=`$as_dirname -- "$as_dir" ||
20263$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20264	 X"$as_dir" : 'X\(//\)[^/]' \| \
20265	 X"$as_dir" : 'X\(//\)$' \| \
20266	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20267$as_echo X"$as_dir" |
20268    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20269	    s//\1/
20270	    q
20271	  }
20272	  /^X\(\/\/\)[^/].*/{
20273	    s//\1/
20274	    q
20275	  }
20276	  /^X\(\/\/\)$/{
20277	    s//\1/
20278	    q
20279	  }
20280	  /^X\(\/\).*/{
20281	    s//\1/
20282	    q
20283	  }
20284	  s/.*/./; q'`
20285      test -d "$as_dir" && break
20286    done
20287    test -z "$as_dirs" || eval "mkdir $as_dirs"
20288  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20289
20290
20291} # as_fn_mkdir_p
20292if mkdir -p . 2>/dev/null; then
20293  as_mkdir_p='mkdir -p "$as_dir"'
20294else
20295  test -d ./-p && rmdir ./-p
20296  as_mkdir_p=false
20297fi
20298
20299
20300# as_fn_executable_p FILE
20301# -----------------------
20302# Test if FILE is an executable regular file.
20303as_fn_executable_p ()
20304{
20305  test -f "$1" && test -x "$1"
20306} # as_fn_executable_p
20307as_test_x='test -x'
20308as_executable_p=as_fn_executable_p
20309
20310# Sed expression to map a string onto a valid CPP name.
20311as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20312
20313# Sed expression to map a string onto a valid variable name.
20314as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20315
20316
20317exec 6>&1
20318## ----------------------------------- ##
20319## Main body of $CONFIG_STATUS script. ##
20320## ----------------------------------- ##
20321_ASEOF
20322test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20323
20324cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20325# Save the log message, to keep $0 and so on meaningful, and to
20326# report actual input values of CONFIG_FILES etc. instead of their
20327# values after options handling.
20328ac_log="
20329This file was extended by $as_me, which was
20330generated by GNU Autoconf 2.69.  Invocation command line was
20331
20332  CONFIG_FILES    = $CONFIG_FILES
20333  CONFIG_HEADERS  = $CONFIG_HEADERS
20334  CONFIG_LINKS    = $CONFIG_LINKS
20335  CONFIG_COMMANDS = $CONFIG_COMMANDS
20336  $ $0 $@
20337
20338on `(hostname || uname -n) 2>/dev/null | sed 1q`
20339"
20340
20341_ACEOF
20342
20343case $ac_config_files in *"
20344"*) set x $ac_config_files; shift; ac_config_files=$*;;
20345esac
20346
20347case $ac_config_headers in *"
20348"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20349esac
20350
20351
20352cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20353# Files that config.status was made for.
20354config_files="$ac_config_files"
20355config_headers="$ac_config_headers"
20356config_links="$ac_config_links"
20357config_commands="$ac_config_commands"
20358
20359_ACEOF
20360
20361cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20362ac_cs_usage="\
20363\`$as_me' instantiates files and other configuration actions
20364from templates according to the current configuration.  Unless the files
20365and actions are specified as TAGs, all are instantiated by default.
20366
20367Usage: $0 [OPTION]... [TAG]...
20368
20369  -h, --help       print this help, then exit
20370  -V, --version    print version number and configuration settings, then exit
20371      --config     print configuration, then exit
20372  -q, --quiet, --silent
20373                   do not print progress messages
20374  -d, --debug      don't remove temporary files
20375      --recheck    update $as_me by reconfiguring in the same conditions
20376      --file=FILE[:TEMPLATE]
20377                   instantiate the configuration file FILE
20378      --header=FILE[:TEMPLATE]
20379                   instantiate the configuration header FILE
20380
20381Configuration files:
20382$config_files
20383
20384Configuration headers:
20385$config_headers
20386
20387Configuration links:
20388$config_links
20389
20390Configuration commands:
20391$config_commands
20392
20393Report bugs to the package provider."
20394
20395_ACEOF
20396cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20397ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20398ac_cs_version="\\
20399config.status
20400configured by $0, generated by GNU Autoconf 2.69,
20401  with options \\"\$ac_cs_config\\"
20402
20403Copyright (C) 2012 Free Software Foundation, Inc.
20404This config.status script is free software; the Free Software Foundation
20405gives unlimited permission to copy, distribute and modify it."
20406
20407ac_pwd='$ac_pwd'
20408srcdir='$srcdir'
20409INSTALL='$INSTALL'
20410AWK='$AWK'
20411test -n "\$AWK" || AWK=awk
20412_ACEOF
20413
20414cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20415# The default lists apply if the user does not specify any file.
20416ac_need_defaults=:
20417while test $# != 0
20418do
20419  case $1 in
20420  --*=?*)
20421    ac_option=`expr "X$1" : 'X\([^=]*\)='`
20422    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20423    ac_shift=:
20424    ;;
20425  --*=)
20426    ac_option=`expr "X$1" : 'X\([^=]*\)='`
20427    ac_optarg=
20428    ac_shift=:
20429    ;;
20430  *)
20431    ac_option=$1
20432    ac_optarg=$2
20433    ac_shift=shift
20434    ;;
20435  esac
20436
20437  case $ac_option in
20438  # Handling of the options.
20439  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20440    ac_cs_recheck=: ;;
20441  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20442    $as_echo "$ac_cs_version"; exit ;;
20443  --config | --confi | --conf | --con | --co | --c )
20444    $as_echo "$ac_cs_config"; exit ;;
20445  --debug | --debu | --deb | --de | --d | -d )
20446    debug=: ;;
20447  --file | --fil | --fi | --f )
20448    $ac_shift
20449    case $ac_optarg in
20450    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20451    '') as_fn_error $? "missing file argument" ;;
20452    esac
20453    as_fn_append CONFIG_FILES " '$ac_optarg'"
20454    ac_need_defaults=false;;
20455  --header | --heade | --head | --hea )
20456    $ac_shift
20457    case $ac_optarg in
20458    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20459    esac
20460    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20461    ac_need_defaults=false;;
20462  --he | --h)
20463    # Conflict between --help and --header
20464    as_fn_error $? "ambiguous option: \`$1'
20465Try \`$0 --help' for more information.";;
20466  --help | --hel | -h )
20467    $as_echo "$ac_cs_usage"; exit ;;
20468  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20469  | -silent | --silent | --silen | --sile | --sil | --si | --s)
20470    ac_cs_silent=: ;;
20471
20472  # This is an error.
20473  -*) as_fn_error $? "unrecognized option: \`$1'
20474Try \`$0 --help' for more information." ;;
20475
20476  *) as_fn_append ac_config_targets " $1"
20477     ac_need_defaults=false ;;
20478
20479  esac
20480  shift
20481done
20482
20483ac_configure_extra_args=
20484
20485if $ac_cs_silent; then
20486  exec 6>/dev/null
20487  ac_configure_extra_args="$ac_configure_extra_args --silent"
20488fi
20489
20490_ACEOF
20491cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20492if \$ac_cs_recheck; then
20493  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20494  shift
20495  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20496  CONFIG_SHELL='$SHELL'
20497  export CONFIG_SHELL
20498  exec "\$@"
20499fi
20500
20501_ACEOF
20502cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20503exec 5>>config.log
20504{
20505  echo
20506  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20507## Running $as_me. ##
20508_ASBOX
20509  $as_echo "$ac_log"
20510} >&5
20511
20512_ACEOF
20513cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20514#
20515# INIT-COMMANDS
20516#
20517ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
20518GDB_NM_FILE=$GDB_NM_FILE
20519
20520_ACEOF
20521
20522cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20523
20524# Handling of arguments.
20525for ac_config_target in $ac_config_targets
20526do
20527  case $ac_config_target in
20528    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20529    "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
20530    "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
20531    "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
20532    "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
20533    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20534    "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
20535    "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
20536    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
20537    "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
20538
20539  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20540  esac
20541done
20542
20543
20544# If the user did not use the arguments to specify the items to instantiate,
20545# then the envvar interface is used.  Set only those that are not.
20546# We use the long form for the default assignment because of an extremely
20547# bizarre bug on SunOS 4.1.3.
20548if $ac_need_defaults; then
20549  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20550  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20551  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20552  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20553fi
20554
20555# Have a temporary directory for convenience.  Make it in the build tree
20556# simply because there is no reason against having it here, and in addition,
20557# creating and moving files from /tmp can sometimes cause problems.
20558# Hook for its removal unless debugging.
20559# Note that there is a small window in which the directory will not be cleaned:
20560# after its creation but before its name has been assigned to `$tmp'.
20561$debug ||
20562{
20563  tmp= ac_tmp=
20564  trap 'exit_status=$?
20565  : "${ac_tmp:=$tmp}"
20566  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20567' 0
20568  trap 'as_fn_exit 1' 1 2 13 15
20569}
20570# Create a (secure) tmp directory for tmp files.
20571
20572{
20573  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20574  test -d "$tmp"
20575}  ||
20576{
20577  tmp=./conf$$-$RANDOM
20578  (umask 077 && mkdir "$tmp")
20579} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20580ac_tmp=$tmp
20581
20582# Set up the scripts for CONFIG_FILES section.
20583# No need to generate them if there are no CONFIG_FILES.
20584# This happens for instance with `./config.status config.h'.
20585if test -n "$CONFIG_FILES"; then
20586
20587if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20588  ac_cs_awk_getline=:
20589  ac_cs_awk_pipe_init=
20590  ac_cs_awk_read_file='
20591      while ((getline aline < (F[key])) > 0)
20592	print(aline)
20593      close(F[key])'
20594  ac_cs_awk_pipe_fini=
20595else
20596  ac_cs_awk_getline=false
20597  ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20598  ac_cs_awk_read_file='
20599      print "|#_!!_#|"
20600      print "cat " F[key] " &&"
20601      '$ac_cs_awk_pipe_init
20602  # The final `:' finishes the AND list.
20603  ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20604fi
20605ac_cr=`echo X | tr X '\015'`
20606# On cygwin, bash can eat \r inside `` if the user requested igncr.
20607# But we know of no other shell where ac_cr would be empty at this
20608# point, so we can use a bashism as a fallback.
20609if test "x$ac_cr" = x; then
20610  eval ac_cr=\$\'\\r\'
20611fi
20612ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20613if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20614  ac_cs_awk_cr='\\r'
20615else
20616  ac_cs_awk_cr=$ac_cr
20617fi
20618
20619echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20620_ACEOF
20621
20622# Create commands to substitute file output variables.
20623{
20624  echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
20625  echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
20626  echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20627  echo "_ACAWK" &&
20628  echo "_ACEOF"
20629} >conf$$files.sh &&
20630. ./conf$$files.sh ||
20631  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20632rm -f conf$$files.sh
20633
20634{
20635  echo "cat >conf$$subs.awk <<_ACEOF" &&
20636  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20637  echo "_ACEOF"
20638} >conf$$subs.sh ||
20639  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20640ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20641ac_delim='%!_!# '
20642for ac_last_try in false false false false false :; do
20643  . ./conf$$subs.sh ||
20644    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20645
20646  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20647  if test $ac_delim_n = $ac_delim_num; then
20648    break
20649  elif $ac_last_try; then
20650    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20651  else
20652    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20653  fi
20654done
20655rm -f conf$$subs.sh
20656
20657cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20658cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20659_ACEOF
20660sed -n '
20661h
20662s/^/S["/; s/!.*/"]=/
20663p
20664g
20665s/^[^!]*!//
20666:repl
20667t repl
20668s/'"$ac_delim"'$//
20669t delim
20670:nl
20671h
20672s/\(.\{148\}\)..*/\1/
20673t more1
20674s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20675p
20676n
20677b repl
20678:more1
20679s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20680p
20681g
20682s/.\{148\}//
20683t nl
20684:delim
20685h
20686s/\(.\{148\}\)..*/\1/
20687t more2
20688s/["\\]/\\&/g; s/^/"/; s/$/"/
20689p
20690b
20691:more2
20692s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20693p
20694g
20695s/.\{148\}//
20696t delim
20697' <conf$$subs.awk | sed '
20698/^[^""]/{
20699  N
20700  s/\n//
20701}
20702' >>$CONFIG_STATUS || ac_write_fail=1
20703rm -f conf$$subs.awk
20704cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20705_ACAWK
20706cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20707  for (key in S) S_is_set[key] = 1
20708  FS = ""
20709  \$ac_cs_awk_pipe_init
20710}
20711{
20712  line = $ 0
20713  nfields = split(line, field, "@")
20714  substed = 0
20715  len = length(field[1])
20716  for (i = 2; i < nfields; i++) {
20717    key = field[i]
20718    keylen = length(key)
20719    if (S_is_set[key]) {
20720      value = S[key]
20721      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20722      len += length(value) + length(field[++i])
20723      substed = 1
20724    } else
20725      len += 1 + keylen
20726  }
20727  if (nfields == 3 && !substed) {
20728    key = field[2]
20729    if (F[key] != "" && line ~ /^[	 ]*@.*@[	 ]*$/) {
20730      \$ac_cs_awk_read_file
20731      next
20732    }
20733  }
20734  print line
20735}
20736\$ac_cs_awk_pipe_fini
20737_ACAWK
20738_ACEOF
20739cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20740if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20741  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20742else
20743  cat
20744fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20745  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20746_ACEOF
20747
20748# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20749# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20750# trailing colons and then remove the whole line if VPATH becomes empty
20751# (actually we leave an empty line to preserve line numbers).
20752if test "x$srcdir" = x.; then
20753  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
20754h
20755s///
20756s/^/:/
20757s/[	 ]*$/:/
20758s/:\$(srcdir):/:/g
20759s/:\${srcdir}:/:/g
20760s/:@srcdir@:/:/g
20761s/^:*//
20762s/:*$//
20763x
20764s/\(=[	 ]*\).*/\1/
20765G
20766s/\n//
20767s/^[^=]*=[	 ]*$//
20768}'
20769fi
20770
20771cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20772fi # test -n "$CONFIG_FILES"
20773
20774# Set up the scripts for CONFIG_HEADERS section.
20775# No need to generate them if there are no CONFIG_HEADERS.
20776# This happens for instance with `./config.status Makefile'.
20777if test -n "$CONFIG_HEADERS"; then
20778cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20779BEGIN {
20780_ACEOF
20781
20782# Transform confdefs.h into an awk script `defines.awk', embedded as
20783# here-document in config.status, that substitutes the proper values into
20784# config.h.in to produce config.h.
20785
20786# Create a delimiter string that does not exist in confdefs.h, to ease
20787# handling of long lines.
20788ac_delim='%!_!# '
20789for ac_last_try in false false :; do
20790  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20791  if test -z "$ac_tt"; then
20792    break
20793  elif $ac_last_try; then
20794    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20795  else
20796    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20797  fi
20798done
20799
20800# For the awk script, D is an array of macro values keyed by name,
20801# likewise P contains macro parameters if any.  Preserve backslash
20802# newline sequences.
20803
20804ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20805sed -n '
20806s/.\{148\}/&'"$ac_delim"'/g
20807t rset
20808:rset
20809s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
20810t def
20811d
20812:def
20813s/\\$//
20814t bsnl
20815s/["\\]/\\&/g
20816s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
20817D["\1"]=" \3"/p
20818s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
20819d
20820:bsnl
20821s/["\\]/\\&/g
20822s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
20823D["\1"]=" \3\\\\\\n"\\/p
20824t cont
20825s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20826t cont
20827d
20828:cont
20829n
20830s/.\{148\}/&'"$ac_delim"'/g
20831t clear
20832:clear
20833s/\\$//
20834t bsnlc
20835s/["\\]/\\&/g; s/^/"/; s/$/"/p
20836d
20837:bsnlc
20838s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20839b cont
20840' <confdefs.h | sed '
20841s/'"$ac_delim"'/"\\\
20842"/g' >>$CONFIG_STATUS || ac_write_fail=1
20843
20844cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20845  for (key in D) D_is_set[key] = 1
20846  FS = ""
20847}
20848/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20849  line = \$ 0
20850  split(line, arg, " ")
20851  if (arg[1] == "#") {
20852    defundef = arg[2]
20853    mac1 = arg[3]
20854  } else {
20855    defundef = substr(arg[1], 2)
20856    mac1 = arg[2]
20857  }
20858  split(mac1, mac2, "(") #)
20859  macro = mac2[1]
20860  prefix = substr(line, 1, index(line, defundef) - 1)
20861  if (D_is_set[macro]) {
20862    # Preserve the white space surrounding the "#".
20863    print prefix "define", macro P[macro] D[macro]
20864    next
20865  } else {
20866    # Replace #undef with comments.  This is necessary, for example,
20867    # in the case of _POSIX_SOURCE, which is predefined and required
20868    # on some systems where configure will not decide to define it.
20869    if (defundef == "undef") {
20870      print "/*", prefix defundef, macro, "*/"
20871      next
20872    }
20873  }
20874}
20875{ print }
20876_ACAWK
20877_ACEOF
20878cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20879  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20880fi # test -n "$CONFIG_HEADERS"
20881
20882
20883eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
20884shift
20885for ac_tag
20886do
20887  case $ac_tag in
20888  :[FHLC]) ac_mode=$ac_tag; continue;;
20889  esac
20890  case $ac_mode$ac_tag in
20891  :[FHL]*:*);;
20892  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20893  :[FH]-) ac_tag=-:-;;
20894  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20895  esac
20896  ac_save_IFS=$IFS
20897  IFS=:
20898  set x $ac_tag
20899  IFS=$ac_save_IFS
20900  shift
20901  ac_file=$1
20902  shift
20903
20904  case $ac_mode in
20905  :L) ac_source=$1;;
20906  :[FH])
20907    ac_file_inputs=
20908    for ac_f
20909    do
20910      case $ac_f in
20911      -) ac_f="$ac_tmp/stdin";;
20912      *) # Look for the file first in the build tree, then in the source tree
20913	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
20914	 # because $ac_f cannot contain `:'.
20915	 test -f "$ac_f" ||
20916	   case $ac_f in
20917	   [\\/$]*) false;;
20918	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20919	   esac ||
20920	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20921      esac
20922      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20923      as_fn_append ac_file_inputs " '$ac_f'"
20924    done
20925
20926    # Let's still pretend it is `configure' which instantiates (i.e., don't
20927    # use $as_me), people would be surprised to read:
20928    #    /* config.h.  Generated by config.status.  */
20929    configure_input='Generated from '`
20930	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20931	`' by configure.'
20932    if test x"$ac_file" != x-; then
20933      configure_input="$ac_file.  $configure_input"
20934      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20935$as_echo "$as_me: creating $ac_file" >&6;}
20936    fi
20937    # Neutralize special characters interpreted by sed in replacement strings.
20938    case $configure_input in #(
20939    *\&* | *\|* | *\\* )
20940       ac_sed_conf_input=`$as_echo "$configure_input" |
20941       sed 's/[\\\\&|]/\\\\&/g'`;; #(
20942    *) ac_sed_conf_input=$configure_input;;
20943    esac
20944
20945    case $ac_tag in
20946    *:-:* | *:-) cat >"$ac_tmp/stdin" \
20947      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20948    esac
20949    ;;
20950  esac
20951
20952  ac_dir=`$as_dirname -- "$ac_file" ||
20953$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20954	 X"$ac_file" : 'X\(//\)[^/]' \| \
20955	 X"$ac_file" : 'X\(//\)$' \| \
20956	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20957$as_echo X"$ac_file" |
20958    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20959	    s//\1/
20960	    q
20961	  }
20962	  /^X\(\/\/\)[^/].*/{
20963	    s//\1/
20964	    q
20965	  }
20966	  /^X\(\/\/\)$/{
20967	    s//\1/
20968	    q
20969	  }
20970	  /^X\(\/\).*/{
20971	    s//\1/
20972	    q
20973	  }
20974	  s/.*/./; q'`
20975  as_dir="$ac_dir"; as_fn_mkdir_p
20976  ac_builddir=.
20977
20978case "$ac_dir" in
20979.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20980*)
20981  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20982  # A ".." for each directory in $ac_dir_suffix.
20983  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20984  case $ac_top_builddir_sub in
20985  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20986  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20987  esac ;;
20988esac
20989ac_abs_top_builddir=$ac_pwd
20990ac_abs_builddir=$ac_pwd$ac_dir_suffix
20991# for backward compatibility:
20992ac_top_builddir=$ac_top_build_prefix
20993
20994case $srcdir in
20995  .)  # We are building in place.
20996    ac_srcdir=.
20997    ac_top_srcdir=$ac_top_builddir_sub
20998    ac_abs_top_srcdir=$ac_pwd ;;
20999  [\\/]* | ?:[\\/]* )  # Absolute name.
21000    ac_srcdir=$srcdir$ac_dir_suffix;
21001    ac_top_srcdir=$srcdir
21002    ac_abs_top_srcdir=$srcdir ;;
21003  *) # Relative name.
21004    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21005    ac_top_srcdir=$ac_top_build_prefix$srcdir
21006    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21007esac
21008ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21009
21010
21011  case $ac_mode in
21012  :F)
21013  #
21014  # CONFIG_FILE
21015  #
21016
21017  case $INSTALL in
21018  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21019  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21020  esac
21021_ACEOF
21022
21023cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21024# If the template does not know about datarootdir, expand it.
21025# FIXME: This hack should be removed a few years after 2.60.
21026ac_datarootdir_hack=; ac_datarootdir_seen=
21027ac_sed_dataroot='
21028/datarootdir/ {
21029  p
21030  q
21031}
21032/@datadir@/p
21033/@docdir@/p
21034/@infodir@/p
21035/@localedir@/p
21036/@mandir@/p'
21037case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21038*datarootdir*) ac_datarootdir_seen=yes;;
21039*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21040  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21041$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21042_ACEOF
21043cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21044  ac_datarootdir_hack='
21045  s&@datadir@&$datadir&g
21046  s&@docdir@&$docdir&g
21047  s&@infodir@&$infodir&g
21048  s&@localedir@&$localedir&g
21049  s&@mandir@&$mandir&g
21050  s&\\\${datarootdir}&$datarootdir&g' ;;
21051esac
21052_ACEOF
21053
21054# Neutralize VPATH when `$srcdir' = `.'.
21055# Shell code in configure.ac might set extrasub.
21056# FIXME: do we really want to maintain this feature?
21057cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21058ac_sed_extra="$ac_vpsub
21059$extrasub
21060_ACEOF
21061cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21062:t
21063/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21064s|@configure_input@|$ac_sed_conf_input|;t t
21065s&@top_builddir@&$ac_top_builddir_sub&;t t
21066s&@top_build_prefix@&$ac_top_build_prefix&;t t
21067s&@srcdir@&$ac_srcdir&;t t
21068s&@abs_srcdir@&$ac_abs_srcdir&;t t
21069s&@top_srcdir@&$ac_top_srcdir&;t t
21070s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21071s&@builddir@&$ac_builddir&;t t
21072s&@abs_builddir@&$ac_abs_builddir&;t t
21073s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21074s&@INSTALL@&$ac_INSTALL&;t t
21075$ac_datarootdir_hack
21076"
21077eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
21078if $ac_cs_awk_getline; then
21079  $AWK -f "$ac_tmp/subs.awk"
21080else
21081  $AWK -f "$ac_tmp/subs.awk" | $SHELL
21082fi \
21083  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21084
21085test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21086  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21087  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
21088      "$ac_tmp/out"`; test -z "$ac_out"; } &&
21089  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21090which seems to be undefined.  Please make sure it is defined" >&5
21091$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21092which seems to be undefined.  Please make sure it is defined" >&2;}
21093
21094  rm -f "$ac_tmp/stdin"
21095  case $ac_file in
21096  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21097  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
21098  esac \
21099  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21100 ;;
21101  :H)
21102  #
21103  # CONFIG_HEADER
21104  #
21105  if test x"$ac_file" != x-; then
21106    {
21107      $as_echo "/* $configure_input  */" \
21108      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21109    } >"$ac_tmp/config.h" \
21110      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21111    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21112      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21113$as_echo "$as_me: $ac_file is unchanged" >&6;}
21114    else
21115      rm -f "$ac_file"
21116      mv "$ac_tmp/config.h" "$ac_file" \
21117	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
21118    fi
21119  else
21120    $as_echo "/* $configure_input  */" \
21121      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21122      || as_fn_error $? "could not create -" "$LINENO" 5
21123  fi
21124 ;;
21125  :L)
21126  #
21127  # CONFIG_LINK
21128  #
21129
21130  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
21131    :
21132  else
21133    # Prefer the file from the source tree if names are identical.
21134    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
21135      ac_source=$srcdir/$ac_source
21136    fi
21137
21138    { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
21139$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
21140
21141    if test ! -r "$ac_source"; then
21142      as_fn_error $? "$ac_source: file not found" "$LINENO" 5
21143    fi
21144    rm -f "$ac_file"
21145
21146    # Try a relative symlink, then a hard link, then a copy.
21147    case $ac_source in
21148    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
21149	*) ac_rel_source=$ac_top_build_prefix$ac_source ;;
21150    esac
21151    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
21152      ln "$ac_source" "$ac_file" 2>/dev/null ||
21153      cp -p "$ac_source" "$ac_file" ||
21154      as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
21155  fi
21156 ;;
21157  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21158$as_echo "$as_me: executing $ac_file commands" >&6;}
21159 ;;
21160  esac
21161
21162
21163  case $ac_file$ac_mode in
21164    "config.h":H) echo > stamp-h ;;
21165    "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
21166    "nm.h":L) echo > stamp-nmh ;;
21167    "gcore":F) chmod +x gcore ;;
21168
21169  esac
21170done # for ac_tag
21171
21172
21173as_fn_exit 0
21174_ACEOF
21175ac_clean_files=$ac_clean_files_save
21176
21177test $ac_write_fail = 0 ||
21178  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21179
21180
21181# configure is writing to config.log, and then calls config.status.
21182# config.status does its own redirection, appending to config.log.
21183# Unfortunately, on DOS this fails, as config.log is still kept open
21184# by configure, so config.status won't be able to write to it; its
21185# output is simply discarded.  So we exec the FD to /dev/null,
21186# effectively closing config.log, so it can be properly (re)opened and
21187# appended to by config.status.  When coming back to configure, we
21188# need to make the FD available again.
21189if test "$no_create" != yes; then
21190  ac_cs_success=:
21191  ac_config_status_args=
21192  test "$silent" = yes &&
21193    ac_config_status_args="$ac_config_status_args --quiet"
21194  exec 5>/dev/null
21195  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21196  exec 5>>config.log
21197  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21198  # would make configure fail if this is the last instruction.
21199  $ac_cs_success || as_fn_exit 1
21200fi
21201
21202#
21203# CONFIG_SUBDIRS section.
21204#
21205if test "$no_recursion" != yes; then
21206
21207  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
21208  # so they do not pile up.
21209  ac_sub_configure_args=
21210  ac_prev=
21211  eval "set x $ac_configure_args"
21212  shift
21213  for ac_arg
21214  do
21215    if test -n "$ac_prev"; then
21216      ac_prev=
21217      continue
21218    fi
21219    case $ac_arg in
21220    -cache-file | --cache-file | --cache-fil | --cache-fi \
21221    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
21222      ac_prev=cache_file ;;
21223    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
21224    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
21225    | --c=*)
21226      ;;
21227    --config-cache | -C)
21228      ;;
21229    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
21230      ac_prev=srcdir ;;
21231    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
21232      ;;
21233    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
21234      ac_prev=prefix ;;
21235    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
21236      ;;
21237    --disable-option-checking)
21238      ;;
21239    *)
21240      case $ac_arg in
21241      *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
21242      esac
21243      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
21244    esac
21245  done
21246
21247  # Always prepend --prefix to ensure using the same prefix
21248  # in subdir configurations.
21249  ac_arg="--prefix=$prefix"
21250  case $ac_arg in
21251  *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
21252  esac
21253  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
21254
21255  # Pass --silent
21256  if test "$silent" = yes; then
21257    ac_sub_configure_args="--silent $ac_sub_configure_args"
21258  fi
21259
21260  # Always prepend --disable-option-checking to silence warnings, since
21261  # different subdirs can have different --enable and --with options.
21262  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
21263
21264  ac_popdir=`pwd`
21265  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
21266
21267    # Do not complain, so a configure script can configure whichever
21268    # parts of a large source tree are present.
21269    test -d "$srcdir/$ac_dir" || continue
21270
21271    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
21272    $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
21273    $as_echo "$ac_msg" >&6
21274    as_dir="$ac_dir"; as_fn_mkdir_p
21275    ac_builddir=.
21276
21277case "$ac_dir" in
21278.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21279*)
21280  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21281  # A ".." for each directory in $ac_dir_suffix.
21282  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21283  case $ac_top_builddir_sub in
21284  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21285  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21286  esac ;;
21287esac
21288ac_abs_top_builddir=$ac_pwd
21289ac_abs_builddir=$ac_pwd$ac_dir_suffix
21290# for backward compatibility:
21291ac_top_builddir=$ac_top_build_prefix
21292
21293case $srcdir in
21294  .)  # We are building in place.
21295    ac_srcdir=.
21296    ac_top_srcdir=$ac_top_builddir_sub
21297    ac_abs_top_srcdir=$ac_pwd ;;
21298  [\\/]* | ?:[\\/]* )  # Absolute name.
21299    ac_srcdir=$srcdir$ac_dir_suffix;
21300    ac_top_srcdir=$srcdir
21301    ac_abs_top_srcdir=$srcdir ;;
21302  *) # Relative name.
21303    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21304    ac_top_srcdir=$ac_top_build_prefix$srcdir
21305    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21306esac
21307ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21308
21309
21310    cd "$ac_dir"
21311
21312    # Check for guested configure; otherwise get Cygnus style configure.
21313    if test -f "$ac_srcdir/configure.gnu"; then
21314      ac_sub_configure=$ac_srcdir/configure.gnu
21315    elif test -f "$ac_srcdir/configure"; then
21316      ac_sub_configure=$ac_srcdir/configure
21317    elif test -f "$ac_srcdir/configure.in"; then
21318      # This should be Cygnus configure.
21319      ac_sub_configure=$ac_aux_dir/configure
21320    else
21321      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
21322$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
21323      ac_sub_configure=
21324    fi
21325
21326    # The recursion is here.
21327    if test -n "$ac_sub_configure"; then
21328      # Make the cache file name correct relative to the subdirectory.
21329      case $cache_file in
21330      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
21331      *) # Relative name.
21332	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
21333      esac
21334
21335      { $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
21336$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
21337      # The eval makes quoting arguments work.
21338      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
21339	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
21340	as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
21341    fi
21342
21343    cd "$ac_popdir"
21344  done
21345fi
21346if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21347  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21348$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21349fi
21350
21351