555944b3fae3e3f10e7ed0e6ae349afa6b4bcb39
[external/binutils.git] / gdb / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59.
4 #
5 # Copyright (C) 2003 Free Software Foundation, Inc.
6 # This configure script is free software; the Free Software Foundation
7 # gives unlimited permission to copy, distribute and modify it.
8 ## --------------------- ##
9 ## M4sh Initialization.  ##
10 ## --------------------- ##
11
12 # Be Bourne compatible
13 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14   emulate sh
15   NULLCMD=:
16   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17   # is contrary to our usage.  Disable this feature.
18   alias -g '${1+"$@"}'='"$@"'
19 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20   set -o posix
21 fi
22 DUALCASE=1; export DUALCASE # for MKS sh
23
24 # Support unset when possible.
25 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26   as_unset=unset
27 else
28   as_unset=false
29 fi
30
31
32 # Work around bugs in pre-3.0 UWIN ksh.
33 $as_unset ENV MAIL MAILPATH
34 PS1='$ '
35 PS2='> '
36 PS4='+ '
37
38 # NLS nuisances.
39 for as_var in \
40   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42   LC_TELEPHONE LC_TIME
43 do
44   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45     eval $as_var=C; export $as_var
46   else
47     $as_unset $as_var
48   fi
49 done
50
51 # Required to use basename.
52 if expr a : '\(a\)' >/dev/null 2>&1; then
53   as_expr=expr
54 else
55   as_expr=false
56 fi
57
58 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59   as_basename=basename
60 else
61   as_basename=false
62 fi
63
64
65 # Name of the executable.
66 as_me=`$as_basename "$0" ||
67 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68          X"$0" : 'X\(//\)$' \| \
69          X"$0" : 'X\(/\)$' \| \
70          .     : '\(.\)' 2>/dev/null ||
71 echo X/"$0" |
72     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73           /^X\/\(\/\/\)$/{ s//\1/; q; }
74           /^X\/\(\/\).*/{ s//\1/; q; }
75           s/.*/./; q'`
76
77
78 # PATH needs CR, and LINENO needs CR and PATH.
79 # Avoid depending upon Character Ranges.
80 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83 as_cr_digits='0123456789'
84 as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86 # The user is always right.
87 if test "${PATH_SEPARATOR+set}" != set; then
88   echo "#! /bin/sh" >conf$$.sh
89   echo  "exit 0"   >>conf$$.sh
90   chmod +x conf$$.sh
91   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92     PATH_SEPARATOR=';'
93   else
94     PATH_SEPARATOR=:
95   fi
96   rm -f conf$$.sh
97 fi
98
99
100   as_lineno_1=$LINENO
101   as_lineno_2=$LINENO
102   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103   test "x$as_lineno_1" != "x$as_lineno_2" &&
104   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
105   # Find who we are.  Look in the path if we contain no path at all
106   # relative or not.
107   case $0 in
108     *[\\/]* ) as_myself=$0 ;;
109     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110 for as_dir in $PATH
111 do
112   IFS=$as_save_IFS
113   test -z "$as_dir" && as_dir=.
114   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115 done
116
117        ;;
118   esac
119   # We did not find ourselves, most probably we were run as `sh COMMAND'
120   # in which case we are not to be found in the path.
121   if test "x$as_myself" = x; then
122     as_myself=$0
123   fi
124   if test ! -f "$as_myself"; then
125     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126    { (exit 1); exit 1; }; }
127   fi
128   case $CONFIG_SHELL in
129   '')
130     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132 do
133   IFS=$as_save_IFS
134   test -z "$as_dir" && as_dir=.
135   for as_base in sh bash ksh sh5; do
136          case $as_dir in
137          /*)
138            if ("$as_dir/$as_base" -c '
139   as_lineno_1=$LINENO
140   as_lineno_2=$LINENO
141   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142   test "x$as_lineno_1" != "x$as_lineno_2" &&
143   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
144              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146              CONFIG_SHELL=$as_dir/$as_base
147              export CONFIG_SHELL
148              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149            fi;;
150          esac
151        done
152 done
153 ;;
154   esac
155
156   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157   # uniformly replaced by the line number.  The first 'sed' inserts a
158   # line-number line before each line; the second 'sed' does the real
159   # work.  The second script uses 'N' to pair each line-number line
160   # with the numbered line, and appends trailing '-' during
161   # substitution so that $LINENO is not a special case at line end.
162   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
164   sed '=' <$as_myself |
165     sed '
166       N
167       s,$,-,
168       : loop
169       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170       t loop
171       s,-$,,
172       s,^['$as_cr_digits']*\n,,
173     ' >$as_me.lineno &&
174   chmod +x $as_me.lineno ||
175     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176    { (exit 1); exit 1; }; }
177
178   # Don't try to exec as it changes $[0], causing all sort of problems
179   # (the dirname of $[0] is not the place where we might find the
180   # original and so on.  Autoconf is especially sensible to this).
181   . ./$as_me.lineno
182   # Exit status is that of the last command.
183   exit
184 }
185
186
187 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188   *c*,-n*) ECHO_N= ECHO_C='
189 ' ECHO_T='      ' ;;
190   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
192 esac
193
194 if expr a : '\(a\)' >/dev/null 2>&1; then
195   as_expr=expr
196 else
197   as_expr=false
198 fi
199
200 rm -f conf$$ conf$$.exe conf$$.file
201 echo >conf$$.file
202 if ln -s conf$$.file conf$$ 2>/dev/null; then
203   # We could just check for DJGPP; but this test a) works b) is more generic
204   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205   if test -f conf$$.exe; then
206     # Don't use ln at all; we don't have any links
207     as_ln_s='cp -p'
208   else
209     as_ln_s='ln -s'
210   fi
211 elif ln conf$$.file conf$$ 2>/dev/null; then
212   as_ln_s=ln
213 else
214   as_ln_s='cp -p'
215 fi
216 rm -f conf$$ conf$$.exe conf$$.file
217
218 if mkdir -p . 2>/dev/null; then
219   as_mkdir_p=:
220 else
221   test -d ./-p && rmdir ./-p
222   as_mkdir_p=false
223 fi
224
225 as_executable_p="test -f"
226
227 # Sed expression to map a string onto a valid CPP name.
228 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
229
230 # Sed expression to map a string onto a valid variable name.
231 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
232
233
234 # IFS
235 # We need space, tab and new line, in precisely that order.
236 as_nl='
237 '
238 IFS="   $as_nl"
239
240 # CDPATH.
241 $as_unset CDPATH
242
243
244 # Name of the host.
245 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246 # so uname gets run too.
247 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249 exec 6>&1
250
251 #
252 # Initializations.
253 #
254 ac_default_prefix=/usr/local
255 ac_config_libobj_dir=.
256 cross_compiling=no
257 subdirs=
258 MFLAGS=
259 MAKEFLAGS=
260 SHELL=${CONFIG_SHELL-/bin/sh}
261
262 # Maximum number of lines to put in a shell here document.
263 # This variable seems obsolete.  It should probably be removed, and
264 # only ac_max_sed_lines should be used.
265 : ${ac_max_here_lines=38}
266
267 # Identity of this package.
268 PACKAGE_NAME=
269 PACKAGE_TARNAME=
270 PACKAGE_VERSION=
271 PACKAGE_STRING=
272 PACKAGE_BUGREPORT=
273
274 ac_unique_file="main.c"
275 # Factoring default headers for most tests.
276 ac_includes_default="\
277 #include <stdio.h>
278 #if HAVE_SYS_TYPES_H
279 # include <sys/types.h>
280 #endif
281 #if HAVE_SYS_STAT_H
282 # include <sys/stat.h>
283 #endif
284 #if STDC_HEADERS
285 # include <stdlib.h>
286 # include <stddef.h>
287 #else
288 # if HAVE_STDLIB_H
289 #  include <stdlib.h>
290 # endif
291 #endif
292 #if HAVE_STRING_H
293 # if !STDC_HEADERS && HAVE_MEMORY_H
294 #  include <memory.h>
295 # endif
296 # include <string.h>
297 #endif
298 #if HAVE_STRINGS_H
299 # include <strings.h>
300 #endif
301 #if HAVE_INTTYPES_H
302 # include <inttypes.h>
303 #else
304 # if HAVE_STDINT_H
305 #  include <stdint.h>
306 # endif
307 #endif
308 #if HAVE_UNISTD_H
309 # include <unistd.h>
310 #endif"
311
312 gl_header_list=
313 ac_subdirs_all="$ac_subdirs_all doc testsuite"
314 ac_subdirs_all="$ac_subdirs_all gdbtk"
315 ac_subdirs_all="$ac_subdirs_all multi-ice"
316 ac_subdirs_all="$ac_subdirs_all gdbserver"
317 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP RANLIB ac_ct_RANLIB build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os am__leading_dot DEPDIR CCDEPMODE MAKE GMAKE_TRUE GMAKE_FALSE SET_MAKE USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT localedir GL_COND_LIBTOOL_TRUE GL_COND_LIBTOOL_FALSE GNULIB_MEMMEM GNULIB_MEMPCPY GNULIB_MEMRCHR GNULIB_STPCPY GNULIB_STPNCPY GNULIB_STRCHRNUL GNULIB_STRDUP GNULIB_STRNDUP GNULIB_STRNLEN GNULIB_STRPBRK GNULIB_STRSEP GNULIB_STRSTR GNULIB_STRCASESTR GNULIB_STRTOK_R GNULIB_MBSLEN GNULIB_MBSNLEN GNULIB_MBSCHR GNULIB_MBSRCHR GNULIB_MBSSTR GNULIB_MBSCASECMP GNULIB_MBSNCASECMP GNULIB_MBSPCASECMP GNULIB_MBSCASESTR GNULIB_MBSCSPN GNULIB_MBSPBRK GNULIB_MBSSPN GNULIB_MBSSEP GNULIB_MBSTOK_R GNULIB_STRERROR GNULIB_STRSIGNAL HAVE_DECL_MEMMEM HAVE_MEMPCPY HAVE_DECL_MEMRCHR HAVE_STPCPY HAVE_STPNCPY HAVE_STRCHRNUL HAVE_DECL_STRDUP HAVE_STRNDUP HAVE_DECL_STRNDUP HAVE_DECL_STRNLEN HAVE_STRPBRK HAVE_STRSEP HAVE_STRCASESTR HAVE_DECL_STRTOK_R HAVE_DECL_STRERROR HAVE_DECL_STRSIGNAL REPLACE_STRERROR REPLACE_STRSIGNAL REPLACE_MEMMEM REPLACE_STRCASESTR REPLACE_STRSTR HAVE_LONG_LONG_INT HAVE_UNSIGNED_LONG_LONG_INT HAVE_INTTYPES_H HAVE_SYS_TYPES_H INCLUDE_NEXT NEXT_STDINT_H HAVE_STDINT_H HAVE_SYS_INTTYPES_H HAVE_SYS_BITYPES_H BITSIZEOF_PTRDIFF_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_WCHAR_T BITSIZEOF_WINT_T HAVE_SIGNED_SIG_ATOMIC_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_WINT_T PTRDIFF_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX WCHAR_T_SUFFIX WINT_T_SUFFIX STDINT_H NEXT_STRING_H GNULIB_WCWIDTH HAVE_DECL_WCWIDTH REPLACE_WCWIDTH WCHAR_H HAVE_WCHAR_H NEXT_WCHAR_H LIBGNU_LIBDEPS LIBGNU_LTLIBDEPS GNULIB_STDINT_H PACKAGE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK AMTAR am__tar am__untar am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH am__fastdepCC_TRUE am__fastdepCC_FALSE subdirs TARGET_OBS PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI LN_S YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG READLINE READLINE_DEPS READLINE_CFLAGS HAVE_LIBEXPAT LIBEXPAT LTLIBEXPAT PYTHON_CFLAGS ALLOCA CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDE TCL_LIBRARY TCL_DEPS TK_VERSION TK_BIN_DIR TK_SRC_DIR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_INCLUDE TK_LIBRARY TK_DEPS TK_XINCLUDES X_CFLAGS X_LDFLAGS X_LIBS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR SIM SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags nm_h datarootdir docdir htmldir pdfdir LIBOBJS LTLIBOBJS gl_LIBOBJS gl_LTLIBOBJS gltests_LIBOBJS gltests_LTLIBOBJS'
318 ac_subst_files='host_makefile_frag'
319 ac_pwd=`pwd`
320
321 # Initialize some variables set by options.
322 ac_init_help=
323 ac_init_version=false
324 # The variables have the same names as the options, with
325 # dashes changed to underlines.
326 cache_file=/dev/null
327 exec_prefix=NONE
328 no_create=
329 no_recursion=
330 prefix=NONE
331 program_prefix=NONE
332 program_suffix=NONE
333 program_transform_name=s,x,x,
334 silent=
335 site=
336 srcdir=
337 verbose=
338 x_includes=NONE
339 x_libraries=NONE
340
341 # Installation directory options.
342 # These are left unexpanded so users can "make install exec_prefix=/foo"
343 # and all the variables that are supposed to be based on exec_prefix
344 # by default will actually change.
345 # Use braces instead of parens because sh, perl, etc. also accept them.
346 bindir='${exec_prefix}/bin'
347 sbindir='${exec_prefix}/sbin'
348 libexecdir='${exec_prefix}/libexec'
349 datadir='${prefix}/share'
350 sysconfdir='${prefix}/etc'
351 sharedstatedir='${prefix}/com'
352 localstatedir='${prefix}/var'
353 libdir='${exec_prefix}/lib'
354 includedir='${prefix}/include'
355 oldincludedir='/usr/include'
356 infodir='${prefix}/info'
357 mandir='${prefix}/man'
358
359 ac_prev=
360 for ac_option
361 do
362   # If the previous option needs an argument, assign it.
363   if test -n "$ac_prev"; then
364     eval "$ac_prev=\$ac_option"
365     ac_prev=
366     continue
367   fi
368
369   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
370
371   # Accept the important Cygnus configure options, so we can diagnose typos.
372
373   case $ac_option in
374
375   -bindir | --bindir | --bindi | --bind | --bin | --bi)
376     ac_prev=bindir ;;
377   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
378     bindir=$ac_optarg ;;
379
380   -build | --build | --buil | --bui | --bu)
381     ac_prev=build_alias ;;
382   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
383     build_alias=$ac_optarg ;;
384
385   -cache-file | --cache-file | --cache-fil | --cache-fi \
386   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
387     ac_prev=cache_file ;;
388   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
389   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
390     cache_file=$ac_optarg ;;
391
392   --config-cache | -C)
393     cache_file=config.cache ;;
394
395   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
396     ac_prev=datadir ;;
397   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
398   | --da=*)
399     datadir=$ac_optarg ;;
400
401   -disable-* | --disable-*)
402     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
403     # Reject names that are not valid shell variable names.
404     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
406    { (exit 1); exit 1; }; }
407     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
408     eval "enable_$ac_feature=no" ;;
409
410   -enable-* | --enable-*)
411     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
412     # Reject names that are not valid shell variable names.
413     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
414       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
415    { (exit 1); exit 1; }; }
416     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
417     case $ac_option in
418       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
419       *) ac_optarg=yes ;;
420     esac
421     eval "enable_$ac_feature='$ac_optarg'" ;;
422
423   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
424   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
425   | --exec | --exe | --ex)
426     ac_prev=exec_prefix ;;
427   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
428   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
429   | --exec=* | --exe=* | --ex=*)
430     exec_prefix=$ac_optarg ;;
431
432   -gas | --gas | --ga | --g)
433     # Obsolete; use --with-gas.
434     with_gas=yes ;;
435
436   -help | --help | --hel | --he | -h)
437     ac_init_help=long ;;
438   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
439     ac_init_help=recursive ;;
440   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
441     ac_init_help=short ;;
442
443   -host | --host | --hos | --ho)
444     ac_prev=host_alias ;;
445   -host=* | --host=* | --hos=* | --ho=*)
446     host_alias=$ac_optarg ;;
447
448   -includedir | --includedir | --includedi | --included | --include \
449   | --includ | --inclu | --incl | --inc)
450     ac_prev=includedir ;;
451   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
452   | --includ=* | --inclu=* | --incl=* | --inc=*)
453     includedir=$ac_optarg ;;
454
455   -infodir | --infodir | --infodi | --infod | --info | --inf)
456     ac_prev=infodir ;;
457   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
458     infodir=$ac_optarg ;;
459
460   -libdir | --libdir | --libdi | --libd)
461     ac_prev=libdir ;;
462   -libdir=* | --libdir=* | --libdi=* | --libd=*)
463     libdir=$ac_optarg ;;
464
465   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
466   | --libexe | --libex | --libe)
467     ac_prev=libexecdir ;;
468   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
469   | --libexe=* | --libex=* | --libe=*)
470     libexecdir=$ac_optarg ;;
471
472   -localstatedir | --localstatedir | --localstatedi | --localstated \
473   | --localstate | --localstat | --localsta | --localst \
474   | --locals | --local | --loca | --loc | --lo)
475     ac_prev=localstatedir ;;
476   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
477   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
478   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
479     localstatedir=$ac_optarg ;;
480
481   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
482     ac_prev=mandir ;;
483   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
484     mandir=$ac_optarg ;;
485
486   -nfp | --nfp | --nf)
487     # Obsolete; use --without-fp.
488     with_fp=no ;;
489
490   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
491   | --no-cr | --no-c | -n)
492     no_create=yes ;;
493
494   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
495   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
496     no_recursion=yes ;;
497
498   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
499   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
500   | --oldin | --oldi | --old | --ol | --o)
501     ac_prev=oldincludedir ;;
502   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
503   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
504   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
505     oldincludedir=$ac_optarg ;;
506
507   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
508     ac_prev=prefix ;;
509   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
510     prefix=$ac_optarg ;;
511
512   -program-prefix | --program-prefix | --program-prefi | --program-pref \
513   | --program-pre | --program-pr | --program-p)
514     ac_prev=program_prefix ;;
515   -program-prefix=* | --program-prefix=* | --program-prefi=* \
516   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
517     program_prefix=$ac_optarg ;;
518
519   -program-suffix | --program-suffix | --program-suffi | --program-suff \
520   | --program-suf | --program-su | --program-s)
521     ac_prev=program_suffix ;;
522   -program-suffix=* | --program-suffix=* | --program-suffi=* \
523   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
524     program_suffix=$ac_optarg ;;
525
526   -program-transform-name | --program-transform-name \
527   | --program-transform-nam | --program-transform-na \
528   | --program-transform-n | --program-transform- \
529   | --program-transform | --program-transfor \
530   | --program-transfo | --program-transf \
531   | --program-trans | --program-tran \
532   | --progr-tra | --program-tr | --program-t)
533     ac_prev=program_transform_name ;;
534   -program-transform-name=* | --program-transform-name=* \
535   | --program-transform-nam=* | --program-transform-na=* \
536   | --program-transform-n=* | --program-transform-=* \
537   | --program-transform=* | --program-transfor=* \
538   | --program-transfo=* | --program-transf=* \
539   | --program-trans=* | --program-tran=* \
540   | --progr-tra=* | --program-tr=* | --program-t=*)
541     program_transform_name=$ac_optarg ;;
542
543   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
544   | -silent | --silent | --silen | --sile | --sil)
545     silent=yes ;;
546
547   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
548     ac_prev=sbindir ;;
549   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
550   | --sbi=* | --sb=*)
551     sbindir=$ac_optarg ;;
552
553   -sharedstatedir | --sharedstatedir | --sharedstatedi \
554   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
555   | --sharedst | --shareds | --shared | --share | --shar \
556   | --sha | --sh)
557     ac_prev=sharedstatedir ;;
558   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
559   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
560   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
561   | --sha=* | --sh=*)
562     sharedstatedir=$ac_optarg ;;
563
564   -site | --site | --sit)
565     ac_prev=site ;;
566   -site=* | --site=* | --sit=*)
567     site=$ac_optarg ;;
568
569   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
570     ac_prev=srcdir ;;
571   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
572     srcdir=$ac_optarg ;;
573
574   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
575   | --syscon | --sysco | --sysc | --sys | --sy)
576     ac_prev=sysconfdir ;;
577   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
578   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
579     sysconfdir=$ac_optarg ;;
580
581   -target | --target | --targe | --targ | --tar | --ta | --t)
582     ac_prev=target_alias ;;
583   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
584     target_alias=$ac_optarg ;;
585
586   -v | -verbose | --verbose | --verbos | --verbo | --verb)
587     verbose=yes ;;
588
589   -version | --version | --versio | --versi | --vers | -V)
590     ac_init_version=: ;;
591
592   -with-* | --with-*)
593     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
594     # Reject names that are not valid shell variable names.
595     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
596       { echo "$as_me: error: invalid package name: $ac_package" >&2
597    { (exit 1); exit 1; }; }
598     ac_package=`echo $ac_package| sed 's/-/_/g'`
599     case $ac_option in
600       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
601       *) ac_optarg=yes ;;
602     esac
603     eval "with_$ac_package='$ac_optarg'" ;;
604
605   -without-* | --without-*)
606     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
607     # Reject names that are not valid shell variable names.
608     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
609       { echo "$as_me: error: invalid package name: $ac_package" >&2
610    { (exit 1); exit 1; }; }
611     ac_package=`echo $ac_package | sed 's/-/_/g'`
612     eval "with_$ac_package=no" ;;
613
614   --x)
615     # Obsolete; use --with-x.
616     with_x=yes ;;
617
618   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
619   | --x-incl | --x-inc | --x-in | --x-i)
620     ac_prev=x_includes ;;
621   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
622   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
623     x_includes=$ac_optarg ;;
624
625   -x-libraries | --x-libraries | --x-librarie | --x-librari \
626   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
627     ac_prev=x_libraries ;;
628   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
629   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
630     x_libraries=$ac_optarg ;;
631
632   -*) { echo "$as_me: error: unrecognized option: $ac_option
633 Try \`$0 --help' for more information." >&2
634    { (exit 1); exit 1; }; }
635     ;;
636
637   *=*)
638     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
639     # Reject names that are not valid shell variable names.
640     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
641       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
642    { (exit 1); exit 1; }; }
643     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
644     eval "$ac_envvar='$ac_optarg'"
645     export $ac_envvar ;;
646
647   *)
648     # FIXME: should be removed in autoconf 3.0.
649     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
650     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
651       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
652     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
653     ;;
654
655   esac
656 done
657
658 if test -n "$ac_prev"; then
659   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
660   { echo "$as_me: error: missing argument to $ac_option" >&2
661    { (exit 1); exit 1; }; }
662 fi
663
664 # Be sure to have absolute paths.
665 for ac_var in exec_prefix prefix
666 do
667   eval ac_val=$`echo $ac_var`
668   case $ac_val in
669     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
670     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
671    { (exit 1); exit 1; }; };;
672   esac
673 done
674
675 # Be sure to have absolute paths.
676 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
677               localstatedir libdir includedir oldincludedir infodir mandir
678 do
679   eval ac_val=$`echo $ac_var`
680   case $ac_val in
681     [\\/$]* | ?:[\\/]* ) ;;
682     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
683    { (exit 1); exit 1; }; };;
684   esac
685 done
686
687 # There might be people who depend on the old broken behavior: `$host'
688 # used to hold the argument of --host etc.
689 # FIXME: To remove some day.
690 build=$build_alias
691 host=$host_alias
692 target=$target_alias
693
694 # FIXME: To remove some day.
695 if test "x$host_alias" != x; then
696   if test "x$build_alias" = x; then
697     cross_compiling=maybe
698     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
699     If a cross compiler is detected then cross compile mode will be used." >&2
700   elif test "x$build_alias" != "x$host_alias"; then
701     cross_compiling=yes
702   fi
703 fi
704
705 ac_tool_prefix=
706 test -n "$host_alias" && ac_tool_prefix=$host_alias-
707
708 test "$silent" = yes && exec 6>/dev/null
709
710
711 # Find the source files, if location was not specified.
712 if test -z "$srcdir"; then
713   ac_srcdir_defaulted=yes
714   # Try the directory containing this script, then its parent.
715   ac_confdir=`(dirname "$0") 2>/dev/null ||
716 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
717          X"$0" : 'X\(//\)[^/]' \| \
718          X"$0" : 'X\(//\)$' \| \
719          X"$0" : 'X\(/\)' \| \
720          .     : '\(.\)' 2>/dev/null ||
721 echo X"$0" |
722     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
723           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
724           /^X\(\/\/\)$/{ s//\1/; q; }
725           /^X\(\/\).*/{ s//\1/; q; }
726           s/.*/./; q'`
727   srcdir=$ac_confdir
728   if test ! -r $srcdir/$ac_unique_file; then
729     srcdir=..
730   fi
731 else
732   ac_srcdir_defaulted=no
733 fi
734 if test ! -r $srcdir/$ac_unique_file; then
735   if test "$ac_srcdir_defaulted" = yes; then
736     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
737    { (exit 1); exit 1; }; }
738   else
739     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
740    { (exit 1); exit 1; }; }
741   fi
742 fi
743 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
744   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
745    { (exit 1); exit 1; }; }
746 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
747 ac_env_build_alias_set=${build_alias+set}
748 ac_env_build_alias_value=$build_alias
749 ac_cv_env_build_alias_set=${build_alias+set}
750 ac_cv_env_build_alias_value=$build_alias
751 ac_env_host_alias_set=${host_alias+set}
752 ac_env_host_alias_value=$host_alias
753 ac_cv_env_host_alias_set=${host_alias+set}
754 ac_cv_env_host_alias_value=$host_alias
755 ac_env_target_alias_set=${target_alias+set}
756 ac_env_target_alias_value=$target_alias
757 ac_cv_env_target_alias_set=${target_alias+set}
758 ac_cv_env_target_alias_value=$target_alias
759 ac_env_CC_set=${CC+set}
760 ac_env_CC_value=$CC
761 ac_cv_env_CC_set=${CC+set}
762 ac_cv_env_CC_value=$CC
763 ac_env_CFLAGS_set=${CFLAGS+set}
764 ac_env_CFLAGS_value=$CFLAGS
765 ac_cv_env_CFLAGS_set=${CFLAGS+set}
766 ac_cv_env_CFLAGS_value=$CFLAGS
767 ac_env_LDFLAGS_set=${LDFLAGS+set}
768 ac_env_LDFLAGS_value=$LDFLAGS
769 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
770 ac_cv_env_LDFLAGS_value=$LDFLAGS
771 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
772 ac_env_CPPFLAGS_value=$CPPFLAGS
773 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
774 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
775 ac_env_CPP_set=${CPP+set}
776 ac_env_CPP_value=$CPP
777 ac_cv_env_CPP_set=${CPP+set}
778 ac_cv_env_CPP_value=$CPP
779
780 #
781 # Report the --help message.
782 #
783 if test "$ac_init_help" = "long"; then
784   # Omit some internal or obsolete options to make the list less imposing.
785   # This message is too long to be a string in the A/UX 3.1 sh.
786   cat <<_ACEOF
787 \`configure' configures this package to adapt to many kinds of systems.
788
789 Usage: $0 [OPTION]... [VAR=VALUE]...
790
791 To assign environment variables (e.g., CC, CFLAGS...), specify them as
792 VAR=VALUE.  See below for descriptions of some of the useful variables.
793
794 Defaults for the options are specified in brackets.
795
796 Configuration:
797   -h, --help              display this help and exit
798       --help=short        display options specific to this package
799       --help=recursive    display the short help of all the included packages
800   -V, --version           display version information and exit
801   -q, --quiet, --silent   do not print \`checking...' messages
802       --cache-file=FILE   cache test results in FILE [disabled]
803   -C, --config-cache      alias for \`--cache-file=config.cache'
804   -n, --no-create         do not create output files
805       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
806
807 _ACEOF
808
809   cat <<_ACEOF
810 Installation directories:
811   --prefix=PREFIX         install architecture-independent files in PREFIX
812                           [$ac_default_prefix]
813   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
814                           [PREFIX]
815
816 By default, \`make install' will install all the files in
817 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
818 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
819 for instance \`--prefix=\$HOME'.
820
821 For better control, use the options below.
822
823 Fine tuning of the installation directories:
824   --bindir=DIR           user executables [EPREFIX/bin]
825   --sbindir=DIR          system admin executables [EPREFIX/sbin]
826   --libexecdir=DIR       program executables [EPREFIX/libexec]
827   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
828   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
829   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
830   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
831   --libdir=DIR           object code libraries [EPREFIX/lib]
832   --includedir=DIR       C header files [PREFIX/include]
833   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
834   --infodir=DIR          info documentation [PREFIX/info]
835   --mandir=DIR           man documentation [PREFIX/man]
836 _ACEOF
837
838   cat <<\_ACEOF
839
840 Program names:
841   --program-prefix=PREFIX            prepend PREFIX to installed program names
842   --program-suffix=SUFFIX            append SUFFIX to installed program names
843   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
844
845 X features:
846   --x-includes=DIR    X include files are in DIR
847   --x-libraries=DIR   X library files are in DIR
848
849 System types:
850   --build=BUILD     configure for building on BUILD [guessed]
851   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
852   --target=TARGET   configure for building compilers for TARGET [HOST]
853 _ACEOF
854 fi
855
856 if test -n "$ac_init_help"; then
857
858   cat <<\_ACEOF
859
860 Optional Features:
861   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
862   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
863   --enable-maintainer-mode  enable make rules and dependencies not useful
864                           (and sometimes confusing) to the casual installer
865   --disable-dependency-tracking  speeds up one-time build
866   --enable-dependency-tracking   do not reject slow dependency extractors
867   --enable-targets=TARGETS
868                           alternative target configurations
869   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
870   --disable-gdbcli        disable command-line interface (CLI)
871   --disable-gdbmi         disable machine-interface (MI)
872   --enable-tui            enable full-screen terminal user interface (TUI)
873   --enable-gdbtk          enable gdbtk graphical user interface (GUI)
874   --enable-profiling      enable profiling of GDB
875   --disable-rpath         do not hardcode runtime library paths
876   --enable-werror         treat compile warnings as errors
877   --enable-build-warnings enable build-time compiler warnings if gcc is used
878   --enable-gdb-build-warnings
879                           enable GDB specific build-time compiler warnings if
880                           gcc is used
881   --enable-sim            link gdb with simulator
882   --enable-multi-ice      build the multi-ice-gdb-server
883
884 Optional Packages:
885   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
886   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
887   --with-separate-debug-dir=PATH
888                           look for global separate debug info in this path
889                           LIBDIR/debug
890   --with-relocated-sources=PATH
891                           automatically relocate this path for source files
892   --with-libunwind        use libunwind frame unwinding support
893   --with-curses           use the curses library instead of the termcap
894                           library
895   --with-pkgversion=PKG   Use PKG in the version string in place of "GDB"
896   --with-bugurl=URL       Direct users to URL to report a bug
897   --with-libiconv-prefix=DIR
898                           search for libiconv in DIR/include and DIR/lib
899   --with-system-readline  use installed readline library
900   --with-expat            include expat support (auto/yes/no)
901   --with-gnu-ld           assume the C compiler uses GNU ld default=no
902   --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
903   --without-libexpat-prefix     don't search for libexpat in includedir and libdir
904   --with-python           include python support (auto/yes/no/<path>)
905   --without-included-regex
906                           don't use included regex; this is the default on
907                           systems with version 2 of the GNU C library (use
908                           with caution on other system)
909   --with-sysroot[=DIR]
910                           search for usr/lib et al within DIR
911   --with-system-gdbinit=FILE
912                           automatically load a system-wide gdbinit file
913   --with-tcl              directory containing tcl configuration (tclConfig.sh)
914   --with-tk               directory containing tk configuration (tkConfig.sh)
915   --with-x                use the X Window System
916
917 Some influential environment variables:
918   CC          C compiler command
919   CFLAGS      C compiler flags
920   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
921               nonstandard directory <lib dir>
922   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
923               headers in a nonstandard directory <include dir>
924   CPP         C preprocessor
925
926 Use these variables to override the choices made by `configure' or to help
927 it to find libraries and programs with nonstandard names/locations.
928
929 _ACEOF
930 fi
931
932 if test "$ac_init_help" = "recursive"; then
933   # If there are subdirs, report their specific --help.
934   ac_popdir=`pwd`
935   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
936     test -d $ac_dir || continue
937     ac_builddir=.
938
939 if test "$ac_dir" != .; then
940   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
941   # A "../" for each directory in $ac_dir_suffix.
942   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
943 else
944   ac_dir_suffix= ac_top_builddir=
945 fi
946
947 case $srcdir in
948   .)  # No --srcdir option.  We are building in place.
949     ac_srcdir=.
950     if test -z "$ac_top_builddir"; then
951        ac_top_srcdir=.
952     else
953        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
954     fi ;;
955   [\\/]* | ?:[\\/]* )  # Absolute path.
956     ac_srcdir=$srcdir$ac_dir_suffix;
957     ac_top_srcdir=$srcdir ;;
958   *) # Relative path.
959     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
960     ac_top_srcdir=$ac_top_builddir$srcdir ;;
961 esac
962
963 # Do not use `cd foo && pwd` to compute absolute paths, because
964 # the directories may not exist.
965 case `pwd` in
966 .) ac_abs_builddir="$ac_dir";;
967 *)
968   case "$ac_dir" in
969   .) ac_abs_builddir=`pwd`;;
970   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
971   *) ac_abs_builddir=`pwd`/"$ac_dir";;
972   esac;;
973 esac
974 case $ac_abs_builddir in
975 .) ac_abs_top_builddir=${ac_top_builddir}.;;
976 *)
977   case ${ac_top_builddir}. in
978   .) ac_abs_top_builddir=$ac_abs_builddir;;
979   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
980   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
981   esac;;
982 esac
983 case $ac_abs_builddir in
984 .) ac_abs_srcdir=$ac_srcdir;;
985 *)
986   case $ac_srcdir in
987   .) ac_abs_srcdir=$ac_abs_builddir;;
988   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
989   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
990   esac;;
991 esac
992 case $ac_abs_builddir in
993 .) ac_abs_top_srcdir=$ac_top_srcdir;;
994 *)
995   case $ac_top_srcdir in
996   .) ac_abs_top_srcdir=$ac_abs_builddir;;
997   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
998   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
999   esac;;
1000 esac
1001
1002     cd $ac_dir
1003     # Check for guested configure; otherwise get Cygnus style configure.
1004     if test -f $ac_srcdir/configure.gnu; then
1005       echo
1006       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1007     elif test -f $ac_srcdir/configure; then
1008       echo
1009       $SHELL $ac_srcdir/configure  --help=recursive
1010     elif test -f $ac_srcdir/configure.ac ||
1011            test -f $ac_srcdir/configure.in; then
1012       echo
1013       $ac_configure --help
1014     else
1015       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1016     fi
1017     cd $ac_popdir
1018   done
1019 fi
1020
1021 test -n "$ac_init_help" && exit 0
1022 if $ac_init_version; then
1023   cat <<\_ACEOF
1024
1025 Copyright (C) 2003 Free Software Foundation, Inc.
1026 This configure script is free software; the Free Software Foundation
1027 gives unlimited permission to copy, distribute and modify it.
1028 _ACEOF
1029   exit 0
1030 fi
1031 exec 5>config.log
1032 cat >&5 <<_ACEOF
1033 This file contains any messages produced by compilers while
1034 running configure, to aid debugging if configure makes a mistake.
1035
1036 It was created by $as_me, which was
1037 generated by GNU Autoconf 2.59.  Invocation command line was
1038
1039   $ $0 $@
1040
1041 _ACEOF
1042 {
1043 cat <<_ASUNAME
1044 ## --------- ##
1045 ## Platform. ##
1046 ## --------- ##
1047
1048 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1049 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1050 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1051 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1052 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1053
1054 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1055 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1056
1057 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1058 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1059 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1060 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1061 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1062 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1063 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1064
1065 _ASUNAME
1066
1067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1068 for as_dir in $PATH
1069 do
1070   IFS=$as_save_IFS
1071   test -z "$as_dir" && as_dir=.
1072   echo "PATH: $as_dir"
1073 done
1074
1075 } >&5
1076
1077 cat >&5 <<_ACEOF
1078
1079
1080 ## ----------- ##
1081 ## Core tests. ##
1082 ## ----------- ##
1083
1084 _ACEOF
1085
1086
1087 # Keep a trace of the command line.
1088 # Strip out --no-create and --no-recursion so they do not pile up.
1089 # Strip out --silent because we don't want to record it for future runs.
1090 # Also quote any args containing shell meta-characters.
1091 # Make two passes to allow for proper duplicate-argument suppression.
1092 ac_configure_args=
1093 ac_configure_args0=
1094 ac_configure_args1=
1095 ac_sep=
1096 ac_must_keep_next=false
1097 for ac_pass in 1 2
1098 do
1099   for ac_arg
1100   do
1101     case $ac_arg in
1102     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1103     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1104     | -silent | --silent | --silen | --sile | --sil)
1105       continue ;;
1106     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1107       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1108     esac
1109     case $ac_pass in
1110     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1111     2)
1112       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1113       if test $ac_must_keep_next = true; then
1114         ac_must_keep_next=false # Got value, back to normal.
1115       else
1116         case $ac_arg in
1117           *=* | --config-cache | -C | -disable-* | --disable-* \
1118           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1119           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1120           | -with-* | --with-* | -without-* | --without-* | --x)
1121             case "$ac_configure_args0 " in
1122               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1123             esac
1124             ;;
1125           -* ) ac_must_keep_next=true ;;
1126         esac
1127       fi
1128       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1129       # Get rid of the leading space.
1130       ac_sep=" "
1131       ;;
1132     esac
1133   done
1134 done
1135 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1136 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1137
1138 # When interrupted or exit'd, cleanup temporary files, and complete
1139 # config.log.  We remove comments because anyway the quotes in there
1140 # would cause problems or look ugly.
1141 # WARNING: Be sure not to use single quotes in there, as some shells,
1142 # such as our DU 5.0 friend, will then `close' the trap.
1143 trap 'exit_status=$?
1144   # Save into config.log some information that might help in debugging.
1145   {
1146     echo
1147
1148     cat <<\_ASBOX
1149 ## ---------------- ##
1150 ## Cache variables. ##
1151 ## ---------------- ##
1152 _ASBOX
1153     echo
1154     # The following way of writing the cache mishandles newlines in values,
1155 {
1156   (set) 2>&1 |
1157     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1158     *ac_space=\ *)
1159       sed -n \
1160         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1161           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1162       ;;
1163     *)
1164       sed -n \
1165         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1166       ;;
1167     esac;
1168 }
1169     echo
1170
1171     cat <<\_ASBOX
1172 ## ----------------- ##
1173 ## Output variables. ##
1174 ## ----------------- ##
1175 _ASBOX
1176     echo
1177     for ac_var in $ac_subst_vars
1178     do
1179       eval ac_val=$`echo $ac_var`
1180       echo "$ac_var='"'"'$ac_val'"'"'"
1181     done | sort
1182     echo
1183
1184     if test -n "$ac_subst_files"; then
1185       cat <<\_ASBOX
1186 ## ------------- ##
1187 ## Output files. ##
1188 ## ------------- ##
1189 _ASBOX
1190       echo
1191       for ac_var in $ac_subst_files
1192       do
1193         eval ac_val=$`echo $ac_var`
1194         echo "$ac_var='"'"'$ac_val'"'"'"
1195       done | sort
1196       echo
1197     fi
1198
1199     if test -s confdefs.h; then
1200       cat <<\_ASBOX
1201 ## ----------- ##
1202 ## confdefs.h. ##
1203 ## ----------- ##
1204 _ASBOX
1205       echo
1206       sed "/^$/d" confdefs.h | sort
1207       echo
1208     fi
1209     test "$ac_signal" != 0 &&
1210       echo "$as_me: caught signal $ac_signal"
1211     echo "$as_me: exit $exit_status"
1212   } >&5
1213   rm -f core *.core &&
1214   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1215     exit $exit_status
1216      ' 0
1217 for ac_signal in 1 2 13 15; do
1218   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1219 done
1220 ac_signal=0
1221
1222 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1223 rm -rf conftest* confdefs.h
1224 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1225 echo >confdefs.h
1226
1227 # Predefined preprocessor variables.
1228
1229 cat >>confdefs.h <<_ACEOF
1230 #define PACKAGE_NAME "$PACKAGE_NAME"
1231 _ACEOF
1232
1233
1234 cat >>confdefs.h <<_ACEOF
1235 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1236 _ACEOF
1237
1238
1239 cat >>confdefs.h <<_ACEOF
1240 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1241 _ACEOF
1242
1243
1244 cat >>confdefs.h <<_ACEOF
1245 #define PACKAGE_STRING "$PACKAGE_STRING"
1246 _ACEOF
1247
1248
1249 cat >>confdefs.h <<_ACEOF
1250 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1251 _ACEOF
1252
1253
1254 # Let the site file select an alternate cache file if it wants to.
1255 # Prefer explicitly selected file to automatically selected ones.
1256 if test -z "$CONFIG_SITE"; then
1257   if test "x$prefix" != xNONE; then
1258     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1259   else
1260     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1261   fi
1262 fi
1263 for ac_site_file in $CONFIG_SITE; do
1264   if test -r "$ac_site_file"; then
1265     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1266 echo "$as_me: loading site script $ac_site_file" >&6;}
1267     sed 's/^/| /' "$ac_site_file" >&5
1268     . "$ac_site_file"
1269   fi
1270 done
1271
1272 if test -r "$cache_file"; then
1273   # Some versions of bash will fail to source /dev/null (special
1274   # files actually), so we avoid doing that.
1275   if test -f "$cache_file"; then
1276     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1277 echo "$as_me: loading cache $cache_file" >&6;}
1278     case $cache_file in
1279       [\\/]* | ?:[\\/]* ) . $cache_file;;
1280       *)                      . ./$cache_file;;
1281     esac
1282   fi
1283 else
1284   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1285 echo "$as_me: creating cache $cache_file" >&6;}
1286   >$cache_file
1287 fi
1288
1289 # Check that the precious variables saved in the cache have kept the same
1290 # value.
1291 ac_cache_corrupted=false
1292 for ac_var in `(set) 2>&1 |
1293                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1294   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1295   eval ac_new_set=\$ac_env_${ac_var}_set
1296   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1297   eval ac_new_val="\$ac_env_${ac_var}_value"
1298   case $ac_old_set,$ac_new_set in
1299     set,)
1300       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1301 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1302       ac_cache_corrupted=: ;;
1303     ,set)
1304       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1305 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1306       ac_cache_corrupted=: ;;
1307     ,);;
1308     *)
1309       if test "x$ac_old_val" != "x$ac_new_val"; then
1310         # differences in whitespace do not lead to failure.
1311         ac_old_val_w=`echo x $ac_old_val`
1312         ac_new_val_w=`echo x $ac_new_val`
1313         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1314           { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1315 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1316           ac_cache_corrupted=:
1317         else
1318           { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1319 echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1320           eval $ac_var=\$ac_old_val
1321         fi
1322         { echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1323 echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1324         { echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1325 echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1326       fi;;
1327   esac
1328   # Pass precious variables to config.status.
1329   if test "$ac_new_set" = set; then
1330     case $ac_new_val in
1331     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1332       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1333     *) ac_arg=$ac_var=$ac_new_val ;;
1334     esac
1335     case " $ac_configure_args " in
1336       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1337       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1338     esac
1339   fi
1340 done
1341 if $ac_cache_corrupted; then
1342   { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1343 echo "$as_me: error: in \`$ac_pwd':" >&2;}
1344   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1345 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1346   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1347 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1348    { (exit 1); exit 1; }; }
1349 fi
1350
1351 ac_ext=c
1352 ac_cpp='$CPP $CPPFLAGS'
1353 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1354 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1355 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1356
1357
1358 gl_header_list="$gl_header_list stdint.h"
1359 gl_header_list="$gl_header_list wchar.h"
1360 gl_header_list="$gl_header_list string.h"
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381           ac_config_headers="$ac_config_headers config.h:config.in"
1382
1383 echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1384 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
1385     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1386 if test "${enable_maintainer_mode+set}" = set; then
1387   enableval="$enable_maintainer_mode"
1388   USE_MAINTAINER_MODE=$enableval
1389 else
1390   USE_MAINTAINER_MODE=no
1391 fi;
1392   echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
1393 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
1394
1395
1396 if test $USE_MAINTAINER_MODE = yes; then
1397   MAINTAINER_MODE_TRUE=
1398   MAINTAINER_MODE_FALSE='#'
1399 else
1400   MAINTAINER_MODE_TRUE='#'
1401   MAINTAINER_MODE_FALSE=
1402 fi
1403
1404   MAINT=$MAINTAINER_MODE_TRUE
1405
1406
1407
1408 ac_ext=c
1409 ac_cpp='$CPP $CPPFLAGS'
1410 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1411 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1412 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1413 if test -n "$ac_tool_prefix"; then
1414   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1415 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1416 echo "$as_me:$LINENO: checking for $ac_word" >&5
1417 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1418 if test "${ac_cv_prog_CC+set}" = set; then
1419   echo $ECHO_N "(cached) $ECHO_C" >&6
1420 else
1421   if test -n "$CC"; then
1422   ac_cv_prog_CC="$CC" # Let the user override the test.
1423 else
1424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1425 for as_dir in $PATH
1426 do
1427   IFS=$as_save_IFS
1428   test -z "$as_dir" && as_dir=.
1429   for ac_exec_ext in '' $ac_executable_extensions; do
1430   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1431     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1432     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1433     break 2
1434   fi
1435 done
1436 done
1437
1438 fi
1439 fi
1440 CC=$ac_cv_prog_CC
1441 if test -n "$CC"; then
1442   echo "$as_me:$LINENO: result: $CC" >&5
1443 echo "${ECHO_T}$CC" >&6
1444 else
1445   echo "$as_me:$LINENO: result: no" >&5
1446 echo "${ECHO_T}no" >&6
1447 fi
1448
1449 fi
1450 if test -z "$ac_cv_prog_CC"; then
1451   ac_ct_CC=$CC
1452   # Extract the first word of "gcc", so it can be a program name with args.
1453 set dummy gcc; ac_word=$2
1454 echo "$as_me:$LINENO: checking for $ac_word" >&5
1455 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1456 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1457   echo $ECHO_N "(cached) $ECHO_C" >&6
1458 else
1459   if test -n "$ac_ct_CC"; then
1460   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1461 else
1462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1463 for as_dir in $PATH
1464 do
1465   IFS=$as_save_IFS
1466   test -z "$as_dir" && as_dir=.
1467   for ac_exec_ext in '' $ac_executable_extensions; do
1468   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1469     ac_cv_prog_ac_ct_CC="gcc"
1470     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1471     break 2
1472   fi
1473 done
1474 done
1475
1476 fi
1477 fi
1478 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1479 if test -n "$ac_ct_CC"; then
1480   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1481 echo "${ECHO_T}$ac_ct_CC" >&6
1482 else
1483   echo "$as_me:$LINENO: result: no" >&5
1484 echo "${ECHO_T}no" >&6
1485 fi
1486
1487   CC=$ac_ct_CC
1488 else
1489   CC="$ac_cv_prog_CC"
1490 fi
1491
1492 if test -z "$CC"; then
1493   if test -n "$ac_tool_prefix"; then
1494   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1495 set dummy ${ac_tool_prefix}cc; ac_word=$2
1496 echo "$as_me:$LINENO: checking for $ac_word" >&5
1497 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1498 if test "${ac_cv_prog_CC+set}" = set; then
1499   echo $ECHO_N "(cached) $ECHO_C" >&6
1500 else
1501   if test -n "$CC"; then
1502   ac_cv_prog_CC="$CC" # Let the user override the test.
1503 else
1504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1505 for as_dir in $PATH
1506 do
1507   IFS=$as_save_IFS
1508   test -z "$as_dir" && as_dir=.
1509   for ac_exec_ext in '' $ac_executable_extensions; do
1510   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1511     ac_cv_prog_CC="${ac_tool_prefix}cc"
1512     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1513     break 2
1514   fi
1515 done
1516 done
1517
1518 fi
1519 fi
1520 CC=$ac_cv_prog_CC
1521 if test -n "$CC"; then
1522   echo "$as_me:$LINENO: result: $CC" >&5
1523 echo "${ECHO_T}$CC" >&6
1524 else
1525   echo "$as_me:$LINENO: result: no" >&5
1526 echo "${ECHO_T}no" >&6
1527 fi
1528
1529 fi
1530 if test -z "$ac_cv_prog_CC"; then
1531   ac_ct_CC=$CC
1532   # Extract the first word of "cc", so it can be a program name with args.
1533 set dummy cc; ac_word=$2
1534 echo "$as_me:$LINENO: checking for $ac_word" >&5
1535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1536 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1537   echo $ECHO_N "(cached) $ECHO_C" >&6
1538 else
1539   if test -n "$ac_ct_CC"; then
1540   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1541 else
1542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1543 for as_dir in $PATH
1544 do
1545   IFS=$as_save_IFS
1546   test -z "$as_dir" && as_dir=.
1547   for ac_exec_ext in '' $ac_executable_extensions; do
1548   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1549     ac_cv_prog_ac_ct_CC="cc"
1550     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1551     break 2
1552   fi
1553 done
1554 done
1555
1556 fi
1557 fi
1558 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1559 if test -n "$ac_ct_CC"; then
1560   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1561 echo "${ECHO_T}$ac_ct_CC" >&6
1562 else
1563   echo "$as_me:$LINENO: result: no" >&5
1564 echo "${ECHO_T}no" >&6
1565 fi
1566
1567   CC=$ac_ct_CC
1568 else
1569   CC="$ac_cv_prog_CC"
1570 fi
1571
1572 fi
1573 if test -z "$CC"; then
1574   # Extract the first word of "cc", so it can be a program name with args.
1575 set dummy cc; ac_word=$2
1576 echo "$as_me:$LINENO: checking for $ac_word" >&5
1577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1578 if test "${ac_cv_prog_CC+set}" = set; then
1579   echo $ECHO_N "(cached) $ECHO_C" >&6
1580 else
1581   if test -n "$CC"; then
1582   ac_cv_prog_CC="$CC" # Let the user override the test.
1583 else
1584   ac_prog_rejected=no
1585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1586 for as_dir in $PATH
1587 do
1588   IFS=$as_save_IFS
1589   test -z "$as_dir" && as_dir=.
1590   for ac_exec_ext in '' $ac_executable_extensions; do
1591   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1592     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1593        ac_prog_rejected=yes
1594        continue
1595      fi
1596     ac_cv_prog_CC="cc"
1597     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1598     break 2
1599   fi
1600 done
1601 done
1602
1603 if test $ac_prog_rejected = yes; then
1604   # We found a bogon in the path, so make sure we never use it.
1605   set dummy $ac_cv_prog_CC
1606   shift
1607   if test $# != 0; then
1608     # We chose a different compiler from the bogus one.
1609     # However, it has the same basename, so the bogon will be chosen
1610     # first if we set CC to just the basename; use the full file name.
1611     shift
1612     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1613   fi
1614 fi
1615 fi
1616 fi
1617 CC=$ac_cv_prog_CC
1618 if test -n "$CC"; then
1619   echo "$as_me:$LINENO: result: $CC" >&5
1620 echo "${ECHO_T}$CC" >&6
1621 else
1622   echo "$as_me:$LINENO: result: no" >&5
1623 echo "${ECHO_T}no" >&6
1624 fi
1625
1626 fi
1627 if test -z "$CC"; then
1628   if test -n "$ac_tool_prefix"; then
1629   for ac_prog in cl
1630   do
1631     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1632 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1633 echo "$as_me:$LINENO: checking for $ac_word" >&5
1634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1635 if test "${ac_cv_prog_CC+set}" = set; then
1636   echo $ECHO_N "(cached) $ECHO_C" >&6
1637 else
1638   if test -n "$CC"; then
1639   ac_cv_prog_CC="$CC" # Let the user override the test.
1640 else
1641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1642 for as_dir in $PATH
1643 do
1644   IFS=$as_save_IFS
1645   test -z "$as_dir" && as_dir=.
1646   for ac_exec_ext in '' $ac_executable_extensions; do
1647   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1648     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1649     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1650     break 2
1651   fi
1652 done
1653 done
1654
1655 fi
1656 fi
1657 CC=$ac_cv_prog_CC
1658 if test -n "$CC"; then
1659   echo "$as_me:$LINENO: result: $CC" >&5
1660 echo "${ECHO_T}$CC" >&6
1661 else
1662   echo "$as_me:$LINENO: result: no" >&5
1663 echo "${ECHO_T}no" >&6
1664 fi
1665
1666     test -n "$CC" && break
1667   done
1668 fi
1669 if test -z "$CC"; then
1670   ac_ct_CC=$CC
1671   for ac_prog in cl
1672 do
1673   # Extract the first word of "$ac_prog", so it can be a program name with args.
1674 set dummy $ac_prog; ac_word=$2
1675 echo "$as_me:$LINENO: checking for $ac_word" >&5
1676 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1677 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1678   echo $ECHO_N "(cached) $ECHO_C" >&6
1679 else
1680   if test -n "$ac_ct_CC"; then
1681   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1682 else
1683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1684 for as_dir in $PATH
1685 do
1686   IFS=$as_save_IFS
1687   test -z "$as_dir" && as_dir=.
1688   for ac_exec_ext in '' $ac_executable_extensions; do
1689   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1690     ac_cv_prog_ac_ct_CC="$ac_prog"
1691     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1692     break 2
1693   fi
1694 done
1695 done
1696
1697 fi
1698 fi
1699 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1700 if test -n "$ac_ct_CC"; then
1701   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1702 echo "${ECHO_T}$ac_ct_CC" >&6
1703 else
1704   echo "$as_me:$LINENO: result: no" >&5
1705 echo "${ECHO_T}no" >&6
1706 fi
1707
1708   test -n "$ac_ct_CC" && break
1709 done
1710
1711   CC=$ac_ct_CC
1712 fi
1713
1714 fi
1715
1716
1717 test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1718 echo "$as_me: error: in \`$ac_pwd':" >&2;}
1719 { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1720 See \`config.log' for more details." >&5
1721 echo "$as_me: error: no acceptable C compiler found in \$PATH
1722 See \`config.log' for more details." >&2;}
1723    { (exit 1); exit 1; }; }; }
1724
1725 # Provide some information about the compiler.
1726 echo "$as_me:$LINENO:" \
1727      "checking for C compiler version" >&5
1728 ac_compiler=`set X $ac_compile; echo $2`
1729 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1730   (eval $ac_compiler --version </dev/null >&5) 2>&5
1731   ac_status=$?
1732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1733   (exit $ac_status); }
1734 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1735   (eval $ac_compiler -v </dev/null >&5) 2>&5
1736   ac_status=$?
1737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1738   (exit $ac_status); }
1739 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1740   (eval $ac_compiler -V </dev/null >&5) 2>&5
1741   ac_status=$?
1742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1743   (exit $ac_status); }
1744
1745 cat >conftest.$ac_ext <<_ACEOF
1746 /* confdefs.h.  */
1747 _ACEOF
1748 cat confdefs.h >>conftest.$ac_ext
1749 cat >>conftest.$ac_ext <<_ACEOF
1750 /* end confdefs.h.  */
1751
1752 int
1753 main ()
1754 {
1755
1756   ;
1757   return 0;
1758 }
1759 _ACEOF
1760 ac_clean_files_save=$ac_clean_files
1761 ac_clean_files="$ac_clean_files a.out a.exe b.out"
1762 # Try to create an executable without -o first, disregard a.out.
1763 # It will help us diagnose broken compilers, and finding out an intuition
1764 # of exeext.
1765 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1766 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
1767 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1768 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1769   (eval $ac_link_default) 2>&5
1770   ac_status=$?
1771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1772   (exit $ac_status); }; then
1773   # Find the output, starting from the most likely.  This scheme is
1774 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1775 # resort.
1776
1777 # Be careful to initialize this variable, since it used to be cached.
1778 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1779 ac_cv_exeext=
1780 # b.out is created by i960 compilers.
1781 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1782 do
1783   test -f "$ac_file" || continue
1784   case $ac_file in
1785     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1786         ;;
1787     conftest.$ac_ext )
1788         # This is the source file.
1789         ;;
1790     [ab].out )
1791         # We found the default executable, but exeext='' is most
1792         # certainly right.
1793         break;;
1794     *.* )
1795         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1796         # FIXME: I believe we export ac_cv_exeext for Libtool,
1797         # but it would be cool to find out if it's true.  Does anybody
1798         # maintain Libtool? --akim.
1799         export ac_cv_exeext
1800         break;;
1801     * )
1802         break;;
1803   esac
1804 done
1805 else
1806   echo "$as_me: failed program was:" >&5
1807 sed 's/^/| /' conftest.$ac_ext >&5
1808
1809 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1810 echo "$as_me: error: in \`$ac_pwd':" >&2;}
1811 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
1812 See \`config.log' for more details." >&5
1813 echo "$as_me: error: C compiler cannot create executables
1814 See \`config.log' for more details." >&2;}
1815    { (exit 77); exit 77; }; }; }
1816 fi
1817
1818 ac_exeext=$ac_cv_exeext
1819 echo "$as_me:$LINENO: result: $ac_file" >&5
1820 echo "${ECHO_T}$ac_file" >&6
1821
1822 # Check the compiler produces executables we can run.  If not, either
1823 # the compiler is broken, or we cross compile.
1824 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1825 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1826 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1827 # If not cross compiling, check that we can run a simple program.
1828 if test "$cross_compiling" != yes; then
1829   if { ac_try='./$ac_file'
1830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1831   (eval $ac_try) 2>&5
1832   ac_status=$?
1833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1834   (exit $ac_status); }; }; then
1835     cross_compiling=no
1836   else
1837     if test "$cross_compiling" = maybe; then
1838         cross_compiling=yes
1839     else
1840         { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1841 echo "$as_me: error: in \`$ac_pwd':" >&2;}
1842 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1843 If you meant to cross compile, use \`--host'.
1844 See \`config.log' for more details." >&5
1845 echo "$as_me: error: cannot run C compiled programs.
1846 If you meant to cross compile, use \`--host'.
1847 See \`config.log' for more details." >&2;}
1848    { (exit 1); exit 1; }; }; }
1849     fi
1850   fi
1851 fi
1852 echo "$as_me:$LINENO: result: yes" >&5
1853 echo "${ECHO_T}yes" >&6
1854
1855 rm -f a.out a.exe conftest$ac_cv_exeext b.out
1856 ac_clean_files=$ac_clean_files_save
1857 # Check the compiler produces executables we can run.  If not, either
1858 # the compiler is broken, or we cross compile.
1859 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1860 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1861 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1862 echo "${ECHO_T}$cross_compiling" >&6
1863
1864 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1865 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1866 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1867   (eval $ac_link) 2>&5
1868   ac_status=$?
1869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1870   (exit $ac_status); }; then
1871   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1872 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1873 # work properly (i.e., refer to `conftest.exe'), while it won't with
1874 # `rm'.
1875 for ac_file in conftest.exe conftest conftest.*; do
1876   test -f "$ac_file" || continue
1877   case $ac_file in
1878     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1879     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1880           export ac_cv_exeext
1881           break;;
1882     * ) break;;
1883   esac
1884 done
1885 else
1886   { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1887 echo "$as_me: error: in \`$ac_pwd':" >&2;}
1888 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1889 See \`config.log' for more details." >&5
1890 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1891 See \`config.log' for more details." >&2;}
1892    { (exit 1); exit 1; }; }; }
1893 fi
1894
1895 rm -f conftest$ac_cv_exeext
1896 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1897 echo "${ECHO_T}$ac_cv_exeext" >&6
1898
1899 rm -f conftest.$ac_ext
1900 EXEEXT=$ac_cv_exeext
1901 ac_exeext=$EXEEXT
1902 echo "$as_me:$LINENO: checking for suffix of object files" >&5
1903 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1904 if test "${ac_cv_objext+set}" = set; then
1905   echo $ECHO_N "(cached) $ECHO_C" >&6
1906 else
1907   cat >conftest.$ac_ext <<_ACEOF
1908 /* confdefs.h.  */
1909 _ACEOF
1910 cat confdefs.h >>conftest.$ac_ext
1911 cat >>conftest.$ac_ext <<_ACEOF
1912 /* end confdefs.h.  */
1913
1914 int
1915 main ()
1916 {
1917
1918   ;
1919   return 0;
1920 }
1921 _ACEOF
1922 rm -f conftest.o conftest.obj
1923 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1924   (eval $ac_compile) 2>&5
1925   ac_status=$?
1926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1927   (exit $ac_status); }; then
1928   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1929   case $ac_file in
1930     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1931     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1932        break;;
1933   esac
1934 done
1935 else
1936   echo "$as_me: failed program was:" >&5
1937 sed 's/^/| /' conftest.$ac_ext >&5
1938
1939 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1940 echo "$as_me: error: in \`$ac_pwd':" >&2;}
1941 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1942 See \`config.log' for more details." >&5
1943 echo "$as_me: error: cannot compute suffix of object files: cannot compile
1944 See \`config.log' for more details." >&2;}
1945    { (exit 1); exit 1; }; }; }
1946 fi
1947
1948 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1949 fi
1950 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1951 echo "${ECHO_T}$ac_cv_objext" >&6
1952 OBJEXT=$ac_cv_objext
1953 ac_objext=$OBJEXT
1954 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1955 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1956 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1957   echo $ECHO_N "(cached) $ECHO_C" >&6
1958 else
1959   cat >conftest.$ac_ext <<_ACEOF
1960 /* confdefs.h.  */
1961 _ACEOF
1962 cat confdefs.h >>conftest.$ac_ext
1963 cat >>conftest.$ac_ext <<_ACEOF
1964 /* end confdefs.h.  */
1965
1966 int
1967 main ()
1968 {
1969 #ifndef __GNUC__
1970        choke me
1971 #endif
1972
1973   ;
1974   return 0;
1975 }
1976 _ACEOF
1977 rm -f conftest.$ac_objext
1978 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1979   (eval $ac_compile) 2>conftest.er1
1980   ac_status=$?
1981   grep -v '^ *+' conftest.er1 >conftest.err
1982   rm -f conftest.er1
1983   cat conftest.err >&5
1984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1985   (exit $ac_status); } &&
1986          { ac_try='test -z "$ac_c_werror_flag"
1987                          || test ! -s conftest.err'
1988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1989   (eval $ac_try) 2>&5
1990   ac_status=$?
1991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1992   (exit $ac_status); }; } &&
1993          { ac_try='test -s conftest.$ac_objext'
1994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1995   (eval $ac_try) 2>&5
1996   ac_status=$?
1997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1998   (exit $ac_status); }; }; then
1999   ac_compiler_gnu=yes
2000 else
2001   echo "$as_me: failed program was:" >&5
2002 sed 's/^/| /' conftest.$ac_ext >&5
2003
2004 ac_compiler_gnu=no
2005 fi
2006 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2007 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2008
2009 fi
2010 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2011 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2012 GCC=`test $ac_compiler_gnu = yes && echo yes`
2013 ac_test_CFLAGS=${CFLAGS+set}
2014 ac_save_CFLAGS=$CFLAGS
2015 CFLAGS="-g"
2016 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2017 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2018 if test "${ac_cv_prog_cc_g+set}" = set; then
2019   echo $ECHO_N "(cached) $ECHO_C" >&6
2020 else
2021   cat >conftest.$ac_ext <<_ACEOF
2022 /* confdefs.h.  */
2023 _ACEOF
2024 cat confdefs.h >>conftest.$ac_ext
2025 cat >>conftest.$ac_ext <<_ACEOF
2026 /* end confdefs.h.  */
2027
2028 int
2029 main ()
2030 {
2031
2032   ;
2033   return 0;
2034 }
2035 _ACEOF
2036 rm -f conftest.$ac_objext
2037 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2038   (eval $ac_compile) 2>conftest.er1
2039   ac_status=$?
2040   grep -v '^ *+' conftest.er1 >conftest.err
2041   rm -f conftest.er1
2042   cat conftest.err >&5
2043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2044   (exit $ac_status); } &&
2045          { ac_try='test -z "$ac_c_werror_flag"
2046                          || test ! -s conftest.err'
2047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2048   (eval $ac_try) 2>&5
2049   ac_status=$?
2050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2051   (exit $ac_status); }; } &&
2052          { ac_try='test -s conftest.$ac_objext'
2053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2054   (eval $ac_try) 2>&5
2055   ac_status=$?
2056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2057   (exit $ac_status); }; }; then
2058   ac_cv_prog_cc_g=yes
2059 else
2060   echo "$as_me: failed program was:" >&5
2061 sed 's/^/| /' conftest.$ac_ext >&5
2062
2063 ac_cv_prog_cc_g=no
2064 fi
2065 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2066 fi
2067 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2068 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2069 if test "$ac_test_CFLAGS" = set; then
2070   CFLAGS=$ac_save_CFLAGS
2071 elif test $ac_cv_prog_cc_g = yes; then
2072   if test "$GCC" = yes; then
2073     CFLAGS="-g -O2"
2074   else
2075     CFLAGS="-g"
2076   fi
2077 else
2078   if test "$GCC" = yes; then
2079     CFLAGS="-O2"
2080   else
2081     CFLAGS=
2082   fi
2083 fi
2084 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2085 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2086 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2087   echo $ECHO_N "(cached) $ECHO_C" >&6
2088 else
2089   ac_cv_prog_cc_stdc=no
2090 ac_save_CC=$CC
2091 cat >conftest.$ac_ext <<_ACEOF
2092 /* confdefs.h.  */
2093 _ACEOF
2094 cat confdefs.h >>conftest.$ac_ext
2095 cat >>conftest.$ac_ext <<_ACEOF
2096 /* end confdefs.h.  */
2097 #include <stdarg.h>
2098 #include <stdio.h>
2099 #include <sys/types.h>
2100 #include <sys/stat.h>
2101 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2102 struct buf { int x; };
2103 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2104 static char *e (p, i)
2105      char **p;
2106      int i;
2107 {
2108   return p[i];
2109 }
2110 static char *f (char * (*g) (char **, int), char **p, ...)
2111 {
2112   char *s;
2113   va_list v;
2114   va_start (v,p);
2115   s = g (p, va_arg (v,int));
2116   va_end (v);
2117   return s;
2118 }
2119
2120 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2121    function prototypes and stuff, but not '\xHH' hex character constants.
2122    These don't provoke an error unfortunately, instead are silently treated
2123    as 'x'.  The following induces an error, until -std1 is added to get
2124    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2125    array size at least.  It's necessary to write '\x00'==0 to get something
2126    that's true only with -std1.  */
2127 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2128
2129 int test (int i, double x);
2130 struct s1 {int (*f) (int a);};
2131 struct s2 {int (*f) (double a);};
2132 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2133 int argc;
2134 char **argv;
2135 int
2136 main ()
2137 {
2138 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2139   ;
2140   return 0;
2141 }
2142 _ACEOF
2143 # Don't try gcc -ansi; that turns off useful extensions and
2144 # breaks some systems' header files.
2145 # AIX                   -qlanglvl=ansi
2146 # Ultrix and OSF/1      -std1
2147 # HP-UX 10.20 and later -Ae
2148 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2149 # SVR4                  -Xc -D__EXTENSIONS__
2150 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2151 do
2152   CC="$ac_save_CC $ac_arg"
2153   rm -f conftest.$ac_objext
2154 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2155   (eval $ac_compile) 2>conftest.er1
2156   ac_status=$?
2157   grep -v '^ *+' conftest.er1 >conftest.err
2158   rm -f conftest.er1
2159   cat conftest.err >&5
2160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2161   (exit $ac_status); } &&
2162          { ac_try='test -z "$ac_c_werror_flag"
2163                          || test ! -s conftest.err'
2164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2165   (eval $ac_try) 2>&5
2166   ac_status=$?
2167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2168   (exit $ac_status); }; } &&
2169          { ac_try='test -s conftest.$ac_objext'
2170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2171   (eval $ac_try) 2>&5
2172   ac_status=$?
2173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2174   (exit $ac_status); }; }; then
2175   ac_cv_prog_cc_stdc=$ac_arg
2176 break
2177 else
2178   echo "$as_me: failed program was:" >&5
2179 sed 's/^/| /' conftest.$ac_ext >&5
2180
2181 fi
2182 rm -f conftest.err conftest.$ac_objext
2183 done
2184 rm -f conftest.$ac_ext conftest.$ac_objext
2185 CC=$ac_save_CC
2186
2187 fi
2188
2189 case "x$ac_cv_prog_cc_stdc" in
2190   x|xno)
2191     echo "$as_me:$LINENO: result: none needed" >&5
2192 echo "${ECHO_T}none needed" >&6 ;;
2193   *)
2194     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2195 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2196     CC="$CC $ac_cv_prog_cc_stdc" ;;
2197 esac
2198
2199 # Some people use a C++ compiler to compile C.  Since we use `exit',
2200 # in C++ we need to declare it.  In case someone uses the same compiler
2201 # for both compiling C and C++ we need to have the C++ compiler decide
2202 # the declaration of exit, since it's the most demanding environment.
2203 cat >conftest.$ac_ext <<_ACEOF
2204 #ifndef __cplusplus
2205   choke me
2206 #endif
2207 _ACEOF
2208 rm -f conftest.$ac_objext
2209 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2210   (eval $ac_compile) 2>conftest.er1
2211   ac_status=$?
2212   grep -v '^ *+' conftest.er1 >conftest.err
2213   rm -f conftest.er1
2214   cat conftest.err >&5
2215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2216   (exit $ac_status); } &&
2217          { ac_try='test -z "$ac_c_werror_flag"
2218                          || test ! -s conftest.err'
2219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2220   (eval $ac_try) 2>&5
2221   ac_status=$?
2222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2223   (exit $ac_status); }; } &&
2224          { ac_try='test -s conftest.$ac_objext'
2225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2226   (eval $ac_try) 2>&5
2227   ac_status=$?
2228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2229   (exit $ac_status); }; }; then
2230   for ac_declaration in \
2231    '' \
2232    'extern "C" void std::exit (int) throw (); using std::exit;' \
2233    'extern "C" void std::exit (int); using std::exit;' \
2234    'extern "C" void exit (int) throw ();' \
2235    'extern "C" void exit (int);' \
2236    'void exit (int);'
2237 do
2238   cat >conftest.$ac_ext <<_ACEOF
2239 /* confdefs.h.  */
2240 _ACEOF
2241 cat confdefs.h >>conftest.$ac_ext
2242 cat >>conftest.$ac_ext <<_ACEOF
2243 /* end confdefs.h.  */
2244 $ac_declaration
2245 #include <stdlib.h>
2246 int
2247 main ()
2248 {
2249 exit (42);
2250   ;
2251   return 0;
2252 }
2253 _ACEOF
2254 rm -f conftest.$ac_objext
2255 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2256   (eval $ac_compile) 2>conftest.er1
2257   ac_status=$?
2258   grep -v '^ *+' conftest.er1 >conftest.err
2259   rm -f conftest.er1
2260   cat conftest.err >&5
2261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2262   (exit $ac_status); } &&
2263          { ac_try='test -z "$ac_c_werror_flag"
2264                          || test ! -s conftest.err'
2265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2266   (eval $ac_try) 2>&5
2267   ac_status=$?
2268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2269   (exit $ac_status); }; } &&
2270          { ac_try='test -s conftest.$ac_objext'
2271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2272   (eval $ac_try) 2>&5
2273   ac_status=$?
2274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2275   (exit $ac_status); }; }; then
2276   :
2277 else
2278   echo "$as_me: failed program was:" >&5
2279 sed 's/^/| /' conftest.$ac_ext >&5
2280
2281 continue
2282 fi
2283 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2284   cat >conftest.$ac_ext <<_ACEOF
2285 /* confdefs.h.  */
2286 _ACEOF
2287 cat confdefs.h >>conftest.$ac_ext
2288 cat >>conftest.$ac_ext <<_ACEOF
2289 /* end confdefs.h.  */
2290 $ac_declaration
2291 int
2292 main ()
2293 {
2294 exit (42);
2295   ;
2296   return 0;
2297 }
2298 _ACEOF
2299 rm -f conftest.$ac_objext
2300 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2301   (eval $ac_compile) 2>conftest.er1
2302   ac_status=$?
2303   grep -v '^ *+' conftest.er1 >conftest.err
2304   rm -f conftest.er1
2305   cat conftest.err >&5
2306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2307   (exit $ac_status); } &&
2308          { ac_try='test -z "$ac_c_werror_flag"
2309                          || test ! -s conftest.err'
2310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2311   (eval $ac_try) 2>&5
2312   ac_status=$?
2313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2314   (exit $ac_status); }; } &&
2315          { ac_try='test -s conftest.$ac_objext'
2316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2317   (eval $ac_try) 2>&5
2318   ac_status=$?
2319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2320   (exit $ac_status); }; }; then
2321   break
2322 else
2323   echo "$as_me: failed program was:" >&5
2324 sed 's/^/| /' conftest.$ac_ext >&5
2325
2326 fi
2327 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2328 done
2329 rm -f conftest*
2330 if test -n "$ac_declaration"; then
2331   echo '#ifdef __cplusplus' >>confdefs.h
2332   echo $ac_declaration      >>confdefs.h
2333   echo '#endif'             >>confdefs.h
2334 fi
2335
2336 else
2337   echo "$as_me: failed program was:" >&5
2338 sed 's/^/| /' conftest.$ac_ext >&5
2339
2340 fi
2341 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2342 ac_ext=c
2343 ac_cpp='$CPP $CPPFLAGS'
2344 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2345 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2346 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2347
2348
2349 cat >>confdefs.h <<\_ACEOF
2350 #define _GNU_SOURCE 1
2351 _ACEOF
2352
2353
2354
2355 ac_ext=c
2356 ac_cpp='$CPP $CPPFLAGS'
2357 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2358 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2359 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2360 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2361 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2362 # On Suns, sometimes $CPP names a directory.
2363 if test -n "$CPP" && test -d "$CPP"; then
2364   CPP=
2365 fi
2366 if test -z "$CPP"; then
2367   if test "${ac_cv_prog_CPP+set}" = set; then
2368   echo $ECHO_N "(cached) $ECHO_C" >&6
2369 else
2370       # Double quotes because CPP needs to be expanded
2371     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2372     do
2373       ac_preproc_ok=false
2374 for ac_c_preproc_warn_flag in '' yes
2375 do
2376   # Use a header file that comes with gcc, so configuring glibc
2377   # with a fresh cross-compiler works.
2378   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2379   # <limits.h> exists even on freestanding compilers.
2380   # On the NeXT, cc -E runs the code through the compiler's parser,
2381   # not just through cpp. "Syntax error" is here to catch this case.
2382   cat >conftest.$ac_ext <<_ACEOF
2383 /* confdefs.h.  */
2384 _ACEOF
2385 cat confdefs.h >>conftest.$ac_ext
2386 cat >>conftest.$ac_ext <<_ACEOF
2387 /* end confdefs.h.  */
2388 #ifdef __STDC__
2389 # include <limits.h>
2390 #else
2391 # include <assert.h>
2392 #endif
2393                      Syntax error
2394 _ACEOF
2395 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2396   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2397   ac_status=$?
2398   grep -v '^ *+' conftest.er1 >conftest.err
2399   rm -f conftest.er1
2400   cat conftest.err >&5
2401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2402   (exit $ac_status); } >/dev/null; then
2403   if test -s conftest.err; then
2404     ac_cpp_err=$ac_c_preproc_warn_flag
2405     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2406   else
2407     ac_cpp_err=
2408   fi
2409 else
2410   ac_cpp_err=yes
2411 fi
2412 if test -z "$ac_cpp_err"; then
2413   :
2414 else
2415   echo "$as_me: failed program was:" >&5
2416 sed 's/^/| /' conftest.$ac_ext >&5
2417
2418   # Broken: fails on valid input.
2419 continue
2420 fi
2421 rm -f conftest.err conftest.$ac_ext
2422
2423   # OK, works on sane cases.  Now check whether non-existent headers
2424   # can be detected and how.
2425   cat >conftest.$ac_ext <<_ACEOF
2426 /* confdefs.h.  */
2427 _ACEOF
2428 cat confdefs.h >>conftest.$ac_ext
2429 cat >>conftest.$ac_ext <<_ACEOF
2430 /* end confdefs.h.  */
2431 #include <ac_nonexistent.h>
2432 _ACEOF
2433 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2434   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2435   ac_status=$?
2436   grep -v '^ *+' conftest.er1 >conftest.err
2437   rm -f conftest.er1
2438   cat conftest.err >&5
2439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2440   (exit $ac_status); } >/dev/null; then
2441   if test -s conftest.err; then
2442     ac_cpp_err=$ac_c_preproc_warn_flag
2443     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2444   else
2445     ac_cpp_err=
2446   fi
2447 else
2448   ac_cpp_err=yes
2449 fi
2450 if test -z "$ac_cpp_err"; then
2451   # Broken: success on invalid input.
2452 continue
2453 else
2454   echo "$as_me: failed program was:" >&5
2455 sed 's/^/| /' conftest.$ac_ext >&5
2456
2457   # Passes both tests.
2458 ac_preproc_ok=:
2459 break
2460 fi
2461 rm -f conftest.err conftest.$ac_ext
2462
2463 done
2464 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2465 rm -f conftest.err conftest.$ac_ext
2466 if $ac_preproc_ok; then
2467   break
2468 fi
2469
2470     done
2471     ac_cv_prog_CPP=$CPP
2472
2473 fi
2474   CPP=$ac_cv_prog_CPP
2475 else
2476   ac_cv_prog_CPP=$CPP
2477 fi
2478 echo "$as_me:$LINENO: result: $CPP" >&5
2479 echo "${ECHO_T}$CPP" >&6
2480 ac_preproc_ok=false
2481 for ac_c_preproc_warn_flag in '' yes
2482 do
2483   # Use a header file that comes with gcc, so configuring glibc
2484   # with a fresh cross-compiler works.
2485   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2486   # <limits.h> exists even on freestanding compilers.
2487   # On the NeXT, cc -E runs the code through the compiler's parser,
2488   # not just through cpp. "Syntax error" is here to catch this case.
2489   cat >conftest.$ac_ext <<_ACEOF
2490 /* confdefs.h.  */
2491 _ACEOF
2492 cat confdefs.h >>conftest.$ac_ext
2493 cat >>conftest.$ac_ext <<_ACEOF
2494 /* end confdefs.h.  */
2495 #ifdef __STDC__
2496 # include <limits.h>
2497 #else
2498 # include <assert.h>
2499 #endif
2500                      Syntax error
2501 _ACEOF
2502 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2503   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2504   ac_status=$?
2505   grep -v '^ *+' conftest.er1 >conftest.err
2506   rm -f conftest.er1
2507   cat conftest.err >&5
2508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2509   (exit $ac_status); } >/dev/null; then
2510   if test -s conftest.err; then
2511     ac_cpp_err=$ac_c_preproc_warn_flag
2512     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2513   else
2514     ac_cpp_err=
2515   fi
2516 else
2517   ac_cpp_err=yes
2518 fi
2519 if test -z "$ac_cpp_err"; then
2520   :
2521 else
2522   echo "$as_me: failed program was:" >&5
2523 sed 's/^/| /' conftest.$ac_ext >&5
2524
2525   # Broken: fails on valid input.
2526 continue
2527 fi
2528 rm -f conftest.err conftest.$ac_ext
2529
2530   # OK, works on sane cases.  Now check whether non-existent headers
2531   # can be detected and how.
2532   cat >conftest.$ac_ext <<_ACEOF
2533 /* confdefs.h.  */
2534 _ACEOF
2535 cat confdefs.h >>conftest.$ac_ext
2536 cat >>conftest.$ac_ext <<_ACEOF
2537 /* end confdefs.h.  */
2538 #include <ac_nonexistent.h>
2539 _ACEOF
2540 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2541   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2542   ac_status=$?
2543   grep -v '^ *+' conftest.er1 >conftest.err
2544   rm -f conftest.er1
2545   cat conftest.err >&5
2546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2547   (exit $ac_status); } >/dev/null; then
2548   if test -s conftest.err; then
2549     ac_cpp_err=$ac_c_preproc_warn_flag
2550     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2551   else
2552     ac_cpp_err=
2553   fi
2554 else
2555   ac_cpp_err=yes
2556 fi
2557 if test -z "$ac_cpp_err"; then
2558   # Broken: success on invalid input.
2559 continue
2560 else
2561   echo "$as_me: failed program was:" >&5
2562 sed 's/^/| /' conftest.$ac_ext >&5
2563
2564   # Passes both tests.
2565 ac_preproc_ok=:
2566 break
2567 fi
2568 rm -f conftest.err conftest.$ac_ext
2569
2570 done
2571 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2572 rm -f conftest.err conftest.$ac_ext
2573 if $ac_preproc_ok; then
2574   :
2575 else
2576   { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2577 echo "$as_me: error: in \`$ac_pwd':" >&2;}
2578 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2579 See \`config.log' for more details." >&5
2580 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2581 See \`config.log' for more details." >&2;}
2582    { (exit 1); exit 1; }; }; }
2583 fi
2584
2585 ac_ext=c
2586 ac_cpp='$CPP $CPPFLAGS'
2587 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2588 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2589 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2590
2591
2592 echo "$as_me:$LINENO: checking for egrep" >&5
2593 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2594 if test "${ac_cv_prog_egrep+set}" = set; then
2595   echo $ECHO_N "(cached) $ECHO_C" >&6
2596 else
2597   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2598     then ac_cv_prog_egrep='grep -E'
2599     else ac_cv_prog_egrep='egrep'
2600     fi
2601 fi
2602 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2603 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2604  EGREP=$ac_cv_prog_egrep
2605
2606
2607
2608 echo "$as_me:$LINENO: checking for AIX" >&5
2609 echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2610 cat >conftest.$ac_ext <<_ACEOF
2611 /* confdefs.h.  */
2612 _ACEOF
2613 cat confdefs.h >>conftest.$ac_ext
2614 cat >>conftest.$ac_ext <<_ACEOF
2615 /* end confdefs.h.  */
2616 #ifdef _AIX
2617   yes
2618 #endif
2619
2620 _ACEOF
2621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2622   $EGREP "yes" >/dev/null 2>&1; then
2623   echo "$as_me:$LINENO: result: yes" >&5
2624 echo "${ECHO_T}yes" >&6
2625 cat >>confdefs.h <<\_ACEOF
2626 #define _ALL_SOURCE 1
2627 _ACEOF
2628
2629 else
2630   echo "$as_me:$LINENO: result: no" >&5
2631 echo "${ECHO_T}no" >&6
2632 fi
2633 rm -f conftest*
2634
2635
2636 echo "$as_me:$LINENO: checking for library containing strerror" >&5
2637 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
2638 if test "${ac_cv_search_strerror+set}" = set; then
2639   echo $ECHO_N "(cached) $ECHO_C" >&6
2640 else
2641   ac_func_search_save_LIBS=$LIBS
2642 ac_cv_search_strerror=no
2643 cat >conftest.$ac_ext <<_ACEOF
2644 /* confdefs.h.  */
2645 _ACEOF
2646 cat confdefs.h >>conftest.$ac_ext
2647 cat >>conftest.$ac_ext <<_ACEOF
2648 /* end confdefs.h.  */
2649
2650 /* Override any gcc2 internal prototype to avoid an error.  */
2651 #ifdef __cplusplus
2652 extern "C"
2653 #endif
2654 /* We use char because int might match the return type of a gcc2
2655    builtin and then its argument prototype would still apply.  */
2656 char strerror ();
2657 int
2658 main ()
2659 {
2660 strerror ();
2661   ;
2662   return 0;
2663 }
2664 _ACEOF
2665 rm -f conftest.$ac_objext conftest$ac_exeext
2666 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2667   (eval $ac_link) 2>conftest.er1
2668   ac_status=$?
2669   grep -v '^ *+' conftest.er1 >conftest.err
2670   rm -f conftest.er1
2671   cat conftest.err >&5
2672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2673   (exit $ac_status); } &&
2674          { ac_try='test -z "$ac_c_werror_flag"
2675                          || test ! -s conftest.err'
2676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2677   (eval $ac_try) 2>&5
2678   ac_status=$?
2679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2680   (exit $ac_status); }; } &&
2681          { ac_try='test -s conftest$ac_exeext'
2682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2683   (eval $ac_try) 2>&5
2684   ac_status=$?
2685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2686   (exit $ac_status); }; }; then
2687   ac_cv_search_strerror="none required"
2688 else
2689   echo "$as_me: failed program was:" >&5
2690 sed 's/^/| /' conftest.$ac_ext >&5
2691
2692 fi
2693 rm -f conftest.err conftest.$ac_objext \
2694       conftest$ac_exeext conftest.$ac_ext
2695 if test "$ac_cv_search_strerror" = no; then
2696   for ac_lib in cposix; do
2697     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
2698     cat >conftest.$ac_ext <<_ACEOF
2699 /* confdefs.h.  */
2700 _ACEOF
2701 cat confdefs.h >>conftest.$ac_ext
2702 cat >>conftest.$ac_ext <<_ACEOF
2703 /* end confdefs.h.  */
2704
2705 /* Override any gcc2 internal prototype to avoid an error.  */
2706 #ifdef __cplusplus
2707 extern "C"
2708 #endif
2709 /* We use char because int might match the return type of a gcc2
2710    builtin and then its argument prototype would still apply.  */
2711 char strerror ();
2712 int
2713 main ()
2714 {
2715 strerror ();
2716   ;
2717   return 0;
2718 }
2719 _ACEOF
2720 rm -f conftest.$ac_objext conftest$ac_exeext
2721 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2722   (eval $ac_link) 2>conftest.er1
2723   ac_status=$?
2724   grep -v '^ *+' conftest.er1 >conftest.err
2725   rm -f conftest.er1
2726   cat conftest.err >&5
2727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2728   (exit $ac_status); } &&
2729          { ac_try='test -z "$ac_c_werror_flag"
2730                          || test ! -s conftest.err'
2731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2732   (eval $ac_try) 2>&5
2733   ac_status=$?
2734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2735   (exit $ac_status); }; } &&
2736          { ac_try='test -s conftest$ac_exeext'
2737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2738   (eval $ac_try) 2>&5
2739   ac_status=$?
2740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2741   (exit $ac_status); }; }; then
2742   ac_cv_search_strerror="-l$ac_lib"
2743 break
2744 else
2745   echo "$as_me: failed program was:" >&5
2746 sed 's/^/| /' conftest.$ac_ext >&5
2747
2748 fi
2749 rm -f conftest.err conftest.$ac_objext \
2750       conftest$ac_exeext conftest.$ac_ext
2751   done
2752 fi
2753 LIBS=$ac_func_search_save_LIBS
2754 fi
2755 echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
2756 echo "${ECHO_T}$ac_cv_search_strerror" >&6
2757 if test "$ac_cv_search_strerror" != no; then
2758   test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
2759
2760 fi
2761
2762 if test -n "$ac_tool_prefix"; then
2763   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2764 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2765 echo "$as_me:$LINENO: checking for $ac_word" >&5
2766 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2767 if test "${ac_cv_prog_RANLIB+set}" = set; then
2768   echo $ECHO_N "(cached) $ECHO_C" >&6
2769 else
2770   if test -n "$RANLIB"; then
2771   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2772 else
2773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2774 for as_dir in $PATH
2775 do
2776   IFS=$as_save_IFS
2777   test -z "$as_dir" && as_dir=.
2778   for ac_exec_ext in '' $ac_executable_extensions; do
2779   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2780     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2781     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2782     break 2
2783   fi
2784 done
2785 done
2786
2787 fi
2788 fi
2789 RANLIB=$ac_cv_prog_RANLIB
2790 if test -n "$RANLIB"; then
2791   echo "$as_me:$LINENO: result: $RANLIB" >&5
2792 echo "${ECHO_T}$RANLIB" >&6
2793 else
2794   echo "$as_me:$LINENO: result: no" >&5
2795 echo "${ECHO_T}no" >&6
2796 fi
2797
2798 fi
2799 if test -z "$ac_cv_prog_RANLIB"; then
2800   ac_ct_RANLIB=$RANLIB
2801   # Extract the first word of "ranlib", so it can be a program name with args.
2802 set dummy ranlib; ac_word=$2
2803 echo "$as_me:$LINENO: checking for $ac_word" >&5
2804 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2805 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2806   echo $ECHO_N "(cached) $ECHO_C" >&6
2807 else
2808   if test -n "$ac_ct_RANLIB"; then
2809   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2810 else
2811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2812 for as_dir in $PATH
2813 do
2814   IFS=$as_save_IFS
2815   test -z "$as_dir" && as_dir=.
2816   for ac_exec_ext in '' $ac_executable_extensions; do
2817   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2818     ac_cv_prog_ac_ct_RANLIB="ranlib"
2819     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2820     break 2
2821   fi
2822 done
2823 done
2824
2825   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2826 fi
2827 fi
2828 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2829 if test -n "$ac_ct_RANLIB"; then
2830   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2831 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2832 else
2833   echo "$as_me:$LINENO: result: no" >&5
2834 echo "${ECHO_T}no" >&6
2835 fi
2836
2837   RANLIB=$ac_ct_RANLIB
2838 else
2839   RANLIB="$ac_cv_prog_RANLIB"
2840 fi
2841
2842 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2843 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2844 if test "${ac_cv_header_stdc+set}" = set; then
2845   echo $ECHO_N "(cached) $ECHO_C" >&6
2846 else
2847   cat >conftest.$ac_ext <<_ACEOF
2848 /* confdefs.h.  */
2849 _ACEOF
2850 cat confdefs.h >>conftest.$ac_ext
2851 cat >>conftest.$ac_ext <<_ACEOF
2852 /* end confdefs.h.  */
2853 #include <stdlib.h>
2854 #include <stdarg.h>
2855 #include <string.h>
2856 #include <float.h>
2857
2858 int
2859 main ()
2860 {
2861
2862   ;
2863   return 0;
2864 }
2865 _ACEOF
2866 rm -f conftest.$ac_objext
2867 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2868   (eval $ac_compile) 2>conftest.er1
2869   ac_status=$?
2870   grep -v '^ *+' conftest.er1 >conftest.err
2871   rm -f conftest.er1
2872   cat conftest.err >&5
2873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2874   (exit $ac_status); } &&
2875          { ac_try='test -z "$ac_c_werror_flag"
2876                          || test ! -s conftest.err'
2877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2878   (eval $ac_try) 2>&5
2879   ac_status=$?
2880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2881   (exit $ac_status); }; } &&
2882          { ac_try='test -s conftest.$ac_objext'
2883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2884   (eval $ac_try) 2>&5
2885   ac_status=$?
2886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2887   (exit $ac_status); }; }; then
2888   ac_cv_header_stdc=yes
2889 else
2890   echo "$as_me: failed program was:" >&5
2891 sed 's/^/| /' conftest.$ac_ext >&5
2892
2893 ac_cv_header_stdc=no
2894 fi
2895 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2896
2897 if test $ac_cv_header_stdc = yes; then
2898   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2899   cat >conftest.$ac_ext <<_ACEOF
2900 /* confdefs.h.  */
2901 _ACEOF
2902 cat confdefs.h >>conftest.$ac_ext
2903 cat >>conftest.$ac_ext <<_ACEOF
2904 /* end confdefs.h.  */
2905 #include <string.h>
2906
2907 _ACEOF
2908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2909   $EGREP "memchr" >/dev/null 2>&1; then
2910   :
2911 else
2912   ac_cv_header_stdc=no
2913 fi
2914 rm -f conftest*
2915
2916 fi
2917
2918 if test $ac_cv_header_stdc = yes; then
2919   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2920   cat >conftest.$ac_ext <<_ACEOF
2921 /* confdefs.h.  */
2922 _ACEOF
2923 cat confdefs.h >>conftest.$ac_ext
2924 cat >>conftest.$ac_ext <<_ACEOF
2925 /* end confdefs.h.  */
2926 #include <stdlib.h>
2927
2928 _ACEOF
2929 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2930   $EGREP "free" >/dev/null 2>&1; then
2931   :
2932 else
2933   ac_cv_header_stdc=no
2934 fi
2935 rm -f conftest*
2936
2937 fi
2938
2939 if test $ac_cv_header_stdc = yes; then
2940   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2941   if test "$cross_compiling" = yes; then
2942   :
2943 else
2944   cat >conftest.$ac_ext <<_ACEOF
2945 /* confdefs.h.  */
2946 _ACEOF
2947 cat confdefs.h >>conftest.$ac_ext
2948 cat >>conftest.$ac_ext <<_ACEOF
2949 /* end confdefs.h.  */
2950 #include <ctype.h>
2951 #if ((' ' & 0x0FF) == 0x020)
2952 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2953 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2954 #else
2955 # define ISLOWER(c) \
2956                    (('a' <= (c) && (c) <= 'i') \
2957                      || ('j' <= (c) && (c) <= 'r') \
2958                      || ('s' <= (c) && (c) <= 'z'))
2959 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2960 #endif
2961
2962 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2963 int
2964 main ()
2965 {
2966   int i;
2967   for (i = 0; i < 256; i++)
2968     if (XOR (islower (i), ISLOWER (i))
2969         || toupper (i) != TOUPPER (i))
2970       exit(2);
2971   exit (0);
2972 }
2973 _ACEOF
2974 rm -f conftest$ac_exeext
2975 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2976   (eval $ac_link) 2>&5
2977   ac_status=$?
2978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2979   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2981   (eval $ac_try) 2>&5
2982   ac_status=$?
2983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2984   (exit $ac_status); }; }; then
2985   :
2986 else
2987   echo "$as_me: program exited with status $ac_status" >&5
2988 echo "$as_me: failed program was:" >&5
2989 sed 's/^/| /' conftest.$ac_ext >&5
2990
2991 ( exit $ac_status )
2992 ac_cv_header_stdc=no
2993 fi
2994 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2995 fi
2996 fi
2997 fi
2998 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2999 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3000 if test $ac_cv_header_stdc = yes; then
3001
3002 cat >>confdefs.h <<\_ACEOF
3003 #define STDC_HEADERS 1
3004 _ACEOF
3005
3006 fi
3007
3008 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3019                   inttypes.h stdint.h unistd.h
3020 do
3021 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3022 echo "$as_me:$LINENO: checking for $ac_header" >&5
3023 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3024 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3025   echo $ECHO_N "(cached) $ECHO_C" >&6
3026 else
3027   cat >conftest.$ac_ext <<_ACEOF
3028 /* confdefs.h.  */
3029 _ACEOF
3030 cat confdefs.h >>conftest.$ac_ext
3031 cat >>conftest.$ac_ext <<_ACEOF
3032 /* end confdefs.h.  */
3033 $ac_includes_default
3034
3035 #include <$ac_header>
3036 _ACEOF
3037 rm -f conftest.$ac_objext
3038 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3039   (eval $ac_compile) 2>conftest.er1
3040   ac_status=$?
3041   grep -v '^ *+' conftest.er1 >conftest.err
3042   rm -f conftest.er1
3043   cat conftest.err >&5
3044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3045   (exit $ac_status); } &&
3046          { ac_try='test -z "$ac_c_werror_flag"
3047                          || test ! -s conftest.err'
3048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3049   (eval $ac_try) 2>&5
3050   ac_status=$?
3051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3052   (exit $ac_status); }; } &&
3053          { ac_try='test -s conftest.$ac_objext'
3054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3055   (eval $ac_try) 2>&5
3056   ac_status=$?
3057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3058   (exit $ac_status); }; }; then
3059   eval "$as_ac_Header=yes"
3060 else
3061   echo "$as_me: failed program was:" >&5
3062 sed 's/^/| /' conftest.$ac_ext >&5
3063
3064 eval "$as_ac_Header=no"
3065 fi
3066 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3067 fi
3068 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3069 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3070 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3071   cat >>confdefs.h <<_ACEOF
3072 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3073 _ACEOF
3074
3075 fi
3076
3077 done
3078
3079
3080
3081   if test "${ac_cv_header_minix_config_h+set}" = set; then
3082   echo "$as_me:$LINENO: checking for minix/config.h" >&5
3083 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3084 if test "${ac_cv_header_minix_config_h+set}" = set; then
3085   echo $ECHO_N "(cached) $ECHO_C" >&6
3086 fi
3087 echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3088 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3089 else
3090   # Is the header compilable?
3091 echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3092 echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3093 cat >conftest.$ac_ext <<_ACEOF
3094 /* confdefs.h.  */
3095 _ACEOF
3096 cat confdefs.h >>conftest.$ac_ext
3097 cat >>conftest.$ac_ext <<_ACEOF
3098 /* end confdefs.h.  */
3099 $ac_includes_default
3100 #include <minix/config.h>
3101 _ACEOF
3102 rm -f conftest.$ac_objext
3103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3104   (eval $ac_compile) 2>conftest.er1
3105   ac_status=$?
3106   grep -v '^ *+' conftest.er1 >conftest.err
3107   rm -f conftest.er1
3108   cat conftest.err >&5
3109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3110   (exit $ac_status); } &&
3111          { ac_try='test -z "$ac_c_werror_flag"
3112                          || test ! -s conftest.err'
3113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3114   (eval $ac_try) 2>&5
3115   ac_status=$?
3116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3117   (exit $ac_status); }; } &&
3118          { ac_try='test -s conftest.$ac_objext'
3119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3120   (eval $ac_try) 2>&5
3121   ac_status=$?
3122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3123   (exit $ac_status); }; }; then
3124   ac_header_compiler=yes
3125 else
3126   echo "$as_me: failed program was:" >&5
3127 sed 's/^/| /' conftest.$ac_ext >&5
3128
3129 ac_header_compiler=no
3130 fi
3131 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3132 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3133 echo "${ECHO_T}$ac_header_compiler" >&6
3134
3135 # Is the header present?
3136 echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3137 echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3138 cat >conftest.$ac_ext <<_ACEOF
3139 /* confdefs.h.  */
3140 _ACEOF
3141 cat confdefs.h >>conftest.$ac_ext
3142 cat >>conftest.$ac_ext <<_ACEOF
3143 /* end confdefs.h.  */
3144 #include <minix/config.h>
3145 _ACEOF
3146 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3147   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3148   ac_status=$?
3149   grep -v '^ *+' conftest.er1 >conftest.err
3150   rm -f conftest.er1
3151   cat conftest.err >&5
3152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3153   (exit $ac_status); } >/dev/null; then
3154   if test -s conftest.err; then
3155     ac_cpp_err=$ac_c_preproc_warn_flag
3156     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3157   else
3158     ac_cpp_err=
3159   fi
3160 else
3161   ac_cpp_err=yes
3162 fi
3163 if test -z "$ac_cpp_err"; then
3164   ac_header_preproc=yes
3165 else
3166   echo "$as_me: failed program was:" >&5
3167 sed 's/^/| /' conftest.$ac_ext >&5
3168
3169   ac_header_preproc=no
3170 fi
3171 rm -f conftest.err conftest.$ac_ext
3172 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3173 echo "${ECHO_T}$ac_header_preproc" >&6
3174
3175 # So?  What about this header?
3176 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3177   yes:no: )
3178     { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3179 echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3180     { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
3181 echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
3182     ac_header_preproc=yes
3183     ;;
3184   no:yes:* )
3185     { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3186 echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3187     { echo "$as_me:$LINENO: WARNING: minix/config.h:     check for missing prerequisite headers?" >&5
3188 echo "$as_me: WARNING: minix/config.h:     check for missing prerequisite headers?" >&2;}
3189     { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
3190 echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
3191     { echo "$as_me:$LINENO: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&5
3192 echo "$as_me: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3193     { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3194 echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3195     { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
3196 echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
3197     (
3198       cat <<\_ASBOX
3199 ## ------------------------------------------ ##
3200 ## Report this to the AC_PACKAGE_NAME lists.  ##
3201 ## ------------------------------------------ ##
3202 _ASBOX
3203     ) |
3204       sed "s/^/$as_me: WARNING:     /" >&2
3205     ;;
3206 esac
3207 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3208 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3209 if test "${ac_cv_header_minix_config_h+set}" = set; then
3210   echo $ECHO_N "(cached) $ECHO_C" >&6
3211 else
3212   ac_cv_header_minix_config_h=$ac_header_preproc
3213 fi
3214 echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3215 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3216
3217 fi
3218 if test $ac_cv_header_minix_config_h = yes; then
3219   MINIX=yes
3220 else
3221   MINIX=
3222 fi
3223
3224
3225   if test "$MINIX" = yes; then
3226
3227 cat >>confdefs.h <<\_ACEOF
3228 #define _POSIX_SOURCE 1
3229 _ACEOF
3230
3231
3232 cat >>confdefs.h <<\_ACEOF
3233 #define _POSIX_1_SOURCE 2
3234 _ACEOF
3235
3236
3237 cat >>confdefs.h <<\_ACEOF
3238 #define _MINIX 1
3239 _ACEOF
3240
3241   fi
3242
3243
3244
3245   echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
3246 echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
3247 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
3248   echo $ECHO_N "(cached) $ECHO_C" >&6
3249 else
3250   cat >conftest.$ac_ext <<_ACEOF
3251 /* confdefs.h.  */
3252 _ACEOF
3253 cat confdefs.h >>conftest.$ac_ext
3254 cat >>conftest.$ac_ext <<_ACEOF
3255 /* end confdefs.h.  */
3256
3257 #         define __EXTENSIONS__ 1
3258           $ac_includes_default
3259 int
3260 main ()
3261 {
3262
3263   ;
3264   return 0;
3265 }
3266 _ACEOF
3267 rm -f conftest.$ac_objext
3268 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3269   (eval $ac_compile) 2>conftest.er1
3270   ac_status=$?
3271   grep -v '^ *+' conftest.er1 >conftest.err
3272   rm -f conftest.er1
3273   cat conftest.err >&5
3274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3275   (exit $ac_status); } &&
3276          { ac_try='test -z "$ac_c_werror_flag"
3277                          || test ! -s conftest.err'
3278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3279   (eval $ac_try) 2>&5
3280   ac_status=$?
3281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3282   (exit $ac_status); }; } &&
3283          { ac_try='test -s conftest.$ac_objext'
3284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3285   (eval $ac_try) 2>&5
3286   ac_status=$?
3287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3288   (exit $ac_status); }; }; then
3289   ac_cv_safe_to_define___extensions__=yes
3290 else
3291   echo "$as_me: failed program was:" >&5
3292 sed 's/^/| /' conftest.$ac_ext >&5
3293
3294 ac_cv_safe_to_define___extensions__=no
3295 fi
3296 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3297 fi
3298 echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
3299 echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
3300   test $ac_cv_safe_to_define___extensions__ = yes &&
3301     cat >>confdefs.h <<\_ACEOF
3302 #define __EXTENSIONS__ 1
3303 _ACEOF
3304
3305   cat >>confdefs.h <<\_ACEOF
3306 #define _ALL_SOURCE 1
3307 _ACEOF
3308
3309   cat >>confdefs.h <<\_ACEOF
3310 #define _GNU_SOURCE 1
3311 _ACEOF
3312
3313   cat >>confdefs.h <<\_ACEOF
3314 #define _POSIX_PTHREAD_SEMANTICS 1
3315 _ACEOF
3316
3317   cat >>confdefs.h <<\_ACEOF
3318 #define _TANDEM_SOURCE 1
3319 _ACEOF
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330 echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5
3331 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
3332 if test "${am_cv_prog_cc_stdc+set}" = set; then
3333   echo $ECHO_N "(cached) $ECHO_C" >&6
3334 else
3335   am_cv_prog_cc_stdc=no
3336 ac_save_CC="$CC"
3337 # Don't try gcc -ansi; that turns off useful extensions and
3338 # breaks some systems' header files.
3339 # AIX                   -qlanglvl=ansi
3340 # Ultrix and OSF/1      -std1
3341 # HP-UX 10.20 and later -Ae
3342 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3343 # SVR4                  -Xc -D__EXTENSIONS__
3344 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3345 do
3346   CC="$ac_save_CC $ac_arg"
3347   cat >conftest.$ac_ext <<_ACEOF
3348 /* confdefs.h.  */
3349 _ACEOF
3350 cat confdefs.h >>conftest.$ac_ext
3351 cat >>conftest.$ac_ext <<_ACEOF
3352 /* end confdefs.h.  */
3353 #include <stdarg.h>
3354 #include <stdio.h>
3355 #include <sys/types.h>
3356 #include <sys/stat.h>
3357 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3358 struct buf { int x; };
3359 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3360 static char *e (p, i)
3361      char **p;
3362      int i;
3363 {
3364   return p[i];
3365 }
3366 static char *f (char * (*g) (char **, int), char **p, ...)
3367 {
3368   char *s;
3369   va_list v;
3370   va_start (v,p);
3371   s = g (p, va_arg (v,int));
3372   va_end (v);
3373   return s;
3374 }
3375 int test (int i, double x);
3376 struct s1 {int (*f) (int a);};
3377 struct s2 {int (*f) (double a);};
3378 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3379 int argc;
3380 char **argv;
3381
3382 int
3383 main ()
3384 {
3385
3386 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3387
3388   ;
3389   return 0;
3390 }
3391 _ACEOF
3392 rm -f conftest.$ac_objext
3393 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3394   (eval $ac_compile) 2>conftest.er1
3395   ac_status=$?
3396   grep -v '^ *+' conftest.er1 >conftest.err
3397   rm -f conftest.er1
3398   cat conftest.err >&5
3399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3400   (exit $ac_status); } &&
3401          { ac_try='test -z "$ac_c_werror_flag"
3402                          || test ! -s conftest.err'
3403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3404   (eval $ac_try) 2>&5
3405   ac_status=$?
3406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3407   (exit $ac_status); }; } &&
3408          { ac_try='test -s conftest.$ac_objext'
3409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3410   (eval $ac_try) 2>&5
3411   ac_status=$?
3412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3413   (exit $ac_status); }; }; then
3414   am_cv_prog_cc_stdc="$ac_arg"; break
3415 else
3416   echo "$as_me: failed program was:" >&5
3417 sed 's/^/| /' conftest.$ac_ext >&5
3418
3419 fi
3420 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3421 done
3422 CC="$ac_save_CC"
3423
3424 fi
3425
3426 if test -z "$am_cv_prog_cc_stdc"; then
3427   echo "$as_me:$LINENO: result: none needed" >&5
3428 echo "${ECHO_T}none needed" >&6
3429 else
3430   echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5
3431 echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6
3432 fi
3433 case "x$am_cv_prog_cc_stdc" in
3434   x|xno) ;;
3435   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3436 esac
3437
3438
3439 ac_aux_dir=
3440 for ac_dir in .. $srcdir/..; do
3441   if test -f $ac_dir/install-sh; then
3442     ac_aux_dir=$ac_dir
3443     ac_install_sh="$ac_aux_dir/install-sh -c"
3444     break
3445   elif test -f $ac_dir/install.sh; then
3446     ac_aux_dir=$ac_dir
3447     ac_install_sh="$ac_aux_dir/install.sh -c"
3448     break
3449   elif test -f $ac_dir/shtool; then
3450     ac_aux_dir=$ac_dir
3451     ac_install_sh="$ac_aux_dir/shtool install -c"
3452     break
3453   fi
3454 done
3455 if test -z "$ac_aux_dir"; then
3456   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5
3457 echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;}
3458    { (exit 1); exit 1; }; }
3459 fi
3460 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3461 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3462 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
3463
3464 # Make sure we can run config.sub.
3465 $ac_config_sub sun4 >/dev/null 2>&1 ||
3466   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
3467 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
3468    { (exit 1); exit 1; }; }
3469
3470 echo "$as_me:$LINENO: checking build system type" >&5
3471 echo $ECHO_N "checking build system type... $ECHO_C" >&6
3472 if test "${ac_cv_build+set}" = set; then
3473   echo $ECHO_N "(cached) $ECHO_C" >&6
3474 else
3475   ac_cv_build_alias=$build_alias
3476 test -z "$ac_cv_build_alias" &&
3477   ac_cv_build_alias=`$ac_config_guess`
3478 test -z "$ac_cv_build_alias" &&
3479   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
3480 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
3481    { (exit 1); exit 1; }; }
3482 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
3483   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
3484 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
3485    { (exit 1); exit 1; }; }
3486
3487 fi
3488 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
3489 echo "${ECHO_T}$ac_cv_build" >&6
3490 build=$ac_cv_build
3491 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3492 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3493 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3494
3495
3496 echo "$as_me:$LINENO: checking host system type" >&5
3497 echo $ECHO_N "checking host system type... $ECHO_C" >&6
3498 if test "${ac_cv_host+set}" = set; then
3499   echo $ECHO_N "(cached) $ECHO_C" >&6
3500 else
3501   ac_cv_host_alias=$host_alias
3502 test -z "$ac_cv_host_alias" &&
3503   ac_cv_host_alias=$ac_cv_build_alias
3504 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
3505   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
3506 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
3507    { (exit 1); exit 1; }; }
3508
3509 fi
3510 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
3511 echo "${ECHO_T}$ac_cv_host" >&6
3512 host=$ac_cv_host
3513 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3514 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3515 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3516
3517
3518 echo "$as_me:$LINENO: checking target system type" >&5
3519 echo $ECHO_N "checking target system type... $ECHO_C" >&6
3520 if test "${ac_cv_target+set}" = set; then
3521   echo $ECHO_N "(cached) $ECHO_C" >&6
3522 else
3523   ac_cv_target_alias=$target_alias
3524 test "x$ac_cv_target_alias" = "x" &&
3525   ac_cv_target_alias=$ac_cv_host_alias
3526 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
3527   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
3528 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
3529    { (exit 1); exit 1; }; }
3530
3531 fi
3532 echo "$as_me:$LINENO: result: $ac_cv_target" >&5
3533 echo "${ECHO_T}$ac_cv_target" >&6
3534 target=$ac_cv_target
3535 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3536 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3537 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3538
3539
3540 # The aliases save the names the user supplied, while $host etc.
3541 # will get canonicalized.
3542 test -n "$target_alias" &&
3543   test "$program_prefix$program_suffix$program_transform_name" = \
3544     NONENONEs,x,x, &&
3545   program_prefix=${target_alias}-
3546
3547 # Dependency checking.
3548 rm -rf .tst 2>/dev/null
3549 mkdir .tst 2>/dev/null
3550 if test -d .tst; then
3551   am__leading_dot=.
3552 else
3553   am__leading_dot=_
3554 fi
3555 rmdir .tst 2>/dev/null
3556
3557 DEPDIR="${am__leading_dot}deps"
3558
3559           ac_config_commands="$ac_config_commands depdir"
3560
3561
3562 depcc="$CC"   am_compiler_list=
3563
3564 am_depcomp=$ac_aux_dir/depcomp
3565 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
3566 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
3567 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
3568   echo $ECHO_N "(cached) $ECHO_C" >&6
3569 else
3570   if test -f "$am_depcomp"; then
3571   # We make a subdir and do the tests there.  Otherwise we can end up
3572   # making bogus files that we don't know about and never remove.  For
3573   # instance it was reported that on HP-UX the gcc test will end up
3574   # making a dummy file named `D' -- because `-MD' means `put the output
3575   # in D'.
3576   mkdir conftest.dir
3577   # Copy depcomp to subdir because otherwise we won't find it if we're
3578   # using a relative directory.
3579   cp "$am_depcomp" conftest.dir
3580   cd conftest.dir
3581   # We will build objects and dependencies in a subdirectory because
3582   # it helps to detect inapplicable dependency modes.  For instance
3583   # both Tru64's cc and ICC support -MD to output dependencies as a
3584   # side effect of compilation, but ICC will put the dependencies in
3585   # the current directory while Tru64 will put them in the object
3586   # directory.
3587   mkdir sub
3588
3589   am_cv_CC_dependencies_compiler_type=none
3590   if test "$am_compiler_list" = ""; then
3591      am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3592   fi
3593   for depmode in $am_compiler_list; do
3594     if test $depmode = none; then break; fi
3595
3596     echo "$as_me:$LINENO: trying $depmode" >&5
3597     # Setup a source with many dependencies, because some compilers
3598     # like to wrap large dependency lists on column 80 (with \), and
3599     # we should not choose a depcomp mode which is confused by this.
3600     #
3601     # We need to recreate these files for each test, as the compiler may
3602     # overwrite some of them when testing with obscure command lines.
3603     # This happens at least with the AIX C compiler.
3604     : > sub/conftest.c
3605     for i in 1 2 3 4 5 6; do
3606       echo '#include "conftst'$i'.h"' >> sub/conftest.c
3607       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3608       # Solaris 8's {/usr,}/bin/sh.
3609       touch sub/conftst$i.h
3610     done
3611     echo "include sub/conftest.Po" > confmf
3612
3613     # We check with `-c' and `-o' for the sake of the "dashmstdout"
3614     # mode.  It turns out that the SunPro C++ compiler does not properly
3615     # handle `-M -o', and we need to detect this.
3616     depcmd="depmode=$depmode \
3617        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
3618        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3619        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
3620     echo "| $depcmd" | sed -e 's/  */ /g' >&5
3621     if env $depcmd > conftest.err 2>&1 &&
3622        grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
3623        grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
3624        ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
3625       # icc doesn't choke on unknown options, it will just issue warnings
3626       # or remarks (even with -Werror).  So we grep stderr for any message
3627       # that says an option was ignored or not supported.
3628       # When given -MP, icc 7.0 and 7.1 complain thusly:
3629       #   icc: Command line warning: ignoring option '-M'; no argument required
3630       # The diagnosis changed in icc 8.0:
3631       #   icc: Command line remark: option '-MP' not supported
3632       if (grep 'ignoring option' conftest.err ||
3633           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3634         am_cv_CC_dependencies_compiler_type=$depmode
3635         echo "$as_me:$LINENO: success" >&5
3636         break
3637       fi
3638     fi
3639     echo "$as_me:$LINENO: failure, diagnostics are:" >&5
3640     sed -e 's/^/| /' < conftest.err >&5
3641   done
3642
3643   cd ..
3644   rm -rf conftest.dir
3645 else
3646   am_cv_CC_dependencies_compiler_type=none
3647 fi
3648
3649 fi
3650 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3651 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
3652 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
3653 then { { echo "$as_me:$LINENO: error: no usable dependency style found" >&5
3654 echo "$as_me: error: no usable dependency style found" >&2;}
3655    { (exit 1); exit 1; }; }
3656 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3657
3658 fi
3659
3660
3661 # Check for the 'make' the user wants to use.
3662 for ac_prog in make
3663 do
3664   # Extract the first word of "$ac_prog", so it can be a program name with args.
3665 set dummy $ac_prog; ac_word=$2
3666 echo "$as_me:$LINENO: checking for $ac_word" >&5
3667 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3668 if test "${ac_cv_prog_MAKE+set}" = set; then
3669   echo $ECHO_N "(cached) $ECHO_C" >&6
3670 else
3671   if test -n "$MAKE"; then
3672   ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
3673 else
3674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3675 for as_dir in $PATH
3676 do
3677   IFS=$as_save_IFS
3678   test -z "$as_dir" && as_dir=.
3679   for ac_exec_ext in '' $ac_executable_extensions; do
3680   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3681     ac_cv_prog_MAKE="$ac_prog"
3682     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3683     break 2
3684   fi
3685 done
3686 done
3687
3688 fi
3689 fi
3690 MAKE=$ac_cv_prog_MAKE
3691 if test -n "$MAKE"; then
3692   echo "$as_me:$LINENO: result: $MAKE" >&5
3693 echo "${ECHO_T}$MAKE" >&6
3694 else
3695   echo "$as_me:$LINENO: result: no" >&5
3696 echo "${ECHO_T}no" >&6
3697 fi
3698
3699   test -n "$MAKE" && break
3700 done
3701
3702 MAKE_IS_GNU=
3703 case "`$MAKE --version 2>&1 | sed 1q`" in
3704   *GNU*)
3705     MAKE_IS_GNU=yes
3706     ;;
3707 esac
3708
3709
3710 if test "$MAKE_IS_GNU" = yes; then
3711   GMAKE_TRUE=
3712   GMAKE_FALSE='#'
3713 else
3714   GMAKE_TRUE='#'
3715   GMAKE_FALSE=
3716 fi
3717
3718 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3719 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3720 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3721 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3722   echo $ECHO_N "(cached) $ECHO_C" >&6
3723 else
3724   cat >conftest.make <<\_ACEOF
3725 all:
3726         @echo 'ac_maketemp="$(MAKE)"'
3727 _ACEOF
3728 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3729 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3730 if test -n "$ac_maketemp"; then
3731   eval ac_cv_prog_make_${ac_make}_set=yes
3732 else
3733   eval ac_cv_prog_make_${ac_make}_set=no
3734 fi
3735 rm -f conftest.make
3736 fi
3737 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3738   echo "$as_me:$LINENO: result: yes" >&5
3739 echo "${ECHO_T}yes" >&6
3740   SET_MAKE=
3741 else
3742   echo "$as_me:$LINENO: result: no" >&5
3743 echo "${ECHO_T}no" >&6
3744   SET_MAKE="MAKE=${MAKE-make}"
3745 fi
3746
3747
3748
3749 CONFIG_OBS=
3750 CONFIG_DEPS=
3751 CONFIG_SRCS=
3752 ENABLE_CFLAGS=
3753
3754 CONFIG_ALL=
3755 CONFIG_CLEAN=
3756 CONFIG_INSTALL=
3757 CONFIG_UNINSTALL=
3758
3759 # If we haven't got the data from the intl directory,
3760 # assume NLS is disabled.
3761 USE_NLS=no
3762 LIBINTL=
3763 LIBINTL_DEP=
3764 INCINTL=
3765 XGETTEXT=
3766 GMSGFMT=
3767 POSUB=
3768
3769 if test -f  ../intl/config.intl; then
3770   .  ../intl/config.intl
3771 fi
3772 echo "$as_me:$LINENO: checking whether NLS is requested" >&5
3773 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
3774 if test x"$USE_NLS" != xyes; then
3775   echo "$as_me:$LINENO: result: no" >&5
3776 echo "${ECHO_T}no" >&6
3777 else
3778   echo "$as_me:$LINENO: result: yes" >&5
3779 echo "${ECHO_T}yes" >&6
3780
3781 cat >>confdefs.h <<\_ACEOF
3782 #define ENABLE_NLS 1
3783 _ACEOF
3784
3785
3786   echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
3787 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
3788   # Look for .po and .gmo files in the source directory.
3789   CATALOGS=
3790   XLINGUAS=
3791   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
3792     # If there aren't any .gmo files the shell will give us the
3793     # literal string "../path/to/srcdir/po/*.gmo" which has to be
3794     # weeded out.
3795     case "$cat" in *\**)
3796       continue;;
3797     esac
3798     # The quadruple backslash is collapsed to a double backslash
3799     # by the backticks, then collapsed again by the double quotes,
3800     # leaving us with one backslash in the sed expression (right
3801     # before the dot that mustn't act as a wildcard).
3802     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
3803     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
3804     # The user is allowed to set LINGUAS to a list of languages to
3805     # install catalogs for.  If it's empty that means "all of them."
3806     if test "x$LINGUAS" = x; then
3807       CATALOGS="$CATALOGS $cat"
3808       XLINGUAS="$XLINGUAS $lang"
3809     else
3810       case "$LINGUAS" in *$lang*)
3811         CATALOGS="$CATALOGS $cat"
3812         XLINGUAS="$XLINGUAS $lang"
3813         ;;
3814       esac
3815     fi
3816   done
3817   LINGUAS="$XLINGUAS"
3818   echo "$as_me:$LINENO: result: $LINGUAS" >&5
3819 echo "${ECHO_T}$LINGUAS" >&6
3820
3821
3822     DATADIRNAME=share
3823
3824   INSTOBJEXT=.mo
3825
3826   GENCAT=gencat
3827
3828   CATOBJEXT=.gmo
3829
3830 fi
3831
3832 localedir='${datadir}/locale'
3833
3834
3835 if test x"$USE_NLS" = xyes; then
3836    CONFIG_ALL="$CONFIG_ALL all-po"
3837    CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
3838    CONFIG_INSTALL="$CONFIG_INSTALL install-po"
3839    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
3840 fi
3841
3842
3843   GNULIB_MEMMEM=0;
3844   GNULIB_MEMPCPY=0;
3845   GNULIB_MEMRCHR=0;
3846   GNULIB_STPCPY=0;
3847   GNULIB_STPNCPY=0;
3848   GNULIB_STRCHRNUL=0;
3849   GNULIB_STRDUP=0;
3850   GNULIB_STRNDUP=0;
3851   GNULIB_STRNLEN=0;
3852   GNULIB_STRPBRK=0;
3853   GNULIB_STRSEP=0;
3854   GNULIB_STRSTR=0;
3855   GNULIB_STRCASESTR=0;
3856   GNULIB_STRTOK_R=0;
3857   GNULIB_MBSLEN=0;
3858   GNULIB_MBSNLEN=0;
3859   GNULIB_MBSCHR=0;
3860   GNULIB_MBSRCHR=0;
3861   GNULIB_MBSSTR=0;
3862   GNULIB_MBSCASECMP=0;
3863   GNULIB_MBSNCASECMP=0;
3864   GNULIB_MBSPCASECMP=0;
3865   GNULIB_MBSCASESTR=0;
3866   GNULIB_MBSCSPN=0;
3867   GNULIB_MBSPBRK=0;
3868   GNULIB_MBSSPN=0;
3869   GNULIB_MBSSEP=0;
3870   GNULIB_MBSTOK_R=0;
3871   GNULIB_STRERROR=0;
3872   GNULIB_STRSIGNAL=0;
3873     HAVE_DECL_MEMMEM=1;
3874   HAVE_MEMPCPY=1;
3875   HAVE_DECL_MEMRCHR=1;
3876   HAVE_STPCPY=1;
3877   HAVE_STPNCPY=1;
3878   HAVE_STRCHRNUL=1;
3879   HAVE_DECL_STRDUP=1;
3880   HAVE_STRNDUP=1;
3881   HAVE_DECL_STRNDUP=1;
3882   HAVE_DECL_STRNLEN=1;
3883   HAVE_STRPBRK=1;
3884   HAVE_STRSEP=1;
3885   HAVE_STRCASESTR=1;
3886   HAVE_DECL_STRTOK_R=1;
3887   HAVE_DECL_STRERROR=1;
3888   HAVE_DECL_STRSIGNAL=1;
3889   REPLACE_STRERROR=0;
3890   REPLACE_STRSIGNAL=0;
3891   REPLACE_MEMMEM=0;
3892   REPLACE_STRCASESTR=0;
3893   REPLACE_STRSTR=0;
3894
3895
3896       echo "$as_me:$LINENO: checking whether memmem is declared" >&5
3897 echo $ECHO_N "checking whether memmem is declared... $ECHO_C" >&6
3898 if test "${ac_cv_have_decl_memmem+set}" = set; then
3899   echo $ECHO_N "(cached) $ECHO_C" >&6
3900 else
3901   cat >conftest.$ac_ext <<_ACEOF
3902 /* confdefs.h.  */
3903 _ACEOF
3904 cat confdefs.h >>conftest.$ac_ext
3905 cat >>conftest.$ac_ext <<_ACEOF
3906 /* end confdefs.h.  */
3907 $ac_includes_default
3908 int
3909 main ()
3910 {
3911 #ifndef memmem
3912   char *p = (char *) memmem;
3913 #endif
3914
3915   ;
3916   return 0;
3917 }
3918 _ACEOF
3919 rm -f conftest.$ac_objext
3920 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3921   (eval $ac_compile) 2>conftest.er1
3922   ac_status=$?
3923   grep -v '^ *+' conftest.er1 >conftest.err
3924   rm -f conftest.er1
3925   cat conftest.err >&5
3926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3927   (exit $ac_status); } &&
3928          { ac_try='test -z "$ac_c_werror_flag"
3929                          || test ! -s conftest.err'
3930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3931   (eval $ac_try) 2>&5
3932   ac_status=$?
3933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3934   (exit $ac_status); }; } &&
3935          { ac_try='test -s conftest.$ac_objext'
3936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3937   (eval $ac_try) 2>&5
3938   ac_status=$?
3939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3940   (exit $ac_status); }; }; then
3941   ac_cv_have_decl_memmem=yes
3942 else
3943   echo "$as_me: failed program was:" >&5
3944 sed 's/^/| /' conftest.$ac_ext >&5
3945
3946 ac_cv_have_decl_memmem=no
3947 fi
3948 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3949 fi
3950 echo "$as_me:$LINENO: result: $ac_cv_have_decl_memmem" >&5
3951 echo "${ECHO_T}$ac_cv_have_decl_memmem" >&6
3952 if test $ac_cv_have_decl_memmem = yes; then
3953
3954 cat >>confdefs.h <<_ACEOF
3955 #define HAVE_DECL_MEMMEM 1
3956 _ACEOF
3957
3958
3959 else
3960   cat >>confdefs.h <<_ACEOF
3961 #define HAVE_DECL_MEMMEM 0
3962 _ACEOF
3963
3964
3965 fi
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981 for ac_func in memmem
3982 do
3983 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3984 echo "$as_me:$LINENO: checking for $ac_func" >&5
3985 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3986 if eval "test \"\${$as_ac_var+set}\" = set"; then
3987   echo $ECHO_N "(cached) $ECHO_C" >&6
3988 else
3989   cat >conftest.$ac_ext <<_ACEOF
3990 /* confdefs.h.  */
3991 _ACEOF
3992 cat confdefs.h >>conftest.$ac_ext
3993 cat >>conftest.$ac_ext <<_ACEOF
3994 /* end confdefs.h.  */
3995 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
3996    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3997 #define $ac_func innocuous_$ac_func
3998
3999 /* System header to define __stub macros and hopefully few prototypes,
4000     which can conflict with char $ac_func (); below.
4001     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4002     <limits.h> exists even on freestanding compilers.  */
4003
4004 #ifdef __STDC__
4005 # include <limits.h>
4006 #else
4007 # include <assert.h>
4008 #endif
4009
4010 #undef $ac_func
4011
4012 /* Override any gcc2 internal prototype to avoid an error.  */
4013 #ifdef __cplusplus
4014 extern "C"
4015 {
4016 #endif
4017 /* We use char because int might match the return type of a gcc2
4018    builtin and then its argument prototype would still apply.  */
4019 char $ac_func ();
4020 /* The GNU C library defines this for functions which it implements
4021     to always fail with ENOSYS.  Some functions are actually named
4022     something starting with __ and the normal name is an alias.  */
4023 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4024 choke me
4025 #else
4026 char (*f) () = $ac_func;
4027 #endif
4028 #ifdef __cplusplus
4029 }
4030 #endif
4031
4032 int
4033 main ()
4034 {
4035 return f != $ac_func;
4036   ;
4037   return 0;
4038 }
4039 _ACEOF
4040 rm -f conftest.$ac_objext conftest$ac_exeext
4041 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4042   (eval $ac_link) 2>conftest.er1
4043   ac_status=$?
4044   grep -v '^ *+' conftest.er1 >conftest.err
4045   rm -f conftest.er1
4046   cat conftest.err >&5
4047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4048   (exit $ac_status); } &&
4049          { ac_try='test -z "$ac_c_werror_flag"
4050                          || test ! -s conftest.err'
4051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4052   (eval $ac_try) 2>&5
4053   ac_status=$?
4054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4055   (exit $ac_status); }; } &&
4056          { ac_try='test -s conftest$ac_exeext'
4057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4058   (eval $ac_try) 2>&5
4059   ac_status=$?
4060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4061   (exit $ac_status); }; }; then
4062   eval "$as_ac_var=yes"
4063 else
4064   echo "$as_me: failed program was:" >&5
4065 sed 's/^/| /' conftest.$ac_ext >&5
4066
4067 eval "$as_ac_var=no"
4068 fi
4069 rm -f conftest.err conftest.$ac_objext \
4070       conftest$ac_exeext conftest.$ac_ext
4071 fi
4072 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4073 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4074 if test `eval echo '${'$as_ac_var'}'` = yes; then
4075   cat >>confdefs.h <<_ACEOF
4076 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4077 _ACEOF
4078
4079 else
4080
4081     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4082
4083 fi
4084 done
4085
4086
4087
4088   :
4089
4090
4091
4092
4093
4094   if test $ac_cv_have_decl_memmem = no; then
4095     HAVE_DECL_MEMMEM=0
4096   fi
4097   :
4098
4099
4100   echo "$as_me:$LINENO: checking for long long int" >&5
4101 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
4102 if test "${ac_cv_type_long_long_int+set}" = set; then
4103   echo $ECHO_N "(cached) $ECHO_C" >&6
4104 else
4105   cat >conftest.$ac_ext <<_ACEOF
4106
4107   /* confdefs.h.  */
4108 _ACEOF
4109 cat confdefs.h >>conftest.$ac_ext
4110 cat >>conftest.$ac_ext <<_ACEOF
4111 /* end confdefs.h.  */
4112 /* For now, do not test the preprocessor; as of 2007 there are too many
4113          implementations with broken preprocessors.  Perhaps this can
4114          be revisited in 2012.  In the meantime, code should not expect
4115          #if to work with literals wider than 32 bits.  */
4116       /* Test literals.  */
4117       long long int ll = 9223372036854775807ll;
4118       long long int nll = -9223372036854775807LL;
4119       unsigned long long int ull = 18446744073709551615ULL;
4120       /* Test constant expressions.   */
4121       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4122                      ? 1 : -1)];
4123       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4124                      ? 1 : -1)];
4125       int i = 63;
4126 int
4127 main ()
4128 {
4129 /* Test availability of runtime routines for shift and division.  */
4130       long long int llmax = 9223372036854775807ll;
4131       unsigned long long int ullmax = 18446744073709551615ull;
4132       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4133               | (llmax / ll) | (llmax % ll)
4134               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4135               | (ullmax / ull) | (ullmax % ull));
4136   ;
4137   return 0;
4138 }
4139
4140 _ACEOF
4141 rm -f conftest.$ac_objext conftest$ac_exeext
4142 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4143   (eval $ac_link) 2>conftest.er1
4144   ac_status=$?
4145   grep -v '^ *+' conftest.er1 >conftest.err
4146   rm -f conftest.er1
4147   cat conftest.err >&5
4148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4149   (exit $ac_status); } &&
4150          { ac_try='test -z "$ac_c_werror_flag"
4151                          || test ! -s conftest.err'
4152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4153   (eval $ac_try) 2>&5
4154   ac_status=$?
4155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4156   (exit $ac_status); }; } &&
4157          { ac_try='test -s conftest$ac_exeext'
4158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4159   (eval $ac_try) 2>&5
4160   ac_status=$?
4161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4162   (exit $ac_status); }; }; then
4163                         if test "$cross_compiling" = yes; then
4164   ac_cv_type_long_long_int=yes
4165 else
4166   cat >conftest.$ac_ext <<_ACEOF
4167 /* confdefs.h.  */
4168 _ACEOF
4169 cat confdefs.h >>conftest.$ac_ext
4170 cat >>conftest.$ac_ext <<_ACEOF
4171 /* end confdefs.h.  */
4172 #include <limits.h>
4173                #ifndef LLONG_MAX
4174                # define HALF \
4175                         (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4176                # define LLONG_MAX (HALF - 1 + HALF)
4177                #endif
4178 int
4179 main ()
4180 {
4181 long long int n = 1;
4182                int i;
4183                for (i = 0; ; i++)
4184                  {
4185                    long long int m = n << i;
4186                    if (m >> i != n)
4187                      return 1;
4188                    if (LLONG_MAX / 2 < m)
4189                      break;
4190                  }
4191                return 0;
4192   ;
4193   return 0;
4194 }
4195 _ACEOF
4196 rm -f conftest$ac_exeext
4197 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4198   (eval $ac_link) 2>&5
4199   ac_status=$?
4200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4201   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4203   (eval $ac_try) 2>&5
4204   ac_status=$?
4205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4206   (exit $ac_status); }; }; then
4207   ac_cv_type_long_long_int=yes
4208 else
4209   echo "$as_me: program exited with status $ac_status" >&5
4210 echo "$as_me: failed program was:" >&5
4211 sed 's/^/| /' conftest.$ac_ext >&5
4212
4213 ( exit $ac_status )
4214 ac_cv_type_long_long_int=no
4215 fi
4216 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4217 fi
4218 else
4219   echo "$as_me: failed program was:" >&5
4220 sed 's/^/| /' conftest.$ac_ext >&5
4221
4222 ac_cv_type_long_long_int=no
4223 fi
4224 rm -f conftest.err conftest.$ac_objext \
4225       conftest$ac_exeext conftest.$ac_ext
4226 fi
4227 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
4228 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
4229   if test $ac_cv_type_long_long_int = yes; then
4230
4231 cat >>confdefs.h <<\_ACEOF
4232 #define HAVE_LONG_LONG_INT 1
4233 _ACEOF
4234
4235   fi
4236
4237
4238   echo "$as_me:$LINENO: checking for unsigned long long int" >&5
4239 echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6
4240 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
4241   echo $ECHO_N "(cached) $ECHO_C" >&6
4242 else
4243   cat >conftest.$ac_ext <<_ACEOF
4244
4245   /* confdefs.h.  */
4246 _ACEOF
4247 cat confdefs.h >>conftest.$ac_ext
4248 cat >>conftest.$ac_ext <<_ACEOF
4249 /* end confdefs.h.  */
4250 /* For now, do not test the preprocessor; as of 2007 there are too many
4251          implementations with broken preprocessors.  Perhaps this can
4252          be revisited in 2012.  In the meantime, code should not expect
4253          #if to work with literals wider than 32 bits.  */
4254       /* Test literals.  */
4255       long long int ll = 9223372036854775807ll;
4256       long long int nll = -9223372036854775807LL;
4257       unsigned long long int ull = 18446744073709551615ULL;
4258       /* Test constant expressions.   */
4259       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4260                      ? 1 : -1)];
4261       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4262                      ? 1 : -1)];
4263       int i = 63;
4264 int
4265 main ()
4266 {
4267 /* Test availability of runtime routines for shift and division.  */
4268       long long int llmax = 9223372036854775807ll;
4269       unsigned long long int ullmax = 18446744073709551615ull;
4270       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4271               | (llmax / ll) | (llmax % ll)
4272               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4273               | (ullmax / ull) | (ullmax % ull));
4274   ;
4275   return 0;
4276 }
4277
4278 _ACEOF
4279 rm -f conftest.$ac_objext conftest$ac_exeext
4280 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4281   (eval $ac_link) 2>conftest.er1
4282   ac_status=$?
4283   grep -v '^ *+' conftest.er1 >conftest.err
4284   rm -f conftest.er1
4285   cat conftest.err >&5
4286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4287   (exit $ac_status); } &&
4288          { ac_try='test -z "$ac_c_werror_flag"
4289                          || test ! -s conftest.err'
4290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4291   (eval $ac_try) 2>&5
4292   ac_status=$?
4293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4294   (exit $ac_status); }; } &&
4295          { ac_try='test -s conftest$ac_exeext'
4296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4297   (eval $ac_try) 2>&5
4298   ac_status=$?
4299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4300   (exit $ac_status); }; }; then
4301   ac_cv_type_unsigned_long_long_int=yes
4302 else
4303   echo "$as_me: failed program was:" >&5
4304 sed 's/^/| /' conftest.$ac_ext >&5
4305
4306 ac_cv_type_unsigned_long_long_int=no
4307 fi
4308 rm -f conftest.err conftest.$ac_objext \
4309       conftest$ac_exeext conftest.$ac_ext
4310 fi
4311 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
4312 echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6
4313   if test $ac_cv_type_unsigned_long_long_int = yes; then
4314
4315 cat >>confdefs.h <<\_ACEOF
4316 #define HAVE_UNSIGNED_LONG_LONG_INT 1
4317 _ACEOF
4318
4319   fi
4320
4321
4322
4323   echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5
4324 echo $ECHO_N "checking whether the preprocessor supports include_next... $ECHO_C" >&6
4325 if test "${gl_cv_have_include_next+set}" = set; then
4326   echo $ECHO_N "(cached) $ECHO_C" >&6
4327 else
4328   rm -rf conftestd1 conftestd2
4329      mkdir conftestd1 conftestd2
4330      cat <<EOF > conftestd1/conftest.h
4331 #define DEFINED_IN_CONFTESTD1
4332 #include_next <conftest.h>
4333 #ifdef DEFINED_IN_CONFTESTD2
4334 int foo;
4335 #else
4336 #error "include_next doesn't work"
4337 #endif
4338 EOF
4339      cat <<EOF > conftestd2/conftest.h
4340 #ifndef DEFINED_IN_CONFTESTD1
4341 #error "include_next test doesn't work"
4342 #endif
4343 #define DEFINED_IN_CONFTESTD2
4344 EOF
4345      save_CPPFLAGS="$CPPFLAGS"
4346      CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
4347      cat >conftest.$ac_ext <<_ACEOF
4348 #include <conftest.h>
4349 _ACEOF
4350 rm -f conftest.$ac_objext
4351 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4352   (eval $ac_compile) 2>conftest.er1
4353   ac_status=$?
4354   grep -v '^ *+' conftest.er1 >conftest.err
4355   rm -f conftest.er1
4356   cat conftest.err >&5
4357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4358   (exit $ac_status); } &&
4359          { ac_try='test -z "$ac_c_werror_flag"
4360                          || test ! -s conftest.err'
4361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4362   (eval $ac_try) 2>&5
4363   ac_status=$?
4364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4365   (exit $ac_status); }; } &&
4366          { ac_try='test -s conftest.$ac_objext'
4367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4368   (eval $ac_try) 2>&5
4369   ac_status=$?
4370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4371   (exit $ac_status); }; }; then
4372   gl_cv_have_include_next=yes
4373 else
4374   echo "$as_me: failed program was:" >&5
4375 sed 's/^/| /' conftest.$ac_ext >&5
4376
4377 gl_cv_have_include_next=no
4378 fi
4379 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4380      CPPFLAGS="$save_CPPFLAGS"
4381      rm -rf conftestd1 conftestd2
4382
4383 fi
4384 echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5
4385 echo "${ECHO_T}$gl_cv_have_include_next" >&6
4386   if test $gl_cv_have_include_next = yes; then
4387
4388
4389 cat >>confdefs.h <<\_ACEOF
4390 #define HAVE_INCLUDE_NEXT 1
4391 _ACEOF
4392
4393
4394     INCLUDE_NEXT=include_next
4395   else
4396     INCLUDE_NEXT=include
4397   fi
4398
4399
4400
4401
4402
4403
4404
4405 for ac_header in $gl_header_list
4406 do
4407 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4408 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4409   echo "$as_me:$LINENO: checking for $ac_header" >&5
4410 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4411 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4412   echo $ECHO_N "(cached) $ECHO_C" >&6
4413 fi
4414 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4415 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4416 else
4417   # Is the header compilable?
4418 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4419 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4420 cat >conftest.$ac_ext <<_ACEOF
4421 /* confdefs.h.  */
4422 _ACEOF
4423 cat confdefs.h >>conftest.$ac_ext
4424 cat >>conftest.$ac_ext <<_ACEOF
4425 /* end confdefs.h.  */
4426 $ac_includes_default
4427 #include <$ac_header>
4428 _ACEOF
4429 rm -f conftest.$ac_objext
4430 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4431   (eval $ac_compile) 2>conftest.er1
4432   ac_status=$?
4433   grep -v '^ *+' conftest.er1 >conftest.err
4434   rm -f conftest.er1
4435   cat conftest.err >&5
4436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4437   (exit $ac_status); } &&
4438          { ac_try='test -z "$ac_c_werror_flag"
4439                          || test ! -s conftest.err'
4440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4441   (eval $ac_try) 2>&5
4442   ac_status=$?
4443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4444   (exit $ac_status); }; } &&
4445          { ac_try='test -s conftest.$ac_objext'
4446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4447   (eval $ac_try) 2>&5
4448   ac_status=$?
4449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4450   (exit $ac_status); }; }; then
4451   ac_header_compiler=yes
4452 else
4453   echo "$as_me: failed program was:" >&5
4454 sed 's/^/| /' conftest.$ac_ext >&5
4455
4456 ac_header_compiler=no
4457 fi
4458 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4459 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4460 echo "${ECHO_T}$ac_header_compiler" >&6
4461
4462 # Is the header present?
4463 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4464 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4465 cat >conftest.$ac_ext <<_ACEOF
4466 /* confdefs.h.  */
4467 _ACEOF
4468 cat confdefs.h >>conftest.$ac_ext
4469 cat >>conftest.$ac_ext <<_ACEOF
4470 /* end confdefs.h.  */
4471 #include <$ac_header>
4472 _ACEOF
4473 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4474   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4475   ac_status=$?
4476   grep -v '^ *+' conftest.er1 >conftest.err
4477   rm -f conftest.er1
4478   cat conftest.err >&5
4479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4480   (exit $ac_status); } >/dev/null; then
4481   if test -s conftest.err; then
4482     ac_cpp_err=$ac_c_preproc_warn_flag
4483     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4484   else
4485     ac_cpp_err=
4486   fi
4487 else
4488   ac_cpp_err=yes
4489 fi
4490 if test -z "$ac_cpp_err"; then
4491   ac_header_preproc=yes
4492 else
4493   echo "$as_me: failed program was:" >&5
4494 sed 's/^/| /' conftest.$ac_ext >&5
4495
4496   ac_header_preproc=no
4497 fi
4498 rm -f conftest.err conftest.$ac_ext
4499 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4500 echo "${ECHO_T}$ac_header_preproc" >&6
4501
4502 # So?  What about this header?
4503 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4504   yes:no: )
4505     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4506 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4507     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4508 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4509     ac_header_preproc=yes
4510     ;;
4511   no:yes:* )
4512     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4513 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4514     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4515 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4516     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4517 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4518     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4519 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4520     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4521 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4522     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4523 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4524     (
4525       cat <<\_ASBOX
4526 ## ------------------------------------------ ##
4527 ## Report this to the AC_PACKAGE_NAME lists.  ##
4528 ## ------------------------------------------ ##
4529 _ASBOX
4530     ) |
4531       sed "s/^/$as_me: WARNING:     /" >&2
4532     ;;
4533 esac
4534 echo "$as_me:$LINENO: checking for $ac_header" >&5
4535 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4536 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4537   echo $ECHO_N "(cached) $ECHO_C" >&6
4538 else
4539   eval "$as_ac_Header=\$ac_header_preproc"
4540 fi
4541 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4542 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4543
4544 fi
4545 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4546   cat >>confdefs.h <<_ACEOF
4547 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4548 _ACEOF
4549
4550 fi
4551
4552 done
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565 echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
4566 echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6
4567 if test "${ac_cv_c_restrict+set}" = set; then
4568   echo $ECHO_N "(cached) $ECHO_C" >&6
4569 else
4570   ac_cv_c_restrict=no
4571    # The order here caters to the fact that C++ does not require restrict.
4572    for ac_kw in __restrict __restrict__ _Restrict restrict; do
4573      cat >conftest.$ac_ext <<_ACEOF
4574 /* confdefs.h.  */
4575 _ACEOF
4576 cat confdefs.h >>conftest.$ac_ext
4577 cat >>conftest.$ac_ext <<_ACEOF
4578 /* end confdefs.h.  */
4579 typedef int * int_ptr;
4580         int foo (int_ptr $ac_kw ip) {
4581         return ip[0];
4582        }
4583 int
4584 main ()
4585 {
4586 int s[1];
4587         int * $ac_kw t = s;
4588         t[0] = 0;
4589         return foo(t)
4590   ;
4591   return 0;
4592 }
4593 _ACEOF
4594 rm -f conftest.$ac_objext
4595 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4596   (eval $ac_compile) 2>conftest.er1
4597   ac_status=$?
4598   grep -v '^ *+' conftest.er1 >conftest.err
4599   rm -f conftest.er1
4600   cat conftest.err >&5
4601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602   (exit $ac_status); } &&
4603          { ac_try='test -z "$ac_c_werror_flag"
4604                          || test ! -s conftest.err'
4605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4606   (eval $ac_try) 2>&5
4607   ac_status=$?
4608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4609   (exit $ac_status); }; } &&
4610          { ac_try='test -s conftest.$ac_objext'
4611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4612   (eval $ac_try) 2>&5
4613   ac_status=$?
4614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4615   (exit $ac_status); }; }; then
4616   ac_cv_c_restrict=$ac_kw
4617 else
4618   echo "$as_me: failed program was:" >&5
4619 sed 's/^/| /' conftest.$ac_ext >&5
4620
4621 fi
4622 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4623      test "$ac_cv_c_restrict" != no && break
4624    done
4625
4626 fi
4627 echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5
4628 echo "${ECHO_T}$ac_cv_c_restrict" >&6
4629
4630
4631  case $ac_cv_c_restrict in
4632    restrict) ;;
4633    no) cat >>confdefs.h <<\_ACEOF
4634 #define restrict
4635 _ACEOF
4636  ;;
4637    *)  cat >>confdefs.h <<_ACEOF
4638 #define restrict $ac_cv_c_restrict
4639 _ACEOF
4640  ;;
4641  esac
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655   :
4656
4657
4658
4659
4660
4661
4662
4663      if test $gl_cv_have_include_next = yes; then
4664        gl_cv_next_string_h='<'string.h'>'
4665      else
4666        echo "$as_me:$LINENO: checking absolute name of <string.h>" >&5
4667 echo $ECHO_N "checking absolute name of <string.h>... $ECHO_C" >&6
4668 if test "${gl_cv_next_string_h+set}" = set; then
4669   echo $ECHO_N "(cached) $ECHO_C" >&6
4670 else
4671
4672           if test $ac_cv_header_string_h = yes; then
4673             cat >conftest.$ac_ext <<_ACEOF
4674 /* confdefs.h.  */
4675 _ACEOF
4676 cat confdefs.h >>conftest.$ac_ext
4677 cat >>conftest.$ac_ext <<_ACEOF
4678 /* end confdefs.h.  */
4679 #include <string.h>
4680
4681 _ACEOF
4682                                     gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4683                sed -n '\#/string.h#{
4684                  s#.*"\(.*/string.h\)".*#\1#
4685                  s#^/[^/]#//&#
4686                  p
4687                  q
4688                }'`'"'
4689           else
4690             gl_cv_next_string_h='<'string.h'>'
4691           fi
4692
4693 fi
4694 echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5
4695 echo "${ECHO_T}$gl_cv_next_string_h" >&6
4696      fi
4697      NEXT_STRING_H=$gl_cv_next_string_h
4698
4699
4700
4701
4702
4703   GNULIB_WCWIDTH=0;
4704     HAVE_DECL_WCWIDTH=1;
4705   REPLACE_WCWIDTH=0;
4706   WCHAR_H=
4707
4708
4709
4710
4711
4712 if false; then
4713   GL_COND_LIBTOOL_TRUE=
4714   GL_COND_LIBTOOL_FALSE='#'
4715 else
4716   GL_COND_LIBTOOL_TRUE='#'
4717   GL_COND_LIBTOOL_FALSE=
4718 fi
4719
4720   gl_cond_libtool=false
4721   gl_libdeps=
4722   gl_ltlibdeps=
4723
4724
4725
4726   gl_source_base='gnulib'
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736 for ac_func in memchr
4737 do
4738 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4739 echo "$as_me:$LINENO: checking for $ac_func" >&5
4740 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4741 if eval "test \"\${$as_ac_var+set}\" = set"; then
4742   echo $ECHO_N "(cached) $ECHO_C" >&6
4743 else
4744   cat >conftest.$ac_ext <<_ACEOF
4745 /* confdefs.h.  */
4746 _ACEOF
4747 cat confdefs.h >>conftest.$ac_ext
4748 cat >>conftest.$ac_ext <<_ACEOF
4749 /* end confdefs.h.  */
4750 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4751    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4752 #define $ac_func innocuous_$ac_func
4753
4754 /* System header to define __stub macros and hopefully few prototypes,
4755     which can conflict with char $ac_func (); below.
4756     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4757     <limits.h> exists even on freestanding compilers.  */
4758
4759 #ifdef __STDC__
4760 # include <limits.h>
4761 #else
4762 # include <assert.h>
4763 #endif
4764
4765 #undef $ac_func
4766
4767 /* Override any gcc2 internal prototype to avoid an error.  */
4768 #ifdef __cplusplus
4769 extern "C"
4770 {
4771 #endif
4772 /* We use char because int might match the return type of a gcc2
4773    builtin and then its argument prototype would still apply.  */
4774 char $ac_func ();
4775 /* The GNU C library defines this for functions which it implements
4776     to always fail with ENOSYS.  Some functions are actually named
4777     something starting with __ and the normal name is an alias.  */
4778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4779 choke me
4780 #else
4781 char (*f) () = $ac_func;
4782 #endif
4783 #ifdef __cplusplus
4784 }
4785 #endif
4786
4787 int
4788 main ()
4789 {
4790 return f != $ac_func;
4791   ;
4792   return 0;
4793 }
4794 _ACEOF
4795 rm -f conftest.$ac_objext conftest$ac_exeext
4796 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4797   (eval $ac_link) 2>conftest.er1
4798   ac_status=$?
4799   grep -v '^ *+' conftest.er1 >conftest.err
4800   rm -f conftest.er1
4801   cat conftest.err >&5
4802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4803   (exit $ac_status); } &&
4804          { ac_try='test -z "$ac_c_werror_flag"
4805                          || test ! -s conftest.err'
4806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4807   (eval $ac_try) 2>&5
4808   ac_status=$?
4809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4810   (exit $ac_status); }; } &&
4811          { ac_try='test -s conftest$ac_exeext'
4812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4813   (eval $ac_try) 2>&5
4814   ac_status=$?
4815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816   (exit $ac_status); }; }; then
4817   eval "$as_ac_var=yes"
4818 else
4819   echo "$as_me: failed program was:" >&5
4820 sed 's/^/| /' conftest.$ac_ext >&5
4821
4822 eval "$as_ac_var=no"
4823 fi
4824 rm -f conftest.err conftest.$ac_objext \
4825       conftest$ac_exeext conftest.$ac_ext
4826 fi
4827 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4828 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4829 if test `eval echo '${'$as_ac_var'}'` = yes; then
4830   cat >>confdefs.h <<_ACEOF
4831 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4832 _ACEOF
4833
4834 else
4835
4836     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4837
4838 fi
4839 done
4840
4841
4842   if test $ac_cv_func_memchr = no; then
4843
4844
4845 for ac_header in bp-sym.h
4846 do
4847 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4848 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4849   echo "$as_me:$LINENO: checking for $ac_header" >&5
4850 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4851 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4852   echo $ECHO_N "(cached) $ECHO_C" >&6
4853 fi
4854 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4855 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4856 else
4857   # Is the header compilable?
4858 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4859 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4860 cat >conftest.$ac_ext <<_ACEOF
4861 /* confdefs.h.  */
4862 _ACEOF
4863 cat confdefs.h >>conftest.$ac_ext
4864 cat >>conftest.$ac_ext <<_ACEOF
4865 /* end confdefs.h.  */
4866 $ac_includes_default
4867 #include <$ac_header>
4868 _ACEOF
4869 rm -f conftest.$ac_objext
4870 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4871   (eval $ac_compile) 2>conftest.er1
4872   ac_status=$?
4873   grep -v '^ *+' conftest.er1 >conftest.err
4874   rm -f conftest.er1
4875   cat conftest.err >&5
4876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4877   (exit $ac_status); } &&
4878          { ac_try='test -z "$ac_c_werror_flag"
4879                          || test ! -s conftest.err'
4880   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4881   (eval $ac_try) 2>&5
4882   ac_status=$?
4883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4884   (exit $ac_status); }; } &&
4885          { ac_try='test -s conftest.$ac_objext'
4886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4887   (eval $ac_try) 2>&5
4888   ac_status=$?
4889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4890   (exit $ac_status); }; }; then
4891   ac_header_compiler=yes
4892 else
4893   echo "$as_me: failed program was:" >&5
4894 sed 's/^/| /' conftest.$ac_ext >&5
4895
4896 ac_header_compiler=no
4897 fi
4898 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4899 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4900 echo "${ECHO_T}$ac_header_compiler" >&6
4901
4902 # Is the header present?
4903 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4904 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4905 cat >conftest.$ac_ext <<_ACEOF
4906 /* confdefs.h.  */
4907 _ACEOF
4908 cat confdefs.h >>conftest.$ac_ext
4909 cat >>conftest.$ac_ext <<_ACEOF
4910 /* end confdefs.h.  */
4911 #include <$ac_header>
4912 _ACEOF
4913 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4914   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4915   ac_status=$?
4916   grep -v '^ *+' conftest.er1 >conftest.err
4917   rm -f conftest.er1
4918   cat conftest.err >&5
4919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4920   (exit $ac_status); } >/dev/null; then
4921   if test -s conftest.err; then
4922     ac_cpp_err=$ac_c_preproc_warn_flag
4923     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4924   else
4925     ac_cpp_err=
4926   fi
4927 else
4928   ac_cpp_err=yes
4929 fi
4930 if test -z "$ac_cpp_err"; then
4931   ac_header_preproc=yes
4932 else
4933   echo "$as_me: failed program was:" >&5
4934 sed 's/^/| /' conftest.$ac_ext >&5
4935
4936   ac_header_preproc=no
4937 fi
4938 rm -f conftest.err conftest.$ac_ext
4939 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4940 echo "${ECHO_T}$ac_header_preproc" >&6
4941
4942 # So?  What about this header?
4943 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4944   yes:no: )
4945     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4946 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4947     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4948 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4949     ac_header_preproc=yes
4950     ;;
4951   no:yes:* )
4952     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4953 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4954     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4955 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4956     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4957 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4958     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4959 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4960     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4961 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4962     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4963 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4964     (
4965       cat <<\_ASBOX
4966 ## ------------------------------------------ ##
4967 ## Report this to the AC_PACKAGE_NAME lists.  ##
4968 ## ------------------------------------------ ##
4969 _ASBOX
4970     ) |
4971       sed "s/^/$as_me: WARNING:     /" >&2
4972     ;;
4973 esac
4974 echo "$as_me:$LINENO: checking for $ac_header" >&5
4975 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4976 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4977   echo $ECHO_N "(cached) $ECHO_C" >&6
4978 else
4979   eval "$as_ac_Header=\$ac_header_preproc"
4980 fi
4981 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4982 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4983
4984 fi
4985 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4986   cat >>confdefs.h <<_ACEOF
4987 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4988 _ACEOF
4989
4990 fi
4991
4992 done
4993
4994
4995   fi
4996
4997
4998   echo "$as_me:$LINENO: checking for working memcmp" >&5
4999 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
5000 if test "${ac_cv_func_memcmp_working+set}" = set; then
5001   echo $ECHO_N "(cached) $ECHO_C" >&6
5002 else
5003   if test "$cross_compiling" = yes; then
5004   ac_cv_func_memcmp_working=no
5005 else
5006   cat >conftest.$ac_ext <<_ACEOF
5007 /* confdefs.h.  */
5008 _ACEOF
5009 cat confdefs.h >>conftest.$ac_ext
5010 cat >>conftest.$ac_ext <<_ACEOF
5011 /* end confdefs.h.  */
5012 $ac_includes_default
5013 int
5014 main ()
5015 {
5016
5017   /* Some versions of memcmp are not 8-bit clean.  */
5018   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
5019   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
5020     exit (1);
5021
5022   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
5023      or more and with at least one buffer not starting on a 4-byte boundary.
5024      William Lewis provided this test program.   */
5025   {
5026     char foo[21];
5027     char bar[21];
5028     int i;
5029     for (i = 0; i < 4; i++)
5030       {
5031         char *a = foo + i;
5032         char *b = bar + i;
5033         strcpy (a, "--------01111111");
5034         strcpy (b, "--------10000000");
5035         if (memcmp (a, b, 16) >= 0)
5036           exit (1);
5037       }
5038     exit (0);
5039   }
5040
5041   ;
5042   return 0;
5043 }
5044 _ACEOF
5045 rm -f conftest$ac_exeext
5046 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5047   (eval $ac_link) 2>&5
5048   ac_status=$?
5049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5050   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5052   (eval $ac_try) 2>&5
5053   ac_status=$?
5054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5055   (exit $ac_status); }; }; then
5056   ac_cv_func_memcmp_working=yes
5057 else
5058   echo "$as_me: program exited with status $ac_status" >&5
5059 echo "$as_me: failed program was:" >&5
5060 sed 's/^/| /' conftest.$ac_ext >&5
5061
5062 ( exit $ac_status )
5063 ac_cv_func_memcmp_working=no
5064 fi
5065 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5066 fi
5067 fi
5068 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
5069 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
5070 test $ac_cv_func_memcmp_working = no &&
5071
5072
5073
5074
5075
5076
5077   gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext"
5078
5079
5080     if test $ac_cv_func_memcmp_working = no; then
5081
5082 cat >>confdefs.h <<\_ACEOF
5083 #define memcmp rpl_memcmp
5084 _ACEOF
5085
5086     :
5087   fi
5088
5089
5090
5091   if test $ac_cv_have_decl_memmem = yes; then
5092     echo "$as_me:$LINENO: checking whether memmem works in linear time" >&5
5093 echo $ECHO_N "checking whether memmem works in linear time... $ECHO_C" >&6
5094 if test "${gl_cv_func_memmem_works+set}" = set; then
5095   echo $ECHO_N "(cached) $ECHO_C" >&6
5096 else
5097   if test "$cross_compiling" = yes; then
5098                  gl_cv_func_memmem_works="guessing no"
5099 else
5100   cat >conftest.$ac_ext <<_ACEOF
5101 /* confdefs.h.  */
5102 _ACEOF
5103 cat confdefs.h >>conftest.$ac_ext
5104 cat >>conftest.$ac_ext <<_ACEOF
5105 /* end confdefs.h.  */
5106
5107 #include <string.h> /* for memmem */
5108 #include <stdlib.h> /* for malloc */
5109 #include <unistd.h> /* for alarm */
5110
5111 int
5112 main ()
5113 {
5114 size_t m = 1000000;
5115     char *haystack = (char *) malloc (2 * m + 1);
5116     char *needle = (char *) malloc (m + 1);
5117     void *result = 0;
5118     /* Failure to compile this test due to missing alarm is okay,
5119        since all such platforms (mingw) also lack memmem.  */
5120     alarm (5);
5121     /* Check for quadratic performance.  */
5122     if (haystack && needle)
5123       {
5124         memset (haystack, 'A', 2 * m);
5125         haystack[2 * m] = 'B';
5126         memset (needle, 'A', m);
5127         needle[m] = 'B';
5128         result = memmem (haystack, 2 * m + 1, needle, m + 1);
5129       }
5130     /* Check for empty needle behavior.  */
5131     return !result || !memmem ("a", 1, 0, 0);
5132   ;
5133   return 0;
5134 }
5135 _ACEOF
5136 rm -f conftest$ac_exeext
5137 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5138   (eval $ac_link) 2>&5
5139   ac_status=$?
5140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5143   (eval $ac_try) 2>&5
5144   ac_status=$?
5145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5146   (exit $ac_status); }; }; then
5147   gl_cv_func_memmem_works=yes
5148 else
5149   echo "$as_me: program exited with status $ac_status" >&5
5150 echo "$as_me: failed program was:" >&5
5151 sed 's/^/| /' conftest.$ac_ext >&5
5152
5153 ( exit $ac_status )
5154 gl_cv_func_memmem_works=no
5155 fi
5156 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5157 fi
5158 fi
5159 echo "$as_me:$LINENO: result: $gl_cv_func_memmem_works" >&5
5160 echo "${ECHO_T}$gl_cv_func_memmem_works" >&6
5161     if test "$gl_cv_func_memmem_works" != yes; then
5162       REPLACE_MEMMEM=1
5163
5164
5165
5166
5167
5168
5169
5170   gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
5171
5172     fi
5173   fi
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187 for ac_func in memmem
5188 do
5189 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5190 echo "$as_me:$LINENO: checking for $ac_func" >&5
5191 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5192 if eval "test \"\${$as_ac_var+set}\" = set"; then
5193   echo $ECHO_N "(cached) $ECHO_C" >&6
5194 else
5195   cat >conftest.$ac_ext <<_ACEOF
5196 /* confdefs.h.  */
5197 _ACEOF
5198 cat confdefs.h >>conftest.$ac_ext
5199 cat >>conftest.$ac_ext <<_ACEOF
5200 /* end confdefs.h.  */
5201 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5202    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5203 #define $ac_func innocuous_$ac_func
5204
5205 /* System header to define __stub macros and hopefully few prototypes,
5206     which can conflict with char $ac_func (); below.
5207     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5208     <limits.h> exists even on freestanding compilers.  */
5209
5210 #ifdef __STDC__
5211 # include <limits.h>
5212 #else
5213 # include <assert.h>
5214 #endif
5215
5216 #undef $ac_func
5217
5218 /* Override any gcc2 internal prototype to avoid an error.  */
5219 #ifdef __cplusplus
5220 extern "C"
5221 {
5222 #endif
5223 /* We use char because int might match the return type of a gcc2
5224    builtin and then its argument prototype would still apply.  */
5225 char $ac_func ();
5226 /* The GNU C library defines this for functions which it implements
5227     to always fail with ENOSYS.  Some functions are actually named
5228     something starting with __ and the normal name is an alias.  */
5229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5230 choke me
5231 #else
5232 char (*f) () = $ac_func;
5233 #endif
5234 #ifdef __cplusplus
5235 }
5236 #endif
5237
5238 int
5239 main ()
5240 {
5241 return f != $ac_func;
5242   ;
5243   return 0;
5244 }
5245 _ACEOF
5246 rm -f conftest.$ac_objext conftest$ac_exeext
5247 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5248   (eval $ac_link) 2>conftest.er1
5249   ac_status=$?
5250   grep -v '^ *+' conftest.er1 >conftest.err
5251   rm -f conftest.er1
5252   cat conftest.err >&5
5253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5254   (exit $ac_status); } &&
5255          { ac_try='test -z "$ac_c_werror_flag"
5256                          || test ! -s conftest.err'
5257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5258   (eval $ac_try) 2>&5
5259   ac_status=$?
5260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5261   (exit $ac_status); }; } &&
5262          { ac_try='test -s conftest$ac_exeext'
5263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5264   (eval $ac_try) 2>&5
5265   ac_status=$?
5266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267   (exit $ac_status); }; }; then
5268   eval "$as_ac_var=yes"
5269 else
5270   echo "$as_me: failed program was:" >&5
5271 sed 's/^/| /' conftest.$ac_ext >&5
5272
5273 eval "$as_ac_var=no"
5274 fi
5275 rm -f conftest.err conftest.$ac_objext \
5276       conftest$ac_exeext conftest.$ac_ext
5277 fi
5278 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5279 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5280 if test `eval echo '${'$as_ac_var'}'` = yes; then
5281   cat >>confdefs.h <<_ACEOF
5282 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5283 _ACEOF
5284
5285 else
5286
5287     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5288
5289 fi
5290 done
5291
5292
5293
5294   :
5295
5296
5297
5298
5299
5300   if test $ac_cv_have_decl_memmem = no; then
5301     HAVE_DECL_MEMMEM=0
5302   fi
5303   :
5304
5305
5306
5307   GNULIB_MEMMEM=1
5308
5309
5310
5311
5312   if test $ac_cv_type_long_long_int = yes; then
5313     HAVE_LONG_LONG_INT=1
5314   else
5315     HAVE_LONG_LONG_INT=0
5316   fi
5317
5318
5319   if test $ac_cv_type_unsigned_long_long_int = yes; then
5320     HAVE_UNSIGNED_LONG_LONG_INT=1
5321   else
5322     HAVE_UNSIGNED_LONG_LONG_INT=0
5323   fi
5324
5325
5326       if test $ac_cv_header_inttypes_h = yes; then
5327     HAVE_INTTYPES_H=1
5328   else
5329     HAVE_INTTYPES_H=0
5330   fi
5331
5332
5333       if test $ac_cv_header_sys_types_h = yes; then
5334     HAVE_SYS_TYPES_H=1
5335   else
5336     HAVE_SYS_TYPES_H=0
5337   fi
5338
5339
5340
5341
5342
5343   :
5344
5345
5346
5347
5348
5349
5350
5351      if test $gl_cv_have_include_next = yes; then
5352        gl_cv_next_stdint_h='<'stdint.h'>'
5353      else
5354        echo "$as_me:$LINENO: checking absolute name of <stdint.h>" >&5
5355 echo $ECHO_N "checking absolute name of <stdint.h>... $ECHO_C" >&6
5356 if test "${gl_cv_next_stdint_h+set}" = set; then
5357   echo $ECHO_N "(cached) $ECHO_C" >&6
5358 else
5359
5360           if test $ac_cv_header_stdint_h = yes; then
5361             cat >conftest.$ac_ext <<_ACEOF
5362 /* confdefs.h.  */
5363 _ACEOF
5364 cat confdefs.h >>conftest.$ac_ext
5365 cat >>conftest.$ac_ext <<_ACEOF
5366 /* end confdefs.h.  */
5367 #include <stdint.h>
5368
5369 _ACEOF
5370                                     gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5371                sed -n '\#/stdint.h#{
5372                  s#.*"\(.*/stdint.h\)".*#\1#
5373                  s#^/[^/]#//&#
5374                  p
5375                  q
5376                }'`'"'
5377           else
5378             gl_cv_next_stdint_h='<'stdint.h'>'
5379           fi
5380
5381 fi
5382 echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5
5383 echo "${ECHO_T}$gl_cv_next_stdint_h" >&6
5384      fi
5385      NEXT_STDINT_H=$gl_cv_next_stdint_h
5386
5387
5388
5389   if test $ac_cv_header_stdint_h = yes; then
5390     HAVE_STDINT_H=1
5391   else
5392     HAVE_STDINT_H=0
5393   fi
5394
5395
5396     if test $ac_cv_header_stdint_h = yes; then
5397     echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5
5398 echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6
5399 if test "${gl_cv_header_working_stdint_h+set}" = set; then
5400   echo $ECHO_N "(cached) $ECHO_C" >&6
5401 else
5402   gl_cv_header_working_stdint_h=no
5403        cat >conftest.$ac_ext <<_ACEOF
5404
5405          /* confdefs.h.  */
5406 _ACEOF
5407 cat confdefs.h >>conftest.$ac_ext
5408 cat >>conftest.$ac_ext <<_ACEOF
5409 /* end confdefs.h.  */
5410
5411 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
5412 #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
5413 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5414 #include <stdint.h>
5415 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
5416 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
5417 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
5418 #endif
5419
5420
5421   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5422      included before <wchar.h>.  */
5423   #include <stddef.h>
5424   #include <signal.h>
5425   #if HAVE_WCHAR_H
5426   # include <stdio.h>
5427   # include <time.h>
5428   # include <wchar.h>
5429   #endif
5430
5431
5432 #ifdef INT8_MAX
5433 int8_t a1 = INT8_MAX;
5434 int8_t a1min = INT8_MIN;
5435 #endif
5436 #ifdef INT16_MAX
5437 int16_t a2 = INT16_MAX;
5438 int16_t a2min = INT16_MIN;
5439 #endif
5440 #ifdef INT32_MAX
5441 int32_t a3 = INT32_MAX;
5442 int32_t a3min = INT32_MIN;
5443 #endif
5444 #ifdef INT64_MAX
5445 int64_t a4 = INT64_MAX;
5446 int64_t a4min = INT64_MIN;
5447 #endif
5448 #ifdef UINT8_MAX
5449 uint8_t b1 = UINT8_MAX;
5450 #else
5451 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
5452 #endif
5453 #ifdef UINT16_MAX
5454 uint16_t b2 = UINT16_MAX;
5455 #endif
5456 #ifdef UINT32_MAX
5457 uint32_t b3 = UINT32_MAX;
5458 #endif
5459 #ifdef UINT64_MAX
5460 uint64_t b4 = UINT64_MAX;
5461 #endif
5462 int_least8_t c1 = INT8_C (0x7f);
5463 int_least8_t c1max = INT_LEAST8_MAX;
5464 int_least8_t c1min = INT_LEAST8_MIN;
5465 int_least16_t c2 = INT16_C (0x7fff);
5466 int_least16_t c2max = INT_LEAST16_MAX;
5467 int_least16_t c2min = INT_LEAST16_MIN;
5468 int_least32_t c3 = INT32_C (0x7fffffff);
5469 int_least32_t c3max = INT_LEAST32_MAX;
5470 int_least32_t c3min = INT_LEAST32_MIN;
5471 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
5472 int_least64_t c4max = INT_LEAST64_MAX;
5473 int_least64_t c4min = INT_LEAST64_MIN;
5474 uint_least8_t d1 = UINT8_C (0xff);
5475 uint_least8_t d1max = UINT_LEAST8_MAX;
5476 uint_least16_t d2 = UINT16_C (0xffff);
5477 uint_least16_t d2max = UINT_LEAST16_MAX;
5478 uint_least32_t d3 = UINT32_C (0xffffffff);
5479 uint_least32_t d3max = UINT_LEAST32_MAX;
5480 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
5481 uint_least64_t d4max = UINT_LEAST64_MAX;
5482 int_fast8_t e1 = INT_FAST8_MAX;
5483 int_fast8_t e1min = INT_FAST8_MIN;
5484 int_fast16_t e2 = INT_FAST16_MAX;
5485 int_fast16_t e2min = INT_FAST16_MIN;
5486 int_fast32_t e3 = INT_FAST32_MAX;
5487 int_fast32_t e3min = INT_FAST32_MIN;
5488 int_fast64_t e4 = INT_FAST64_MAX;
5489 int_fast64_t e4min = INT_FAST64_MIN;
5490 uint_fast8_t f1 = UINT_FAST8_MAX;
5491 uint_fast16_t f2 = UINT_FAST16_MAX;
5492 uint_fast32_t f3 = UINT_FAST32_MAX;
5493 uint_fast64_t f4 = UINT_FAST64_MAX;
5494 #ifdef INTPTR_MAX
5495 intptr_t g = INTPTR_MAX;
5496 intptr_t gmin = INTPTR_MIN;
5497 #endif
5498 #ifdef UINTPTR_MAX
5499 uintptr_t h = UINTPTR_MAX;
5500 #endif
5501 intmax_t i = INTMAX_MAX;
5502 uintmax_t j = UINTMAX_MAX;
5503
5504 #include <limits.h> /* for CHAR_BIT */
5505 #define TYPE_MINIMUM(t) \
5506   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
5507 #define TYPE_MAXIMUM(t) \
5508   ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
5509 struct s {
5510   int check_PTRDIFF:
5511       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
5512       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
5513       ? 1 : -1;
5514   /* Detect bug in FreeBSD 6.0 / ia64.  */
5515   int check_SIG_ATOMIC:
5516       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
5517       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
5518       ? 1 : -1;
5519   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
5520   int check_WCHAR:
5521       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
5522       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
5523       ? 1 : -1;
5524   /* Detect bug in mingw.  */
5525   int check_WINT:
5526       WINT_MIN == TYPE_MINIMUM (wint_t)
5527       && WINT_MAX == TYPE_MAXIMUM (wint_t)
5528       ? 1 : -1;
5529
5530   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
5531   int check_UINT8_C:
5532         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
5533   int check_UINT16_C:
5534         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
5535
5536   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
5537 #ifdef UINT8_MAX
5538   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
5539 #endif
5540 #ifdef UINT16_MAX
5541   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
5542 #endif
5543 #ifdef UINT32_MAX
5544   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
5545 #endif
5546 #ifdef UINT64_MAX
5547   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
5548 #endif
5549   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
5550   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
5551   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
5552   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
5553   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
5554   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
5555   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
5556   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
5557   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
5558   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
5559   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
5560 };
5561
5562 int
5563 main ()
5564 {
5565
5566   ;
5567   return 0;
5568 }
5569 _ACEOF
5570 rm -f conftest.$ac_objext
5571 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5572   (eval $ac_compile) 2>conftest.er1
5573   ac_status=$?
5574   grep -v '^ *+' conftest.er1 >conftest.err
5575   rm -f conftest.er1
5576   cat conftest.err >&5
5577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578   (exit $ac_status); } &&
5579          { ac_try='test -z "$ac_c_werror_flag"
5580                          || test ! -s conftest.err'
5581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5582   (eval $ac_try) 2>&5
5583   ac_status=$?
5584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5585   (exit $ac_status); }; } &&
5586          { ac_try='test -s conftest.$ac_objext'
5587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5588   (eval $ac_try) 2>&5
5589   ac_status=$?
5590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5591   (exit $ac_status); }; }; then
5592   gl_cv_header_working_stdint_h=yes
5593 else
5594   echo "$as_me: failed program was:" >&5
5595 sed 's/^/| /' conftest.$ac_ext >&5
5596
5597 fi
5598 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5599 fi
5600 echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5
5601 echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6
5602   fi
5603   if test "$gl_cv_header_working_stdint_h" = yes; then
5604     STDINT_H=
5605   else
5606
5607
5608 for ac_header in sys/inttypes.h sys/bitypes.h
5609 do
5610 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5611 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5612   echo "$as_me:$LINENO: checking for $ac_header" >&5
5613 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5614 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5615   echo $ECHO_N "(cached) $ECHO_C" >&6
5616 fi
5617 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5618 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5619 else
5620   # Is the header compilable?
5621 echo "$as_me:$LINENO: checking $ac_header usability" >&5
5622 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5623 cat >conftest.$ac_ext <<_ACEOF
5624 /* confdefs.h.  */
5625 _ACEOF
5626 cat confdefs.h >>conftest.$ac_ext
5627 cat >>conftest.$ac_ext <<_ACEOF
5628 /* end confdefs.h.  */
5629 $ac_includes_default
5630 #include <$ac_header>
5631 _ACEOF
5632 rm -f conftest.$ac_objext
5633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5634   (eval $ac_compile) 2>conftest.er1
5635   ac_status=$?
5636   grep -v '^ *+' conftest.er1 >conftest.err
5637   rm -f conftest.er1
5638   cat conftest.err >&5
5639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5640   (exit $ac_status); } &&
5641          { ac_try='test -z "$ac_c_werror_flag"
5642                          || test ! -s conftest.err'
5643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5644   (eval $ac_try) 2>&5
5645   ac_status=$?
5646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647   (exit $ac_status); }; } &&
5648          { ac_try='test -s conftest.$ac_objext'
5649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5650   (eval $ac_try) 2>&5
5651   ac_status=$?
5652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5653   (exit $ac_status); }; }; then
5654   ac_header_compiler=yes
5655 else
5656   echo "$as_me: failed program was:" >&5
5657 sed 's/^/| /' conftest.$ac_ext >&5
5658
5659 ac_header_compiler=no
5660 fi
5661 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5662 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5663 echo "${ECHO_T}$ac_header_compiler" >&6
5664
5665 # Is the header present?
5666 echo "$as_me:$LINENO: checking $ac_header presence" >&5
5667 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5668 cat >conftest.$ac_ext <<_ACEOF
5669 /* confdefs.h.  */
5670 _ACEOF
5671 cat confdefs.h >>conftest.$ac_ext
5672 cat >>conftest.$ac_ext <<_ACEOF
5673 /* end confdefs.h.  */
5674 #include <$ac_header>
5675 _ACEOF
5676 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5677   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5678   ac_status=$?
5679   grep -v '^ *+' conftest.er1 >conftest.err
5680   rm -f conftest.er1
5681   cat conftest.err >&5
5682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5683   (exit $ac_status); } >/dev/null; then
5684   if test -s conftest.err; then
5685     ac_cpp_err=$ac_c_preproc_warn_flag
5686     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5687   else
5688     ac_cpp_err=
5689   fi
5690 else
5691   ac_cpp_err=yes
5692 fi
5693 if test -z "$ac_cpp_err"; then
5694   ac_header_preproc=yes
5695 else
5696   echo "$as_me: failed program was:" >&5
5697 sed 's/^/| /' conftest.$ac_ext >&5
5698
5699   ac_header_preproc=no
5700 fi
5701 rm -f conftest.err conftest.$ac_ext
5702 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5703 echo "${ECHO_T}$ac_header_preproc" >&6
5704
5705 # So?  What about this header?
5706 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5707   yes:no: )
5708     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5709 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5710     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5711 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5712     ac_header_preproc=yes
5713     ;;
5714   no:yes:* )
5715     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5716 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5717     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
5718 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
5719     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5720 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5721     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
5722 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
5723     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5724 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5725     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5726 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5727     (
5728       cat <<\_ASBOX
5729 ## ------------------------------------------ ##
5730 ## Report this to the AC_PACKAGE_NAME lists.  ##
5731 ## ------------------------------------------ ##
5732 _ASBOX
5733     ) |
5734       sed "s/^/$as_me: WARNING:     /" >&2
5735     ;;
5736 esac
5737 echo "$as_me:$LINENO: checking for $ac_header" >&5
5738 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5739 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5740   echo $ECHO_N "(cached) $ECHO_C" >&6
5741 else
5742   eval "$as_ac_Header=\$ac_header_preproc"
5743 fi
5744 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5745 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5746
5747 fi
5748 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5749   cat >>confdefs.h <<_ACEOF
5750 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5751 _ACEOF
5752
5753 fi
5754
5755 done
5756
5757     if test $ac_cv_header_sys_inttypes_h = yes; then
5758       HAVE_SYS_INTTYPES_H=1
5759     else
5760       HAVE_SYS_INTTYPES_H=0
5761     fi
5762
5763     if test $ac_cv_header_sys_bitypes_h = yes; then
5764       HAVE_SYS_BITYPES_H=1
5765     else
5766       HAVE_SYS_BITYPES_H=0
5767     fi
5768
5769
5770
5771   :
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786   for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
5787     echo "$as_me:$LINENO: checking for bit size of $gltype" >&5
5788 echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6
5789 if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\" = set"; then
5790   echo $ECHO_N "(cached) $ECHO_C" >&6
5791 else
5792   if test "$cross_compiling" = yes; then
5793   # Depending upon the size, compute the lo and hi bounds.
5794 cat >conftest.$ac_ext <<_ACEOF
5795 /* confdefs.h.  */
5796 _ACEOF
5797 cat confdefs.h >>conftest.$ac_ext
5798 cat >>conftest.$ac_ext <<_ACEOF
5799 /* end confdefs.h.  */
5800
5801   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5802      included before <wchar.h>.  */
5803   #include <stddef.h>
5804   #include <signal.h>
5805   #if HAVE_WCHAR_H
5806   # include <stdio.h>
5807   # include <time.h>
5808   # include <wchar.h>
5809   #endif
5810
5811 #include <limits.h>
5812 int
5813 main ()
5814 {
5815 static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)];
5816 test_array [0] = 0
5817
5818   ;
5819   return 0;
5820 }
5821 _ACEOF
5822 rm -f conftest.$ac_objext
5823 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5824   (eval $ac_compile) 2>conftest.er1
5825   ac_status=$?
5826   grep -v '^ *+' conftest.er1 >conftest.err
5827   rm -f conftest.er1
5828   cat conftest.err >&5
5829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830   (exit $ac_status); } &&
5831          { ac_try='test -z "$ac_c_werror_flag"
5832                          || test ! -s conftest.err'
5833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5834   (eval $ac_try) 2>&5
5835   ac_status=$?
5836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5837   (exit $ac_status); }; } &&
5838          { ac_try='test -s conftest.$ac_objext'
5839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5840   (eval $ac_try) 2>&5
5841   ac_status=$?
5842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5843   (exit $ac_status); }; }; then
5844   ac_lo=0 ac_mid=0
5845   while :; do
5846     cat >conftest.$ac_ext <<_ACEOF
5847 /* confdefs.h.  */
5848 _ACEOF
5849 cat confdefs.h >>conftest.$ac_ext
5850 cat >>conftest.$ac_ext <<_ACEOF
5851 /* end confdefs.h.  */
5852
5853   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5854      included before <wchar.h>.  */
5855   #include <stddef.h>
5856   #include <signal.h>
5857   #if HAVE_WCHAR_H
5858   # include <stdio.h>
5859   # include <time.h>
5860   # include <wchar.h>
5861   #endif
5862
5863 #include <limits.h>
5864 int
5865 main ()
5866 {
5867 static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
5868 test_array [0] = 0
5869
5870   ;
5871   return 0;
5872 }
5873 _ACEOF
5874 rm -f conftest.$ac_objext
5875 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5876   (eval $ac_compile) 2>conftest.er1
5877   ac_status=$?
5878   grep -v '^ *+' conftest.er1 >conftest.err
5879   rm -f conftest.er1
5880   cat conftest.err >&5
5881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5882   (exit $ac_status); } &&
5883          { ac_try='test -z "$ac_c_werror_flag"
5884                          || test ! -s conftest.err'
5885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5886   (eval $ac_try) 2>&5
5887   ac_status=$?
5888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5889   (exit $ac_status); }; } &&
5890          { ac_try='test -s conftest.$ac_objext'
5891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5892   (eval $ac_try) 2>&5
5893   ac_status=$?
5894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895   (exit $ac_status); }; }; then
5896   ac_hi=$ac_mid; break
5897 else
5898   echo "$as_me: failed program was:" >&5
5899 sed 's/^/| /' conftest.$ac_ext >&5
5900
5901 ac_lo=`expr $ac_mid + 1`
5902                     if test $ac_lo -le $ac_mid; then
5903                       ac_lo= ac_hi=
5904                       break
5905                     fi
5906                     ac_mid=`expr 2 '*' $ac_mid + 1`
5907 fi
5908 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5909   done
5910 else
5911   echo "$as_me: failed program was:" >&5
5912 sed 's/^/| /' conftest.$ac_ext >&5
5913
5914 cat >conftest.$ac_ext <<_ACEOF
5915 /* confdefs.h.  */
5916 _ACEOF
5917 cat confdefs.h >>conftest.$ac_ext
5918 cat >>conftest.$ac_ext <<_ACEOF
5919 /* end confdefs.h.  */
5920
5921   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5922      included before <wchar.h>.  */
5923   #include <stddef.h>
5924   #include <signal.h>
5925   #if HAVE_WCHAR_H
5926   # include <stdio.h>
5927   # include <time.h>
5928   # include <wchar.h>
5929   #endif
5930
5931 #include <limits.h>
5932 int
5933 main ()
5934 {
5935 static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)];
5936 test_array [0] = 0
5937
5938   ;
5939   return 0;
5940 }
5941 _ACEOF
5942 rm -f conftest.$ac_objext
5943 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5944   (eval $ac_compile) 2>conftest.er1
5945   ac_status=$?
5946   grep -v '^ *+' conftest.er1 >conftest.err
5947   rm -f conftest.er1
5948   cat conftest.err >&5
5949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5950   (exit $ac_status); } &&
5951          { ac_try='test -z "$ac_c_werror_flag"
5952                          || test ! -s conftest.err'
5953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5954   (eval $ac_try) 2>&5
5955   ac_status=$?
5956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5957   (exit $ac_status); }; } &&
5958          { ac_try='test -s conftest.$ac_objext'
5959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5960   (eval $ac_try) 2>&5
5961   ac_status=$?
5962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5963   (exit $ac_status); }; }; then
5964   ac_hi=-1 ac_mid=-1
5965   while :; do
5966     cat >conftest.$ac_ext <<_ACEOF
5967 /* confdefs.h.  */
5968 _ACEOF
5969 cat confdefs.h >>conftest.$ac_ext
5970 cat >>conftest.$ac_ext <<_ACEOF
5971 /* end confdefs.h.  */
5972
5973   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5974      included before <wchar.h>.  */
5975   #include <stddef.h>
5976   #include <signal.h>
5977   #if HAVE_WCHAR_H
5978   # include <stdio.h>
5979   # include <time.h>
5980   # include <wchar.h>
5981   #endif
5982
5983 #include <limits.h>
5984 int
5985 main ()
5986 {
5987 static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)];
5988 test_array [0] = 0
5989
5990   ;
5991   return 0;
5992 }
5993 _ACEOF
5994 rm -f conftest.$ac_objext
5995 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5996   (eval $ac_compile) 2>conftest.er1
5997   ac_status=$?
5998   grep -v '^ *+' conftest.er1 >conftest.err
5999   rm -f conftest.er1
6000   cat conftest.err >&5
6001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6002   (exit $ac_status); } &&
6003          { ac_try='test -z "$ac_c_werror_flag"
6004                          || test ! -s conftest.err'
6005   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6006   (eval $ac_try) 2>&5
6007   ac_status=$?
6008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6009   (exit $ac_status); }; } &&
6010          { ac_try='test -s conftest.$ac_objext'
6011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6012   (eval $ac_try) 2>&5
6013   ac_status=$?
6014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6015   (exit $ac_status); }; }; then
6016   ac_lo=$ac_mid; break
6017 else
6018   echo "$as_me: failed program was:" >&5
6019 sed 's/^/| /' conftest.$ac_ext >&5
6020
6021 ac_hi=`expr '(' $ac_mid ')' - 1`
6022                        if test $ac_mid -le $ac_hi; then
6023                          ac_lo= ac_hi=
6024                          break
6025                        fi
6026                        ac_mid=`expr 2 '*' $ac_mid`
6027 fi
6028 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6029   done
6030 else
6031   echo "$as_me: failed program was:" >&5
6032 sed 's/^/| /' conftest.$ac_ext >&5
6033
6034 ac_lo= ac_hi=
6035 fi
6036 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6037 fi
6038 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6039 # Binary search between lo and hi bounds.
6040 while test "x$ac_lo" != "x$ac_hi"; do
6041   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6042   cat >conftest.$ac_ext <<_ACEOF
6043 /* confdefs.h.  */
6044 _ACEOF
6045 cat confdefs.h >>conftest.$ac_ext
6046 cat >>conftest.$ac_ext <<_ACEOF
6047 /* end confdefs.h.  */
6048
6049   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6050      included before <wchar.h>.  */
6051   #include <stddef.h>
6052   #include <signal.h>
6053   #if HAVE_WCHAR_H
6054   # include <stdio.h>
6055   # include <time.h>
6056   # include <wchar.h>
6057   #endif
6058
6059 #include <limits.h>
6060 int
6061 main ()
6062 {
6063 static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
6064 test_array [0] = 0
6065
6066   ;
6067   return 0;
6068 }
6069 _ACEOF
6070 rm -f conftest.$ac_objext
6071 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6072   (eval $ac_compile) 2>conftest.er1
6073   ac_status=$?
6074   grep -v '^ *+' conftest.er1 >conftest.err
6075   rm -f conftest.er1
6076   cat conftest.err >&5
6077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6078   (exit $ac_status); } &&
6079          { ac_try='test -z "$ac_c_werror_flag"
6080                          || test ! -s conftest.err'
6081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6082   (eval $ac_try) 2>&5
6083   ac_status=$?
6084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6085   (exit $ac_status); }; } &&
6086          { ac_try='test -s conftest.$ac_objext'
6087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6088   (eval $ac_try) 2>&5
6089   ac_status=$?
6090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6091   (exit $ac_status); }; }; then
6092   ac_hi=$ac_mid
6093 else
6094   echo "$as_me: failed program was:" >&5
6095 sed 's/^/| /' conftest.$ac_ext >&5
6096
6097 ac_lo=`expr '(' $ac_mid ')' + 1`
6098 fi
6099 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6100 done
6101 case $ac_lo in
6102 ?*) result=$ac_lo;;
6103 '') result=unknown ;;
6104 esac
6105 else
6106   if test "$cross_compiling" = yes; then
6107   { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6108 echo "$as_me: error: in \`$ac_pwd':" >&2;}
6109 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6110 See \`config.log' for more details." >&5
6111 echo "$as_me: error: cannot run test program while cross compiling
6112 See \`config.log' for more details." >&2;}
6113    { (exit 1); exit 1; }; }; }
6114 else
6115   cat >conftest.$ac_ext <<_ACEOF
6116 /* confdefs.h.  */
6117 _ACEOF
6118 cat confdefs.h >>conftest.$ac_ext
6119 cat >>conftest.$ac_ext <<_ACEOF
6120 /* end confdefs.h.  */
6121
6122   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6123      included before <wchar.h>.  */
6124   #include <stddef.h>
6125   #include <signal.h>
6126   #if HAVE_WCHAR_H
6127   # include <stdio.h>
6128   # include <time.h>
6129   # include <wchar.h>
6130   #endif
6131
6132 #include <limits.h>
6133 long longval () { return sizeof ($gltype) * CHAR_BIT; }
6134 unsigned long ulongval () { return sizeof ($gltype) * CHAR_BIT; }
6135 #include <stdio.h>
6136 #include <stdlib.h>
6137 int
6138 main ()
6139 {
6140
6141   FILE *f = fopen ("conftest.val", "w");
6142   if (! f)
6143     exit (1);
6144   if ((sizeof ($gltype) * CHAR_BIT) < 0)
6145     {
6146       long i = longval ();
6147       if (i != (sizeof ($gltype) * CHAR_BIT))
6148         exit (1);
6149       fprintf (f, "%ld\n", i);
6150     }
6151   else
6152     {
6153       unsigned long i = ulongval ();
6154       if (i != (sizeof ($gltype) * CHAR_BIT))
6155         exit (1);
6156       fprintf (f, "%lu\n", i);
6157     }
6158   exit (ferror (f) || fclose (f) != 0);
6159
6160   ;
6161   return 0;
6162 }
6163 _ACEOF
6164 rm -f conftest$ac_exeext
6165 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6166   (eval $ac_link) 2>&5
6167   ac_status=$?
6168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6169   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6171   (eval $ac_try) 2>&5
6172   ac_status=$?
6173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6174   (exit $ac_status); }; }; then
6175   result=`cat conftest.val`
6176 else
6177   echo "$as_me: program exited with status $ac_status" >&5
6178 echo "$as_me: failed program was:" >&5
6179 sed 's/^/| /' conftest.$ac_ext >&5
6180
6181 ( exit $ac_status )
6182 result=unknown
6183 fi
6184 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6185 fi
6186 fi
6187 rm -f conftest.val
6188        eval gl_cv_bitsizeof_${gltype}=\$result
6189
6190 fi
6191 echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&5
6192 echo "${ECHO_T}`eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&6
6193     eval result=\$gl_cv_bitsizeof_${gltype}
6194     if test $result = unknown; then
6195                                                 result=0
6196     fi
6197     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6198     cat >>confdefs.h <<_ACEOF
6199 #define BITSIZEOF_${GLTYPE} $result
6200 _ACEOF
6201
6202     eval BITSIZEOF_${GLTYPE}=\$result
6203   done
6204
6205
6206
6207
6208
6209
6210
6211   for gltype in sig_atomic_t wchar_t wint_t ; do
6212     echo "$as_me:$LINENO: checking whether $gltype is signed" >&5
6213 echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6
6214 if eval "test \"\${gl_cv_type_${gltype}_signed+set}\" = set"; then
6215   echo $ECHO_N "(cached) $ECHO_C" >&6
6216 else
6217   cat >conftest.$ac_ext <<_ACEOF
6218 /* confdefs.h.  */
6219 _ACEOF
6220 cat confdefs.h >>conftest.$ac_ext
6221 cat >>conftest.$ac_ext <<_ACEOF
6222 /* end confdefs.h.  */
6223
6224   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6225      included before <wchar.h>.  */
6226   #include <stddef.h>
6227   #include <signal.h>
6228   #if HAVE_WCHAR_H
6229   # include <stdio.h>
6230   # include <time.h>
6231   # include <wchar.h>
6232   #endif
6233
6234             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6235 int
6236 main ()
6237 {
6238
6239   ;
6240   return 0;
6241 }
6242 _ACEOF
6243 rm -f conftest.$ac_objext
6244 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6245   (eval $ac_compile) 2>conftest.er1
6246   ac_status=$?
6247   grep -v '^ *+' conftest.er1 >conftest.err
6248   rm -f conftest.er1
6249   cat conftest.err >&5
6250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6251   (exit $ac_status); } &&
6252          { ac_try='test -z "$ac_c_werror_flag"
6253                          || test ! -s conftest.err'
6254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6255   (eval $ac_try) 2>&5
6256   ac_status=$?
6257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6258   (exit $ac_status); }; } &&
6259          { ac_try='test -s conftest.$ac_objext'
6260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6261   (eval $ac_try) 2>&5
6262   ac_status=$?
6263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6264   (exit $ac_status); }; }; then
6265   result=yes
6266 else
6267   echo "$as_me: failed program was:" >&5
6268 sed 's/^/| /' conftest.$ac_ext >&5
6269
6270 result=no
6271 fi
6272 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6273        eval gl_cv_type_${gltype}_signed=\$result
6274
6275 fi
6276 echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&5
6277 echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&6
6278     eval result=\$gl_cv_type_${gltype}_signed
6279     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6280     if test "$result" = yes; then
6281       cat >>confdefs.h <<_ACEOF
6282 #define HAVE_SIGNED_${GLTYPE} 1
6283 _ACEOF
6284
6285       eval HAVE_SIGNED_${GLTYPE}=1
6286     else
6287       eval HAVE_SIGNED_${GLTYPE}=0
6288     fi
6289   done
6290
6291
6292   gl_cv_type_ptrdiff_t_signed=yes
6293   gl_cv_type_size_t_signed=no
6294
6295
6296
6297
6298
6299
6300
6301   for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
6302     echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5
6303 echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6
6304 if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\" = set"; then
6305   echo $ECHO_N "(cached) $ECHO_C" >&6
6306 else
6307   eval gl_cv_type_${gltype}_suffix=no
6308        eval result=\$gl_cv_type_${gltype}_signed
6309        if test "$result" = yes; then
6310          glsufu=
6311        else
6312          glsufu=u
6313        fi
6314        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6315          case $glsuf in
6316            '')  gltype1='int';;
6317            l)   gltype1='long int';;
6318            ll)  gltype1='long long int';;
6319            i64) gltype1='__int64';;
6320            u)   gltype1='unsigned int';;
6321            ul)  gltype1='unsigned long int';;
6322            ull) gltype1='unsigned long long int';;
6323            ui64)gltype1='unsigned __int64';;
6324          esac
6325          cat >conftest.$ac_ext <<_ACEOF
6326 /* confdefs.h.  */
6327 _ACEOF
6328 cat confdefs.h >>conftest.$ac_ext
6329 cat >>conftest.$ac_ext <<_ACEOF
6330 /* end confdefs.h.  */
6331
6332   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6333      included before <wchar.h>.  */
6334   #include <stddef.h>
6335   #include <signal.h>
6336   #if HAVE_WCHAR_H
6337   # include <stdio.h>
6338   # include <time.h>
6339   # include <wchar.h>
6340   #endif
6341
6342               extern $gltype foo;
6343               extern $gltype1 foo;
6344 int
6345 main ()
6346 {
6347
6348   ;
6349   return 0;
6350 }
6351 _ACEOF
6352 rm -f conftest.$ac_objext
6353 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6354   (eval $ac_compile) 2>conftest.er1
6355   ac_status=$?
6356   grep -v '^ *+' conftest.er1 >conftest.err
6357   rm -f conftest.er1
6358   cat conftest.err >&5
6359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6360   (exit $ac_status); } &&
6361          { ac_try='test -z "$ac_c_werror_flag"
6362                          || test ! -s conftest.err'
6363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6364   (eval $ac_try) 2>&5
6365   ac_status=$?
6366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6367   (exit $ac_status); }; } &&
6368          { ac_try='test -s conftest.$ac_objext'
6369   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6370   (eval $ac_try) 2>&5
6371   ac_status=$?
6372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6373   (exit $ac_status); }; }; then
6374   eval gl_cv_type_${gltype}_suffix=\$glsuf
6375 else
6376   echo "$as_me: failed program was:" >&5
6377 sed 's/^/| /' conftest.$ac_ext >&5
6378
6379 fi
6380 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6381          eval result=\$gl_cv_type_${gltype}_suffix
6382          test "$result" != no && break
6383        done
6384 fi
6385 echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&5
6386 echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&6
6387     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6388     eval result=\$gl_cv_type_${gltype}_suffix
6389     test "$result" = no && result=
6390     eval ${GLTYPE}_SUFFIX=\$result
6391     cat >>confdefs.h <<_ACEOF
6392 #define ${GLTYPE}_SUFFIX $result
6393 _ACEOF
6394
6395   done
6396
6397
6398
6399     STDINT_H=stdint.h
6400   fi
6401
6402
6403
6404
6405
6406
6407
6408   echo "$as_me:$LINENO: checking whether <wchar.h> is standalone" >&5
6409 echo $ECHO_N "checking whether <wchar.h> is standalone... $ECHO_C" >&6
6410 if test "${gl_cv_header_wchar_h_standalone+set}" = set; then
6411   echo $ECHO_N "(cached) $ECHO_C" >&6
6412 else
6413   cat >conftest.$ac_ext <<_ACEOF
6414 #include <wchar.h>
6415 wchar_t w;
6416 _ACEOF
6417 rm -f conftest.$ac_objext
6418 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6419   (eval $ac_compile) 2>conftest.er1
6420   ac_status=$?
6421   grep -v '^ *+' conftest.er1 >conftest.err
6422   rm -f conftest.er1
6423   cat conftest.err >&5
6424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6425   (exit $ac_status); } &&
6426          { ac_try='test -z "$ac_c_werror_flag"
6427                          || test ! -s conftest.err'
6428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6429   (eval $ac_try) 2>&5
6430   ac_status=$?
6431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6432   (exit $ac_status); }; } &&
6433          { ac_try='test -s conftest.$ac_objext'
6434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6435   (eval $ac_try) 2>&5
6436   ac_status=$?
6437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6438   (exit $ac_status); }; }; then
6439   gl_cv_header_wchar_h_standalone=yes
6440 else
6441   echo "$as_me: failed program was:" >&5
6442 sed 's/^/| /' conftest.$ac_ext >&5
6443
6444 gl_cv_header_wchar_h_standalone=no
6445 fi
6446 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6447 fi
6448 echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5
6449 echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6
6450   if test $gl_cv_header_wchar_h_standalone != yes; then
6451     WCHAR_H=wchar.h
6452   fi
6453
6454
6455   :
6456
6457
6458
6459
6460
6461   if test $ac_cv_header_wchar_h = yes; then
6462     HAVE_WCHAR_H=1
6463   else
6464     HAVE_WCHAR_H=0
6465   fi
6466
6467
6468
6469
6470   :
6471
6472
6473
6474
6475
6476
6477
6478      if test $gl_cv_have_include_next = yes; then
6479        gl_cv_next_wchar_h='<'wchar.h'>'
6480      else
6481        echo "$as_me:$LINENO: checking absolute name of <wchar.h>" >&5
6482 echo $ECHO_N "checking absolute name of <wchar.h>... $ECHO_C" >&6
6483 if test "${gl_cv_next_wchar_h+set}" = set; then
6484   echo $ECHO_N "(cached) $ECHO_C" >&6
6485 else
6486
6487           if test $ac_cv_header_wchar_h = yes; then
6488             cat >conftest.$ac_ext <<_ACEOF
6489 /* confdefs.h.  */
6490 _ACEOF
6491 cat confdefs.h >>conftest.$ac_ext
6492 cat >>conftest.$ac_ext <<_ACEOF
6493 /* end confdefs.h.  */
6494 #include <wchar.h>
6495
6496 _ACEOF
6497                                     gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6498                sed -n '\#/wchar.h#{
6499                  s#.*"\(.*/wchar.h\)".*#\1#
6500                  s#^/[^/]#//&#
6501                  p
6502                  q
6503                }'`'"'
6504           else
6505             gl_cv_next_wchar_h='<'wchar.h'>'
6506           fi
6507
6508 fi
6509 echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5
6510 echo "${ECHO_T}$gl_cv_next_wchar_h" >&6
6511      fi
6512      NEXT_WCHAR_H=$gl_cv_next_wchar_h
6513
6514
6515
6516
6517
6518
6519
6520
6521   gltests_libdeps=
6522   gltests_ltlibdeps=
6523
6524
6525
6526   gl_source_base='tests'
6527
6528
6529
6530
6531   LIBGNU_LIBDEPS="$gl_libdeps"
6532
6533   LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
6534
6535
6536
6537 # For Makefile dependencies.
6538 GNULIB_STDINT_H=
6539 if test x"$STDINT_H" != x; then
6540   GNULIB_STDINT_H=gnulib/$STDINT_H
6541 fi
6542
6543
6544 PACKAGE=gdb
6545
6546 cat >>confdefs.h <<_ACEOF
6547 #define PACKAGE "$PACKAGE"
6548 _ACEOF
6549
6550
6551
6552 # GDB does not use automake, but gnulib does.  This line lets us
6553 # generate its Makefile.in.
6554 am__api_version="1.9"
6555 # Find a good install program.  We prefer a C program (faster),
6556 # so one script is as good as another.  But avoid the broken or
6557 # incompatible versions:
6558 # SysV /etc/install, /usr/sbin/install
6559 # SunOS /usr/etc/install
6560 # IRIX /sbin/install
6561 # AIX /bin/install
6562 # AmigaOS /C/install, which installs bootblocks on floppy discs
6563 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6564 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6565 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6566 # OS/2's system install, which has a completely different semantic
6567 # ./install, which can be erroneously created by make from ./install.sh.
6568 # Reject install programs that cannot install multiple files.
6569 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
6570 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
6571 if test -z "$INSTALL"; then
6572 if test "${ac_cv_path_install+set}" = set; then
6573   echo $ECHO_N "(cached) $ECHO_C" >&6
6574 else
6575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6576 for as_dir in $PATH
6577 do
6578   IFS=$as_save_IFS
6579   test -z "$as_dir" && as_dir=.
6580   # Account for people who put trailing slashes in PATH elements.
6581 case $as_dir/ in
6582   ./ | .// | /cC/* | \
6583   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6584   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
6585   /usr/ucb/* ) ;;
6586   *)
6587     # OSF1 and SCO ODT 3.0 have their own names for install.
6588     # Don't use installbsd from OSF since it installs stuff as root
6589     # by default.
6590     for ac_prog in ginstall scoinst install; do
6591       for ac_exec_ext in '' $ac_executable_extensions; do
6592         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6593           if test $ac_prog = install &&
6594             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6595             # AIX install.  It has an incompatible calling convention.
6596             :
6597           elif test $ac_prog = install &&
6598             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6599             # program-specific install script used by HP pwplus--don't use.
6600             :
6601           else
6602             rm -rf conftest.one conftest.two conftest.dir
6603             echo one > conftest.one
6604             echo two > conftest.two
6605             mkdir conftest.dir
6606             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6607               test -s conftest.one && test -s conftest.two &&
6608               test -s conftest.dir/conftest.one &&
6609               test -s conftest.dir/conftest.two
6610             then
6611               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6612               break 3
6613             fi
6614           fi
6615         fi
6616       done
6617     done
6618     ;;
6619 esac
6620 done
6621
6622 rm -rf conftest.one conftest.two conftest.dir
6623
6624 fi
6625   if test "${ac_cv_path_install+set}" = set; then
6626     INSTALL=$ac_cv_path_install
6627   else
6628     # As a last resort, use the slow shell script.  Don't cache a
6629     # value for INSTALL within a source directory, because that will
6630     # break other packages using the cache if that directory is
6631     # removed, or if the value is a relative name.
6632     INSTALL=$ac_install_sh
6633   fi
6634 fi
6635 echo "$as_me:$LINENO: result: $INSTALL" >&5
6636 echo "${ECHO_T}$INSTALL" >&6
6637
6638 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6639 # It thinks the first close brace ends the variable substitution.
6640 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6641
6642 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6643
6644 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6645
6646 echo "$as_me:$LINENO: checking whether build environment is sane" >&5
6647 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
6648 # Just in case
6649 sleep 1
6650 echo timestamp > conftest.file
6651 # Do `set' in a subshell so we don't clobber the current shell's
6652 # arguments.  Must try -L first in case configure is actually a
6653 # symlink; some systems play weird games with the mod time of symlinks
6654 # (eg FreeBSD returns the mod time of the symlink's containing
6655 # directory).
6656 if (
6657    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6658    if test "$*" = "X"; then
6659       # -L didn't work.
6660       set X `ls -t $srcdir/configure conftest.file`
6661    fi
6662    rm -f conftest.file
6663    if test "$*" != "X $srcdir/configure conftest.file" \
6664       && test "$*" != "X conftest.file $srcdir/configure"; then
6665
6666       # If neither matched, then we have a broken ls.  This can happen
6667       # if, for instance, CONFIG_SHELL is bash and it inherits a
6668       # broken ls alias from the environment.  This has actually
6669       # happened.  Such a system could not be considered "sane".
6670       { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
6671 alias in your environment" >&5
6672 echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
6673 alias in your environment" >&2;}
6674    { (exit 1); exit 1; }; }
6675    fi
6676
6677    test "$2" = conftest.file
6678    )
6679 then
6680    # Ok.
6681    :
6682 else
6683    { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
6684 Check your system clock" >&5
6685 echo "$as_me: error: newly created file is older than distributed files!
6686 Check your system clock" >&2;}
6687    { (exit 1); exit 1; }; }
6688 fi
6689 echo "$as_me:$LINENO: result: yes" >&5
6690 echo "${ECHO_T}yes" >&6
6691 test "$program_prefix" != NONE &&
6692   program_transform_name="s,^,$program_prefix,;$program_transform_name"
6693 # Use a double $ so make ignores it.
6694 test "$program_suffix" != NONE &&
6695   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
6696 # Double any \ or $.  echo might interpret backslashes.
6697 # By default was `s,x,x', remove it if useless.
6698 cat <<\_ACEOF >conftest.sed
6699 s/[\\$]/&&/g;s/;s,x,x,$//
6700 _ACEOF
6701 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
6702 rm conftest.sed
6703
6704 # expand $ac_aux_dir to an absolute path
6705 am_aux_dir=`cd $ac_aux_dir && pwd`
6706
6707 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6708 # Use eval to expand $SHELL
6709 if eval "$MISSING --run true"; then
6710   am_missing_run="$MISSING --run "
6711 else
6712   am_missing_run=
6713   { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
6714 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
6715 fi
6716
6717 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6718   # We used to keeping the `.' as first argument, in order to
6719   # allow $(mkdir_p) to be used without argument.  As in
6720   #   $(mkdir_p) $(somedir)
6721   # where $(somedir) is conditionally defined.  However this is wrong
6722   # for two reasons:
6723   #  1. if the package is installed by a user who cannot write `.'
6724   #     make install will fail,
6725   #  2. the above comment should most certainly read
6726   #     $(mkdir_p) $(DESTDIR)$(somedir)
6727   #     so it does not work when $(somedir) is undefined and
6728   #     $(DESTDIR) is not.
6729   #  To support the latter case, we have to write
6730   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6731   #  so the `.' trick is pointless.
6732   mkdir_p='mkdir -p --'
6733 else
6734   # On NextStep and OpenStep, the `mkdir' command does not
6735   # recognize any option.  It will interpret all options as
6736   # directories to create, and then abort because `.' already
6737   # exists.
6738   for d in ./-p ./--version;
6739   do
6740     test -d $d && rmdir $d
6741   done
6742   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6743   if test -f "$ac_aux_dir/mkinstalldirs"; then
6744     mkdir_p='$(mkinstalldirs)'
6745   else
6746     mkdir_p='$(install_sh) -d'
6747   fi
6748 fi
6749
6750 for ac_prog in gawk mawk nawk awk
6751 do
6752   # Extract the first word of "$ac_prog", so it can be a program name with args.
6753 set dummy $ac_prog; ac_word=$2
6754 echo "$as_me:$LINENO: checking for $ac_word" >&5
6755 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6756 if test "${ac_cv_prog_AWK+set}" = set; then
6757   echo $ECHO_N "(cached) $ECHO_C" >&6
6758 else
6759   if test -n "$AWK"; then
6760   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6761 else
6762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6763 for as_dir in $PATH
6764 do
6765   IFS=$as_save_IFS
6766   test -z "$as_dir" && as_dir=.
6767   for ac_exec_ext in '' $ac_executable_extensions; do
6768   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6769     ac_cv_prog_AWK="$ac_prog"
6770     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6771     break 2
6772   fi
6773 done
6774 done
6775
6776 fi
6777 fi
6778 AWK=$ac_cv_prog_AWK
6779 if test -n "$AWK"; then
6780   echo "$as_me:$LINENO: result: $AWK" >&5
6781 echo "${ECHO_T}$AWK" >&6
6782 else
6783   echo "$as_me:$LINENO: result: no" >&5
6784 echo "${ECHO_T}no" >&6
6785 fi
6786
6787   test -n "$AWK" && break
6788 done
6789
6790           ac_config_commands="$ac_config_commands depfiles"
6791
6792
6793 am_make=${MAKE-make}
6794 cat > confinc << 'END'
6795 am__doit:
6796         @echo done
6797 .PHONY: am__doit
6798 END
6799 # If we don't find an include directive, just comment out the code.
6800 echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
6801 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
6802 am__include="#"
6803 am__quote=
6804 _am_result=none
6805 # First try GNU make style include.
6806 echo "include confinc" > confmf
6807 # We grep out `Entering directory' and `Leaving directory'
6808 # messages which can occur if `w' ends up in MAKEFLAGS.
6809 # In particular we don't look at `^make:' because GNU make might
6810 # be invoked under some other name (usually "gmake"), in which
6811 # case it prints its new name instead of `make'.
6812 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6813    am__include=include
6814    am__quote=
6815    _am_result=GNU
6816 fi
6817 # Now try BSD make style include.
6818 if test "$am__include" = "#"; then
6819    echo '.include "confinc"' > confmf
6820    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6821       am__include=.include
6822       am__quote="\""
6823       _am_result=BSD
6824    fi
6825 fi
6826
6827
6828 echo "$as_me:$LINENO: result: $_am_result" >&5
6829 echo "${ECHO_T}$_am_result" >&6
6830 rm -f confinc confmf
6831
6832 # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
6833 if test "${enable_dependency_tracking+set}" = set; then
6834   enableval="$enable_dependency_tracking"
6835
6836 fi;
6837 if test "x$enable_dependency_tracking" != xno; then
6838   am_depcomp="$ac_aux_dir/depcomp"
6839   AMDEPBACKSLASH='\'
6840 fi
6841
6842
6843 if test "x$enable_dependency_tracking" != xno; then
6844   AMDEP_TRUE=
6845   AMDEP_FALSE='#'
6846 else
6847   AMDEP_TRUE='#'
6848   AMDEP_FALSE=
6849 fi
6850
6851
6852
6853 # test to see if srcdir already configured
6854 if test "`cd $srcdir && pwd`" != "`pwd`" &&
6855    test -f $srcdir/config.status; then
6856   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
6857 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
6858    { (exit 1); exit 1; }; }
6859 fi
6860
6861 # test whether we have cygpath
6862 if test -z "$CYGPATH_W"; then
6863   if (cygpath --version) >/dev/null 2>/dev/null; then
6864     CYGPATH_W='cygpath -w'
6865   else
6866     CYGPATH_W=echo
6867   fi
6868 fi
6869
6870
6871 # Define the identity of the package.
6872  PACKAGE=gdb
6873  VERSION=UNUSED-VERSION
6874
6875
6876 # Some tools Automake needs.
6877
6878 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6879
6880
6881 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6882
6883
6884 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6885
6886
6887 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6888
6889
6890 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6891
6892 install_sh=${install_sh-"$am_aux_dir/install-sh"}
6893
6894 # Installed binaries are usually stripped using `strip' when the user
6895 # run `make install-strip'.  However `strip' might not be the right
6896 # tool to use in cross-compilation environments, therefore Automake
6897 # will honor the `STRIP' environment variable to overrule this program.
6898 if test "$cross_compiling" != no; then
6899   if test -n "$ac_tool_prefix"; then
6900   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6901 set dummy ${ac_tool_prefix}strip; ac_word=$2
6902 echo "$as_me:$LINENO: checking for $ac_word" >&5
6903 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6904 if test "${ac_cv_prog_STRIP+set}" = set; then
6905   echo $ECHO_N "(cached) $ECHO_C" >&6
6906 else
6907   if test -n "$STRIP"; then
6908   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6909 else
6910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6911 for as_dir in $PATH
6912 do
6913   IFS=$as_save_IFS
6914   test -z "$as_dir" && as_dir=.
6915   for ac_exec_ext in '' $ac_executable_extensions; do
6916   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6917     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6918     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6919     break 2
6920   fi
6921 done
6922 done
6923
6924 fi
6925 fi
6926 STRIP=$ac_cv_prog_STRIP
6927 if test -n "$STRIP"; then
6928   echo "$as_me:$LINENO: result: $STRIP" >&5
6929 echo "${ECHO_T}$STRIP" >&6
6930 else
6931   echo "$as_me:$LINENO: result: no" >&5
6932 echo "${ECHO_T}no" >&6
6933 fi
6934
6935 fi
6936 if test -z "$ac_cv_prog_STRIP"; then
6937   ac_ct_STRIP=$STRIP
6938   # Extract the first word of "strip", so it can be a program name with args.
6939 set dummy strip; ac_word=$2
6940 echo "$as_me:$LINENO: checking for $ac_word" >&5
6941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6942 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6943   echo $ECHO_N "(cached) $ECHO_C" >&6
6944 else
6945   if test -n "$ac_ct_STRIP"; then
6946   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6947 else
6948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6949 for as_dir in $PATH
6950 do
6951   IFS=$as_save_IFS
6952   test -z "$as_dir" && as_dir=.
6953   for ac_exec_ext in '' $ac_executable_extensions; do
6954   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6955     ac_cv_prog_ac_ct_STRIP="strip"
6956     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6957     break 2
6958   fi
6959 done
6960 done
6961
6962   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
6963 fi
6964 fi
6965 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6966 if test -n "$ac_ct_STRIP"; then
6967   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6968 echo "${ECHO_T}$ac_ct_STRIP" >&6
6969 else
6970   echo "$as_me:$LINENO: result: no" >&5
6971 echo "${ECHO_T}no" >&6
6972 fi
6973
6974   STRIP=$ac_ct_STRIP
6975 else
6976   STRIP="$ac_cv_prog_STRIP"
6977 fi
6978
6979 fi
6980 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
6981
6982 # We need awk for the "check" target.  The system "awk" is bad on
6983 # some platforms.
6984 # Always define AMTAR for backward compatibility.
6985
6986 AMTAR=${AMTAR-"${am_missing_run}tar"}
6987
6988 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
6989
6990
6991
6992
6993 depcc="$CC"   am_compiler_list=
6994
6995 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
6996 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
6997 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
6998   echo $ECHO_N "(cached) $ECHO_C" >&6
6999 else
7000   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7001   # We make a subdir and do the tests there.  Otherwise we can end up
7002   # making bogus files that we don't know about and never remove.  For
7003   # instance it was reported that on HP-UX the gcc test will end up
7004   # making a dummy file named `D' -- because `-MD' means `put the output
7005   # in D'.
7006   mkdir conftest.dir
7007   # Copy depcomp to subdir because otherwise we won't find it if we're
7008   # using a relative directory.
7009   cp "$am_depcomp" conftest.dir
7010   cd conftest.dir
7011   # We will build objects and dependencies in a subdirectory because
7012   # it helps to detect inapplicable dependency modes.  For instance
7013   # both Tru64's cc and ICC support -MD to output dependencies as a
7014   # side effect of compilation, but ICC will put the dependencies in
7015   # the current directory while Tru64 will put them in the object
7016   # directory.
7017   mkdir sub
7018
7019   am_cv_CC_dependencies_compiler_type=none
7020   if test "$am_compiler_list" = ""; then
7021      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7022   fi
7023   for depmode in $am_compiler_list; do
7024     # Setup a source with many dependencies, because some compilers
7025     # like to wrap large dependency lists on column 80 (with \), and
7026     # we should not choose a depcomp mode which is confused by this.
7027     #
7028     # We need to recreate these files for each test, as the compiler may
7029     # overwrite some of them when testing with obscure command lines.
7030     # This happens at least with the AIX C compiler.
7031     : > sub/conftest.c
7032     for i in 1 2 3 4 5 6; do
7033       echo '#include "conftst'$i'.h"' >> sub/conftest.c
7034       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7035       # Solaris 8's {/usr,}/bin/sh.
7036       touch sub/conftst$i.h
7037     done
7038     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7039
7040     case $depmode in
7041     nosideeffect)
7042       # after this tag, mechanisms are not by side-effect, so they'll
7043       # only be used when explicitly requested
7044       if test "x$enable_dependency_tracking" = xyes; then
7045         continue
7046       else
7047         break
7048       fi
7049       ;;
7050     none) break ;;
7051     esac
7052     # We check with `-c' and `-o' for the sake of the "dashmstdout"
7053     # mode.  It turns out that the SunPro C++ compiler does not properly
7054     # handle `-M -o', and we need to detect this.
7055     if depmode=$depmode \
7056        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7057        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7058        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7059          >/dev/null 2>conftest.err &&
7060        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7061        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7062        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7063       # icc doesn't choke on unknown options, it will just issue warnings
7064       # or remarks (even with -Werror).  So we grep stderr for any message
7065       # that says an option was ignored or not supported.
7066       # When given -MP, icc 7.0 and 7.1 complain thusly:
7067       #   icc: Command line warning: ignoring option '-M'; no argument required
7068       # The diagnosis changed in icc 8.0:
7069       #   icc: Command line remark: option '-MP' not supported
7070       if (grep 'ignoring option' conftest.err ||
7071           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7072         am_cv_CC_dependencies_compiler_type=$depmode
7073         break
7074       fi
7075     fi
7076   done
7077
7078   cd ..
7079   rm -rf conftest.dir
7080 else
7081   am_cv_CC_dependencies_compiler_type=none
7082 fi
7083
7084 fi
7085 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
7086 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
7087 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7088
7089
7090
7091 if
7092   test "x$enable_dependency_tracking" != xno \
7093   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7094   am__fastdepCC_TRUE=
7095   am__fastdepCC_FALSE='#'
7096 else
7097   am__fastdepCC_TRUE='#'
7098   am__fastdepCC_FALSE=
7099 fi
7100
7101
7102
7103
7104 debugdir=${libdir}/debug
7105
7106
7107 # Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
7108 if test "${with_separate_debug_dir+set}" = set; then
7109   withval="$with_separate_debug_dir"
7110   debugdir="${withval}"
7111 fi;
7112
7113
7114   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7115   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7116   ac_define_dir=`eval echo $debugdir`
7117   ac_define_dir=`eval echo $ac_define_dir`
7118
7119 cat >>confdefs.h <<_ACEOF
7120 #define DEBUGDIR "$ac_define_dir"
7121 _ACEOF
7122
7123
7124 #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
7125
7126 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7127   if test "x$prefix" = xNONE; then
7128     test_prefix=/usr/local
7129   else
7130     test_prefix=$prefix
7131   fi
7132 else
7133   test_prefix=$exec_prefix
7134 fi
7135 case ${debugdir} in
7136 "${test_prefix}"|"${test_prefix}/"*|\
7137 '${exec_prefix}'|'${exec_prefix}/'*)
7138
7139 cat >>confdefs.h <<\_ACEOF
7140 #define DEBUGDIR_RELOCATABLE 1
7141 _ACEOF
7142
7143   ;;
7144 esac
7145
7146
7147 # Check whether --with-relocated-sources or --without-relocated-sources was given.
7148 if test "${with_relocated_sources+set}" = set; then
7149   withval="$with_relocated_sources"
7150   reloc_srcdir="${withval}"
7151
7152   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7153   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7154   ac_define_dir=`eval echo $reloc_srcdir`
7155   ac_define_dir=`eval echo $ac_define_dir`
7156
7157 cat >>confdefs.h <<_ACEOF
7158 #define RELOC_SRCDIR "$ac_define_dir"
7159 _ACEOF
7160
7161
7162
7163 fi;
7164
7165
7166
7167 subdirs="$subdirs doc testsuite"
7168
7169
7170 # Check whether to support alternative target configurations
7171 # Check whether --enable-targets or --disable-targets was given.
7172 if test "${enable_targets+set}" = set; then
7173   enableval="$enable_targets"
7174   case "${enableval}" in
7175   yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
7176 echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
7177    { (exit 1); exit 1; }; }
7178             ;;
7179   no)       enable_targets= ;;
7180   *)        enable_targets=$enableval ;;
7181 esac
7182 fi;
7183
7184 # Check whether to enable 64-bit support on 32-bit hosts
7185 # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
7186 if test "${enable_64_bit_bfd+set}" = set; then
7187   enableval="$enable_64_bit_bfd"
7188   case "${enableval}" in
7189   yes)  want64=true  ;;
7190   no)   want64=false ;;
7191   *)    { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
7192 echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
7193    { (exit 1); exit 1; }; } ;;
7194 esac
7195 else
7196   want64=false
7197 fi;
7198 # Provide defaults for some variables set by the per-host and per-target
7199 # configuration.
7200 gdb_host_obs=posix-hdep.o
7201
7202 if test "${target}" = "${host}"; then
7203   gdb_native=yes
7204 else
7205   gdb_native=no
7206 fi
7207
7208 . $srcdir/configure.host
7209
7210 # Accumulate some settings from configure.tgt over all enabled targets
7211
7212 TARGET_OBS=
7213 all_targets=
7214
7215 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
7216 do
7217   if test "$targ_alias" = "all"; then
7218     all_targets=true
7219   else
7220     # Canonicalize the secondary target names.
7221     result=`$ac_config_sub $targ_alias 2>/dev/null`
7222     if test -n "$result"; then
7223         targ=$result
7224     else
7225         targ=$targ_alias
7226     fi
7227
7228     . ${srcdir}/configure.tgt
7229
7230     # Target-specific object files
7231     for i in ${gdb_target_obs}; do
7232         case " $TARGET_OBS " in
7233         *" ${i} "*) ;;
7234         *)
7235           TARGET_OBS="$TARGET_OBS ${i}"
7236           ;;
7237         esac
7238     done
7239
7240     # Check whether this target needs 64-bit CORE_ADDR
7241     if test x${want64} = xfalse; then
7242       . ${srcdir}/../bfd/config.bfd
7243     fi
7244   fi
7245 done
7246
7247 if test x${all_targets} = xtrue; then
7248
7249   # We want all 64-bit targets if we either:
7250   #  - run on a 64-bit host  or
7251   #  - already require 64-bit support for some other target  or
7252   #  - the --enable-64-bit-bfd option was supplied
7253   # Otherwise we only support all 32-bit targets.
7254   #
7255   # NOTE: This test must be in sync with the corresponding
7256   #       tests in BFD!
7257
7258   if test x${want64} = xfalse; then
7259     echo "$as_me:$LINENO: checking for long" >&5
7260 echo $ECHO_N "checking for long... $ECHO_C" >&6
7261 if test "${ac_cv_type_long+set}" = set; then
7262   echo $ECHO_N "(cached) $ECHO_C" >&6
7263 else
7264   cat >conftest.$ac_ext <<_ACEOF
7265 /* confdefs.h.  */
7266 _ACEOF
7267 cat confdefs.h >>conftest.$ac_ext
7268 cat >>conftest.$ac_ext <<_ACEOF
7269 /* end confdefs.h.  */
7270 $ac_includes_default
7271 int
7272 main ()
7273 {
7274 if ((long *) 0)
7275   return 0;
7276 if (sizeof (long))
7277   return 0;
7278   ;
7279   return 0;
7280 }
7281 _ACEOF
7282 rm -f conftest.$ac_objext
7283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7284   (eval $ac_compile) 2>conftest.er1
7285   ac_status=$?
7286   grep -v '^ *+' conftest.er1 >conftest.err
7287   rm -f conftest.er1
7288   cat conftest.err >&5
7289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7290   (exit $ac_status); } &&
7291          { ac_try='test -z "$ac_c_werror_flag"
7292                          || test ! -s conftest.err'
7293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7294   (eval $ac_try) 2>&5
7295   ac_status=$?
7296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7297   (exit $ac_status); }; } &&
7298          { ac_try='test -s conftest.$ac_objext'
7299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7300   (eval $ac_try) 2>&5
7301   ac_status=$?
7302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7303   (exit $ac_status); }; }; then
7304   ac_cv_type_long=yes
7305 else
7306   echo "$as_me: failed program was:" >&5
7307 sed 's/^/| /' conftest.$ac_ext >&5
7308
7309 ac_cv_type_long=no
7310 fi
7311 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7312 fi
7313 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7314 echo "${ECHO_T}$ac_cv_type_long" >&6
7315
7316 echo "$as_me:$LINENO: checking size of long" >&5
7317 echo $ECHO_N "checking size of long... $ECHO_C" >&6
7318 if test "${ac_cv_sizeof_long+set}" = set; then
7319   echo $ECHO_N "(cached) $ECHO_C" >&6
7320 else
7321   if test "$ac_cv_type_long" = yes; then
7322   # The cast to unsigned long works around a bug in the HP C Compiler
7323   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7324   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7325   # This bug is HP SR number 8606223364.
7326   if test "$cross_compiling" = yes; then
7327   # Depending upon the size, compute the lo and hi bounds.
7328 cat >conftest.$ac_ext <<_ACEOF
7329 /* confdefs.h.  */
7330 _ACEOF
7331 cat confdefs.h >>conftest.$ac_ext
7332 cat >>conftest.$ac_ext <<_ACEOF
7333 /* end confdefs.h.  */
7334 $ac_includes_default
7335 int
7336 main ()
7337 {
7338 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
7339 test_array [0] = 0
7340
7341   ;
7342   return 0;
7343 }
7344 _ACEOF
7345 rm -f conftest.$ac_objext
7346 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7347   (eval $ac_compile) 2>conftest.er1
7348   ac_status=$?
7349   grep -v '^ *+' conftest.er1 >conftest.err
7350   rm -f conftest.er1
7351   cat conftest.err >&5
7352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7353   (exit $ac_status); } &&
7354          { ac_try='test -z "$ac_c_werror_flag"
7355                          || test ! -s conftest.err'
7356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7357   (eval $ac_try) 2>&5
7358   ac_status=$?
7359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7360   (exit $ac_status); }; } &&
7361          { ac_try='test -s conftest.$ac_objext'
7362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7363   (eval $ac_try) 2>&5
7364   ac_status=$?
7365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7366   (exit $ac_status); }; }; then
7367   ac_lo=0 ac_mid=0
7368   while :; do
7369     cat >conftest.$ac_ext <<_ACEOF
7370 /* confdefs.h.  */
7371 _ACEOF
7372 cat confdefs.h >>conftest.$ac_ext
7373 cat >>conftest.$ac_ext <<_ACEOF
7374 /* end confdefs.h.  */
7375 $ac_includes_default
7376 int
7377 main ()
7378 {
7379 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7380 test_array [0] = 0
7381
7382   ;
7383   return 0;
7384 }
7385 _ACEOF
7386 rm -f conftest.$ac_objext
7387 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7388   (eval $ac_compile) 2>conftest.er1
7389   ac_status=$?
7390   grep -v '^ *+' conftest.er1 >conftest.err
7391   rm -f conftest.er1
7392   cat conftest.err >&5
7393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7394   (exit $ac_status); } &&
7395          { ac_try='test -z "$ac_c_werror_flag"
7396                          || test ! -s conftest.err'
7397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7398   (eval $ac_try) 2>&5
7399   ac_status=$?
7400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7401   (exit $ac_status); }; } &&
7402          { ac_try='test -s conftest.$ac_objext'
7403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7404   (eval $ac_try) 2>&5
7405   ac_status=$?
7406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7407   (exit $ac_status); }; }; then
7408   ac_hi=$ac_mid; break
7409 else
7410   echo "$as_me: failed program was:" >&5
7411 sed 's/^/| /' conftest.$ac_ext >&5
7412
7413 ac_lo=`expr $ac_mid + 1`
7414                     if test $ac_lo -le $ac_mid; then
7415                       ac_lo= ac_hi=
7416                       break
7417                     fi
7418                     ac_mid=`expr 2 '*' $ac_mid + 1`
7419 fi
7420 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7421   done
7422 else
7423   echo "$as_me: failed program was:" >&5
7424 sed 's/^/| /' conftest.$ac_ext >&5
7425
7426 cat >conftest.$ac_ext <<_ACEOF
7427 /* confdefs.h.  */
7428 _ACEOF
7429 cat confdefs.h >>conftest.$ac_ext
7430 cat >>conftest.$ac_ext <<_ACEOF
7431 /* end confdefs.h.  */
7432 $ac_includes_default
7433 int
7434 main ()
7435 {
7436 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
7437 test_array [0] = 0
7438
7439   ;
7440   return 0;
7441 }
7442 _ACEOF
7443 rm -f conftest.$ac_objext
7444 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7445   (eval $ac_compile) 2>conftest.er1
7446   ac_status=$?
7447   grep -v '^ *+' conftest.er1 >conftest.err
7448   rm -f conftest.er1
7449   cat conftest.err >&5
7450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7451   (exit $ac_status); } &&
7452          { ac_try='test -z "$ac_c_werror_flag"
7453                          || test ! -s conftest.err'
7454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7455   (eval $ac_try) 2>&5
7456   ac_status=$?
7457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7458   (exit $ac_status); }; } &&
7459          { ac_try='test -s conftest.$ac_objext'
7460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7461   (eval $ac_try) 2>&5
7462   ac_status=$?
7463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7464   (exit $ac_status); }; }; then
7465   ac_hi=-1 ac_mid=-1
7466   while :; do
7467     cat >conftest.$ac_ext <<_ACEOF
7468 /* confdefs.h.  */
7469 _ACEOF
7470 cat confdefs.h >>conftest.$ac_ext
7471 cat >>conftest.$ac_ext <<_ACEOF
7472 /* end confdefs.h.  */
7473 $ac_includes_default
7474 int
7475 main ()
7476 {
7477 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
7478 test_array [0] = 0
7479
7480   ;
7481   return 0;
7482 }
7483 _ACEOF
7484 rm -f conftest.$ac_objext
7485 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7486   (eval $ac_compile) 2>conftest.er1
7487   ac_status=$?
7488   grep -v '^ *+' conftest.er1 >conftest.err
7489   rm -f conftest.er1
7490   cat conftest.err >&5
7491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7492   (exit $ac_status); } &&
7493          { ac_try='test -z "$ac_c_werror_flag"
7494                          || test ! -s conftest.err'
7495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7496   (eval $ac_try) 2>&5
7497   ac_status=$?
7498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7499   (exit $ac_status); }; } &&
7500          { ac_try='test -s conftest.$ac_objext'
7501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7502   (eval $ac_try) 2>&5
7503   ac_status=$?
7504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7505   (exit $ac_status); }; }; then
7506   ac_lo=$ac_mid; break
7507 else
7508   echo "$as_me: failed program was:" >&5
7509 sed 's/^/| /' conftest.$ac_ext >&5
7510
7511 ac_hi=`expr '(' $ac_mid ')' - 1`
7512                        if test $ac_mid -le $ac_hi; then
7513                          ac_lo= ac_hi=
7514                          break
7515                        fi
7516                        ac_mid=`expr 2 '*' $ac_mid`
7517 fi
7518 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7519   done
7520 else
7521   echo "$as_me: failed program was:" >&5
7522 sed 's/^/| /' conftest.$ac_ext >&5
7523
7524 ac_lo= ac_hi=
7525 fi
7526 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7527 fi
7528 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7529 # Binary search between lo and hi bounds.
7530 while test "x$ac_lo" != "x$ac_hi"; do
7531   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7532   cat >conftest.$ac_ext <<_ACEOF
7533 /* confdefs.h.  */
7534 _ACEOF
7535 cat confdefs.h >>conftest.$ac_ext
7536 cat >>conftest.$ac_ext <<_ACEOF
7537 /* end confdefs.h.  */
7538 $ac_includes_default
7539 int
7540 main ()
7541 {
7542 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7543 test_array [0] = 0
7544
7545   ;
7546   return 0;
7547 }
7548 _ACEOF
7549 rm -f conftest.$ac_objext
7550 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7551   (eval $ac_compile) 2>conftest.er1
7552   ac_status=$?
7553   grep -v '^ *+' conftest.er1 >conftest.err
7554   rm -f conftest.er1
7555   cat conftest.err >&5
7556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7557   (exit $ac_status); } &&
7558          { ac_try='test -z "$ac_c_werror_flag"
7559                          || test ! -s conftest.err'
7560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7561   (eval $ac_try) 2>&5
7562   ac_status=$?
7563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7564   (exit $ac_status); }; } &&
7565          { ac_try='test -s conftest.$ac_objext'
7566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7567   (eval $ac_try) 2>&5
7568   ac_status=$?
7569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7570   (exit $ac_status); }; }; then
7571   ac_hi=$ac_mid
7572 else
7573   echo "$as_me: failed program was:" >&5
7574 sed 's/^/| /' conftest.$ac_ext >&5
7575
7576 ac_lo=`expr '(' $ac_mid ')' + 1`
7577 fi
7578 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7579 done
7580 case $ac_lo in
7581 ?*) ac_cv_sizeof_long=$ac_lo;;
7582 '') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7583 echo "$as_me: error: in \`$ac_pwd':" >&2;}
7584 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7585 See \`config.log' for more details." >&5
7586 echo "$as_me: error: cannot compute sizeof (long), 77
7587 See \`config.log' for more details." >&2;}
7588    { (exit 1); exit 1; }; }; } ;;
7589 esac
7590 else
7591   if test "$cross_compiling" = yes; then
7592   { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7593 echo "$as_me: error: in \`$ac_pwd':" >&2;}
7594 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7595 See \`config.log' for more details." >&5
7596 echo "$as_me: error: cannot run test program while cross compiling
7597 See \`config.log' for more details." >&2;}
7598    { (exit 1); exit 1; }; }; }
7599 else
7600   cat >conftest.$ac_ext <<_ACEOF
7601 /* confdefs.h.  */
7602 _ACEOF
7603 cat confdefs.h >>conftest.$ac_ext
7604 cat >>conftest.$ac_ext <<_ACEOF
7605 /* end confdefs.h.  */
7606 $ac_includes_default
7607 long longval () { return (long) (sizeof (long)); }
7608 unsigned long ulongval () { return (long) (sizeof (long)); }
7609 #include <stdio.h>
7610 #include <stdlib.h>
7611 int
7612 main ()
7613 {
7614
7615   FILE *f = fopen ("conftest.val", "w");
7616   if (! f)
7617     exit (1);
7618   if (((long) (sizeof (long))) < 0)
7619     {
7620       long i = longval ();
7621       if (i != ((long) (sizeof (long))))
7622         exit (1);
7623       fprintf (f, "%ld\n", i);
7624     }
7625   else
7626     {
7627       unsigned long i = ulongval ();
7628       if (i != ((long) (sizeof (long))))
7629         exit (1);
7630       fprintf (f, "%lu\n", i);
7631     }
7632   exit (ferror (f) || fclose (f) != 0);
7633
7634   ;
7635   return 0;
7636 }
7637 _ACEOF
7638 rm -f conftest$ac_exeext
7639 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7640   (eval $ac_link) 2>&5
7641   ac_status=$?
7642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7643   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7645   (eval $ac_try) 2>&5
7646   ac_status=$?
7647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7648   (exit $ac_status); }; }; then
7649   ac_cv_sizeof_long=`cat conftest.val`
7650 else
7651   echo "$as_me: program exited with status $ac_status" >&5
7652 echo "$as_me: failed program was:" >&5
7653 sed 's/^/| /' conftest.$ac_ext >&5
7654
7655 ( exit $ac_status )
7656 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7657 echo "$as_me: error: in \`$ac_pwd':" >&2;}
7658 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7659 See \`config.log' for more details." >&5
7660 echo "$as_me: error: cannot compute sizeof (long), 77
7661 See \`config.log' for more details." >&2;}
7662    { (exit 1); exit 1; }; }; }
7663 fi
7664 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7665 fi
7666 fi
7667 rm -f conftest.val
7668 else
7669   ac_cv_sizeof_long=0
7670 fi
7671 fi
7672 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7673 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
7674 cat >>confdefs.h <<_ACEOF
7675 #define SIZEOF_LONG $ac_cv_sizeof_long
7676 _ACEOF
7677
7678
7679     if test "x${ac_cv_sizeof_long}" = "x8"; then
7680       want64=true
7681     fi
7682   fi
7683   if test x${want64} = xtrue; then
7684     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
7685   else
7686     TARGET_OBS='$(ALL_TARGET_OBS)'
7687   fi
7688 fi
7689
7690
7691
7692 # For other settings, only the main target counts.
7693 gdb_sim=
7694 gdb_osabi=
7695 build_gdbserver=
7696 targ=$target; . ${srcdir}/configure.tgt
7697
7698 # Fetch the default architecture and default target vector from BFD.
7699 targ=$target; . $srcdir/../bfd/config.bfd
7700
7701 # We only want the first architecture, so strip off the others if
7702 # there is more than one.
7703 targ_archs=`echo $targ_archs | sed 's/ .*//'`
7704
7705 if test "x$targ_archs" != x; then
7706
7707 cat >>confdefs.h <<_ACEOF
7708 #define DEFAULT_BFD_ARCH $targ_archs
7709 _ACEOF
7710
7711 fi
7712 if test "x$targ_defvec" != x; then
7713
7714 cat >>confdefs.h <<_ACEOF
7715 #define DEFAULT_BFD_VEC $targ_defvec
7716 _ACEOF
7717
7718 fi
7719
7720 # The CLI cannot be disabled yet, but may be in the future.
7721
7722 # Enable CLI.
7723 # Check whether --enable-gdbcli or --disable-gdbcli was given.
7724 if test "${enable_gdbcli+set}" = set; then
7725   enableval="$enable_gdbcli"
7726   case $enableval in
7727     yes)
7728       ;;
7729     no)
7730       { { echo "$as_me:$LINENO: error: the command-line interface cannot be disabled yet" >&5
7731 echo "$as_me: error: the command-line interface cannot be disabled yet" >&2;}
7732    { (exit 1); exit 1; }; } ;;
7733     *)
7734       { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbcli" >&5
7735 echo "$as_me: error: bad value $enableval for --enable-gdbcli" >&2;}
7736    { (exit 1); exit 1; }; } ;;
7737   esac
7738 else
7739   enable_gdbcli=yes
7740 fi;
7741 if test x"$enable_gdbcli" = xyes; then
7742   if test -d $srcdir/cli; then
7743     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
7744     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
7745     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
7746     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
7747   fi
7748 fi
7749
7750 # Enable MI.
7751 # Check whether --enable-gdbmi or --disable-gdbmi was given.
7752 if test "${enable_gdbmi+set}" = set; then
7753   enableval="$enable_gdbmi"
7754   case $enableval in
7755     yes | no)
7756       ;;
7757     *)
7758       { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbmi" >&5
7759 echo "$as_me: error: bad value $enableval for --enable-gdbmi" >&2;}
7760    { (exit 1); exit 1; }; } ;;
7761   esac
7762 else
7763   enable_gdbmi=yes
7764 fi;
7765 if test x"$enable_gdbmi" = xyes; then
7766   if test -d $srcdir/mi; then
7767     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
7768     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
7769     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
7770     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
7771   fi
7772 fi
7773
7774 # Enable TUI.
7775 # Check whether --enable-tui or --disable-tui was given.
7776 if test "${enable_tui+set}" = set; then
7777   enableval="$enable_tui"
7778   case $enableval in
7779     yes | no | auto)
7780       ;;
7781     *)
7782       { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tui" >&5
7783 echo "$as_me: error: bad value $enableval for --enable-tui" >&2;}
7784    { (exit 1); exit 1; }; } ;;
7785   esac
7786 else
7787   enable_tui=auto
7788 fi;
7789
7790 # Enable gdbtk.
7791 # Check whether --enable-gdbtk or --disable-gdbtk was given.
7792 if test "${enable_gdbtk+set}" = set; then
7793   enableval="$enable_gdbtk"
7794   case $enableval in
7795     yes | no)
7796       ;;
7797     *)
7798       { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbtk" >&5
7799 echo "$as_me: error: bad value $enableval for --enable-gdbtk" >&2;}
7800    { (exit 1); exit 1; }; } ;;
7801   esac
7802 else
7803   if test -d $srcdir/gdbtk; then
7804     enable_gdbtk=yes
7805   else
7806     enable_gdbtk=no
7807   fi
7808 fi;
7809 # We unconditionally disable gdbtk tests on selected platforms.
7810 case $host_os in
7811   go32* | windows*)
7812     { echo "$as_me:$LINENO: WARNING: gdbtk isn't supported on $host; disabling" >&5
7813 echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
7814     enable_gdbtk=no ;;
7815 esac
7816
7817 # Libunwind support.
7818
7819 # Check whether --with-libunwind or --without-libunwind was given.
7820 if test "${with_libunwind+set}" = set; then
7821   withval="$with_libunwind"
7822   case "${withval}" in
7823   yes)  enable_libunwind=yes ;;
7824   no)   enable_libunwind=no ;;
7825   *)    { { echo "$as_me:$LINENO: error: bad value ${withval} for GDB with-libunwind option" >&5
7826 echo "$as_me: error: bad value ${withval} for GDB with-libunwind option" >&2;}
7827    { (exit 1); exit 1; }; } ;;
7828 esac
7829 else
7830
7831
7832
7833 for ac_header in libunwind.h libunwind-ia64.h
7834 do
7835 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7836 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7837   echo "$as_me:$LINENO: checking for $ac_header" >&5
7838 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7839 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7840   echo $ECHO_N "(cached) $ECHO_C" >&6
7841 fi
7842 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7843 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7844 else
7845   # Is the header compilable?
7846 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7847 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7848 cat >conftest.$ac_ext <<_ACEOF
7849 /* confdefs.h.  */
7850 _ACEOF
7851 cat confdefs.h >>conftest.$ac_ext
7852 cat >>conftest.$ac_ext <<_ACEOF
7853 /* end confdefs.h.  */
7854 $ac_includes_default
7855 #include <$ac_header>
7856 _ACEOF
7857 rm -f conftest.$ac_objext
7858 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7859   (eval $ac_compile) 2>conftest.er1
7860   ac_status=$?
7861   grep -v '^ *+' conftest.er1 >conftest.err
7862   rm -f conftest.er1
7863   cat conftest.err >&5
7864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7865   (exit $ac_status); } &&
7866          { ac_try='test -z "$ac_c_werror_flag"
7867                          || test ! -s conftest.err'
7868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7869   (eval $ac_try) 2>&5
7870   ac_status=$?
7871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7872   (exit $ac_status); }; } &&
7873          { ac_try='test -s conftest.$ac_objext'
7874   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7875   (eval $ac_try) 2>&5
7876   ac_status=$?
7877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7878   (exit $ac_status); }; }; then
7879   ac_header_compiler=yes
7880 else
7881   echo "$as_me: failed program was:" >&5
7882 sed 's/^/| /' conftest.$ac_ext >&5
7883
7884 ac_header_compiler=no
7885 fi
7886 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7887 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7888 echo "${ECHO_T}$ac_header_compiler" >&6
7889
7890 # Is the header present?
7891 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7892 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7893 cat >conftest.$ac_ext <<_ACEOF
7894 /* confdefs.h.  */
7895 _ACEOF
7896 cat confdefs.h >>conftest.$ac_ext
7897 cat >>conftest.$ac_ext <<_ACEOF
7898 /* end confdefs.h.  */
7899 #include <$ac_header>
7900 _ACEOF
7901 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7902   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7903   ac_status=$?
7904   grep -v '^ *+' conftest.er1 >conftest.err
7905   rm -f conftest.er1
7906   cat conftest.err >&5
7907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7908   (exit $ac_status); } >/dev/null; then
7909   if test -s conftest.err; then
7910     ac_cpp_err=$ac_c_preproc_warn_flag
7911     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7912   else
7913     ac_cpp_err=
7914   fi
7915 else
7916   ac_cpp_err=yes
7917 fi
7918 if test -z "$ac_cpp_err"; then
7919   ac_header_preproc=yes
7920 else
7921   echo "$as_me: failed program was:" >&5
7922 sed 's/^/| /' conftest.$ac_ext >&5
7923
7924   ac_header_preproc=no
7925 fi
7926 rm -f conftest.err conftest.$ac_ext
7927 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7928 echo "${ECHO_T}$ac_header_preproc" >&6
7929
7930 # So?  What about this header?
7931 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7932   yes:no: )
7933     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7934 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7935     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7936 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7937     ac_header_preproc=yes
7938     ;;
7939   no:yes:* )
7940     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7941 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7942     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7943 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7944     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7945 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7946     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7947 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7948     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7949 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7950     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7951 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7952     (
7953       cat <<\_ASBOX
7954 ## ------------------------------------------ ##
7955 ## Report this to the AC_PACKAGE_NAME lists.  ##
7956 ## ------------------------------------------ ##
7957 _ASBOX
7958     ) |
7959       sed "s/^/$as_me: WARNING:     /" >&2
7960     ;;
7961 esac
7962 echo "$as_me:$LINENO: checking for $ac_header" >&5
7963 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7964 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7965   echo $ECHO_N "(cached) $ECHO_C" >&6
7966 else
7967   eval "$as_ac_Header=\$ac_header_preproc"
7968 fi
7969 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7970 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7971
7972 fi
7973 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7974   cat >>confdefs.h <<_ACEOF
7975 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7976 _ACEOF
7977
7978 fi
7979
7980 done
7981
7982   if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
7983     enable_libunwind=yes;
7984   fi
7985
7986 fi;
7987
7988 if test x"$enable_libunwind" = xyes; then
7989
7990
7991 for ac_header in libunwind.h libunwind-ia64.h
7992 do
7993 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7994 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7995   echo "$as_me:$LINENO: checking for $ac_header" >&5
7996 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7997 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7998   echo $ECHO_N "(cached) $ECHO_C" >&6
7999 fi
8000 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8001 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8002 else
8003   # Is the header compilable?
8004 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8005 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8006 cat >conftest.$ac_ext <<_ACEOF
8007 /* confdefs.h.  */
8008 _ACEOF
8009 cat confdefs.h >>conftest.$ac_ext
8010 cat >>conftest.$ac_ext <<_ACEOF
8011 /* end confdefs.h.  */
8012 $ac_includes_default
8013 #include <$ac_header>
8014 _ACEOF
8015 rm -f conftest.$ac_objext
8016 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8017   (eval $ac_compile) 2>conftest.er1
8018   ac_status=$?
8019   grep -v '^ *+' conftest.er1 >conftest.err
8020   rm -f conftest.er1
8021   cat conftest.err >&5
8022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8023   (exit $ac_status); } &&
8024          { ac_try='test -z "$ac_c_werror_flag"
8025                          || test ! -s conftest.err'
8026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8027   (eval $ac_try) 2>&5
8028   ac_status=$?
8029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8030   (exit $ac_status); }; } &&
8031          { ac_try='test -s conftest.$ac_objext'
8032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8033   (eval $ac_try) 2>&5
8034   ac_status=$?
8035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8036   (exit $ac_status); }; }; then
8037   ac_header_compiler=yes
8038 else
8039   echo "$as_me: failed program was:" >&5
8040 sed 's/^/| /' conftest.$ac_ext >&5
8041
8042 ac_header_compiler=no
8043 fi
8044 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8045 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8046 echo "${ECHO_T}$ac_header_compiler" >&6
8047
8048 # Is the header present?
8049 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8050 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8051 cat >conftest.$ac_ext <<_ACEOF
8052 /* confdefs.h.  */
8053 _ACEOF
8054 cat confdefs.h >>conftest.$ac_ext
8055 cat >>conftest.$ac_ext <<_ACEOF
8056 /* end confdefs.h.  */
8057 #include <$ac_header>
8058 _ACEOF
8059 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8060   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8061   ac_status=$?
8062   grep -v '^ *+' conftest.er1 >conftest.err
8063   rm -f conftest.er1
8064   cat conftest.err >&5
8065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8066   (exit $ac_status); } >/dev/null; then
8067   if test -s conftest.err; then
8068     ac_cpp_err=$ac_c_preproc_warn_flag
8069     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8070   else
8071     ac_cpp_err=
8072   fi
8073 else
8074   ac_cpp_err=yes
8075 fi
8076 if test -z "$ac_cpp_err"; then
8077   ac_header_preproc=yes
8078 else
8079   echo "$as_me: failed program was:" >&5
8080 sed 's/^/| /' conftest.$ac_ext >&5
8081
8082   ac_header_preproc=no
8083 fi
8084 rm -f conftest.err conftest.$ac_ext
8085 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8086 echo "${ECHO_T}$ac_header_preproc" >&6
8087
8088 # So?  What about this header?
8089 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8090   yes:no: )
8091     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8092 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8093     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8094 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8095     ac_header_preproc=yes
8096     ;;
8097   no:yes:* )
8098     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8099 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8100     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8101 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8102     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8103 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8104     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8105 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8106     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8107 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8108     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8109 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8110     (
8111       cat <<\_ASBOX
8112 ## ------------------------------------------ ##
8113 ## Report this to the AC_PACKAGE_NAME lists.  ##
8114 ## ------------------------------------------ ##
8115 _ASBOX
8116     ) |
8117       sed "s/^/$as_me: WARNING:     /" >&2
8118     ;;
8119 esac
8120 echo "$as_me:$LINENO: checking for $ac_header" >&5
8121 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8122 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8123   echo $ECHO_N "(cached) $ECHO_C" >&6
8124 else
8125   eval "$as_ac_Header=\$ac_header_preproc"
8126 fi
8127 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8128 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8129
8130 fi
8131 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8132   cat >>confdefs.h <<_ACEOF
8133 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8134 _ACEOF
8135
8136 fi
8137
8138 done
8139
8140
8141 cat >>confdefs.h <<\_ACEOF
8142 #define HAVE_LIBUNWIND 1
8143 _ACEOF
8144
8145   CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8146   CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8147   CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8148 fi
8149
8150 opt_curses=no
8151
8152 # Check whether --with-curses or --without-curses was given.
8153 if test "${with_curses+set}" = set; then
8154   withval="$with_curses"
8155   opt_curses=$withval
8156 fi;
8157
8158 prefer_curses=no
8159 if test "$opt_curses" = "yes"; then
8160   prefer_curses=yes
8161 fi
8162
8163 # Profiling support.
8164 # Check whether --enable-profiling or --disable-profiling was given.
8165 if test "${enable_profiling+set}" = set; then
8166   enableval="$enable_profiling"
8167   case $enableval in
8168     yes | no)
8169       ;;
8170     *)
8171       { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-profile" >&5
8172 echo "$as_me: error: bad value $enableval for --enable-profile" >&2;}
8173    { (exit 1); exit 1; }; } ;;
8174   esac
8175 else
8176   enable_profiling=no
8177 fi;
8178
8179
8180
8181 for ac_func in monstartup _mcleanup
8182 do
8183 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8184 echo "$as_me:$LINENO: checking for $ac_func" >&5
8185 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8186 if eval "test \"\${$as_ac_var+set}\" = set"; then
8187   echo $ECHO_N "(cached) $ECHO_C" >&6
8188 else
8189   cat >conftest.$ac_ext <<_ACEOF
8190 /* confdefs.h.  */
8191 _ACEOF
8192 cat confdefs.h >>conftest.$ac_ext
8193 cat >>conftest.$ac_ext <<_ACEOF
8194 /* end confdefs.h.  */
8195 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8196    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8197 #define $ac_func innocuous_$ac_func
8198
8199 /* System header to define __stub macros and hopefully few prototypes,
8200     which can conflict with char $ac_func (); below.
8201     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8202     <limits.h> exists even on freestanding compilers.  */
8203
8204 #ifdef __STDC__
8205 # include <limits.h>
8206 #else
8207 # include <assert.h>
8208 #endif
8209
8210 #undef $ac_func
8211
8212 /* Override any gcc2 internal prototype to avoid an error.  */
8213 #ifdef __cplusplus
8214 extern "C"
8215 {
8216 #endif
8217 /* We use char because int might match the return type of a gcc2
8218    builtin and then its argument prototype would still apply.  */
8219 char $ac_func ();
8220 /* The GNU C library defines this for functions which it implements
8221     to always fail with ENOSYS.  Some functions are actually named
8222     something starting with __ and the normal name is an alias.  */
8223 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8224 choke me
8225 #else
8226 char (*f) () = $ac_func;
8227 #endif
8228 #ifdef __cplusplus
8229 }
8230 #endif
8231
8232 int
8233 main ()
8234 {
8235 return f != $ac_func;
8236   ;
8237   return 0;
8238 }
8239 _ACEOF
8240 rm -f conftest.$ac_objext conftest$ac_exeext
8241 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8242   (eval $ac_link) 2>conftest.er1
8243   ac_status=$?
8244   grep -v '^ *+' conftest.er1 >conftest.err
8245   rm -f conftest.er1
8246   cat conftest.err >&5
8247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8248   (exit $ac_status); } &&
8249          { ac_try='test -z "$ac_c_werror_flag"
8250                          || test ! -s conftest.err'
8251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8252   (eval $ac_try) 2>&5
8253   ac_status=$?
8254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8255   (exit $ac_status); }; } &&
8256          { ac_try='test -s conftest$ac_exeext'
8257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8258   (eval $ac_try) 2>&5
8259   ac_status=$?
8260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8261   (exit $ac_status); }; }; then
8262   eval "$as_ac_var=yes"
8263 else
8264   echo "$as_me: failed program was:" >&5
8265 sed 's/^/| /' conftest.$ac_ext >&5
8266
8267 eval "$as_ac_var=no"
8268 fi
8269 rm -f conftest.err conftest.$ac_objext \
8270       conftest$ac_exeext conftest.$ac_ext
8271 fi
8272 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8273 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8274 if test `eval echo '${'$as_ac_var'}'` = yes; then
8275   cat >>confdefs.h <<_ACEOF
8276 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8277 _ACEOF
8278
8279 fi
8280 done
8281
8282 echo "$as_me:$LINENO: checking for _etext" >&5
8283 echo $ECHO_N "checking for _etext... $ECHO_C" >&6
8284 if test "${ac_cv_var__etext+set}" = set; then
8285   echo $ECHO_N "(cached) $ECHO_C" >&6
8286 else
8287   cat >conftest.$ac_ext <<_ACEOF
8288 /* confdefs.h.  */
8289 _ACEOF
8290 cat confdefs.h >>conftest.$ac_ext
8291 cat >>conftest.$ac_ext <<_ACEOF
8292 /* end confdefs.h.  */
8293 #include <stdlib.h>
8294 extern char _etext;
8295
8296 int
8297 main ()
8298 {
8299 free (&_etext);
8300   ;
8301   return 0;
8302 }
8303 _ACEOF
8304 rm -f conftest.$ac_objext conftest$ac_exeext
8305 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8306   (eval $ac_link) 2>conftest.er1
8307   ac_status=$?
8308   grep -v '^ *+' conftest.er1 >conftest.err
8309   rm -f conftest.er1
8310   cat conftest.err >&5
8311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8312   (exit $ac_status); } &&
8313          { ac_try='test -z "$ac_c_werror_flag"
8314                          || test ! -s conftest.err'
8315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8316   (eval $ac_try) 2>&5
8317   ac_status=$?
8318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8319   (exit $ac_status); }; } &&
8320          { ac_try='test -s conftest$ac_exeext'
8321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8322   (eval $ac_try) 2>&5
8323   ac_status=$?
8324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8325   (exit $ac_status); }; }; then
8326   ac_cv_var__etext=yes
8327 else
8328   echo "$as_me: failed program was:" >&5
8329 sed 's/^/| /' conftest.$ac_ext >&5
8330
8331 ac_cv_var__etext=no
8332 fi
8333 rm -f conftest.err conftest.$ac_objext \
8334       conftest$ac_exeext conftest.$ac_ext
8335 fi
8336 echo "$as_me:$LINENO: result: $ac_cv_var__etext" >&5
8337 echo "${ECHO_T}$ac_cv_var__etext" >&6
8338 if test $ac_cv_var__etext = yes; then
8339
8340 cat >>confdefs.h <<\_ACEOF
8341 #define HAVE__ETEXT 1
8342 _ACEOF
8343
8344 fi
8345 echo "$as_me:$LINENO: checking for etext" >&5
8346 echo $ECHO_N "checking for etext... $ECHO_C" >&6
8347 if test "${ac_cv_var_etext+set}" = set; then
8348   echo $ECHO_N "(cached) $ECHO_C" >&6
8349 else
8350   cat >conftest.$ac_ext <<_ACEOF
8351 /* confdefs.h.  */
8352 _ACEOF
8353 cat confdefs.h >>conftest.$ac_ext
8354 cat >>conftest.$ac_ext <<_ACEOF
8355 /* end confdefs.h.  */
8356 #include <stdlib.h>
8357 extern char etext;
8358
8359 int
8360 main ()
8361 {
8362 free (&etext);
8363   ;
8364   return 0;
8365 }
8366 _ACEOF
8367 rm -f conftest.$ac_objext conftest$ac_exeext
8368 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8369   (eval $ac_link) 2>conftest.er1
8370   ac_status=$?
8371   grep -v '^ *+' conftest.er1 >conftest.err
8372   rm -f conftest.er1
8373   cat conftest.err >&5
8374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8375   (exit $ac_status); } &&
8376          { ac_try='test -z "$ac_c_werror_flag"
8377                          || test ! -s conftest.err'
8378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8379   (eval $ac_try) 2>&5
8380   ac_status=$?
8381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382   (exit $ac_status); }; } &&
8383          { ac_try='test -s conftest$ac_exeext'
8384   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8385   (eval $ac_try) 2>&5
8386   ac_status=$?
8387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388   (exit $ac_status); }; }; then
8389   ac_cv_var_etext=yes
8390 else
8391   echo "$as_me: failed program was:" >&5
8392 sed 's/^/| /' conftest.$ac_ext >&5
8393
8394 ac_cv_var_etext=no
8395 fi
8396 rm -f conftest.err conftest.$ac_objext \
8397       conftest$ac_exeext conftest.$ac_ext
8398 fi
8399 echo "$as_me:$LINENO: result: $ac_cv_var_etext" >&5
8400 echo "${ECHO_T}$ac_cv_var_etext" >&6
8401 if test $ac_cv_var_etext = yes; then
8402
8403 cat >>confdefs.h <<\_ACEOF
8404 #define HAVE_ETEXT 1
8405 _ACEOF
8406
8407 fi
8408 if test "$enable_profiling" = yes ; then
8409   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
8410     { { echo "$as_me:$LINENO: error: --enable-profiling requires monstartup and _mcleanup" >&5
8411 echo "$as_me: error: --enable-profiling requires monstartup and _mcleanup" >&2;}
8412    { (exit 1); exit 1; }; }
8413   fi
8414   PROFILE_CFLAGS=-pg
8415   OLD_CFLAGS="$CFLAGS"
8416   CFLAGS="$CFLAGS $PROFILE_CFLAGS"
8417
8418   echo "$as_me:$LINENO: checking whether $CC supports -pg" >&5
8419 echo $ECHO_N "checking whether $CC supports -pg... $ECHO_C" >&6
8420 if test "${ac_cv_cc_supports_pg+set}" = set; then
8421   echo $ECHO_N "(cached) $ECHO_C" >&6
8422 else
8423   cat >conftest.$ac_ext <<_ACEOF
8424 /* confdefs.h.  */
8425 _ACEOF
8426 cat confdefs.h >>conftest.$ac_ext
8427 cat >>conftest.$ac_ext <<_ACEOF
8428 /* end confdefs.h.  */
8429
8430 int
8431 main ()
8432 {
8433 int x;
8434   ;
8435   return 0;
8436 }
8437 _ACEOF
8438 rm -f conftest.$ac_objext
8439 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8440   (eval $ac_compile) 2>conftest.er1
8441   ac_status=$?
8442   grep -v '^ *+' conftest.er1 >conftest.err
8443   rm -f conftest.er1
8444   cat conftest.err >&5
8445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8446   (exit $ac_status); } &&
8447          { ac_try='test -z "$ac_c_werror_flag"
8448                          || test ! -s conftest.err'
8449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8450   (eval $ac_try) 2>&5
8451   ac_status=$?
8452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8453   (exit $ac_status); }; } &&
8454          { ac_try='test -s conftest.$ac_objext'
8455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8456   (eval $ac_try) 2>&5
8457   ac_status=$?
8458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8459   (exit $ac_status); }; }; then
8460   ac_cv_cc_supports_pg=yes
8461 else
8462   echo "$as_me: failed program was:" >&5
8463 sed 's/^/| /' conftest.$ac_ext >&5
8464
8465 ac_cv_cc_supports_pg=no
8466 fi
8467 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8468 fi
8469 echo "$as_me:$LINENO: result: $ac_cv_cc_supports_pg" >&5
8470 echo "${ECHO_T}$ac_cv_cc_supports_pg" >&6
8471
8472   if test $ac_cv_cc_supports_pg = no; then
8473     { { echo "$as_me:$LINENO: error: --enable-profiling requires a compiler which supports -pg" >&5
8474 echo "$as_me: error: --enable-profiling requires a compiler which supports -pg" >&2;}
8475    { (exit 1); exit 1; }; }
8476   fi
8477
8478   CFLAGS="$OLD_CFLAGS"
8479 fi
8480
8481
8482
8483 # Check whether --with-pkgversion or --without-pkgversion was given.
8484 if test "${with_pkgversion+set}" = set; then
8485   withval="$with_pkgversion"
8486   case "$withval" in
8487       yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
8488 echo "$as_me: error: package version not specified" >&2;}
8489    { (exit 1); exit 1; }; } ;;
8490       no)  PKGVERSION= ;;
8491       *)   PKGVERSION="($withval) " ;;
8492      esac
8493 else
8494   PKGVERSION="(GDB) "
8495
8496 fi;
8497
8498
8499
8500
8501 # Check whether --with-bugurl or --without-bugurl was given.
8502 if test "${with_bugurl+set}" = set; then
8503   withval="$with_bugurl"
8504   case "$withval" in
8505       yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
8506 echo "$as_me: error: bug URL not specified" >&2;}
8507    { (exit 1); exit 1; }; } ;;
8508       no)  BUGURL=
8509            ;;
8510       *)   BUGURL="$withval"
8511            ;;
8512      esac
8513 else
8514   BUGURL="http://www.gnu.org/software/gdb/bugs/"
8515
8516 fi;
8517   case ${BUGURL} in
8518   "")
8519     REPORT_BUGS_TO=
8520     REPORT_BUGS_TEXI=
8521     ;;
8522   *)
8523     REPORT_BUGS_TO="<$BUGURL>"
8524     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8525     ;;
8526   esac;
8527
8528
8529
8530
8531 cat >>confdefs.h <<_ACEOF
8532 #define PKGVERSION "$PKGVERSION"
8533 _ACEOF
8534
8535
8536 cat >>confdefs.h <<_ACEOF
8537 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8538 _ACEOF
8539
8540
8541 # --------------------- #
8542 # Checks for programs.  #
8543 # --------------------- #
8544
8545 for ac_prog in gawk mawk nawk awk
8546 do
8547   # Extract the first word of "$ac_prog", so it can be a program name with args.
8548 set dummy $ac_prog; ac_word=$2
8549 echo "$as_me:$LINENO: checking for $ac_word" >&5
8550 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8551 if test "${ac_cv_prog_AWK+set}" = set; then
8552   echo $ECHO_N "(cached) $ECHO_C" >&6
8553 else
8554   if test -n "$AWK"; then
8555   ac_cv_prog_AWK="$AWK" # Let the user override the test.
8556 else
8557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8558 for as_dir in $PATH
8559 do
8560   IFS=$as_save_IFS
8561   test -z "$as_dir" && as_dir=.
8562   for ac_exec_ext in '' $ac_executable_extensions; do
8563   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8564     ac_cv_prog_AWK="$ac_prog"
8565     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8566     break 2
8567   fi
8568 done
8569 done
8570
8571 fi
8572 fi
8573 AWK=$ac_cv_prog_AWK
8574 if test -n "$AWK"; then
8575   echo "$as_me:$LINENO: result: $AWK" >&5
8576 echo "${ECHO_T}$AWK" >&6
8577 else
8578   echo "$as_me:$LINENO: result: no" >&5
8579 echo "${ECHO_T}no" >&6
8580 fi
8581
8582   test -n "$AWK" && break
8583 done
8584
8585 # Find a good install program.  We prefer a C program (faster),
8586 # so one script is as good as another.  But avoid the broken or
8587 # incompatible versions:
8588 # SysV /etc/install, /usr/sbin/install
8589 # SunOS /usr/etc/install
8590 # IRIX /sbin/install
8591 # AIX /bin/install
8592 # AmigaOS /C/install, which installs bootblocks on floppy discs
8593 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8594 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
8595 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8596 # OS/2's system install, which has a completely different semantic
8597 # ./install, which can be erroneously created by make from ./install.sh.
8598 # Reject install programs that cannot install multiple files.
8599 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
8600 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
8601 if test -z "$INSTALL"; then
8602 if test "${ac_cv_path_install+set}" = set; then
8603   echo $ECHO_N "(cached) $ECHO_C" >&6
8604 else
8605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8606 for as_dir in $PATH
8607 do
8608   IFS=$as_save_IFS
8609   test -z "$as_dir" && as_dir=.
8610   # Account for people who put trailing slashes in PATH elements.
8611 case $as_dir/ in
8612   ./ | .// | /cC/* | \
8613   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8614   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
8615   /usr/ucb/* ) ;;
8616   *)
8617     # OSF1 and SCO ODT 3.0 have their own names for install.
8618     # Don't use installbsd from OSF since it installs stuff as root
8619     # by default.
8620     for ac_prog in ginstall scoinst install; do
8621       for ac_exec_ext in '' $ac_executable_extensions; do
8622         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
8623           if test $ac_prog = install &&
8624             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8625             # AIX install.  It has an incompatible calling convention.
8626             :
8627           elif test $ac_prog = install &&
8628             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8629             # program-specific install script used by HP pwplus--don't use.
8630             :
8631           else
8632             rm -rf conftest.one conftest.two conftest.dir
8633             echo one > conftest.one
8634             echo two > conftest.two
8635             mkdir conftest.dir
8636             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
8637               test -s conftest.one && test -s conftest.two &&
8638               test -s conftest.dir/conftest.one &&
8639               test -s conftest.dir/conftest.two
8640             then
8641               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8642               break 3
8643             fi
8644           fi
8645         fi
8646       done
8647     done
8648     ;;
8649 esac
8650 done
8651
8652 rm -rf conftest.one conftest.two conftest.dir
8653
8654 fi
8655   if test "${ac_cv_path_install+set}" = set; then
8656     INSTALL=$ac_cv_path_install
8657   else
8658     # As a last resort, use the slow shell script.  Don't cache a
8659     # value for INSTALL within a source directory, because that will
8660     # break other packages using the cache if that directory is
8661     # removed, or if the value is a relative name.
8662     INSTALL=$ac_install_sh
8663   fi
8664 fi
8665 echo "$as_me:$LINENO: result: $INSTALL" >&5
8666 echo "${ECHO_T}$INSTALL" >&6
8667
8668 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8669 # It thinks the first close brace ends the variable substitution.
8670 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8671
8672 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8673
8674 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8675
8676 echo "$as_me:$LINENO: checking whether ln -s works" >&5
8677 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
8678 LN_S=$as_ln_s
8679 if test "$LN_S" = "ln -s"; then
8680   echo "$as_me:$LINENO: result: yes" >&5
8681 echo "${ECHO_T}yes" >&6
8682 else
8683   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
8684 echo "${ECHO_T}no, using $LN_S" >&6
8685 fi
8686
8687 if test -n "$ac_tool_prefix"; then
8688   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8689 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8690 echo "$as_me:$LINENO: checking for $ac_word" >&5
8691 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8692 if test "${ac_cv_prog_RANLIB+set}" = set; then
8693   echo $ECHO_N "(cached) $ECHO_C" >&6
8694 else
8695   if test -n "$RANLIB"; then
8696   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8697 else
8698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8699 for as_dir in $PATH
8700 do
8701   IFS=$as_save_IFS
8702   test -z "$as_dir" && as_dir=.
8703   for ac_exec_ext in '' $ac_executable_extensions; do
8704   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8705     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8706     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8707     break 2
8708   fi
8709 done
8710 done
8711
8712 fi
8713 fi
8714 RANLIB=$ac_cv_prog_RANLIB
8715 if test -n "$RANLIB"; then
8716   echo "$as_me:$LINENO: result: $RANLIB" >&5
8717 echo "${ECHO_T}$RANLIB" >&6
8718 else
8719   echo "$as_me:$LINENO: result: no" >&5
8720 echo "${ECHO_T}no" >&6
8721 fi
8722
8723 fi
8724 if test -z "$ac_cv_prog_RANLIB"; then
8725   ac_ct_RANLIB=$RANLIB
8726   # Extract the first word of "ranlib", so it can be a program name with args.
8727 set dummy ranlib; ac_word=$2
8728 echo "$as_me:$LINENO: checking for $ac_word" >&5
8729 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8730 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8731   echo $ECHO_N "(cached) $ECHO_C" >&6
8732 else
8733   if test -n "$ac_ct_RANLIB"; then
8734   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8735 else
8736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8737 for as_dir in $PATH
8738 do
8739   IFS=$as_save_IFS
8740   test -z "$as_dir" && as_dir=.
8741   for ac_exec_ext in '' $ac_executable_extensions; do
8742   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8743     ac_cv_prog_ac_ct_RANLIB="ranlib"
8744     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8745     break 2
8746   fi
8747 done
8748 done
8749
8750   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
8751 fi
8752 fi
8753 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8754 if test -n "$ac_ct_RANLIB"; then
8755   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8756 echo "${ECHO_T}$ac_ct_RANLIB" >&6
8757 else
8758   echo "$as_me:$LINENO: result: no" >&5
8759 echo "${ECHO_T}no" >&6
8760 fi
8761
8762   RANLIB=$ac_ct_RANLIB
8763 else
8764   RANLIB="$ac_cv_prog_RANLIB"
8765 fi
8766
8767 for ac_prog in 'bison -y' byacc
8768 do
8769   # Extract the first word of "$ac_prog", so it can be a program name with args.
8770 set dummy $ac_prog; ac_word=$2
8771 echo "$as_me:$LINENO: checking for $ac_word" >&5
8772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8773 if test "${ac_cv_prog_YACC+set}" = set; then
8774   echo $ECHO_N "(cached) $ECHO_C" >&6
8775 else
8776   if test -n "$YACC"; then
8777   ac_cv_prog_YACC="$YACC" # Let the user override the test.
8778 else
8779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8780 for as_dir in $PATH
8781 do
8782   IFS=$as_save_IFS
8783   test -z "$as_dir" && as_dir=.
8784   for ac_exec_ext in '' $ac_executable_extensions; do
8785   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8786     ac_cv_prog_YACC="$ac_prog"
8787     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8788     break 2
8789   fi
8790 done
8791 done
8792
8793 fi
8794 fi
8795 YACC=$ac_cv_prog_YACC
8796 if test -n "$YACC"; then
8797   echo "$as_me:$LINENO: result: $YACC" >&5
8798 echo "${ECHO_T}$YACC" >&6
8799 else
8800   echo "$as_me:$LINENO: result: no" >&5
8801 echo "${ECHO_T}no" >&6
8802 fi
8803
8804   test -n "$YACC" && break
8805 done
8806 test -n "$YACC" || YACC="yacc"
8807
8808
8809 if test -n "$ac_tool_prefix"; then
8810   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8811 set dummy ${ac_tool_prefix}ar; ac_word=$2
8812 echo "$as_me:$LINENO: checking for $ac_word" >&5
8813 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8814 if test "${ac_cv_prog_AR+set}" = set; then
8815   echo $ECHO_N "(cached) $ECHO_C" >&6
8816 else
8817   if test -n "$AR"; then
8818   ac_cv_prog_AR="$AR" # Let the user override the test.
8819 else
8820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8821 for as_dir in $PATH
8822 do
8823   IFS=$as_save_IFS
8824   test -z "$as_dir" && as_dir=.
8825   for ac_exec_ext in '' $ac_executable_extensions; do
8826   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8827     ac_cv_prog_AR="${ac_tool_prefix}ar"
8828     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8829     break 2
8830   fi
8831 done
8832 done
8833
8834 fi
8835 fi
8836 AR=$ac_cv_prog_AR
8837 if test -n "$AR"; then
8838   echo "$as_me:$LINENO: result: $AR" >&5
8839 echo "${ECHO_T}$AR" >&6
8840 else
8841   echo "$as_me:$LINENO: result: no" >&5
8842 echo "${ECHO_T}no" >&6
8843 fi
8844
8845 fi
8846 if test -z "$ac_cv_prog_AR"; then
8847   ac_ct_AR=$AR
8848   # Extract the first word of "ar", so it can be a program name with args.
8849 set dummy ar; ac_word=$2
8850 echo "$as_me:$LINENO: checking for $ac_word" >&5
8851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8852 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
8853   echo $ECHO_N "(cached) $ECHO_C" >&6
8854 else
8855   if test -n "$ac_ct_AR"; then
8856   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8857 else
8858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8859 for as_dir in $PATH
8860 do
8861   IFS=$as_save_IFS
8862   test -z "$as_dir" && as_dir=.
8863   for ac_exec_ext in '' $ac_executable_extensions; do
8864   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8865     ac_cv_prog_ac_ct_AR="ar"
8866     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8867     break 2
8868   fi
8869 done
8870 done
8871
8872 fi
8873 fi
8874 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8875 if test -n "$ac_ct_AR"; then
8876   echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
8877 echo "${ECHO_T}$ac_ct_AR" >&6
8878 else
8879   echo "$as_me:$LINENO: result: no" >&5
8880 echo "${ECHO_T}no" >&6
8881 fi
8882
8883   AR=$ac_ct_AR
8884 else
8885   AR="$ac_cv_prog_AR"
8886 fi
8887
8888 if test -n "$ac_tool_prefix"; then
8889   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8890 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8891 echo "$as_me:$LINENO: checking for $ac_word" >&5
8892 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8893 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
8894   echo $ECHO_N "(cached) $ECHO_C" >&6
8895 else
8896   if test -n "$DLLTOOL"; then
8897   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8898 else
8899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8900 for as_dir in $PATH
8901 do
8902   IFS=$as_save_IFS
8903   test -z "$as_dir" && as_dir=.
8904   for ac_exec_ext in '' $ac_executable_extensions; do
8905   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8906     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8907     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8908     break 2
8909   fi
8910 done
8911 done
8912
8913 fi
8914 fi
8915 DLLTOOL=$ac_cv_prog_DLLTOOL
8916 if test -n "$DLLTOOL"; then
8917   echo "$as_me:$LINENO: result: $DLLTOOL" >&5
8918 echo "${ECHO_T}$DLLTOOL" >&6
8919 else
8920   echo "$as_me:$LINENO: result: no" >&5
8921 echo "${ECHO_T}no" >&6
8922 fi
8923
8924 fi
8925 if test -z "$ac_cv_prog_DLLTOOL"; then
8926   ac_ct_DLLTOOL=$DLLTOOL
8927   # Extract the first word of "dlltool", so it can be a program name with args.
8928 set dummy dlltool; ac_word=$2
8929 echo "$as_me:$LINENO: checking for $ac_word" >&5
8930 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8931 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
8932   echo $ECHO_N "(cached) $ECHO_C" >&6
8933 else
8934   if test -n "$ac_ct_DLLTOOL"; then
8935   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8936 else
8937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8938 for as_dir in $PATH
8939 do
8940   IFS=$as_save_IFS
8941   test -z "$as_dir" && as_dir=.
8942   for ac_exec_ext in '' $ac_executable_extensions; do
8943   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8944     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8945     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8946     break 2
8947   fi
8948 done
8949 done
8950
8951 fi
8952 fi
8953 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8954 if test -n "$ac_ct_DLLTOOL"; then
8955   echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
8956 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
8957 else
8958   echo "$as_me:$LINENO: result: no" >&5
8959 echo "${ECHO_T}no" >&6
8960 fi
8961
8962   DLLTOOL=$ac_ct_DLLTOOL
8963 else
8964   DLLTOOL="$ac_cv_prog_DLLTOOL"
8965 fi
8966
8967 if test -n "$ac_tool_prefix"; then
8968   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8969 set dummy ${ac_tool_prefix}windres; ac_word=$2
8970 echo "$as_me:$LINENO: checking for $ac_word" >&5
8971 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8972 if test "${ac_cv_prog_WINDRES+set}" = set; then
8973   echo $ECHO_N "(cached) $ECHO_C" >&6
8974 else
8975   if test -n "$WINDRES"; then
8976   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8977 else
8978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8979 for as_dir in $PATH
8980 do
8981   IFS=$as_save_IFS
8982   test -z "$as_dir" && as_dir=.
8983   for ac_exec_ext in '' $ac_executable_extensions; do
8984   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8985     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
8986     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8987     break 2
8988   fi
8989 done
8990 done
8991
8992 fi
8993 fi
8994 WINDRES=$ac_cv_prog_WINDRES
8995 if test -n "$WINDRES"; then
8996   echo "$as_me:$LINENO: result: $WINDRES" >&5
8997 echo "${ECHO_T}$WINDRES" >&6
8998 else
8999   echo "$as_me:$LINENO: result: no" >&5
9000 echo "${ECHO_T}no" >&6
9001 fi
9002
9003 fi
9004 if test -z "$ac_cv_prog_WINDRES"; then
9005   ac_ct_WINDRES=$WINDRES
9006   # Extract the first word of "windres", so it can be a program name with args.
9007 set dummy windres; ac_word=$2
9008 echo "$as_me:$LINENO: checking for $ac_word" >&5
9009 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9010 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
9011   echo $ECHO_N "(cached) $ECHO_C" >&6
9012 else
9013   if test -n "$ac_ct_WINDRES"; then
9014   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9015 else
9016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9017 for as_dir in $PATH
9018 do
9019   IFS=$as_save_IFS
9020   test -z "$as_dir" && as_dir=.
9021   for ac_exec_ext in '' $ac_executable_extensions; do
9022   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9023     ac_cv_prog_ac_ct_WINDRES="windres"
9024     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9025     break 2
9026   fi
9027 done
9028 done
9029
9030 fi
9031 fi
9032 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9033 if test -n "$ac_ct_WINDRES"; then
9034   echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
9035 echo "${ECHO_T}$ac_ct_WINDRES" >&6
9036 else
9037   echo "$as_me:$LINENO: result: no" >&5
9038 echo "${ECHO_T}no" >&6
9039 fi
9040
9041   WINDRES=$ac_ct_WINDRES
9042 else
9043   WINDRES="$ac_cv_prog_WINDRES"
9044 fi
9045
9046
9047 # Needed for GNU/Hurd.
9048 if test -n "$ac_tool_prefix"; then
9049   # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
9050 set dummy ${ac_tool_prefix}mig; ac_word=$2
9051 echo "$as_me:$LINENO: checking for $ac_word" >&5
9052 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9053 if test "${ac_cv_prog_MIG+set}" = set; then
9054   echo $ECHO_N "(cached) $ECHO_C" >&6
9055 else
9056   if test -n "$MIG"; then
9057   ac_cv_prog_MIG="$MIG" # Let the user override the test.
9058 else
9059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9060 for as_dir in $PATH
9061 do
9062   IFS=$as_save_IFS
9063   test -z "$as_dir" && as_dir=.
9064   for ac_exec_ext in '' $ac_executable_extensions; do
9065   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9066     ac_cv_prog_MIG="${ac_tool_prefix}mig"
9067     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9068     break 2
9069   fi
9070 done
9071 done
9072
9073 fi
9074 fi
9075 MIG=$ac_cv_prog_MIG
9076 if test -n "$MIG"; then
9077   echo "$as_me:$LINENO: result: $MIG" >&5
9078 echo "${ECHO_T}$MIG" >&6
9079 else
9080   echo "$as_me:$LINENO: result: no" >&5
9081 echo "${ECHO_T}no" >&6
9082 fi
9083
9084 fi
9085 if test -z "$ac_cv_prog_MIG"; then
9086   ac_ct_MIG=$MIG
9087   # Extract the first word of "mig", so it can be a program name with args.
9088 set dummy mig; ac_word=$2
9089 echo "$as_me:$LINENO: checking for $ac_word" >&5
9090 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9091 if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then
9092   echo $ECHO_N "(cached) $ECHO_C" >&6
9093 else
9094   if test -n "$ac_ct_MIG"; then
9095   ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
9096 else
9097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9098 for as_dir in $PATH
9099 do
9100   IFS=$as_save_IFS
9101   test -z "$as_dir" && as_dir=.
9102   for ac_exec_ext in '' $ac_executable_extensions; do
9103   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9104     ac_cv_prog_ac_ct_MIG="mig"
9105     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9106     break 2
9107   fi
9108 done
9109 done
9110
9111 fi
9112 fi
9113 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9114 if test -n "$ac_ct_MIG"; then
9115   echo "$as_me:$LINENO: result: $ac_ct_MIG" >&5
9116 echo "${ECHO_T}$ac_ct_MIG" >&6
9117 else
9118   echo "$as_me:$LINENO: result: no" >&5
9119 echo "${ECHO_T}no" >&6
9120 fi
9121
9122   MIG=$ac_ct_MIG
9123 else
9124   MIG="$ac_cv_prog_MIG"
9125 fi
9126
9127
9128 # ---------------------- #
9129 # Checks for libraries.  #
9130 # ---------------------- #
9131
9132 # We might need to link with -lm; most simulators need it.
9133
9134 echo "$as_me:$LINENO: checking for main in -lm" >&5
9135 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
9136 if test "${ac_cv_lib_m_main+set}" = set; then
9137   echo $ECHO_N "(cached) $ECHO_C" >&6
9138 else
9139   ac_check_lib_save_LIBS=$LIBS
9140 LIBS="-lm  $LIBS"
9141 cat >conftest.$ac_ext <<_ACEOF
9142 /* confdefs.h.  */
9143 _ACEOF
9144 cat confdefs.h >>conftest.$ac_ext
9145 cat >>conftest.$ac_ext <<_ACEOF
9146 /* end confdefs.h.  */
9147
9148
9149 int
9150 main ()
9151 {
9152 main ();
9153   ;
9154   return 0;
9155 }
9156 _ACEOF
9157 rm -f conftest.$ac_objext conftest$ac_exeext
9158 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9159   (eval $ac_link) 2>conftest.er1
9160   ac_status=$?
9161   grep -v '^ *+' conftest.er1 >conftest.err
9162   rm -f conftest.er1
9163   cat conftest.err >&5
9164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9165   (exit $ac_status); } &&
9166          { ac_try='test -z "$ac_c_werror_flag"
9167                          || test ! -s conftest.err'
9168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9169   (eval $ac_try) 2>&5
9170   ac_status=$?
9171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9172   (exit $ac_status); }; } &&
9173          { ac_try='test -s conftest$ac_exeext'
9174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9175   (eval $ac_try) 2>&5
9176   ac_status=$?
9177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9178   (exit $ac_status); }; }; then
9179   ac_cv_lib_m_main=yes
9180 else
9181   echo "$as_me: failed program was:" >&5
9182 sed 's/^/| /' conftest.$ac_ext >&5
9183
9184 ac_cv_lib_m_main=no
9185 fi
9186 rm -f conftest.err conftest.$ac_objext \
9187       conftest$ac_exeext conftest.$ac_ext
9188 LIBS=$ac_check_lib_save_LIBS
9189 fi
9190 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
9191 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
9192 if test $ac_cv_lib_m_main = yes; then
9193   cat >>confdefs.h <<_ACEOF
9194 #define HAVE_LIBM 1
9195 _ACEOF
9196
9197   LIBS="-lm $LIBS"
9198
9199 fi
9200
9201
9202 # We need to link with -lw to get `wctype' on Solaris before Solaris
9203 # 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
9204 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9205 # is known to have this problem).  Therefore we avoid libw if we can.
9206 echo "$as_me:$LINENO: checking for wctype" >&5
9207 echo $ECHO_N "checking for wctype... $ECHO_C" >&6
9208 if test "${ac_cv_func_wctype+set}" = set; then
9209   echo $ECHO_N "(cached) $ECHO_C" >&6
9210 else
9211   cat >conftest.$ac_ext <<_ACEOF
9212 /* confdefs.h.  */
9213 _ACEOF
9214 cat confdefs.h >>conftest.$ac_ext
9215 cat >>conftest.$ac_ext <<_ACEOF
9216 /* end confdefs.h.  */
9217 /* Define wctype to an innocuous variant, in case <limits.h> declares wctype.
9218    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9219 #define wctype innocuous_wctype
9220
9221 /* System header to define __stub macros and hopefully few prototypes,
9222     which can conflict with char wctype (); below.
9223     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9224     <limits.h> exists even on freestanding compilers.  */
9225
9226 #ifdef __STDC__
9227 # include <limits.h>
9228 #else
9229 # include <assert.h>
9230 #endif
9231
9232 #undef wctype
9233
9234 /* Override any gcc2 internal prototype to avoid an error.  */
9235 #ifdef __cplusplus
9236 extern "C"
9237 {
9238 #endif
9239 /* We use char because int might match the return type of a gcc2
9240    builtin and then its argument prototype would still apply.  */
9241 char wctype ();
9242 /* The GNU C library defines this for functions which it implements
9243     to always fail with ENOSYS.  Some functions are actually named
9244     something starting with __ and the normal name is an alias.  */
9245 #if defined (__stub_wctype) || defined (__stub___wctype)
9246 choke me
9247 #else
9248 char (*f) () = wctype;
9249 #endif
9250 #ifdef __cplusplus
9251 }
9252 #endif
9253
9254 int
9255 main ()
9256 {
9257 return f != wctype;
9258   ;
9259   return 0;
9260 }
9261 _ACEOF
9262 rm -f conftest.$ac_objext conftest$ac_exeext
9263 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9264   (eval $ac_link) 2>conftest.er1
9265   ac_status=$?
9266   grep -v '^ *+' conftest.er1 >conftest.err
9267   rm -f conftest.er1
9268   cat conftest.err >&5
9269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9270   (exit $ac_status); } &&
9271          { ac_try='test -z "$ac_c_werror_flag"
9272                          || test ! -s conftest.err'
9273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9274   (eval $ac_try) 2>&5
9275   ac_status=$?
9276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9277   (exit $ac_status); }; } &&
9278          { ac_try='test -s conftest$ac_exeext'
9279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9280   (eval $ac_try) 2>&5
9281   ac_status=$?
9282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9283   (exit $ac_status); }; }; then
9284   ac_cv_func_wctype=yes
9285 else
9286   echo "$as_me: failed program was:" >&5
9287 sed 's/^/| /' conftest.$ac_ext >&5
9288
9289 ac_cv_func_wctype=no
9290 fi
9291 rm -f conftest.err conftest.$ac_objext \
9292       conftest$ac_exeext conftest.$ac_ext
9293 fi
9294 echo "$as_me:$LINENO: result: $ac_cv_func_wctype" >&5
9295 echo "${ECHO_T}$ac_cv_func_wctype" >&6
9296 if test $ac_cv_func_wctype = yes; then
9297   :
9298 else
9299
9300 echo "$as_me:$LINENO: checking for wctype in -lw" >&5
9301 echo $ECHO_N "checking for wctype in -lw... $ECHO_C" >&6
9302 if test "${ac_cv_lib_w_wctype+set}" = set; then
9303   echo $ECHO_N "(cached) $ECHO_C" >&6
9304 else
9305   ac_check_lib_save_LIBS=$LIBS
9306 LIBS="-lw  $LIBS"
9307 cat >conftest.$ac_ext <<_ACEOF
9308 /* confdefs.h.  */
9309 _ACEOF
9310 cat confdefs.h >>conftest.$ac_ext
9311 cat >>conftest.$ac_ext <<_ACEOF
9312 /* end confdefs.h.  */
9313
9314 /* Override any gcc2 internal prototype to avoid an error.  */
9315 #ifdef __cplusplus
9316 extern "C"
9317 #endif
9318 /* We use char because int might match the return type of a gcc2
9319    builtin and then its argument prototype would still apply.  */
9320 char wctype ();
9321 int
9322 main ()
9323 {
9324 wctype ();
9325   ;
9326   return 0;
9327 }
9328 _ACEOF
9329 rm -f conftest.$ac_objext conftest$ac_exeext
9330 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9331   (eval $ac_link) 2>conftest.er1
9332   ac_status=$?
9333   grep -v '^ *+' conftest.er1 >conftest.err
9334   rm -f conftest.er1
9335   cat conftest.err >&5
9336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9337   (exit $ac_status); } &&
9338          { ac_try='test -z "$ac_c_werror_flag"
9339                          || test ! -s conftest.err'
9340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9341   (eval $ac_try) 2>&5
9342   ac_status=$?
9343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9344   (exit $ac_status); }; } &&
9345          { ac_try='test -s conftest$ac_exeext'
9346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9347   (eval $ac_try) 2>&5
9348   ac_status=$?
9349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9350   (exit $ac_status); }; }; then
9351   ac_cv_lib_w_wctype=yes
9352 else
9353   echo "$as_me: failed program was:" >&5
9354 sed 's/^/| /' conftest.$ac_ext >&5
9355
9356 ac_cv_lib_w_wctype=no
9357 fi
9358 rm -f conftest.err conftest.$ac_objext \
9359       conftest$ac_exeext conftest.$ac_ext
9360 LIBS=$ac_check_lib_save_LIBS
9361 fi
9362 echo "$as_me:$LINENO: result: $ac_cv_lib_w_wctype" >&5
9363 echo "${ECHO_T}$ac_cv_lib_w_wctype" >&6
9364 if test $ac_cv_lib_w_wctype = yes; then
9365   cat >>confdefs.h <<_ACEOF
9366 #define HAVE_LIBW 1
9367 _ACEOF
9368
9369   LIBS="-lw $LIBS"
9370
9371 fi
9372
9373 fi
9374
9375
9376 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
9377 echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
9378 echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
9379 if test "${ac_cv_search_gethostbyname+set}" = set; then
9380   echo $ECHO_N "(cached) $ECHO_C" >&6
9381 else
9382   ac_func_search_save_LIBS=$LIBS
9383 ac_cv_search_gethostbyname=no
9384 cat >conftest.$ac_ext <<_ACEOF
9385 /* confdefs.h.  */
9386 _ACEOF
9387 cat confdefs.h >>conftest.$ac_ext
9388 cat >>conftest.$ac_ext <<_ACEOF
9389 /* end confdefs.h.  */
9390
9391 /* Override any gcc2 internal prototype to avoid an error.  */
9392 #ifdef __cplusplus
9393 extern "C"
9394 #endif
9395 /* We use char because int might match the return type of a gcc2
9396    builtin and then its argument prototype would still apply.  */
9397 char gethostbyname ();
9398 int
9399 main ()
9400 {
9401 gethostbyname ();
9402   ;
9403   return 0;
9404 }
9405 _ACEOF
9406 rm -f conftest.$ac_objext conftest$ac_exeext
9407 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9408   (eval $ac_link) 2>conftest.er1
9409   ac_status=$?
9410   grep -v '^ *+' conftest.er1 >conftest.err
9411   rm -f conftest.er1
9412   cat conftest.err >&5
9413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9414   (exit $ac_status); } &&
9415          { ac_try='test -z "$ac_c_werror_flag"
9416                          || test ! -s conftest.err'
9417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9418   (eval $ac_try) 2>&5
9419   ac_status=$?
9420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9421   (exit $ac_status); }; } &&
9422          { ac_try='test -s conftest$ac_exeext'
9423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9424   (eval $ac_try) 2>&5
9425   ac_status=$?
9426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9427   (exit $ac_status); }; }; then
9428   ac_cv_search_gethostbyname="none required"
9429 else
9430   echo "$as_me: failed program was:" >&5
9431 sed 's/^/| /' conftest.$ac_ext >&5
9432
9433 fi
9434 rm -f conftest.err conftest.$ac_objext \
9435       conftest$ac_exeext conftest.$ac_ext
9436 if test "$ac_cv_search_gethostbyname" = no; then
9437   for ac_lib in nsl; do
9438     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9439     cat >conftest.$ac_ext <<_ACEOF
9440 /* confdefs.h.  */
9441 _ACEOF
9442 cat confdefs.h >>conftest.$ac_ext
9443 cat >>conftest.$ac_ext <<_ACEOF
9444 /* end confdefs.h.  */
9445
9446 /* Override any gcc2 internal prototype to avoid an error.  */
9447 #ifdef __cplusplus
9448 extern "C"
9449 #endif
9450 /* We use char because int might match the return type of a gcc2
9451    builtin and then its argument prototype would still apply.  */
9452 char gethostbyname ();
9453 int
9454 main ()
9455 {
9456 gethostbyname ();
9457   ;
9458   return 0;
9459 }
9460 _ACEOF
9461 rm -f conftest.$ac_objext conftest$ac_exeext
9462 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9463   (eval $ac_link) 2>conftest.er1
9464   ac_status=$?
9465   grep -v '^ *+' conftest.er1 >conftest.err
9466   rm -f conftest.er1
9467   cat conftest.err >&5
9468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9469   (exit $ac_status); } &&
9470          { ac_try='test -z "$ac_c_werror_flag"
9471                          || test ! -s conftest.err'
9472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9473   (eval $ac_try) 2>&5
9474   ac_status=$?
9475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9476   (exit $ac_status); }; } &&
9477          { ac_try='test -s conftest$ac_exeext'
9478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9479   (eval $ac_try) 2>&5
9480   ac_status=$?
9481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9482   (exit $ac_status); }; }; then
9483   ac_cv_search_gethostbyname="-l$ac_lib"
9484 break
9485 else
9486   echo "$as_me: failed program was:" >&5
9487 sed 's/^/| /' conftest.$ac_ext >&5
9488
9489 fi
9490 rm -f conftest.err conftest.$ac_objext \
9491       conftest$ac_exeext conftest.$ac_ext
9492   done
9493 fi
9494 LIBS=$ac_func_search_save_LIBS
9495 fi
9496 echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
9497 echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
9498 if test "$ac_cv_search_gethostbyname" != no; then
9499   test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
9500
9501 fi
9502
9503
9504 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
9505 echo "$as_me:$LINENO: checking for library containing socketpair" >&5
9506 echo $ECHO_N "checking for library containing socketpair... $ECHO_C" >&6
9507 if test "${ac_cv_search_socketpair+set}" = set; then
9508   echo $ECHO_N "(cached) $ECHO_C" >&6
9509 else
9510   ac_func_search_save_LIBS=$LIBS
9511 ac_cv_search_socketpair=no
9512 cat >conftest.$ac_ext <<_ACEOF
9513 /* confdefs.h.  */
9514 _ACEOF
9515 cat confdefs.h >>conftest.$ac_ext
9516 cat >>conftest.$ac_ext <<_ACEOF
9517 /* end confdefs.h.  */
9518
9519 /* Override any gcc2 internal prototype to avoid an error.  */
9520 #ifdef __cplusplus
9521 extern "C"
9522 #endif
9523 /* We use char because int might match the return type of a gcc2
9524    builtin and then its argument prototype would still apply.  */
9525 char socketpair ();
9526 int
9527 main ()
9528 {
9529 socketpair ();
9530   ;
9531   return 0;
9532 }
9533 _ACEOF
9534 rm -f conftest.$ac_objext conftest$ac_exeext
9535 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9536   (eval $ac_link) 2>conftest.er1
9537   ac_status=$?
9538   grep -v '^ *+' conftest.er1 >conftest.err
9539   rm -f conftest.er1
9540   cat conftest.err >&5
9541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9542   (exit $ac_status); } &&
9543          { ac_try='test -z "$ac_c_werror_flag"
9544                          || test ! -s conftest.err'
9545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9546   (eval $ac_try) 2>&5
9547   ac_status=$?
9548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9549   (exit $ac_status); }; } &&
9550          { ac_try='test -s conftest$ac_exeext'
9551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9552   (eval $ac_try) 2>&5
9553   ac_status=$?
9554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9555   (exit $ac_status); }; }; then
9556   ac_cv_search_socketpair="none required"
9557 else
9558   echo "$as_me: failed program was:" >&5
9559 sed 's/^/| /' conftest.$ac_ext >&5
9560
9561 fi
9562 rm -f conftest.err conftest.$ac_objext \
9563       conftest$ac_exeext conftest.$ac_ext
9564 if test "$ac_cv_search_socketpair" = no; then
9565   for ac_lib in socket; do
9566     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9567     cat >conftest.$ac_ext <<_ACEOF
9568 /* confdefs.h.  */
9569 _ACEOF
9570 cat confdefs.h >>conftest.$ac_ext
9571 cat >>conftest.$ac_ext <<_ACEOF
9572 /* end confdefs.h.  */
9573
9574 /* Override any gcc2 internal prototype to avoid an error.  */
9575 #ifdef __cplusplus
9576 extern "C"
9577 #endif
9578 /* We use char because int might match the return type of a gcc2
9579    builtin and then its argument prototype would still apply.  */
9580 char socketpair ();
9581 int
9582 main ()
9583 {
9584 socketpair ();
9585   ;
9586   return 0;
9587 }
9588 _ACEOF
9589 rm -f conftest.$ac_objext conftest$ac_exeext
9590 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9591   (eval $ac_link) 2>conftest.er1
9592   ac_status=$?
9593   grep -v '^ *+' conftest.er1 >conftest.err
9594   rm -f conftest.er1
9595   cat conftest.err >&5
9596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9597   (exit $ac_status); } &&
9598          { ac_try='test -z "$ac_c_werror_flag"
9599                          || test ! -s conftest.err'
9600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9601   (eval $ac_try) 2>&5
9602   ac_status=$?
9603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9604   (exit $ac_status); }; } &&
9605          { ac_try='test -s conftest$ac_exeext'
9606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9607   (eval $ac_try) 2>&5
9608   ac_status=$?
9609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9610   (exit $ac_status); }; }; then
9611   ac_cv_search_socketpair="-l$ac_lib"
9612 break
9613 else
9614   echo "$as_me: failed program was:" >&5
9615 sed 's/^/| /' conftest.$ac_ext >&5
9616
9617 fi
9618 rm -f conftest.err conftest.$ac_objext \
9619       conftest$ac_exeext conftest.$ac_ext
9620   done
9621 fi
9622 LIBS=$ac_func_search_save_LIBS
9623 fi
9624 echo "$as_me:$LINENO: result: $ac_cv_search_socketpair" >&5
9625 echo "${ECHO_T}$ac_cv_search_socketpair" >&6
9626 if test "$ac_cv_search_socketpair" != no; then
9627   test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
9628
9629 fi
9630
9631
9632 # Link in zlib if we can.  This allows us to read compressed debug sections.
9633 echo "$as_me:$LINENO: checking for library containing zlibVersion" >&5
9634 echo $ECHO_N "checking for library containing zlibVersion... $ECHO_C" >&6
9635 if test "${ac_cv_search_zlibVersion+set}" = set; then
9636   echo $ECHO_N "(cached) $ECHO_C" >&6
9637 else
9638   ac_func_search_save_LIBS=$LIBS
9639 ac_cv_search_zlibVersion=no
9640 cat >conftest.$ac_ext <<_ACEOF
9641 /* confdefs.h.  */
9642 _ACEOF
9643 cat confdefs.h >>conftest.$ac_ext
9644 cat >>conftest.$ac_ext <<_ACEOF
9645 /* end confdefs.h.  */
9646
9647 /* Override any gcc2 internal prototype to avoid an error.  */
9648 #ifdef __cplusplus
9649 extern "C"
9650 #endif
9651 /* We use char because int might match the return type of a gcc2
9652    builtin and then its argument prototype would still apply.  */
9653 char zlibVersion ();
9654 int
9655 main ()
9656 {
9657 zlibVersion ();
9658   ;
9659   return 0;
9660 }
9661 _ACEOF
9662 rm -f conftest.$ac_objext conftest$ac_exeext
9663 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9664   (eval $ac_link) 2>conftest.er1
9665   ac_status=$?
9666   grep -v '^ *+' conftest.er1 >conftest.err
9667   rm -f conftest.er1
9668   cat conftest.err >&5
9669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9670   (exit $ac_status); } &&
9671          { ac_try='test -z "$ac_c_werror_flag"
9672                          || test ! -s conftest.err'
9673   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9674   (eval $ac_try) 2>&5
9675   ac_status=$?
9676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9677   (exit $ac_status); }; } &&
9678          { ac_try='test -s conftest$ac_exeext'
9679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9680   (eval $ac_try) 2>&5
9681   ac_status=$?
9682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9683   (exit $ac_status); }; }; then
9684   ac_cv_search_zlibVersion="none required"
9685 else
9686   echo "$as_me: failed program was:" >&5
9687 sed 's/^/| /' conftest.$ac_ext >&5
9688
9689 fi
9690 rm -f conftest.err conftest.$ac_objext \
9691       conftest$ac_exeext conftest.$ac_ext
9692 if test "$ac_cv_search_zlibVersion" = no; then
9693   for ac_lib in z; do
9694     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9695     cat >conftest.$ac_ext <<_ACEOF
9696 /* confdefs.h.  */
9697 _ACEOF
9698 cat confdefs.h >>conftest.$ac_ext
9699 cat >>conftest.$ac_ext <<_ACEOF
9700 /* end confdefs.h.  */
9701
9702 /* Override any gcc2 internal prototype to avoid an error.  */
9703 #ifdef __cplusplus
9704 extern "C"
9705 #endif
9706 /* We use char because int might match the return type of a gcc2
9707    builtin and then its argument prototype would still apply.  */
9708 char zlibVersion ();
9709 int
9710 main ()
9711 {
9712 zlibVersion ();
9713   ;
9714   return 0;
9715 }
9716 _ACEOF
9717 rm -f conftest.$ac_objext conftest$ac_exeext
9718 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9719   (eval $ac_link) 2>conftest.er1
9720   ac_status=$?
9721   grep -v '^ *+' conftest.er1 >conftest.err
9722   rm -f conftest.er1
9723   cat conftest.err >&5
9724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9725   (exit $ac_status); } &&
9726          { ac_try='test -z "$ac_c_werror_flag"
9727                          || test ! -s conftest.err'
9728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9729   (eval $ac_try) 2>&5
9730   ac_status=$?
9731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9732   (exit $ac_status); }; } &&
9733          { ac_try='test -s conftest$ac_exeext'
9734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9735   (eval $ac_try) 2>&5
9736   ac_status=$?
9737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9738   (exit $ac_status); }; }; then
9739   ac_cv_search_zlibVersion="-l$ac_lib"
9740 break
9741 else
9742   echo "$as_me: failed program was:" >&5
9743 sed 's/^/| /' conftest.$ac_ext >&5
9744
9745 fi
9746 rm -f conftest.err conftest.$ac_objext \
9747       conftest$ac_exeext conftest.$ac_ext
9748   done
9749 fi
9750 LIBS=$ac_func_search_save_LIBS
9751 fi
9752 echo "$as_me:$LINENO: result: $ac_cv_search_zlibVersion" >&5
9753 echo "${ECHO_T}$ac_cv_search_zlibVersion" >&6
9754 if test "$ac_cv_search_zlibVersion" != no; then
9755   test "$ac_cv_search_zlibVersion" = "none required" || LIBS="$ac_cv_search_zlibVersion $LIBS"
9756
9757 for ac_header in zlib.h
9758 do
9759 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9760 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9761   echo "$as_me:$LINENO: checking for $ac_header" >&5
9762 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9763 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9764   echo $ECHO_N "(cached) $ECHO_C" >&6
9765 fi
9766 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9767 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9768 else
9769   # Is the header compilable?
9770 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9771 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9772 cat >conftest.$ac_ext <<_ACEOF
9773 /* confdefs.h.  */
9774 _ACEOF
9775 cat confdefs.h >>conftest.$ac_ext
9776 cat >>conftest.$ac_ext <<_ACEOF
9777 /* end confdefs.h.  */
9778 $ac_includes_default
9779 #include <$ac_header>
9780 _ACEOF
9781 rm -f conftest.$ac_objext
9782 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9783   (eval $ac_compile) 2>conftest.er1
9784   ac_status=$?
9785   grep -v '^ *+' conftest.er1 >conftest.err
9786   rm -f conftest.er1
9787   cat conftest.err >&5
9788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9789   (exit $ac_status); } &&
9790          { ac_try='test -z "$ac_c_werror_flag"
9791                          || test ! -s conftest.err'
9792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9793   (eval $ac_try) 2>&5
9794   ac_status=$?
9795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9796   (exit $ac_status); }; } &&
9797          { ac_try='test -s conftest.$ac_objext'
9798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9799   (eval $ac_try) 2>&5
9800   ac_status=$?
9801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9802   (exit $ac_status); }; }; then
9803   ac_header_compiler=yes
9804 else
9805   echo "$as_me: failed program was:" >&5
9806 sed 's/^/| /' conftest.$ac_ext >&5
9807
9808 ac_header_compiler=no
9809 fi
9810 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9811 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9812 echo "${ECHO_T}$ac_header_compiler" >&6
9813
9814 # Is the header present?
9815 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9816 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9817 cat >conftest.$ac_ext <<_ACEOF
9818 /* confdefs.h.  */
9819 _ACEOF
9820 cat confdefs.h >>conftest.$ac_ext
9821 cat >>conftest.$ac_ext <<_ACEOF
9822 /* end confdefs.h.  */
9823 #include <$ac_header>
9824 _ACEOF
9825 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9826   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9827   ac_status=$?
9828   grep -v '^ *+' conftest.er1 >conftest.err
9829   rm -f conftest.er1
9830   cat conftest.err >&5
9831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9832   (exit $ac_status); } >/dev/null; then
9833   if test -s conftest.err; then
9834     ac_cpp_err=$ac_c_preproc_warn_flag
9835     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9836   else
9837     ac_cpp_err=
9838   fi
9839 else
9840   ac_cpp_err=yes
9841 fi
9842 if test -z "$ac_cpp_err"; then
9843   ac_header_preproc=yes
9844 else
9845   echo "$as_me: failed program was:" >&5
9846 sed 's/^/| /' conftest.$ac_ext >&5
9847
9848   ac_header_preproc=no
9849 fi
9850 rm -f conftest.err conftest.$ac_ext
9851 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9852 echo "${ECHO_T}$ac_header_preproc" >&6
9853
9854 # So?  What about this header?
9855 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9856   yes:no: )
9857     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9858 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9859     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9860 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9861     ac_header_preproc=yes
9862     ;;
9863   no:yes:* )
9864     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9865 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9866     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9867 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9868     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9869 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9870     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9871 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9872     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9873 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9874     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9875 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9876     (
9877       cat <<\_ASBOX
9878 ## ------------------------------------------ ##
9879 ## Report this to the AC_PACKAGE_NAME lists.  ##
9880 ## ------------------------------------------ ##
9881 _ASBOX
9882     ) |
9883       sed "s/^/$as_me: WARNING:     /" >&2
9884     ;;
9885 esac
9886 echo "$as_me:$LINENO: checking for $ac_header" >&5
9887 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9888 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9889   echo $ECHO_N "(cached) $ECHO_C" >&6
9890 else
9891   eval "$as_ac_Header=\$ac_header_preproc"
9892 fi
9893 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9894 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9895
9896 fi
9897 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9898   cat >>confdefs.h <<_ACEOF
9899 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9900 _ACEOF
9901
9902 fi
9903
9904 done
9905
9906 fi
9907
9908
9909 # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
9910 echo "$as_me:$LINENO: checking for library containing dlgetmodinfo" >&5
9911 echo $ECHO_N "checking for library containing dlgetmodinfo... $ECHO_C" >&6
9912 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then
9913   echo $ECHO_N "(cached) $ECHO_C" >&6
9914 else
9915   ac_func_search_save_LIBS=$LIBS
9916 ac_cv_search_dlgetmodinfo=no
9917 cat >conftest.$ac_ext <<_ACEOF
9918 /* confdefs.h.  */
9919 _ACEOF
9920 cat confdefs.h >>conftest.$ac_ext
9921 cat >>conftest.$ac_ext <<_ACEOF
9922 /* end confdefs.h.  */
9923
9924 /* Override any gcc2 internal prototype to avoid an error.  */
9925 #ifdef __cplusplus
9926 extern "C"
9927 #endif
9928 /* We use char because int might match the return type of a gcc2
9929    builtin and then its argument prototype would still apply.  */
9930 char dlgetmodinfo ();
9931 int
9932 main ()
9933 {
9934 dlgetmodinfo ();
9935   ;
9936   return 0;
9937 }
9938 _ACEOF
9939 rm -f conftest.$ac_objext conftest$ac_exeext
9940 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9941   (eval $ac_link) 2>conftest.er1
9942   ac_status=$?
9943   grep -v '^ *+' conftest.er1 >conftest.err
9944   rm -f conftest.er1
9945   cat conftest.err >&5
9946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9947   (exit $ac_status); } &&
9948          { ac_try='test -z "$ac_c_werror_flag"
9949                          || test ! -s conftest.err'
9950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9951   (eval $ac_try) 2>&5
9952   ac_status=$?
9953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9954   (exit $ac_status); }; } &&
9955          { ac_try='test -s conftest$ac_exeext'
9956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9957   (eval $ac_try) 2>&5
9958   ac_status=$?
9959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9960   (exit $ac_status); }; }; then
9961   ac_cv_search_dlgetmodinfo="none required"
9962 else
9963   echo "$as_me: failed program was:" >&5
9964 sed 's/^/| /' conftest.$ac_ext >&5
9965
9966 fi
9967 rm -f conftest.err conftest.$ac_objext \
9968       conftest$ac_exeext conftest.$ac_ext
9969 if test "$ac_cv_search_dlgetmodinfo" = no; then
9970   for ac_lib in dl xpdl; do
9971     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9972     cat >conftest.$ac_ext <<_ACEOF
9973 /* confdefs.h.  */
9974 _ACEOF
9975 cat confdefs.h >>conftest.$ac_ext
9976 cat >>conftest.$ac_ext <<_ACEOF
9977 /* end confdefs.h.  */
9978
9979 /* Override any gcc2 internal prototype to avoid an error.  */
9980 #ifdef __cplusplus
9981 extern "C"
9982 #endif
9983 /* We use char because int might match the return type of a gcc2
9984    builtin and then its argument prototype would still apply.  */
9985 char dlgetmodinfo ();
9986 int
9987 main ()
9988 {
9989 dlgetmodinfo ();
9990   ;
9991   return 0;
9992 }
9993 _ACEOF
9994 rm -f conftest.$ac_objext conftest$ac_exeext
9995 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9996   (eval $ac_link) 2>conftest.er1
9997   ac_status=$?
9998   grep -v '^ *+' conftest.er1 >conftest.err
9999   rm -f conftest.er1
10000   cat conftest.err >&5
10001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10002   (exit $ac_status); } &&
10003          { ac_try='test -z "$ac_c_werror_flag"
10004                          || test ! -s conftest.err'
10005   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10006   (eval $ac_try) 2>&5
10007   ac_status=$?
10008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10009   (exit $ac_status); }; } &&
10010          { ac_try='test -s conftest$ac_exeext'
10011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10012   (eval $ac_try) 2>&5
10013   ac_status=$?
10014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10015   (exit $ac_status); }; }; then
10016   ac_cv_search_dlgetmodinfo="-l$ac_lib"
10017 break
10018 else
10019   echo "$as_me: failed program was:" >&5
10020 sed 's/^/| /' conftest.$ac_ext >&5
10021
10022 fi
10023 rm -f conftest.err conftest.$ac_objext \
10024       conftest$ac_exeext conftest.$ac_ext
10025   done
10026 fi
10027 LIBS=$ac_func_search_save_LIBS
10028 fi
10029 echo "$as_me:$LINENO: result: $ac_cv_search_dlgetmodinfo" >&5
10030 echo "${ECHO_T}$ac_cv_search_dlgetmodinfo" >&6
10031 if test "$ac_cv_search_dlgetmodinfo" != no; then
10032   test "$ac_cv_search_dlgetmodinfo" = "none required" || LIBS="$ac_cv_search_dlgetmodinfo $LIBS"
10033
10034 fi
10035
10036
10037
10038
10039
10040 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10041 if test "${with_libiconv_prefix+set}" = set; then
10042   withval="$with_libiconv_prefix"
10043
10044     for dir in `echo "$withval" | tr : ' '`; do
10045       if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
10046       if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
10047     done
10048
10049 fi;
10050
10051   BUILD_LIBICONV_LIBDIR="-L../libiconv/lib/.libs -L../libiconv/lib/_libs"
10052   BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
10053
10054   echo "$as_me:$LINENO: checking for iconv" >&5
10055 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10056 if test "${am_cv_func_iconv+set}" = set; then
10057   echo $ECHO_N "(cached) $ECHO_C" >&6
10058 else
10059
10060     am_cv_func_iconv="no, consider installing GNU libiconv"
10061     am_cv_lib_iconv=no
10062     am_cv_use_build_libiconv=no
10063     # First, try to find iconv in libc.
10064     cat >conftest.$ac_ext <<_ACEOF
10065 /* confdefs.h.  */
10066 _ACEOF
10067 cat confdefs.h >>conftest.$ac_ext
10068 cat >>conftest.$ac_ext <<_ACEOF
10069 /* end confdefs.h.  */
10070 #include <stdlib.h>
10071 #include <iconv.h>
10072 int
10073 main ()
10074 {
10075 iconv_t cd = iconv_open("","");
10076        iconv(cd,NULL,NULL,NULL,NULL);
10077        iconv_close(cd);
10078   ;
10079   return 0;
10080 }
10081 _ACEOF
10082 rm -f conftest.$ac_objext conftest$ac_exeext
10083 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10084   (eval $ac_link) 2>conftest.er1
10085   ac_status=$?
10086   grep -v '^ *+' conftest.er1 >conftest.err
10087   rm -f conftest.er1
10088   cat conftest.err >&5
10089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10090   (exit $ac_status); } &&
10091          { ac_try='test -z "$ac_c_werror_flag"
10092                          || test ! -s conftest.err'
10093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10094   (eval $ac_try) 2>&5
10095   ac_status=$?
10096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10097   (exit $ac_status); }; } &&
10098          { ac_try='test -s conftest$ac_exeext'
10099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10100   (eval $ac_try) 2>&5
10101   ac_status=$?
10102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10103   (exit $ac_status); }; }; then
10104   am_cv_func_iconv=yes
10105 else
10106   echo "$as_me: failed program was:" >&5
10107 sed 's/^/| /' conftest.$ac_ext >&5
10108
10109 fi
10110 rm -f conftest.err conftest.$ac_objext \
10111       conftest$ac_exeext conftest.$ac_ext
10112
10113     # If iconv was not in libc, try -liconv.  In this case, arrange to
10114     # look in the libiconv prefix, if it was specified by the user.
10115     if test "$am_cv_func_iconv" != yes; then
10116       am_save_CPPFLAGS="$CPPFLAGS"
10117       am_save_LIBS="$LIBS"
10118       if test -n "$LIBICONV_INCLUDE"; then
10119         CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10120         LIBS="$LIBS $LIBICONV_LIBDIR"
10121       fi
10122       LIBS="$LIBS -liconv"
10123       cat >conftest.$ac_ext <<_ACEOF
10124 /* confdefs.h.  */
10125 _ACEOF
10126 cat confdefs.h >>conftest.$ac_ext
10127 cat >>conftest.$ac_ext <<_ACEOF
10128 /* end confdefs.h.  */
10129 #include <stdlib.h>
10130 #include <iconv.h>
10131 int
10132 main ()
10133 {
10134 iconv_t cd = iconv_open("","");
10135          iconv(cd,NULL,NULL,NULL,NULL);
10136          iconv_close(cd);
10137   ;
10138   return 0;
10139 }
10140 _ACEOF
10141 rm -f conftest.$ac_objext conftest$ac_exeext
10142 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10143   (eval $ac_link) 2>conftest.er1
10144   ac_status=$?
10145   grep -v '^ *+' conftest.er1 >conftest.err
10146   rm -f conftest.er1
10147   cat conftest.err >&5
10148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10149   (exit $ac_status); } &&
10150          { ac_try='test -z "$ac_c_werror_flag"
10151                          || test ! -s conftest.err'
10152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10153   (eval $ac_try) 2>&5
10154   ac_status=$?
10155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10156   (exit $ac_status); }; } &&
10157          { ac_try='test -s conftest$ac_exeext'
10158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10159   (eval $ac_try) 2>&5
10160   ac_status=$?
10161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10162   (exit $ac_status); }; }; then
10163   am_cv_lib_iconv=yes
10164         am_cv_func_iconv=yes
10165 else
10166   echo "$as_me: failed program was:" >&5
10167 sed 's/^/| /' conftest.$ac_ext >&5
10168
10169 fi
10170 rm -f conftest.err conftest.$ac_objext \
10171       conftest$ac_exeext conftest.$ac_ext
10172       LIBS="$am_save_LIBS"
10173       CPPFLAGS="$am_save_CPPFLAGS"
10174     fi
10175
10176     # If that didn't work, try to find libiconv in the build tree.
10177     if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
10178       am_save_LIBS="$LIBS"
10179       am_save_CPPFLAGS="$CPPFLAGS"
10180       LIBS="$LIBS $BUILD_LIBICONV_LIBDIR -liconv"
10181       CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
10182       cat >conftest.$ac_ext <<_ACEOF
10183 /* confdefs.h.  */
10184 _ACEOF
10185 cat confdefs.h >>conftest.$ac_ext
10186 cat >>conftest.$ac_ext <<_ACEOF
10187 /* end confdefs.h.  */
10188 #include <stdlib.h>
10189 #include <iconv.h>
10190 int
10191 main ()
10192 {
10193 iconv_t cd = iconv_open("","");
10194          iconv(cd,NULL,NULL,NULL,NULL);
10195          iconv_close(cd);
10196   ;
10197   return 0;
10198 }
10199 _ACEOF
10200 rm -f conftest.$ac_objext conftest$ac_exeext
10201 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10202   (eval $ac_link) 2>conftest.er1
10203   ac_status=$?
10204   grep -v '^ *+' conftest.er1 >conftest.err
10205   rm -f conftest.er1
10206   cat conftest.err >&5
10207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10208   (exit $ac_status); } &&
10209          { ac_try='test -z "$ac_c_werror_flag"
10210                          || test ! -s conftest.err'
10211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10212   (eval $ac_try) 2>&5
10213   ac_status=$?
10214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10215   (exit $ac_status); }; } &&
10216          { ac_try='test -s conftest$ac_exeext'
10217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10218   (eval $ac_try) 2>&5
10219   ac_status=$?
10220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10221   (exit $ac_status); }; }; then
10222   am_cv_use_build_libiconv=yes
10223         am_cv_lib_iconv=yes
10224         am_cv_func_iconv=yes
10225 else
10226   echo "$as_me: failed program was:" >&5
10227 sed 's/^/| /' conftest.$ac_ext >&5
10228
10229 fi
10230 rm -f conftest.err conftest.$ac_objext \
10231       conftest$ac_exeext conftest.$ac_ext
10232       LIBS="$am_save_LIBS"
10233       CPPFLAGS="$am_save_CPPFLAGS"
10234     fi
10235
10236 fi
10237 echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
10238 echo "${ECHO_T}$am_cv_func_iconv" >&6
10239
10240   # Set the various flags based on the cache variables.  We can't rely
10241   # on the flags to remain set from the above code, due to caching.
10242   LIBICONV=
10243   if test "$am_cv_lib_iconv" = yes; then
10244     LIBICONV="-liconv"
10245   else
10246     LIBICONV_LIBDIR=
10247     LIBICONV_INCLUDE=
10248   fi
10249   if test "$am_cv_use_build_libiconv" = yes; then
10250     LIBICONV_LIBDIR="$BUILD_LIBICONV_LIBDIR"
10251     LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
10252   fi
10253   CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10254   LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
10255
10256   if test "$am_cv_func_iconv" = yes; then
10257
10258 cat >>confdefs.h <<\_ACEOF
10259 #define HAVE_ICONV 1
10260 _ACEOF
10261
10262     echo "$as_me:$LINENO: checking for iconv declaration" >&5
10263 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
10264     if test "${am_cv_proto_iconv+set}" = set; then
10265   echo $ECHO_N "(cached) $ECHO_C" >&6
10266 else
10267
10268       cat >conftest.$ac_ext <<_ACEOF
10269 /* confdefs.h.  */
10270 _ACEOF
10271 cat confdefs.h >>conftest.$ac_ext
10272 cat >>conftest.$ac_ext <<_ACEOF
10273 /* end confdefs.h.  */
10274
10275 #include <stdlib.h>
10276 #include <iconv.h>
10277 extern
10278 #ifdef __cplusplus
10279 "C"
10280 #endif
10281 #if defined(__STDC__) || defined(__cplusplus)
10282 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10283 #else
10284 size_t iconv();
10285 #endif
10286
10287 int
10288 main ()
10289 {
10290
10291   ;
10292   return 0;
10293 }
10294 _ACEOF
10295 rm -f conftest.$ac_objext
10296 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10297   (eval $ac_compile) 2>conftest.er1
10298   ac_status=$?
10299   grep -v '^ *+' conftest.er1 >conftest.err
10300   rm -f conftest.er1
10301   cat conftest.err >&5
10302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10303   (exit $ac_status); } &&
10304          { ac_try='test -z "$ac_c_werror_flag"
10305                          || test ! -s conftest.err'
10306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10307   (eval $ac_try) 2>&5
10308   ac_status=$?
10309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10310   (exit $ac_status); }; } &&
10311          { ac_try='test -s conftest.$ac_objext'
10312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10313   (eval $ac_try) 2>&5
10314   ac_status=$?
10315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10316   (exit $ac_status); }; }; then
10317   am_cv_proto_iconv_arg1=""
10318 else
10319   echo "$as_me: failed program was:" >&5
10320 sed 's/^/| /' conftest.$ac_ext >&5
10321
10322 am_cv_proto_iconv_arg1="const"
10323 fi
10324 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10325       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);"
10326 fi
10327
10328     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10329     echo "$as_me:$LINENO: result: ${ac_t:-
10330          }$am_cv_proto_iconv" >&5
10331 echo "${ECHO_T}${ac_t:-
10332          }$am_cv_proto_iconv" >&6
10333
10334 cat >>confdefs.h <<_ACEOF
10335 #define ICONV_CONST $am_cv_proto_iconv_arg1
10336 _ACEOF
10337
10338   fi
10339
10340
10341 # On alpha-osf, it appears that libtermcap and libcurses are not compatible.
10342 # There is a very specific comment in /usr/include/curses.h explaining that
10343 # termcap routines built into libcurses must not be used.
10344 #
10345 # The symptoms we observed so far is GDB unexpectedly changing
10346 # the terminal settings when tgetent is called - this is particularly
10347 # visible as the output is missing carriage returns, and so rapidly
10348 # becomes very hard to read.
10349 #
10350 # The readline configure script has already decided that libtermcap
10351 # was enough for its purposes, and so decided to build readline using
10352 # libtermcap.  Since the TUI mode requires curses, building GDB with
10353 # TUI enabled results in both libraries to be used at the same time,
10354 # which is not allowed.  This basically means that GDB with TUI is
10355 # broken on alpha-osf.
10356
10357 case $host_os in
10358   alpha*-*-osf* )
10359     if "$enable_tui" = "yes"; then
10360       { { echo "$as_me:$LINENO: error: Building GDB with TUI mode is not supported on this host" >&5
10361 echo "$as_me: error: Building GDB with TUI mode is not supported on this host" >&2;}
10362    { (exit 1); exit 1; }; }
10363     fi
10364     if "$enable_tui" = "auto"; then
10365       enable_tui=no
10366     fi
10367     ;;
10368 esac
10369
10370 # For the TUI, we need enhanced curses functionality.
10371 if test x"$enable_tui" != xno; then
10372   prefer_curses=yes
10373 fi
10374
10375 curses_found=no
10376 if test x"$prefer_curses" = xyes; then
10377   # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
10378   # curses library because the latter might not provide all the
10379   # functionality we need.  However, this leads to problems on systems
10380   # where the linker searches /usr/local/lib, but the compiler doesn't
10381   # search /usr/local/include, if ncurses is installed in /usr/local.  A
10382   # default installation of ncurses on alpha*-dec-osf* will lead to such
10383   # a situation.
10384   echo "$as_me:$LINENO: checking for library containing waddstr" >&5
10385 echo $ECHO_N "checking for library containing waddstr... $ECHO_C" >&6
10386 if test "${ac_cv_search_waddstr+set}" = set; then
10387   echo $ECHO_N "(cached) $ECHO_C" >&6
10388 else
10389   ac_func_search_save_LIBS=$LIBS
10390 ac_cv_search_waddstr=no
10391 cat >conftest.$ac_ext <<_ACEOF
10392 /* confdefs.h.  */
10393 _ACEOF
10394 cat confdefs.h >>conftest.$ac_ext
10395 cat >>conftest.$ac_ext <<_ACEOF
10396 /* end confdefs.h.  */
10397
10398 /* Override any gcc2 internal prototype to avoid an error.  */
10399 #ifdef __cplusplus
10400 extern "C"
10401 #endif
10402 /* We use char because int might match the return type of a gcc2
10403    builtin and then its argument prototype would still apply.  */
10404 char waddstr ();
10405 int
10406 main ()
10407 {
10408 waddstr ();
10409   ;
10410   return 0;
10411 }
10412 _ACEOF
10413 rm -f conftest.$ac_objext conftest$ac_exeext
10414 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10415   (eval $ac_link) 2>conftest.er1
10416   ac_status=$?
10417   grep -v '^ *+' conftest.er1 >conftest.err
10418   rm -f conftest.er1
10419   cat conftest.err >&5
10420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10421   (exit $ac_status); } &&
10422          { ac_try='test -z "$ac_c_werror_flag"
10423                          || test ! -s conftest.err'
10424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10425   (eval $ac_try) 2>&5
10426   ac_status=$?
10427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10428   (exit $ac_status); }; } &&
10429          { ac_try='test -s conftest$ac_exeext'
10430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10431   (eval $ac_try) 2>&5
10432   ac_status=$?
10433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10434   (exit $ac_status); }; }; then
10435   ac_cv_search_waddstr="none required"
10436 else
10437   echo "$as_me: failed program was:" >&5
10438 sed 's/^/| /' conftest.$ac_ext >&5
10439
10440 fi
10441 rm -f conftest.err conftest.$ac_objext \
10442       conftest$ac_exeext conftest.$ac_ext
10443 if test "$ac_cv_search_waddstr" = no; then
10444   for ac_lib in ncurses cursesX curses; do
10445     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10446     cat >conftest.$ac_ext <<_ACEOF
10447 /* confdefs.h.  */
10448 _ACEOF
10449 cat confdefs.h >>conftest.$ac_ext
10450 cat >>conftest.$ac_ext <<_ACEOF
10451 /* end confdefs.h.  */
10452
10453 /* Override any gcc2 internal prototype to avoid an error.  */
10454 #ifdef __cplusplus
10455 extern "C"
10456 #endif
10457 /* We use char because int might match the return type of a gcc2
10458    builtin and then its argument prototype would still apply.  */
10459 char waddstr ();
10460 int
10461 main ()
10462 {
10463 waddstr ();
10464   ;
10465   return 0;
10466 }
10467 _ACEOF
10468 rm -f conftest.$ac_objext conftest$ac_exeext
10469 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10470   (eval $ac_link) 2>conftest.er1
10471   ac_status=$?
10472   grep -v '^ *+' conftest.er1 >conftest.err
10473   rm -f conftest.er1
10474   cat conftest.err >&5
10475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10476   (exit $ac_status); } &&
10477          { ac_try='test -z "$ac_c_werror_flag"
10478                          || test ! -s conftest.err'
10479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10480   (eval $ac_try) 2>&5
10481   ac_status=$?
10482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10483   (exit $ac_status); }; } &&
10484          { ac_try='test -s conftest$ac_exeext'
10485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10486   (eval $ac_try) 2>&5
10487   ac_status=$?
10488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10489   (exit $ac_status); }; }; then
10490   ac_cv_search_waddstr="-l$ac_lib"
10491 break
10492 else
10493   echo "$as_me: failed program was:" >&5
10494 sed 's/^/| /' conftest.$ac_ext >&5
10495
10496 fi
10497 rm -f conftest.err conftest.$ac_objext \
10498       conftest$ac_exeext conftest.$ac_ext
10499   done
10500 fi
10501 LIBS=$ac_func_search_save_LIBS
10502 fi
10503 echo "$as_me:$LINENO: result: $ac_cv_search_waddstr" >&5
10504 echo "${ECHO_T}$ac_cv_search_waddstr" >&6
10505 if test "$ac_cv_search_waddstr" != no; then
10506   test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
10507
10508 fi
10509
10510
10511   if test "$ac_cv_search_waddstr" != no; then
10512     curses_found=yes
10513   fi
10514 fi
10515
10516 # Check whether we should enable the TUI, but only do so if we really
10517 # can.
10518 if test x"$enable_tui" != xno; then
10519   if test -d $srcdir/tui; then
10520     if test "$curses_found" != no; then
10521       CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
10522       CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
10523       CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
10524       ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
10525       CONFIG_ALL="${CONFIG_ALL} all-tui"
10526       CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
10527       CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
10528       CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
10529     else
10530       if test x"$enable_tui" = xyes; then
10531         { { echo "$as_me:$LINENO: error: no enhanced curses library found; disable TUI" >&5
10532 echo "$as_me: error: no enhanced curses library found; disable TUI" >&2;}
10533    { (exit 1); exit 1; }; }
10534       else
10535         { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
10536 echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
10537       fi
10538     fi
10539   fi
10540 fi
10541
10542 # Since GDB uses Readline, we need termcap functionality.  In many
10543 # cases this will be provided by the curses library, but some systems
10544 # have a seperate termcap library, or no curses library at all.
10545
10546 case $host_os in
10547   cygwin*)
10548     if test -d $srcdir/libtermcap; then
10549       LIBS="../libtermcap/libtermcap.a $LIBS"
10550       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
10551     fi ;;
10552   go32* | *djgpp*)
10553     ac_cv_search_tgetent="none required"
10554     ;;
10555   *mingw32*)
10556     ac_cv_search_tgetent="none required"
10557     CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
10558     ;;
10559 esac
10560
10561 # These are the libraries checked by Readline.
10562 echo "$as_me:$LINENO: checking for library containing tgetent" >&5
10563 echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6
10564 if test "${ac_cv_search_tgetent+set}" = set; then
10565   echo $ECHO_N "(cached) $ECHO_C" >&6
10566 else
10567   ac_func_search_save_LIBS=$LIBS
10568 ac_cv_search_tgetent=no
10569 cat >conftest.$ac_ext <<_ACEOF
10570 /* confdefs.h.  */
10571 _ACEOF
10572 cat confdefs.h >>conftest.$ac_ext
10573 cat >>conftest.$ac_ext <<_ACEOF
10574 /* end confdefs.h.  */
10575
10576 /* Override any gcc2 internal prototype to avoid an error.  */
10577 #ifdef __cplusplus
10578 extern "C"
10579 #endif
10580 /* We use char because int might match the return type of a gcc2
10581    builtin and then its argument prototype would still apply.  */
10582 char tgetent ();
10583 int
10584 main ()
10585 {
10586 tgetent ();
10587   ;
10588   return 0;
10589 }
10590 _ACEOF
10591 rm -f conftest.$ac_objext conftest$ac_exeext
10592 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10593   (eval $ac_link) 2>conftest.er1
10594   ac_status=$?
10595   grep -v '^ *+' conftest.er1 >conftest.err
10596   rm -f conftest.er1
10597   cat conftest.err >&5
10598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10599   (exit $ac_status); } &&
10600          { ac_try='test -z "$ac_c_werror_flag"
10601                          || test ! -s conftest.err'
10602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10603   (eval $ac_try) 2>&5
10604   ac_status=$?
10605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10606   (exit $ac_status); }; } &&
10607          { ac_try='test -s conftest$ac_exeext'
10608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10609   (eval $ac_try) 2>&5
10610   ac_status=$?
10611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10612   (exit $ac_status); }; }; then
10613   ac_cv_search_tgetent="none required"
10614 else
10615   echo "$as_me: failed program was:" >&5
10616 sed 's/^/| /' conftest.$ac_ext >&5
10617
10618 fi
10619 rm -f conftest.err conftest.$ac_objext \
10620       conftest$ac_exeext conftest.$ac_ext
10621 if test "$ac_cv_search_tgetent" = no; then
10622   for ac_lib in termcap tinfo curses ncurses; do
10623     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10624     cat >conftest.$ac_ext <<_ACEOF
10625 /* confdefs.h.  */
10626 _ACEOF
10627 cat confdefs.h >>conftest.$ac_ext
10628 cat >>conftest.$ac_ext <<_ACEOF
10629 /* end confdefs.h.  */
10630
10631 /* Override any gcc2 internal prototype to avoid an error.  */
10632 #ifdef __cplusplus
10633 extern "C"
10634 #endif
10635 /* We use char because int might match the return type of a gcc2
10636    builtin and then its argument prototype would still apply.  */
10637 char tgetent ();
10638 int
10639 main ()
10640 {
10641 tgetent ();
10642   ;
10643   return 0;
10644 }
10645 _ACEOF
10646 rm -f conftest.$ac_objext conftest$ac_exeext
10647 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10648   (eval $ac_link) 2>conftest.er1
10649   ac_status=$?
10650   grep -v '^ *+' conftest.er1 >conftest.err
10651   rm -f conftest.er1
10652   cat conftest.err >&5
10653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10654   (exit $ac_status); } &&
10655          { ac_try='test -z "$ac_c_werror_flag"
10656                          || test ! -s conftest.err'
10657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10658   (eval $ac_try) 2>&5
10659   ac_status=$?
10660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10661   (exit $ac_status); }; } &&
10662          { ac_try='test -s conftest$ac_exeext'
10663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10664   (eval $ac_try) 2>&5
10665   ac_status=$?
10666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10667   (exit $ac_status); }; }; then
10668   ac_cv_search_tgetent="-l$ac_lib"
10669 break
10670 else
10671   echo "$as_me: failed program was:" >&5
10672 sed 's/^/| /' conftest.$ac_ext >&5
10673
10674 fi
10675 rm -f conftest.err conftest.$ac_objext \
10676       conftest$ac_exeext conftest.$ac_ext
10677   done
10678 fi
10679 LIBS=$ac_func_search_save_LIBS
10680 fi
10681 echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5
10682 echo "${ECHO_T}$ac_cv_search_tgetent" >&6
10683 if test "$ac_cv_search_tgetent" != no; then
10684   test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
10685
10686 fi
10687
10688
10689 if test "$ac_cv_search_tgetent" = no; then
10690   { { echo "$as_me:$LINENO: error: no termcap library found" >&5
10691 echo "$as_me: error: no termcap library found" >&2;}
10692    { (exit 1); exit 1; }; }
10693 fi
10694
10695
10696 # Check whether --with-system-readline or --without-system-readline was given.
10697 if test "${with_system_readline+set}" = set; then
10698   withval="$with_system_readline"
10699
10700 fi;
10701
10702 if test "$with_system_readline" = yes; then
10703   READLINE=-lreadline
10704   READLINE_DEPS=
10705   READLINE_CFLAGS=
10706 else
10707   READLINE='$(READLINE_DIR)/libreadline.a'
10708   READLINE_DEPS='$(READLINE)'
10709   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
10710 fi
10711
10712
10713
10714
10715
10716 # Check whether --with-expat or --without-expat was given.
10717 if test "${with_expat+set}" = set; then
10718   withval="$with_expat"
10719
10720 else
10721   with_expat=auto
10722 fi;
10723 echo "$as_me:$LINENO: checking whether to use expat" >&5
10724 echo $ECHO_N "checking whether to use expat... $ECHO_C" >&6
10725 echo "$as_me:$LINENO: result: $with_expat" >&5
10726 echo "${ECHO_T}$with_expat" >&6
10727
10728 if test "${with_expat}" = no; then
10729   { echo "$as_me:$LINENO: WARNING: expat support disabled; some features may be unavailable." >&5
10730 echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
10731   HAVE_LIBEXPAT=no
10732 else
10733
10734       if test "X$prefix" = "XNONE"; then
10735     acl_final_prefix="$ac_default_prefix"
10736   else
10737     acl_final_prefix="$prefix"
10738   fi
10739   if test "X$exec_prefix" = "XNONE"; then
10740     acl_final_exec_prefix='${prefix}'
10741   else
10742     acl_final_exec_prefix="$exec_prefix"
10743   fi
10744   acl_save_prefix="$prefix"
10745   prefix="$acl_final_prefix"
10746   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10747   prefix="$acl_save_prefix"
10748
10749
10750 # Check whether --with-gnu-ld or --without-gnu-ld was given.
10751 if test "${with_gnu_ld+set}" = set; then
10752   withval="$with_gnu_ld"
10753   test "$withval" = no || with_gnu_ld=yes
10754 else
10755   with_gnu_ld=no
10756 fi;
10757 # Prepare PATH_SEPARATOR.
10758 # The user is always right.
10759 if test "${PATH_SEPARATOR+set}" != set; then
10760   echo "#! /bin/sh" >conf$$.sh
10761   echo  "exit 0"   >>conf$$.sh
10762   chmod +x conf$$.sh
10763   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10764     PATH_SEPARATOR=';'
10765   else
10766     PATH_SEPARATOR=:
10767   fi
10768   rm -f conf$$.sh
10769 fi
10770 ac_prog=ld
10771 if test "$GCC" = yes; then
10772   # Check if gcc -print-prog-name=ld gives a path.
10773   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10774 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10775   case $host in
10776   *-*-mingw*)
10777     # gcc leaves a trailing carriage return which upsets mingw
10778     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10779   *)
10780     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10781   esac
10782   case $ac_prog in
10783     # Accept absolute paths.
10784     [\\/]* | [A-Za-z]:[\\/]*)
10785       re_direlt='/[^/][^/]*/\.\./'
10786       # Canonicalize the path of ld
10787       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10788       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10789         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10790       done
10791       test -z "$LD" && LD="$ac_prog"
10792       ;;
10793   "")
10794     # If it fails, then pretend we aren't using GCC.
10795     ac_prog=ld
10796     ;;
10797   *)
10798     # If it is relative, then search for the first ld in PATH.
10799     with_gnu_ld=unknown
10800     ;;
10801   esac
10802 elif test "$with_gnu_ld" = yes; then
10803   echo "$as_me:$LINENO: checking for GNU ld" >&5
10804 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
10805 else
10806   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10807 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
10808 fi
10809 if test "${acl_cv_path_LD+set}" = set; then
10810   echo $ECHO_N "(cached) $ECHO_C" >&6
10811 else
10812   if test -z "$LD"; then
10813   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10814   for ac_dir in $PATH; do
10815     test -z "$ac_dir" && ac_dir=.
10816     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10817       acl_cv_path_LD="$ac_dir/$ac_prog"
10818       # Check to see if the program is GNU ld.  I'd rather use --version,
10819       # but apparently some GNU ld's only accept -v.
10820       # Break only if it was the GNU/non-GNU ld that we prefer.
10821       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10822         test "$with_gnu_ld" != no && break
10823       else
10824         test "$with_gnu_ld" != yes && break
10825       fi
10826     fi
10827   done
10828   IFS="$ac_save_ifs"
10829 else
10830   acl_cv_path_LD="$LD" # Let the user override the test with a path.
10831 fi
10832 fi
10833
10834 LD="$acl_cv_path_LD"
10835 if test -n "$LD"; then
10836   echo "$as_me:$LINENO: result: $LD" >&5
10837 echo "${ECHO_T}$LD" >&6
10838 else
10839   echo "$as_me:$LINENO: result: no" >&5
10840 echo "${ECHO_T}no" >&6
10841 fi
10842 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10843 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10844    { (exit 1); exit 1; }; }
10845 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10846 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10847 if test "${acl_cv_prog_gnu_ld+set}" = set; then
10848   echo $ECHO_N "(cached) $ECHO_C" >&6
10849 else
10850   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10851 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10852   acl_cv_prog_gnu_ld=yes
10853 else
10854   acl_cv_prog_gnu_ld=no
10855 fi
10856 fi
10857 echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10858 echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10859 with_gnu_ld=$acl_cv_prog_gnu_ld
10860
10861
10862
10863                                                 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10864 echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10865 if test "${acl_cv_rpath+set}" = set; then
10866   echo $ECHO_N "(cached) $ECHO_C" >&6
10867 else
10868
10869     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10870     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10871     . ./conftest.sh
10872     rm -f ./conftest.sh
10873     acl_cv_rpath=done
10874
10875 fi
10876 echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10877 echo "${ECHO_T}$acl_cv_rpath" >&6
10878   wl="$acl_cv_wl"
10879   libext="$acl_cv_libext"
10880   shlibext="$acl_cv_shlibext"
10881   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10882   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10883   hardcode_direct="$acl_cv_hardcode_direct"
10884   hardcode_minus_L="$acl_cv_hardcode_minus_L"
10885     # Check whether --enable-rpath or --disable-rpath was given.
10886 if test "${enable_rpath+set}" = set; then
10887   enableval="$enable_rpath"
10888   :
10889 else
10890   enable_rpath=yes
10891 fi;
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901     use_additional=yes
10902
10903   acl_save_prefix="$prefix"
10904   prefix="$acl_final_prefix"
10905   acl_save_exec_prefix="$exec_prefix"
10906   exec_prefix="$acl_final_exec_prefix"
10907
10908     eval additional_includedir=\"$includedir\"
10909     eval additional_libdir=\"$libdir\"
10910
10911   exec_prefix="$acl_save_exec_prefix"
10912   prefix="$acl_save_prefix"
10913
10914
10915 # Check whether --with-libexpat-prefix or --without-libexpat-prefix was given.
10916 if test "${with_libexpat_prefix+set}" = set; then
10917   withval="$with_libexpat_prefix"
10918
10919     if test "X$withval" = "Xno"; then
10920       use_additional=no
10921     else
10922       if test "X$withval" = "X"; then
10923
10924   acl_save_prefix="$prefix"
10925   prefix="$acl_final_prefix"
10926   acl_save_exec_prefix="$exec_prefix"
10927   exec_prefix="$acl_final_exec_prefix"
10928
10929           eval additional_includedir=\"$includedir\"
10930           eval additional_libdir=\"$libdir\"
10931
10932   exec_prefix="$acl_save_exec_prefix"
10933   prefix="$acl_save_prefix"
10934
10935       else
10936         additional_includedir="$withval/include"
10937         additional_libdir="$withval/lib"
10938       fi
10939     fi
10940
10941 fi;
10942       LIBEXPAT=
10943   LTLIBEXPAT=
10944   INCEXPAT=
10945   rpathdirs=
10946   ltrpathdirs=
10947   names_already_handled=
10948   names_next_round='expat '
10949   while test -n "$names_next_round"; do
10950     names_this_round="$names_next_round"
10951     names_next_round=
10952     for name in $names_this_round; do
10953       already_handled=
10954       for n in $names_already_handled; do
10955         if test "$n" = "$name"; then
10956           already_handled=yes
10957           break
10958         fi
10959       done
10960       if test -z "$already_handled"; then
10961         names_already_handled="$names_already_handled $name"
10962                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10963         eval value=\"\$HAVE_LIB$uppername\"
10964         if test -n "$value"; then
10965           if test "$value" = yes; then
10966             eval value=\"\$LIB$uppername\"
10967             test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10968             eval value=\"\$LTLIB$uppername\"
10969             test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10970           else
10971                                     :
10972           fi
10973         else
10974                               found_dir=
10975           found_la=
10976           found_so=
10977           found_a=
10978           if test $use_additional = yes; then
10979             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10980               found_dir="$additional_libdir"
10981               found_so="$additional_libdir/lib$name.$shlibext"
10982               if test -f "$additional_libdir/lib$name.la"; then
10983                 found_la="$additional_libdir/lib$name.la"
10984               fi
10985             else
10986               if test -f "$additional_libdir/lib$name.$libext"; then
10987                 found_dir="$additional_libdir"
10988                 found_a="$additional_libdir/lib$name.$libext"
10989                 if test -f "$additional_libdir/lib$name.la"; then
10990                   found_la="$additional_libdir/lib$name.la"
10991                 fi
10992               fi
10993             fi
10994           fi
10995           if test "X$found_dir" = "X"; then
10996             for x in $LDFLAGS $LTLIBEXPAT; do
10997
10998   acl_save_prefix="$prefix"
10999   prefix="$acl_final_prefix"
11000   acl_save_exec_prefix="$exec_prefix"
11001   exec_prefix="$acl_final_exec_prefix"
11002   eval x=\"$x\"
11003   exec_prefix="$acl_save_exec_prefix"
11004   prefix="$acl_save_prefix"
11005
11006               case "$x" in
11007                 -L*)
11008                   dir=`echo "X$x" | sed -e 's/^X-L//'`
11009                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11010                     found_dir="$dir"
11011                     found_so="$dir/lib$name.$shlibext"
11012                     if test -f "$dir/lib$name.la"; then
11013                       found_la="$dir/lib$name.la"
11014                     fi
11015                   else
11016                     if test -f "$dir/lib$name.$libext"; then
11017                       found_dir="$dir"
11018                       found_a="$dir/lib$name.$libext"
11019                       if test -f "$dir/lib$name.la"; then
11020                         found_la="$dir/lib$name.la"
11021                       fi
11022                     fi
11023                   fi
11024                   ;;
11025               esac
11026               if test "X$found_dir" != "X"; then
11027                 break
11028               fi
11029             done
11030           fi
11031           if test "X$found_dir" != "X"; then
11032                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
11033             if test "X$found_so" != "X"; then
11034                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11035                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11036               else
11037                                                                                 haveit=
11038                 for x in $ltrpathdirs; do
11039                   if test "X$x" = "X$found_dir"; then
11040                     haveit=yes
11041                     break
11042                   fi
11043                 done
11044                 if test -z "$haveit"; then
11045                   ltrpathdirs="$ltrpathdirs $found_dir"
11046                 fi
11047                                 if test "$hardcode_direct" = yes; then
11048                                                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11049                 else
11050                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11051                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11052                                                             haveit=
11053                     for x in $rpathdirs; do
11054                       if test "X$x" = "X$found_dir"; then
11055                         haveit=yes
11056                         break
11057                       fi
11058                     done
11059                     if test -z "$haveit"; then
11060                       rpathdirs="$rpathdirs $found_dir"
11061                     fi
11062                   else
11063                                                                                 haveit=
11064                     for x in $LDFLAGS $LIBEXPAT; do
11065
11066   acl_save_prefix="$prefix"
11067   prefix="$acl_final_prefix"
11068   acl_save_exec_prefix="$exec_prefix"
11069   exec_prefix="$acl_final_exec_prefix"
11070   eval x=\"$x\"
11071   exec_prefix="$acl_save_exec_prefix"
11072   prefix="$acl_save_prefix"
11073
11074                       if test "X$x" = "X-L$found_dir"; then
11075                         haveit=yes
11076                         break
11077                       fi
11078                     done
11079                     if test -z "$haveit"; then
11080                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
11081                     fi
11082                     if test "$hardcode_minus_L" != no; then
11083                                                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11084                     else
11085                                                                                                                                                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11086                     fi
11087                   fi
11088                 fi
11089               fi
11090             else
11091               if test "X$found_a" != "X"; then
11092                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
11093               else
11094                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
11095               fi
11096             fi
11097                         additional_includedir=
11098             case "$found_dir" in
11099               */lib | */lib/)
11100                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11101                 additional_includedir="$basedir/include"
11102                 ;;
11103             esac
11104             if test "X$additional_includedir" != "X"; then
11105                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
11106                 haveit=
11107                 if test "X$additional_includedir" = "X/usr/local/include"; then
11108                   if test -n "$GCC"; then
11109                     case $host_os in
11110                       linux*) haveit=yes;;
11111                     esac
11112                   fi
11113                 fi
11114                 if test -z "$haveit"; then
11115                   for x in $CPPFLAGS $INCEXPAT; do
11116
11117   acl_save_prefix="$prefix"
11118   prefix="$acl_final_prefix"
11119   acl_save_exec_prefix="$exec_prefix"
11120   exec_prefix="$acl_final_exec_prefix"
11121   eval x=\"$x\"
11122   exec_prefix="$acl_save_exec_prefix"
11123   prefix="$acl_save_prefix"
11124
11125                     if test "X$x" = "X-I$additional_includedir"; then
11126                       haveit=yes
11127                       break
11128                     fi
11129                   done
11130                   if test -z "$haveit"; then
11131                     if test -d "$additional_includedir"; then
11132                                             INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
11133                     fi
11134                   fi
11135                 fi
11136               fi
11137             fi
11138                         if test -n "$found_la"; then
11139                                                         save_libdir="$libdir"
11140               case "$found_la" in
11141                 */* | *\\*) . "$found_la" ;;
11142                 *) . "./$found_la" ;;
11143               esac
11144               libdir="$save_libdir"
11145                             for dep in $dependency_libs; do
11146                 case "$dep" in
11147                   -L*)
11148                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11149                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
11150                       haveit=
11151                       if test "X$additional_libdir" = "X/usr/local/lib"; then
11152                         if test -n "$GCC"; then
11153                           case $host_os in
11154                             linux*) haveit=yes;;
11155                           esac
11156                         fi
11157                       fi
11158                       if test -z "$haveit"; then
11159                         haveit=
11160                         for x in $LDFLAGS $LIBEXPAT; do
11161
11162   acl_save_prefix="$prefix"
11163   prefix="$acl_final_prefix"
11164   acl_save_exec_prefix="$exec_prefix"
11165   exec_prefix="$acl_final_exec_prefix"
11166   eval x=\"$x\"
11167   exec_prefix="$acl_save_exec_prefix"
11168   prefix="$acl_save_prefix"
11169
11170                           if test "X$x" = "X-L$additional_libdir"; then
11171                             haveit=yes
11172                             break
11173                           fi
11174                         done
11175                         if test -z "$haveit"; then
11176                           if test -d "$additional_libdir"; then
11177                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
11178                           fi
11179                         fi
11180                         haveit=
11181                         for x in $LDFLAGS $LTLIBEXPAT; do
11182
11183   acl_save_prefix="$prefix"
11184   prefix="$acl_final_prefix"
11185   acl_save_exec_prefix="$exec_prefix"
11186   exec_prefix="$acl_final_exec_prefix"
11187   eval x=\"$x\"
11188   exec_prefix="$acl_save_exec_prefix"
11189   prefix="$acl_save_prefix"
11190
11191                           if test "X$x" = "X-L$additional_libdir"; then
11192                             haveit=yes
11193                             break
11194                           fi
11195                         done
11196                         if test -z "$haveit"; then
11197                           if test -d "$additional_libdir"; then
11198                                                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
11199                           fi
11200                         fi
11201                       fi
11202                     fi
11203                     ;;
11204                   -R*)
11205                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
11206                     if test "$enable_rpath" != no; then
11207                                                                   haveit=
11208                       for x in $rpathdirs; do
11209                         if test "X$x" = "X$dir"; then
11210                           haveit=yes
11211                           break
11212                         fi
11213                       done
11214                       if test -z "$haveit"; then
11215                         rpathdirs="$rpathdirs $dir"
11216                       fi
11217                                                                   haveit=
11218                       for x in $ltrpathdirs; do
11219                         if test "X$x" = "X$dir"; then
11220                           haveit=yes
11221                           break
11222                         fi
11223                       done
11224                       if test -z "$haveit"; then
11225                         ltrpathdirs="$ltrpathdirs $dir"
11226                       fi
11227                     fi
11228                     ;;
11229                   -l*)
11230                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11231                     ;;
11232                   *.la)
11233                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11234                     ;;
11235                   *)
11236                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
11237                     LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
11238                     ;;
11239                 esac
11240               done
11241             fi
11242           else
11243                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11244             LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
11245           fi
11246         fi
11247       fi
11248     done
11249   done
11250   if test "X$rpathdirs" != "X"; then
11251     if test -n "$hardcode_libdir_separator"; then
11252                         alldirs=
11253       for found_dir in $rpathdirs; do
11254         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11255       done
11256             acl_save_libdir="$libdir"
11257       libdir="$alldirs"
11258       eval flag=\"$hardcode_libdir_flag_spec\"
11259       libdir="$acl_save_libdir"
11260       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
11261     else
11262             for found_dir in $rpathdirs; do
11263         acl_save_libdir="$libdir"
11264         libdir="$found_dir"
11265         eval flag=\"$hardcode_libdir_flag_spec\"
11266         libdir="$acl_save_libdir"
11267         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
11268       done
11269     fi
11270   fi
11271   if test "X$ltrpathdirs" != "X"; then
11272             for found_dir in $ltrpathdirs; do
11273       LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
11274     done
11275   fi
11276
11277
11278         ac_save_CPPFLAGS="$CPPFLAGS"
11279
11280   for element in $INCEXPAT; do
11281     haveit=
11282     for x in $CPPFLAGS; do
11283
11284   acl_save_prefix="$prefix"
11285   prefix="$acl_final_prefix"
11286   acl_save_exec_prefix="$exec_prefix"
11287   exec_prefix="$acl_final_exec_prefix"
11288   eval x=\"$x\"
11289   exec_prefix="$acl_save_exec_prefix"
11290   prefix="$acl_save_prefix"
11291
11292       if test "X$x" = "X$element"; then
11293         haveit=yes
11294         break
11295       fi
11296     done
11297     if test -z "$haveit"; then
11298       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11299     fi
11300   done
11301
11302
11303   echo "$as_me:$LINENO: checking for libexpat" >&5
11304 echo $ECHO_N "checking for libexpat... $ECHO_C" >&6
11305 if test "${ac_cv_libexpat+set}" = set; then
11306   echo $ECHO_N "(cached) $ECHO_C" >&6
11307 else
11308
11309     ac_save_LIBS="$LIBS"
11310     LIBS="$LIBS $LIBEXPAT"
11311     cat >conftest.$ac_ext <<_ACEOF
11312 /* confdefs.h.  */
11313 _ACEOF
11314 cat confdefs.h >>conftest.$ac_ext
11315 cat >>conftest.$ac_ext <<_ACEOF
11316 /* end confdefs.h.  */
11317 #include "expat.h"
11318 int
11319 main ()
11320 {
11321 XML_Parser p = XML_ParserCreate (0);
11322   ;
11323   return 0;
11324 }
11325 _ACEOF
11326 rm -f conftest.$ac_objext conftest$ac_exeext
11327 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11328   (eval $ac_link) 2>conftest.er1
11329   ac_status=$?
11330   grep -v '^ *+' conftest.er1 >conftest.err
11331   rm -f conftest.er1
11332   cat conftest.err >&5
11333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11334   (exit $ac_status); } &&
11335          { ac_try='test -z "$ac_c_werror_flag"
11336                          || test ! -s conftest.err'
11337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11338   (eval $ac_try) 2>&5
11339   ac_status=$?
11340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11341   (exit $ac_status); }; } &&
11342          { ac_try='test -s conftest$ac_exeext'
11343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11344   (eval $ac_try) 2>&5
11345   ac_status=$?
11346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11347   (exit $ac_status); }; }; then
11348   ac_cv_libexpat=yes
11349 else
11350   echo "$as_me: failed program was:" >&5
11351 sed 's/^/| /' conftest.$ac_ext >&5
11352
11353 ac_cv_libexpat=no
11354 fi
11355 rm -f conftest.err conftest.$ac_objext \
11356       conftest$ac_exeext conftest.$ac_ext
11357     LIBS="$ac_save_LIBS"
11358
11359 fi
11360 echo "$as_me:$LINENO: result: $ac_cv_libexpat" >&5
11361 echo "${ECHO_T}$ac_cv_libexpat" >&6
11362   if test "$ac_cv_libexpat" = yes; then
11363     HAVE_LIBEXPAT=yes
11364
11365 cat >>confdefs.h <<\_ACEOF
11366 #define HAVE_LIBEXPAT 1
11367 _ACEOF
11368
11369     echo "$as_me:$LINENO: checking how to link with libexpat" >&5
11370 echo $ECHO_N "checking how to link with libexpat... $ECHO_C" >&6
11371     echo "$as_me:$LINENO: result: $LIBEXPAT" >&5
11372 echo "${ECHO_T}$LIBEXPAT" >&6
11373   else
11374     HAVE_LIBEXPAT=no
11375             CPPFLAGS="$ac_save_CPPFLAGS"
11376     LIBEXPAT=
11377     LTLIBEXPAT=
11378   fi
11379
11380
11381
11382
11383
11384
11385   if test "$HAVE_LIBEXPAT" != yes; then
11386     if test "$with_expat" = yes; then
11387       { { echo "$as_me:$LINENO: error: expat is missing or unusable" >&5
11388 echo "$as_me: error: expat is missing or unusable" >&2;}
11389    { (exit 1); exit 1; }; }
11390     else
11391       { echo "$as_me:$LINENO: WARNING: expat is missing or unusable; some features may be unavailable." >&5
11392 echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
11393     fi
11394   else
11395     save_LIBS=$LIBS
11396     LIBS="$LIBS $LIBEXPAT"
11397
11398 for ac_func in XML_StopParser
11399 do
11400 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11401 echo "$as_me:$LINENO: checking for $ac_func" >&5
11402 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11403 if eval "test \"\${$as_ac_var+set}\" = set"; then
11404   echo $ECHO_N "(cached) $ECHO_C" >&6
11405 else
11406   cat >conftest.$ac_ext <<_ACEOF
11407 /* confdefs.h.  */
11408 _ACEOF
11409 cat confdefs.h >>conftest.$ac_ext
11410 cat >>conftest.$ac_ext <<_ACEOF
11411 /* end confdefs.h.  */
11412 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11413    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11414 #define $ac_func innocuous_$ac_func
11415
11416 /* System header to define __stub macros and hopefully few prototypes,
11417     which can conflict with char $ac_func (); below.
11418     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11419     <limits.h> exists even on freestanding compilers.  */
11420
11421 #ifdef __STDC__
11422 # include <limits.h>
11423 #else
11424 # include <assert.h>
11425 #endif
11426
11427 #undef $ac_func
11428
11429 /* Override any gcc2 internal prototype to avoid an error.  */
11430 #ifdef __cplusplus
11431 extern "C"
11432 {
11433 #endif
11434 /* We use char because int might match the return type of a gcc2
11435    builtin and then its argument prototype would still apply.  */
11436 char $ac_func ();
11437 /* The GNU C library defines this for functions which it implements
11438     to always fail with ENOSYS.  Some functions are actually named
11439     something starting with __ and the normal name is an alias.  */
11440 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11441 choke me
11442 #else
11443 char (*f) () = $ac_func;
11444 #endif
11445 #ifdef __cplusplus
11446 }
11447 #endif
11448
11449 int
11450 main ()
11451 {
11452 return f != $ac_func;
11453   ;
11454   return 0;
11455 }
11456 _ACEOF
11457 rm -f conftest.$ac_objext conftest$ac_exeext
11458 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11459   (eval $ac_link) 2>conftest.er1
11460   ac_status=$?
11461   grep -v '^ *+' conftest.er1 >conftest.err
11462   rm -f conftest.er1
11463   cat conftest.err >&5
11464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11465   (exit $ac_status); } &&
11466          { ac_try='test -z "$ac_c_werror_flag"
11467                          || test ! -s conftest.err'
11468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11469   (eval $ac_try) 2>&5
11470   ac_status=$?
11471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11472   (exit $ac_status); }; } &&
11473          { ac_try='test -s conftest$ac_exeext'
11474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11475   (eval $ac_try) 2>&5
11476   ac_status=$?
11477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11478   (exit $ac_status); }; }; then
11479   eval "$as_ac_var=yes"
11480 else
11481   echo "$as_me: failed program was:" >&5
11482 sed 's/^/| /' conftest.$ac_ext >&5
11483
11484 eval "$as_ac_var=no"
11485 fi
11486 rm -f conftest.err conftest.$ac_objext \
11487       conftest$ac_exeext conftest.$ac_ext
11488 fi
11489 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11490 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11491 if test `eval echo '${'$as_ac_var'}'` = yes; then
11492   cat >>confdefs.h <<_ACEOF
11493 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11494 _ACEOF
11495
11496 fi
11497 done
11498
11499     LIBS=$save_LIBS
11500   fi
11501 fi
11502
11503
11504
11505
11506 # Check whether --with-python or --without-python was given.
11507 if test "${with_python+set}" = set; then
11508   withval="$with_python"
11509
11510 else
11511   with_python=auto
11512 fi;
11513 echo "$as_me:$LINENO: checking whether to use python" >&5
11514 echo $ECHO_N "checking whether to use python... $ECHO_C" >&6
11515 echo "$as_me:$LINENO: result: $with_python" >&5
11516 echo "${ECHO_T}$with_python" >&6
11517
11518 if test "${with_python}" = no; then
11519   { echo "$as_me:$LINENO: WARNING: python support disabled; some features may be unavailable." >&5
11520 echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11521   have_libpython=no
11522 else
11523   case "${with_python}" in
11524   yes | auto)
11525     # Leave as empty, use defaults.
11526     python_includes=
11527     python_libs=
11528     ;;
11529   /*)
11530     python_includes="-I${with_python}/include"
11531     python_libs="-L${with_python}/lib"
11532     ;;
11533   *)
11534     { { echo "$as_me:$LINENO: error: invalid value for --with-python" >&5
11535 echo "$as_me: error: invalid value for --with-python" >&2;}
11536    { (exit 1); exit 1; }; }
11537     ;;
11538   esac
11539
11540   save_CPPFLAGS=$CPPFLAGS
11541   CPPFLAGS="$CPPFLAGS ${python_includes}"
11542   save_LIBS=$LIBS
11543   LIBS="$LIBS ${python_libs}"
11544   have_libpython=no
11545   if test "${have_libpython}" = no; then
11546
11547   version=python2.6
11548
11549
11550   HAVE_LIBPYTHON2_6=no
11551   echo "$as_me:$LINENO: checking for ${version}" >&5
11552 echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11553   save_LIBS=$LIBS
11554   LIBS="$LIBS -l${version}"
11555   cat >conftest.$ac_ext <<_ACEOF
11556 /* confdefs.h.  */
11557 _ACEOF
11558 cat confdefs.h >>conftest.$ac_ext
11559 cat >>conftest.$ac_ext <<_ACEOF
11560 /* end confdefs.h.  */
11561 #include "${version}/Python.h"
11562 int
11563 main ()
11564 {
11565 Py_Initialize ();
11566   ;
11567   return 0;
11568 }
11569 _ACEOF
11570 rm -f conftest.$ac_objext conftest$ac_exeext
11571 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11572   (eval $ac_link) 2>conftest.er1
11573   ac_status=$?
11574   grep -v '^ *+' conftest.er1 >conftest.err
11575   rm -f conftest.er1
11576   cat conftest.err >&5
11577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11578   (exit $ac_status); } &&
11579          { ac_try='test -z "$ac_c_werror_flag"
11580                          || test ! -s conftest.err'
11581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11582   (eval $ac_try) 2>&5
11583   ac_status=$?
11584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11585   (exit $ac_status); }; } &&
11586          { ac_try='test -s conftest$ac_exeext'
11587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11588   (eval $ac_try) 2>&5
11589   ac_status=$?
11590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11591   (exit $ac_status); }; }; then
11592   HAVE_LIBPYTHON2_6=yes
11593                   have_libpython=yes
11594 else
11595   echo "$as_me: failed program was:" >&5
11596 sed 's/^/| /' conftest.$ac_ext >&5
11597
11598 LIBS=$save_LIBS
11599 fi
11600 rm -f conftest.err conftest.$ac_objext \
11601       conftest$ac_exeext conftest.$ac_ext
11602   echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_6" >&5
11603 echo "${ECHO_T}$HAVE_LIBPYTHON2_6" >&6
11604
11605     if test "${HAVE_LIBPYTHON2_6}" = yes; then
11606
11607 cat >>confdefs.h <<\_ACEOF
11608 #define HAVE_LIBPYTHON2_6 1
11609 _ACEOF
11610
11611     fi
11612   fi
11613   if test ${have_libpython} = no; then
11614
11615   version=python2.5
11616
11617
11618   HAVE_LIBPYTHON2_5=no
11619   echo "$as_me:$LINENO: checking for ${version}" >&5
11620 echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11621   save_LIBS=$LIBS
11622   LIBS="$LIBS -l${version}"
11623   cat >conftest.$ac_ext <<_ACEOF
11624 /* confdefs.h.  */
11625 _ACEOF
11626 cat confdefs.h >>conftest.$ac_ext
11627 cat >>conftest.$ac_ext <<_ACEOF
11628 /* end confdefs.h.  */
11629 #include "${version}/Python.h"
11630 int
11631 main ()
11632 {
11633 Py_Initialize ();
11634   ;
11635   return 0;
11636 }
11637 _ACEOF
11638 rm -f conftest.$ac_objext conftest$ac_exeext
11639 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11640   (eval $ac_link) 2>conftest.er1
11641   ac_status=$?
11642   grep -v '^ *+' conftest.er1 >conftest.err
11643   rm -f conftest.er1
11644   cat conftest.err >&5
11645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11646   (exit $ac_status); } &&
11647          { ac_try='test -z "$ac_c_werror_flag"
11648                          || test ! -s conftest.err'
11649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11650   (eval $ac_try) 2>&5
11651   ac_status=$?
11652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11653   (exit $ac_status); }; } &&
11654          { ac_try='test -s conftest$ac_exeext'
11655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11656   (eval $ac_try) 2>&5
11657   ac_status=$?
11658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11659   (exit $ac_status); }; }; then
11660   HAVE_LIBPYTHON2_5=yes
11661                   have_libpython=yes
11662 else
11663   echo "$as_me: failed program was:" >&5
11664 sed 's/^/| /' conftest.$ac_ext >&5
11665
11666 LIBS=$save_LIBS
11667 fi
11668 rm -f conftest.err conftest.$ac_objext \
11669       conftest$ac_exeext conftest.$ac_ext
11670   echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_5" >&5
11671 echo "${ECHO_T}$HAVE_LIBPYTHON2_5" >&6
11672
11673     if test "${HAVE_LIBPYTHON2_5}" = yes; then
11674
11675 cat >>confdefs.h <<\_ACEOF
11676 #define HAVE_LIBPYTHON2_5 1
11677 _ACEOF
11678
11679     fi
11680   fi
11681   if test ${have_libpython} = no; then
11682
11683   version=python2.4
11684
11685
11686   HAVE_LIBPYTHON2_4=no
11687   echo "$as_me:$LINENO: checking for ${version}" >&5
11688 echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11689   save_LIBS=$LIBS
11690   LIBS="$LIBS -l${version}"
11691   cat >conftest.$ac_ext <<_ACEOF
11692 /* confdefs.h.  */
11693 _ACEOF
11694 cat confdefs.h >>conftest.$ac_ext
11695 cat >>conftest.$ac_ext <<_ACEOF
11696 /* end confdefs.h.  */
11697 #include "${version}/Python.h"
11698 int
11699 main ()
11700 {
11701 Py_Initialize ();
11702   ;
11703   return 0;
11704 }
11705 _ACEOF
11706 rm -f conftest.$ac_objext conftest$ac_exeext
11707 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11708   (eval $ac_link) 2>conftest.er1
11709   ac_status=$?
11710   grep -v '^ *+' conftest.er1 >conftest.err
11711   rm -f conftest.er1
11712   cat conftest.err >&5
11713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11714   (exit $ac_status); } &&
11715          { ac_try='test -z "$ac_c_werror_flag"
11716                          || test ! -s conftest.err'
11717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11718   (eval $ac_try) 2>&5
11719   ac_status=$?
11720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11721   (exit $ac_status); }; } &&
11722          { ac_try='test -s conftest$ac_exeext'
11723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11724   (eval $ac_try) 2>&5
11725   ac_status=$?
11726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11727   (exit $ac_status); }; }; then
11728   HAVE_LIBPYTHON2_4=yes
11729                   have_libpython=yes
11730 else
11731   echo "$as_me: failed program was:" >&5
11732 sed 's/^/| /' conftest.$ac_ext >&5
11733
11734 LIBS=$save_LIBS
11735 fi
11736 rm -f conftest.err conftest.$ac_objext \
11737       conftest$ac_exeext conftest.$ac_ext
11738   echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_4" >&5
11739 echo "${ECHO_T}$HAVE_LIBPYTHON2_4" >&6
11740
11741     if test "${HAVE_LIBPYTHON2_4}" = yes; then
11742
11743 cat >>confdefs.h <<\_ACEOF
11744 #define HAVE_LIBPYTHON2_4 1
11745 _ACEOF
11746
11747     fi
11748   fi
11749   if test ${have_libpython} = no; then
11750     case "${with_python}" in
11751     yes)
11752       { { echo "$as_me:$LINENO: error: python is missing or unusable" >&5
11753 echo "$as_me: error: python is missing or unusable" >&2;}
11754    { (exit 1); exit 1; }; }
11755       ;;
11756     auto)
11757       { echo "$as_me:$LINENO: WARNING: python is missing or unusable; some features may be unavailable." >&5
11758 echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11759       ;;
11760     *)
11761       { { echo "$as_me:$LINENO: error: no usable python found at ${with_python}" >&5
11762 echo "$as_me: error: no usable python found at ${with_python}" >&2;}
11763    { (exit 1); exit 1; }; }
11764       ;;
11765     esac
11766     CPPFLAGS=$save_CPPFLAGS
11767     LIBS=$save_LIBS
11768   fi
11769 fi
11770
11771 if test "${have_libpython}" = yes; then
11772
11773 cat >>confdefs.h <<\_ACEOF
11774 #define HAVE_PYTHON 1
11775 _ACEOF
11776
11777   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11778   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11779   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11780   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11781
11782   # Flags needed to compile Python code (taken from python-config --cflags).
11783   # We cannot call python-config directly because it will output whatever was
11784   # used when compiling the Python interpreter itself, including flags which
11785   # would make the python-related objects be compiled differently from the
11786   # rest of GDB (e.g., -O2 and -fPIC).
11787   if test "${GCC}" = yes; then
11788     tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11789   fi
11790
11791   if test "x${tentative_python_cflags}" != x; then
11792     echo "$as_me:$LINENO: checking compiler flags for python code" >&5
11793 echo $ECHO_N "checking compiler flags for python code... $ECHO_C" >&6
11794     for flag in ${tentative_python_cflags}; do
11795       # Check that the compiler accepts it
11796       saved_CFLAGS="$CFLAGS"
11797       CFLAGS="$CFLAGS $flag"
11798       cat >conftest.$ac_ext <<_ACEOF
11799 /* confdefs.h.  */
11800 _ACEOF
11801 cat confdefs.h >>conftest.$ac_ext
11802 cat >>conftest.$ac_ext <<_ACEOF
11803 /* end confdefs.h.  */
11804
11805 int
11806 main ()
11807 {
11808
11809   ;
11810   return 0;
11811 }
11812 _ACEOF
11813 rm -f conftest.$ac_objext
11814 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11815   (eval $ac_compile) 2>conftest.er1
11816   ac_status=$?
11817   grep -v '^ *+' conftest.er1 >conftest.err
11818   rm -f conftest.er1
11819   cat conftest.err >&5
11820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11821   (exit $ac_status); } &&
11822          { ac_try='test -z "$ac_c_werror_flag"
11823                          || test ! -s conftest.err'
11824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11825   (eval $ac_try) 2>&5
11826   ac_status=$?
11827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11828   (exit $ac_status); }; } &&
11829          { ac_try='test -s conftest.$ac_objext'
11830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11831   (eval $ac_try) 2>&5
11832   ac_status=$?
11833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11834   (exit $ac_status); }; }; then
11835   PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11836 else
11837   echo "$as_me: failed program was:" >&5
11838 sed 's/^/| /' conftest.$ac_ext >&5
11839
11840 fi
11841 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11842       CFLAGS="$saved_CFLAGS"
11843     done
11844     echo "$as_me:$LINENO: result: ${PYTHON_CFLAGS}" >&5
11845 echo "${ECHO_T}${PYTHON_CFLAGS}" >&6
11846   fi
11847 else
11848   # Even if Python support is not compiled in, we need to have these files
11849   # included in order to recognize the GDB command "python".
11850   CONFIG_OBS="$CONFIG_OBS python.o python-value.o"
11851   CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c"
11852 fi
11853
11854
11855 # ------------------------- #
11856 # Checks for header files.  #
11857 # ------------------------- #
11858
11859
11860
11861
11862
11863
11864 ac_header_dirent=no
11865 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11866   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11867 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
11868 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11869 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11870   echo $ECHO_N "(cached) $ECHO_C" >&6
11871 else
11872   cat >conftest.$ac_ext <<_ACEOF
11873 /* confdefs.h.  */
11874 _ACEOF
11875 cat confdefs.h >>conftest.$ac_ext
11876 cat >>conftest.$ac_ext <<_ACEOF
11877 /* end confdefs.h.  */
11878 #include <sys/types.h>
11879 #include <$ac_hdr>
11880
11881 int
11882 main ()
11883 {
11884 if ((DIR *) 0)
11885 return 0;
11886   ;
11887   return 0;
11888 }
11889 _ACEOF
11890 rm -f conftest.$ac_objext
11891 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11892   (eval $ac_compile) 2>conftest.er1
11893   ac_status=$?
11894   grep -v '^ *+' conftest.er1 >conftest.err
11895   rm -f conftest.er1
11896   cat conftest.err >&5
11897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11898   (exit $ac_status); } &&
11899          { ac_try='test -z "$ac_c_werror_flag"
11900                          || test ! -s conftest.err'
11901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11902   (eval $ac_try) 2>&5
11903   ac_status=$?
11904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11905   (exit $ac_status); }; } &&
11906          { ac_try='test -s conftest.$ac_objext'
11907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11908   (eval $ac_try) 2>&5
11909   ac_status=$?
11910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11911   (exit $ac_status); }; }; then
11912   eval "$as_ac_Header=yes"
11913 else
11914   echo "$as_me: failed program was:" >&5
11915 sed 's/^/| /' conftest.$ac_ext >&5
11916
11917 eval "$as_ac_Header=no"
11918 fi
11919 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11920 fi
11921 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11922 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11923 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11924   cat >>confdefs.h <<_ACEOF
11925 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11926 _ACEOF
11927
11928 ac_header_dirent=$ac_hdr; break
11929 fi
11930
11931 done
11932 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11933 if test $ac_header_dirent = dirent.h; then
11934   echo "$as_me:$LINENO: checking for library containing opendir" >&5
11935 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
11936 if test "${ac_cv_search_opendir+set}" = set; then
11937   echo $ECHO_N "(cached) $ECHO_C" >&6
11938 else
11939   ac_func_search_save_LIBS=$LIBS
11940 ac_cv_search_opendir=no
11941 cat >conftest.$ac_ext <<_ACEOF
11942 /* confdefs.h.  */
11943 _ACEOF
11944 cat confdefs.h >>conftest.$ac_ext
11945 cat >>conftest.$ac_ext <<_ACEOF
11946 /* end confdefs.h.  */
11947
11948 /* Override any gcc2 internal prototype to avoid an error.  */
11949 #ifdef __cplusplus
11950 extern "C"
11951 #endif
11952 /* We use char because int might match the return type of a gcc2
11953    builtin and then its argument prototype would still apply.  */
11954 char opendir ();
11955 int
11956 main ()
11957 {
11958 opendir ();
11959   ;
11960   return 0;
11961 }
11962 _ACEOF
11963 rm -f conftest.$ac_objext conftest$ac_exeext
11964 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11965   (eval $ac_link) 2>conftest.er1
11966   ac_status=$?
11967   grep -v '^ *+' conftest.er1 >conftest.err
11968   rm -f conftest.er1
11969   cat conftest.err >&5
11970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11971   (exit $ac_status); } &&
11972          { ac_try='test -z "$ac_c_werror_flag"
11973                          || test ! -s conftest.err'
11974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11975   (eval $ac_try) 2>&5
11976   ac_status=$?
11977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11978   (exit $ac_status); }; } &&
11979          { ac_try='test -s conftest$ac_exeext'
11980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11981   (eval $ac_try) 2>&5
11982   ac_status=$?
11983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11984   (exit $ac_status); }; }; then
11985   ac_cv_search_opendir="none required"
11986 else
11987   echo "$as_me: failed program was:" >&5
11988 sed 's/^/| /' conftest.$ac_ext >&5
11989
11990 fi
11991 rm -f conftest.err conftest.$ac_objext \
11992       conftest$ac_exeext conftest.$ac_ext
11993 if test "$ac_cv_search_opendir" = no; then
11994   for ac_lib in dir; do
11995     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11996     cat >conftest.$ac_ext <<_ACEOF
11997 /* confdefs.h.  */
11998 _ACEOF
11999 cat confdefs.h >>conftest.$ac_ext
12000 cat >>conftest.$ac_ext <<_ACEOF
12001 /* end confdefs.h.  */
12002
12003 /* Override any gcc2 internal prototype to avoid an error.  */
12004 #ifdef __cplusplus
12005 extern "C"
12006 #endif
12007 /* We use char because int might match the return type of a gcc2
12008    builtin and then its argument prototype would still apply.  */
12009 char opendir ();
12010 int
12011 main ()
12012 {
12013 opendir ();
12014   ;
12015   return 0;
12016 }
12017 _ACEOF
12018 rm -f conftest.$ac_objext conftest$ac_exeext
12019 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12020   (eval $ac_link) 2>conftest.er1
12021   ac_status=$?
12022   grep -v '^ *+' conftest.er1 >conftest.err
12023   rm -f conftest.er1
12024   cat conftest.err >&5
12025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12026   (exit $ac_status); } &&
12027          { ac_try='test -z "$ac_c_werror_flag"
12028                          || test ! -s conftest.err'
12029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12030   (eval $ac_try) 2>&5
12031   ac_status=$?
12032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12033   (exit $ac_status); }; } &&
12034          { ac_try='test -s conftest$ac_exeext'
12035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12036   (eval $ac_try) 2>&5
12037   ac_status=$?
12038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12039   (exit $ac_status); }; }; then
12040   ac_cv_search_opendir="-l$ac_lib"
12041 break
12042 else
12043   echo "$as_me: failed program was:" >&5
12044 sed 's/^/| /' conftest.$ac_ext >&5
12045
12046 fi
12047 rm -f conftest.err conftest.$ac_objext \
12048       conftest$ac_exeext conftest.$ac_ext
12049   done
12050 fi
12051 LIBS=$ac_func_search_save_LIBS
12052 fi
12053 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
12054 echo "${ECHO_T}$ac_cv_search_opendir" >&6
12055 if test "$ac_cv_search_opendir" != no; then
12056   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
12057
12058 fi
12059
12060 else
12061   echo "$as_me:$LINENO: checking for library containing opendir" >&5
12062 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
12063 if test "${ac_cv_search_opendir+set}" = set; then
12064   echo $ECHO_N "(cached) $ECHO_C" >&6
12065 else
12066   ac_func_search_save_LIBS=$LIBS
12067 ac_cv_search_opendir=no
12068 cat >conftest.$ac_ext <<_ACEOF
12069 /* confdefs.h.  */
12070 _ACEOF
12071 cat confdefs.h >>conftest.$ac_ext
12072 cat >>conftest.$ac_ext <<_ACEOF
12073 /* end confdefs.h.  */
12074
12075 /* Override any gcc2 internal prototype to avoid an error.  */
12076 #ifdef __cplusplus
12077 extern "C"
12078 #endif
12079 /* We use char because int might match the return type of a gcc2
12080    builtin and then its argument prototype would still apply.  */
12081 char opendir ();
12082 int
12083 main ()
12084 {
12085 opendir ();
12086   ;
12087   return 0;
12088 }
12089 _ACEOF
12090 rm -f conftest.$ac_objext conftest$ac_exeext
12091 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12092   (eval $ac_link) 2>conftest.er1
12093   ac_status=$?
12094   grep -v '^ *+' conftest.er1 >conftest.err
12095   rm -f conftest.er1
12096   cat conftest.err >&5
12097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12098   (exit $ac_status); } &&
12099          { ac_try='test -z "$ac_c_werror_flag"
12100                          || test ! -s conftest.err'
12101   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12102   (eval $ac_try) 2>&5
12103   ac_status=$?
12104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12105   (exit $ac_status); }; } &&
12106          { ac_try='test -s conftest$ac_exeext'
12107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12108   (eval $ac_try) 2>&5
12109   ac_status=$?
12110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12111   (exit $ac_status); }; }; then
12112   ac_cv_search_opendir="none required"
12113 else
12114   echo "$as_me: failed program was:" >&5
12115 sed 's/^/| /' conftest.$ac_ext >&5
12116
12117 fi
12118 rm -f conftest.err conftest.$ac_objext \
12119       conftest$ac_exeext conftest.$ac_ext
12120 if test "$ac_cv_search_opendir" = no; then
12121   for ac_lib in x; do
12122     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12123     cat >conftest.$ac_ext <<_ACEOF
12124 /* confdefs.h.  */
12125 _ACEOF
12126 cat confdefs.h >>conftest.$ac_ext
12127 cat >>conftest.$ac_ext <<_ACEOF
12128 /* end confdefs.h.  */
12129
12130 /* Override any gcc2 internal prototype to avoid an error.  */
12131 #ifdef __cplusplus
12132 extern "C"
12133 #endif
12134 /* We use char because int might match the return type of a gcc2
12135    builtin and then its argument prototype would still apply.  */
12136 char opendir ();
12137 int
12138 main ()
12139 {
12140 opendir ();
12141   ;
12142   return 0;
12143 }
12144 _ACEOF
12145 rm -f conftest.$ac_objext conftest$ac_exeext
12146 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12147   (eval $ac_link) 2>conftest.er1
12148   ac_status=$?
12149   grep -v '^ *+' conftest.er1 >conftest.err
12150   rm -f conftest.er1
12151   cat conftest.err >&5
12152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12153   (exit $ac_status); } &&
12154          { ac_try='test -z "$ac_c_werror_flag"
12155                          || test ! -s conftest.err'
12156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12157   (eval $ac_try) 2>&5
12158   ac_status=$?
12159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12160   (exit $ac_status); }; } &&
12161          { ac_try='test -s conftest$ac_exeext'
12162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12163   (eval $ac_try) 2>&5
12164   ac_status=$?
12165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12166   (exit $ac_status); }; }; then
12167   ac_cv_search_opendir="-l$ac_lib"
12168 break
12169 else
12170   echo "$as_me: failed program was:" >&5
12171 sed 's/^/| /' conftest.$ac_ext >&5
12172
12173 fi
12174 rm -f conftest.err conftest.$ac_objext \
12175       conftest$ac_exeext conftest.$ac_ext
12176   done
12177 fi
12178 LIBS=$ac_func_search_save_LIBS
12179 fi
12180 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
12181 echo "${ECHO_T}$ac_cv_search_opendir" >&6
12182 if test "$ac_cv_search_opendir" != no; then
12183   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
12184
12185 fi
12186
12187 fi
12188
12189 echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
12190 echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
12191 if test "${ac_cv_header_stat_broken+set}" = set; then
12192   echo $ECHO_N "(cached) $ECHO_C" >&6
12193 else
12194   cat >conftest.$ac_ext <<_ACEOF
12195 /* confdefs.h.  */
12196 _ACEOF
12197 cat confdefs.h >>conftest.$ac_ext
12198 cat >>conftest.$ac_ext <<_ACEOF
12199 /* end confdefs.h.  */
12200 #include <sys/types.h>
12201 #include <sys/stat.h>
12202
12203 #if defined(S_ISBLK) && defined(S_IFDIR)
12204 # if S_ISBLK (S_IFDIR)
12205 You lose.
12206 # endif
12207 #endif
12208
12209 #if defined(S_ISBLK) && defined(S_IFCHR)
12210 # if S_ISBLK (S_IFCHR)
12211 You lose.
12212 # endif
12213 #endif
12214
12215 #if defined(S_ISLNK) && defined(S_IFREG)
12216 # if S_ISLNK (S_IFREG)
12217 You lose.
12218 # endif
12219 #endif
12220
12221 #if defined(S_ISSOCK) && defined(S_IFREG)
12222 # if S_ISSOCK (S_IFREG)
12223 You lose.
12224 # endif
12225 #endif
12226
12227 _ACEOF
12228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12229   $EGREP "You lose" >/dev/null 2>&1; then
12230   ac_cv_header_stat_broken=yes
12231 else
12232   ac_cv_header_stat_broken=no
12233 fi
12234 rm -f conftest*
12235
12236 fi
12237 echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
12238 echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
12239 if test $ac_cv_header_stat_broken = yes; then
12240
12241 cat >>confdefs.h <<\_ACEOF
12242 #define STAT_MACROS_BROKEN 1
12243 _ACEOF
12244
12245 fi
12246
12247 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
12248 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12249 if test "${ac_cv_header_stdc+set}" = set; then
12250   echo $ECHO_N "(cached) $ECHO_C" >&6
12251 else
12252   cat >conftest.$ac_ext <<_ACEOF
12253 /* confdefs.h.  */
12254 _ACEOF
12255 cat confdefs.h >>conftest.$ac_ext
12256 cat >>conftest.$ac_ext <<_ACEOF
12257 /* end confdefs.h.  */
12258 #include <stdlib.h>
12259 #include <stdarg.h>
12260 #include <string.h>
12261 #include <float.h>
12262
12263 int
12264 main ()
12265 {
12266
12267   ;
12268   return 0;
12269 }
12270 _ACEOF
12271 rm -f conftest.$ac_objext
12272 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12273   (eval $ac_compile) 2>conftest.er1
12274   ac_status=$?
12275   grep -v '^ *+' conftest.er1 >conftest.err
12276   rm -f conftest.er1
12277   cat conftest.err >&5
12278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12279   (exit $ac_status); } &&
12280          { ac_try='test -z "$ac_c_werror_flag"
12281                          || test ! -s conftest.err'
12282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12283   (eval $ac_try) 2>&5
12284   ac_status=$?
12285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12286   (exit $ac_status); }; } &&
12287          { ac_try='test -s conftest.$ac_objext'
12288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12289   (eval $ac_try) 2>&5
12290   ac_status=$?
12291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12292   (exit $ac_status); }; }; then
12293   ac_cv_header_stdc=yes
12294 else
12295   echo "$as_me: failed program was:" >&5
12296 sed 's/^/| /' conftest.$ac_ext >&5
12297
12298 ac_cv_header_stdc=no
12299 fi
12300 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12301
12302 if test $ac_cv_header_stdc = yes; then
12303   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12304   cat >conftest.$ac_ext <<_ACEOF
12305 /* confdefs.h.  */
12306 _ACEOF
12307 cat confdefs.h >>conftest.$ac_ext
12308 cat >>conftest.$ac_ext <<_ACEOF
12309 /* end confdefs.h.  */
12310 #include <string.h>
12311
12312 _ACEOF
12313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12314   $EGREP "memchr" >/dev/null 2>&1; then
12315   :
12316 else
12317   ac_cv_header_stdc=no
12318 fi
12319 rm -f conftest*
12320
12321 fi
12322
12323 if test $ac_cv_header_stdc = yes; then
12324   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12325   cat >conftest.$ac_ext <<_ACEOF
12326 /* confdefs.h.  */
12327 _ACEOF
12328 cat confdefs.h >>conftest.$ac_ext
12329 cat >>conftest.$ac_ext <<_ACEOF
12330 /* end confdefs.h.  */
12331 #include <stdlib.h>
12332
12333 _ACEOF
12334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12335   $EGREP "free" >/dev/null 2>&1; then
12336   :
12337 else
12338   ac_cv_header_stdc=no
12339 fi
12340 rm -f conftest*
12341
12342 fi
12343
12344 if test $ac_cv_header_stdc = yes; then
12345   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12346   if test "$cross_compiling" = yes; then
12347   :
12348 else
12349   cat >conftest.$ac_ext <<_ACEOF
12350 /* confdefs.h.  */
12351 _ACEOF
12352 cat confdefs.h >>conftest.$ac_ext
12353 cat >>conftest.$ac_ext <<_ACEOF
12354 /* end confdefs.h.  */
12355 #include <ctype.h>
12356 #if ((' ' & 0x0FF) == 0x020)
12357 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12358 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12359 #else
12360 # define ISLOWER(c) \
12361                    (('a' <= (c) && (c) <= 'i') \
12362                      || ('j' <= (c) && (c) <= 'r') \
12363                      || ('s' <= (c) && (c) <= 'z'))
12364 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12365 #endif
12366
12367 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12368 int
12369 main ()
12370 {
12371   int i;
12372   for (i = 0; i < 256; i++)
12373     if (XOR (islower (i), ISLOWER (i))
12374         || toupper (i) != TOUPPER (i))
12375       exit(2);
12376   exit (0);
12377 }
12378 _ACEOF
12379 rm -f conftest$ac_exeext
12380 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12381   (eval $ac_link) 2>&5
12382   ac_status=$?
12383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12384   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12386   (eval $ac_try) 2>&5
12387   ac_status=$?
12388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12389   (exit $ac_status); }; }; then
12390   :
12391 else
12392   echo "$as_me: program exited with status $ac_status" >&5
12393 echo "$as_me: failed program was:" >&5
12394 sed 's/^/| /' conftest.$ac_ext >&5
12395
12396 ( exit $ac_status )
12397 ac_cv_header_stdc=no
12398 fi
12399 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12400 fi
12401 fi
12402 fi
12403 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
12404 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12405 if test $ac_cv_header_stdc = yes; then
12406
12407 cat >>confdefs.h <<\_ACEOF
12408 #define STDC_HEADERS 1
12409 _ACEOF
12410
12411 fi
12412
12413 # elf_hp.h is for HP/UX 64-bit shared library support.
12414 # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
12415 # unconditionally, so what's the point in checking these?
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12454                   thread_db.h gnu/libc-version.h signal.h stddef.h \
12455                   stdlib.h string.h memory.h strings.h sys/fault.h \
12456                   sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12457                   sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12458                   sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
12459                   sys/types.h sys/wait.h wait.h termios.h termio.h \
12460                   sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
12461 do
12462 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12463 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12464   echo "$as_me:$LINENO: checking for $ac_header" >&5
12465 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12466 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12467   echo $ECHO_N "(cached) $ECHO_C" >&6
12468 fi
12469 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12470 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12471 else
12472   # Is the header compilable?
12473 echo "$as_me:$LINENO: checking $ac_header usability" >&5
12474 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12475 cat >conftest.$ac_ext <<_ACEOF
12476 /* confdefs.h.  */
12477 _ACEOF
12478 cat confdefs.h >>conftest.$ac_ext
12479 cat >>conftest.$ac_ext <<_ACEOF
12480 /* end confdefs.h.  */
12481 $ac_includes_default
12482 #include <$ac_header>
12483 _ACEOF
12484 rm -f conftest.$ac_objext
12485 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12486   (eval $ac_compile) 2>conftest.er1
12487   ac_status=$?
12488   grep -v '^ *+' conftest.er1 >conftest.err
12489   rm -f conftest.er1
12490   cat conftest.err >&5
12491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12492   (exit $ac_status); } &&
12493          { ac_try='test -z "$ac_c_werror_flag"
12494                          || test ! -s conftest.err'
12495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12496   (eval $ac_try) 2>&5
12497   ac_status=$?
12498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12499   (exit $ac_status); }; } &&
12500          { ac_try='test -s conftest.$ac_objext'
12501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12502   (eval $ac_try) 2>&5
12503   ac_status=$?
12504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12505   (exit $ac_status); }; }; then
12506   ac_header_compiler=yes
12507 else
12508   echo "$as_me: failed program was:" >&5
12509 sed 's/^/| /' conftest.$ac_ext >&5
12510
12511 ac_header_compiler=no
12512 fi
12513 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12514 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12515 echo "${ECHO_T}$ac_header_compiler" >&6
12516
12517 # Is the header present?
12518 echo "$as_me:$LINENO: checking $ac_header presence" >&5
12519 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12520 cat >conftest.$ac_ext <<_ACEOF
12521 /* confdefs.h.  */
12522 _ACEOF
12523 cat confdefs.h >>conftest.$ac_ext
12524 cat >>conftest.$ac_ext <<_ACEOF
12525 /* end confdefs.h.  */
12526 #include <$ac_header>
12527 _ACEOF
12528 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12529   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12530   ac_status=$?
12531   grep -v '^ *+' conftest.er1 >conftest.err
12532   rm -f conftest.er1
12533   cat conftest.err >&5
12534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12535   (exit $ac_status); } >/dev/null; then
12536   if test -s conftest.err; then
12537     ac_cpp_err=$ac_c_preproc_warn_flag
12538     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12539   else
12540     ac_cpp_err=
12541   fi
12542 else
12543   ac_cpp_err=yes
12544 fi
12545 if test -z "$ac_cpp_err"; then
12546   ac_header_preproc=yes
12547 else
12548   echo "$as_me: failed program was:" >&5
12549 sed 's/^/| /' conftest.$ac_ext >&5
12550
12551   ac_header_preproc=no
12552 fi
12553 rm -f conftest.err conftest.$ac_ext
12554 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12555 echo "${ECHO_T}$ac_header_preproc" >&6
12556
12557 # So?  What about this header?
12558 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12559   yes:no: )
12560     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12561 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12562     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12563 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12564     ac_header_preproc=yes
12565     ;;
12566   no:yes:* )
12567     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12568 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12569     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12570 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12571     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12572 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12573     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12574 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12575     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12576 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12577     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12578 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12579     (
12580       cat <<\_ASBOX
12581 ## ------------------------------------------ ##
12582 ## Report this to the AC_PACKAGE_NAME lists.  ##
12583 ## ------------------------------------------ ##
12584 _ASBOX
12585     ) |
12586       sed "s/^/$as_me: WARNING:     /" >&2
12587     ;;
12588 esac
12589 echo "$as_me:$LINENO: checking for $ac_header" >&5
12590 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12591 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12592   echo $ECHO_N "(cached) $ECHO_C" >&6
12593 else
12594   eval "$as_ac_Header=\$ac_header_preproc"
12595 fi
12596 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12597 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12598
12599 fi
12600 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12601   cat >>confdefs.h <<_ACEOF
12602 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12603 _ACEOF
12604
12605 fi
12606
12607 done
12608
12609
12610 for ac_header in link.h
12611 do
12612 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12613 echo "$as_me:$LINENO: checking for $ac_header" >&5
12614 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12615 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12616   echo $ECHO_N "(cached) $ECHO_C" >&6
12617 else
12618   cat >conftest.$ac_ext <<_ACEOF
12619 /* confdefs.h.  */
12620 _ACEOF
12621 cat confdefs.h >>conftest.$ac_ext
12622 cat >>conftest.$ac_ext <<_ACEOF
12623 /* end confdefs.h.  */
12624 #if HAVE_SYS_TYPES_H
12625 # include <sys/types.h>
12626 #endif
12627 #if HAVE_NLIST_H
12628 # include <nlist.h>
12629 #endif
12630
12631
12632 #include <$ac_header>
12633 _ACEOF
12634 rm -f conftest.$ac_objext
12635 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12636   (eval $ac_compile) 2>conftest.er1
12637   ac_status=$?
12638   grep -v '^ *+' conftest.er1 >conftest.err
12639   rm -f conftest.er1
12640   cat conftest.err >&5
12641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12642   (exit $ac_status); } &&
12643          { ac_try='test -z "$ac_c_werror_flag"
12644                          || test ! -s conftest.err'
12645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12646   (eval $ac_try) 2>&5
12647   ac_status=$?
12648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12649   (exit $ac_status); }; } &&
12650          { ac_try='test -s conftest.$ac_objext'
12651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12652   (eval $ac_try) 2>&5
12653   ac_status=$?
12654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12655   (exit $ac_status); }; }; then
12656   eval "$as_ac_Header=yes"
12657 else
12658   echo "$as_me: failed program was:" >&5
12659 sed 's/^/| /' conftest.$ac_ext >&5
12660
12661 eval "$as_ac_Header=no"
12662 fi
12663 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12664 fi
12665 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12666 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12667 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12668   cat >>confdefs.h <<_ACEOF
12669 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12670 _ACEOF
12671
12672 fi
12673
12674 done
12675
12676
12677 for ac_header in sys/proc.h
12678 do
12679 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12680 echo "$as_me:$LINENO: checking for $ac_header" >&5
12681 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12682 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12683   echo $ECHO_N "(cached) $ECHO_C" >&6
12684 else
12685   cat >conftest.$ac_ext <<_ACEOF
12686 /* confdefs.h.  */
12687 _ACEOF
12688 cat confdefs.h >>conftest.$ac_ext
12689 cat >>conftest.$ac_ext <<_ACEOF
12690 /* end confdefs.h.  */
12691 #if HAVE_SYS_PARAM_H
12692 # include <sys/param.h>
12693 #endif
12694
12695
12696 #include <$ac_header>
12697 _ACEOF
12698 rm -f conftest.$ac_objext
12699 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12700   (eval $ac_compile) 2>conftest.er1
12701   ac_status=$?
12702   grep -v '^ *+' conftest.er1 >conftest.err
12703   rm -f conftest.er1
12704   cat conftest.err >&5
12705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12706   (exit $ac_status); } &&
12707          { ac_try='test -z "$ac_c_werror_flag"
12708                          || test ! -s conftest.err'
12709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12710   (eval $ac_try) 2>&5
12711   ac_status=$?
12712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12713   (exit $ac_status); }; } &&
12714          { ac_try='test -s conftest.$ac_objext'
12715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12716   (eval $ac_try) 2>&5
12717   ac_status=$?
12718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12719   (exit $ac_status); }; }; then
12720   eval "$as_ac_Header=yes"
12721 else
12722   echo "$as_me: failed program was:" >&5
12723 sed 's/^/| /' conftest.$ac_ext >&5
12724
12725 eval "$as_ac_Header=no"
12726 fi
12727 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12728 fi
12729 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12730 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12731 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12732   cat >>confdefs.h <<_ACEOF
12733 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12734 _ACEOF
12735
12736 fi
12737
12738 done
12739
12740
12741 for ac_header in sys/user.h
12742 do
12743 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12744 echo "$as_me:$LINENO: checking for $ac_header" >&5
12745 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12746 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12747   echo $ECHO_N "(cached) $ECHO_C" >&6
12748 else
12749   cat >conftest.$ac_ext <<_ACEOF
12750 /* confdefs.h.  */
12751 _ACEOF
12752 cat confdefs.h >>conftest.$ac_ext
12753 cat >>conftest.$ac_ext <<_ACEOF
12754 /* end confdefs.h.  */
12755 #if HAVE_SYS_PARAM_H
12756 # include <sys/param.h>
12757 #endif
12758
12759
12760 #include <$ac_header>
12761 _ACEOF
12762 rm -f conftest.$ac_objext
12763 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12764   (eval $ac_compile) 2>conftest.er1
12765   ac_status=$?
12766   grep -v '^ *+' conftest.er1 >conftest.err
12767   rm -f conftest.er1
12768   cat conftest.err >&5
12769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12770   (exit $ac_status); } &&
12771          { ac_try='test -z "$ac_c_werror_flag"
12772                          || test ! -s conftest.err'
12773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12774   (eval $ac_try) 2>&5
12775   ac_status=$?
12776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12777   (exit $ac_status); }; } &&
12778          { ac_try='test -s conftest.$ac_objext'
12779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12780   (eval $ac_try) 2>&5
12781   ac_status=$?
12782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12783   (exit $ac_status); }; }; then
12784   eval "$as_ac_Header=yes"
12785 else
12786   echo "$as_me: failed program was:" >&5
12787 sed 's/^/| /' conftest.$ac_ext >&5
12788
12789 eval "$as_ac_Header=no"
12790 fi
12791 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12792 fi
12793 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12794 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12795 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12796   cat >>confdefs.h <<_ACEOF
12797 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12798 _ACEOF
12799
12800 fi
12801
12802 done
12803
12804
12805 # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
12806 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
12807 # think that we don't have <curses.h> if we're using GCC.
12808 case $host_os in
12809   solaris2.[789])
12810     if test "$GCC" = yes; then
12811
12812 cat >>confdefs.h <<\_ACEOF
12813 #define _MSE_INT_H 1
12814 _ACEOF
12815
12816     fi ;;
12817 esac
12818
12819
12820
12821
12822
12823 for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
12824 do
12825 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12826 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12827   echo "$as_me:$LINENO: checking for $ac_header" >&5
12828 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12829 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12830   echo $ECHO_N "(cached) $ECHO_C" >&6
12831 fi
12832 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12833 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12834 else
12835   # Is the header compilable?
12836 echo "$as_me:$LINENO: checking $ac_header usability" >&5
12837 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12838 cat >conftest.$ac_ext <<_ACEOF
12839 /* confdefs.h.  */
12840 _ACEOF
12841 cat confdefs.h >>conftest.$ac_ext
12842 cat >>conftest.$ac_ext <<_ACEOF
12843 /* end confdefs.h.  */
12844 $ac_includes_default
12845 #include <$ac_header>
12846 _ACEOF
12847 rm -f conftest.$ac_objext
12848 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12849   (eval $ac_compile) 2>conftest.er1
12850   ac_status=$?
12851   grep -v '^ *+' conftest.er1 >conftest.err
12852   rm -f conftest.er1
12853   cat conftest.err >&5
12854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12855   (exit $ac_status); } &&
12856          { ac_try='test -z "$ac_c_werror_flag"
12857                          || test ! -s conftest.err'
12858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12859   (eval $ac_try) 2>&5
12860   ac_status=$?
12861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12862   (exit $ac_status); }; } &&
12863          { ac_try='test -s conftest.$ac_objext'
12864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12865   (eval $ac_try) 2>&5
12866   ac_status=$?
12867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12868   (exit $ac_status); }; }; then
12869   ac_header_compiler=yes
12870 else
12871   echo "$as_me: failed program was:" >&5
12872 sed 's/^/| /' conftest.$ac_ext >&5
12873
12874 ac_header_compiler=no
12875 fi
12876 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12877 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12878 echo "${ECHO_T}$ac_header_compiler" >&6
12879
12880 # Is the header present?
12881 echo "$as_me:$LINENO: checking $ac_header presence" >&5
12882 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12883 cat >conftest.$ac_ext <<_ACEOF
12884 /* confdefs.h.  */
12885 _ACEOF
12886 cat confdefs.h >>conftest.$ac_ext
12887 cat >>conftest.$ac_ext <<_ACEOF
12888 /* end confdefs.h.  */
12889 #include <$ac_header>
12890 _ACEOF
12891 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12892   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12893   ac_status=$?
12894   grep -v '^ *+' conftest.er1 >conftest.err
12895   rm -f conftest.er1
12896   cat conftest.err >&5
12897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12898   (exit $ac_status); } >/dev/null; then
12899   if test -s conftest.err; then
12900     ac_cpp_err=$ac_c_preproc_warn_flag
12901     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12902   else
12903     ac_cpp_err=
12904   fi
12905 else
12906   ac_cpp_err=yes
12907 fi
12908 if test -z "$ac_cpp_err"; then
12909   ac_header_preproc=yes
12910 else
12911   echo "$as_me: failed program was:" >&5
12912 sed 's/^/| /' conftest.$ac_ext >&5
12913
12914   ac_header_preproc=no
12915 fi
12916 rm -f conftest.err conftest.$ac_ext
12917 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12918 echo "${ECHO_T}$ac_header_preproc" >&6
12919
12920 # So?  What about this header?
12921 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12922   yes:no: )
12923     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12924 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12925     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12926 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12927     ac_header_preproc=yes
12928     ;;
12929   no:yes:* )
12930     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12931 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12932     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12933 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12934     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12935 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12936     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12937 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12938     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12939 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12940     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12941 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12942     (
12943       cat <<\_ASBOX
12944 ## ------------------------------------------ ##
12945 ## Report this to the AC_PACKAGE_NAME lists.  ##
12946 ## ------------------------------------------ ##
12947 _ASBOX
12948     ) |
12949       sed "s/^/$as_me: WARNING:     /" >&2
12950     ;;
12951 esac
12952 echo "$as_me:$LINENO: checking for $ac_header" >&5
12953 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12954 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12955   echo $ECHO_N "(cached) $ECHO_C" >&6
12956 else
12957   eval "$as_ac_Header=\$ac_header_preproc"
12958 fi
12959 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12960 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12961
12962 fi
12963 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12964   cat >>confdefs.h <<_ACEOF
12965 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12966 _ACEOF
12967
12968 fi
12969
12970 done
12971
12972
12973 for ac_header in term.h
12974 do
12975 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12976 echo "$as_me:$LINENO: checking for $ac_header" >&5
12977 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12978 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12979   echo $ECHO_N "(cached) $ECHO_C" >&6
12980 else
12981   cat >conftest.$ac_ext <<_ACEOF
12982 /* confdefs.h.  */
12983 _ACEOF
12984 cat confdefs.h >>conftest.$ac_ext
12985 cat >>conftest.$ac_ext <<_ACEOF
12986 /* end confdefs.h.  */
12987 #if HAVE_CURSES_H
12988 # include <curses.h>
12989 #endif
12990
12991
12992 #include <$ac_header>
12993 _ACEOF
12994 rm -f conftest.$ac_objext
12995 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12996   (eval $ac_compile) 2>conftest.er1
12997   ac_status=$?
12998   grep -v '^ *+' conftest.er1 >conftest.err
12999   rm -f conftest.er1
13000   cat conftest.err >&5
13001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13002   (exit $ac_status); } &&
13003          { ac_try='test -z "$ac_c_werror_flag"
13004                          || test ! -s conftest.err'
13005   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13006   (eval $ac_try) 2>&5
13007   ac_status=$?
13008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13009   (exit $ac_status); }; } &&
13010          { ac_try='test -s conftest.$ac_objext'
13011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13012   (eval $ac_try) 2>&5
13013   ac_status=$?
13014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13015   (exit $ac_status); }; }; then
13016   eval "$as_ac_Header=yes"
13017 else
13018   echo "$as_me: failed program was:" >&5
13019 sed 's/^/| /' conftest.$ac_ext >&5
13020
13021 eval "$as_ac_Header=no"
13022 fi
13023 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13024 fi
13025 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13026 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13027 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13028   cat >>confdefs.h <<_ACEOF
13029 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13030 _ACEOF
13031
13032 fi
13033
13034 done
13035
13036
13037 # ------------------------- #
13038 # Checks for declarations.  #
13039 # ------------------------- #
13040
13041 echo "$as_me:$LINENO: checking whether free is declared" >&5
13042 echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
13043 if test "${ac_cv_have_decl_free+set}" = set; then
13044   echo $ECHO_N "(cached) $ECHO_C" >&6
13045 else
13046   cat >conftest.$ac_ext <<_ACEOF
13047 /* confdefs.h.  */
13048 _ACEOF
13049 cat confdefs.h >>conftest.$ac_ext
13050 cat >>conftest.$ac_ext <<_ACEOF
13051 /* end confdefs.h.  */
13052 $ac_includes_default
13053 int
13054 main ()
13055 {
13056 #ifndef free
13057   char *p = (char *) free;
13058 #endif
13059
13060   ;
13061   return 0;
13062 }
13063 _ACEOF
13064 rm -f conftest.$ac_objext
13065 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13066   (eval $ac_compile) 2>conftest.er1
13067   ac_status=$?
13068   grep -v '^ *+' conftest.er1 >conftest.err
13069   rm -f conftest.er1
13070   cat conftest.err >&5
13071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13072   (exit $ac_status); } &&
13073          { ac_try='test -z "$ac_c_werror_flag"
13074                          || test ! -s conftest.err'
13075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13076   (eval $ac_try) 2>&5
13077   ac_status=$?
13078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13079   (exit $ac_status); }; } &&
13080          { ac_try='test -s conftest.$ac_objext'
13081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13082   (eval $ac_try) 2>&5
13083   ac_status=$?
13084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13085   (exit $ac_status); }; }; then
13086   ac_cv_have_decl_free=yes
13087 else
13088   echo "$as_me: failed program was:" >&5
13089 sed 's/^/| /' conftest.$ac_ext >&5
13090
13091 ac_cv_have_decl_free=no
13092 fi
13093 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13094 fi
13095 echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
13096 echo "${ECHO_T}$ac_cv_have_decl_free" >&6
13097 if test $ac_cv_have_decl_free = yes; then
13098
13099 cat >>confdefs.h <<_ACEOF
13100 #define HAVE_DECL_FREE 1
13101 _ACEOF
13102
13103
13104 else
13105   cat >>confdefs.h <<_ACEOF
13106 #define HAVE_DECL_FREE 0
13107 _ACEOF
13108
13109
13110 fi
13111 echo "$as_me:$LINENO: checking whether malloc is declared" >&5
13112 echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
13113 if test "${ac_cv_have_decl_malloc+set}" = set; then
13114   echo $ECHO_N "(cached) $ECHO_C" >&6
13115 else
13116   cat >conftest.$ac_ext <<_ACEOF
13117 /* confdefs.h.  */
13118 _ACEOF
13119 cat confdefs.h >>conftest.$ac_ext
13120 cat >>conftest.$ac_ext <<_ACEOF
13121 /* end confdefs.h.  */
13122 $ac_includes_default
13123 int
13124 main ()
13125 {
13126 #ifndef malloc
13127   char *p = (char *) malloc;
13128 #endif
13129
13130   ;
13131   return 0;
13132 }
13133 _ACEOF
13134 rm -f conftest.$ac_objext
13135 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13136   (eval $ac_compile) 2>conftest.er1
13137   ac_status=$?
13138   grep -v '^ *+' conftest.er1 >conftest.err
13139   rm -f conftest.er1
13140   cat conftest.err >&5
13141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13142   (exit $ac_status); } &&
13143          { ac_try='test -z "$ac_c_werror_flag"
13144                          || test ! -s conftest.err'
13145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13146   (eval $ac_try) 2>&5
13147   ac_status=$?
13148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13149   (exit $ac_status); }; } &&
13150          { ac_try='test -s conftest.$ac_objext'
13151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13152   (eval $ac_try) 2>&5
13153   ac_status=$?
13154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13155   (exit $ac_status); }; }; then
13156   ac_cv_have_decl_malloc=yes
13157 else
13158   echo "$as_me: failed program was:" >&5
13159 sed 's/^/| /' conftest.$ac_ext >&5
13160
13161 ac_cv_have_decl_malloc=no
13162 fi
13163 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13164 fi
13165 echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
13166 echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
13167 if test $ac_cv_have_decl_malloc = yes; then
13168
13169 cat >>confdefs.h <<_ACEOF
13170 #define HAVE_DECL_MALLOC 1
13171 _ACEOF
13172
13173
13174 else
13175   cat >>confdefs.h <<_ACEOF
13176 #define HAVE_DECL_MALLOC 0
13177 _ACEOF
13178
13179
13180 fi
13181 echo "$as_me:$LINENO: checking whether realloc is declared" >&5
13182 echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
13183 if test "${ac_cv_have_decl_realloc+set}" = set; then
13184   echo $ECHO_N "(cached) $ECHO_C" >&6
13185 else
13186   cat >conftest.$ac_ext <<_ACEOF
13187 /* confdefs.h.  */
13188 _ACEOF
13189 cat confdefs.h >>conftest.$ac_ext
13190 cat >>conftest.$ac_ext <<_ACEOF
13191 /* end confdefs.h.  */
13192 $ac_includes_default
13193 int
13194 main ()
13195 {
13196 #ifndef realloc
13197   char *p = (char *) realloc;
13198 #endif
13199
13200   ;
13201   return 0;
13202 }
13203 _ACEOF
13204 rm -f conftest.$ac_objext
13205 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13206   (eval $ac_compile) 2>conftest.er1
13207   ac_status=$?
13208   grep -v '^ *+' conftest.er1 >conftest.err
13209   rm -f conftest.er1
13210   cat conftest.err >&5
13211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13212   (exit $ac_status); } &&
13213          { ac_try='test -z "$ac_c_werror_flag"
13214                          || test ! -s conftest.err'
13215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13216   (eval $ac_try) 2>&5
13217   ac_status=$?
13218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13219   (exit $ac_status); }; } &&
13220          { ac_try='test -s conftest.$ac_objext'
13221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13222   (eval $ac_try) 2>&5
13223   ac_status=$?
13224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13225   (exit $ac_status); }; }; then
13226   ac_cv_have_decl_realloc=yes
13227 else
13228   echo "$as_me: failed program was:" >&5
13229 sed 's/^/| /' conftest.$ac_ext >&5
13230
13231 ac_cv_have_decl_realloc=no
13232 fi
13233 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13234 fi
13235 echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
13236 echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
13237 if test $ac_cv_have_decl_realloc = yes; then
13238
13239 cat >>confdefs.h <<_ACEOF
13240 #define HAVE_DECL_REALLOC 1
13241 _ACEOF
13242
13243
13244 else
13245   cat >>confdefs.h <<_ACEOF
13246 #define HAVE_DECL_REALLOC 0
13247 _ACEOF
13248
13249
13250 fi
13251 echo "$as_me:$LINENO: checking whether strerror is declared" >&5
13252 echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
13253 if test "${ac_cv_have_decl_strerror+set}" = set; then
13254   echo $ECHO_N "(cached) $ECHO_C" >&6
13255 else
13256   cat >conftest.$ac_ext <<_ACEOF
13257 /* confdefs.h.  */
13258 _ACEOF
13259 cat confdefs.h >>conftest.$ac_ext
13260 cat >>conftest.$ac_ext <<_ACEOF
13261 /* end confdefs.h.  */
13262 $ac_includes_default
13263 int
13264 main ()
13265 {
13266 #ifndef strerror
13267   char *p = (char *) strerror;
13268 #endif
13269
13270   ;
13271   return 0;
13272 }
13273 _ACEOF
13274 rm -f conftest.$ac_objext
13275 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13276   (eval $ac_compile) 2>conftest.er1
13277   ac_status=$?
13278   grep -v '^ *+' conftest.er1 >conftest.err
13279   rm -f conftest.er1
13280   cat conftest.err >&5
13281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13282   (exit $ac_status); } &&
13283          { ac_try='test -z "$ac_c_werror_flag"
13284                          || test ! -s conftest.err'
13285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13286   (eval $ac_try) 2>&5
13287   ac_status=$?
13288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13289   (exit $ac_status); }; } &&
13290          { ac_try='test -s conftest.$ac_objext'
13291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13292   (eval $ac_try) 2>&5
13293   ac_status=$?
13294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13295   (exit $ac_status); }; }; then
13296   ac_cv_have_decl_strerror=yes
13297 else
13298   echo "$as_me: failed program was:" >&5
13299 sed 's/^/| /' conftest.$ac_ext >&5
13300
13301 ac_cv_have_decl_strerror=no
13302 fi
13303 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13304 fi
13305 echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
13306 echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
13307 if test $ac_cv_have_decl_strerror = yes; then
13308
13309 cat >>confdefs.h <<_ACEOF
13310 #define HAVE_DECL_STRERROR 1
13311 _ACEOF
13312
13313
13314 else
13315   cat >>confdefs.h <<_ACEOF
13316 #define HAVE_DECL_STRERROR 0
13317 _ACEOF
13318
13319
13320 fi
13321 echo "$as_me:$LINENO: checking whether strstr is declared" >&5
13322 echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
13323 if test "${ac_cv_have_decl_strstr+set}" = set; then
13324   echo $ECHO_N "(cached) $ECHO_C" >&6
13325 else
13326   cat >conftest.$ac_ext <<_ACEOF
13327 /* confdefs.h.  */
13328 _ACEOF
13329 cat confdefs.h >>conftest.$ac_ext
13330 cat >>conftest.$ac_ext <<_ACEOF
13331 /* end confdefs.h.  */
13332 $ac_includes_default
13333 int
13334 main ()
13335 {
13336 #ifndef strstr
13337   char *p = (char *) strstr;
13338 #endif
13339
13340   ;
13341   return 0;
13342 }
13343 _ACEOF
13344 rm -f conftest.$ac_objext
13345 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13346   (eval $ac_compile) 2>conftest.er1
13347   ac_status=$?
13348   grep -v '^ *+' conftest.er1 >conftest.err
13349   rm -f conftest.er1
13350   cat conftest.err >&5
13351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13352   (exit $ac_status); } &&
13353          { ac_try='test -z "$ac_c_werror_flag"
13354                          || test ! -s conftest.err'
13355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13356   (eval $ac_try) 2>&5
13357   ac_status=$?
13358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13359   (exit $ac_status); }; } &&
13360          { ac_try='test -s conftest.$ac_objext'
13361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13362   (eval $ac_try) 2>&5
13363   ac_status=$?
13364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13365   (exit $ac_status); }; }; then
13366   ac_cv_have_decl_strstr=yes
13367 else
13368   echo "$as_me: failed program was:" >&5
13369 sed 's/^/| /' conftest.$ac_ext >&5
13370
13371 ac_cv_have_decl_strstr=no
13372 fi
13373 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13374 fi
13375 echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
13376 echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
13377 if test $ac_cv_have_decl_strstr = yes; then
13378
13379 cat >>confdefs.h <<_ACEOF
13380 #define HAVE_DECL_STRSTR 1
13381 _ACEOF
13382
13383
13384 else
13385   cat >>confdefs.h <<_ACEOF
13386 #define HAVE_DECL_STRSTR 0
13387 _ACEOF
13388
13389
13390 fi
13391 echo "$as_me:$LINENO: checking whether getopt is declared" >&5
13392 echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
13393 if test "${ac_cv_have_decl_getopt+set}" = set; then
13394   echo $ECHO_N "(cached) $ECHO_C" >&6
13395 else
13396   cat >conftest.$ac_ext <<_ACEOF
13397 /* confdefs.h.  */
13398 _ACEOF
13399 cat confdefs.h >>conftest.$ac_ext
13400 cat >>conftest.$ac_ext <<_ACEOF
13401 /* end confdefs.h.  */
13402 $ac_includes_default
13403 int
13404 main ()
13405 {
13406 #ifndef getopt
13407   char *p = (char *) getopt;
13408 #endif
13409
13410   ;
13411   return 0;
13412 }
13413 _ACEOF
13414 rm -f conftest.$ac_objext
13415 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13416   (eval $ac_compile) 2>conftest.er1
13417   ac_status=$?
13418   grep -v '^ *+' conftest.er1 >conftest.err
13419   rm -f conftest.er1
13420   cat conftest.err >&5
13421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13422   (exit $ac_status); } &&
13423          { ac_try='test -z "$ac_c_werror_flag"
13424                          || test ! -s conftest.err'
13425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13426   (eval $ac_try) 2>&5
13427   ac_status=$?
13428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13429   (exit $ac_status); }; } &&
13430          { ac_try='test -s conftest.$ac_objext'
13431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13432   (eval $ac_try) 2>&5
13433   ac_status=$?
13434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13435   (exit $ac_status); }; }; then
13436   ac_cv_have_decl_getopt=yes
13437 else
13438   echo "$as_me: failed program was:" >&5
13439 sed 's/^/| /' conftest.$ac_ext >&5
13440
13441 ac_cv_have_decl_getopt=no
13442 fi
13443 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13444 fi
13445 echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
13446 echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
13447 if test $ac_cv_have_decl_getopt = yes; then
13448
13449 cat >>confdefs.h <<_ACEOF
13450 #define HAVE_DECL_GETOPT 1
13451 _ACEOF
13452
13453
13454 else
13455   cat >>confdefs.h <<_ACEOF
13456 #define HAVE_DECL_GETOPT 0
13457 _ACEOF
13458
13459
13460 fi
13461 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
13462 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
13463 if test "${ac_cv_have_decl_snprintf+set}" = set; then
13464   echo $ECHO_N "(cached) $ECHO_C" >&6
13465 else
13466   cat >conftest.$ac_ext <<_ACEOF
13467 /* confdefs.h.  */
13468 _ACEOF
13469 cat confdefs.h >>conftest.$ac_ext
13470 cat >>conftest.$ac_ext <<_ACEOF
13471 /* end confdefs.h.  */
13472 $ac_includes_default
13473 int
13474 main ()
13475 {
13476 #ifndef snprintf
13477   char *p = (char *) snprintf;
13478 #endif
13479
13480   ;
13481   return 0;
13482 }
13483 _ACEOF
13484 rm -f conftest.$ac_objext
13485 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13486   (eval $ac_compile) 2>conftest.er1
13487   ac_status=$?
13488   grep -v '^ *+' conftest.er1 >conftest.err
13489   rm -f conftest.er1
13490   cat conftest.err >&5
13491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13492   (exit $ac_status); } &&
13493          { ac_try='test -z "$ac_c_werror_flag"
13494                          || test ! -s conftest.err'
13495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13496   (eval $ac_try) 2>&5
13497   ac_status=$?
13498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13499   (exit $ac_status); }; } &&
13500          { ac_try='test -s conftest.$ac_objext'
13501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13502   (eval $ac_try) 2>&5
13503   ac_status=$?
13504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13505   (exit $ac_status); }; }; then
13506   ac_cv_have_decl_snprintf=yes
13507 else
13508   echo "$as_me: failed program was:" >&5
13509 sed 's/^/| /' conftest.$ac_ext >&5
13510
13511 ac_cv_have_decl_snprintf=no
13512 fi
13513 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13514 fi
13515 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
13516 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
13517 if test $ac_cv_have_decl_snprintf = yes; then
13518
13519 cat >>confdefs.h <<_ACEOF
13520 #define HAVE_DECL_SNPRINTF 1
13521 _ACEOF
13522
13523
13524 else
13525   cat >>confdefs.h <<_ACEOF
13526 #define HAVE_DECL_SNPRINTF 0
13527 _ACEOF
13528
13529
13530 fi
13531 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
13532 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
13533 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
13534   echo $ECHO_N "(cached) $ECHO_C" >&6
13535 else
13536   cat >conftest.$ac_ext <<_ACEOF
13537 /* confdefs.h.  */
13538 _ACEOF
13539 cat confdefs.h >>conftest.$ac_ext
13540 cat >>conftest.$ac_ext <<_ACEOF
13541 /* end confdefs.h.  */
13542 $ac_includes_default
13543 int
13544 main ()
13545 {
13546 #ifndef vsnprintf
13547   char *p = (char *) vsnprintf;
13548 #endif
13549
13550   ;
13551   return 0;
13552 }
13553 _ACEOF
13554 rm -f conftest.$ac_objext
13555 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13556   (eval $ac_compile) 2>conftest.er1
13557   ac_status=$?
13558   grep -v '^ *+' conftest.er1 >conftest.err
13559   rm -f conftest.er1
13560   cat conftest.err >&5
13561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13562   (exit $ac_status); } &&
13563          { ac_try='test -z "$ac_c_werror_flag"
13564                          || test ! -s conftest.err'
13565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13566   (eval $ac_try) 2>&5
13567   ac_status=$?
13568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13569   (exit $ac_status); }; } &&
13570          { ac_try='test -s conftest.$ac_objext'
13571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13572   (eval $ac_try) 2>&5
13573   ac_status=$?
13574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13575   (exit $ac_status); }; }; then
13576   ac_cv_have_decl_vsnprintf=yes
13577 else
13578   echo "$as_me: failed program was:" >&5
13579 sed 's/^/| /' conftest.$ac_ext >&5
13580
13581 ac_cv_have_decl_vsnprintf=no
13582 fi
13583 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13584 fi
13585 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
13586 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
13587 if test $ac_cv_have_decl_vsnprintf = yes; then
13588
13589 cat >>confdefs.h <<_ACEOF
13590 #define HAVE_DECL_VSNPRINTF 1
13591 _ACEOF
13592
13593
13594 else
13595   cat >>confdefs.h <<_ACEOF
13596 #define HAVE_DECL_VSNPRINTF 0
13597 _ACEOF
13598
13599
13600 fi
13601
13602
13603
13604   echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
13605 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
13606 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
13607   echo $ECHO_N "(cached) $ECHO_C" >&6
13608 else
13609   cat >conftest.$ac_ext <<_ACEOF
13610 /* confdefs.h.  */
13611 _ACEOF
13612 cat confdefs.h >>conftest.$ac_ext
13613 cat >>conftest.$ac_ext <<_ACEOF
13614 /* end confdefs.h.  */
13615 #include <locale.h>
13616 int
13617 main ()
13618 {
13619 return LC_MESSAGES
13620   ;
13621   return 0;
13622 }
13623 _ACEOF
13624 rm -f conftest.$ac_objext conftest$ac_exeext
13625 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13626   (eval $ac_link) 2>conftest.er1
13627   ac_status=$?
13628   grep -v '^ *+' conftest.er1 >conftest.err
13629   rm -f conftest.er1
13630   cat conftest.err >&5
13631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13632   (exit $ac_status); } &&
13633          { ac_try='test -z "$ac_c_werror_flag"
13634                          || test ! -s conftest.err'
13635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13636   (eval $ac_try) 2>&5
13637   ac_status=$?
13638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13639   (exit $ac_status); }; } &&
13640          { ac_try='test -s conftest$ac_exeext'
13641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13642   (eval $ac_try) 2>&5
13643   ac_status=$?
13644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645   (exit $ac_status); }; }; then
13646   am_cv_val_LC_MESSAGES=yes
13647 else
13648   echo "$as_me: failed program was:" >&5
13649 sed 's/^/| /' conftest.$ac_ext >&5
13650
13651 am_cv_val_LC_MESSAGES=no
13652 fi
13653 rm -f conftest.err conftest.$ac_objext \
13654       conftest$ac_exeext conftest.$ac_ext
13655 fi
13656 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
13657 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
13658   if test $am_cv_val_LC_MESSAGES = yes; then
13659
13660 cat >>confdefs.h <<\_ACEOF
13661 #define HAVE_LC_MESSAGES 1
13662 _ACEOF
13663
13664   fi
13665
13666
13667 # ----------------------- #
13668 # Checks for structures.  #
13669 # ----------------------- #
13670
13671 echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13672 echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13673 if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13674   echo $ECHO_N "(cached) $ECHO_C" >&6
13675 else
13676   cat >conftest.$ac_ext <<_ACEOF
13677 /* confdefs.h.  */
13678 _ACEOF
13679 cat confdefs.h >>conftest.$ac_ext
13680 cat >>conftest.$ac_ext <<_ACEOF
13681 /* end confdefs.h.  */
13682 $ac_includes_default
13683 int
13684 main ()
13685 {
13686 static struct stat ac_aggr;
13687 if (ac_aggr.st_blocks)
13688 return 0;
13689   ;
13690   return 0;
13691 }
13692 _ACEOF
13693 rm -f conftest.$ac_objext
13694 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13695   (eval $ac_compile) 2>conftest.er1
13696   ac_status=$?
13697   grep -v '^ *+' conftest.er1 >conftest.err
13698   rm -f conftest.er1
13699   cat conftest.err >&5
13700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13701   (exit $ac_status); } &&
13702          { ac_try='test -z "$ac_c_werror_flag"
13703                          || test ! -s conftest.err'
13704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13705   (eval $ac_try) 2>&5
13706   ac_status=$?
13707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13708   (exit $ac_status); }; } &&
13709          { ac_try='test -s conftest.$ac_objext'
13710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13711   (eval $ac_try) 2>&5
13712   ac_status=$?
13713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13714   (exit $ac_status); }; }; then
13715   ac_cv_member_struct_stat_st_blocks=yes
13716 else
13717   echo "$as_me: failed program was:" >&5
13718 sed 's/^/| /' conftest.$ac_ext >&5
13719
13720 cat >conftest.$ac_ext <<_ACEOF
13721 /* confdefs.h.  */
13722 _ACEOF
13723 cat confdefs.h >>conftest.$ac_ext
13724 cat >>conftest.$ac_ext <<_ACEOF
13725 /* end confdefs.h.  */
13726 $ac_includes_default
13727 int
13728 main ()
13729 {
13730 static struct stat ac_aggr;
13731 if (sizeof ac_aggr.st_blocks)
13732 return 0;
13733   ;
13734   return 0;
13735 }
13736 _ACEOF
13737 rm -f conftest.$ac_objext
13738 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13739   (eval $ac_compile) 2>conftest.er1
13740   ac_status=$?
13741   grep -v '^ *+' conftest.er1 >conftest.err
13742   rm -f conftest.er1
13743   cat conftest.err >&5
13744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13745   (exit $ac_status); } &&
13746          { ac_try='test -z "$ac_c_werror_flag"
13747                          || test ! -s conftest.err'
13748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13749   (eval $ac_try) 2>&5
13750   ac_status=$?
13751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13752   (exit $ac_status); }; } &&
13753          { ac_try='test -s conftest.$ac_objext'
13754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13755   (eval $ac_try) 2>&5
13756   ac_status=$?
13757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13758   (exit $ac_status); }; }; then
13759   ac_cv_member_struct_stat_st_blocks=yes
13760 else
13761   echo "$as_me: failed program was:" >&5
13762 sed 's/^/| /' conftest.$ac_ext >&5
13763
13764 ac_cv_member_struct_stat_st_blocks=no
13765 fi
13766 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13767 fi
13768 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13769 fi
13770 echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13771 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13772 if test $ac_cv_member_struct_stat_st_blocks = yes; then
13773
13774 cat >>confdefs.h <<_ACEOF
13775 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
13776 _ACEOF
13777
13778
13779 fi
13780 echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13781 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13782 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13783   echo $ECHO_N "(cached) $ECHO_C" >&6
13784 else
13785   cat >conftest.$ac_ext <<_ACEOF
13786 /* confdefs.h.  */
13787 _ACEOF
13788 cat confdefs.h >>conftest.$ac_ext
13789 cat >>conftest.$ac_ext <<_ACEOF
13790 /* end confdefs.h.  */
13791 $ac_includes_default
13792 int
13793 main ()
13794 {
13795 static struct stat ac_aggr;
13796 if (ac_aggr.st_blksize)
13797 return 0;
13798   ;
13799   return 0;
13800 }
13801 _ACEOF
13802 rm -f conftest.$ac_objext
13803 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13804   (eval $ac_compile) 2>conftest.er1
13805   ac_status=$?
13806   grep -v '^ *+' conftest.er1 >conftest.err
13807   rm -f conftest.er1
13808   cat conftest.err >&5
13809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13810   (exit $ac_status); } &&
13811          { ac_try='test -z "$ac_c_werror_flag"
13812                          || test ! -s conftest.err'
13813   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13814   (eval $ac_try) 2>&5
13815   ac_status=$?
13816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13817   (exit $ac_status); }; } &&
13818          { ac_try='test -s conftest.$ac_objext'
13819   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13820   (eval $ac_try) 2>&5
13821   ac_status=$?
13822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13823   (exit $ac_status); }; }; then
13824   ac_cv_member_struct_stat_st_blksize=yes
13825 else
13826   echo "$as_me: failed program was:" >&5
13827 sed 's/^/| /' conftest.$ac_ext >&5
13828
13829 cat >conftest.$ac_ext <<_ACEOF
13830 /* confdefs.h.  */
13831 _ACEOF
13832 cat confdefs.h >>conftest.$ac_ext
13833 cat >>conftest.$ac_ext <<_ACEOF
13834 /* end confdefs.h.  */
13835 $ac_includes_default
13836 int
13837 main ()
13838 {
13839 static struct stat ac_aggr;
13840 if (sizeof ac_aggr.st_blksize)
13841 return 0;
13842   ;
13843   return 0;
13844 }
13845 _ACEOF
13846 rm -f conftest.$ac_objext
13847 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13848   (eval $ac_compile) 2>conftest.er1
13849   ac_status=$?
13850   grep -v '^ *+' conftest.er1 >conftest.err
13851   rm -f conftest.er1
13852   cat conftest.err >&5
13853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13854   (exit $ac_status); } &&
13855          { ac_try='test -z "$ac_c_werror_flag"
13856                          || test ! -s conftest.err'
13857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13858   (eval $ac_try) 2>&5
13859   ac_status=$?
13860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13861   (exit $ac_status); }; } &&
13862          { ac_try='test -s conftest.$ac_objext'
13863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13864   (eval $ac_try) 2>&5
13865   ac_status=$?
13866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13867   (exit $ac_status); }; }; then
13868   ac_cv_member_struct_stat_st_blksize=yes
13869 else
13870   echo "$as_me: failed program was:" >&5
13871 sed 's/^/| /' conftest.$ac_ext >&5
13872
13873 ac_cv_member_struct_stat_st_blksize=no
13874 fi
13875 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13876 fi
13877 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13878 fi
13879 echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13880 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13881 if test $ac_cv_member_struct_stat_st_blksize = yes; then
13882
13883 cat >>confdefs.h <<_ACEOF
13884 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13885 _ACEOF
13886
13887
13888 fi
13889
13890
13891 # ------------------ #
13892 # Checks for types.  #
13893 # ------------------ #
13894
13895 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
13896 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13897 if test "${ac_cv_type_signal+set}" = set; then
13898   echo $ECHO_N "(cached) $ECHO_C" >&6
13899 else
13900   cat >conftest.$ac_ext <<_ACEOF
13901 /* confdefs.h.  */
13902 _ACEOF
13903 cat confdefs.h >>conftest.$ac_ext
13904 cat >>conftest.$ac_ext <<_ACEOF
13905 /* end confdefs.h.  */
13906 #include <sys/types.h>
13907 #include <signal.h>
13908 #ifdef signal
13909 # undef signal
13910 #endif
13911 #ifdef __cplusplus
13912 extern "C" void (*signal (int, void (*)(int)))(int);
13913 #else
13914 void (*signal ()) ();
13915 #endif
13916
13917 int
13918 main ()
13919 {
13920 int i;
13921   ;
13922   return 0;
13923 }
13924 _ACEOF
13925 rm -f conftest.$ac_objext
13926 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13927   (eval $ac_compile) 2>conftest.er1
13928   ac_status=$?
13929   grep -v '^ *+' conftest.er1 >conftest.err
13930   rm -f conftest.er1
13931   cat conftest.err >&5
13932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13933   (exit $ac_status); } &&
13934          { ac_try='test -z "$ac_c_werror_flag"
13935                          || test ! -s conftest.err'
13936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13937   (eval $ac_try) 2>&5
13938   ac_status=$?
13939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13940   (exit $ac_status); }; } &&
13941          { ac_try='test -s conftest.$ac_objext'
13942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13943   (eval $ac_try) 2>&5
13944   ac_status=$?
13945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13946   (exit $ac_status); }; }; then
13947   ac_cv_type_signal=void
13948 else
13949   echo "$as_me: failed program was:" >&5
13950 sed 's/^/| /' conftest.$ac_ext >&5
13951
13952 ac_cv_type_signal=int
13953 fi
13954 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13955 fi
13956 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
13957 echo "${ECHO_T}$ac_cv_type_signal" >&6
13958
13959 cat >>confdefs.h <<_ACEOF
13960 #define RETSIGTYPE $ac_cv_type_signal
13961 _ACEOF
13962
13963
13964 echo "$as_me:$LINENO: checking for socklen_t" >&5
13965 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
13966 if test "${ac_cv_type_socklen_t+set}" = set; then
13967   echo $ECHO_N "(cached) $ECHO_C" >&6
13968 else
13969   cat >conftest.$ac_ext <<_ACEOF
13970 /* confdefs.h.  */
13971 _ACEOF
13972 cat confdefs.h >>conftest.$ac_ext
13973 cat >>conftest.$ac_ext <<_ACEOF
13974 /* end confdefs.h.  */
13975 #include <sys/types.h>
13976 #include <sys/socket.h>
13977
13978
13979 int
13980 main ()
13981 {
13982 if ((socklen_t *) 0)
13983   return 0;
13984 if (sizeof (socklen_t))
13985   return 0;
13986   ;
13987   return 0;
13988 }
13989 _ACEOF
13990 rm -f conftest.$ac_objext
13991 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13992   (eval $ac_compile) 2>conftest.er1
13993   ac_status=$?
13994   grep -v '^ *+' conftest.er1 >conftest.err
13995   rm -f conftest.er1
13996   cat conftest.err >&5
13997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13998   (exit $ac_status); } &&
13999          { ac_try='test -z "$ac_c_werror_flag"
14000                          || test ! -s conftest.err'
14001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14002   (eval $ac_try) 2>&5
14003   ac_status=$?
14004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14005   (exit $ac_status); }; } &&
14006          { ac_try='test -s conftest.$ac_objext'
14007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14008   (eval $ac_try) 2>&5
14009   ac_status=$?
14010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14011   (exit $ac_status); }; }; then
14012   ac_cv_type_socklen_t=yes
14013 else
14014   echo "$as_me: failed program was:" >&5
14015 sed 's/^/| /' conftest.$ac_ext >&5
14016
14017 ac_cv_type_socklen_t=no
14018 fi
14019 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14020 fi
14021 echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
14022 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
14023 if test $ac_cv_type_socklen_t = yes; then
14024
14025 cat >>confdefs.h <<_ACEOF
14026 #define HAVE_SOCKLEN_T 1
14027 _ACEOF
14028
14029
14030 fi
14031
14032
14033 # ------------------------------------- #
14034 # Checks for compiler characteristics.  #
14035 # ------------------------------------- #
14036
14037 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14038 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14039 if test "${ac_cv_c_const+set}" = set; then
14040   echo $ECHO_N "(cached) $ECHO_C" >&6
14041 else
14042   cat >conftest.$ac_ext <<_ACEOF
14043 /* confdefs.h.  */
14044 _ACEOF
14045 cat confdefs.h >>conftest.$ac_ext
14046 cat >>conftest.$ac_ext <<_ACEOF
14047 /* end confdefs.h.  */
14048
14049 int
14050 main ()
14051 {
14052 /* FIXME: Include the comments suggested by Paul. */
14053 #ifndef __cplusplus
14054   /* Ultrix mips cc rejects this.  */
14055   typedef int charset[2];
14056   const charset x;
14057   /* SunOS 4.1.1 cc rejects this.  */
14058   char const *const *ccp;
14059   char **p;
14060   /* NEC SVR4.0.2 mips cc rejects this.  */
14061   struct point {int x, y;};
14062   static struct point const zero = {0,0};
14063   /* AIX XL C 1.02.0.0 rejects this.
14064      It does not let you subtract one const X* pointer from another in
14065      an arm of an if-expression whose if-part is not a constant
14066      expression */
14067   const char *g = "string";
14068   ccp = &g + (g ? g-g : 0);
14069   /* HPUX 7.0 cc rejects these. */
14070   ++ccp;
14071   p = (char**) ccp;
14072   ccp = (char const *const *) p;
14073   { /* SCO 3.2v4 cc rejects this.  */
14074     char *t;
14075     char const *s = 0 ? (char *) 0 : (char const *) 0;
14076
14077     *t++ = 0;
14078   }
14079   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14080     int x[] = {25, 17};
14081     const int *foo = &x[0];
14082     ++foo;
14083   }
14084   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14085     typedef const int *iptr;
14086     iptr p = 0;
14087     ++p;
14088   }
14089   { /* AIX XL C 1.02.0.0 rejects this saying
14090        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14091     struct s { int j; const int *ap[3]; };
14092     struct s *b; b->j = 5;
14093   }
14094   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14095     const int foo = 10;
14096   }
14097 #endif
14098
14099   ;
14100   return 0;
14101 }
14102 _ACEOF
14103 rm -f conftest.$ac_objext
14104 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14105   (eval $ac_compile) 2>conftest.er1
14106   ac_status=$?
14107   grep -v '^ *+' conftest.er1 >conftest.err
14108   rm -f conftest.er1
14109   cat conftest.err >&5
14110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14111   (exit $ac_status); } &&
14112          { ac_try='test -z "$ac_c_werror_flag"
14113                          || test ! -s conftest.err'
14114   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14115   (eval $ac_try) 2>&5
14116   ac_status=$?
14117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14118   (exit $ac_status); }; } &&
14119          { ac_try='test -s conftest.$ac_objext'
14120   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14121   (eval $ac_try) 2>&5
14122   ac_status=$?
14123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14124   (exit $ac_status); }; }; then
14125   ac_cv_c_const=yes
14126 else
14127   echo "$as_me: failed program was:" >&5
14128 sed 's/^/| /' conftest.$ac_ext >&5
14129
14130 ac_cv_c_const=no
14131 fi
14132 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14133 fi
14134 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14135 echo "${ECHO_T}$ac_cv_c_const" >&6
14136 if test $ac_cv_c_const = no; then
14137
14138 cat >>confdefs.h <<\_ACEOF
14139 #define const
14140 _ACEOF
14141
14142 fi
14143
14144 echo "$as_me:$LINENO: checking for inline" >&5
14145 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14146 if test "${ac_cv_c_inline+set}" = set; then
14147   echo $ECHO_N "(cached) $ECHO_C" >&6
14148 else
14149   ac_cv_c_inline=no
14150 for ac_kw in inline __inline__ __inline; do
14151   cat >conftest.$ac_ext <<_ACEOF
14152 /* confdefs.h.  */
14153 _ACEOF
14154 cat confdefs.h >>conftest.$ac_ext
14155 cat >>conftest.$ac_ext <<_ACEOF
14156 /* end confdefs.h.  */
14157 #ifndef __cplusplus
14158 typedef int foo_t;
14159 static $ac_kw foo_t static_foo () {return 0; }
14160 $ac_kw foo_t foo () {return 0; }
14161 #endif
14162
14163 _ACEOF
14164 rm -f conftest.$ac_objext
14165 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14166   (eval $ac_compile) 2>conftest.er1
14167   ac_status=$?
14168   grep -v '^ *+' conftest.er1 >conftest.err
14169   rm -f conftest.er1
14170   cat conftest.err >&5
14171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14172   (exit $ac_status); } &&
14173          { ac_try='test -z "$ac_c_werror_flag"
14174                          || test ! -s conftest.err'
14175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14176   (eval $ac_try) 2>&5
14177   ac_status=$?
14178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14179   (exit $ac_status); }; } &&
14180          { ac_try='test -s conftest.$ac_objext'
14181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14182   (eval $ac_try) 2>&5
14183   ac_status=$?
14184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14185   (exit $ac_status); }; }; then
14186   ac_cv_c_inline=$ac_kw; break
14187 else
14188   echo "$as_me: failed program was:" >&5
14189 sed 's/^/| /' conftest.$ac_ext >&5
14190
14191 fi
14192 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14193 done
14194
14195 fi
14196 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
14197 echo "${ECHO_T}$ac_cv_c_inline" >&6
14198
14199
14200 case $ac_cv_c_inline in
14201   inline | yes) ;;
14202   *)
14203     case $ac_cv_c_inline in
14204       no) ac_val=;;
14205       *) ac_val=$ac_cv_c_inline;;
14206     esac
14207     cat >>confdefs.h <<_ACEOF
14208 #ifndef __cplusplus
14209 #define inline $ac_val
14210 #endif
14211 _ACEOF
14212     ;;
14213 esac
14214
14215 echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
14216 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
14217 if test "${ac_cv_c_bigendian+set}" = set; then
14218   echo $ECHO_N "(cached) $ECHO_C" >&6
14219 else
14220   # See if sys/param.h defines the BYTE_ORDER macro.
14221 cat >conftest.$ac_ext <<_ACEOF
14222 /* confdefs.h.  */
14223 _ACEOF
14224 cat confdefs.h >>conftest.$ac_ext
14225 cat >>conftest.$ac_ext <<_ACEOF
14226 /* end confdefs.h.  */
14227 #include <sys/types.h>
14228 #include <sys/param.h>
14229
14230 int
14231 main ()
14232 {
14233 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14234  bogus endian macros
14235 #endif
14236
14237   ;
14238   return 0;
14239 }
14240 _ACEOF
14241 rm -f conftest.$ac_objext
14242 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14243   (eval $ac_compile) 2>conftest.er1
14244   ac_status=$?
14245   grep -v '^ *+' conftest.er1 >conftest.err
14246   rm -f conftest.er1
14247   cat conftest.err >&5
14248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14249   (exit $ac_status); } &&
14250          { ac_try='test -z "$ac_c_werror_flag"
14251                          || test ! -s conftest.err'
14252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14253   (eval $ac_try) 2>&5
14254   ac_status=$?
14255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14256   (exit $ac_status); }; } &&
14257          { ac_try='test -s conftest.$ac_objext'
14258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14259   (eval $ac_try) 2>&5
14260   ac_status=$?
14261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14262   (exit $ac_status); }; }; then
14263   # It does; now see whether it defined to BIG_ENDIAN or not.
14264 cat >conftest.$ac_ext <<_ACEOF
14265 /* confdefs.h.  */
14266 _ACEOF
14267 cat confdefs.h >>conftest.$ac_ext
14268 cat >>conftest.$ac_ext <<_ACEOF
14269 /* end confdefs.h.  */
14270 #include <sys/types.h>
14271 #include <sys/param.h>
14272
14273 int
14274 main ()
14275 {
14276 #if BYTE_ORDER != BIG_ENDIAN
14277  not big endian
14278 #endif
14279
14280   ;
14281   return 0;
14282 }
14283 _ACEOF
14284 rm -f conftest.$ac_objext
14285 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14286   (eval $ac_compile) 2>conftest.er1
14287   ac_status=$?
14288   grep -v '^ *+' conftest.er1 >conftest.err
14289   rm -f conftest.er1
14290   cat conftest.err >&5
14291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14292   (exit $ac_status); } &&
14293          { ac_try='test -z "$ac_c_werror_flag"
14294                          || test ! -s conftest.err'
14295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14296   (eval $ac_try) 2>&5
14297   ac_status=$?
14298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14299   (exit $ac_status); }; } &&
14300          { ac_try='test -s conftest.$ac_objext'
14301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14302   (eval $ac_try) 2>&5
14303   ac_status=$?
14304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14305   (exit $ac_status); }; }; then
14306   ac_cv_c_bigendian=yes
14307 else
14308   echo "$as_me: failed program was:" >&5
14309 sed 's/^/| /' conftest.$ac_ext >&5
14310
14311 ac_cv_c_bigendian=no
14312 fi
14313 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14314 else
14315   echo "$as_me: failed program was:" >&5
14316 sed 's/^/| /' conftest.$ac_ext >&5
14317
14318 # It does not; compile a test program.
14319 if test "$cross_compiling" = yes; then
14320   # try to guess the endianness by grepping values into an object file
14321   ac_cv_c_bigendian=unknown
14322   cat >conftest.$ac_ext <<_ACEOF
14323 /* confdefs.h.  */
14324 _ACEOF
14325 cat confdefs.h >>conftest.$ac_ext
14326 cat >>conftest.$ac_ext <<_ACEOF
14327 /* end confdefs.h.  */
14328 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14329 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14330 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
14331 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14332 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14333 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
14334 int
14335 main ()
14336 {
14337  _ascii (); _ebcdic ();
14338   ;
14339   return 0;
14340 }
14341 _ACEOF
14342 rm -f conftest.$ac_objext
14343 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14344   (eval $ac_compile) 2>conftest.er1
14345   ac_status=$?
14346   grep -v '^ *+' conftest.er1 >conftest.err
14347   rm -f conftest.er1
14348   cat conftest.err >&5
14349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14350   (exit $ac_status); } &&
14351          { ac_try='test -z "$ac_c_werror_flag"
14352                          || test ! -s conftest.err'
14353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14354   (eval $ac_try) 2>&5
14355   ac_status=$?
14356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14357   (exit $ac_status); }; } &&
14358          { ac_try='test -s conftest.$ac_objext'
14359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14360   (eval $ac_try) 2>&5
14361   ac_status=$?
14362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14363   (exit $ac_status); }; }; then
14364   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
14365   ac_cv_c_bigendian=yes
14366 fi
14367 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14368   if test "$ac_cv_c_bigendian" = unknown; then
14369     ac_cv_c_bigendian=no
14370   else
14371     # finding both strings is unlikely to happen, but who knows?
14372     ac_cv_c_bigendian=unknown
14373   fi
14374 fi
14375 else
14376   echo "$as_me: failed program was:" >&5
14377 sed 's/^/| /' conftest.$ac_ext >&5
14378
14379 fi
14380 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14381 else
14382   cat >conftest.$ac_ext <<_ACEOF
14383 /* confdefs.h.  */
14384 _ACEOF
14385 cat confdefs.h >>conftest.$ac_ext
14386 cat >>conftest.$ac_ext <<_ACEOF
14387 /* end confdefs.h.  */
14388 int
14389 main ()
14390 {
14391   /* Are we little or big endian?  From Harbison&Steele.  */
14392   union
14393   {
14394     long l;
14395     char c[sizeof (long)];
14396   } u;
14397   u.l = 1;
14398   exit (u.c[sizeof (long) - 1] == 1);
14399 }
14400 _ACEOF
14401 rm -f conftest$ac_exeext
14402 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14403   (eval $ac_link) 2>&5
14404   ac_status=$?
14405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14406   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14408   (eval $ac_try) 2>&5
14409   ac_status=$?
14410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14411   (exit $ac_status); }; }; then
14412   ac_cv_c_bigendian=no
14413 else
14414   echo "$as_me: program exited with status $ac_status" >&5
14415 echo "$as_me: failed program was:" >&5
14416 sed 's/^/| /' conftest.$ac_ext >&5
14417
14418 ( exit $ac_status )
14419 ac_cv_c_bigendian=yes
14420 fi
14421 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14422 fi
14423 fi
14424 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14425 fi
14426 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
14427 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
14428 case $ac_cv_c_bigendian in
14429   yes)
14430
14431 cat >>confdefs.h <<\_ACEOF
14432 #define WORDS_BIGENDIAN 1
14433 _ACEOF
14434  ;;
14435   no)
14436      ;;
14437   *)
14438     { { echo "$as_me:$LINENO: error: unknown endianness
14439 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
14440 echo "$as_me: error: unknown endianness
14441 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
14442    { (exit 1); exit 1; }; } ;;
14443 esac
14444
14445
14446 # ------------------------------ #
14447 # Checks for library functions.  #
14448 # ------------------------------ #
14449
14450 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14451 # for constant arguments.  Useless!
14452 echo "$as_me:$LINENO: checking for working alloca.h" >&5
14453 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
14454 if test "${ac_cv_working_alloca_h+set}" = set; then
14455   echo $ECHO_N "(cached) $ECHO_C" >&6
14456 else
14457   cat >conftest.$ac_ext <<_ACEOF
14458 /* confdefs.h.  */
14459 _ACEOF
14460 cat confdefs.h >>conftest.$ac_ext
14461 cat >>conftest.$ac_ext <<_ACEOF
14462 /* end confdefs.h.  */
14463 #include <alloca.h>
14464 int
14465 main ()
14466 {
14467 char *p = (char *) alloca (2 * sizeof (int));
14468   ;
14469   return 0;
14470 }
14471 _ACEOF
14472 rm -f conftest.$ac_objext conftest$ac_exeext
14473 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14474   (eval $ac_link) 2>conftest.er1
14475   ac_status=$?
14476   grep -v '^ *+' conftest.er1 >conftest.err
14477   rm -f conftest.er1
14478   cat conftest.err >&5
14479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14480   (exit $ac_status); } &&
14481          { ac_try='test -z "$ac_c_werror_flag"
14482                          || test ! -s conftest.err'
14483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14484   (eval $ac_try) 2>&5
14485   ac_status=$?
14486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14487   (exit $ac_status); }; } &&
14488          { ac_try='test -s conftest$ac_exeext'
14489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14490   (eval $ac_try) 2>&5
14491   ac_status=$?
14492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14493   (exit $ac_status); }; }; then
14494   ac_cv_working_alloca_h=yes
14495 else
14496   echo "$as_me: failed program was:" >&5
14497 sed 's/^/| /' conftest.$ac_ext >&5
14498
14499 ac_cv_working_alloca_h=no
14500 fi
14501 rm -f conftest.err conftest.$ac_objext \
14502       conftest$ac_exeext conftest.$ac_ext
14503 fi
14504 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14505 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
14506 if test $ac_cv_working_alloca_h = yes; then
14507
14508 cat >>confdefs.h <<\_ACEOF
14509 #define HAVE_ALLOCA_H 1
14510 _ACEOF
14511
14512 fi
14513
14514 echo "$as_me:$LINENO: checking for alloca" >&5
14515 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
14516 if test "${ac_cv_func_alloca_works+set}" = set; then
14517   echo $ECHO_N "(cached) $ECHO_C" >&6
14518 else
14519   cat >conftest.$ac_ext <<_ACEOF
14520 /* confdefs.h.  */
14521 _ACEOF
14522 cat confdefs.h >>conftest.$ac_ext
14523 cat >>conftest.$ac_ext <<_ACEOF
14524 /* end confdefs.h.  */
14525 #ifdef __GNUC__
14526 # define alloca __builtin_alloca
14527 #else
14528 # ifdef _MSC_VER
14529 #  include <malloc.h>
14530 #  define alloca _alloca
14531 # else
14532 #  if HAVE_ALLOCA_H
14533 #   include <alloca.h>
14534 #  else
14535 #   ifdef _AIX
14536  #pragma alloca
14537 #   else
14538 #    ifndef alloca /* predefined by HP cc +Olibcalls */
14539 char *alloca ();
14540 #    endif
14541 #   endif
14542 #  endif
14543 # endif
14544 #endif
14545
14546 int
14547 main ()
14548 {
14549 char *p = (char *) alloca (1);
14550   ;
14551   return 0;
14552 }
14553 _ACEOF
14554 rm -f conftest.$ac_objext conftest$ac_exeext
14555 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14556   (eval $ac_link) 2>conftest.er1
14557   ac_status=$?
14558   grep -v '^ *+' conftest.er1 >conftest.err
14559   rm -f conftest.er1
14560   cat conftest.err >&5
14561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14562   (exit $ac_status); } &&
14563          { ac_try='test -z "$ac_c_werror_flag"
14564                          || test ! -s conftest.err'
14565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14566   (eval $ac_try) 2>&5
14567   ac_status=$?
14568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14569   (exit $ac_status); }; } &&
14570          { ac_try='test -s conftest$ac_exeext'
14571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14572   (eval $ac_try) 2>&5
14573   ac_status=$?
14574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14575   (exit $ac_status); }; }; then
14576   ac_cv_func_alloca_works=yes
14577 else
14578   echo "$as_me: failed program was:" >&5
14579 sed 's/^/| /' conftest.$ac_ext >&5
14580
14581 ac_cv_func_alloca_works=no
14582 fi
14583 rm -f conftest.err conftest.$ac_objext \
14584       conftest$ac_exeext conftest.$ac_ext
14585 fi
14586 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14587 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
14588
14589 if test $ac_cv_func_alloca_works = yes; then
14590
14591 cat >>confdefs.h <<\_ACEOF
14592 #define HAVE_ALLOCA 1
14593 _ACEOF
14594
14595 else
14596   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14597 # that cause trouble.  Some versions do not even contain alloca or
14598 # contain a buggy version.  If you still want to use their alloca,
14599 # use ar to extract alloca.o from them instead of compiling alloca.c.
14600
14601 ALLOCA=alloca.$ac_objext
14602
14603 cat >>confdefs.h <<\_ACEOF
14604 #define C_ALLOCA 1
14605 _ACEOF
14606
14607
14608 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14609 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
14610 if test "${ac_cv_os_cray+set}" = set; then
14611   echo $ECHO_N "(cached) $ECHO_C" >&6
14612 else
14613   cat >conftest.$ac_ext <<_ACEOF
14614 /* confdefs.h.  */
14615 _ACEOF
14616 cat confdefs.h >>conftest.$ac_ext
14617 cat >>conftest.$ac_ext <<_ACEOF
14618 /* end confdefs.h.  */
14619 #if defined(CRAY) && ! defined(CRAY2)
14620 webecray
14621 #else
14622 wenotbecray
14623 #endif
14624
14625 _ACEOF
14626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14627   $EGREP "webecray" >/dev/null 2>&1; then
14628   ac_cv_os_cray=yes
14629 else
14630   ac_cv_os_cray=no
14631 fi
14632 rm -f conftest*
14633
14634 fi
14635 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14636 echo "${ECHO_T}$ac_cv_os_cray" >&6
14637 if test $ac_cv_os_cray = yes; then
14638   for ac_func in _getb67 GETB67 getb67; do
14639     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14640 echo "$as_me:$LINENO: checking for $ac_func" >&5
14641 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14642 if eval "test \"\${$as_ac_var+set}\" = set"; then
14643   echo $ECHO_N "(cached) $ECHO_C" >&6
14644 else
14645   cat >conftest.$ac_ext <<_ACEOF
14646 /* confdefs.h.  */
14647 _ACEOF
14648 cat confdefs.h >>conftest.$ac_ext
14649 cat >>conftest.$ac_ext <<_ACEOF
14650 /* end confdefs.h.  */
14651 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14652    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14653 #define $ac_func innocuous_$ac_func
14654
14655 /* System header to define __stub macros and hopefully few prototypes,
14656     which can conflict with char $ac_func (); below.
14657     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14658     <limits.h> exists even on freestanding compilers.  */
14659
14660 #ifdef __STDC__
14661 # include <limits.h>
14662 #else
14663 # include <assert.h>
14664 #endif
14665
14666 #undef $ac_func
14667
14668 /* Override any gcc2 internal prototype to avoid an error.  */
14669 #ifdef __cplusplus
14670 extern "C"
14671 {
14672 #endif
14673 /* We use char because int might match the return type of a gcc2
14674    builtin and then its argument prototype would still apply.  */
14675 char $ac_func ();
14676 /* The GNU C library defines this for functions which it implements
14677     to always fail with ENOSYS.  Some functions are actually named
14678     something starting with __ and the normal name is an alias.  */
14679 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14680 choke me
14681 #else
14682 char (*f) () = $ac_func;
14683 #endif
14684 #ifdef __cplusplus
14685 }
14686 #endif
14687
14688 int
14689 main ()
14690 {
14691 return f != $ac_func;
14692   ;
14693   return 0;
14694 }
14695 _ACEOF
14696 rm -f conftest.$ac_objext conftest$ac_exeext
14697 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14698   (eval $ac_link) 2>conftest.er1
14699   ac_status=$?
14700   grep -v '^ *+' conftest.er1 >conftest.err
14701   rm -f conftest.er1
14702   cat conftest.err >&5
14703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14704   (exit $ac_status); } &&
14705          { ac_try='test -z "$ac_c_werror_flag"
14706                          || test ! -s conftest.err'
14707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14708   (eval $ac_try) 2>&5
14709   ac_status=$?
14710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14711   (exit $ac_status); }; } &&
14712          { ac_try='test -s conftest$ac_exeext'
14713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14714   (eval $ac_try) 2>&5
14715   ac_status=$?
14716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14717   (exit $ac_status); }; }; then
14718   eval "$as_ac_var=yes"
14719 else
14720   echo "$as_me: failed program was:" >&5
14721 sed 's/^/| /' conftest.$ac_ext >&5
14722
14723 eval "$as_ac_var=no"
14724 fi
14725 rm -f conftest.err conftest.$ac_objext \
14726       conftest$ac_exeext conftest.$ac_ext
14727 fi
14728 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14729 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14730 if test `eval echo '${'$as_ac_var'}'` = yes; then
14731
14732 cat >>confdefs.h <<_ACEOF
14733 #define CRAY_STACKSEG_END $ac_func
14734 _ACEOF
14735
14736     break
14737 fi
14738
14739   done
14740 fi
14741
14742 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14743 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
14744 if test "${ac_cv_c_stack_direction+set}" = set; then
14745   echo $ECHO_N "(cached) $ECHO_C" >&6
14746 else
14747   if test "$cross_compiling" = yes; then
14748   ac_cv_c_stack_direction=0
14749 else
14750   cat >conftest.$ac_ext <<_ACEOF
14751 /* confdefs.h.  */
14752 _ACEOF
14753 cat confdefs.h >>conftest.$ac_ext
14754 cat >>conftest.$ac_ext <<_ACEOF
14755 /* end confdefs.h.  */
14756 int
14757 find_stack_direction ()
14758 {
14759   static char *addr = 0;
14760   auto char dummy;
14761   if (addr == 0)
14762     {
14763       addr = &dummy;
14764       return find_stack_direction ();
14765     }
14766   else
14767     return (&dummy > addr) ? 1 : -1;
14768 }
14769
14770 int
14771 main ()
14772 {
14773   exit (find_stack_direction () < 0);
14774 }
14775 _ACEOF
14776 rm -f conftest$ac_exeext
14777 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14778   (eval $ac_link) 2>&5
14779   ac_status=$?
14780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14781   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14783   (eval $ac_try) 2>&5
14784   ac_status=$?
14785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14786   (exit $ac_status); }; }; then
14787   ac_cv_c_stack_direction=1
14788 else
14789   echo "$as_me: program exited with status $ac_status" >&5
14790 echo "$as_me: failed program was:" >&5
14791 sed 's/^/| /' conftest.$ac_ext >&5
14792
14793 ( exit $ac_status )
14794 ac_cv_c_stack_direction=-1
14795 fi
14796 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14797 fi
14798 fi
14799 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14800 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
14801
14802 cat >>confdefs.h <<_ACEOF
14803 #define STACK_DIRECTION $ac_cv_c_stack_direction
14804 _ACEOF
14805
14806
14807 fi
14808
14809
14810
14811 for ac_header in stdlib.h unistd.h
14812 do
14813 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14814 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14815   echo "$as_me:$LINENO: checking for $ac_header" >&5
14816 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14817 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14818   echo $ECHO_N "(cached) $ECHO_C" >&6
14819 fi
14820 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14821 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14822 else
14823   # Is the header compilable?
14824 echo "$as_me:$LINENO: checking $ac_header usability" >&5
14825 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14826 cat >conftest.$ac_ext <<_ACEOF
14827 /* confdefs.h.  */
14828 _ACEOF
14829 cat confdefs.h >>conftest.$ac_ext
14830 cat >>conftest.$ac_ext <<_ACEOF
14831 /* end confdefs.h.  */
14832 $ac_includes_default
14833 #include <$ac_header>
14834 _ACEOF
14835 rm -f conftest.$ac_objext
14836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14837   (eval $ac_compile) 2>conftest.er1
14838   ac_status=$?
14839   grep -v '^ *+' conftest.er1 >conftest.err
14840   rm -f conftest.er1
14841   cat conftest.err >&5
14842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14843   (exit $ac_status); } &&
14844          { ac_try='test -z "$ac_c_werror_flag"
14845                          || test ! -s conftest.err'
14846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14847   (eval $ac_try) 2>&5
14848   ac_status=$?
14849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14850   (exit $ac_status); }; } &&
14851          { ac_try='test -s conftest.$ac_objext'
14852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14853   (eval $ac_try) 2>&5
14854   ac_status=$?
14855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14856   (exit $ac_status); }; }; then
14857   ac_header_compiler=yes
14858 else
14859   echo "$as_me: failed program was:" >&5
14860 sed 's/^/| /' conftest.$ac_ext >&5
14861
14862 ac_header_compiler=no
14863 fi
14864 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14865 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14866 echo "${ECHO_T}$ac_header_compiler" >&6
14867
14868 # Is the header present?
14869 echo "$as_me:$LINENO: checking $ac_header presence" >&5
14870 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14871 cat >conftest.$ac_ext <<_ACEOF
14872 /* confdefs.h.  */
14873 _ACEOF
14874 cat confdefs.h >>conftest.$ac_ext
14875 cat >>conftest.$ac_ext <<_ACEOF
14876 /* end confdefs.h.  */
14877 #include <$ac_header>
14878 _ACEOF
14879 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14880   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14881   ac_status=$?
14882   grep -v '^ *+' conftest.er1 >conftest.err
14883   rm -f conftest.er1
14884   cat conftest.err >&5
14885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14886   (exit $ac_status); } >/dev/null; then
14887   if test -s conftest.err; then
14888     ac_cpp_err=$ac_c_preproc_warn_flag
14889     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14890   else
14891     ac_cpp_err=
14892   fi
14893 else
14894   ac_cpp_err=yes
14895 fi
14896 if test -z "$ac_cpp_err"; then
14897   ac_header_preproc=yes
14898 else
14899   echo "$as_me: failed program was:" >&5
14900 sed 's/^/| /' conftest.$ac_ext >&5
14901
14902   ac_header_preproc=no
14903 fi
14904 rm -f conftest.err conftest.$ac_ext
14905 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14906 echo "${ECHO_T}$ac_header_preproc" >&6
14907
14908 # So?  What about this header?
14909 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14910   yes:no: )
14911     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14912 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14913     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14914 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14915     ac_header_preproc=yes
14916     ;;
14917   no:yes:* )
14918     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14919 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14920     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14921 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14922     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14923 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14924     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14925 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14926     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14927 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14928     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14929 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14930     (
14931       cat <<\_ASBOX
14932 ## ------------------------------------------ ##
14933 ## Report this to the AC_PACKAGE_NAME lists.  ##
14934 ## ------------------------------------------ ##
14935 _ASBOX
14936     ) |
14937       sed "s/^/$as_me: WARNING:     /" >&2
14938     ;;
14939 esac
14940 echo "$as_me:$LINENO: checking for $ac_header" >&5
14941 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14942 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14943   echo $ECHO_N "(cached) $ECHO_C" >&6
14944 else
14945   eval "$as_ac_Header=\$ac_header_preproc"
14946 fi
14947 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14948 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14949
14950 fi
14951 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14952   cat >>confdefs.h <<_ACEOF
14953 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14954 _ACEOF
14955
14956 fi
14957
14958 done
14959
14960
14961 for ac_func in getpagesize
14962 do
14963 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14964 echo "$as_me:$LINENO: checking for $ac_func" >&5
14965 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14966 if eval "test \"\${$as_ac_var+set}\" = set"; then
14967   echo $ECHO_N "(cached) $ECHO_C" >&6
14968 else
14969   cat >conftest.$ac_ext <<_ACEOF
14970 /* confdefs.h.  */
14971 _ACEOF
14972 cat confdefs.h >>conftest.$ac_ext
14973 cat >>conftest.$ac_ext <<_ACEOF
14974 /* end confdefs.h.  */
14975 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14976    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14977 #define $ac_func innocuous_$ac_func
14978
14979 /* System header to define __stub macros and hopefully few prototypes,
14980     which can conflict with char $ac_func (); below.
14981     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14982     <limits.h> exists even on freestanding compilers.  */
14983
14984 #ifdef __STDC__
14985 # include <limits.h>
14986 #else
14987 # include <assert.h>
14988 #endif
14989
14990 #undef $ac_func
14991
14992 /* Override any gcc2 internal prototype to avoid an error.  */
14993 #ifdef __cplusplus
14994 extern "C"
14995 {
14996 #endif
14997 /* We use char because int might match the return type of a gcc2
14998    builtin and then its argument prototype would still apply.  */
14999 char $ac_func ();
15000 /* The GNU C library defines this for functions which it implements
15001     to always fail with ENOSYS.  Some functions are actually named
15002     something starting with __ and the normal name is an alias.  */
15003 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15004 choke me
15005 #else
15006 char (*f) () = $ac_func;
15007 #endif
15008 #ifdef __cplusplus
15009 }
15010 #endif
15011
15012 int
15013 main ()
15014 {
15015 return f != $ac_func;
15016   ;
15017   return 0;
15018 }
15019 _ACEOF
15020 rm -f conftest.$ac_objext conftest$ac_exeext
15021 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15022   (eval $ac_link) 2>conftest.er1
15023   ac_status=$?
15024   grep -v '^ *+' conftest.er1 >conftest.err
15025   rm -f conftest.er1
15026   cat conftest.err >&5
15027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15028   (exit $ac_status); } &&
15029          { ac_try='test -z "$ac_c_werror_flag"
15030                          || test ! -s conftest.err'
15031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15032   (eval $ac_try) 2>&5
15033   ac_status=$?
15034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15035   (exit $ac_status); }; } &&
15036          { ac_try='test -s conftest$ac_exeext'
15037   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15038   (eval $ac_try) 2>&5
15039   ac_status=$?
15040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15041   (exit $ac_status); }; }; then
15042   eval "$as_ac_var=yes"
15043 else
15044   echo "$as_me: failed program was:" >&5
15045 sed 's/^/| /' conftest.$ac_ext >&5
15046
15047 eval "$as_ac_var=no"
15048 fi
15049 rm -f conftest.err conftest.$ac_objext \
15050       conftest$ac_exeext conftest.$ac_ext
15051 fi
15052 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15053 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15054 if test `eval echo '${'$as_ac_var'}'` = yes; then
15055   cat >>confdefs.h <<_ACEOF
15056 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15057 _ACEOF
15058
15059 fi
15060 done
15061
15062 echo "$as_me:$LINENO: checking for working mmap" >&5
15063 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
15064 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
15065   echo $ECHO_N "(cached) $ECHO_C" >&6
15066 else
15067   if test "$cross_compiling" = yes; then
15068   ac_cv_func_mmap_fixed_mapped=no
15069 else
15070   cat >conftest.$ac_ext <<_ACEOF
15071 /* confdefs.h.  */
15072 _ACEOF
15073 cat confdefs.h >>conftest.$ac_ext
15074 cat >>conftest.$ac_ext <<_ACEOF
15075 /* end confdefs.h.  */
15076 $ac_includes_default
15077 /* malloc might have been renamed as rpl_malloc. */
15078 #undef malloc
15079
15080 /* Thanks to Mike Haertel and Jim Avera for this test.
15081    Here is a matrix of mmap possibilities:
15082         mmap private not fixed
15083         mmap private fixed at somewhere currently unmapped
15084         mmap private fixed at somewhere already mapped
15085         mmap shared not fixed
15086         mmap shared fixed at somewhere currently unmapped
15087         mmap shared fixed at somewhere already mapped
15088    For private mappings, we should verify that changes cannot be read()
15089    back from the file, nor mmap's back from the file at a different
15090    address.  (There have been systems where private was not correctly
15091    implemented like the infamous i386 svr4.0, and systems where the
15092    VM page cache was not coherent with the file system buffer cache
15093    like early versions of FreeBSD and possibly contemporary NetBSD.)
15094    For shared mappings, we should conversely verify that changes get
15095    propagated back to all the places they're supposed to be.
15096
15097    Grep wants private fixed already mapped.
15098    The main things grep needs to know about mmap are:
15099    * does it exist and is it safe to write into the mmap'd area
15100    * how to use it (BSD variants)  */
15101
15102 #include <fcntl.h>
15103 #include <sys/mman.h>
15104
15105 #if !STDC_HEADERS && !HAVE_STDLIB_H
15106 char *malloc ();
15107 #endif
15108
15109 /* This mess was copied from the GNU getpagesize.h.  */
15110 #if !HAVE_GETPAGESIZE
15111 /* Assume that all systems that can run configure have sys/param.h.  */
15112 # if !HAVE_SYS_PARAM_H
15113 #  define HAVE_SYS_PARAM_H 1
15114 # endif
15115
15116 # ifdef _SC_PAGESIZE
15117 #  define getpagesize() sysconf(_SC_PAGESIZE)
15118 # else /* no _SC_PAGESIZE */
15119 #  if HAVE_SYS_PARAM_H
15120 #   include <sys/param.h>
15121 #   ifdef EXEC_PAGESIZE
15122 #    define getpagesize() EXEC_PAGESIZE
15123 #   else /* no EXEC_PAGESIZE */
15124 #    ifdef NBPG
15125 #     define getpagesize() NBPG * CLSIZE
15126 #     ifndef CLSIZE
15127 #      define CLSIZE 1
15128 #     endif /* no CLSIZE */
15129 #    else /* no NBPG */
15130 #     ifdef NBPC
15131 #      define getpagesize() NBPC
15132 #     else /* no NBPC */
15133 #      ifdef PAGESIZE
15134 #       define getpagesize() PAGESIZE
15135 #      endif /* PAGESIZE */
15136 #     endif /* no NBPC */
15137 #    endif /* no NBPG */
15138 #   endif /* no EXEC_PAGESIZE */
15139 #  else /* no HAVE_SYS_PARAM_H */
15140 #   define getpagesize() 8192   /* punt totally */
15141 #  endif /* no HAVE_SYS_PARAM_H */
15142 # endif /* no _SC_PAGESIZE */
15143
15144 #endif /* no HAVE_GETPAGESIZE */
15145
15146 int
15147 main ()
15148 {
15149   char *data, *data2, *data3;
15150   int i, pagesize;
15151   int fd;
15152
15153   pagesize = getpagesize ();
15154
15155   /* First, make a file with some known garbage in it. */
15156   data = (char *) malloc (pagesize);
15157   if (!data)
15158     exit (1);
15159   for (i = 0; i < pagesize; ++i)
15160     *(data + i) = rand ();
15161   umask (0);
15162   fd = creat ("conftest.mmap", 0600);
15163   if (fd < 0)
15164     exit (1);
15165   if (write (fd, data, pagesize) != pagesize)
15166     exit (1);
15167   close (fd);
15168
15169   /* Next, try to mmap the file at a fixed address which already has
15170      something else allocated at it.  If we can, also make sure that
15171      we see the same garbage.  */
15172   fd = open ("conftest.mmap", O_RDWR);
15173   if (fd < 0)
15174     exit (1);
15175   data2 = (char *) malloc (2 * pagesize);
15176   if (!data2)
15177     exit (1);
15178   data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
15179   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
15180                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
15181     exit (1);
15182   for (i = 0; i < pagesize; ++i)
15183     if (*(data + i) != *(data2 + i))
15184       exit (1);
15185
15186   /* Finally, make sure that changes to the mapped area do not
15187      percolate back to the file as seen by read().  (This is a bug on
15188      some variants of i386 svr4.0.)  */
15189   for (i = 0; i < pagesize; ++i)
15190     *(data2 + i) = *(data2 + i) + 1;
15191   data3 = (char *) malloc (pagesize);
15192   if (!data3)
15193     exit (1);
15194   if (read (fd, data3, pagesize) != pagesize)
15195     exit (1);
15196   for (i = 0; i < pagesize; ++i)
15197     if (*(data + i) != *(data3 + i))
15198       exit (1);
15199   close (fd);
15200   exit (0);
15201 }
15202 _ACEOF
15203 rm -f conftest$ac_exeext
15204 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15205   (eval $ac_link) 2>&5
15206   ac_status=$?
15207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15208   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15210   (eval $ac_try) 2>&5
15211   ac_status=$?
15212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15213   (exit $ac_status); }; }; then
15214   ac_cv_func_mmap_fixed_mapped=yes
15215 else
15216   echo "$as_me: program exited with status $ac_status" >&5
15217 echo "$as_me: failed program was:" >&5
15218 sed 's/^/| /' conftest.$ac_ext >&5
15219
15220 ( exit $ac_status )
15221 ac_cv_func_mmap_fixed_mapped=no
15222 fi
15223 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15224 fi
15225 fi
15226 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
15227 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
15228 if test $ac_cv_func_mmap_fixed_mapped = yes; then
15229
15230 cat >>confdefs.h <<\_ACEOF
15231 #define HAVE_MMAP 1
15232 _ACEOF
15233
15234 fi
15235 rm -f conftest.mmap
15236
15237 echo "$as_me:$LINENO: checking for pid_t" >&5
15238 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15239 if test "${ac_cv_type_pid_t+set}" = set; then
15240   echo $ECHO_N "(cached) $ECHO_C" >&6
15241 else
15242   cat >conftest.$ac_ext <<_ACEOF
15243 /* confdefs.h.  */
15244 _ACEOF
15245 cat confdefs.h >>conftest.$ac_ext
15246 cat >>conftest.$ac_ext <<_ACEOF
15247 /* end confdefs.h.  */
15248 $ac_includes_default
15249 int
15250 main ()
15251 {
15252 if ((pid_t *) 0)
15253   return 0;
15254 if (sizeof (pid_t))
15255   return 0;
15256   ;
15257   return 0;
15258 }
15259 _ACEOF
15260 rm -f conftest.$ac_objext
15261 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15262   (eval $ac_compile) 2>conftest.er1
15263   ac_status=$?
15264   grep -v '^ *+' conftest.er1 >conftest.err
15265   rm -f conftest.er1
15266   cat conftest.err >&5
15267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15268   (exit $ac_status); } &&
15269          { ac_try='test -z "$ac_c_werror_flag"
15270                          || test ! -s conftest.err'
15271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15272   (eval $ac_try) 2>&5
15273   ac_status=$?
15274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15275   (exit $ac_status); }; } &&
15276          { ac_try='test -s conftest.$ac_objext'
15277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15278   (eval $ac_try) 2>&5
15279   ac_status=$?
15280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15281   (exit $ac_status); }; }; then
15282   ac_cv_type_pid_t=yes
15283 else
15284   echo "$as_me: failed program was:" >&5
15285 sed 's/^/| /' conftest.$ac_ext >&5
15286
15287 ac_cv_type_pid_t=no
15288 fi
15289 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15290 fi
15291 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
15292 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15293 if test $ac_cv_type_pid_t = yes; then
15294   :
15295 else
15296
15297 cat >>confdefs.h <<_ACEOF
15298 #define pid_t int
15299 _ACEOF
15300
15301 fi
15302
15303
15304
15305 for ac_header in unistd.h vfork.h
15306 do
15307 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15308 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15309   echo "$as_me:$LINENO: checking for $ac_header" >&5
15310 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15311 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15312   echo $ECHO_N "(cached) $ECHO_C" >&6
15313 fi
15314 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15315 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15316 else
15317   # Is the header compilable?
15318 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15319 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15320 cat >conftest.$ac_ext <<_ACEOF
15321 /* confdefs.h.  */
15322 _ACEOF
15323 cat confdefs.h >>conftest.$ac_ext
15324 cat >>conftest.$ac_ext <<_ACEOF
15325 /* end confdefs.h.  */
15326 $ac_includes_default
15327 #include <$ac_header>
15328 _ACEOF
15329 rm -f conftest.$ac_objext
15330 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15331   (eval $ac_compile) 2>conftest.er1
15332   ac_status=$?
15333   grep -v '^ *+' conftest.er1 >conftest.err
15334   rm -f conftest.er1
15335   cat conftest.err >&5
15336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15337   (exit $ac_status); } &&
15338          { ac_try='test -z "$ac_c_werror_flag"
15339                          || test ! -s conftest.err'
15340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15341   (eval $ac_try) 2>&5
15342   ac_status=$?
15343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15344   (exit $ac_status); }; } &&
15345          { ac_try='test -s conftest.$ac_objext'
15346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15347   (eval $ac_try) 2>&5
15348   ac_status=$?
15349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15350   (exit $ac_status); }; }; then
15351   ac_header_compiler=yes
15352 else
15353   echo "$as_me: failed program was:" >&5
15354 sed 's/^/| /' conftest.$ac_ext >&5
15355
15356 ac_header_compiler=no
15357 fi
15358 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15359 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15360 echo "${ECHO_T}$ac_header_compiler" >&6
15361
15362 # Is the header present?
15363 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15364 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15365 cat >conftest.$ac_ext <<_ACEOF
15366 /* confdefs.h.  */
15367 _ACEOF
15368 cat confdefs.h >>conftest.$ac_ext
15369 cat >>conftest.$ac_ext <<_ACEOF
15370 /* end confdefs.h.  */
15371 #include <$ac_header>
15372 _ACEOF
15373 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15374   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15375   ac_status=$?
15376   grep -v '^ *+' conftest.er1 >conftest.err
15377   rm -f conftest.er1
15378   cat conftest.err >&5
15379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15380   (exit $ac_status); } >/dev/null; then
15381   if test -s conftest.err; then
15382     ac_cpp_err=$ac_c_preproc_warn_flag
15383     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15384   else
15385     ac_cpp_err=
15386   fi
15387 else
15388   ac_cpp_err=yes
15389 fi
15390 if test -z "$ac_cpp_err"; then
15391   ac_header_preproc=yes
15392 else
15393   echo "$as_me: failed program was:" >&5
15394 sed 's/^/| /' conftest.$ac_ext >&5
15395
15396   ac_header_preproc=no
15397 fi
15398 rm -f conftest.err conftest.$ac_ext
15399 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15400 echo "${ECHO_T}$ac_header_preproc" >&6
15401
15402 # So?  What about this header?
15403 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15404   yes:no: )
15405     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15406 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15407     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15408 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15409     ac_header_preproc=yes
15410     ;;
15411   no:yes:* )
15412     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15413 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15414     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15415 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15416     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15417 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15418     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15419 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15420     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15421 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15422     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15423 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15424     (
15425       cat <<\_ASBOX
15426 ## ------------------------------------------ ##
15427 ## Report this to the AC_PACKAGE_NAME lists.  ##
15428 ## ------------------------------------------ ##
15429 _ASBOX
15430     ) |
15431       sed "s/^/$as_me: WARNING:     /" >&2
15432     ;;
15433 esac
15434 echo "$as_me:$LINENO: checking for $ac_header" >&5
15435 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15436 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15437   echo $ECHO_N "(cached) $ECHO_C" >&6
15438 else
15439   eval "$as_ac_Header=\$ac_header_preproc"
15440 fi
15441 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15442 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15443
15444 fi
15445 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15446   cat >>confdefs.h <<_ACEOF
15447 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15448 _ACEOF
15449
15450 fi
15451
15452 done
15453
15454
15455
15456 for ac_func in fork vfork
15457 do
15458 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15459 echo "$as_me:$LINENO: checking for $ac_func" >&5
15460 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15461 if eval "test \"\${$as_ac_var+set}\" = set"; then
15462   echo $ECHO_N "(cached) $ECHO_C" >&6
15463 else
15464   cat >conftest.$ac_ext <<_ACEOF
15465 /* confdefs.h.  */
15466 _ACEOF
15467 cat confdefs.h >>conftest.$ac_ext
15468 cat >>conftest.$ac_ext <<_ACEOF
15469 /* end confdefs.h.  */
15470 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15471    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15472 #define $ac_func innocuous_$ac_func
15473
15474 /* System header to define __stub macros and hopefully few prototypes,
15475     which can conflict with char $ac_func (); below.
15476     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15477     <limits.h> exists even on freestanding compilers.  */
15478
15479 #ifdef __STDC__
15480 # include <limits.h>
15481 #else
15482 # include <assert.h>
15483 #endif
15484
15485 #undef $ac_func
15486
15487 /* Override any gcc2 internal prototype to avoid an error.  */
15488 #ifdef __cplusplus
15489 extern "C"
15490 {
15491 #endif
15492 /* We use char because int might match the return type of a gcc2
15493    builtin and then its argument prototype would still apply.  */
15494 char $ac_func ();
15495 /* The GNU C library defines this for functions which it implements
15496     to always fail with ENOSYS.  Some functions are actually named
15497     something starting with __ and the normal name is an alias.  */
15498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15499 choke me
15500 #else
15501 char (*f) () = $ac_func;
15502 #endif
15503 #ifdef __cplusplus
15504 }
15505 #endif
15506
15507 int
15508 main ()
15509 {
15510 return f != $ac_func;
15511   ;
15512   return 0;
15513 }
15514 _ACEOF
15515 rm -f conftest.$ac_objext conftest$ac_exeext
15516 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15517   (eval $ac_link) 2>conftest.er1
15518   ac_status=$?
15519   grep -v '^ *+' conftest.er1 >conftest.err
15520   rm -f conftest.er1
15521   cat conftest.err >&5
15522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15523   (exit $ac_status); } &&
15524          { ac_try='test -z "$ac_c_werror_flag"
15525                          || test ! -s conftest.err'
15526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15527   (eval $ac_try) 2>&5
15528   ac_status=$?
15529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15530   (exit $ac_status); }; } &&
15531          { ac_try='test -s conftest$ac_exeext'
15532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15533   (eval $ac_try) 2>&5
15534   ac_status=$?
15535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15536   (exit $ac_status); }; }; then
15537   eval "$as_ac_var=yes"
15538 else
15539   echo "$as_me: failed program was:" >&5
15540 sed 's/^/| /' conftest.$ac_ext >&5
15541
15542 eval "$as_ac_var=no"
15543 fi
15544 rm -f conftest.err conftest.$ac_objext \
15545       conftest$ac_exeext conftest.$ac_ext
15546 fi
15547 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15548 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15549 if test `eval echo '${'$as_ac_var'}'` = yes; then
15550   cat >>confdefs.h <<_ACEOF
15551 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15552 _ACEOF
15553
15554 fi
15555 done
15556
15557 if test "x$ac_cv_func_fork" = xyes; then
15558   echo "$as_me:$LINENO: checking for working fork" >&5
15559 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15560 if test "${ac_cv_func_fork_works+set}" = set; then
15561   echo $ECHO_N "(cached) $ECHO_C" >&6
15562 else
15563   if test "$cross_compiling" = yes; then
15564   ac_cv_func_fork_works=cross
15565 else
15566   cat >conftest.$ac_ext <<_ACEOF
15567 /* By Ruediger Kuhlmann. */
15568       #include <sys/types.h>
15569       #if HAVE_UNISTD_H
15570       # include <unistd.h>
15571       #endif
15572       /* Some systems only have a dummy stub for fork() */
15573       int main ()
15574       {
15575         if (fork() < 0)
15576           exit (1);
15577         exit (0);
15578       }
15579 _ACEOF
15580 rm -f conftest$ac_exeext
15581 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15582   (eval $ac_link) 2>&5
15583   ac_status=$?
15584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15585   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15587   (eval $ac_try) 2>&5
15588   ac_status=$?
15589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15590   (exit $ac_status); }; }; then
15591   ac_cv_func_fork_works=yes
15592 else
15593   echo "$as_me: program exited with status $ac_status" >&5
15594 echo "$as_me: failed program was:" >&5
15595 sed 's/^/| /' conftest.$ac_ext >&5
15596
15597 ( exit $ac_status )
15598 ac_cv_func_fork_works=no
15599 fi
15600 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15601 fi
15602 fi
15603 echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
15604 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15605
15606 else
15607   ac_cv_func_fork_works=$ac_cv_func_fork
15608 fi
15609 if test "x$ac_cv_func_fork_works" = xcross; then
15610   case $host in
15611     *-*-amigaos* | *-*-msdosdjgpp*)
15612       # Override, as these systems have only a dummy fork() stub
15613       ac_cv_func_fork_works=no
15614       ;;
15615     *)
15616       ac_cv_func_fork_works=yes
15617       ;;
15618   esac
15619   { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15620 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15621 fi
15622 ac_cv_func_vfork_works=$ac_cv_func_vfork
15623 if test "x$ac_cv_func_vfork" = xyes; then
15624   echo "$as_me:$LINENO: checking for working vfork" >&5
15625 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15626 if test "${ac_cv_func_vfork_works+set}" = set; then
15627   echo $ECHO_N "(cached) $ECHO_C" >&6
15628 else
15629   if test "$cross_compiling" = yes; then
15630   ac_cv_func_vfork_works=cross
15631 else
15632   cat >conftest.$ac_ext <<_ACEOF
15633 /* confdefs.h.  */
15634 _ACEOF
15635 cat confdefs.h >>conftest.$ac_ext
15636 cat >>conftest.$ac_ext <<_ACEOF
15637 /* end confdefs.h.  */
15638 /* Thanks to Paul Eggert for this test.  */
15639 #include <stdio.h>
15640 #include <stdlib.h>
15641 #include <sys/types.h>
15642 #include <sys/stat.h>
15643 #include <sys/wait.h>
15644 #if HAVE_UNISTD_H
15645 # include <unistd.h>
15646 #endif
15647 #if HAVE_VFORK_H
15648 # include <vfork.h>
15649 #endif
15650 /* On some sparc systems, changes by the child to local and incoming
15651    argument registers are propagated back to the parent.  The compiler
15652    is told about this with #include <vfork.h>, but some compilers
15653    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15654    static variable whose address is put into a register that is
15655    clobbered by the vfork.  */
15656 static void
15657 #ifdef __cplusplus
15658 sparc_address_test (int arg)
15659 # else
15660 sparc_address_test (arg) int arg;
15661 #endif
15662 {
15663   static pid_t child;
15664   if (!child) {
15665     child = vfork ();
15666     if (child < 0) {
15667       perror ("vfork");
15668       _exit(2);
15669     }
15670     if (!child) {
15671       arg = getpid();
15672       write(-1, "", 0);
15673       _exit (arg);
15674     }
15675   }
15676 }
15677
15678 int
15679 main ()
15680 {
15681   pid_t parent = getpid ();
15682   pid_t child;
15683
15684   sparc_address_test (0);
15685
15686   child = vfork ();
15687
15688   if (child == 0) {
15689     /* Here is another test for sparc vfork register problems.  This
15690        test uses lots of local variables, at least as many local
15691        variables as main has allocated so far including compiler
15692        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15693        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15694        reuse the register of parent for one of the local variables,
15695        since it will think that parent can't possibly be used any more
15696        in this routine.  Assigning to the local variable will thus
15697        munge parent in the parent process.  */
15698     pid_t
15699       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15700       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15701     /* Convince the compiler that p..p7 are live; otherwise, it might
15702        use the same hardware register for all 8 local variables.  */
15703     if (p != p1 || p != p2 || p != p3 || p != p4
15704         || p != p5 || p != p6 || p != p7)
15705       _exit(1);
15706
15707     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15708        from child file descriptors.  If the child closes a descriptor
15709        before it execs or exits, this munges the parent's descriptor
15710        as well.  Test for this by closing stdout in the child.  */
15711     _exit(close(fileno(stdout)) != 0);
15712   } else {
15713     int status;
15714     struct stat st;
15715
15716     while (wait(&status) != child)
15717       ;
15718     exit(
15719          /* Was there some problem with vforking?  */
15720          child < 0
15721
15722          /* Did the child fail?  (This shouldn't happen.)  */
15723          || status
15724
15725          /* Did the vfork/compiler bug occur?  */
15726          || parent != getpid()
15727
15728          /* Did the file descriptor bug occur?  */
15729          || fstat(fileno(stdout), &st) != 0
15730          );
15731   }
15732 }
15733 _ACEOF
15734 rm -f conftest$ac_exeext
15735 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15736   (eval $ac_link) 2>&5
15737   ac_status=$?
15738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15739   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15741   (eval $ac_try) 2>&5
15742   ac_status=$?
15743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15744   (exit $ac_status); }; }; then
15745   ac_cv_func_vfork_works=yes
15746 else
15747   echo "$as_me: program exited with status $ac_status" >&5
15748 echo "$as_me: failed program was:" >&5
15749 sed 's/^/| /' conftest.$ac_ext >&5
15750
15751 ( exit $ac_status )
15752 ac_cv_func_vfork_works=no
15753 fi
15754 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15755 fi
15756 fi
15757 echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
15758 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15759
15760 fi;
15761 if test "x$ac_cv_func_fork_works" = xcross; then
15762   ac_cv_func_vfork_works=$ac_cv_func_vfork
15763   { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15764 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15765 fi
15766
15767 if test "x$ac_cv_func_vfork_works" = xyes; then
15768
15769 cat >>confdefs.h <<\_ACEOF
15770 #define HAVE_WORKING_VFORK 1
15771 _ACEOF
15772
15773 else
15774
15775 cat >>confdefs.h <<\_ACEOF
15776 #define vfork fork
15777 _ACEOF
15778
15779 fi
15780 if test "x$ac_cv_func_fork_works" = xyes; then
15781
15782 cat >>confdefs.h <<\_ACEOF
15783 #define HAVE_WORKING_FORK 1
15784 _ACEOF
15785
15786 fi
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810 for ac_func in canonicalize_file_name realpath getrusage getuid \
15811                 getgid poll pread64 sbrk setpgid setpgrp setsid \
15812                 sigaction sigprocmask sigsetmask socketpair syscall \
15813                 ttrace wborder setlocale iconvlist libiconvlist btowc
15814 do
15815 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15816 echo "$as_me:$LINENO: checking for $ac_func" >&5
15817 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15818 if eval "test \"\${$as_ac_var+set}\" = set"; then
15819   echo $ECHO_N "(cached) $ECHO_C" >&6
15820 else
15821   cat >conftest.$ac_ext <<_ACEOF
15822 /* confdefs.h.  */
15823 _ACEOF
15824 cat confdefs.h >>conftest.$ac_ext
15825 cat >>conftest.$ac_ext <<_ACEOF
15826 /* end confdefs.h.  */
15827 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15828    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15829 #define $ac_func innocuous_$ac_func
15830
15831 /* System header to define __stub macros and hopefully few prototypes,
15832     which can conflict with char $ac_func (); below.
15833     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15834     <limits.h> exists even on freestanding compilers.  */
15835
15836 #ifdef __STDC__
15837 # include <limits.h>
15838 #else
15839 # include <assert.h>
15840 #endif
15841
15842 #undef $ac_func
15843
15844 /* Override any gcc2 internal prototype to avoid an error.  */
15845 #ifdef __cplusplus
15846 extern "C"
15847 {
15848 #endif
15849 /* We use char because int might match the return type of a gcc2
15850    builtin and then its argument prototype would still apply.  */
15851 char $ac_func ();
15852 /* The GNU C library defines this for functions which it implements
15853     to always fail with ENOSYS.  Some functions are actually named
15854     something starting with __ and the normal name is an alias.  */
15855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15856 choke me
15857 #else
15858 char (*f) () = $ac_func;
15859 #endif
15860 #ifdef __cplusplus
15861 }
15862 #endif
15863
15864 int
15865 main ()
15866 {
15867 return f != $ac_func;
15868   ;
15869   return 0;
15870 }
15871 _ACEOF
15872 rm -f conftest.$ac_objext conftest$ac_exeext
15873 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15874   (eval $ac_link) 2>conftest.er1
15875   ac_status=$?
15876   grep -v '^ *+' conftest.er1 >conftest.err
15877   rm -f conftest.er1
15878   cat conftest.err >&5
15879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15880   (exit $ac_status); } &&
15881          { ac_try='test -z "$ac_c_werror_flag"
15882                          || test ! -s conftest.err'
15883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15884   (eval $ac_try) 2>&5
15885   ac_status=$?
15886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15887   (exit $ac_status); }; } &&
15888          { ac_try='test -s conftest$ac_exeext'
15889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15890   (eval $ac_try) 2>&5
15891   ac_status=$?
15892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15893   (exit $ac_status); }; }; then
15894   eval "$as_ac_var=yes"
15895 else
15896   echo "$as_me: failed program was:" >&5
15897 sed 's/^/| /' conftest.$ac_ext >&5
15898
15899 eval "$as_ac_var=no"
15900 fi
15901 rm -f conftest.err conftest.$ac_objext \
15902       conftest$ac_exeext conftest.$ac_ext
15903 fi
15904 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15905 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15906 if test `eval echo '${'$as_ac_var'}'` = yes; then
15907   cat >>confdefs.h <<_ACEOF
15908 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15909 _ACEOF
15910
15911 fi
15912 done
15913
15914
15915   echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
15916 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
15917 if test "${am_cv_langinfo_codeset+set}" = set; then
15918   echo $ECHO_N "(cached) $ECHO_C" >&6
15919 else
15920   cat >conftest.$ac_ext <<_ACEOF
15921 /* confdefs.h.  */
15922 _ACEOF
15923 cat confdefs.h >>conftest.$ac_ext
15924 cat >>conftest.$ac_ext <<_ACEOF
15925 /* end confdefs.h.  */
15926 #include <langinfo.h>
15927 int
15928 main ()
15929 {
15930 char* cs = nl_langinfo(CODESET);
15931   ;
15932   return 0;
15933 }
15934 _ACEOF
15935 rm -f conftest.$ac_objext conftest$ac_exeext
15936 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15937   (eval $ac_link) 2>conftest.er1
15938   ac_status=$?
15939   grep -v '^ *+' conftest.er1 >conftest.err
15940   rm -f conftest.er1
15941   cat conftest.err >&5
15942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15943   (exit $ac_status); } &&
15944          { ac_try='test -z "$ac_c_werror_flag"
15945                          || test ! -s conftest.err'
15946   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15947   (eval $ac_try) 2>&5
15948   ac_status=$?
15949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15950   (exit $ac_status); }; } &&
15951          { ac_try='test -s conftest$ac_exeext'
15952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15953   (eval $ac_try) 2>&5
15954   ac_status=$?
15955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15956   (exit $ac_status); }; }; then
15957   am_cv_langinfo_codeset=yes
15958 else
15959   echo "$as_me: failed program was:" >&5
15960 sed 's/^/| /' conftest.$ac_ext >&5
15961
15962 am_cv_langinfo_codeset=no
15963 fi
15964 rm -f conftest.err conftest.$ac_objext \
15965       conftest$ac_exeext conftest.$ac_ext
15966
15967 fi
15968 echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
15969 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
15970   if test $am_cv_langinfo_codeset = yes; then
15971
15972 cat >>confdefs.h <<\_ACEOF
15973 #define HAVE_LANGINFO_CODESET 1
15974 _ACEOF
15975
15976   fi
15977
15978
15979 # Check the return and argument types of ptrace.  No canned test for
15980 # this, so roll our own.
15981 gdb_ptrace_headers='
15982 #if HAVE_SYS_TYPES_H
15983 # include <sys/types.h>
15984 #endif
15985 #if HAVE_SYS_PTRACE_H
15986 # include <sys/ptrace.h>
15987 #endif
15988 #if HAVE_UNISTD_H
15989 # include <unistd.h>
15990 #endif
15991 '
15992 # There is no point in checking if we don't have a prototype.
15993 echo "$as_me:$LINENO: checking whether ptrace is declared" >&5
15994 echo $ECHO_N "checking whether ptrace is declared... $ECHO_C" >&6
15995 if test "${ac_cv_have_decl_ptrace+set}" = set; then
15996   echo $ECHO_N "(cached) $ECHO_C" >&6
15997 else
15998   cat >conftest.$ac_ext <<_ACEOF
15999 /* confdefs.h.  */
16000 _ACEOF
16001 cat confdefs.h >>conftest.$ac_ext
16002 cat >>conftest.$ac_ext <<_ACEOF
16003 /* end confdefs.h.  */
16004 $gdb_ptrace_headers
16005
16006 int
16007 main ()
16008 {
16009 #ifndef ptrace
16010   char *p = (char *) ptrace;
16011 #endif
16012
16013   ;
16014   return 0;
16015 }
16016 _ACEOF
16017 rm -f conftest.$ac_objext
16018 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16019   (eval $ac_compile) 2>conftest.er1
16020   ac_status=$?
16021   grep -v '^ *+' conftest.er1 >conftest.err
16022   rm -f conftest.er1
16023   cat conftest.err >&5
16024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16025   (exit $ac_status); } &&
16026          { ac_try='test -z "$ac_c_werror_flag"
16027                          || test ! -s conftest.err'
16028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16029   (eval $ac_try) 2>&5
16030   ac_status=$?
16031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16032   (exit $ac_status); }; } &&
16033          { ac_try='test -s conftest.$ac_objext'
16034   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16035   (eval $ac_try) 2>&5
16036   ac_status=$?
16037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16038   (exit $ac_status); }; }; then
16039   ac_cv_have_decl_ptrace=yes
16040 else
16041   echo "$as_me: failed program was:" >&5
16042 sed 's/^/| /' conftest.$ac_ext >&5
16043
16044 ac_cv_have_decl_ptrace=no
16045 fi
16046 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16047 fi
16048 echo "$as_me:$LINENO: result: $ac_cv_have_decl_ptrace" >&5
16049 echo "${ECHO_T}$ac_cv_have_decl_ptrace" >&6
16050 if test $ac_cv_have_decl_ptrace = yes; then
16051
16052 cat >>confdefs.h <<_ACEOF
16053 #define HAVE_DECL_PTRACE 1
16054 _ACEOF
16055
16056
16057 else
16058   cat >>confdefs.h <<_ACEOF
16059 #define HAVE_DECL_PTRACE 0
16060 _ACEOF
16061
16062
16063   : ${gdb_cv_func_ptrace_ret='int'}
16064   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
16065
16066 fi
16067
16068
16069 # Check return type.  Varargs (used on GNU/Linux) conflict with the
16070 # empty argument list, so check for that explicitly.
16071 echo "$as_me:$LINENO: checking return type of ptrace" >&5
16072 echo $ECHO_N "checking return type of ptrace... $ECHO_C" >&6
16073 if test "${gdb_cv_func_ptrace_ret+set}" = set; then
16074   echo $ECHO_N "(cached) $ECHO_C" >&6
16075 else
16076   cat >conftest.$ac_ext <<_ACEOF
16077 /* confdefs.h.  */
16078 _ACEOF
16079 cat confdefs.h >>conftest.$ac_ext
16080 cat >>conftest.$ac_ext <<_ACEOF
16081 /* end confdefs.h.  */
16082 $gdb_ptrace_headers
16083 int
16084 main ()
16085 {
16086 extern long ptrace (enum __ptrace_request, ...);
16087   ;
16088   return 0;
16089 }
16090 _ACEOF
16091 rm -f conftest.$ac_objext
16092 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16093   (eval $ac_compile) 2>conftest.er1
16094   ac_status=$?
16095   grep -v '^ *+' conftest.er1 >conftest.err
16096   rm -f conftest.er1
16097   cat conftest.err >&5
16098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16099   (exit $ac_status); } &&
16100          { ac_try='test -z "$ac_c_werror_flag"
16101                          || test ! -s conftest.err'
16102   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16103   (eval $ac_try) 2>&5
16104   ac_status=$?
16105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16106   (exit $ac_status); }; } &&
16107          { ac_try='test -s conftest.$ac_objext'
16108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16109   (eval $ac_try) 2>&5
16110   ac_status=$?
16111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16112   (exit $ac_status); }; }; then
16113   gdb_cv_func_ptrace_ret='long'
16114 else
16115   echo "$as_me: failed program was:" >&5
16116 sed 's/^/| /' conftest.$ac_ext >&5
16117
16118 cat >conftest.$ac_ext <<_ACEOF
16119 /* confdefs.h.  */
16120 _ACEOF
16121 cat confdefs.h >>conftest.$ac_ext
16122 cat >>conftest.$ac_ext <<_ACEOF
16123 /* end confdefs.h.  */
16124 $gdb_ptrace_headers
16125 int
16126 main ()
16127 {
16128 extern int ptrace ();
16129   ;
16130   return 0;
16131 }
16132 _ACEOF
16133 rm -f conftest.$ac_objext
16134 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16135   (eval $ac_compile) 2>conftest.er1
16136   ac_status=$?
16137   grep -v '^ *+' conftest.er1 >conftest.err
16138   rm -f conftest.er1
16139   cat conftest.err >&5
16140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16141   (exit $ac_status); } &&
16142          { ac_try='test -z "$ac_c_werror_flag"
16143                          || test ! -s conftest.err'
16144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16145   (eval $ac_try) 2>&5
16146   ac_status=$?
16147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16148   (exit $ac_status); }; } &&
16149          { ac_try='test -s conftest.$ac_objext'
16150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16151   (eval $ac_try) 2>&5
16152   ac_status=$?
16153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16154   (exit $ac_status); }; }; then
16155   gdb_cv_func_ptrace_ret='int'
16156 else
16157   echo "$as_me: failed program was:" >&5
16158 sed 's/^/| /' conftest.$ac_ext >&5
16159
16160 gdb_cv_func_ptrace_ret='long'
16161 fi
16162 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16163 fi
16164 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16165 fi
16166 echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_ret" >&5
16167 echo "${ECHO_T}$gdb_cv_func_ptrace_ret" >&6
16168
16169 cat >>confdefs.h <<_ACEOF
16170 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
16171 _ACEOF
16172
16173 # Check argument types.
16174 echo "$as_me:$LINENO: checking types of arguments for ptrace" >&5
16175 echo $ECHO_N "checking types of arguments for ptrace... $ECHO_C" >&6
16176 if test "${gdb_cv_func_ptrace_args+set}" = set; then
16177   echo $ECHO_N "(cached) $ECHO_C" >&6
16178 else
16179
16180   cat >conftest.$ac_ext <<_ACEOF
16181 /* confdefs.h.  */
16182 _ACEOF
16183 cat confdefs.h >>conftest.$ac_ext
16184 cat >>conftest.$ac_ext <<_ACEOF
16185 /* end confdefs.h.  */
16186 $gdb_ptrace_headers
16187 int
16188 main ()
16189 {
16190 extern long ptrace (enum __ptrace_request, ...);
16191   ;
16192   return 0;
16193 }
16194 _ACEOF
16195 rm -f conftest.$ac_objext
16196 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16197   (eval $ac_compile) 2>conftest.er1
16198   ac_status=$?
16199   grep -v '^ *+' conftest.er1 >conftest.err
16200   rm -f conftest.er1
16201   cat conftest.err >&5
16202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16203   (exit $ac_status); } &&
16204          { ac_try='test -z "$ac_c_werror_flag"
16205                          || test ! -s conftest.err'
16206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16207   (eval $ac_try) 2>&5
16208   ac_status=$?
16209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210   (exit $ac_status); }; } &&
16211          { ac_try='test -s conftest.$ac_objext'
16212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16213   (eval $ac_try) 2>&5
16214   ac_status=$?
16215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16216   (exit $ac_status); }; }; then
16217   gdb_cv_func_ptrace_args='int,int,long,long'
16218 else
16219   echo "$as_me: failed program was:" >&5
16220 sed 's/^/| /' conftest.$ac_ext >&5
16221
16222
16223 for gdb_arg1 in 'int' 'long'; do
16224  for gdb_arg2 in 'pid_t' 'int' 'long'; do
16225   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
16226    for gdb_arg4 in 'int' 'long'; do
16227      cat >conftest.$ac_ext <<_ACEOF
16228 /* confdefs.h.  */
16229 _ACEOF
16230 cat confdefs.h >>conftest.$ac_ext
16231 cat >>conftest.$ac_ext <<_ACEOF
16232 /* end confdefs.h.  */
16233 $gdb_ptrace_headers
16234 int
16235 main ()
16236 {
16237
16238 extern $gdb_cv_func_ptrace_ret
16239   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
16240
16241   ;
16242   return 0;
16243 }
16244 _ACEOF
16245 rm -f conftest.$ac_objext
16246 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16247   (eval $ac_compile) 2>conftest.er1
16248   ac_status=$?
16249   grep -v '^ *+' conftest.er1 >conftest.err
16250   rm -f conftest.er1
16251   cat conftest.err >&5
16252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16253   (exit $ac_status); } &&
16254          { ac_try='test -z "$ac_c_werror_flag"
16255                          || test ! -s conftest.err'
16256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16257   (eval $ac_try) 2>&5
16258   ac_status=$?
16259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16260   (exit $ac_status); }; } &&
16261          { ac_try='test -s conftest.$ac_objext'
16262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16263   (eval $ac_try) 2>&5
16264   ac_status=$?
16265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16266   (exit $ac_status); }; }; then
16267   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
16268     break 4;
16269 else
16270   echo "$as_me: failed program was:" >&5
16271 sed 's/^/| /' conftest.$ac_ext >&5
16272
16273 fi
16274 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16275     for gdb_arg5 in 'int *' 'int' 'long'; do
16276      cat >conftest.$ac_ext <<_ACEOF
16277 /* confdefs.h.  */
16278 _ACEOF
16279 cat confdefs.h >>conftest.$ac_ext
16280 cat >>conftest.$ac_ext <<_ACEOF
16281 /* end confdefs.h.  */
16282 $gdb_ptrace_headers
16283 int
16284 main ()
16285 {
16286
16287 extern $gdb_cv_func_ptrace_ret
16288   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
16289
16290   ;
16291   return 0;
16292 }
16293 _ACEOF
16294 rm -f conftest.$ac_objext
16295 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16296   (eval $ac_compile) 2>conftest.er1
16297   ac_status=$?
16298   grep -v '^ *+' conftest.er1 >conftest.err
16299   rm -f conftest.er1
16300   cat conftest.err >&5
16301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16302   (exit $ac_status); } &&
16303          { ac_try='test -z "$ac_c_werror_flag"
16304                          || test ! -s conftest.err'
16305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16306   (eval $ac_try) 2>&5
16307   ac_status=$?
16308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16309   (exit $ac_status); }; } &&
16310          { ac_try='test -s conftest.$ac_objext'
16311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16312   (eval $ac_try) 2>&5
16313   ac_status=$?
16314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16315   (exit $ac_status); }; }; then
16316
16317 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
16318     break 5;
16319 else
16320   echo "$as_me: failed program was:" >&5
16321 sed 's/^/| /' conftest.$ac_ext >&5
16322
16323 fi
16324 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16325     done
16326    done
16327   done
16328  done
16329 done
16330 # Provide a safe default value.
16331 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
16332
16333 fi
16334 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16335 fi
16336 echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_args" >&5
16337 echo "${ECHO_T}$gdb_cv_func_ptrace_args" >&6
16338 ac_save_IFS=$IFS; IFS=','
16339 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
16340 IFS=$ac_save_IFS
16341 shift
16342
16343 cat >>confdefs.h <<_ACEOF
16344 #define PTRACE_TYPE_ARG3 $3
16345 _ACEOF
16346
16347 if test -n "$5"; then
16348
16349 cat >>confdefs.h <<_ACEOF
16350 #define PTRACE_TYPE_ARG5 $5
16351 _ACEOF
16352
16353 fi
16354
16355 if test "$cross_compiling" = no; then
16356   echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
16357 echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
16358 if test "${ac_cv_func_setpgrp_void+set}" = set; then
16359   echo $ECHO_N "(cached) $ECHO_C" >&6
16360 else
16361   if test "$cross_compiling" = yes; then
16362   { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
16363 echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
16364    { (exit 1); exit 1; }; }
16365 else
16366   cat >conftest.$ac_ext <<_ACEOF
16367 /* confdefs.h.  */
16368 _ACEOF
16369 cat confdefs.h >>conftest.$ac_ext
16370 cat >>conftest.$ac_ext <<_ACEOF
16371 /* end confdefs.h.  */
16372 #if HAVE_UNISTD_H
16373 # include <unistd.h>
16374 #endif
16375
16376 int
16377 main ()
16378 {
16379 /* If this system has a BSD-style setpgrp which takes arguments,
16380   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
16381   exit successfully. */
16382   exit (setpgrp (1,1) == -1 ? 0 : 1);
16383   ;
16384   return 0;
16385 }
16386 _ACEOF
16387 rm -f conftest$ac_exeext
16388 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16389   (eval $ac_link) 2>&5
16390   ac_status=$?
16391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16392   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16394   (eval $ac_try) 2>&5
16395   ac_status=$?
16396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16397   (exit $ac_status); }; }; then
16398   ac_cv_func_setpgrp_void=no
16399 else
16400   echo "$as_me: program exited with status $ac_status" >&5
16401 echo "$as_me: failed program was:" >&5
16402 sed 's/^/| /' conftest.$ac_ext >&5
16403
16404 ( exit $ac_status )
16405 ac_cv_func_setpgrp_void=yes
16406 fi
16407 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16408 fi
16409 fi
16410 echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
16411 echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
16412 if test $ac_cv_func_setpgrp_void = yes; then
16413
16414 cat >>confdefs.h <<\_ACEOF
16415 #define SETPGRP_VOID 1
16416 _ACEOF
16417
16418 fi
16419
16420 else
16421   echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
16422 echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
16423 if test "${ac_cv_func_setpgrp_void+set}" = set; then
16424   echo $ECHO_N "(cached) $ECHO_C" >&6
16425 else
16426   cat >conftest.$ac_ext <<_ACEOF
16427 /* confdefs.h.  */
16428 _ACEOF
16429 cat confdefs.h >>conftest.$ac_ext
16430 cat >>conftest.$ac_ext <<_ACEOF
16431 /* end confdefs.h.  */
16432
16433 #include <unistd.h>
16434
16435 int
16436 main ()
16437 {
16438
16439   if (setpgrp(1,1) == -1)
16440     exit (0);
16441   else
16442     exit (1);
16443
16444   ;
16445   return 0;
16446 }
16447 _ACEOF
16448 rm -f conftest.$ac_objext
16449 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16450   (eval $ac_compile) 2>conftest.er1
16451   ac_status=$?
16452   grep -v '^ *+' conftest.er1 >conftest.err
16453   rm -f conftest.er1
16454   cat conftest.err >&5
16455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16456   (exit $ac_status); } &&
16457          { ac_try='test -z "$ac_c_werror_flag"
16458                          || test ! -s conftest.err'
16459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16460   (eval $ac_try) 2>&5
16461   ac_status=$?
16462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16463   (exit $ac_status); }; } &&
16464          { ac_try='test -s conftest.$ac_objext'
16465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16466   (eval $ac_try) 2>&5
16467   ac_status=$?
16468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16469   (exit $ac_status); }; }; then
16470   ac_cv_func_setpgrp_void=no
16471 else
16472   echo "$as_me: failed program was:" >&5
16473 sed 's/^/| /' conftest.$ac_ext >&5
16474
16475 ac_cv_func_setpgrp_void=yes
16476 fi
16477 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16478 fi
16479 echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
16480 echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
16481 if test $ac_cv_func_setpgrp_void = yes; then
16482   cat >>confdefs.h <<\_ACEOF
16483 #define SETPGRP_VOID 1
16484 _ACEOF
16485
16486 fi
16487 fi
16488
16489 # Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
16490 # since sigsetjmp might only be defined as a macro.
16491 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
16492 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
16493 if test "${gdb_cv_func_sigsetjmp+set}" = set; then
16494   echo $ECHO_N "(cached) $ECHO_C" >&6
16495 else
16496   cat >conftest.$ac_ext <<_ACEOF
16497 /* confdefs.h.  */
16498 _ACEOF
16499 cat confdefs.h >>conftest.$ac_ext
16500 cat >>conftest.$ac_ext <<_ACEOF
16501 /* end confdefs.h.  */
16502
16503 #include <setjmp.h>
16504
16505 int
16506 main ()
16507 {
16508 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
16509   ;
16510   return 0;
16511 }
16512 _ACEOF
16513 rm -f conftest.$ac_objext
16514 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16515   (eval $ac_compile) 2>conftest.er1
16516   ac_status=$?
16517   grep -v '^ *+' conftest.er1 >conftest.err
16518   rm -f conftest.er1
16519   cat conftest.err >&5
16520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16521   (exit $ac_status); } &&
16522          { ac_try='test -z "$ac_c_werror_flag"
16523                          || test ! -s conftest.err'
16524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16525   (eval $ac_try) 2>&5
16526   ac_status=$?
16527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16528   (exit $ac_status); }; } &&
16529          { ac_try='test -s conftest.$ac_objext'
16530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16531   (eval $ac_try) 2>&5
16532   ac_status=$?
16533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16534   (exit $ac_status); }; }; then
16535   gdb_cv_func_sigsetjmp=yes
16536 else
16537   echo "$as_me: failed program was:" >&5
16538 sed 's/^/| /' conftest.$ac_ext >&5
16539
16540 gdb_cv_func_sigsetjmp=no
16541 fi
16542 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16543 fi
16544 echo "$as_me:$LINENO: result: $gdb_cv_func_sigsetjmp" >&5
16545 echo "${ECHO_T}$gdb_cv_func_sigsetjmp" >&6
16546 if test $gdb_cv_func_sigsetjmp = yes; then
16547
16548 cat >>confdefs.h <<\_ACEOF
16549 #define HAVE_SIGSETJMP 1
16550 _ACEOF
16551
16552 fi
16553
16554 # Assume we'll default to using the included libiberty regex.
16555 gdb_use_included_regex=yes
16556
16557 # However, if the system regex is GNU regex, then default to *not*
16558 # using the included regex.
16559 echo "$as_me:$LINENO: checking for GNU regex" >&5
16560 echo $ECHO_N "checking for GNU regex... $ECHO_C" >&6
16561 if test "${gdb_cv_have_gnu_regex+set}" = set; then
16562   echo $ECHO_N "(cached) $ECHO_C" >&6
16563 else
16564   cat >conftest.$ac_ext <<_ACEOF
16565 /* confdefs.h.  */
16566 _ACEOF
16567 cat confdefs.h >>conftest.$ac_ext
16568 cat >>conftest.$ac_ext <<_ACEOF
16569 /* end confdefs.h.  */
16570 #include <gnu-versions.h>
16571 int
16572 main ()
16573 {
16574 #define REGEX_INTERFACE_VERSION 1
16575 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
16576 # error "Version mismatch"
16577 #endif
16578   ;
16579   return 0;
16580 }
16581 _ACEOF
16582 rm -f conftest.$ac_objext
16583 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16584   (eval $ac_compile) 2>conftest.er1
16585   ac_status=$?
16586   grep -v '^ *+' conftest.er1 >conftest.err
16587   rm -f conftest.er1
16588   cat conftest.err >&5
16589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16590   (exit $ac_status); } &&
16591          { ac_try='test -z "$ac_c_werror_flag"
16592                          || test ! -s conftest.err'
16593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16594   (eval $ac_try) 2>&5
16595   ac_status=$?
16596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16597   (exit $ac_status); }; } &&
16598          { ac_try='test -s conftest.$ac_objext'
16599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16600   (eval $ac_try) 2>&5
16601   ac_status=$?
16602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16603   (exit $ac_status); }; }; then
16604   gdb_cv_have_gnu_regex=yes
16605 else
16606   echo "$as_me: failed program was:" >&5
16607 sed 's/^/| /' conftest.$ac_ext >&5
16608
16609 gdb_cv_have_gnu_regex=no
16610 fi
16611 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16612 fi
16613 echo "$as_me:$LINENO: result: $gdb_cv_have_gnu_regex" >&5
16614 echo "${ECHO_T}$gdb_cv_have_gnu_regex" >&6
16615 if test $gdb_cv_have_gnu_regex = yes; then
16616   gdb_use_included_regex=no
16617 fi
16618
16619
16620 # Check whether --with-included-regex or --without-included-regex was given.
16621 if test "${with_included_regex+set}" = set; then
16622   withval="$with_included_regex"
16623   gdb_with_regex=$withval
16624 else
16625   gdb_with_regex=$gdb_use_included_regex
16626 fi;
16627 if test "$gdb_with_regex" = yes; then
16628
16629 cat >>confdefs.h <<\_ACEOF
16630 #define USE_INCLUDED_REGEX 1
16631 _ACEOF
16632
16633 fi
16634
16635 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
16636 echo "$as_me:$LINENO: checking for struct thread.td_pcb" >&5
16637 echo $ECHO_N "checking for struct thread.td_pcb... $ECHO_C" >&6
16638 if test "${ac_cv_member_struct_thread_td_pcb+set}" = set; then
16639   echo $ECHO_N "(cached) $ECHO_C" >&6
16640 else
16641   cat >conftest.$ac_ext <<_ACEOF
16642 /* confdefs.h.  */
16643 _ACEOF
16644 cat confdefs.h >>conftest.$ac_ext
16645 cat >>conftest.$ac_ext <<_ACEOF
16646 /* end confdefs.h.  */
16647 #include <sys/param.h>
16648 #include <sys/proc.h>
16649
16650
16651 int
16652 main ()
16653 {
16654 static struct thread ac_aggr;
16655 if (ac_aggr.td_pcb)
16656 return 0;
16657   ;
16658   return 0;
16659 }
16660 _ACEOF
16661 rm -f conftest.$ac_objext
16662 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16663   (eval $ac_compile) 2>conftest.er1
16664   ac_status=$?
16665   grep -v '^ *+' conftest.er1 >conftest.err
16666   rm -f conftest.er1
16667   cat conftest.err >&5
16668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16669   (exit $ac_status); } &&
16670          { ac_try='test -z "$ac_c_werror_flag"
16671                          || test ! -s conftest.err'
16672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16673   (eval $ac_try) 2>&5
16674   ac_status=$?
16675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16676   (exit $ac_status); }; } &&
16677          { ac_try='test -s conftest.$ac_objext'
16678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16679   (eval $ac_try) 2>&5
16680   ac_status=$?
16681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16682   (exit $ac_status); }; }; then
16683   ac_cv_member_struct_thread_td_pcb=yes
16684 else
16685   echo "$as_me: failed program was:" >&5
16686 sed 's/^/| /' conftest.$ac_ext >&5
16687
16688 cat >conftest.$ac_ext <<_ACEOF
16689 /* confdefs.h.  */
16690 _ACEOF
16691 cat confdefs.h >>conftest.$ac_ext
16692 cat >>conftest.$ac_ext <<_ACEOF
16693 /* end confdefs.h.  */
16694 #include <sys/param.h>
16695 #include <sys/proc.h>
16696
16697
16698 int
16699 main ()
16700 {
16701 static struct thread ac_aggr;
16702 if (sizeof ac_aggr.td_pcb)
16703 return 0;
16704   ;
16705   return 0;
16706 }
16707 _ACEOF
16708 rm -f conftest.$ac_objext
16709 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16710   (eval $ac_compile) 2>conftest.er1
16711   ac_status=$?
16712   grep -v '^ *+' conftest.er1 >conftest.err
16713   rm -f conftest.er1
16714   cat conftest.err >&5
16715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16716   (exit $ac_status); } &&
16717          { ac_try='test -z "$ac_c_werror_flag"
16718                          || test ! -s conftest.err'
16719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16720   (eval $ac_try) 2>&5
16721   ac_status=$?
16722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16723   (exit $ac_status); }; } &&
16724          { ac_try='test -s conftest.$ac_objext'
16725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16726   (eval $ac_try) 2>&5
16727   ac_status=$?
16728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16729   (exit $ac_status); }; }; then
16730   ac_cv_member_struct_thread_td_pcb=yes
16731 else
16732   echo "$as_me: failed program was:" >&5
16733 sed 's/^/| /' conftest.$ac_ext >&5
16734
16735 ac_cv_member_struct_thread_td_pcb=no
16736 fi
16737 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16738 fi
16739 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16740 fi
16741 echo "$as_me:$LINENO: result: $ac_cv_member_struct_thread_td_pcb" >&5
16742 echo "${ECHO_T}$ac_cv_member_struct_thread_td_pcb" >&6
16743 if test $ac_cv_member_struct_thread_td_pcb = yes; then
16744
16745 cat >>confdefs.h <<_ACEOF
16746 #define HAVE_STRUCT_THREAD_TD_PCB 1
16747 _ACEOF
16748
16749
16750 fi
16751
16752
16753 # See if <sys/lwp.h> defines `struct lwp`.
16754 echo "$as_me:$LINENO: checking for struct lwp" >&5
16755 echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
16756 if test "${gdb_cv_struct_lwp+set}" = set; then
16757   echo $ECHO_N "(cached) $ECHO_C" >&6
16758 else
16759   cat >conftest.$ac_ext <<_ACEOF
16760 /* confdefs.h.  */
16761 _ACEOF
16762 cat confdefs.h >>conftest.$ac_ext
16763 cat >>conftest.$ac_ext <<_ACEOF
16764 /* end confdefs.h.  */
16765 #include <sys/param.h>
16766 #include <sys/lwp.h>
16767 int
16768 main ()
16769 {
16770 struct lwp l;
16771   ;
16772   return 0;
16773 }
16774 _ACEOF
16775 rm -f conftest.$ac_objext
16776 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16777   (eval $ac_compile) 2>conftest.er1
16778   ac_status=$?
16779   grep -v '^ *+' conftest.er1 >conftest.err
16780   rm -f conftest.er1
16781   cat conftest.err >&5
16782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16783   (exit $ac_status); } &&
16784          { ac_try='test -z "$ac_c_werror_flag"
16785                          || test ! -s conftest.err'
16786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16787   (eval $ac_try) 2>&5
16788   ac_status=$?
16789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16790   (exit $ac_status); }; } &&
16791          { ac_try='test -s conftest.$ac_objext'
16792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16793   (eval $ac_try) 2>&5
16794   ac_status=$?
16795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16796   (exit $ac_status); }; }; then
16797   gdb_cv_struct_lwp=yes
16798 else
16799   echo "$as_me: failed program was:" >&5
16800 sed 's/^/| /' conftest.$ac_ext >&5
16801
16802 gdb_cv_struct_lwp=no
16803 fi
16804 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16805 fi
16806 echo "$as_me:$LINENO: result: $gdb_cv_struct_lwp" >&5
16807 echo "${ECHO_T}$gdb_cv_struct_lwp" >&6
16808 if test $gdb_cv_struct_lwp = yes; then
16809
16810 cat >>confdefs.h <<\_ACEOF
16811 #define HAVE_STRUCT_LWP 1
16812 _ACEOF
16813
16814 fi
16815
16816 # See if <machine/reg.h> degines `struct reg'.
16817 echo "$as_me:$LINENO: checking for struct reg in machine/reg.h" >&5
16818 echo $ECHO_N "checking for struct reg in machine/reg.h... $ECHO_C" >&6
16819 if test "${gdb_cv_struct_reg+set}" = set; then
16820   echo $ECHO_N "(cached) $ECHO_C" >&6
16821 else
16822   cat >conftest.$ac_ext <<_ACEOF
16823 /* confdefs.h.  */
16824 _ACEOF
16825 cat confdefs.h >>conftest.$ac_ext
16826 cat >>conftest.$ac_ext <<_ACEOF
16827 /* end confdefs.h.  */
16828 #include <sys/types.h>
16829 #include <machine/reg.h>
16830 int
16831 main ()
16832 {
16833 struct reg r;
16834   ;
16835   return 0;
16836 }
16837 _ACEOF
16838 rm -f conftest.$ac_objext
16839 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16840   (eval $ac_compile) 2>conftest.er1
16841   ac_status=$?
16842   grep -v '^ *+' conftest.er1 >conftest.err
16843   rm -f conftest.er1
16844   cat conftest.err >&5
16845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16846   (exit $ac_status); } &&
16847          { ac_try='test -z "$ac_c_werror_flag"
16848                          || test ! -s conftest.err'
16849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16850   (eval $ac_try) 2>&5
16851   ac_status=$?
16852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16853   (exit $ac_status); }; } &&
16854          { ac_try='test -s conftest.$ac_objext'
16855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16856   (eval $ac_try) 2>&5
16857   ac_status=$?
16858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16859   (exit $ac_status); }; }; then
16860   gdb_cv_struct_reg=yes
16861 else
16862   echo "$as_me: failed program was:" >&5
16863 sed 's/^/| /' conftest.$ac_ext >&5
16864
16865 gdb_cv_struct_reg=no
16866 fi
16867 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16868 fi
16869 echo "$as_me:$LINENO: result: $gdb_cv_struct_reg" >&5
16870 echo "${ECHO_T}$gdb_cv_struct_reg" >&6
16871 if test $gdb_cv_struct_reg = yes; then
16872
16873 cat >>confdefs.h <<\_ACEOF
16874 #define HAVE_STRUCT_REG 1
16875 _ACEOF
16876
16877 fi
16878
16879 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
16880 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
16881 echo "$as_me:$LINENO: checking for struct reg.r_fs" >&5
16882 echo $ECHO_N "checking for struct reg.r_fs... $ECHO_C" >&6
16883 if test "${ac_cv_member_struct_reg_r_fs+set}" = set; then
16884   echo $ECHO_N "(cached) $ECHO_C" >&6
16885 else
16886   cat >conftest.$ac_ext <<_ACEOF
16887 /* confdefs.h.  */
16888 _ACEOF
16889 cat confdefs.h >>conftest.$ac_ext
16890 cat >>conftest.$ac_ext <<_ACEOF
16891 /* end confdefs.h.  */
16892 #include <machine/reg.h>
16893
16894 int
16895 main ()
16896 {
16897 static struct reg ac_aggr;
16898 if (ac_aggr.r_fs)
16899 return 0;
16900   ;
16901   return 0;
16902 }
16903 _ACEOF
16904 rm -f conftest.$ac_objext
16905 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16906   (eval $ac_compile) 2>conftest.er1
16907   ac_status=$?
16908   grep -v '^ *+' conftest.er1 >conftest.err
16909   rm -f conftest.er1
16910   cat conftest.err >&5
16911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16912   (exit $ac_status); } &&
16913          { ac_try='test -z "$ac_c_werror_flag"
16914                          || test ! -s conftest.err'
16915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16916   (eval $ac_try) 2>&5
16917   ac_status=$?
16918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16919   (exit $ac_status); }; } &&
16920          { ac_try='test -s conftest.$ac_objext'
16921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16922   (eval $ac_try) 2>&5
16923   ac_status=$?
16924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16925   (exit $ac_status); }; }; then
16926   ac_cv_member_struct_reg_r_fs=yes
16927 else
16928   echo "$as_me: failed program was:" >&5
16929 sed 's/^/| /' conftest.$ac_ext >&5
16930
16931 cat >conftest.$ac_ext <<_ACEOF
16932 /* confdefs.h.  */
16933 _ACEOF
16934 cat confdefs.h >>conftest.$ac_ext
16935 cat >>conftest.$ac_ext <<_ACEOF
16936 /* end confdefs.h.  */
16937 #include <machine/reg.h>
16938
16939 int
16940 main ()
16941 {
16942 static struct reg ac_aggr;
16943 if (sizeof ac_aggr.r_fs)
16944 return 0;
16945   ;
16946   return 0;
16947 }
16948 _ACEOF
16949 rm -f conftest.$ac_objext
16950 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16951   (eval $ac_compile) 2>conftest.er1
16952   ac_status=$?
16953   grep -v '^ *+' conftest.er1 >conftest.err
16954   rm -f conftest.er1
16955   cat conftest.err >&5
16956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16957   (exit $ac_status); } &&
16958          { ac_try='test -z "$ac_c_werror_flag"
16959                          || test ! -s conftest.err'
16960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16961   (eval $ac_try) 2>&5
16962   ac_status=$?
16963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16964   (exit $ac_status); }; } &&
16965          { ac_try='test -s conftest.$ac_objext'
16966   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16967   (eval $ac_try) 2>&5
16968   ac_status=$?
16969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16970   (exit $ac_status); }; }; then
16971   ac_cv_member_struct_reg_r_fs=yes
16972 else
16973   echo "$as_me: failed program was:" >&5
16974 sed 's/^/| /' conftest.$ac_ext >&5
16975
16976 ac_cv_member_struct_reg_r_fs=no
16977 fi
16978 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16979 fi
16980 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16981 fi
16982 echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_fs" >&5
16983 echo "${ECHO_T}$ac_cv_member_struct_reg_r_fs" >&6
16984 if test $ac_cv_member_struct_reg_r_fs = yes; then
16985
16986 cat >>confdefs.h <<_ACEOF
16987 #define HAVE_STRUCT_REG_R_FS 1
16988 _ACEOF
16989
16990
16991 fi
16992 echo "$as_me:$LINENO: checking for struct reg.r_gs" >&5
16993 echo $ECHO_N "checking for struct reg.r_gs... $ECHO_C" >&6
16994 if test "${ac_cv_member_struct_reg_r_gs+set}" = set; then
16995   echo $ECHO_N "(cached) $ECHO_C" >&6
16996 else
16997   cat >conftest.$ac_ext <<_ACEOF
16998 /* confdefs.h.  */
16999 _ACEOF
17000 cat confdefs.h >>conftest.$ac_ext
17001 cat >>conftest.$ac_ext <<_ACEOF
17002 /* end confdefs.h.  */
17003 #include <machine/reg.h>
17004
17005 int
17006 main ()
17007 {
17008 static struct reg ac_aggr;
17009 if (ac_aggr.r_gs)
17010 return 0;
17011   ;
17012   return 0;
17013 }
17014 _ACEOF
17015 rm -f conftest.$ac_objext
17016 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17017   (eval $ac_compile) 2>conftest.er1
17018   ac_status=$?
17019   grep -v '^ *+' conftest.er1 >conftest.err
17020   rm -f conftest.er1
17021   cat conftest.err >&5
17022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17023   (exit $ac_status); } &&
17024          { ac_try='test -z "$ac_c_werror_flag"
17025                          || test ! -s conftest.err'
17026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17027   (eval $ac_try) 2>&5
17028   ac_status=$?
17029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17030   (exit $ac_status); }; } &&
17031          { ac_try='test -s conftest.$ac_objext'
17032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17033   (eval $ac_try) 2>&5
17034   ac_status=$?
17035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17036   (exit $ac_status); }; }; then
17037   ac_cv_member_struct_reg_r_gs=yes
17038 else
17039   echo "$as_me: failed program was:" >&5
17040 sed 's/^/| /' conftest.$ac_ext >&5
17041
17042 cat >conftest.$ac_ext <<_ACEOF
17043 /* confdefs.h.  */
17044 _ACEOF
17045 cat confdefs.h >>conftest.$ac_ext
17046 cat >>conftest.$ac_ext <<_ACEOF
17047 /* end confdefs.h.  */
17048 #include <machine/reg.h>
17049
17050 int
17051 main ()
17052 {
17053 static struct reg ac_aggr;
17054 if (sizeof ac_aggr.r_gs)
17055 return 0;
17056   ;
17057   return 0;
17058 }
17059 _ACEOF
17060 rm -f conftest.$ac_objext
17061 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17062   (eval $ac_compile) 2>conftest.er1
17063   ac_status=$?
17064   grep -v '^ *+' conftest.er1 >conftest.err
17065   rm -f conftest.er1
17066   cat conftest.err >&5
17067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17068   (exit $ac_status); } &&
17069          { ac_try='test -z "$ac_c_werror_flag"
17070                          || test ! -s conftest.err'
17071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17072   (eval $ac_try) 2>&5
17073   ac_status=$?
17074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17075   (exit $ac_status); }; } &&
17076          { ac_try='test -s conftest.$ac_objext'
17077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17078   (eval $ac_try) 2>&5
17079   ac_status=$?
17080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17081   (exit $ac_status); }; }; then
17082   ac_cv_member_struct_reg_r_gs=yes
17083 else
17084   echo "$as_me: failed program was:" >&5
17085 sed 's/^/| /' conftest.$ac_ext >&5
17086
17087 ac_cv_member_struct_reg_r_gs=no
17088 fi
17089 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17090 fi
17091 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17092 fi
17093 echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_gs" >&5
17094 echo "${ECHO_T}$ac_cv_member_struct_reg_r_gs" >&6
17095 if test $ac_cv_member_struct_reg_r_gs = yes; then
17096
17097 cat >>confdefs.h <<_ACEOF
17098 #define HAVE_STRUCT_REG_R_GS 1
17099 _ACEOF
17100
17101
17102 fi
17103
17104
17105 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
17106 echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
17107 echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
17108 if test "${gdb_cv_have_ptrace_getregs+set}" = set; then
17109   echo $ECHO_N "(cached) $ECHO_C" >&6
17110 else
17111   cat >conftest.$ac_ext <<_ACEOF
17112 /* confdefs.h.  */
17113 _ACEOF
17114 cat confdefs.h >>conftest.$ac_ext
17115 cat >>conftest.$ac_ext <<_ACEOF
17116 /* end confdefs.h.  */
17117 #include <sys/ptrace.h>
17118 int
17119 main ()
17120 {
17121 PTRACE_GETREGS;
17122   ;
17123   return 0;
17124 }
17125 _ACEOF
17126 rm -f conftest.$ac_objext
17127 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17128   (eval $ac_compile) 2>conftest.er1
17129   ac_status=$?
17130   grep -v '^ *+' conftest.er1 >conftest.err
17131   rm -f conftest.er1
17132   cat conftest.err >&5
17133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17134   (exit $ac_status); } &&
17135          { ac_try='test -z "$ac_c_werror_flag"
17136                          || test ! -s conftest.err'
17137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17138   (eval $ac_try) 2>&5
17139   ac_status=$?
17140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17141   (exit $ac_status); }; } &&
17142          { ac_try='test -s conftest.$ac_objext'
17143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17144   (eval $ac_try) 2>&5
17145   ac_status=$?
17146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17147   (exit $ac_status); }; }; then
17148   gdb_cv_have_ptrace_getregs=yes
17149 else
17150   echo "$as_me: failed program was:" >&5
17151 sed 's/^/| /' conftest.$ac_ext >&5
17152
17153 gdb_cv_have_ptrace_getregs=no
17154 fi
17155 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17156 fi
17157
17158 echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getregs" >&5
17159 echo "${ECHO_T}$gdb_cv_have_ptrace_getregs" >&6
17160 if test $gdb_cv_have_ptrace_getregs = yes; then
17161
17162 cat >>confdefs.h <<\_ACEOF
17163 #define HAVE_PTRACE_GETREGS 1
17164 _ACEOF
17165
17166 fi
17167
17168 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
17169 echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5
17170 echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6
17171 if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then
17172   echo $ECHO_N "(cached) $ECHO_C" >&6
17173 else
17174   cat >conftest.$ac_ext <<_ACEOF
17175 /* confdefs.h.  */
17176 _ACEOF
17177 cat confdefs.h >>conftest.$ac_ext
17178 cat >>conftest.$ac_ext <<_ACEOF
17179 /* end confdefs.h.  */
17180 #include <sys/ptrace.h>
17181 int
17182 main ()
17183 {
17184 PTRACE_GETFPXREGS;
17185   ;
17186   return 0;
17187 }
17188 _ACEOF
17189 rm -f conftest.$ac_objext
17190 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17191   (eval $ac_compile) 2>conftest.er1
17192   ac_status=$?
17193   grep -v '^ *+' conftest.er1 >conftest.err
17194   rm -f conftest.er1
17195   cat conftest.err >&5
17196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17197   (exit $ac_status); } &&
17198          { ac_try='test -z "$ac_c_werror_flag"
17199                          || test ! -s conftest.err'
17200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17201   (eval $ac_try) 2>&5
17202   ac_status=$?
17203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17204   (exit $ac_status); }; } &&
17205          { ac_try='test -s conftest.$ac_objext'
17206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17207   (eval $ac_try) 2>&5
17208   ac_status=$?
17209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17210   (exit $ac_status); }; }; then
17211   gdb_cv_have_ptrace_getfpxregs=yes
17212 else
17213   echo "$as_me: failed program was:" >&5
17214 sed 's/^/| /' conftest.$ac_ext >&5
17215
17216 gdb_cv_have_ptrace_getfpxregs=no
17217 fi
17218 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17219 fi
17220
17221 echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getfpxregs" >&5
17222 echo "${ECHO_T}$gdb_cv_have_ptrace_getfpxregs" >&6
17223 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
17224
17225 cat >>confdefs.h <<\_ACEOF
17226 #define HAVE_PTRACE_GETFPXREGS 1
17227 _ACEOF
17228
17229 fi
17230
17231 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
17232 echo "$as_me:$LINENO: checking for PT_GETDBREGS" >&5
17233 echo $ECHO_N "checking for PT_GETDBREGS... $ECHO_C" >&6
17234 if test "${gdb_cv_have_pt_getdbregs+set}" = set; then
17235   echo $ECHO_N "(cached) $ECHO_C" >&6
17236 else
17237   cat >conftest.$ac_ext <<_ACEOF
17238 /* confdefs.h.  */
17239 _ACEOF
17240 cat confdefs.h >>conftest.$ac_ext
17241 cat >>conftest.$ac_ext <<_ACEOF
17242 /* end confdefs.h.  */
17243 #include <sys/types.h>
17244 #include <sys/ptrace.h>
17245 int
17246 main ()
17247 {
17248 PT_GETDBREGS;
17249   ;
17250   return 0;
17251 }
17252 _ACEOF
17253 rm -f conftest.$ac_objext
17254 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17255   (eval $ac_compile) 2>conftest.er1
17256   ac_status=$?
17257   grep -v '^ *+' conftest.er1 >conftest.err
17258   rm -f conftest.er1
17259   cat conftest.err >&5
17260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17261   (exit $ac_status); } &&
17262          { ac_try='test -z "$ac_c_werror_flag"
17263                          || test ! -s conftest.err'
17264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17265   (eval $ac_try) 2>&5
17266   ac_status=$?
17267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17268   (exit $ac_status); }; } &&
17269          { ac_try='test -s conftest.$ac_objext'
17270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17271   (eval $ac_try) 2>&5
17272   ac_status=$?
17273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17274   (exit $ac_status); }; }; then
17275   gdb_cv_have_pt_getdbregs=yes
17276 else
17277   echo "$as_me: failed program was:" >&5
17278 sed 's/^/| /' conftest.$ac_ext >&5
17279
17280 gdb_cv_have_pt_getdbregs=no
17281 fi
17282 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17283 fi
17284
17285 echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getdbregs" >&5
17286 echo "${ECHO_T}$gdb_cv_have_pt_getdbregs" >&6
17287 if test $gdb_cv_have_pt_getdbregs = yes; then
17288
17289 cat >>confdefs.h <<\_ACEOF
17290 #define HAVE_PT_GETDBREGS 1
17291 _ACEOF
17292
17293 fi
17294
17295 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
17296 echo "$as_me:$LINENO: checking for PT_GETXMMREGS" >&5
17297 echo $ECHO_N "checking for PT_GETXMMREGS... $ECHO_C" >&6
17298 if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then
17299   echo $ECHO_N "(cached) $ECHO_C" >&6
17300 else
17301   cat >conftest.$ac_ext <<_ACEOF
17302 /* confdefs.h.  */
17303 _ACEOF
17304 cat confdefs.h >>conftest.$ac_ext
17305 cat >>conftest.$ac_ext <<_ACEOF
17306 /* end confdefs.h.  */
17307 #include <sys/types.h>
17308 #include <sys/ptrace.h>
17309 int
17310 main ()
17311 {
17312 PT_GETXMMREGS;
17313   ;
17314   return 0;
17315 }
17316 _ACEOF
17317 rm -f conftest.$ac_objext
17318 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17319   (eval $ac_compile) 2>conftest.er1
17320   ac_status=$?
17321   grep -v '^ *+' conftest.er1 >conftest.err
17322   rm -f conftest.er1
17323   cat conftest.err >&5
17324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17325   (exit $ac_status); } &&
17326          { ac_try='test -z "$ac_c_werror_flag"
17327                          || test ! -s conftest.err'
17328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17329   (eval $ac_try) 2>&5
17330   ac_status=$?
17331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17332   (exit $ac_status); }; } &&
17333          { ac_try='test -s conftest.$ac_objext'
17334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17335   (eval $ac_try) 2>&5
17336   ac_status=$?
17337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17338   (exit $ac_status); }; }; then
17339   gdb_cv_have_pt_getxmmregs=yes
17340 else
17341   echo "$as_me: failed program was:" >&5
17342 sed 's/^/| /' conftest.$ac_ext >&5
17343
17344 gdb_cv_have_pt_getxmmregs=no
17345 fi
17346 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17347 fi
17348
17349 echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getxmmregs" >&5
17350 echo "${ECHO_T}$gdb_cv_have_pt_getxmmregs" >&6
17351 if test $gdb_cv_have_pt_getxmmregs = yes; then
17352
17353 cat >>confdefs.h <<\_ACEOF
17354 #define HAVE_PT_GETXMMREGS 1
17355 _ACEOF
17356
17357 fi
17358
17359 # Detect which type of /proc is in use, such as for Unixware or Solaris.
17360
17361 if test "${target}" = "${host}"; then
17362   case "${host}" in
17363   *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
17364
17365 cat >>confdefs.h <<\_ACEOF
17366 #define NEW_PROC_API 1
17367 _ACEOF
17368
17369       ;;
17370   *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
17371
17372 cat >>confdefs.h <<\_ACEOF
17373 #define NEW_PROC_API 1
17374 _ACEOF
17375
17376       ;;
17377   mips-sgi-irix5*)
17378       # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
17379
17380 cat >>confdefs.h <<\_ACEOF
17381 #define _KMEMUSER 1
17382 _ACEOF
17383
17384       ;;
17385   esac
17386 fi
17387
17388 if test "$ac_cv_header_sys_procfs_h" = yes; then
17389   echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5
17390 echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6
17391  if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then
17392   echo $ECHO_N "(cached) $ECHO_C" >&6
17393 else
17394   cat >conftest.$ac_ext <<_ACEOF
17395 /* confdefs.h.  */
17396 _ACEOF
17397 cat confdefs.h >>conftest.$ac_ext
17398 cat >>conftest.$ac_ext <<_ACEOF
17399 /* end confdefs.h.  */
17400
17401 #define _SYSCALL32
17402 #include <sys/procfs.h>
17403 int
17404 main ()
17405 {
17406 pstatus_t avar
17407   ;
17408   return 0;
17409 }
17410 _ACEOF
17411 rm -f conftest.$ac_objext
17412 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17413   (eval $ac_compile) 2>conftest.er1
17414   ac_status=$?
17415   grep -v '^ *+' conftest.er1 >conftest.err
17416   rm -f conftest.er1
17417   cat conftest.err >&5
17418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17419   (exit $ac_status); } &&
17420          { ac_try='test -z "$ac_c_werror_flag"
17421                          || test ! -s conftest.err'
17422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17423   (eval $ac_try) 2>&5
17424   ac_status=$?
17425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17426   (exit $ac_status); }; } &&
17427          { ac_try='test -s conftest.$ac_objext'
17428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17429   (eval $ac_try) 2>&5
17430   ac_status=$?
17431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17432   (exit $ac_status); }; }; then
17433   bfd_cv_have_sys_procfs_type_pstatus_t=yes
17434 else
17435   echo "$as_me: failed program was:" >&5
17436 sed 's/^/| /' conftest.$ac_ext >&5
17437
17438 bfd_cv_have_sys_procfs_type_pstatus_t=no
17439
17440 fi
17441 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17442 fi
17443
17444  if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
17445
17446 cat >>confdefs.h <<\_ACEOF
17447 #define HAVE_PSTATUS_T 1
17448 _ACEOF
17449
17450  fi
17451  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
17452 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6
17453
17454   echo "$as_me:$LINENO: checking for prrun_t in sys/procfs.h" >&5
17455 echo $ECHO_N "checking for prrun_t in sys/procfs.h... $ECHO_C" >&6
17456  if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then
17457   echo $ECHO_N "(cached) $ECHO_C" >&6
17458 else
17459   cat >conftest.$ac_ext <<_ACEOF
17460 /* confdefs.h.  */
17461 _ACEOF
17462 cat confdefs.h >>conftest.$ac_ext
17463 cat >>conftest.$ac_ext <<_ACEOF
17464 /* end confdefs.h.  */
17465
17466 #define _SYSCALL32
17467 #include <sys/procfs.h>
17468 int
17469 main ()
17470 {
17471 prrun_t avar
17472   ;
17473   return 0;
17474 }
17475 _ACEOF
17476 rm -f conftest.$ac_objext
17477 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17478   (eval $ac_compile) 2>conftest.er1
17479   ac_status=$?
17480   grep -v '^ *+' conftest.er1 >conftest.err
17481   rm -f conftest.er1
17482   cat conftest.err >&5
17483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17484   (exit $ac_status); } &&
17485          { ac_try='test -z "$ac_c_werror_flag"
17486                          || test ! -s conftest.err'
17487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17488   (eval $ac_try) 2>&5
17489   ac_status=$?
17490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17491   (exit $ac_status); }; } &&
17492          { ac_try='test -s conftest.$ac_objext'
17493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17494   (eval $ac_try) 2>&5
17495   ac_status=$?
17496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17497   (exit $ac_status); }; }; then
17498   bfd_cv_have_sys_procfs_type_prrun_t=yes
17499 else
17500   echo "$as_me: failed program was:" >&5
17501 sed 's/^/| /' conftest.$ac_ext >&5
17502
17503 bfd_cv_have_sys_procfs_type_prrun_t=no
17504
17505 fi
17506 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17507 fi
17508
17509  if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
17510
17511 cat >>confdefs.h <<\_ACEOF
17512 #define HAVE_PRRUN_T 1
17513 _ACEOF
17514
17515  fi
17516  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
17517 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prrun_t" >&6
17518
17519   echo "$as_me:$LINENO: checking for gregset_t in sys/procfs.h" >&5
17520 echo $ECHO_N "checking for gregset_t in sys/procfs.h... $ECHO_C" >&6
17521  if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then
17522   echo $ECHO_N "(cached) $ECHO_C" >&6
17523 else
17524   cat >conftest.$ac_ext <<_ACEOF
17525 /* confdefs.h.  */
17526 _ACEOF
17527 cat confdefs.h >>conftest.$ac_ext
17528 cat >>conftest.$ac_ext <<_ACEOF
17529 /* end confdefs.h.  */
17530
17531 #define _SYSCALL32
17532 #include <sys/procfs.h>
17533 int
17534 main ()
17535 {
17536 gregset_t avar
17537   ;
17538   return 0;
17539 }
17540 _ACEOF
17541 rm -f conftest.$ac_objext
17542 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17543   (eval $ac_compile) 2>conftest.er1
17544   ac_status=$?
17545   grep -v '^ *+' conftest.er1 >conftest.err
17546   rm -f conftest.er1
17547   cat conftest.err >&5
17548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17549   (exit $ac_status); } &&
17550          { ac_try='test -z "$ac_c_werror_flag"
17551                          || test ! -s conftest.err'
17552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17553   (eval $ac_try) 2>&5
17554   ac_status=$?
17555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17556   (exit $ac_status); }; } &&
17557          { ac_try='test -s conftest.$ac_objext'
17558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17559   (eval $ac_try) 2>&5
17560   ac_status=$?
17561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17562   (exit $ac_status); }; }; then
17563   bfd_cv_have_sys_procfs_type_gregset_t=yes
17564 else
17565   echo "$as_me: failed program was:" >&5
17566 sed 's/^/| /' conftest.$ac_ext >&5
17567
17568 bfd_cv_have_sys_procfs_type_gregset_t=no
17569
17570 fi
17571 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17572 fi
17573
17574  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
17575
17576 cat >>confdefs.h <<\_ACEOF
17577 #define HAVE_GREGSET_T 1
17578 _ACEOF
17579
17580  fi
17581  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
17582 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_gregset_t" >&6
17583
17584   echo "$as_me:$LINENO: checking for fpregset_t in sys/procfs.h" >&5
17585 echo $ECHO_N "checking for fpregset_t in sys/procfs.h... $ECHO_C" >&6
17586  if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then
17587   echo $ECHO_N "(cached) $ECHO_C" >&6
17588 else
17589   cat >conftest.$ac_ext <<_ACEOF
17590 /* confdefs.h.  */
17591 _ACEOF
17592 cat confdefs.h >>conftest.$ac_ext
17593 cat >>conftest.$ac_ext <<_ACEOF
17594 /* end confdefs.h.  */
17595
17596 #define _SYSCALL32
17597 #include <sys/procfs.h>
17598 int
17599 main ()
17600 {
17601 fpregset_t avar
17602   ;
17603   return 0;
17604 }
17605 _ACEOF
17606 rm -f conftest.$ac_objext
17607 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17608   (eval $ac_compile) 2>conftest.er1
17609   ac_status=$?
17610   grep -v '^ *+' conftest.er1 >conftest.err
17611   rm -f conftest.er1
17612   cat conftest.err >&5
17613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17614   (exit $ac_status); } &&
17615          { ac_try='test -z "$ac_c_werror_flag"
17616                          || test ! -s conftest.err'
17617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17618   (eval $ac_try) 2>&5
17619   ac_status=$?
17620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17621   (exit $ac_status); }; } &&
17622          { ac_try='test -s conftest.$ac_objext'
17623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17624   (eval $ac_try) 2>&5
17625   ac_status=$?
17626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17627   (exit $ac_status); }; }; then
17628   bfd_cv_have_sys_procfs_type_fpregset_t=yes
17629 else
17630   echo "$as_me: failed program was:" >&5
17631 sed 's/^/| /' conftest.$ac_ext >&5
17632
17633 bfd_cv_have_sys_procfs_type_fpregset_t=no
17634
17635 fi
17636 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17637 fi
17638
17639  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
17640
17641 cat >>confdefs.h <<\_ACEOF
17642 #define HAVE_FPREGSET_T 1
17643 _ACEOF
17644
17645  fi
17646  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
17647 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_fpregset_t" >&6
17648
17649   echo "$as_me:$LINENO: checking for prgregset_t in sys/procfs.h" >&5
17650 echo $ECHO_N "checking for prgregset_t in sys/procfs.h... $ECHO_C" >&6
17651  if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then
17652   echo $ECHO_N "(cached) $ECHO_C" >&6
17653 else
17654   cat >conftest.$ac_ext <<_ACEOF
17655 /* confdefs.h.  */
17656 _ACEOF
17657 cat confdefs.h >>conftest.$ac_ext
17658 cat >>conftest.$ac_ext <<_ACEOF
17659 /* end confdefs.h.  */
17660
17661 #define _SYSCALL32
17662 #include <sys/procfs.h>
17663 int
17664 main ()
17665 {
17666 prgregset_t avar
17667   ;
17668   return 0;
17669 }
17670 _ACEOF
17671 rm -f conftest.$ac_objext
17672 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17673   (eval $ac_compile) 2>conftest.er1
17674   ac_status=$?
17675   grep -v '^ *+' conftest.er1 >conftest.err
17676   rm -f conftest.er1
17677   cat conftest.err >&5
17678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17679   (exit $ac_status); } &&
17680          { ac_try='test -z "$ac_c_werror_flag"
17681                          || test ! -s conftest.err'
17682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17683   (eval $ac_try) 2>&5
17684   ac_status=$?
17685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17686   (exit $ac_status); }; } &&
17687          { ac_try='test -s conftest.$ac_objext'
17688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17689   (eval $ac_try) 2>&5
17690   ac_status=$?
17691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17692   (exit $ac_status); }; }; then
17693   bfd_cv_have_sys_procfs_type_prgregset_t=yes
17694 else
17695   echo "$as_me: failed program was:" >&5
17696 sed 's/^/| /' conftest.$ac_ext >&5
17697
17698 bfd_cv_have_sys_procfs_type_prgregset_t=no
17699
17700 fi
17701 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17702 fi
17703
17704  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
17705
17706 cat >>confdefs.h <<\_ACEOF
17707 #define HAVE_PRGREGSET_T 1
17708 _ACEOF
17709
17710  fi
17711  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
17712 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset_t" >&6
17713
17714   echo "$as_me:$LINENO: checking for prfpregset_t in sys/procfs.h" >&5
17715 echo $ECHO_N "checking for prfpregset_t in sys/procfs.h... $ECHO_C" >&6
17716  if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then
17717   echo $ECHO_N "(cached) $ECHO_C" >&6
17718 else
17719   cat >conftest.$ac_ext <<_ACEOF
17720 /* confdefs.h.  */
17721 _ACEOF
17722 cat confdefs.h >>conftest.$ac_ext
17723 cat >>conftest.$ac_ext <<_ACEOF
17724 /* end confdefs.h.  */
17725
17726 #define _SYSCALL32
17727 #include <sys/procfs.h>
17728 int
17729 main ()
17730 {
17731 prfpregset_t avar
17732   ;
17733   return 0;
17734 }
17735 _ACEOF
17736 rm -f conftest.$ac_objext
17737 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17738   (eval $ac_compile) 2>conftest.er1
17739   ac_status=$?
17740   grep -v '^ *+' conftest.er1 >conftest.err
17741   rm -f conftest.er1
17742   cat conftest.err >&5
17743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17744   (exit $ac_status); } &&
17745          { ac_try='test -z "$ac_c_werror_flag"
17746                          || test ! -s conftest.err'
17747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17748   (eval $ac_try) 2>&5
17749   ac_status=$?
17750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17751   (exit $ac_status); }; } &&
17752          { ac_try='test -s conftest.$ac_objext'
17753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17754   (eval $ac_try) 2>&5
17755   ac_status=$?
17756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17757   (exit $ac_status); }; }; then
17758   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
17759 else
17760   echo "$as_me: failed program was:" >&5
17761 sed 's/^/| /' conftest.$ac_ext >&5
17762
17763 bfd_cv_have_sys_procfs_type_prfpregset_t=no
17764
17765 fi
17766 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17767 fi
17768
17769  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
17770
17771 cat >>confdefs.h <<\_ACEOF
17772 #define HAVE_PRFPREGSET_T 1
17773 _ACEOF
17774
17775  fi
17776  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
17777 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6
17778
17779   echo "$as_me:$LINENO: checking for prgregset32_t in sys/procfs.h" >&5
17780 echo $ECHO_N "checking for prgregset32_t in sys/procfs.h... $ECHO_C" >&6
17781  if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then
17782   echo $ECHO_N "(cached) $ECHO_C" >&6
17783 else
17784   cat >conftest.$ac_ext <<_ACEOF
17785 /* confdefs.h.  */
17786 _ACEOF
17787 cat confdefs.h >>conftest.$ac_ext
17788 cat >>conftest.$ac_ext <<_ACEOF
17789 /* end confdefs.h.  */
17790
17791 #define _SYSCALL32
17792 #include <sys/procfs.h>
17793 int
17794 main ()
17795 {
17796 prgregset32_t avar
17797   ;
17798   return 0;
17799 }
17800 _ACEOF
17801 rm -f conftest.$ac_objext
17802 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17803   (eval $ac_compile) 2>conftest.er1
17804   ac_status=$?
17805   grep -v '^ *+' conftest.er1 >conftest.err
17806   rm -f conftest.er1
17807   cat conftest.err >&5
17808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17809   (exit $ac_status); } &&
17810          { ac_try='test -z "$ac_c_werror_flag"
17811                          || test ! -s conftest.err'
17812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17813   (eval $ac_try) 2>&5
17814   ac_status=$?
17815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17816   (exit $ac_status); }; } &&
17817          { ac_try='test -s conftest.$ac_objext'
17818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17819   (eval $ac_try) 2>&5
17820   ac_status=$?
17821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17822   (exit $ac_status); }; }; then
17823   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
17824 else
17825   echo "$as_me: failed program was:" >&5
17826 sed 's/^/| /' conftest.$ac_ext >&5
17827
17828 bfd_cv_have_sys_procfs_type_prgregset32_t=no
17829
17830 fi
17831 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17832 fi
17833
17834  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
17835
17836 cat >>confdefs.h <<\_ACEOF
17837 #define HAVE_PRGREGSET32_T 1
17838 _ACEOF
17839
17840  fi
17841  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
17842 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6
17843
17844   echo "$as_me:$LINENO: checking for prfpregset32_t in sys/procfs.h" >&5
17845 echo $ECHO_N "checking for prfpregset32_t in sys/procfs.h... $ECHO_C" >&6
17846  if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then
17847   echo $ECHO_N "(cached) $ECHO_C" >&6
17848 else
17849   cat >conftest.$ac_ext <<_ACEOF
17850 /* confdefs.h.  */
17851 _ACEOF
17852 cat confdefs.h >>conftest.$ac_ext
17853 cat >>conftest.$ac_ext <<_ACEOF
17854 /* end confdefs.h.  */
17855
17856 #define _SYSCALL32
17857 #include <sys/procfs.h>
17858 int
17859 main ()
17860 {
17861 prfpregset32_t avar
17862   ;
17863   return 0;
17864 }
17865 _ACEOF
17866 rm -f conftest.$ac_objext
17867 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17868   (eval $ac_compile) 2>conftest.er1
17869   ac_status=$?
17870   grep -v '^ *+' conftest.er1 >conftest.err
17871   rm -f conftest.er1
17872   cat conftest.err >&5
17873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17874   (exit $ac_status); } &&
17875          { ac_try='test -z "$ac_c_werror_flag"
17876                          || test ! -s conftest.err'
17877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17878   (eval $ac_try) 2>&5
17879   ac_status=$?
17880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17881   (exit $ac_status); }; } &&
17882          { ac_try='test -s conftest.$ac_objext'
17883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17884   (eval $ac_try) 2>&5
17885   ac_status=$?
17886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17887   (exit $ac_status); }; }; then
17888   bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
17889 else
17890   echo "$as_me: failed program was:" >&5
17891 sed 's/^/| /' conftest.$ac_ext >&5
17892
17893 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
17894
17895 fi
17896 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17897 fi
17898
17899  if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
17900
17901 cat >>confdefs.h <<\_ACEOF
17902 #define HAVE_PRFPREGSET32_T 1
17903 _ACEOF
17904
17905  fi
17906  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
17907 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6
17908
17909   echo "$as_me:$LINENO: checking for lwpid_t in sys/procfs.h" >&5
17910 echo $ECHO_N "checking for lwpid_t in sys/procfs.h... $ECHO_C" >&6
17911  if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then
17912   echo $ECHO_N "(cached) $ECHO_C" >&6
17913 else
17914   cat >conftest.$ac_ext <<_ACEOF
17915 /* confdefs.h.  */
17916 _ACEOF
17917 cat confdefs.h >>conftest.$ac_ext
17918 cat >>conftest.$ac_ext <<_ACEOF
17919 /* end confdefs.h.  */
17920
17921 #define _SYSCALL32
17922 #include <sys/procfs.h>
17923 int
17924 main ()
17925 {
17926 lwpid_t avar
17927   ;
17928   return 0;
17929 }
17930 _ACEOF
17931 rm -f conftest.$ac_objext
17932 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17933   (eval $ac_compile) 2>conftest.er1
17934   ac_status=$?
17935   grep -v '^ *+' conftest.er1 >conftest.err
17936   rm -f conftest.er1
17937   cat conftest.err >&5
17938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17939   (exit $ac_status); } &&
17940          { ac_try='test -z "$ac_c_werror_flag"
17941                          || test ! -s conftest.err'
17942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17943   (eval $ac_try) 2>&5
17944   ac_status=$?
17945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17946   (exit $ac_status); }; } &&
17947          { ac_try='test -s conftest.$ac_objext'
17948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17949   (eval $ac_try) 2>&5
17950   ac_status=$?
17951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17952   (exit $ac_status); }; }; then
17953   bfd_cv_have_sys_procfs_type_lwpid_t=yes
17954 else
17955   echo "$as_me: failed program was:" >&5
17956 sed 's/^/| /' conftest.$ac_ext >&5
17957
17958 bfd_cv_have_sys_procfs_type_lwpid_t=no
17959
17960 fi
17961 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17962 fi
17963
17964  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
17965
17966 cat >>confdefs.h <<\_ACEOF
17967 #define HAVE_LWPID_T 1
17968 _ACEOF
17969
17970  fi
17971  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
17972 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpid_t" >&6
17973
17974   echo "$as_me:$LINENO: checking for psaddr_t in sys/procfs.h" >&5
17975 echo $ECHO_N "checking for psaddr_t in sys/procfs.h... $ECHO_C" >&6
17976  if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then
17977   echo $ECHO_N "(cached) $ECHO_C" >&6
17978 else
17979   cat >conftest.$ac_ext <<_ACEOF
17980 /* confdefs.h.  */
17981 _ACEOF
17982 cat confdefs.h >>conftest.$ac_ext
17983 cat >>conftest.$ac_ext <<_ACEOF
17984 /* end confdefs.h.  */
17985
17986 #define _SYSCALL32
17987 #include <sys/procfs.h>
17988 int
17989 main ()
17990 {
17991 psaddr_t avar
17992   ;
17993   return 0;
17994 }
17995 _ACEOF
17996 rm -f conftest.$ac_objext
17997 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17998   (eval $ac_compile) 2>conftest.er1
17999   ac_status=$?
18000   grep -v '^ *+' conftest.er1 >conftest.err
18001   rm -f conftest.er1
18002   cat conftest.err >&5
18003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18004   (exit $ac_status); } &&
18005          { ac_try='test -z "$ac_c_werror_flag"
18006                          || test ! -s conftest.err'
18007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18008   (eval $ac_try) 2>&5
18009   ac_status=$?
18010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18011   (exit $ac_status); }; } &&
18012          { ac_try='test -s conftest.$ac_objext'
18013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18014   (eval $ac_try) 2>&5
18015   ac_status=$?
18016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18017   (exit $ac_status); }; }; then
18018   bfd_cv_have_sys_procfs_type_psaddr_t=yes
18019 else
18020   echo "$as_me: failed program was:" >&5
18021 sed 's/^/| /' conftest.$ac_ext >&5
18022
18023 bfd_cv_have_sys_procfs_type_psaddr_t=no
18024
18025 fi
18026 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18027 fi
18028
18029  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
18030
18031 cat >>confdefs.h <<\_ACEOF
18032 #define HAVE_PSADDR_T 1
18033 _ACEOF
18034
18035  fi
18036  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
18037 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psaddr_t" >&6
18038
18039   echo "$as_me:$LINENO: checking for prsysent_t in sys/procfs.h" >&5
18040 echo $ECHO_N "checking for prsysent_t in sys/procfs.h... $ECHO_C" >&6
18041  if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then
18042   echo $ECHO_N "(cached) $ECHO_C" >&6
18043 else
18044   cat >conftest.$ac_ext <<_ACEOF
18045 /* confdefs.h.  */
18046 _ACEOF
18047 cat confdefs.h >>conftest.$ac_ext
18048 cat >>conftest.$ac_ext <<_ACEOF
18049 /* end confdefs.h.  */
18050
18051 #define _SYSCALL32
18052 #include <sys/procfs.h>
18053 int
18054 main ()
18055 {
18056 prsysent_t avar
18057   ;
18058   return 0;
18059 }
18060 _ACEOF
18061 rm -f conftest.$ac_objext
18062 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18063   (eval $ac_compile) 2>conftest.er1
18064   ac_status=$?
18065   grep -v '^ *+' conftest.er1 >conftest.err
18066   rm -f conftest.er1
18067   cat conftest.err >&5
18068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18069   (exit $ac_status); } &&
18070          { ac_try='test -z "$ac_c_werror_flag"
18071                          || test ! -s conftest.err'
18072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18073   (eval $ac_try) 2>&5
18074   ac_status=$?
18075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18076   (exit $ac_status); }; } &&
18077          { ac_try='test -s conftest.$ac_objext'
18078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18079   (eval $ac_try) 2>&5
18080   ac_status=$?
18081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18082   (exit $ac_status); }; }; then
18083   bfd_cv_have_sys_procfs_type_prsysent_t=yes
18084 else
18085   echo "$as_me: failed program was:" >&5
18086 sed 's/^/| /' conftest.$ac_ext >&5
18087
18088 bfd_cv_have_sys_procfs_type_prsysent_t=no
18089
18090 fi
18091 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18092 fi
18093
18094  if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
18095
18096 cat >>confdefs.h <<\_ACEOF
18097 #define HAVE_PRSYSENT_T 1
18098 _ACEOF
18099
18100  fi
18101  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
18102 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prsysent_t" >&6
18103
18104   echo "$as_me:$LINENO: checking for pr_sigset_t in sys/procfs.h" >&5
18105 echo $ECHO_N "checking for pr_sigset_t in sys/procfs.h... $ECHO_C" >&6
18106  if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then
18107   echo $ECHO_N "(cached) $ECHO_C" >&6
18108 else
18109   cat >conftest.$ac_ext <<_ACEOF
18110 /* confdefs.h.  */
18111 _ACEOF
18112 cat confdefs.h >>conftest.$ac_ext
18113 cat >>conftest.$ac_ext <<_ACEOF
18114 /* end confdefs.h.  */
18115
18116 #define _SYSCALL32
18117 #include <sys/procfs.h>
18118 int
18119 main ()
18120 {
18121 pr_sigset_t avar
18122   ;
18123   return 0;
18124 }
18125 _ACEOF
18126 rm -f conftest.$ac_objext
18127 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18128   (eval $ac_compile) 2>conftest.er1
18129   ac_status=$?
18130   grep -v '^ *+' conftest.er1 >conftest.err
18131   rm -f conftest.er1
18132   cat conftest.err >&5
18133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18134   (exit $ac_status); } &&
18135          { ac_try='test -z "$ac_c_werror_flag"
18136                          || test ! -s conftest.err'
18137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18138   (eval $ac_try) 2>&5
18139   ac_status=$?
18140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18141   (exit $ac_status); }; } &&
18142          { ac_try='test -s conftest.$ac_objext'
18143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18144   (eval $ac_try) 2>&5
18145   ac_status=$?
18146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18147   (exit $ac_status); }; }; then
18148   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
18149 else
18150   echo "$as_me: failed program was:" >&5
18151 sed 's/^/| /' conftest.$ac_ext >&5
18152
18153 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
18154
18155 fi
18156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18157 fi
18158
18159  if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
18160
18161 cat >>confdefs.h <<\_ACEOF
18162 #define HAVE_PR_SIGSET_T 1
18163 _ACEOF
18164
18165  fi
18166  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
18167 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6
18168
18169   echo "$as_me:$LINENO: checking for pr_sigaction64_t in sys/procfs.h" >&5
18170 echo $ECHO_N "checking for pr_sigaction64_t in sys/procfs.h... $ECHO_C" >&6
18171  if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then
18172   echo $ECHO_N "(cached) $ECHO_C" >&6
18173 else
18174   cat >conftest.$ac_ext <<_ACEOF
18175 /* confdefs.h.  */
18176 _ACEOF
18177 cat confdefs.h >>conftest.$ac_ext
18178 cat >>conftest.$ac_ext <<_ACEOF
18179 /* end confdefs.h.  */
18180
18181 #define _SYSCALL32
18182 #include <sys/procfs.h>
18183 int
18184 main ()
18185 {
18186 pr_sigaction64_t avar
18187   ;
18188   return 0;
18189 }
18190 _ACEOF
18191 rm -f conftest.$ac_objext
18192 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18193   (eval $ac_compile) 2>conftest.er1
18194   ac_status=$?
18195   grep -v '^ *+' conftest.er1 >conftest.err
18196   rm -f conftest.er1
18197   cat conftest.err >&5
18198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18199   (exit $ac_status); } &&
18200          { ac_try='test -z "$ac_c_werror_flag"
18201                          || test ! -s conftest.err'
18202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18203   (eval $ac_try) 2>&5
18204   ac_status=$?
18205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18206   (exit $ac_status); }; } &&
18207          { ac_try='test -s conftest.$ac_objext'
18208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18209   (eval $ac_try) 2>&5
18210   ac_status=$?
18211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18212   (exit $ac_status); }; }; then
18213   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
18214 else
18215   echo "$as_me: failed program was:" >&5
18216 sed 's/^/| /' conftest.$ac_ext >&5
18217
18218 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
18219
18220 fi
18221 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18222 fi
18223
18224  if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
18225
18226 cat >>confdefs.h <<\_ACEOF
18227 #define HAVE_PR_SIGACTION64_T 1
18228 _ACEOF
18229
18230  fi
18231  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
18232 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6
18233
18234   echo "$as_me:$LINENO: checking for pr_siginfo64_t in sys/procfs.h" >&5
18235 echo $ECHO_N "checking for pr_siginfo64_t in sys/procfs.h... $ECHO_C" >&6
18236  if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then
18237   echo $ECHO_N "(cached) $ECHO_C" >&6
18238 else
18239   cat >conftest.$ac_ext <<_ACEOF
18240 /* confdefs.h.  */
18241 _ACEOF
18242 cat confdefs.h >>conftest.$ac_ext
18243 cat >>conftest.$ac_ext <<_ACEOF
18244 /* end confdefs.h.  */
18245
18246 #define _SYSCALL32
18247 #include <sys/procfs.h>
18248 int
18249 main ()
18250 {
18251 pr_siginfo64_t avar
18252   ;
18253   return 0;
18254 }
18255 _ACEOF
18256 rm -f conftest.$ac_objext
18257 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18258   (eval $ac_compile) 2>conftest.er1
18259   ac_status=$?
18260   grep -v '^ *+' conftest.er1 >conftest.err
18261   rm -f conftest.er1
18262   cat conftest.err >&5
18263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18264   (exit $ac_status); } &&
18265          { ac_try='test -z "$ac_c_werror_flag"
18266                          || test ! -s conftest.err'
18267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18268   (eval $ac_try) 2>&5
18269   ac_status=$?
18270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18271   (exit $ac_status); }; } &&
18272          { ac_try='test -s conftest.$ac_objext'
18273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18274   (eval $ac_try) 2>&5
18275   ac_status=$?
18276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18277   (exit $ac_status); }; }; then
18278   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
18279 else
18280   echo "$as_me: failed program was:" >&5
18281 sed 's/^/| /' conftest.$ac_ext >&5
18282
18283 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
18284
18285 fi
18286 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18287 fi
18288
18289  if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
18290
18291 cat >>confdefs.h <<\_ACEOF
18292 #define HAVE_PR_SIGINFO64_T 1
18293 _ACEOF
18294
18295  fi
18296  echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
18297 echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6
18298
18299
18300
18301
18302
18303   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
18304     echo "$as_me:$LINENO: checking whether prfpregset_t type is broken" >&5
18305 echo $ECHO_N "checking whether prfpregset_t type is broken... $ECHO_C" >&6
18306     if test "${gdb_cv_prfpregset_t_broken+set}" = set; then
18307   echo $ECHO_N "(cached) $ECHO_C" >&6
18308 else
18309   if test "$cross_compiling" = yes; then
18310   gdb_cv_prfpregset_t_broken=yes
18311 else
18312   cat >conftest.$ac_ext <<_ACEOF
18313 /* confdefs.h.  */
18314 _ACEOF
18315 cat confdefs.h >>conftest.$ac_ext
18316 cat >>conftest.$ac_ext <<_ACEOF
18317 /* end confdefs.h.  */
18318 #include <sys/procfs.h>
18319        int main ()
18320        {
18321          if (sizeof (prfpregset_t) == sizeof (void *))
18322            return 1;
18323          return 0;
18324        }
18325 _ACEOF
18326 rm -f conftest$ac_exeext
18327 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18328   (eval $ac_link) 2>&5
18329   ac_status=$?
18330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18331   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18333   (eval $ac_try) 2>&5
18334   ac_status=$?
18335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18336   (exit $ac_status); }; }; then
18337   gdb_cv_prfpregset_t_broken=no
18338 else
18339   echo "$as_me: program exited with status $ac_status" >&5
18340 echo "$as_me: failed program was:" >&5
18341 sed 's/^/| /' conftest.$ac_ext >&5
18342
18343 ( exit $ac_status )
18344 gdb_cv_prfpregset_t_broken=yes
18345 fi
18346 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18347 fi
18348 fi
18349
18350     echo "$as_me:$LINENO: result: $gdb_cv_prfpregset_t_broken" >&5
18351 echo "${ECHO_T}$gdb_cv_prfpregset_t_broken" >&6
18352     if test $gdb_cv_prfpregset_t_broken = yes; then
18353
18354 cat >>confdefs.h <<\_ACEOF
18355 #define PRFPREGSET_T_BROKEN 1
18356 _ACEOF
18357
18358     fi
18359   fi
18360
18361
18362   echo "$as_me:$LINENO: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
18363 echo $ECHO_N "checking for PIOCSET ioctl entry in sys/procfs.h... $ECHO_C" >&6
18364   if test "${gdb_cv_have_procfs_piocset+set}" = set; then
18365   echo $ECHO_N "(cached) $ECHO_C" >&6
18366 else
18367   cat >conftest.$ac_ext <<_ACEOF
18368 /* confdefs.h.  */
18369 _ACEOF
18370 cat confdefs.h >>conftest.$ac_ext
18371 cat >>conftest.$ac_ext <<_ACEOF
18372 /* end confdefs.h.  */
18373 #include <unistd.h>
18374 #include <sys/types.h>
18375 #include <sys/procfs.h>
18376
18377 int
18378 main ()
18379 {
18380
18381     int dummy;;
18382     dummy = ioctl(0, PIOCSET, &dummy);
18383
18384   ;
18385   return 0;
18386 }
18387 _ACEOF
18388 rm -f conftest.$ac_objext
18389 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18390   (eval $ac_compile) 2>conftest.er1
18391   ac_status=$?
18392   grep -v '^ *+' conftest.er1 >conftest.err
18393   rm -f conftest.er1
18394   cat conftest.err >&5
18395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18396   (exit $ac_status); } &&
18397          { ac_try='test -z "$ac_c_werror_flag"
18398                          || test ! -s conftest.err'
18399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18400   (eval $ac_try) 2>&5
18401   ac_status=$?
18402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18403   (exit $ac_status); }; } &&
18404          { ac_try='test -s conftest.$ac_objext'
18405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18406   (eval $ac_try) 2>&5
18407   ac_status=$?
18408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18409   (exit $ac_status); }; }; then
18410   gdb_cv_have_procfs_piocset=yes
18411 else
18412   echo "$as_me: failed program was:" >&5
18413 sed 's/^/| /' conftest.$ac_ext >&5
18414
18415 gdb_cv_have_procfs_piocset=no
18416 fi
18417 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18418 fi
18419
18420   echo "$as_me:$LINENO: result: $gdb_cv_have_procfs_piocset" >&5
18421 echo "${ECHO_T}$gdb_cv_have_procfs_piocset" >&6
18422   if test $gdb_cv_have_procfs_piocset = yes; then
18423
18424 cat >>confdefs.h <<\_ACEOF
18425 #define HAVE_PROCFS_PIOCSET 1
18426 _ACEOF
18427
18428   fi
18429 fi
18430
18431 if test ${host} = ${target} ; then
18432
18433   echo "$as_me:$LINENO: checking for member l_addr in struct link_map" >&5
18434 echo $ECHO_N "checking for member l_addr in struct link_map... $ECHO_C" >&6
18435   if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then
18436   echo $ECHO_N "(cached) $ECHO_C" >&6
18437 else
18438   cat >conftest.$ac_ext <<_ACEOF
18439 /* confdefs.h.  */
18440 _ACEOF
18441 cat confdefs.h >>conftest.$ac_ext
18442 cat >>conftest.$ac_ext <<_ACEOF
18443 /* end confdefs.h.  */
18444 #include <link.h>
18445 int
18446 main ()
18447 {
18448 struct link_map lm; (void) lm.l_addr;
18449   ;
18450   return 0;
18451 }
18452 _ACEOF
18453 rm -f conftest.$ac_objext
18454 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18455   (eval $ac_compile) 2>conftest.er1
18456   ac_status=$?
18457   grep -v '^ *+' conftest.er1 >conftest.err
18458   rm -f conftest.er1
18459   cat conftest.err >&5
18460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18461   (exit $ac_status); } &&
18462          { ac_try='test -z "$ac_c_werror_flag"
18463                          || test ! -s conftest.err'
18464   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18465   (eval $ac_try) 2>&5
18466   ac_status=$?
18467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18468   (exit $ac_status); }; } &&
18469          { ac_try='test -s conftest.$ac_objext'
18470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18471   (eval $ac_try) 2>&5
18472   ac_status=$?
18473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18474   (exit $ac_status); }; }; then
18475   gdb_cv_have_struct_link_map_with_l_members=yes
18476 else
18477   echo "$as_me: failed program was:" >&5
18478 sed 's/^/| /' conftest.$ac_ext >&5
18479
18480 gdb_cv_have_struct_link_map_with_l_members=no
18481 fi
18482 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18483 fi
18484
18485   echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
18486 echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_l_members" >&6
18487   if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
18488
18489 cat >>confdefs.h <<\_ACEOF
18490 #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
18491 _ACEOF
18492
18493   fi
18494
18495
18496   echo "$as_me:$LINENO: checking for member lm_addr in struct link_map" >&5
18497 echo $ECHO_N "checking for member lm_addr in struct link_map... $ECHO_C" >&6
18498   if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then
18499   echo $ECHO_N "(cached) $ECHO_C" >&6
18500 else
18501   cat >conftest.$ac_ext <<_ACEOF
18502 /* confdefs.h.  */
18503 _ACEOF
18504 cat confdefs.h >>conftest.$ac_ext
18505 cat >>conftest.$ac_ext <<_ACEOF
18506 /* end confdefs.h.  */
18507 #include <sys/types.h>
18508 #include <link.h>
18509 int
18510 main ()
18511 {
18512 struct link_map lm; (void) lm.lm_addr;
18513   ;
18514   return 0;
18515 }
18516 _ACEOF
18517 rm -f conftest.$ac_objext
18518 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18519   (eval $ac_compile) 2>conftest.er1
18520   ac_status=$?
18521   grep -v '^ *+' conftest.er1 >conftest.err
18522   rm -f conftest.er1
18523   cat conftest.err >&5
18524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18525   (exit $ac_status); } &&
18526          { ac_try='test -z "$ac_c_werror_flag"
18527                          || test ! -s conftest.err'
18528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18529   (eval $ac_try) 2>&5
18530   ac_status=$?
18531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18532   (exit $ac_status); }; } &&
18533          { ac_try='test -s conftest.$ac_objext'
18534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18535   (eval $ac_try) 2>&5
18536   ac_status=$?
18537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18538   (exit $ac_status); }; }; then
18539   gdb_cv_have_struct_link_map_with_lm_members=yes
18540 else
18541   echo "$as_me: failed program was:" >&5
18542 sed 's/^/| /' conftest.$ac_ext >&5
18543
18544 gdb_cv_have_struct_link_map_with_lm_members=no
18545 fi
18546 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18547 fi
18548
18549   echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
18550 echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_lm_members" >&6
18551   if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
18552
18553 cat >>confdefs.h <<\_ACEOF
18554 #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
18555 _ACEOF
18556
18557   fi
18558
18559
18560   echo "$as_me:$LINENO: checking for member som_addr in struct so_map" >&5
18561 echo $ECHO_N "checking for member som_addr in struct so_map... $ECHO_C" >&6
18562   if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then
18563   echo $ECHO_N "(cached) $ECHO_C" >&6
18564 else
18565   cat >conftest.$ac_ext <<_ACEOF
18566 /* confdefs.h.  */
18567 _ACEOF
18568 cat confdefs.h >>conftest.$ac_ext
18569 cat >>conftest.$ac_ext <<_ACEOF
18570 /* end confdefs.h.  */
18571 #include <sys/types.h>
18572 #ifdef HAVE_NLIST_H
18573 #include <nlist.h>
18574 #endif
18575 #include <link.h>
18576 int
18577 main ()
18578 {
18579 struct so_map lm; (void) lm.som_addr;
18580   ;
18581   return 0;
18582 }
18583 _ACEOF
18584 rm -f conftest.$ac_objext
18585 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18586   (eval $ac_compile) 2>conftest.er1
18587   ac_status=$?
18588   grep -v '^ *+' conftest.er1 >conftest.err
18589   rm -f conftest.er1
18590   cat conftest.err >&5
18591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18592   (exit $ac_status); } &&
18593          { ac_try='test -z "$ac_c_werror_flag"
18594                          || test ! -s conftest.err'
18595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18596   (eval $ac_try) 2>&5
18597   ac_status=$?
18598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18599   (exit $ac_status); }; } &&
18600          { ac_try='test -s conftest.$ac_objext'
18601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18602   (eval $ac_try) 2>&5
18603   ac_status=$?
18604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18605   (exit $ac_status); }; }; then
18606   gdb_cv_have_struct_so_map_with_som_members=yes
18607 else
18608   echo "$as_me: failed program was:" >&5
18609 sed 's/^/| /' conftest.$ac_ext >&5
18610
18611 gdb_cv_have_struct_so_map_with_som_members=no
18612 fi
18613 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18614 fi
18615
18616   echo "$as_me:$LINENO: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
18617 echo "${ECHO_T}$gdb_cv_have_struct_so_map_with_som_members" >&6
18618   if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
18619
18620 cat >>confdefs.h <<\_ACEOF
18621 #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
18622 _ACEOF
18623
18624   fi
18625
18626
18627   echo "$as_me:$LINENO: checking for struct link_map32 in sys/link.h" >&5
18628 echo $ECHO_N "checking for struct link_map32 in sys/link.h... $ECHO_C" >&6
18629   if test "${gdb_cv_have_struct_link_map32+set}" = set; then
18630   echo $ECHO_N "(cached) $ECHO_C" >&6
18631 else
18632   cat >conftest.$ac_ext <<_ACEOF
18633 /* confdefs.h.  */
18634 _ACEOF
18635 cat confdefs.h >>conftest.$ac_ext
18636 cat >>conftest.$ac_ext <<_ACEOF
18637 /* end confdefs.h.  */
18638 #define _SYSCALL32
18639 #include <sys/link.h>
18640 int
18641 main ()
18642 {
18643 struct link_map32 l;
18644   ;
18645   return 0;
18646 }
18647 _ACEOF
18648 rm -f conftest.$ac_objext
18649 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18650   (eval $ac_compile) 2>conftest.er1
18651   ac_status=$?
18652   grep -v '^ *+' conftest.er1 >conftest.err
18653   rm -f conftest.er1
18654   cat conftest.err >&5
18655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18656   (exit $ac_status); } &&
18657          { ac_try='test -z "$ac_c_werror_flag"
18658                          || test ! -s conftest.err'
18659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18660   (eval $ac_try) 2>&5
18661   ac_status=$?
18662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18663   (exit $ac_status); }; } &&
18664          { ac_try='test -s conftest.$ac_objext'
18665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18666   (eval $ac_try) 2>&5
18667   ac_status=$?
18668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18669   (exit $ac_status); }; }; then
18670   gdb_cv_have_struct_link_map32=yes
18671 else
18672   echo "$as_me: failed program was:" >&5
18673 sed 's/^/| /' conftest.$ac_ext >&5
18674
18675 gdb_cv_have_struct_link_map32=no
18676 fi
18677 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18678 fi
18679
18680   echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map32" >&5
18681 echo "${ECHO_T}$gdb_cv_have_struct_link_map32" >&6
18682   if test $gdb_cv_have_struct_link_map32 = yes; then
18683
18684 cat >>confdefs.h <<\_ACEOF
18685 #define HAVE_STRUCT_LINK_MAP32 1
18686 _ACEOF
18687
18688
18689 cat >>confdefs.h <<\_ACEOF
18690 #define _SYSCALL32 1
18691 _ACEOF
18692
18693   fi
18694 fi
18695
18696 # Check if the compiler supports the `long long' type.
18697
18698 echo "$as_me:$LINENO: checking for long long support in compiler" >&5
18699 echo $ECHO_N "checking for long long support in compiler... $ECHO_C" >&6
18700 if test "${gdb_cv_c_long_long+set}" = set; then
18701   echo $ECHO_N "(cached) $ECHO_C" >&6
18702 else
18703   cat >conftest.$ac_ext <<_ACEOF
18704 /* confdefs.h.  */
18705 _ACEOF
18706 cat confdefs.h >>conftest.$ac_ext
18707 cat >>conftest.$ac_ext <<_ACEOF
18708 /* end confdefs.h.  */
18709 extern long long foo;
18710 int
18711 main ()
18712 {
18713 switch (foo & 2) { case 0: return 1; }
18714   ;
18715   return 0;
18716 }
18717 _ACEOF
18718 rm -f conftest.$ac_objext
18719 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18720   (eval $ac_compile) 2>conftest.er1
18721   ac_status=$?
18722   grep -v '^ *+' conftest.er1 >conftest.err
18723   rm -f conftest.er1
18724   cat conftest.err >&5
18725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18726   (exit $ac_status); } &&
18727          { ac_try='test -z "$ac_c_werror_flag"
18728                          || test ! -s conftest.err'
18729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18730   (eval $ac_try) 2>&5
18731   ac_status=$?
18732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18733   (exit $ac_status); }; } &&
18734          { ac_try='test -s conftest.$ac_objext'
18735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18736   (eval $ac_try) 2>&5
18737   ac_status=$?
18738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18739   (exit $ac_status); }; }; then
18740   gdb_cv_c_long_long=yes
18741 else
18742   echo "$as_me: failed program was:" >&5
18743 sed 's/^/| /' conftest.$ac_ext >&5
18744
18745 gdb_cv_c_long_long=no
18746 fi
18747 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18748 fi
18749 echo "$as_me:$LINENO: result: $gdb_cv_c_long_long" >&5
18750 echo "${ECHO_T}$gdb_cv_c_long_long" >&6
18751 if test $gdb_cv_c_long_long = yes; then
18752
18753 cat >>confdefs.h <<\_ACEOF
18754 #define CC_HAS_LONG_LONG 1
18755 _ACEOF
18756
18757 fi
18758
18759 # Check if the compiler and runtime support printing long longs.
18760
18761 echo "$as_me:$LINENO: checking for long long support in printf" >&5
18762 echo $ECHO_N "checking for long long support in printf... $ECHO_C" >&6
18763 if test "${gdb_cv_printf_has_long_long+set}" = set; then
18764   echo $ECHO_N "(cached) $ECHO_C" >&6
18765 else
18766   if test "$cross_compiling" = yes; then
18767   gdb_cv_printf_has_long_long=no
18768 else
18769   cat >conftest.$ac_ext <<_ACEOF
18770 /* confdefs.h.  */
18771 _ACEOF
18772 cat confdefs.h >>conftest.$ac_ext
18773 cat >>conftest.$ac_ext <<_ACEOF
18774 /* end confdefs.h.  */
18775 $ac_includes_default
18776 int
18777 main ()
18778 {
18779 char buf[32];
18780   long long l = 0;
18781   l = (l << 16) + 0x0123;
18782   l = (l << 16) + 0x4567;
18783   l = (l << 16) + 0x89ab;
18784   l = (l << 16) + 0xcdef;
18785   sprintf (buf, "0x%016llx", l);
18786   return (strcmp ("0x0123456789abcdef", buf));
18787   ;
18788   return 0;
18789 }
18790 _ACEOF
18791 rm -f conftest$ac_exeext
18792 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18793   (eval $ac_link) 2>&5
18794   ac_status=$?
18795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18796   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18798   (eval $ac_try) 2>&5
18799   ac_status=$?
18800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18801   (exit $ac_status); }; }; then
18802   gdb_cv_printf_has_long_long=yes
18803 else
18804   echo "$as_me: program exited with status $ac_status" >&5
18805 echo "$as_me: failed program was:" >&5
18806 sed 's/^/| /' conftest.$ac_ext >&5
18807
18808 ( exit $ac_status )
18809 gdb_cv_printf_has_long_long=no
18810 fi
18811 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18812 fi
18813 fi
18814 echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_long" >&5
18815 echo "${ECHO_T}$gdb_cv_printf_has_long_long" >&6
18816 if test $gdb_cv_printf_has_long_long = yes; then
18817
18818 cat >>confdefs.h <<\_ACEOF
18819 #define PRINTF_HAS_LONG_LONG 1
18820 _ACEOF
18821
18822 fi
18823
18824 # Check if the compiler and runtime support printing decfloats.
18825
18826 echo "$as_me:$LINENO: checking for decfloat support in printf" >&5
18827 echo $ECHO_N "checking for decfloat support in printf... $ECHO_C" >&6
18828 if test "${gdb_cv_printf_has_decfloat+set}" = set; then
18829   echo $ECHO_N "(cached) $ECHO_C" >&6
18830 else
18831   if test "$cross_compiling" = yes; then
18832   gdb_cv_printf_has_decfloat=no
18833 else
18834   cat >conftest.$ac_ext <<_ACEOF
18835 /* confdefs.h.  */
18836 _ACEOF
18837 cat confdefs.h >>conftest.$ac_ext
18838 cat >>conftest.$ac_ext <<_ACEOF
18839 /* end confdefs.h.  */
18840 $ac_includes_default
18841 int
18842 main ()
18843 {
18844 char buf[64];
18845   _Decimal32 d32 = 1.2345df;
18846   _Decimal64 d64 = 1.2345dd;
18847   _Decimal128 d128 = 1.2345dl;
18848   sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
18849   return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
18850   ;
18851   return 0;
18852 }
18853 _ACEOF
18854 rm -f conftest$ac_exeext
18855 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18856   (eval $ac_link) 2>&5
18857   ac_status=$?
18858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18859   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18861   (eval $ac_try) 2>&5
18862   ac_status=$?
18863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18864   (exit $ac_status); }; }; then
18865   gdb_cv_printf_has_decfloat=yes
18866 else
18867   echo "$as_me: program exited with status $ac_status" >&5
18868 echo "$as_me: failed program was:" >&5
18869 sed 's/^/| /' conftest.$ac_ext >&5
18870
18871 ( exit $ac_status )
18872 gdb_cv_printf_has_decfloat=no
18873 fi
18874 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18875 fi
18876 fi
18877 echo "$as_me:$LINENO: result: $gdb_cv_printf_has_decfloat" >&5
18878 echo "${ECHO_T}$gdb_cv_printf_has_decfloat" >&6
18879 if test $gdb_cv_printf_has_decfloat = yes; then
18880
18881 cat >>confdefs.h <<\_ACEOF
18882 #define PRINTF_HAS_DECFLOAT 1
18883 _ACEOF
18884
18885 fi
18886
18887 # Check if the compiler supports the `long double' type.  We can't use
18888 # AC_C_LONG_DOUBLE because that one does additional checks on the
18889 # constants defined in <float.h> that fail on some systems,
18890 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
18891
18892 echo "$as_me:$LINENO: checking for long double support in compiler" >&5
18893 echo $ECHO_N "checking for long double support in compiler... $ECHO_C" >&6
18894 if test "${gdb_cv_c_long_double+set}" = set; then
18895   echo $ECHO_N "(cached) $ECHO_C" >&6
18896 else
18897   cat >conftest.$ac_ext <<_ACEOF
18898 /* confdefs.h.  */
18899 _ACEOF
18900 cat confdefs.h >>conftest.$ac_ext
18901 cat >>conftest.$ac_ext <<_ACEOF
18902 /* end confdefs.h.  */
18903 long double foo;
18904 _ACEOF
18905 rm -f conftest.$ac_objext
18906 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18907   (eval $ac_compile) 2>conftest.er1
18908   ac_status=$?
18909   grep -v '^ *+' conftest.er1 >conftest.err
18910   rm -f conftest.er1
18911   cat conftest.err >&5
18912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18913   (exit $ac_status); } &&
18914          { ac_try='test -z "$ac_c_werror_flag"
18915                          || test ! -s conftest.err'
18916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18917   (eval $ac_try) 2>&5
18918   ac_status=$?
18919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18920   (exit $ac_status); }; } &&
18921          { ac_try='test -s conftest.$ac_objext'
18922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18923   (eval $ac_try) 2>&5
18924   ac_status=$?
18925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18926   (exit $ac_status); }; }; then
18927   gdb_cv_c_long_double=yes
18928 else
18929   echo "$as_me: failed program was:" >&5
18930 sed 's/^/| /' conftest.$ac_ext >&5
18931
18932 gdb_cv_c_long_double=no
18933 fi
18934 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18935 fi
18936 echo "$as_me:$LINENO: result: $gdb_cv_c_long_double" >&5
18937 echo "${ECHO_T}$gdb_cv_c_long_double" >&6
18938 if test $gdb_cv_c_long_double = yes; then
18939
18940 cat >>confdefs.h <<\_ACEOF
18941 #define HAVE_LONG_DOUBLE 1
18942 _ACEOF
18943
18944 fi
18945
18946 # Check if the compiler and runtime support printing long doubles.
18947
18948 echo "$as_me:$LINENO: checking for long double support in printf" >&5
18949 echo $ECHO_N "checking for long double support in printf... $ECHO_C" >&6
18950 if test "${gdb_cv_printf_has_long_double+set}" = set; then
18951   echo $ECHO_N "(cached) $ECHO_C" >&6
18952 else
18953   if test "$cross_compiling" = yes; then
18954   gdb_cv_printf_has_long_double=no
18955 else
18956   cat >conftest.$ac_ext <<_ACEOF
18957 /* confdefs.h.  */
18958 _ACEOF
18959 cat confdefs.h >>conftest.$ac_ext
18960 cat >>conftest.$ac_ext <<_ACEOF
18961 /* end confdefs.h.  */
18962 $ac_includes_default
18963 int
18964 main ()
18965 {
18966 char buf[16];
18967   long double f = 3.141592653;
18968   sprintf (buf, "%Lg", f);
18969   return (strncmp ("3.14159", buf, 7));
18970   ;
18971   return 0;
18972 }
18973 _ACEOF
18974 rm -f conftest$ac_exeext
18975 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18976   (eval $ac_link) 2>&5
18977   ac_status=$?
18978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18979   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18981   (eval $ac_try) 2>&5
18982   ac_status=$?
18983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18984   (exit $ac_status); }; }; then
18985   gdb_cv_printf_has_long_double=yes
18986 else
18987   echo "$as_me: program exited with status $ac_status" >&5
18988 echo "$as_me: failed program was:" >&5
18989 sed 's/^/| /' conftest.$ac_ext >&5
18990
18991 ( exit $ac_status )
18992 gdb_cv_printf_has_long_double=no
18993 fi
18994 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18995 fi
18996 fi
18997 echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_double" >&5
18998 echo "${ECHO_T}$gdb_cv_printf_has_long_double" >&6
18999 if test $gdb_cv_printf_has_long_double = yes; then
19000
19001 cat >>confdefs.h <<\_ACEOF
19002 #define PRINTF_HAS_LONG_DOUBLE 1
19003 _ACEOF
19004
19005 fi
19006
19007 # Check if the compiler and runtime support scanning long doubles.
19008
19009 echo "$as_me:$LINENO: checking for long double support in scanf" >&5
19010 echo $ECHO_N "checking for long double support in scanf... $ECHO_C" >&6
19011 if test "${gdb_cv_scanf_has_long_double+set}" = set; then
19012   echo $ECHO_N "(cached) $ECHO_C" >&6
19013 else
19014   if test "$cross_compiling" = yes; then
19015   gdb_cv_scanf_has_long_double=no
19016 else
19017   cat >conftest.$ac_ext <<_ACEOF
19018 /* confdefs.h.  */
19019 _ACEOF
19020 cat confdefs.h >>conftest.$ac_ext
19021 cat >>conftest.$ac_ext <<_ACEOF
19022 /* end confdefs.h.  */
19023 #include <stdio.h>
19024 int
19025 main ()
19026 {
19027 char *buf = "3.141592653";
19028   long double f = 0;
19029   sscanf (buf, "%Lg", &f);
19030   return !(f > 3.14159 && f < 3.14160);
19031   ;
19032   return 0;
19033 }
19034 _ACEOF
19035 rm -f conftest$ac_exeext
19036 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19037   (eval $ac_link) 2>&5
19038   ac_status=$?
19039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19040   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19042   (eval $ac_try) 2>&5
19043   ac_status=$?
19044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19045   (exit $ac_status); }; }; then
19046   gdb_cv_scanf_has_long_double=yes
19047 else
19048   echo "$as_me: program exited with status $ac_status" >&5
19049 echo "$as_me: failed program was:" >&5
19050 sed 's/^/| /' conftest.$ac_ext >&5
19051
19052 ( exit $ac_status )
19053 gdb_cv_scanf_has_long_double=no
19054 fi
19055 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19056 fi
19057 fi
19058 echo "$as_me:$LINENO: result: $gdb_cv_scanf_has_long_double" >&5
19059 echo "${ECHO_T}$gdb_cv_scanf_has_long_double" >&6
19060 if test $gdb_cv_scanf_has_long_double = yes; then
19061
19062 cat >>confdefs.h <<\_ACEOF
19063 #define SCANF_HAS_LONG_DOUBLE 1
19064 _ACEOF
19065
19066 fi
19067
19068 case ${host_os} in
19069 aix*)
19070   echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
19071 echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
19072 if test "${gdb_cv_bigtoc+set}" = set; then
19073   echo $ECHO_N "(cached) $ECHO_C" >&6
19074 else
19075
19076     SAVE_LDFLAGS=$LDFLAGS
19077
19078     case $GCC in
19079     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
19080     *) gdb_cv_bigtoc=-bbigtoc ;;
19081     esac
19082
19083     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
19084     cat >conftest.$ac_ext <<_ACEOF
19085 /* confdefs.h.  */
19086 _ACEOF
19087 cat confdefs.h >>conftest.$ac_ext
19088 cat >>conftest.$ac_ext <<_ACEOF
19089 /* end confdefs.h.  */
19090
19091 int
19092 main ()
19093 {
19094 int i;
19095   ;
19096   return 0;
19097 }
19098 _ACEOF
19099 rm -f conftest.$ac_objext conftest$ac_exeext
19100 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19101   (eval $ac_link) 2>conftest.er1
19102   ac_status=$?
19103   grep -v '^ *+' conftest.er1 >conftest.err
19104   rm -f conftest.er1
19105   cat conftest.err >&5
19106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19107   (exit $ac_status); } &&
19108          { ac_try='test -z "$ac_c_werror_flag"
19109                          || test ! -s conftest.err'
19110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19111   (eval $ac_try) 2>&5
19112   ac_status=$?
19113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19114   (exit $ac_status); }; } &&
19115          { ac_try='test -s conftest$ac_exeext'
19116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19117   (eval $ac_try) 2>&5
19118   ac_status=$?
19119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19120   (exit $ac_status); }; }; then
19121   :
19122 else
19123   echo "$as_me: failed program was:" >&5
19124 sed 's/^/| /' conftest.$ac_ext >&5
19125
19126 gdb_cv_bigtoc=
19127 fi
19128 rm -f conftest.err conftest.$ac_objext \
19129       conftest$ac_exeext conftest.$ac_ext
19130     LDFLAGS="${SAVE_LDFLAGS}"
19131
19132 fi
19133 echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
19134 echo "${ECHO_T}$gdb_cv_bigtoc" >&6
19135   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
19136   ;;
19137 esac
19138
19139
19140
19141 if test ${build} = ${host} -a ${host} = ${target} ; then
19142    case ${host_os} in
19143    hpux*)
19144       echo "$as_me:$LINENO: checking for HPUX/OSF thread support" >&5
19145 echo $ECHO_N "checking for HPUX/OSF thread support... $ECHO_C" >&6
19146       if test -f /usr/include/dce/cma_config.h ; then
19147          if test "$GCC" = "yes" ; then
19148             echo "$as_me:$LINENO: result: yes" >&5
19149 echo "${ECHO_T}yes" >&6
19150
19151 cat >>confdefs.h <<\_ACEOF
19152 #define HAVE_HPUX_THREAD_SUPPORT 1
19153 _ACEOF
19154
19155             CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
19156             CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
19157          else
19158             echo "$as_me:$LINENO: result: no (suppressed because you are not using GCC)" >&5
19159 echo "${ECHO_T}no (suppressed because you are not using GCC)" >&6
19160          fi
19161       else
19162          echo "$as_me:$LINENO: result: no" >&5
19163 echo "${ECHO_T}no" >&6
19164       fi
19165       ;;
19166    solaris*)
19167       # See if thread_db library is around for Solaris thread debugging.
19168       # Note that we must explicitly test for version 1 of the library
19169       # because version 0 (present on Solaris 2.4 or earlier) doesn't have
19170       # the same API.
19171       echo "$as_me:$LINENO: checking for Solaris thread debugging library" >&5
19172 echo $ECHO_N "checking for Solaris thread debugging library... $ECHO_C" >&6
19173       if test -f /usr/lib/libthread_db.so.1 ; then
19174          echo "$as_me:$LINENO: result: yes" >&5
19175 echo "${ECHO_T}yes" >&6
19176
19177 cat >>confdefs.h <<\_ACEOF
19178 #define HAVE_THREAD_DB_LIB 1
19179 _ACEOF
19180
19181          CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
19182          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
19183
19184 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19185 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
19186 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19187   echo $ECHO_N "(cached) $ECHO_C" >&6
19188 else
19189   ac_check_lib_save_LIBS=$LIBS
19190 LIBS="-ldl  $LIBS"
19191 cat >conftest.$ac_ext <<_ACEOF
19192 /* confdefs.h.  */
19193 _ACEOF
19194 cat confdefs.h >>conftest.$ac_ext
19195 cat >>conftest.$ac_ext <<_ACEOF
19196 /* end confdefs.h.  */
19197
19198 /* Override any gcc2 internal prototype to avoid an error.  */
19199 #ifdef __cplusplus
19200 extern "C"
19201 #endif
19202 /* We use char because int might match the return type of a gcc2
19203    builtin and then its argument prototype would still apply.  */
19204 char dlopen ();
19205 int
19206 main ()
19207 {
19208 dlopen ();
19209   ;
19210   return 0;
19211 }
19212 _ACEOF
19213 rm -f conftest.$ac_objext conftest$ac_exeext
19214 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19215   (eval $ac_link) 2>conftest.er1
19216   ac_status=$?
19217   grep -v '^ *+' conftest.er1 >conftest.err
19218   rm -f conftest.er1
19219   cat conftest.err >&5
19220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19221   (exit $ac_status); } &&
19222          { ac_try='test -z "$ac_c_werror_flag"
19223                          || test ! -s conftest.err'
19224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19225   (eval $ac_try) 2>&5
19226   ac_status=$?
19227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19228   (exit $ac_status); }; } &&
19229          { ac_try='test -s conftest$ac_exeext'
19230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19231   (eval $ac_try) 2>&5
19232   ac_status=$?
19233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19234   (exit $ac_status); }; }; then
19235   ac_cv_lib_dl_dlopen=yes
19236 else
19237   echo "$as_me: failed program was:" >&5
19238 sed 's/^/| /' conftest.$ac_ext >&5
19239
19240 ac_cv_lib_dl_dlopen=no
19241 fi
19242 rm -f conftest.err conftest.$ac_objext \
19243       conftest$ac_exeext conftest.$ac_ext
19244 LIBS=$ac_check_lib_save_LIBS
19245 fi
19246 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19247 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
19248 if test $ac_cv_lib_dl_dlopen = yes; then
19249   cat >>confdefs.h <<_ACEOF
19250 #define HAVE_LIBDL 1
19251 _ACEOF
19252
19253   LIBS="-ldl $LIBS"
19254
19255 fi
19256
19257          if test "$GCC" = "yes" ; then
19258             # The GNU linker requires the -export-dynamic option to make
19259             # all symbols visible in the dynamic symbol table.
19260             hold_ldflags=$LDFLAGS
19261             echo "$as_me:$LINENO: checking for the ld -export-dynamic flag" >&5
19262 echo $ECHO_N "checking for the ld -export-dynamic flag... $ECHO_C" >&6
19263             LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
19264             cat >conftest.$ac_ext <<_ACEOF
19265 /* confdefs.h.  */
19266 _ACEOF
19267 cat confdefs.h >>conftest.$ac_ext
19268 cat >>conftest.$ac_ext <<_ACEOF
19269 /* end confdefs.h.  */
19270
19271 int
19272 main ()
19273 {
19274 int i;
19275   ;
19276   return 0;
19277 }
19278 _ACEOF
19279 rm -f conftest.$ac_objext conftest$ac_exeext
19280 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19281   (eval $ac_link) 2>conftest.er1
19282   ac_status=$?
19283   grep -v '^ *+' conftest.er1 >conftest.err
19284   rm -f conftest.er1
19285   cat conftest.err >&5
19286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19287   (exit $ac_status); } &&
19288          { ac_try='test -z "$ac_c_werror_flag"
19289                          || test ! -s conftest.err'
19290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19291   (eval $ac_try) 2>&5
19292   ac_status=$?
19293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19294   (exit $ac_status); }; } &&
19295          { ac_try='test -s conftest$ac_exeext'
19296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19297   (eval $ac_try) 2>&5
19298   ac_status=$?
19299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19300   (exit $ac_status); }; }; then
19301   found=yes
19302 else
19303   echo "$as_me: failed program was:" >&5
19304 sed 's/^/| /' conftest.$ac_ext >&5
19305
19306 found=no
19307 fi
19308 rm -f conftest.err conftest.$ac_objext \
19309       conftest$ac_exeext conftest.$ac_ext
19310             LDFLAGS=$hold_ldflags
19311             echo "$as_me:$LINENO: result: $found" >&5
19312 echo "${ECHO_T}$found" >&6
19313             if test $found = yes; then
19314                CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
19315             fi
19316          fi
19317          # Sun randomly tweaked the prototypes in <proc_service.h>
19318          # at one point.
19319          echo "$as_me:$LINENO: checking if <proc_service.h> is old" >&5
19320 echo $ECHO_N "checking if <proc_service.h> is old... $ECHO_C" >&6
19321          if test "${gdb_cv_proc_service_is_old+set}" = set; then
19322   echo $ECHO_N "(cached) $ECHO_C" >&6
19323 else
19324
19325             cat >conftest.$ac_ext <<_ACEOF
19326 /* confdefs.h.  */
19327 _ACEOF
19328 cat confdefs.h >>conftest.$ac_ext
19329 cat >>conftest.$ac_ext <<_ACEOF
19330 /* end confdefs.h.  */
19331
19332                 #include <proc_service.h>
19333                 ps_err_e ps_pdwrite
19334                     (struct ps_prochandle*, psaddr_t, const void*, size_t);
19335
19336 int
19337 main ()
19338 {
19339
19340   ;
19341   return 0;
19342 }
19343 _ACEOF
19344 rm -f conftest.$ac_objext
19345 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19346   (eval $ac_compile) 2>conftest.er1
19347   ac_status=$?
19348   grep -v '^ *+' conftest.er1 >conftest.err
19349   rm -f conftest.er1
19350   cat conftest.err >&5
19351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19352   (exit $ac_status); } &&
19353          { ac_try='test -z "$ac_c_werror_flag"
19354                          || test ! -s conftest.err'
19355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19356   (eval $ac_try) 2>&5
19357   ac_status=$?
19358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19359   (exit $ac_status); }; } &&
19360          { ac_try='test -s conftest.$ac_objext'
19361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19362   (eval $ac_try) 2>&5
19363   ac_status=$?
19364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19365   (exit $ac_status); }; }; then
19366   gdb_cv_proc_service_is_old=no
19367 else
19368   echo "$as_me: failed program was:" >&5
19369 sed 's/^/| /' conftest.$ac_ext >&5
19370
19371 gdb_cv_proc_service_is_old=yes
19372 fi
19373 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19374
19375 fi
19376
19377          echo "$as_me:$LINENO: result: $gdb_cv_proc_service_is_old" >&5
19378 echo "${ECHO_T}$gdb_cv_proc_service_is_old" >&6
19379          if test $gdb_cv_proc_service_is_old = yes; then
19380
19381 cat >>confdefs.h <<\_ACEOF
19382 #define PROC_SERVICE_IS_OLD 1
19383 _ACEOF
19384
19385          fi
19386       else
19387          echo "$as_me:$LINENO: result: no" >&5
19388 echo "${ECHO_T}no" >&6
19389       fi
19390       ;;
19391    aix*)
19392       echo "$as_me:$LINENO: checking for AiX thread debugging library" >&5
19393 echo $ECHO_N "checking for AiX thread debugging library... $ECHO_C" >&6
19394       if test "${gdb_cv_have_aix_thread_debug+set}" = set; then
19395   echo $ECHO_N "(cached) $ECHO_C" >&6
19396 else
19397   cat >conftest.$ac_ext <<_ACEOF
19398 /* confdefs.h.  */
19399 _ACEOF
19400 cat confdefs.h >>conftest.$ac_ext
19401 cat >>conftest.$ac_ext <<_ACEOF
19402 /* end confdefs.h.  */
19403 #include <sys/pthdebug.h>
19404 int
19405 main ()
19406 {
19407 #ifndef PTHDB_VERSION_3
19408                                     #error
19409                                     #endif
19410   ;
19411   return 0;
19412 }
19413 _ACEOF
19414 rm -f conftest.$ac_objext
19415 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19416   (eval $ac_compile) 2>conftest.er1
19417   ac_status=$?
19418   grep -v '^ *+' conftest.er1 >conftest.err
19419   rm -f conftest.er1
19420   cat conftest.err >&5
19421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19422   (exit $ac_status); } &&
19423          { ac_try='test -z "$ac_c_werror_flag"
19424                          || test ! -s conftest.err'
19425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19426   (eval $ac_try) 2>&5
19427   ac_status=$?
19428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19429   (exit $ac_status); }; } &&
19430          { ac_try='test -s conftest.$ac_objext'
19431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19432   (eval $ac_try) 2>&5
19433   ac_status=$?
19434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19435   (exit $ac_status); }; }; then
19436   gdb_cv_have_aix_thread_debug=yes
19437 else
19438   echo "$as_me: failed program was:" >&5
19439 sed 's/^/| /' conftest.$ac_ext >&5
19440
19441 gdb_cv_have_aix_thread_debug=no
19442 fi
19443 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19444 fi
19445
19446       echo "$as_me:$LINENO: result: $gdb_cv_have_aix_thread_debug" >&5
19447 echo "${ECHO_T}$gdb_cv_have_aix_thread_debug" >&6
19448       if test $gdb_cv_have_aix_thread_debug = yes; then
19449          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
19450          CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
19451          CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
19452       fi
19453       ;;
19454    esac
19455
19456 fi
19457
19458 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
19459    echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTALLOC" >&5
19460 echo $ECHO_N "checking whether <thread_db.h> has TD_NOTALLOC... $ECHO_C" >&6
19461 if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then
19462   echo $ECHO_N "(cached) $ECHO_C" >&6
19463 else
19464   cat >conftest.$ac_ext <<_ACEOF
19465 /* confdefs.h.  */
19466 _ACEOF
19467 cat confdefs.h >>conftest.$ac_ext
19468 cat >>conftest.$ac_ext <<_ACEOF
19469 /* end confdefs.h.  */
19470 #include <thread_db.h>
19471 int
19472 main ()
19473 {
19474 int i = TD_NOTALLOC;
19475   ;
19476   return 0;
19477 }
19478 _ACEOF
19479 rm -f conftest.$ac_objext
19480 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19481   (eval $ac_compile) 2>conftest.er1
19482   ac_status=$?
19483   grep -v '^ *+' conftest.er1 >conftest.err
19484   rm -f conftest.er1
19485   cat conftest.err >&5
19486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19487   (exit $ac_status); } &&
19488          { ac_try='test -z "$ac_c_werror_flag"
19489                          || test ! -s conftest.err'
19490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19491   (eval $ac_try) 2>&5
19492   ac_status=$?
19493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19494   (exit $ac_status); }; } &&
19495          { ac_try='test -s conftest.$ac_objext'
19496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19497   (eval $ac_try) 2>&5
19498   ac_status=$?
19499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19500   (exit $ac_status); }; }; then
19501   gdb_cv_thread_db_h_has_td_notalloc=yes
19502 else
19503   echo "$as_me: failed program was:" >&5
19504 sed 's/^/| /' conftest.$ac_ext >&5
19505
19506 gdb_cv_thread_db_h_has_td_notalloc=no
19507
19508 fi
19509 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19510
19511 fi
19512 echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
19513 echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notalloc" >&6
19514    echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_VERSION" >&5
19515 echo $ECHO_N "checking whether <thread_db.h> has TD_VERSION... $ECHO_C" >&6
19516 if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then
19517   echo $ECHO_N "(cached) $ECHO_C" >&6
19518 else
19519   cat >conftest.$ac_ext <<_ACEOF
19520 /* confdefs.h.  */
19521 _ACEOF
19522 cat confdefs.h >>conftest.$ac_ext
19523 cat >>conftest.$ac_ext <<_ACEOF
19524 /* end confdefs.h.  */
19525 #include <thread_db.h>
19526 int
19527 main ()
19528 {
19529 int i = TD_VERSION;
19530   ;
19531   return 0;
19532 }
19533 _ACEOF
19534 rm -f conftest.$ac_objext
19535 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19536   (eval $ac_compile) 2>conftest.er1
19537   ac_status=$?
19538   grep -v '^ *+' conftest.er1 >conftest.err
19539   rm -f conftest.er1
19540   cat conftest.err >&5
19541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19542   (exit $ac_status); } &&
19543          { ac_try='test -z "$ac_c_werror_flag"
19544                          || test ! -s conftest.err'
19545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19546   (eval $ac_try) 2>&5
19547   ac_status=$?
19548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19549   (exit $ac_status); }; } &&
19550          { ac_try='test -s conftest.$ac_objext'
19551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19552   (eval $ac_try) 2>&5
19553   ac_status=$?
19554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19555   (exit $ac_status); }; }; then
19556   gdb_cv_thread_db_h_has_td_version=yes
19557 else
19558   echo "$as_me: failed program was:" >&5
19559 sed 's/^/| /' conftest.$ac_ext >&5
19560
19561 gdb_cv_thread_db_h_has_td_version=no
19562
19563 fi
19564 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19565
19566 fi
19567 echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_version" >&5
19568 echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_version" >&6
19569    echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTLS" >&5
19570 echo $ECHO_N "checking whether <thread_db.h> has TD_NOTLS... $ECHO_C" >&6
19571 if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then
19572   echo $ECHO_N "(cached) $ECHO_C" >&6
19573 else
19574   cat >conftest.$ac_ext <<_ACEOF
19575 /* confdefs.h.  */
19576 _ACEOF
19577 cat confdefs.h >>conftest.$ac_ext
19578 cat >>conftest.$ac_ext <<_ACEOF
19579 /* end confdefs.h.  */
19580 #include <thread_db.h>
19581 int
19582 main ()
19583 {
19584 int i = TD_NOTLS;
19585   ;
19586   return 0;
19587 }
19588 _ACEOF
19589 rm -f conftest.$ac_objext
19590 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19591   (eval $ac_compile) 2>conftest.er1
19592   ac_status=$?
19593   grep -v '^ *+' conftest.er1 >conftest.err
19594   rm -f conftest.er1
19595   cat conftest.err >&5
19596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19597   (exit $ac_status); } &&
19598          { ac_try='test -z "$ac_c_werror_flag"
19599                          || test ! -s conftest.err'
19600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19601   (eval $ac_try) 2>&5
19602   ac_status=$?
19603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19604   (exit $ac_status); }; } &&
19605          { ac_try='test -s conftest.$ac_objext'
19606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19607   (eval $ac_try) 2>&5
19608   ac_status=$?
19609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19610   (exit $ac_status); }; }; then
19611   gdb_cv_thread_db_h_has_td_notls=yes
19612 else
19613   echo "$as_me: failed program was:" >&5
19614 sed 's/^/| /' conftest.$ac_ext >&5
19615
19616 gdb_cv_thread_db_h_has_td_notls=no
19617
19618 fi
19619 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19620
19621 fi
19622 echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notls" >&5
19623 echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notls" >&6
19624 fi
19625 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
19626
19627 cat >>confdefs.h <<\_ACEOF
19628 #define THREAD_DB_HAS_TD_NOTALLOC 1
19629 _ACEOF
19630
19631 fi
19632 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
19633
19634 cat >>confdefs.h <<\_ACEOF
19635 #define THREAD_DB_HAS_TD_VERSION 1
19636 _ACEOF
19637
19638 fi
19639 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
19640
19641 cat >>confdefs.h <<\_ACEOF
19642 #define THREAD_DB_HAS_TD_NOTLS 1
19643 _ACEOF
19644
19645 fi
19646
19647 if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
19648    echo "$as_me:$LINENO: checking whether <sys/syscall.h> has __NR_tkill" >&5
19649 echo $ECHO_N "checking whether <sys/syscall.h> has __NR_tkill... $ECHO_C" >&6
19650 if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then
19651   echo $ECHO_N "(cached) $ECHO_C" >&6
19652 else
19653   cat >conftest.$ac_ext <<_ACEOF
19654 /* confdefs.h.  */
19655 _ACEOF
19656 cat confdefs.h >>conftest.$ac_ext
19657 cat >>conftest.$ac_ext <<_ACEOF
19658 /* end confdefs.h.  */
19659 #include <sys/syscall.h>
19660 int
19661 main ()
19662 {
19663 int i = __NR_tkill;
19664   ;
19665   return 0;
19666 }
19667 _ACEOF
19668 rm -f conftest.$ac_objext
19669 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19670   (eval $ac_compile) 2>conftest.er1
19671   ac_status=$?
19672   grep -v '^ *+' conftest.er1 >conftest.err
19673   rm -f conftest.er1
19674   cat conftest.err >&5
19675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19676   (exit $ac_status); } &&
19677          { ac_try='test -z "$ac_c_werror_flag"
19678                          || test ! -s conftest.err'
19679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19680   (eval $ac_try) 2>&5
19681   ac_status=$?
19682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19683   (exit $ac_status); }; } &&
19684          { ac_try='test -s conftest.$ac_objext'
19685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19686   (eval $ac_try) 2>&5
19687   ac_status=$?
19688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19689   (exit $ac_status); }; }; then
19690   gdb_cv_sys_syscall_h_has_tkill=yes
19691 else
19692   echo "$as_me: failed program was:" >&5
19693 sed 's/^/| /' conftest.$ac_ext >&5
19694
19695 gdb_cv_sys_syscall_h_has_tkill=no
19696
19697 fi
19698 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19699
19700 fi
19701 echo "$as_me:$LINENO: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
19702 echo "${ECHO_T}$gdb_cv_sys_syscall_h_has_tkill" >&6
19703 fi
19704 if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
19705
19706 cat >>confdefs.h <<\_ACEOF
19707 #define HAVE_TKILL_SYSCALL 1
19708 _ACEOF
19709
19710 fi
19711
19712 echo "$as_me:$LINENO: checking whether ADDR_NO_RANDOMIZE is declared" >&5
19713 echo $ECHO_N "checking whether ADDR_NO_RANDOMIZE is declared... $ECHO_C" >&6
19714 if test "${ac_cv_have_decl_ADDR_NO_RANDOMIZE+set}" = set; then
19715   echo $ECHO_N "(cached) $ECHO_C" >&6
19716 else
19717   cat >conftest.$ac_ext <<_ACEOF
19718 /* confdefs.h.  */
19719 _ACEOF
19720 cat confdefs.h >>conftest.$ac_ext
19721 cat >>conftest.$ac_ext <<_ACEOF
19722 /* end confdefs.h.  */
19723 #include <sys/personality.h>
19724
19725 int
19726 main ()
19727 {
19728 #ifndef ADDR_NO_RANDOMIZE
19729   char *p = (char *) ADDR_NO_RANDOMIZE;
19730 #endif
19731
19732   ;
19733   return 0;
19734 }
19735 _ACEOF
19736 rm -f conftest.$ac_objext
19737 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19738   (eval $ac_compile) 2>conftest.er1
19739   ac_status=$?
19740   grep -v '^ *+' conftest.er1 >conftest.err
19741   rm -f conftest.er1
19742   cat conftest.err >&5
19743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19744   (exit $ac_status); } &&
19745          { ac_try='test -z "$ac_c_werror_flag"
19746                          || test ! -s conftest.err'
19747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19748   (eval $ac_try) 2>&5
19749   ac_status=$?
19750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19751   (exit $ac_status); }; } &&
19752          { ac_try='test -s conftest.$ac_objext'
19753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19754   (eval $ac_try) 2>&5
19755   ac_status=$?
19756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19757   (exit $ac_status); }; }; then
19758   ac_cv_have_decl_ADDR_NO_RANDOMIZE=yes
19759 else
19760   echo "$as_me: failed program was:" >&5
19761 sed 's/^/| /' conftest.$ac_ext >&5
19762
19763 ac_cv_have_decl_ADDR_NO_RANDOMIZE=no
19764 fi
19765 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19766 fi
19767 echo "$as_me:$LINENO: result: $ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&5
19768 echo "${ECHO_T}$ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&6
19769 if test $ac_cv_have_decl_ADDR_NO_RANDOMIZE = yes; then
19770
19771 cat >>confdefs.h <<_ACEOF
19772 #define HAVE_DECL_ADDR_NO_RANDOMIZE 1
19773 _ACEOF
19774
19775
19776 else
19777   cat >>confdefs.h <<_ACEOF
19778 #define HAVE_DECL_ADDR_NO_RANDOMIZE 0
19779 _ACEOF
19780
19781
19782 fi
19783
19784
19785
19786 if test "$cross_compiling" = yes; then
19787   cat >conftest.$ac_ext <<_ACEOF
19788 /* confdefs.h.  */
19789 _ACEOF
19790 cat confdefs.h >>conftest.$ac_ext
19791 cat >>conftest.$ac_ext <<_ACEOF
19792 /* end confdefs.h.  */
19793 #include <sys/personality.h>
19794 int
19795 main ()
19796 {
19797
19798 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
19799 #       define ADDR_NO_RANDOMIZE 0x0040000
19800 #      endif
19801        /* Test the flag could be set and stays set.  */
19802        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19803        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19804            return 1
19805   ;
19806   return 0;
19807 }
19808 _ACEOF
19809 rm -f conftest.$ac_objext conftest$ac_exeext
19810 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19811   (eval $ac_link) 2>conftest.er1
19812   ac_status=$?
19813   grep -v '^ *+' conftest.er1 >conftest.err
19814   rm -f conftest.er1
19815   cat conftest.err >&5
19816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19817   (exit $ac_status); } &&
19818          { ac_try='test -z "$ac_c_werror_flag"
19819                          || test ! -s conftest.err'
19820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19821   (eval $ac_try) 2>&5
19822   ac_status=$?
19823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19824   (exit $ac_status); }; } &&
19825          { ac_try='test -s conftest$ac_exeext'
19826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19827   (eval $ac_try) 2>&5
19828   ac_status=$?
19829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19830   (exit $ac_status); }; }; then
19831   have_personality=true
19832 else
19833   echo "$as_me: failed program was:" >&5
19834 sed 's/^/| /' conftest.$ac_ext >&5
19835
19836 have_personality=false
19837 fi
19838 rm -f conftest.err conftest.$ac_objext \
19839       conftest$ac_exeext conftest.$ac_ext
19840 else
19841   cat >conftest.$ac_ext <<_ACEOF
19842 /* confdefs.h.  */
19843 _ACEOF
19844 cat confdefs.h >>conftest.$ac_ext
19845 cat >>conftest.$ac_ext <<_ACEOF
19846 /* end confdefs.h.  */
19847 #include <sys/personality.h>
19848 int
19849 main ()
19850 {
19851
19852 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
19853 #       define ADDR_NO_RANDOMIZE 0x0040000
19854 #      endif
19855        /* Test the flag could be set and stays set.  */
19856        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19857        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19858            return 1
19859   ;
19860   return 0;
19861 }
19862 _ACEOF
19863 rm -f conftest$ac_exeext
19864 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19865   (eval $ac_link) 2>&5
19866   ac_status=$?
19867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19868   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19870   (eval $ac_try) 2>&5
19871   ac_status=$?
19872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19873   (exit $ac_status); }; }; then
19874   have_personality=true
19875 else
19876   echo "$as_me: program exited with status $ac_status" >&5
19877 echo "$as_me: failed program was:" >&5
19878 sed 's/^/| /' conftest.$ac_ext >&5
19879
19880 ( exit $ac_status )
19881 have_personality=false
19882 fi
19883 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19884 fi
19885 if $have_personality
19886 then
19887
19888 cat >>confdefs.h <<\_ACEOF
19889 #define HAVE_PERSONALITY 1
19890 _ACEOF
19891
19892 fi
19893
19894
19895
19896 # Check whether --with-sysroot or --without-sysroot was given.
19897 if test "${with_sysroot+set}" = set; then
19898   withval="$with_sysroot"
19899
19900  case ${with_sysroot} in
19901  yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
19902  *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
19903  esac
19904
19905  TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
19906
19907  if test "x$prefix" = xNONE; then
19908   test_prefix=/usr/local
19909  else
19910   test_prefix=$prefix
19911  fi
19912  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
19913   test_exec_prefix=$test_prefix
19914  else
19915   test_exec_prefix=$exec_prefix
19916  fi
19917  case ${TARGET_SYSTEM_ROOT} in
19918  "${test_prefix}"|"${test_prefix}/"*|\
19919  "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
19920  '${prefix}'|'${prefix}/'*|\
19921  '${exec_prefix}'|'${exec_prefix}/'*)
19922    t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
19923    TARGET_SYSTEM_ROOT_DEFINE="$t"
19924    ;;
19925  esac
19926
19927 else
19928
19929  TARGET_SYSTEM_ROOT=
19930  TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
19931
19932 fi;
19933
19934
19935
19936 system_gdbinit=
19937
19938 # Check whether --with-system-gdbinit or --without-system-gdbinit was given.
19939 if test "${with_system_gdbinit+set}" = set; then
19940   withval="$with_system_gdbinit"
19941   system_gdbinit=${withval}
19942 fi;
19943
19944
19945   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
19946   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19947   ac_define_dir=`eval echo $system_gdbinit`
19948   ac_define_dir=`eval echo $ac_define_dir`
19949
19950 cat >>confdefs.h <<_ACEOF
19951 #define SYSTEM_GDBINIT "$ac_define_dir"
19952 _ACEOF
19953
19954
19955
19956 if test "x$prefix" = xNONE; then
19957   test_prefix=$ac_default_prefix
19958 else
19959   test_prefix=$prefix
19960 fi
19961 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
19962   test_exec_prefix=$test_prefix
19963 else
19964   test_exec_prefix=$exec_prefix
19965 fi
19966 case ${system_gdbinit} in
19967  "${test_prefix}"|"${test_prefix}/"*|\
19968  "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
19969  '${prefix}'|'${prefix}/'*|\
19970  '${exec_prefix}'|'${exec_prefix}/'*)
19971
19972 cat >>confdefs.h <<\_ACEOF
19973 #define SYSTEM_GDBINIT_RELOCATABLE 1
19974 _ACEOF
19975
19976    ;;
19977 esac
19978
19979 # Check whether --enable-werror or --disable-werror was given.
19980 if test "${enable_werror+set}" = set; then
19981   enableval="$enable_werror"
19982   case "${enableval}" in
19983      yes | y) ERROR_ON_WARNING="yes" ;;
19984      no | n)  ERROR_ON_WARNING="no" ;;
19985      *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
19986 echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
19987    { (exit 1); exit 1; }; } ;;
19988    esac
19989 fi;
19990
19991 # Enable -Werror by default when using gcc
19992 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
19993     ERROR_ON_WARNING=yes
19994 fi
19995
19996 WERROR_CFLAGS=""
19997 if test "${ERROR_ON_WARNING}" = yes ; then
19998     WERROR_CFLAGS="-Werror"
19999 fi
20000
20001 # The entries after -Wno-pointer-sign are disabled warnings which may
20002 # be enabled in the future, which can not currently be used to build
20003 # GDB.
20004 # NOTE: If you change this list, remember to update
20005 # gdb/doc/gdbint.texinfo.
20006 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
20007 -Wformat-nonliteral -Wno-pointer-sign \
20008 -Wno-unused -Wno-switch -Wno-char-subscripts"
20009
20010 # Enable -Wno-format by default when using gcc on mingw since many
20011 # GCC versions complain about %I64.
20012 case "${host}" in
20013   *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
20014 esac
20015
20016 # Check whether --enable-build-warnings or --disable-build-warnings was given.
20017 if test "${enable_build_warnings+set}" = set; then
20018   enableval="$enable_build_warnings"
20019   case "${enableval}" in
20020   yes)  ;;
20021   no)   build_warnings="-w";;
20022   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
20023         build_warnings="${build_warnings} ${t}";;
20024   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
20025         build_warnings="${t} ${build_warnings}";;
20026   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
20027 esac
20028 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
20029   echo "Setting compiler warning flags = $build_warnings" 6>&1
20030 fi
20031 fi; # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
20032 if test "${enable_gdb_build_warnings+set}" = set; then
20033   enableval="$enable_gdb_build_warnings"
20034   case "${enableval}" in
20035   yes)  ;;
20036   no)   build_warnings="-w";;
20037   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
20038         build_warnings="${build_warnings} ${t}";;
20039   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
20040         build_warnings="${t} ${build_warnings}";;
20041   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
20042 esac
20043 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
20044   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
20045 fi
20046 fi; WARN_CFLAGS=""
20047 if test "x${build_warnings}" != x -a "x$GCC" = xyes
20048 then
20049     echo "$as_me:$LINENO: checking compiler warning flags" >&5
20050 echo $ECHO_N "checking compiler warning flags... $ECHO_C" >&6
20051     # Separate out the -Werror flag as some files just cannot be
20052     # compiled with it enabled.
20053     for w in ${build_warnings}; do
20054         case $w in
20055         -Werr*) WERROR_CFLAGS=-Werror ;;
20056         *) # Check that GCC accepts it
20057             saved_CFLAGS="$CFLAGS"
20058             CFLAGS="$CFLAGS $w"
20059             cat >conftest.$ac_ext <<_ACEOF
20060 /* confdefs.h.  */
20061 _ACEOF
20062 cat confdefs.h >>conftest.$ac_ext
20063 cat >>conftest.$ac_ext <<_ACEOF
20064 /* end confdefs.h.  */
20065
20066 int
20067 main ()
20068 {
20069
20070   ;
20071   return 0;
20072 }
20073 _ACEOF
20074 rm -f conftest.$ac_objext
20075 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20076   (eval $ac_compile) 2>conftest.er1
20077   ac_status=$?
20078   grep -v '^ *+' conftest.er1 >conftest.err
20079   rm -f conftest.er1
20080   cat conftest.err >&5
20081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20082   (exit $ac_status); } &&
20083          { ac_try='test -z "$ac_c_werror_flag"
20084                          || test ! -s conftest.err'
20085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20086   (eval $ac_try) 2>&5
20087   ac_status=$?
20088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20089   (exit $ac_status); }; } &&
20090          { ac_try='test -s conftest.$ac_objext'
20091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20092   (eval $ac_try) 2>&5
20093   ac_status=$?
20094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20095   (exit $ac_status); }; }; then
20096   WARN_CFLAGS="${WARN_CFLAGS} $w"
20097 else
20098   echo "$as_me: failed program was:" >&5
20099 sed 's/^/| /' conftest.$ac_ext >&5
20100
20101 fi
20102 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20103             CFLAGS="$saved_CFLAGS"
20104         esac
20105     done
20106     echo "$as_me:$LINENO: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
20107 echo "${ECHO_T}${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6
20108 fi
20109
20110
20111
20112 # In the Cygwin environment, we need some additional flags.
20113 echo "$as_me:$LINENO: checking for cygwin" >&5
20114 echo $ECHO_N "checking for cygwin... $ECHO_C" >&6
20115 if test "${gdb_cv_os_cygwin+set}" = set; then
20116   echo $ECHO_N "(cached) $ECHO_C" >&6
20117 else
20118   cat >conftest.$ac_ext <<_ACEOF
20119 /* confdefs.h.  */
20120 _ACEOF
20121 cat confdefs.h >>conftest.$ac_ext
20122 cat >>conftest.$ac_ext <<_ACEOF
20123 /* end confdefs.h.  */
20124
20125 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
20126 lose
20127 #endif
20128 _ACEOF
20129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20130   $EGREP "lose" >/dev/null 2>&1; then
20131   gdb_cv_os_cygwin=yes
20132 else
20133   gdb_cv_os_cygwin=no
20134 fi
20135 rm -f conftest*
20136
20137 fi
20138 echo "$as_me:$LINENO: result: $gdb_cv_os_cygwin" >&5
20139 echo "${ECHO_T}$gdb_cv_os_cygwin" >&6
20140
20141
20142 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
20143 case ${host} in
20144   *go32* ) SER_HARDWIRE=ser-go32.o ;;
20145   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
20146   *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
20147 esac
20148
20149
20150 # libreadline needs libuser32.a in a cygwin environment
20151 WIN32LIBS=
20152 if test x$gdb_cv_os_cygwin = xyes; then
20153     WIN32LIBS="-luser32"
20154     case "${target}" in
20155         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
20156         ;;
20157     esac
20158 fi
20159
20160 # The ser-tcp.c module requires sockets.
20161 case ${host} in
20162   *mingw32*)
20163
20164 cat >>confdefs.h <<\_ACEOF
20165 #define USE_WIN32API 1
20166 _ACEOF
20167
20168     WIN32LIBS="$WIN32LIBS -lws2_32"
20169     ;;
20170 esac
20171
20172
20173 # Add ELF support to GDB, but only if BFD includes ELF support.
20174 OLD_CFLAGS=$CFLAGS
20175 OLD_LDFLAGS=$LDFLAGS
20176 OLD_LIBS=$LIBS
20177 CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
20178 LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
20179 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
20180 LIBS="-lbfd -liberty $intl $LIBS"
20181 echo "$as_me:$LINENO: checking for ELF support in BFD" >&5
20182 echo $ECHO_N "checking for ELF support in BFD... $ECHO_C" >&6
20183 if test "${gdb_cv_var_elf+set}" = set; then
20184   echo $ECHO_N "(cached) $ECHO_C" >&6
20185 else
20186   cat >conftest.$ac_ext <<_ACEOF
20187 /* confdefs.h.  */
20188 _ACEOF
20189 cat confdefs.h >>conftest.$ac_ext
20190 cat >>conftest.$ac_ext <<_ACEOF
20191 /* end confdefs.h.  */
20192 #include <stdlib.h>
20193 #include "bfd.h"
20194 #include "elf-bfd.h"
20195
20196 int
20197 main ()
20198 {
20199 bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
20200   ;
20201   return 0;
20202 }
20203 _ACEOF
20204 rm -f conftest.$ac_objext conftest$ac_exeext
20205 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20206   (eval $ac_link) 2>conftest.er1
20207   ac_status=$?
20208   grep -v '^ *+' conftest.er1 >conftest.err
20209   rm -f conftest.er1
20210   cat conftest.err >&5
20211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20212   (exit $ac_status); } &&
20213          { ac_try='test -z "$ac_c_werror_flag"
20214                          || test ! -s conftest.err'
20215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20216   (eval $ac_try) 2>&5
20217   ac_status=$?
20218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20219   (exit $ac_status); }; } &&
20220          { ac_try='test -s conftest$ac_exeext'
20221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20222   (eval $ac_try) 2>&5
20223   ac_status=$?
20224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20225   (exit $ac_status); }; }; then
20226   gdb_cv_var_elf=yes
20227 else
20228   echo "$as_me: failed program was:" >&5
20229 sed 's/^/| /' conftest.$ac_ext >&5
20230
20231 gdb_cv_var_elf=no
20232 fi
20233 rm -f conftest.err conftest.$ac_objext \
20234       conftest$ac_exeext conftest.$ac_ext
20235 fi
20236 echo "$as_me:$LINENO: result: $gdb_cv_var_elf" >&5
20237 echo "${ECHO_T}$gdb_cv_var_elf" >&6
20238 if test $gdb_cv_var_elf = yes; then
20239   CONFIG_OBS="$CONFIG_OBS elfread.o"
20240
20241 cat >>confdefs.h <<\_ACEOF
20242 #define HAVE_ELF 1
20243 _ACEOF
20244
20245 fi
20246 CFLAGS=$OLD_CFLAGS
20247 LDFLAGS=$OLD_LDFLAGS
20248 LIBS=$OLD_LIBS
20249
20250 # Add any host-specific objects to GDB.
20251 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
20252
20253 LIBGUI="../libgui/src/libgui.a"
20254 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
20255
20256
20257
20258 WIN32LDAPP=
20259
20260
20261
20262 case "${host}" in
20263 *-*-cygwin* | *-*-mingw* )
20264     configdir="win"
20265     ;;
20266 *)
20267     configdir="unix"
20268     ;;
20269 esac
20270
20271 GDBTKLIBS=
20272 if test "${enable_gdbtk}" = "yes"; then
20273
20274     # Gdbtk must have an absolute path to srcdir in order to run
20275     # properly when not installed.
20276     here=`pwd`
20277     cd ${srcdir}
20278     GDBTK_SRC_DIR=`pwd`
20279     cd $here
20280
20281
20282     #
20283     # Ok, lets find the tcl configuration
20284     # First, look for one uninstalled.
20285     # the alternative search directory is invoked by --with-tcl
20286     #
20287
20288     if test x"${no_tcl}" = x ; then
20289         # we reset no_tcl in case something fails here
20290         no_tcl=true
20291
20292 # Check whether --with-tcl or --without-tcl was given.
20293 if test "${with_tcl+set}" = set; then
20294   withval="$with_tcl"
20295   with_tclconfig=${withval}
20296 fi;
20297         echo "$as_me:$LINENO: checking for Tcl configuration" >&5
20298 echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
20299         if test "${ac_cv_c_tclconfig+set}" = set; then
20300   echo $ECHO_N "(cached) $ECHO_C" >&6
20301 else
20302
20303
20304             # First check to see if --with-tcl was specified.
20305             case "${host}" in
20306                 *-*-cygwin*) platDir="win" ;;
20307                 *) platDir="unix" ;;
20308             esac
20309             if test x"${with_tclconfig}" != x ; then
20310                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
20311                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
20312                 else
20313                     { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
20314 echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
20315    { (exit 1); exit 1; }; }
20316                 fi
20317             fi
20318
20319             # then check for a private Tcl installation
20320             if test x"${ac_cv_c_tclconfig}" = x ; then
20321                 for i in \
20322                         ../tcl \
20323                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20324                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
20325                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
20326                         ../../tcl \
20327                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20328                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
20329                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
20330                         ../../../tcl \
20331                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20332                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
20333                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
20334                     if test -f "$i/$platDir/tclConfig.sh" ; then
20335                         ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
20336                         break
20337                     fi
20338                 done
20339             fi
20340
20341             # on Darwin, check in Framework installation locations
20342             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
20343                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
20344                         `ls -d /Library/Frameworks 2>/dev/null` \
20345                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
20346                         `ls -d /System/Library/Frameworks 2>/dev/null` \
20347                         ; do
20348                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
20349                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
20350                         break
20351                     fi
20352                 done
20353             fi
20354
20355             # check in a few common install locations
20356             if test x"${ac_cv_c_tclconfig}" = x ; then
20357                 for i in `ls -d ${libdir} 2>/dev/null` \
20358                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
20359                         `ls -d ${prefix}/lib 2>/dev/null` \
20360                         `ls -d /usr/local/lib 2>/dev/null` \
20361                         `ls -d /usr/contrib/lib 2>/dev/null` \
20362                         `ls -d /usr/lib 2>/dev/null` \
20363                         ; do
20364                     if test -f "$i/tclConfig.sh" ; then
20365                         ac_cv_c_tclconfig=`(cd $i; pwd)`
20366                         break
20367                     fi
20368                 done
20369             fi
20370
20371             # check in a few other private locations
20372             if test x"${ac_cv_c_tclconfig}" = x ; then
20373                 for i in \
20374                         ${srcdir}/../tcl \
20375                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20376                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
20377                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
20378                     if test -f "$i/$platDir/tclConfig.sh" ; then
20379                     ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
20380                     break
20381                 fi
20382                 done
20383             fi
20384
20385 fi
20386
20387
20388         if test x"${ac_cv_c_tclconfig}" = x ; then
20389             TCL_BIN_DIR="# no Tcl configs found"
20390             { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
20391 echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
20392         else
20393             no_tcl=
20394             TCL_BIN_DIR=${ac_cv_c_tclconfig}
20395             echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
20396 echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
20397         fi
20398     fi
20399
20400
20401     # If $no_tk is nonempty, then we can't do Tk, and there is no
20402     # point to doing Tcl.
20403
20404     #
20405     # Ok, lets find the tk configuration
20406     # First, look for one uninstalled.
20407     # the alternative search directory is invoked by --with-tk
20408     #
20409
20410     if test x"${no_tk}" = x ; then
20411         # we reset no_tk in case something fails here
20412         no_tk=true
20413
20414 # Check whether --with-tk or --without-tk was given.
20415 if test "${with_tk+set}" = set; then
20416   withval="$with_tk"
20417   with_tkconfig=${withval}
20418 fi;
20419         echo "$as_me:$LINENO: checking for Tk configuration" >&5
20420 echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6
20421         if test "${ac_cv_c_tkconfig+set}" = set; then
20422   echo $ECHO_N "(cached) $ECHO_C" >&6
20423 else
20424
20425
20426             # First check to see if --with-tkconfig was specified.
20427             if test x"${with_tkconfig}" != x ; then
20428                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
20429                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
20430                 else
20431                     { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
20432 echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
20433    { (exit 1); exit 1; }; }
20434                 fi
20435             fi
20436
20437             # then check for a private Tk library
20438             case "${host}" in
20439                 *-*-cygwin*) platDir="win" ;;
20440                 *) platDir="unix" ;;
20441             esac
20442             if test x"${ac_cv_c_tkconfig}" = x ; then
20443                 for i in \
20444                         ../tk \
20445                         `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20446                         `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
20447                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
20448                         ../../tk \
20449                         `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20450                         `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
20451                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
20452                         ../../../tk \
20453                         `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20454                         `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
20455                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
20456                     if test -f "$i/$platDir/tkConfig.sh" ; then
20457                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20458                         break
20459                     fi
20460                 done
20461             fi
20462
20463             # on Darwin, check in Framework installation locations
20464             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
20465                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
20466                         `ls -d /Library/Frameworks 2>/dev/null` \
20467                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
20468                         `ls -d /System/Library/Frameworks 2>/dev/null` \
20469                         ; do
20470                     if test -f "$i/Tk.framework/tkConfig.sh" ; then
20471                         ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
20472                         break
20473                     fi
20474                 done
20475             fi
20476
20477             # check in a few common install locations
20478             if test x"${ac_cv_c_tkconfig}" = x ; then
20479                 for i in `ls -d ${libdir} 2>/dev/null` \
20480                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
20481                         `ls -d ${prefix}/lib 2>/dev/null` \
20482                         `ls -d /usr/local/lib 2>/dev/null` \
20483                         `ls -d /usr/contrib/lib 2>/dev/null` \
20484                         `ls -d /usr/lib 2>/dev/null` \
20485                         ; do
20486                     if test -f "$i/tkConfig.sh" ; then
20487                         ac_cv_c_tkconfig=`(cd $i; pwd)`
20488                         break
20489                     fi
20490                 done
20491             fi
20492             # check in a few other private locations
20493             if test x"${ac_cv_c_tkconfig}" = x ; then
20494                 for i in \
20495                         ${srcdir}/../tk \
20496                         `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20497                         `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
20498                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
20499                     if test -f "$i/$platDir/tkConfig.sh" ; then
20500                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20501                         break
20502                     fi
20503                 done
20504             fi
20505
20506 fi
20507
20508
20509         if test x"${ac_cv_c_tkconfig}" = x ; then
20510             TK_BIN_DIR="# no Tk configs found"
20511             { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
20512 echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
20513         else
20514             no_tk=
20515             TK_BIN_DIR=${ac_cv_c_tkconfig}
20516             echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
20517 echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6
20518         fi
20519     fi
20520
20521
20522     if test -z "${no_tcl}" -a -z "${no_tk}"; then
20523
20524     echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
20525 echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
20526
20527     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
20528         echo "$as_me:$LINENO: result: loading" >&5
20529 echo "${ECHO_T}loading" >&6
20530         . ${TCL_BIN_DIR}/tclConfig.sh
20531     else
20532         echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
20533 echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
20534     fi
20535
20536     # eval is required to do the TCL_DBGX substitution
20537     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
20538     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
20539
20540     # If the TCL_BIN_DIR is the build directory (not the install directory),
20541     # then set the common variable name to the value of the build variables.
20542     # For example, the variable TCL_LIB_SPEC will be set to the value
20543     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
20544     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
20545     # installed and uninstalled version of Tcl.
20546     if test -f "${TCL_BIN_DIR}/Makefile" ; then
20547         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
20548         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
20549         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
20550     elif test "`uname -s`" = "Darwin"; then
20551         # If Tcl was built as a framework, attempt to use the libraries
20552         # from the framework at the given location so that linking works
20553         # against Tcl.framework installed in an arbitary location.
20554         case ${TCL_DEFS} in
20555             *TCL_FRAMEWORK*)
20556                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
20557                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
20558                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
20559                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
20560                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
20561                             break
20562                         fi
20563                     done
20564                 fi
20565                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
20566                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
20567                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
20568                 fi
20569                 ;;
20570         esac
20571     fi
20572
20573     # eval is required to do the TCL_DBGX substitution
20574     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
20575     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
20576     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
20577     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593         # Check for in-tree tcl
20594         here=`pwd`
20595         cd ${srcdir}/..
20596         topdir=`pwd`
20597         cd ${here}
20598
20599         intree="no"
20600         if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
20601           intree="yes"
20602         fi
20603
20604         # Find Tcl private headers
20605         if test x"${intree}" = xno; then
20606
20607   echo "$as_me:$LINENO: checking for Tcl private headers" >&5
20608 echo $ECHO_N "checking for Tcl private headers... $ECHO_C" >&6
20609   private_dir=""
20610   dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
20611   if test -f ${dir}/tclInt.h ; then
20612     private_dir=${dir}
20613   fi
20614
20615   if test x"${private_dir}" = x; then
20616     { { echo "$as_me:$LINENO: error: could not find private Tcl headers" >&5
20617 echo "$as_me: error: could not find private Tcl headers" >&2;}
20618    { (exit 1); exit 1; }; }
20619   else
20620     TCL_PRIVATE_INCLUDE="-I${private_dir}"
20621     echo "$as_me:$LINENO: result: ${private_dir}" >&5
20622 echo "${ECHO_T}${private_dir}" >&6
20623   fi
20624
20625           TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
20626           TCL_LIBRARY="${TCL_LIB_SPEC}"
20627           TCL_DEPS=""
20628         else
20629           # If building tcl in the same src tree, private headers
20630           # are not needed, but we need to be sure to use the right
20631           # headers library
20632           TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
20633           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
20634           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
20635         fi
20636
20637
20638
20639
20640
20641     echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
20642 echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6
20643
20644     if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
20645         echo "$as_me:$LINENO: result: loading" >&5
20646 echo "${ECHO_T}loading" >&6
20647         . ${TK_BIN_DIR}/tkConfig.sh
20648     else
20649         echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
20650 echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
20651     fi
20652
20653     # eval is required to do the TK_DBGX substitution
20654     eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
20655     eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
20656
20657     # If the TK_BIN_DIR is the build directory (not the install directory),
20658     # then set the common variable name to the value of the build variables.
20659     # For example, the variable TK_LIB_SPEC will be set to the value
20660     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
20661     # instead of TK_BUILD_LIB_SPEC since it will work with both an
20662     # installed and uninstalled version of Tcl.
20663     if test -f "${TK_BIN_DIR}/Makefile" ; then
20664         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
20665         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
20666         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
20667     elif test "`uname -s`" = "Darwin"; then
20668         # If Tk was built as a framework, attempt to use the libraries
20669         # from the framework at the given location so that linking works
20670         # against Tk.framework installed in an arbitary location.
20671         case ${TK_DEFS} in
20672             *TK_FRAMEWORK*)
20673                 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
20674                     for i in "`cd ${TK_BIN_DIR}; pwd`" \
20675                              "`cd ${TK_BIN_DIR}/../..; pwd`"; do
20676                         if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
20677                             TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
20678                             break
20679                         fi
20680                     done
20681                 fi
20682                 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
20683                     TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
20684                     TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
20685                 fi
20686                 ;;
20687         esac
20688     fi
20689
20690     # eval is required to do the TK_DBGX substitution
20691     eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
20692     eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
20693     eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
20694     eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709         # Check for in-tree Tk
20710         intree="no"
20711         if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
20712           intree="yes"
20713         fi
20714
20715         # Find Tk private headers
20716         if test x"${intree}" = xno; then
20717
20718   echo "$as_me:$LINENO: checking for Tk private headers" >&5
20719 echo $ECHO_N "checking for Tk private headers... $ECHO_C" >&6
20720   private_dir=""
20721   dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
20722   if test -f ${dir}/tkInt.h; then
20723     private_dir=${dir}
20724   fi
20725
20726   if test x"${private_dir}" = x; then
20727     { { echo "$as_me:$LINENO: error: could not find Tk private headers" >&5
20728 echo "$as_me: error: could not find Tk private headers" >&2;}
20729    { (exit 1); exit 1; }; }
20730   else
20731     TK_PRIVATE_INCLUDE="-I${private_dir}"
20732     echo "$as_me:$LINENO: result: ${private_dir}" >&5
20733 echo "${ECHO_T}${private_dir}" >&6
20734   fi
20735
20736           TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
20737           TK_LIBRARY=${TK_LIB_SPEC}
20738           TK_DEPS=""
20739         else
20740           TK_INCLUDE="-I${TK_SRC_DIR}/generic"
20741           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
20742           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
20743         fi
20744
20745
20746
20747
20748
20749         ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
20750
20751         # Include some libraries that Tcl and Tk want.
20752         TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
20753         # Yes, the ordering seems wrong here.  But it isn't.
20754         # TK_LIBS is the list of libraries that need to be linked
20755         # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
20756         # were in LIBS then any link tests after this point would
20757         # try to include things like `$(LIBGUI)', which wouldn't work.
20758         GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
20759
20760         CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
20761         CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
20762         CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
20763         CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
20764         CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
20765         CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
20766         CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
20767
20768         if test x$gdb_cv_os_cygwin = xyes; then
20769           WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
20770           WIN32LDAPP="-Wl,--subsystem,console"
20771           CONFIG_OBS="${CONFIG_OBS} gdbres.o"
20772         fi
20773
20774
20775
20776 subdirs="$subdirs gdbtk"
20777
20778     fi
20779 fi
20780
20781
20782
20783
20784
20785
20786
20787
20788 echo "$as_me:$LINENO: checking for X" >&5
20789 echo $ECHO_N "checking for X... $ECHO_C" >&6
20790
20791
20792 # Check whether --with-x or --without-x was given.
20793 if test "${with_x+set}" = set; then
20794   withval="$with_x"
20795
20796 fi;
20797 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20798 if test "x$with_x" = xno; then
20799   # The user explicitly disabled X.
20800   have_x=disabled
20801 else
20802   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20803     # Both variables are already set.
20804     have_x=yes
20805   else
20806     if test "${ac_cv_have_x+set}" = set; then
20807   echo $ECHO_N "(cached) $ECHO_C" >&6
20808 else
20809   # One or both of the vars are not set, and there is no cached value.
20810 ac_x_includes=no ac_x_libraries=no
20811 rm -fr conftest.dir
20812 if mkdir conftest.dir; then
20813   cd conftest.dir
20814   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20815   cat >Imakefile <<'_ACEOF'
20816 acfindx:
20817         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20818 _ACEOF
20819   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20820     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20821     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
20822     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20823     for ac_extension in a so sl; do
20824       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
20825          test -f $ac_im_libdir/libX11.$ac_extension; then
20826         ac_im_usrlibdir=$ac_im_libdir; break
20827       fi
20828     done
20829     # Screen out bogus values from the imake configuration.  They are
20830     # bogus both because they are the default anyway, and because
20831     # using them would break gcc on systems where it needs fixed includes.
20832     case $ac_im_incroot in
20833         /usr/include) ;;
20834         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20835     esac
20836     case $ac_im_usrlibdir in
20837         /usr/lib | /lib) ;;
20838         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20839     esac
20840   fi
20841   cd ..
20842   rm -fr conftest.dir
20843 fi
20844
20845 # Standard set of common directories for X headers.
20846 # Check X11 before X11Rn because it is often a symlink to the current release.
20847 ac_x_header_dirs='
20848 /usr/X11/include
20849 /usr/X11R6/include
20850 /usr/X11R5/include
20851 /usr/X11R4/include
20852
20853 /usr/include/X11
20854 /usr/include/X11R6
20855 /usr/include/X11R5
20856 /usr/include/X11R4
20857
20858 /usr/local/X11/include
20859 /usr/local/X11R6/include
20860 /usr/local/X11R5/include
20861 /usr/local/X11R4/include
20862
20863 /usr/local/include/X11
20864 /usr/local/include/X11R6
20865 /usr/local/include/X11R5
20866 /usr/local/include/X11R4
20867
20868 /usr/X386/include
20869 /usr/x386/include
20870 /usr/XFree86/include/X11
20871
20872 /usr/include
20873 /usr/local/include
20874 /usr/unsupported/include
20875 /usr/athena/include
20876 /usr/local/x11r5/include
20877 /usr/lpp/Xamples/include
20878
20879 /usr/openwin/include
20880 /usr/openwin/share/include'
20881
20882 if test "$ac_x_includes" = no; then
20883   # Guess where to find include files, by looking for Intrinsic.h.
20884   # First, try using that file with no special directory specified.
20885   cat >conftest.$ac_ext <<_ACEOF
20886 /* confdefs.h.  */
20887 _ACEOF
20888 cat confdefs.h >>conftest.$ac_ext
20889 cat >>conftest.$ac_ext <<_ACEOF
20890 /* end confdefs.h.  */
20891 #include <X11/Intrinsic.h>
20892 _ACEOF
20893 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20894   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20895   ac_status=$?
20896   grep -v '^ *+' conftest.er1 >conftest.err
20897   rm -f conftest.er1
20898   cat conftest.err >&5
20899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20900   (exit $ac_status); } >/dev/null; then
20901   if test -s conftest.err; then
20902     ac_cpp_err=$ac_c_preproc_warn_flag
20903     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20904   else
20905     ac_cpp_err=
20906   fi
20907 else
20908   ac_cpp_err=yes
20909 fi
20910 if test -z "$ac_cpp_err"; then
20911   # We can compile using X headers with no special include directory.
20912 ac_x_includes=
20913 else
20914   echo "$as_me: failed program was:" >&5
20915 sed 's/^/| /' conftest.$ac_ext >&5
20916
20917   for ac_dir in $ac_x_header_dirs; do
20918   if test -r "$ac_dir/X11/Intrinsic.h"; then
20919     ac_x_includes=$ac_dir
20920     break
20921   fi
20922 done
20923 fi
20924 rm -f conftest.err conftest.$ac_ext
20925 fi # $ac_x_includes = no
20926
20927 if test "$ac_x_libraries" = no; then
20928   # Check for the libraries.
20929   # See if we find them without any special options.
20930   # Don't add to $LIBS permanently.
20931   ac_save_LIBS=$LIBS
20932   LIBS="-lXt $LIBS"
20933   cat >conftest.$ac_ext <<_ACEOF
20934 /* confdefs.h.  */
20935 _ACEOF
20936 cat confdefs.h >>conftest.$ac_ext
20937 cat >>conftest.$ac_ext <<_ACEOF
20938 /* end confdefs.h.  */
20939 #include <X11/Intrinsic.h>
20940 int
20941 main ()
20942 {
20943 XtMalloc (0)
20944   ;
20945   return 0;
20946 }
20947 _ACEOF
20948 rm -f conftest.$ac_objext conftest$ac_exeext
20949 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20950   (eval $ac_link) 2>conftest.er1
20951   ac_status=$?
20952   grep -v '^ *+' conftest.er1 >conftest.err
20953   rm -f conftest.er1
20954   cat conftest.err >&5
20955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20956   (exit $ac_status); } &&
20957          { ac_try='test -z "$ac_c_werror_flag"
20958                          || test ! -s conftest.err'
20959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20960   (eval $ac_try) 2>&5
20961   ac_status=$?
20962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20963   (exit $ac_status); }; } &&
20964          { ac_try='test -s conftest$ac_exeext'
20965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20966   (eval $ac_try) 2>&5
20967   ac_status=$?
20968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20969   (exit $ac_status); }; }; then
20970   LIBS=$ac_save_LIBS
20971 # We can link X programs with no special library path.
20972 ac_x_libraries=
20973 else
20974   echo "$as_me: failed program was:" >&5
20975 sed 's/^/| /' conftest.$ac_ext >&5
20976
20977 LIBS=$ac_save_LIBS
20978 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
20979 do
20980   # Don't even attempt the hair of trying to link an X program!
20981   for ac_extension in a so sl; do
20982     if test -r $ac_dir/libXt.$ac_extension; then
20983       ac_x_libraries=$ac_dir
20984       break 2
20985     fi
20986   done
20987 done
20988 fi
20989 rm -f conftest.err conftest.$ac_objext \
20990       conftest$ac_exeext conftest.$ac_ext
20991 fi # $ac_x_libraries = no
20992
20993 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
20994   # Didn't find X anywhere.  Cache the known absence of X.
20995   ac_cv_have_x="have_x=no"
20996 else
20997   # Record where we found X for the cache.
20998   ac_cv_have_x="have_x=yes \
20999                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
21000 fi
21001 fi
21002
21003   fi
21004   eval "$ac_cv_have_x"
21005 fi # $with_x != no
21006
21007 if test "$have_x" != yes; then
21008   echo "$as_me:$LINENO: result: $have_x" >&5
21009 echo "${ECHO_T}$have_x" >&6
21010   no_x=yes
21011 else
21012   # If each of the values was on the command line, it overrides each guess.
21013   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
21014   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
21015   # Update the cache value to reflect the command line values.
21016   ac_cv_have_x="have_x=yes \
21017                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
21018   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
21019 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
21020 fi
21021
21022
21023 # Unlike the sim directory, whether a simulator is linked is controlled by
21024 # presence of a gdb_sim definition in the target configure.tgt entry.
21025 # This code just checks for a few cases where we'd like to ignore those
21026 # definitions, even when they're present in the '.mt' file.  These cases
21027 # are when --disable-sim is specified, or if the simulator directory is
21028 # not part of the source tree.
21029 #
21030 # Check whether --enable-sim or --disable-sim was given.
21031 if test "${enable_sim+set}" = set; then
21032   enableval="$enable_sim"
21033   echo "enable_sim = $enable_sim";
21034  echo "enableval = ${enableval}";
21035  case "${enableval}" in
21036   yes) ignore_sim=false ;;
21037   no)  ignore_sim=true ;;
21038   *)   ignore_sim=false ;;
21039  esac
21040 else
21041   ignore_sim=false
21042 fi;
21043
21044 if test ! -d "${srcdir}/../sim"; then
21045   ignore_sim=true
21046 fi
21047
21048 SIM=
21049 SIM_OBS=
21050 if test "${ignore_sim}" = "false"; then
21051   if test x"${gdb_sim}" != x ; then
21052     SIM="${gdb_sim}"
21053     SIM_OBS="remote-sim.o"
21054
21055 cat >>confdefs.h <<\_ACEOF
21056 #define WITH_SIM 1
21057 _ACEOF
21058
21059   fi
21060 fi
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075 # List of host floatformats.
21076
21077 cat >>confdefs.h <<_ACEOF
21078 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
21079 _ACEOF
21080
21081
21082 cat >>confdefs.h <<_ACEOF
21083 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
21084 _ACEOF
21085
21086
21087 cat >>confdefs.h <<_ACEOF
21088 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
21089 _ACEOF
21090
21091
21092 # target_subdir is used by the testsuite to find the target libraries.
21093 target_subdir=
21094 if test "${host}" != "${target}"; then
21095     target_subdir="${target_alias}/"
21096 fi
21097
21098
21099 frags=
21100 if test "${gdb_native}" = "yes"; then
21101   host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
21102   if test ! -f ${host_makefile_frag}; then
21103     { { echo "$as_me:$LINENO: error: \"*** Gdb does not support native target ${host}\"" >&5
21104 echo "$as_me: error: \"*** Gdb does not support native target ${host}\"" >&2;}
21105    { (exit 1); exit 1; }; }
21106   fi
21107   frags="$frags $host_makefile_frag"
21108 else
21109   host_makefile_frag=/dev/null
21110 fi
21111
21112
21113
21114
21115 if test "${gdb_native}" = "yes"; then
21116 # We pick this up from the host configuration file (.mh) because we
21117 # do not have a native configuration Makefile fragment.
21118 nativefile=`sed -n '
21119 s/NAT_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
21120 ' ${host_makefile_frag}`
21121 fi
21122
21123
21124 if test x"${gdb_osabi}" != x ; then
21125
21126 cat >>confdefs.h <<_ACEOF
21127 #define GDB_OSABI_DEFAULT $gdb_osabi
21128 _ACEOF
21129
21130 fi
21131
21132 # Enable multi-ice-gdb-server.
21133 # Check whether --enable-multi-ice or --disable-multi-ice was given.
21134 if test "${enable_multi_ice+set}" = set; then
21135   enableval="$enable_multi_ice"
21136   case $enableval in
21137     yes | no)
21138       ;;
21139     *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-multi-ice" >&5
21140 echo "$as_me: error: bad value $enableval for --enable-multi-ice" >&2;}
21141    { (exit 1); exit 1; }; } ;;
21142   esac
21143 fi;
21144 if test "x$enable_multi_ice" = xyes; then
21145
21146
21147 subdirs="$subdirs multi-ice"
21148
21149 fi
21150
21151 # We only build gdbserver automatically in a native configuration.
21152 if test "$gdb_native" = "yes"; then
21153   echo "$as_me:$LINENO: checking whether gdbserver is supported on this host" >&5
21154 echo $ECHO_N "checking whether gdbserver is supported on this host... $ECHO_C" >&6
21155   if test "x$build_gdbserver" = xyes; then
21156     echo "$as_me:$LINENO: result: yes" >&5
21157 echo "${ECHO_T}yes" >&6
21158
21159
21160 subdirs="$subdirs gdbserver"
21161
21162   else
21163     echo "$as_me:$LINENO: result: no" >&5
21164 echo "${ECHO_T}no" >&6
21165   fi
21166 fi
21167
21168 # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
21169 # to an empty version.
21170
21171 files=
21172 links=
21173
21174 rm -f nm.h
21175 nm_h=""
21176 if test "${nativefile}" != ""; then
21177     nm_h=nm.h
21178     case "${nativefile}" in
21179       nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
21180       * ) GDB_NM_FILE="${nativefile}"
21181     esac
21182     files="${files} ${GDB_NM_FILE}"
21183     links="${links} nm.h"
21184
21185 cat >>confdefs.h <<_ACEOF
21186 #define GDB_NM_FILE "${GDB_NM_FILE}"
21187 _ACEOF
21188
21189 fi
21190
21191
21192 ac_sources="$files"
21193 ac_dests="$links"
21194 while test -n "$ac_sources"; do
21195   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
21196   set $ac_sources; ac_source=$1; shift; ac_sources=$*
21197   ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
21198 done
21199           ac_config_links="$ac_config_links $ac_config_links_1"
21200
21201
21202
21203
21204
21205 cat >>confdefs.h <<\_ACEOF
21206 #define GDB_DEFAULT_HOST_CHARSET "UTF-8"
21207 _ACEOF
21208
21209
21210
21211
21212
21213
21214
21215                               ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
21216           ac_config_commands="$ac_config_commands default"
21217 cat >confcache <<\_ACEOF
21218 # This file is a shell script that caches the results of configure
21219 # tests run on this system so they can be shared between configure
21220 # scripts and configure runs, see configure's option --config-cache.
21221 # It is not useful on other systems.  If it contains results you don't
21222 # want to keep, you may remove or edit it.
21223 #
21224 # config.status only pays attention to the cache file if you give it
21225 # the --recheck option to rerun configure.
21226 #
21227 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21228 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21229 # following values.
21230
21231 _ACEOF
21232
21233 # The following way of writing the cache mishandles newlines in values,
21234 # but we know of no workaround that is simple, portable, and efficient.
21235 # So, don't put newlines in cache variables' values.
21236 # Ultrix sh set writes to stderr and can't be redirected directly,
21237 # and sets the high bit in the cache file unless we assign to the vars.
21238 {
21239   (set) 2>&1 |
21240     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21241     *ac_space=\ *)
21242       # `set' does not quote correctly, so add quotes (double-quote
21243       # substitution turns \\\\ into \\, and sed turns \\ into \).
21244       sed -n \
21245         "s/'/'\\\\''/g;
21246           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21247       ;;
21248     *)
21249       # `set' quotes correctly as required by POSIX, so do not add quotes.
21250       sed -n \
21251         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21252       ;;
21253     esac;
21254 } |
21255   sed '
21256      t clear
21257      : clear
21258      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21259      t end
21260      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21261      : end' >>confcache
21262 if diff $cache_file confcache >/dev/null 2>&1; then :; else
21263   if test -w $cache_file; then
21264     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21265     cat confcache >$cache_file
21266   else
21267     echo "not updating unwritable cache $cache_file"
21268   fi
21269 fi
21270 rm -f confcache
21271
21272 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21273 # Let make expand exec_prefix.
21274 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21275
21276 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21277 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21278 # trailing colons and then remove the whole line if VPATH becomes empty
21279 # (actually we leave an empty line to preserve line numbers).
21280 if test "x$srcdir" = x.; then
21281   ac_vpsub='/^[  ]*VPATH[        ]*=/{
21282 s/:*\$(srcdir):*/:/;
21283 s/:*\${srcdir}:*/:/;
21284 s/:*@srcdir@:*/:/;
21285 s/^\([^=]*=[     ]*\):*/\1/;
21286 s/:*$//;
21287 s/^[^=]*=[       ]*$//;
21288 }'
21289 fi
21290
21291 DEFS=-DHAVE_CONFIG_H
21292
21293 ac_libobjs=
21294 ac_ltlibobjs=
21295 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21296   # 1. Remove the extension, and $U if already installed.
21297   ac_i=`echo "$ac_i" |
21298          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
21299   # 2. Add them.
21300   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21301   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21302 done
21303 LIBOBJS=$ac_libobjs
21304
21305 LTLIBOBJS=$ac_ltlibobjs
21306
21307
21308 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
21309   { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
21310 Usually this means the macro was only invoked conditionally." >&5
21311 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
21312 Usually this means the macro was only invoked conditionally." >&2;}
21313    { (exit 1); exit 1; }; }
21314 fi
21315 if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
21316   { { echo "$as_me:$LINENO: error: conditional \"GMAKE\" was never defined.
21317 Usually this means the macro was only invoked conditionally." >&5
21318 echo "$as_me: error: conditional \"GMAKE\" was never defined.
21319 Usually this means the macro was only invoked conditionally." >&2;}
21320    { (exit 1); exit 1; }; }
21321 fi
21322 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
21323   { { echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21324 Usually this means the macro was only invoked conditionally." >&5
21325 echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21326 Usually this means the macro was only invoked conditionally." >&2;}
21327    { (exit 1); exit 1; }; }
21328 fi
21329
21330     gl_libobjs=
21331     gl_ltlibobjs=
21332     if test -n "$gl_LIBOBJS"; then
21333       # Remove the extension.
21334       sed_drop_objext='s/\.o$//;s/\.obj$//'
21335       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21336         gl_libobjs="$gl_libobjs $i.$ac_objext"
21337         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
21338       done
21339     fi
21340     gl_LIBOBJS=$gl_libobjs
21341
21342     gl_LTLIBOBJS=$gl_ltlibobjs
21343
21344
21345
21346     gltests_libobjs=
21347     gltests_ltlibobjs=
21348     if test -n "$gltests_LIBOBJS"; then
21349       # Remove the extension.
21350       sed_drop_objext='s/\.o$//;s/\.obj$//'
21351       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21352         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
21353         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
21354       done
21355     fi
21356     gltests_LIBOBJS=$gltests_libobjs
21357
21358     gltests_LTLIBOBJS=$gltests_ltlibobjs
21359
21360
21361 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
21362   { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
21363 Usually this means the macro was only invoked conditionally." >&5
21364 echo "$as_me: error: conditional \"AMDEP\" was never defined.
21365 Usually this means the macro was only invoked conditionally." >&2;}
21366    { (exit 1); exit 1; }; }
21367 fi
21368 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
21369   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
21370 Usually this means the macro was only invoked conditionally." >&5
21371 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
21372 Usually this means the macro was only invoked conditionally." >&2;}
21373    { (exit 1); exit 1; }; }
21374 fi
21375
21376 : ${CONFIG_STATUS=./config.status}
21377 ac_clean_files_save=$ac_clean_files
21378 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21379 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21380 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21381 cat >$CONFIG_STATUS <<_ACEOF
21382 #! $SHELL
21383 # Generated by $as_me.
21384 # Run this file to recreate the current configuration.
21385 # Compiler output produced by configure, useful for debugging
21386 # configure, is in config.log if it exists.
21387
21388 debug=false
21389 ac_cs_recheck=false
21390 ac_cs_silent=false
21391 SHELL=\${CONFIG_SHELL-$SHELL}
21392 _ACEOF
21393
21394 cat >>$CONFIG_STATUS <<\_ACEOF
21395 ## --------------------- ##
21396 ## M4sh Initialization.  ##
21397 ## --------------------- ##
21398
21399 # Be Bourne compatible
21400 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21401   emulate sh
21402   NULLCMD=:
21403   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21404   # is contrary to our usage.  Disable this feature.
21405   alias -g '${1+"$@"}'='"$@"'
21406 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21407   set -o posix
21408 fi
21409 DUALCASE=1; export DUALCASE # for MKS sh
21410
21411 # Support unset when possible.
21412 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21413   as_unset=unset
21414 else
21415   as_unset=false
21416 fi
21417
21418
21419 # Work around bugs in pre-3.0 UWIN ksh.
21420 $as_unset ENV MAIL MAILPATH
21421 PS1='$ '
21422 PS2='> '
21423 PS4='+ '
21424
21425 # NLS nuisances.
21426 for as_var in \
21427   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21428   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21429   LC_TELEPHONE LC_TIME
21430 do
21431   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
21432     eval $as_var=C; export $as_var
21433   else
21434     $as_unset $as_var
21435   fi
21436 done
21437
21438 # Required to use basename.
21439 if expr a : '\(a\)' >/dev/null 2>&1; then
21440   as_expr=expr
21441 else
21442   as_expr=false
21443 fi
21444
21445 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
21446   as_basename=basename
21447 else
21448   as_basename=false
21449 fi
21450
21451
21452 # Name of the executable.
21453 as_me=`$as_basename "$0" ||
21454 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21455          X"$0" : 'X\(//\)$' \| \
21456          X"$0" : 'X\(/\)$' \| \
21457          .     : '\(.\)' 2>/dev/null ||
21458 echo X/"$0" |
21459     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21460           /^X\/\(\/\/\)$/{ s//\1/; q; }
21461           /^X\/\(\/\).*/{ s//\1/; q; }
21462           s/.*/./; q'`
21463
21464
21465 # PATH needs CR, and LINENO needs CR and PATH.
21466 # Avoid depending upon Character Ranges.
21467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21470 as_cr_digits='0123456789'
21471 as_cr_alnum=$as_cr_Letters$as_cr_digits
21472
21473 # The user is always right.
21474 if test "${PATH_SEPARATOR+set}" != set; then
21475   echo "#! /bin/sh" >conf$$.sh
21476   echo  "exit 0"   >>conf$$.sh
21477   chmod +x conf$$.sh
21478   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
21479     PATH_SEPARATOR=';'
21480   else
21481     PATH_SEPARATOR=:
21482   fi
21483   rm -f conf$$.sh
21484 fi
21485
21486
21487   as_lineno_1=$LINENO
21488   as_lineno_2=$LINENO
21489   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21490   test "x$as_lineno_1" != "x$as_lineno_2" &&
21491   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
21492   # Find who we are.  Look in the path if we contain no path at all
21493   # relative or not.
21494   case $0 in
21495     *[\\/]* ) as_myself=$0 ;;
21496     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21497 for as_dir in $PATH
21498 do
21499   IFS=$as_save_IFS
21500   test -z "$as_dir" && as_dir=.
21501   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21502 done
21503
21504        ;;
21505   esac
21506   # We did not find ourselves, most probably we were run as `sh COMMAND'
21507   # in which case we are not to be found in the path.
21508   if test "x$as_myself" = x; then
21509     as_myself=$0
21510   fi
21511   if test ! -f "$as_myself"; then
21512     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21513 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21514    { (exit 1); exit 1; }; }
21515   fi
21516   case $CONFIG_SHELL in
21517   '')
21518     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21519 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21520 do
21521   IFS=$as_save_IFS
21522   test -z "$as_dir" && as_dir=.
21523   for as_base in sh bash ksh sh5; do
21524          case $as_dir in
21525          /*)
21526            if ("$as_dir/$as_base" -c '
21527   as_lineno_1=$LINENO
21528   as_lineno_2=$LINENO
21529   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21530   test "x$as_lineno_1" != "x$as_lineno_2" &&
21531   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
21532              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21533              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
21534              CONFIG_SHELL=$as_dir/$as_base
21535              export CONFIG_SHELL
21536              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21537            fi;;
21538          esac
21539        done
21540 done
21541 ;;
21542   esac
21543
21544   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21545   # uniformly replaced by the line number.  The first 'sed' inserts a
21546   # line-number line before each line; the second 'sed' does the real
21547   # work.  The second script uses 'N' to pair each line-number line
21548   # with the numbered line, and appends trailing '-' during
21549   # substitution so that $LINENO is not a special case at line end.
21550   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
21551   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
21552   sed '=' <$as_myself |
21553     sed '
21554       N
21555       s,$,-,
21556       : loop
21557       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
21558       t loop
21559       s,-$,,
21560       s,^['$as_cr_digits']*\n,,
21561     ' >$as_me.lineno &&
21562   chmod +x $as_me.lineno ||
21563     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21564 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
21565    { (exit 1); exit 1; }; }
21566
21567   # Don't try to exec as it changes $[0], causing all sort of problems
21568   # (the dirname of $[0] is not the place where we might find the
21569   # original and so on.  Autoconf is especially sensible to this).
21570   . ./$as_me.lineno
21571   # Exit status is that of the last command.
21572   exit
21573 }
21574
21575
21576 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21577   *c*,-n*) ECHO_N= ECHO_C='
21578 ' ECHO_T='      ' ;;
21579   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21580   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
21581 esac
21582
21583 if expr a : '\(a\)' >/dev/null 2>&1; then
21584   as_expr=expr
21585 else
21586   as_expr=false
21587 fi
21588
21589 rm -f conf$$ conf$$.exe conf$$.file
21590 echo >conf$$.file
21591 if ln -s conf$$.file conf$$ 2>/dev/null; then
21592   # We could just check for DJGPP; but this test a) works b) is more generic
21593   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21594   if test -f conf$$.exe; then
21595     # Don't use ln at all; we don't have any links
21596     as_ln_s='cp -p'
21597   else
21598     as_ln_s='ln -s'
21599   fi
21600 elif ln conf$$.file conf$$ 2>/dev/null; then
21601   as_ln_s=ln
21602 else
21603   as_ln_s='cp -p'
21604 fi
21605 rm -f conf$$ conf$$.exe conf$$.file
21606
21607 if mkdir -p . 2>/dev/null; then
21608   as_mkdir_p=:
21609 else
21610   test -d ./-p && rmdir ./-p
21611   as_mkdir_p=false
21612 fi
21613
21614 as_executable_p="test -f"
21615
21616 # Sed expression to map a string onto a valid CPP name.
21617 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21618
21619 # Sed expression to map a string onto a valid variable name.
21620 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21621
21622
21623 # IFS
21624 # We need space, tab and new line, in precisely that order.
21625 as_nl='
21626 '
21627 IFS="   $as_nl"
21628
21629 # CDPATH.
21630 $as_unset CDPATH
21631
21632 exec 6>&1
21633
21634 # Open the log real soon, to keep \$[0] and so on meaningful, and to
21635 # report actual input values of CONFIG_FILES etc. instead of their
21636 # values after options handling.  Logging --version etc. is OK.
21637 exec 5>>config.log
21638 {
21639   echo
21640   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21641 ## Running $as_me. ##
21642 _ASBOX
21643 } >&5
21644 cat >&5 <<_CSEOF
21645
21646 This file was extended by $as_me, which was
21647 generated by GNU Autoconf 2.59.  Invocation command line was
21648
21649   CONFIG_FILES    = $CONFIG_FILES
21650   CONFIG_HEADERS  = $CONFIG_HEADERS
21651   CONFIG_LINKS    = $CONFIG_LINKS
21652   CONFIG_COMMANDS = $CONFIG_COMMANDS
21653   $ $0 $@
21654
21655 _CSEOF
21656 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21657 echo >&5
21658 _ACEOF
21659
21660 # Files that config.status was made for.
21661 if test -n "$ac_config_files"; then
21662   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21663 fi
21664
21665 if test -n "$ac_config_headers"; then
21666   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21667 fi
21668
21669 if test -n "$ac_config_links"; then
21670   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21671 fi
21672
21673 if test -n "$ac_config_commands"; then
21674   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21675 fi
21676
21677 cat >>$CONFIG_STATUS <<\_ACEOF
21678
21679 ac_cs_usage="\
21680 \`$as_me' instantiates files from templates according to the
21681 current configuration.
21682
21683 Usage: $0 [OPTIONS] [FILE]...
21684
21685   -h, --help       print this help, then exit
21686   -V, --version    print version number, then exit
21687   -q, --quiet      do not print progress messages
21688   -d, --debug      don't remove temporary files
21689       --recheck    update $as_me by reconfiguring in the same conditions
21690   --file=FILE[:TEMPLATE]
21691                    instantiate the configuration file FILE
21692   --header=FILE[:TEMPLATE]
21693                    instantiate the configuration header FILE
21694
21695 Configuration files:
21696 $config_files
21697
21698 Configuration headers:
21699 $config_headers
21700
21701 Configuration links:
21702 $config_links
21703
21704 Configuration commands:
21705 $config_commands
21706
21707 Report bugs to <bug-autoconf@gnu.org>."
21708 _ACEOF
21709
21710 cat >>$CONFIG_STATUS <<_ACEOF
21711 ac_cs_version="\\
21712 config.status
21713 configured by $0, generated by GNU Autoconf 2.59,
21714   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21715
21716 Copyright (C) 2003 Free Software Foundation, Inc.
21717 This config.status script is free software; the Free Software Foundation
21718 gives unlimited permission to copy, distribute and modify it."
21719 srcdir=$srcdir
21720 INSTALL="$INSTALL"
21721 _ACEOF
21722
21723 cat >>$CONFIG_STATUS <<\_ACEOF
21724 # If no file are specified by the user, then we need to provide default
21725 # value.  By we need to know if files were specified by the user.
21726 ac_need_defaults=:
21727 while test $# != 0
21728 do
21729   case $1 in
21730   --*=*)
21731     ac_option=`expr "x$1" : 'x\([^=]*\)='`
21732     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21733     ac_shift=:
21734     ;;
21735   -*)
21736     ac_option=$1
21737     ac_optarg=$2
21738     ac_shift=shift
21739     ;;
21740   *) # This is not an option, so the user has probably given explicit
21741      # arguments.
21742      ac_option=$1
21743      ac_need_defaults=false;;
21744   esac
21745
21746   case $ac_option in
21747   # Handling of the options.
21748 _ACEOF
21749 cat >>$CONFIG_STATUS <<\_ACEOF
21750   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21751     ac_cs_recheck=: ;;
21752   --version | --vers* | -V )
21753     echo "$ac_cs_version"; exit 0 ;;
21754   --he | --h)
21755     # Conflict between --help and --header
21756     { { echo "$as_me:$LINENO: error: ambiguous option: $1
21757 Try \`$0 --help' for more information." >&5
21758 echo "$as_me: error: ambiguous option: $1
21759 Try \`$0 --help' for more information." >&2;}
21760    { (exit 1); exit 1; }; };;
21761   --help | --hel | -h )
21762     echo "$ac_cs_usage"; exit 0 ;;
21763   --debug | --d* | -d )
21764     debug=: ;;
21765   --file | --fil | --fi | --f )
21766     $ac_shift
21767     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
21768     ac_need_defaults=false;;
21769   --header | --heade | --head | --hea )
21770     $ac_shift
21771     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
21772     ac_need_defaults=false;;
21773   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21774   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21775     ac_cs_silent=: ;;
21776
21777   # This is an error.
21778   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21779 Try \`$0 --help' for more information." >&5
21780 echo "$as_me: error: unrecognized option: $1
21781 Try \`$0 --help' for more information." >&2;}
21782    { (exit 1); exit 1; }; } ;;
21783
21784   *) ac_config_targets="$ac_config_targets $1" ;;
21785
21786   esac
21787   shift
21788 done
21789
21790 ac_configure_extra_args=
21791
21792 if $ac_cs_silent; then
21793   exec 6>/dev/null
21794   ac_configure_extra_args="$ac_configure_extra_args --silent"
21795 fi
21796
21797 _ACEOF
21798 cat >>$CONFIG_STATUS <<_ACEOF
21799 if \$ac_cs_recheck; then
21800   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21801   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21802 fi
21803
21804 _ACEOF
21805
21806 cat >>$CONFIG_STATUS <<_ACEOF
21807 #
21808 # INIT-COMMANDS section.
21809 #
21810
21811 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
21812 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
21813
21814 gdb_host_cpu=$gdb_host_cpu
21815 nativefile=$nativefile
21816
21817
21818 _ACEOF
21819
21820
21821
21822 cat >>$CONFIG_STATUS <<\_ACEOF
21823 for ac_config_target in $ac_config_targets
21824 do
21825   case "$ac_config_target" in
21826   # Handling of arguments.
21827   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21828   ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
21829   "gnulib/Makefile" ) CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
21830   "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
21831   "depdir" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
21832   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
21833   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21834   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
21835   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21836 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21837    { (exit 1); exit 1; }; };;
21838   esac
21839 done
21840
21841 # If the user did not use the arguments to specify the items to instantiate,
21842 # then the envvar interface is used.  Set only those that are not.
21843 # We use the long form for the default assignment because of an extremely
21844 # bizarre bug on SunOS 4.1.3.
21845 if $ac_need_defaults; then
21846   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21847   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21848   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
21849   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21850 fi
21851
21852 # Have a temporary directory for convenience.  Make it in the build tree
21853 # simply because there is no reason to put it here, and in addition,
21854 # creating and moving files from /tmp can sometimes cause problems.
21855 # Create a temporary directory, and hook for its removal unless debugging.
21856 $debug ||
21857 {
21858   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21859   trap '{ (exit 1); exit 1; }' 1 2 13 15
21860 }
21861
21862 # Create a (secure) tmp directory for tmp files.
21863
21864 {
21865   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
21866   test -n "$tmp" && test -d "$tmp"
21867 }  ||
21868 {
21869   tmp=./confstat$$-$RANDOM
21870   (umask 077 && mkdir $tmp)
21871 } ||
21872 {
21873    echo "$me: cannot create a temporary directory in ." >&2
21874    { (exit 1); exit 1; }
21875 }
21876
21877 _ACEOF
21878
21879 cat >>$CONFIG_STATUS <<_ACEOF
21880
21881 #
21882 # CONFIG_FILES section.
21883 #
21884
21885 # No need to generate the scripts if there are no CONFIG_FILES.
21886 # This happens for instance when ./config.status config.h
21887 if test -n "\$CONFIG_FILES"; then
21888   # Protect against being on the right side of a sed subst in config.status.
21889   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21890    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21891 s,@SHELL@,$SHELL,;t t
21892 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21893 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21894 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21895 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21896 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21897 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21898 s,@exec_prefix@,$exec_prefix,;t t
21899 s,@prefix@,$prefix,;t t
21900 s,@program_transform_name@,$program_transform_name,;t t
21901 s,@bindir@,$bindir,;t t
21902 s,@sbindir@,$sbindir,;t t
21903 s,@libexecdir@,$libexecdir,;t t
21904 s,@datadir@,$datadir,;t t
21905 s,@sysconfdir@,$sysconfdir,;t t
21906 s,@sharedstatedir@,$sharedstatedir,;t t
21907 s,@localstatedir@,$localstatedir,;t t
21908 s,@libdir@,$libdir,;t t
21909 s,@includedir@,$includedir,;t t
21910 s,@oldincludedir@,$oldincludedir,;t t
21911 s,@infodir@,$infodir,;t t
21912 s,@mandir@,$mandir,;t t
21913 s,@build_alias@,$build_alias,;t t
21914 s,@host_alias@,$host_alias,;t t
21915 s,@target_alias@,$target_alias,;t t
21916 s,@DEFS@,$DEFS,;t t
21917 s,@ECHO_C@,$ECHO_C,;t t
21918 s,@ECHO_N@,$ECHO_N,;t t
21919 s,@ECHO_T@,$ECHO_T,;t t
21920 s,@LIBS@,$LIBS,;t t
21921 s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
21922 s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
21923 s,@MAINT@,$MAINT,;t t
21924 s,@CC@,$CC,;t t
21925 s,@CFLAGS@,$CFLAGS,;t t
21926 s,@LDFLAGS@,$LDFLAGS,;t t
21927 s,@CPPFLAGS@,$CPPFLAGS,;t t
21928 s,@ac_ct_CC@,$ac_ct_CC,;t t
21929 s,@EXEEXT@,$EXEEXT,;t t
21930 s,@OBJEXT@,$OBJEXT,;t t
21931 s,@CPP@,$CPP,;t t
21932 s,@EGREP@,$EGREP,;t t
21933 s,@RANLIB@,$RANLIB,;t t
21934 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21935 s,@build@,$build,;t t
21936 s,@build_cpu@,$build_cpu,;t t
21937 s,@build_vendor@,$build_vendor,;t t
21938 s,@build_os@,$build_os,;t t
21939 s,@host@,$host,;t t
21940 s,@host_cpu@,$host_cpu,;t t
21941 s,@host_vendor@,$host_vendor,;t t
21942 s,@host_os@,$host_os,;t t
21943 s,@target@,$target,;t t
21944 s,@target_cpu@,$target_cpu,;t t
21945 s,@target_vendor@,$target_vendor,;t t
21946 s,@target_os@,$target_os,;t t
21947 s,@am__leading_dot@,$am__leading_dot,;t t
21948 s,@DEPDIR@,$DEPDIR,;t t
21949 s,@CCDEPMODE@,$CCDEPMODE,;t t
21950 s,@MAKE@,$MAKE,;t t
21951 s,@GMAKE_TRUE@,$GMAKE_TRUE,;t t
21952 s,@GMAKE_FALSE@,$GMAKE_FALSE,;t t
21953 s,@SET_MAKE@,$SET_MAKE,;t t
21954 s,@USE_NLS@,$USE_NLS,;t t
21955 s,@LIBINTL@,$LIBINTL,;t t
21956 s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
21957 s,@INCINTL@,$INCINTL,;t t
21958 s,@XGETTEXT@,$XGETTEXT,;t t
21959 s,@GMSGFMT@,$GMSGFMT,;t t
21960 s,@POSUB@,$POSUB,;t t
21961 s,@CATALOGS@,$CATALOGS,;t t
21962 s,@DATADIRNAME@,$DATADIRNAME,;t t
21963 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
21964 s,@GENCAT@,$GENCAT,;t t
21965 s,@CATOBJEXT@,$CATOBJEXT,;t t
21966 s,@localedir@,$localedir,;t t
21967 s,@GL_COND_LIBTOOL_TRUE@,$GL_COND_LIBTOOL_TRUE,;t t
21968 s,@GL_COND_LIBTOOL_FALSE@,$GL_COND_LIBTOOL_FALSE,;t t
21969 s,@GNULIB_MEMMEM@,$GNULIB_MEMMEM,;t t
21970 s,@GNULIB_MEMPCPY@,$GNULIB_MEMPCPY,;t t
21971 s,@GNULIB_MEMRCHR@,$GNULIB_MEMRCHR,;t t
21972 s,@GNULIB_STPCPY@,$GNULIB_STPCPY,;t t
21973 s,@GNULIB_STPNCPY@,$GNULIB_STPNCPY,;t t
21974 s,@GNULIB_STRCHRNUL@,$GNULIB_STRCHRNUL,;t t
21975 s,@GNULIB_STRDUP@,$GNULIB_STRDUP,;t t
21976 s,@GNULIB_STRNDUP@,$GNULIB_STRNDUP,;t t
21977 s,@GNULIB_STRNLEN@,$GNULIB_STRNLEN,;t t
21978 s,@GNULIB_STRPBRK@,$GNULIB_STRPBRK,;t t
21979 s,@GNULIB_STRSEP@,$GNULIB_STRSEP,;t t
21980 s,@GNULIB_STRSTR@,$GNULIB_STRSTR,;t t
21981 s,@GNULIB_STRCASESTR@,$GNULIB_STRCASESTR,;t t
21982 s,@GNULIB_STRTOK_R@,$GNULIB_STRTOK_R,;t t
21983 s,@GNULIB_MBSLEN@,$GNULIB_MBSLEN,;t t
21984 s,@GNULIB_MBSNLEN@,$GNULIB_MBSNLEN,;t t
21985 s,@GNULIB_MBSCHR@,$GNULIB_MBSCHR,;t t
21986 s,@GNULIB_MBSRCHR@,$GNULIB_MBSRCHR,;t t
21987 s,@GNULIB_MBSSTR@,$GNULIB_MBSSTR,;t t
21988 s,@GNULIB_MBSCASECMP@,$GNULIB_MBSCASECMP,;t t
21989 s,@GNULIB_MBSNCASECMP@,$GNULIB_MBSNCASECMP,;t t
21990 s,@GNULIB_MBSPCASECMP@,$GNULIB_MBSPCASECMP,;t t
21991 s,@GNULIB_MBSCASESTR@,$GNULIB_MBSCASESTR,;t t
21992 s,@GNULIB_MBSCSPN@,$GNULIB_MBSCSPN,;t t
21993 s,@GNULIB_MBSPBRK@,$GNULIB_MBSPBRK,;t t
21994 s,@GNULIB_MBSSPN@,$GNULIB_MBSSPN,;t t
21995 s,@GNULIB_MBSSEP@,$GNULIB_MBSSEP,;t t
21996 s,@GNULIB_MBSTOK_R@,$GNULIB_MBSTOK_R,;t t
21997 s,@GNULIB_STRERROR@,$GNULIB_STRERROR,;t t
21998 s,@GNULIB_STRSIGNAL@,$GNULIB_STRSIGNAL,;t t
21999 s,@HAVE_DECL_MEMMEM@,$HAVE_DECL_MEMMEM,;t t
22000 s,@HAVE_MEMPCPY@,$HAVE_MEMPCPY,;t t
22001 s,@HAVE_DECL_MEMRCHR@,$HAVE_DECL_MEMRCHR,;t t
22002 s,@HAVE_STPCPY@,$HAVE_STPCPY,;t t
22003 s,@HAVE_STPNCPY@,$HAVE_STPNCPY,;t t
22004 s,@HAVE_STRCHRNUL@,$HAVE_STRCHRNUL,;t t
22005 s,@HAVE_DECL_STRDUP@,$HAVE_DECL_STRDUP,;t t
22006 s,@HAVE_STRNDUP@,$HAVE_STRNDUP,;t t
22007 s,@HAVE_DECL_STRNDUP@,$HAVE_DECL_STRNDUP,;t t
22008 s,@HAVE_DECL_STRNLEN@,$HAVE_DECL_STRNLEN,;t t
22009 s,@HAVE_STRPBRK@,$HAVE_STRPBRK,;t t
22010 s,@HAVE_STRSEP@,$HAVE_STRSEP,;t t
22011 s,@HAVE_STRCASESTR@,$HAVE_STRCASESTR,;t t
22012 s,@HAVE_DECL_STRTOK_R@,$HAVE_DECL_STRTOK_R,;t t
22013 s,@HAVE_DECL_STRERROR@,$HAVE_DECL_STRERROR,;t t
22014 s,@HAVE_DECL_STRSIGNAL@,$HAVE_DECL_STRSIGNAL,;t t
22015 s,@REPLACE_STRERROR@,$REPLACE_STRERROR,;t t
22016 s,@REPLACE_STRSIGNAL@,$REPLACE_STRSIGNAL,;t t
22017 s,@REPLACE_MEMMEM@,$REPLACE_MEMMEM,;t t
22018 s,@REPLACE_STRCASESTR@,$REPLACE_STRCASESTR,;t t
22019 s,@REPLACE_STRSTR@,$REPLACE_STRSTR,;t t
22020 s,@HAVE_LONG_LONG_INT@,$HAVE_LONG_LONG_INT,;t t
22021 s,@HAVE_UNSIGNED_LONG_LONG_INT@,$HAVE_UNSIGNED_LONG_LONG_INT,;t t
22022 s,@HAVE_INTTYPES_H@,$HAVE_INTTYPES_H,;t t
22023 s,@HAVE_SYS_TYPES_H@,$HAVE_SYS_TYPES_H,;t t
22024 s,@INCLUDE_NEXT@,$INCLUDE_NEXT,;t t
22025 s,@NEXT_STDINT_H@,$NEXT_STDINT_H,;t t
22026 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22027 s,@HAVE_SYS_INTTYPES_H@,$HAVE_SYS_INTTYPES_H,;t t
22028 s,@HAVE_SYS_BITYPES_H@,$HAVE_SYS_BITYPES_H,;t t
22029 s,@BITSIZEOF_PTRDIFF_T@,$BITSIZEOF_PTRDIFF_T,;t t
22030 s,@BITSIZEOF_SIG_ATOMIC_T@,$BITSIZEOF_SIG_ATOMIC_T,;t t
22031 s,@BITSIZEOF_SIZE_T@,$BITSIZEOF_SIZE_T,;t t
22032 s,@BITSIZEOF_WCHAR_T@,$BITSIZEOF_WCHAR_T,;t t
22033 s,@BITSIZEOF_WINT_T@,$BITSIZEOF_WINT_T,;t t
22034 s,@HAVE_SIGNED_SIG_ATOMIC_T@,$HAVE_SIGNED_SIG_ATOMIC_T,;t t
22035 s,@HAVE_SIGNED_WCHAR_T@,$HAVE_SIGNED_WCHAR_T,;t t
22036 s,@HAVE_SIGNED_WINT_T@,$HAVE_SIGNED_WINT_T,;t t
22037 s,@PTRDIFF_T_SUFFIX@,$PTRDIFF_T_SUFFIX,;t t
22038 s,@SIG_ATOMIC_T_SUFFIX@,$SIG_ATOMIC_T_SUFFIX,;t t
22039 s,@SIZE_T_SUFFIX@,$SIZE_T_SUFFIX,;t t
22040 s,@WCHAR_T_SUFFIX@,$WCHAR_T_SUFFIX,;t t
22041 s,@WINT_T_SUFFIX@,$WINT_T_SUFFIX,;t t
22042 s,@STDINT_H@,$STDINT_H,;t t
22043 s,@NEXT_STRING_H@,$NEXT_STRING_H,;t t
22044 s,@GNULIB_WCWIDTH@,$GNULIB_WCWIDTH,;t t
22045 s,@HAVE_DECL_WCWIDTH@,$HAVE_DECL_WCWIDTH,;t t
22046 s,@REPLACE_WCWIDTH@,$REPLACE_WCWIDTH,;t t
22047 s,@WCHAR_H@,$WCHAR_H,;t t
22048 s,@HAVE_WCHAR_H@,$HAVE_WCHAR_H,;t t
22049 s,@NEXT_WCHAR_H@,$NEXT_WCHAR_H,;t t
22050 s,@LIBGNU_LIBDEPS@,$LIBGNU_LIBDEPS,;t t
22051 s,@LIBGNU_LTLIBDEPS@,$LIBGNU_LTLIBDEPS,;t t
22052 s,@GNULIB_STDINT_H@,$GNULIB_STDINT_H,;t t
22053 s,@PACKAGE@,$PACKAGE,;t t
22054 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22055 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22056 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22057 s,@CYGPATH_W@,$CYGPATH_W,;t t
22058 s,@PYTHON2_4@,$PYTHON2_4,;t t
22059 s,@ACLOCAL@,$ACLOCAL,;t t
22060 s,@AUTOCONF@,$AUTOCONF,;t t
22061 s,@AUTOMAKE@,$AUTOMAKE,;t t
22062 s,@AUTOHEADER@,$AUTOHEADER,;t t
22063 s,@MAKEINFO@,$MAKEINFO,;t t
22064 s,@install_sh@,$install_sh,;t t
22065 s,@STRIP@,$STRIP,;t t
22066 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
22067 s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
22068 s,@mkdir_p@,$mkdir_p,;t t
22069 s,@AWK@,$AWK,;t t
22070 s,@AMTAR@,$AMTAR,;t t
22071 s,@am__tar@,$am__tar,;t t
22072 s,@am__untar@,$am__untar,;t t
22073 s,@am__include@,$am__include,;t t
22074 s,@am__quote@,$am__quote,;t t
22075 s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
22076 s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
22077 s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
22078 s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
22079 s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
22080 s,@subdirs@,$subdirs,;t t
22081 s,@TARGET_OBS@,$TARGET_OBS,;t t
22082 s,@PKGVERSION@,$PKGVERSION,;t t
22083 s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
22084 s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
22085 s,@LN_S@,$LN_S,;t t
22086 s,@YACC@,$YACC,;t t
22087 s,@AR@,$AR,;t t
22088 s,@ac_ct_AR@,$ac_ct_AR,;t t
22089 s,@DLLTOOL@,$DLLTOOL,;t t
22090 s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
22091 s,@WINDRES@,$WINDRES,;t t
22092 s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t
22093 s,@MIG@,$MIG,;t t
22094 s,@ac_ct_MIG@,$ac_ct_MIG,;t t
22095 s,@READLINE@,$READLINE,;t t
22096 s,@READLINE_DEPS@,$READLINE_DEPS,;t t
22097 s,@READLINE_CFLAGS@,$READLINE_CFLAGS,;t t
22098 s,@HAVE_LIBEXPAT@,$HAVE_LIBEXPAT,;t t
22099 s,@LIBEXPAT@,$LIBEXPAT,;t t
22100 s,@LTLIBEXPAT@,$LTLIBEXPAT,;t t
22101 s,@PYTHON_CFLAGS@,$PYTHON_CFLAGS,;t t
22102 s,@ALLOCA@,$ALLOCA,;t t
22103 s,@CONFIG_LDFLAGS@,$CONFIG_LDFLAGS,;t t
22104 s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
22105 s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
22106 s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
22107 s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t
22108 s,@SER_HARDWIRE@,$SER_HARDWIRE,;t t
22109 s,@WIN32LIBS@,$WIN32LIBS,;t t
22110 s,@LIBGUI@,$LIBGUI,;t t
22111 s,@GUI_CFLAGS_X@,$GUI_CFLAGS_X,;t t
22112 s,@WIN32LDAPP@,$WIN32LDAPP,;t t
22113 s,@TCL_VERSION@,$TCL_VERSION,;t t
22114 s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
22115 s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
22116 s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
22117 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
22118 s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
22119 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
22120 s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
22121 s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
22122 s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
22123 s,@TCL_INCLUDE@,$TCL_INCLUDE,;t t
22124 s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
22125 s,@TCL_DEPS@,$TCL_DEPS,;t t
22126 s,@TK_VERSION@,$TK_VERSION,;t t
22127 s,@TK_BIN_DIR@,$TK_BIN_DIR,;t t
22128 s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t
22129 s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
22130 s,@TK_LIB_FLAG@,$TK_LIB_FLAG,;t t
22131 s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
22132 s,@TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t
22133 s,@TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t
22134 s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t
22135 s,@TK_INCLUDE@,$TK_INCLUDE,;t t
22136 s,@TK_LIBRARY@,$TK_LIBRARY,;t t
22137 s,@TK_DEPS@,$TK_DEPS,;t t
22138 s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t
22139 s,@X_CFLAGS@,$X_CFLAGS,;t t
22140 s,@X_LDFLAGS@,$X_LDFLAGS,;t t
22141 s,@X_LIBS@,$X_LIBS,;t t
22142 s,@GDBTKLIBS@,$GDBTKLIBS,;t t
22143 s,@GDBTK_CFLAGS@,$GDBTK_CFLAGS,;t t
22144 s,@GDBTK_SRC_DIR@,$GDBTK_SRC_DIR,;t t
22145 s,@SIM@,$SIM,;t t
22146 s,@SIM_OBS@,$SIM_OBS,;t t
22147 s,@ENABLE_CFLAGS@,$ENABLE_CFLAGS,;t t
22148 s,@PROFILE_CFLAGS@,$PROFILE_CFLAGS,;t t
22149 s,@CONFIG_OBS@,$CONFIG_OBS,;t t
22150 s,@CONFIG_DEPS@,$CONFIG_DEPS,;t t
22151 s,@CONFIG_SRCS@,$CONFIG_SRCS,;t t
22152 s,@CONFIG_ALL@,$CONFIG_ALL,;t t
22153 s,@CONFIG_CLEAN@,$CONFIG_CLEAN,;t t
22154 s,@CONFIG_INSTALL@,$CONFIG_INSTALL,;t t
22155 s,@CONFIG_UNINSTALL@,$CONFIG_UNINSTALL,;t t
22156 s,@target_subdir@,$target_subdir,;t t
22157 s,@frags@,$frags,;t t
22158 s,@nm_h@,$nm_h,;t t
22159 s,@datarootdir@,$datarootdir,;t t
22160 s,@docdir@,$docdir,;t t
22161 s,@htmldir@,$htmldir,;t t
22162 s,@pdfdir@,$pdfdir,;t t
22163 s,@LIBOBJS@,$LIBOBJS,;t t
22164 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
22165 s,@gl_LIBOBJS@,$gl_LIBOBJS,;t t
22166 s,@gl_LTLIBOBJS@,$gl_LTLIBOBJS,;t t
22167 s,@gltests_LIBOBJS@,$gltests_LIBOBJS,;t t
22168 s,@gltests_LTLIBOBJS@,$gltests_LTLIBOBJS,;t t
22169 /@host_makefile_frag@/r $host_makefile_frag
22170 s,@host_makefile_frag@,,;t t
22171 CEOF
22172
22173 _ACEOF
22174
22175   cat >>$CONFIG_STATUS <<\_ACEOF
22176   # Split the substitutions into bite-sized pieces for seds with
22177   # small command number limits, like on Digital OSF/1 and HP-UX.
22178   ac_max_sed_lines=48
22179   ac_sed_frag=1 # Number of current file.
22180   ac_beg=1 # First line for current file.
22181   ac_end=$ac_max_sed_lines # Line after last line for current file.
22182   ac_more_lines=:
22183   ac_sed_cmds=
22184   while $ac_more_lines; do
22185     if test $ac_beg -gt 1; then
22186       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22187     else
22188       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22189     fi
22190     if test ! -s $tmp/subs.frag; then
22191       ac_more_lines=false
22192     else
22193       # The purpose of the label and of the branching condition is to
22194       # speed up the sed processing (if there are no `@' at all, there
22195       # is no need to browse any of the substitutions).
22196       # These are the two extra sed commands mentioned above.
22197       (echo ':t
22198   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22199       if test -z "$ac_sed_cmds"; then
22200         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22201       else
22202         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22203       fi
22204       ac_sed_frag=`expr $ac_sed_frag + 1`
22205       ac_beg=$ac_end
22206       ac_end=`expr $ac_end + $ac_max_sed_lines`
22207     fi
22208   done
22209   if test -z "$ac_sed_cmds"; then
22210     ac_sed_cmds=cat
22211   fi
22212 fi # test -n "$CONFIG_FILES"
22213
22214 _ACEOF
22215 cat >>$CONFIG_STATUS <<\_ACEOF
22216 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22217   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22218   case $ac_file in
22219   - | *:- | *:-:* ) # input from stdin
22220         cat >$tmp/stdin
22221         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22222         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22223   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22224         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22225   * )   ac_file_in=$ac_file.in ;;
22226   esac
22227
22228   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22229   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22230 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22231          X"$ac_file" : 'X\(//\)[^/]' \| \
22232          X"$ac_file" : 'X\(//\)$' \| \
22233          X"$ac_file" : 'X\(/\)' \| \
22234          .     : '\(.\)' 2>/dev/null ||
22235 echo X"$ac_file" |
22236     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22237           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22238           /^X\(\/\/\)$/{ s//\1/; q; }
22239           /^X\(\/\).*/{ s//\1/; q; }
22240           s/.*/./; q'`
22241   { if $as_mkdir_p; then
22242     mkdir -p "$ac_dir"
22243   else
22244     as_dir="$ac_dir"
22245     as_dirs=
22246     while test ! -d "$as_dir"; do
22247       as_dirs="$as_dir $as_dirs"
22248       as_dir=`(dirname "$as_dir") 2>/dev/null ||
22249 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22250          X"$as_dir" : 'X\(//\)[^/]' \| \
22251          X"$as_dir" : 'X\(//\)$' \| \
22252          X"$as_dir" : 'X\(/\)' \| \
22253          .     : '\(.\)' 2>/dev/null ||
22254 echo X"$as_dir" |
22255     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22256           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22257           /^X\(\/\/\)$/{ s//\1/; q; }
22258           /^X\(\/\).*/{ s//\1/; q; }
22259           s/.*/./; q'`
22260     done
22261     test ! -n "$as_dirs" || mkdir $as_dirs
22262   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22263 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22264    { (exit 1); exit 1; }; }; }
22265
22266   ac_builddir=.
22267
22268 if test "$ac_dir" != .; then
22269   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22270   # A "../" for each directory in $ac_dir_suffix.
22271   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22272 else
22273   ac_dir_suffix= ac_top_builddir=
22274 fi
22275
22276 case $srcdir in
22277   .)  # No --srcdir option.  We are building in place.
22278     ac_srcdir=.
22279     if test -z "$ac_top_builddir"; then
22280        ac_top_srcdir=.
22281     else
22282        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22283     fi ;;
22284   [\\/]* | ?:[\\/]* )  # Absolute path.
22285     ac_srcdir=$srcdir$ac_dir_suffix;
22286     ac_top_srcdir=$srcdir ;;
22287   *) # Relative path.
22288     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22289     ac_top_srcdir=$ac_top_builddir$srcdir ;;
22290 esac
22291
22292 # Do not use `cd foo && pwd` to compute absolute paths, because
22293 # the directories may not exist.
22294 case `pwd` in
22295 .) ac_abs_builddir="$ac_dir";;
22296 *)
22297   case "$ac_dir" in
22298   .) ac_abs_builddir=`pwd`;;
22299   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22300   *) ac_abs_builddir=`pwd`/"$ac_dir";;
22301   esac;;
22302 esac
22303 case $ac_abs_builddir in
22304 .) ac_abs_top_builddir=${ac_top_builddir}.;;
22305 *)
22306   case ${ac_top_builddir}. in
22307   .) ac_abs_top_builddir=$ac_abs_builddir;;
22308   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22309   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22310   esac;;
22311 esac
22312 case $ac_abs_builddir in
22313 .) ac_abs_srcdir=$ac_srcdir;;
22314 *)
22315   case $ac_srcdir in
22316   .) ac_abs_srcdir=$ac_abs_builddir;;
22317   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22318   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22319   esac;;
22320 esac
22321 case $ac_abs_builddir in
22322 .) ac_abs_top_srcdir=$ac_top_srcdir;;
22323 *)
22324   case $ac_top_srcdir in
22325   .) ac_abs_top_srcdir=$ac_abs_builddir;;
22326   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22327   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22328   esac;;
22329 esac
22330
22331
22332   case $INSTALL in
22333   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22334   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
22335   esac
22336
22337   if test x"$ac_file" != x-; then
22338     { echo "$as_me:$LINENO: creating $ac_file" >&5
22339 echo "$as_me: creating $ac_file" >&6;}
22340     rm -f "$ac_file"
22341   fi
22342   # Let's still pretend it is `configure' which instantiates (i.e., don't
22343   # use $as_me), people would be surprised to read:
22344   #    /* config.h.  Generated by config.status.  */
22345   if test x"$ac_file" = x-; then
22346     configure_input=
22347   else
22348     configure_input="$ac_file.  "
22349   fi
22350   configure_input=$configure_input"Generated from `echo $ac_file_in |
22351                                      sed 's,.*/,,'` by configure."
22352
22353   # First look for the input files in the build tree, otherwise in the
22354   # src tree.
22355   ac_file_inputs=`IFS=:
22356     for f in $ac_file_in; do
22357       case $f in
22358       -) echo $tmp/stdin ;;
22359       [\\/$]*)
22360          # Absolute (can't be DOS-style, as IFS=:)
22361          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22362 echo "$as_me: error: cannot find input file: $f" >&2;}
22363    { (exit 1); exit 1; }; }
22364          echo "$f";;
22365       *) # Relative
22366          if test -f "$f"; then
22367            # Build tree
22368            echo "$f"
22369          elif test -f "$srcdir/$f"; then
22370            # Source tree
22371            echo "$srcdir/$f"
22372          else
22373            # /dev/null tree
22374            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22375 echo "$as_me: error: cannot find input file: $f" >&2;}
22376    { (exit 1); exit 1; }; }
22377          fi;;
22378       esac
22379     done` || { (exit 1); exit 1; }
22380 _ACEOF
22381 cat >>$CONFIG_STATUS <<_ACEOF
22382   sed "$ac_vpsub
22383 $extrasub
22384 _ACEOF
22385 cat >>$CONFIG_STATUS <<\_ACEOF
22386 :t
22387 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22388 s,@configure_input@,$configure_input,;t t
22389 s,@srcdir@,$ac_srcdir,;t t
22390 s,@abs_srcdir@,$ac_abs_srcdir,;t t
22391 s,@top_srcdir@,$ac_top_srcdir,;t t
22392 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22393 s,@builddir@,$ac_builddir,;t t
22394 s,@abs_builddir@,$ac_abs_builddir,;t t
22395 s,@top_builddir@,$ac_top_builddir,;t t
22396 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22397 s,@INSTALL@,$ac_INSTALL,;t t
22398 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22399   rm -f $tmp/stdin
22400   if test x"$ac_file" != x-; then
22401     mv $tmp/out $ac_file
22402   else
22403     cat $tmp/out
22404     rm -f $tmp/out
22405   fi
22406
22407 done
22408 _ACEOF
22409 cat >>$CONFIG_STATUS <<\_ACEOF
22410
22411 #
22412 # CONFIG_HEADER section.
22413 #
22414
22415 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22416 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22417 #
22418 # ac_d sets the value in "#define NAME VALUE" lines.
22419 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
22420 ac_dB='[         ].*$,\1#\2'
22421 ac_dC=' '
22422 ac_dD=',;t'
22423 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22424 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22425 ac_uB='$,\1#\2define\3'
22426 ac_uC=' '
22427 ac_uD=',;t'
22428
22429 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22430   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22431   case $ac_file in
22432   - | *:- | *:-:* ) # input from stdin
22433         cat >$tmp/stdin
22434         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22435         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22436   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22437         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22438   * )   ac_file_in=$ac_file.in ;;
22439   esac
22440
22441   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22442 echo "$as_me: creating $ac_file" >&6;}
22443
22444   # First look for the input files in the build tree, otherwise in the
22445   # src tree.
22446   ac_file_inputs=`IFS=:
22447     for f in $ac_file_in; do
22448       case $f in
22449       -) echo $tmp/stdin ;;
22450       [\\/$]*)
22451          # Absolute (can't be DOS-style, as IFS=:)
22452          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22453 echo "$as_me: error: cannot find input file: $f" >&2;}
22454    { (exit 1); exit 1; }; }
22455          # Do quote $f, to prevent DOS paths from being IFS'd.
22456          echo "$f";;
22457       *) # Relative
22458          if test -f "$f"; then
22459            # Build tree
22460            echo "$f"
22461          elif test -f "$srcdir/$f"; then
22462            # Source tree
22463            echo "$srcdir/$f"
22464          else
22465            # /dev/null tree
22466            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22467 echo "$as_me: error: cannot find input file: $f" >&2;}
22468    { (exit 1); exit 1; }; }
22469          fi;;
22470       esac
22471     done` || { (exit 1); exit 1; }
22472   # Remove the trailing spaces.
22473   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
22474
22475 _ACEOF
22476
22477 # Transform confdefs.h into two sed scripts, `conftest.defines' and
22478 # `conftest.undefs', that substitutes the proper values into
22479 # config.h.in to produce config.h.  The first handles `#define'
22480 # templates, and the second `#undef' templates.
22481 # And first: Protect against being on the right side of a sed subst in
22482 # config.status.  Protect against being in an unquoted here document
22483 # in config.status.
22484 rm -f conftest.defines conftest.undefs
22485 # Using a here document instead of a string reduces the quoting nightmare.
22486 # Putting comments in sed scripts is not portable.
22487 #
22488 # `end' is used to avoid that the second main sed command (meant for
22489 # 0-ary CPP macros) applies to n-ary macro definitions.
22490 # See the Autoconf documentation for `clear'.
22491 cat >confdef2sed.sed <<\_ACEOF
22492 s/[\\&,]/\\&/g
22493 s,[\\$`],\\&,g
22494 t clear
22495 : clear
22496 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
22497 t end
22498 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
22499 : end
22500 _ACEOF
22501 # If some macros were called several times there might be several times
22502 # the same #defines, which is useless.  Nevertheless, we may not want to
22503 # sort them, since we want the *last* AC-DEFINE to be honored.
22504 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22505 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22506 rm -f confdef2sed.sed
22507
22508 # This sed command replaces #undef with comments.  This is necessary, for
22509 # example, in the case of _POSIX_SOURCE, which is predefined and required
22510 # on some systems where configure will not decide to define it.
22511 cat >>conftest.undefs <<\_ACEOF
22512 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
22513 _ACEOF
22514
22515 # Break up conftest.defines because some shells have a limit on the size
22516 # of here documents, and old seds have small limits too (100 cmds).
22517 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
22518 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
22519 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22520 echo '  :' >>$CONFIG_STATUS
22521 rm -f conftest.tail
22522 while grep . conftest.defines >/dev/null
22523 do
22524   # Write a limited-size here document to $tmp/defines.sed.
22525   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22526   # Speed up: don't consider the non `#define' lines.
22527   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
22528   # Work around the forget-to-reset-the-flag bug.
22529   echo 't clr' >>$CONFIG_STATUS
22530   echo ': clr' >>$CONFIG_STATUS
22531   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
22532   echo 'CEOF
22533   sed -f $tmp/defines.sed $tmp/in >$tmp/out
22534   rm -f $tmp/in
22535   mv $tmp/out $tmp/in
22536 ' >>$CONFIG_STATUS
22537   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22538   rm -f conftest.defines
22539   mv conftest.tail conftest.defines
22540 done
22541 rm -f conftest.defines
22542 echo '  fi # grep' >>$CONFIG_STATUS
22543 echo >>$CONFIG_STATUS
22544
22545 # Break up conftest.undefs because some shells have a limit on the size
22546 # of here documents, and old seds have small limits too (100 cmds).
22547 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
22548 rm -f conftest.tail
22549 while grep . conftest.undefs >/dev/null
22550 do
22551   # Write a limited-size here document to $tmp/undefs.sed.
22552   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22553   # Speed up: don't consider the non `#undef'
22554   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
22555   # Work around the forget-to-reset-the-flag bug.
22556   echo 't clr' >>$CONFIG_STATUS
22557   echo ': clr' >>$CONFIG_STATUS
22558   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22559   echo 'CEOF
22560   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22561   rm -f $tmp/in
22562   mv $tmp/out $tmp/in
22563 ' >>$CONFIG_STATUS
22564   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22565   rm -f conftest.undefs
22566   mv conftest.tail conftest.undefs
22567 done
22568 rm -f conftest.undefs
22569
22570 cat >>$CONFIG_STATUS <<\_ACEOF
22571   # Let's still pretend it is `configure' which instantiates (i.e., don't
22572   # use $as_me), people would be surprised to read:
22573   #    /* config.h.  Generated by config.status.  */
22574   if test x"$ac_file" = x-; then
22575     echo "/* Generated by configure.  */" >$tmp/config.h
22576   else
22577     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
22578   fi
22579   cat $tmp/in >>$tmp/config.h
22580   rm -f $tmp/in
22581   if test x"$ac_file" != x-; then
22582     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
22583       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22584 echo "$as_me: $ac_file is unchanged" >&6;}
22585     else
22586       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22587 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22588          X"$ac_file" : 'X\(//\)[^/]' \| \
22589          X"$ac_file" : 'X\(//\)$' \| \
22590          X"$ac_file" : 'X\(/\)' \| \
22591          .     : '\(.\)' 2>/dev/null ||
22592 echo X"$ac_file" |
22593     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22594           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22595           /^X\(\/\/\)$/{ s//\1/; q; }
22596           /^X\(\/\).*/{ s//\1/; q; }
22597           s/.*/./; q'`
22598       { if $as_mkdir_p; then
22599     mkdir -p "$ac_dir"
22600   else
22601     as_dir="$ac_dir"
22602     as_dirs=
22603     while test ! -d "$as_dir"; do
22604       as_dirs="$as_dir $as_dirs"
22605       as_dir=`(dirname "$as_dir") 2>/dev/null ||
22606 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22607          X"$as_dir" : 'X\(//\)[^/]' \| \
22608          X"$as_dir" : 'X\(//\)$' \| \
22609          X"$as_dir" : 'X\(/\)' \| \
22610          .     : '\(.\)' 2>/dev/null ||
22611 echo X"$as_dir" |
22612     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22613           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22614           /^X\(\/\/\)$/{ s//\1/; q; }
22615           /^X\(\/\).*/{ s//\1/; q; }
22616           s/.*/./; q'`
22617     done
22618     test ! -n "$as_dirs" || mkdir $as_dirs
22619   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22620 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22621    { (exit 1); exit 1; }; }; }
22622
22623       rm -f $ac_file
22624       mv $tmp/config.h $ac_file
22625     fi
22626   else
22627     cat $tmp/config.h
22628     rm -f $tmp/config.h
22629   fi
22630 # Compute $ac_file's index in $config_headers.
22631 _am_stamp_count=1
22632 for _am_header in $config_headers :; do
22633   case $_am_header in
22634     $ac_file | $ac_file:* )
22635       break ;;
22636     * )
22637       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
22638   esac
22639 done
22640 echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
22641 $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22642          X$ac_file : 'X\(//\)[^/]' \| \
22643          X$ac_file : 'X\(//\)$' \| \
22644          X$ac_file : 'X\(/\)' \| \
22645          .     : '\(.\)' 2>/dev/null ||
22646 echo X$ac_file |
22647     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22648           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22649           /^X\(\/\/\)$/{ s//\1/; q; }
22650           /^X\(\/\).*/{ s//\1/; q; }
22651           s/.*/./; q'`/stamp-h$_am_stamp_count
22652 done
22653 _ACEOF
22654 cat >>$CONFIG_STATUS <<\_ACEOF
22655
22656 #
22657 # CONFIG_LINKS section.
22658 #
22659
22660 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
22661   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22662   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22663
22664   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
22665 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
22666
22667   if test ! -r $srcdir/$ac_source; then
22668     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
22669 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
22670    { (exit 1); exit 1; }; }
22671   fi
22672   rm -f $ac_dest
22673
22674   # Make relative symlinks.
22675   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
22676 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22677          X"$ac_dest" : 'X\(//\)[^/]' \| \
22678          X"$ac_dest" : 'X\(//\)$' \| \
22679          X"$ac_dest" : 'X\(/\)' \| \
22680          .     : '\(.\)' 2>/dev/null ||
22681 echo X"$ac_dest" |
22682     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22683           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22684           /^X\(\/\/\)$/{ s//\1/; q; }
22685           /^X\(\/\).*/{ s//\1/; q; }
22686           s/.*/./; q'`
22687   { if $as_mkdir_p; then
22688     mkdir -p "$ac_dest_dir"
22689   else
22690     as_dir="$ac_dest_dir"
22691     as_dirs=
22692     while test ! -d "$as_dir"; do
22693       as_dirs="$as_dir $as_dirs"
22694       as_dir=`(dirname "$as_dir") 2>/dev/null ||
22695 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22696          X"$as_dir" : 'X\(//\)[^/]' \| \
22697          X"$as_dir" : 'X\(//\)$' \| \
22698          X"$as_dir" : 'X\(/\)' \| \
22699          .     : '\(.\)' 2>/dev/null ||
22700 echo X"$as_dir" |
22701     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22702           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22703           /^X\(\/\/\)$/{ s//\1/; q; }
22704           /^X\(\/\).*/{ s//\1/; q; }
22705           s/.*/./; q'`
22706     done
22707     test ! -n "$as_dirs" || mkdir $as_dirs
22708   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
22709 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
22710    { (exit 1); exit 1; }; }; }
22711
22712   ac_builddir=.
22713
22714 if test "$ac_dest_dir" != .; then
22715   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
22716   # A "../" for each directory in $ac_dir_suffix.
22717   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22718 else
22719   ac_dir_suffix= ac_top_builddir=
22720 fi
22721
22722 case $srcdir in
22723   .)  # No --srcdir option.  We are building in place.
22724     ac_srcdir=.
22725     if test -z "$ac_top_builddir"; then
22726        ac_top_srcdir=.
22727     else
22728        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22729     fi ;;
22730   [\\/]* | ?:[\\/]* )  # Absolute path.
22731     ac_srcdir=$srcdir$ac_dir_suffix;
22732     ac_top_srcdir=$srcdir ;;
22733   *) # Relative path.
22734     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22735     ac_top_srcdir=$ac_top_builddir$srcdir ;;
22736 esac
22737
22738 # Do not use `cd foo && pwd` to compute absolute paths, because
22739 # the directories may not exist.
22740 case `pwd` in
22741 .) ac_abs_builddir="$ac_dest_dir";;
22742 *)
22743   case "$ac_dest_dir" in
22744   .) ac_abs_builddir=`pwd`;;
22745   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
22746   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
22747   esac;;
22748 esac
22749 case $ac_abs_builddir in
22750 .) ac_abs_top_builddir=${ac_top_builddir}.;;
22751 *)
22752   case ${ac_top_builddir}. in
22753   .) ac_abs_top_builddir=$ac_abs_builddir;;
22754   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22755   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22756   esac;;
22757 esac
22758 case $ac_abs_builddir in
22759 .) ac_abs_srcdir=$ac_srcdir;;
22760 *)
22761   case $ac_srcdir in
22762   .) ac_abs_srcdir=$ac_abs_builddir;;
22763   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22764   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22765   esac;;
22766 esac
22767 case $ac_abs_builddir in
22768 .) ac_abs_top_srcdir=$ac_top_srcdir;;
22769 *)
22770   case $ac_top_srcdir in
22771   .) ac_abs_top_srcdir=$ac_abs_builddir;;
22772   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22773   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22774   esac;;
22775 esac
22776
22777
22778   case $srcdir in
22779   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
22780       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
22781   esac
22782
22783   # Try a symlink, then a hard link, then a copy.
22784   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
22785     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
22786     cp -p $srcdir/$ac_source $ac_dest ||
22787     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
22788 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
22789    { (exit 1); exit 1; }; }
22790 done
22791 _ACEOF
22792 cat >>$CONFIG_STATUS <<\_ACEOF
22793
22794 #
22795 # CONFIG_COMMANDS section.
22796 #
22797 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22798   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22799   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22800   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
22801 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22802          X"$ac_dest" : 'X\(//\)[^/]' \| \
22803          X"$ac_dest" : 'X\(//\)$' \| \
22804          X"$ac_dest" : 'X\(/\)' \| \
22805          .     : '\(.\)' 2>/dev/null ||
22806 echo X"$ac_dest" |
22807     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22808           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22809           /^X\(\/\/\)$/{ s//\1/; q; }
22810           /^X\(\/\).*/{ s//\1/; q; }
22811           s/.*/./; q'`
22812   { if $as_mkdir_p; then
22813     mkdir -p "$ac_dir"
22814   else
22815     as_dir="$ac_dir"
22816     as_dirs=
22817     while test ! -d "$as_dir"; do
22818       as_dirs="$as_dir $as_dirs"
22819       as_dir=`(dirname "$as_dir") 2>/dev/null ||
22820 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22821          X"$as_dir" : 'X\(//\)[^/]' \| \
22822          X"$as_dir" : 'X\(//\)$' \| \
22823          X"$as_dir" : 'X\(/\)' \| \
22824          .     : '\(.\)' 2>/dev/null ||
22825 echo X"$as_dir" |
22826     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22827           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22828           /^X\(\/\/\)$/{ s//\1/; q; }
22829           /^X\(\/\).*/{ s//\1/; q; }
22830           s/.*/./; q'`
22831     done
22832     test ! -n "$as_dirs" || mkdir $as_dirs
22833   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22834 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22835    { (exit 1); exit 1; }; }; }
22836
22837   ac_builddir=.
22838
22839 if test "$ac_dir" != .; then
22840   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22841   # A "../" for each directory in $ac_dir_suffix.
22842   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22843 else
22844   ac_dir_suffix= ac_top_builddir=
22845 fi
22846
22847 case $srcdir in
22848   .)  # No --srcdir option.  We are building in place.
22849     ac_srcdir=.
22850     if test -z "$ac_top_builddir"; then
22851        ac_top_srcdir=.
22852     else
22853        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22854     fi ;;
22855   [\\/]* | ?:[\\/]* )  # Absolute path.
22856     ac_srcdir=$srcdir$ac_dir_suffix;
22857     ac_top_srcdir=$srcdir ;;
22858   *) # Relative path.
22859     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22860     ac_top_srcdir=$ac_top_builddir$srcdir ;;
22861 esac
22862
22863 # Do not use `cd foo && pwd` to compute absolute paths, because
22864 # the directories may not exist.
22865 case `pwd` in
22866 .) ac_abs_builddir="$ac_dir";;
22867 *)
22868   case "$ac_dir" in
22869   .) ac_abs_builddir=`pwd`;;
22870   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22871   *) ac_abs_builddir=`pwd`/"$ac_dir";;
22872   esac;;
22873 esac
22874 case $ac_abs_builddir in
22875 .) ac_abs_top_builddir=${ac_top_builddir}.;;
22876 *)
22877   case ${ac_top_builddir}. in
22878   .) ac_abs_top_builddir=$ac_abs_builddir;;
22879   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22880   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22881   esac;;
22882 esac
22883 case $ac_abs_builddir in
22884 .) ac_abs_srcdir=$ac_srcdir;;
22885 *)
22886   case $ac_srcdir in
22887   .) ac_abs_srcdir=$ac_abs_builddir;;
22888   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22889   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22890   esac;;
22891 esac
22892 case $ac_abs_builddir in
22893 .) ac_abs_top_srcdir=$ac_top_srcdir;;
22894 *)
22895   case $ac_top_srcdir in
22896   .) ac_abs_top_srcdir=$ac_abs_builddir;;
22897   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22898   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22899   esac;;
22900 esac
22901
22902
22903   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
22904 echo "$as_me: executing $ac_dest commands" >&6;}
22905   case $ac_dest in
22906     depdir ) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
22907     depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
22908   # Strip MF so we end up with the name of the file.
22909   mf=`echo "$mf" | sed -e 's/:.*$//'`
22910   # Check whether this is an Automake generated Makefile or not.
22911   # We used to match only the files named `Makefile.in', but
22912   # some people rename them; so instead we look at the file content.
22913   # Grep'ing the first line is not enough: some people post-process
22914   # each Makefile.in and add a new line on top of each file to say so.
22915   # So let's grep whole file.
22916   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
22917     dirpart=`(dirname "$mf") 2>/dev/null ||
22918 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22919          X"$mf" : 'X\(//\)[^/]' \| \
22920          X"$mf" : 'X\(//\)$' \| \
22921          X"$mf" : 'X\(/\)' \| \
22922          .     : '\(.\)' 2>/dev/null ||
22923 echo X"$mf" |
22924     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22925           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22926           /^X\(\/\/\)$/{ s//\1/; q; }
22927           /^X\(\/\).*/{ s//\1/; q; }
22928           s/.*/./; q'`
22929   else
22930     continue
22931   fi
22932   # Extract the definition of DEPDIR, am__include, and am__quote
22933   # from the Makefile without running `make'.
22934   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
22935   test -z "$DEPDIR" && continue
22936   am__include=`sed -n 's/^am__include = //p' < "$mf"`
22937   test -z "am__include" && continue
22938   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
22939   # When using ansi2knr, U may be empty or an underscore; expand it
22940   U=`sed -n 's/^U = //p' < "$mf"`
22941   # Find all dependency output files, they are included files with
22942   # $(DEPDIR) in their names.  We invoke sed twice because it is the
22943   # simplest approach to changing $(DEPDIR) to its actual value in the
22944   # expansion.
22945   for file in `sed -n "
22946     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
22947        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
22948     # Make sure the directory exists.
22949     test -f "$dirpart/$file" && continue
22950     fdir=`(dirname "$file") 2>/dev/null ||
22951 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22952          X"$file" : 'X\(//\)[^/]' \| \
22953          X"$file" : 'X\(//\)$' \| \
22954          X"$file" : 'X\(/\)' \| \
22955          .     : '\(.\)' 2>/dev/null ||
22956 echo X"$file" |
22957     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22958           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22959           /^X\(\/\/\)$/{ s//\1/; q; }
22960           /^X\(\/\).*/{ s//\1/; q; }
22961           s/.*/./; q'`
22962     { if $as_mkdir_p; then
22963     mkdir -p $dirpart/$fdir
22964   else
22965     as_dir=$dirpart/$fdir
22966     as_dirs=
22967     while test ! -d "$as_dir"; do
22968       as_dirs="$as_dir $as_dirs"
22969       as_dir=`(dirname "$as_dir") 2>/dev/null ||
22970 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22971          X"$as_dir" : 'X\(//\)[^/]' \| \
22972          X"$as_dir" : 'X\(//\)$' \| \
22973          X"$as_dir" : 'X\(/\)' \| \
22974          .     : '\(.\)' 2>/dev/null ||
22975 echo X"$as_dir" |
22976     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22977           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22978           /^X\(\/\/\)$/{ s//\1/; q; }
22979           /^X\(\/\).*/{ s//\1/; q; }
22980           s/.*/./; q'`
22981     done
22982     test ! -n "$as_dirs" || mkdir $as_dirs
22983   fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
22984 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
22985    { (exit 1); exit 1; }; }; }
22986
22987     # echo "creating $dirpart/$file"
22988     echo '# dummy' > "$dirpart/$file"
22989   done
22990 done
22991  ;;
22992     default )
22993
22994 sed -e '/^NAT_FILE[     ]*=/s,^NAT_FILE[        ]*=[    ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
22995 mv -f Makefile.tmp Makefile
22996
22997
22998 case x$CONFIG_HEADERS in
22999 xconfig.h:config.in)
23000 echo > stamp-h ;;
23001 esac
23002  ;;
23003   esac
23004 done
23005 _ACEOF
23006
23007 cat >>$CONFIG_STATUS <<\_ACEOF
23008
23009 { (exit 0); exit 0; }
23010 _ACEOF
23011 chmod +x $CONFIG_STATUS
23012 ac_clean_files=$ac_clean_files_save
23013
23014
23015 # configure is writing to config.log, and then calls config.status.
23016 # config.status does its own redirection, appending to config.log.
23017 # Unfortunately, on DOS this fails, as config.log is still kept open
23018 # by configure, so config.status won't be able to write to it; its
23019 # output is simply discarded.  So we exec the FD to /dev/null,
23020 # effectively closing config.log, so it can be properly (re)opened and
23021 # appended to by config.status.  When coming back to configure, we
23022 # need to make the FD available again.
23023 if test "$no_create" != yes; then
23024   ac_cs_success=:
23025   ac_config_status_args=
23026   test "$silent" = yes &&
23027     ac_config_status_args="$ac_config_status_args --quiet"
23028   exec 5>/dev/null
23029   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23030   exec 5>>config.log
23031   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23032   # would make configure fail if this is the last instruction.
23033   $ac_cs_success || { (exit 1); exit 1; }
23034 fi
23035
23036 #
23037 # CONFIG_SUBDIRS section, as fixed in confsubdir.m4.
23038 #
23039 if test "$no_recursion" != yes; then
23040
23041   # Remove --cache-file and --srcdir arguments so they do not pile up.
23042   ac_sub_configure_args=
23043   ac_prev=
23044   eval "set x $ac_configure_args"
23045   shift
23046   for ac_arg
23047   do
23048     if test -n "$ac_prev"; then
23049       ac_prev=
23050       continue
23051     fi
23052     case $ac_arg in
23053     -cache-file | --cache-file | --cache-fil | --cache-fi \
23054     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
23055       ac_prev=cache_file ;;
23056     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
23057     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
23058     | --c=*)
23059       ;;
23060     --config-cache | -C)
23061       ;;
23062     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
23063       ac_prev=srcdir ;;
23064     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
23065       ;;
23066     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
23067       ac_prev=prefix ;;
23068     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
23069       ;;
23070     *)
23071       case $ac_arg in
23072       *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
23073       esac
23074       ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
23075     esac
23076   done
23077
23078   # Always prepend --prefix to ensure using the same prefix
23079   # in subdir configurations.
23080   ac_arg="--prefix=$prefix"
23081   case $ac_arg in
23082   *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
23083   esac
23084   ac_sub_configure_args="$ac_arg $ac_sub_configure_args"
23085
23086   ac_popdir=`pwd`
23087   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
23088
23089     # Do not complain, so a configure script can configure whichever
23090     # parts of a large source tree are present.
23091     test -d "$srcdir/$ac_dir" || continue
23092
23093     { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
23094 echo "$as_me: configuring in $ac_dir" >&6;}
23095     { if $as_mkdir_p; then
23096     mkdir -p "$ac_dir"
23097   else
23098     as_dir="$ac_dir"
23099     as_dirs=
23100     while test ! -d "$as_dir"; do
23101       as_dirs="$as_dir $as_dirs"
23102       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23103 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23104          X"$as_dir" : 'X\(//\)[^/]' \| \
23105          X"$as_dir" : 'X\(//\)$' \| \
23106          X"$as_dir" : 'X\(/\)' \| \
23107          .     : '\(.\)' 2>/dev/null ||
23108 echo X"$as_dir" |
23109     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23110           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23111           /^X\(\/\/\)$/{ s//\1/; q; }
23112           /^X\(\/\).*/{ s//\1/; q; }
23113           s/.*/./; q'`
23114     done
23115     test ! -n "$as_dirs" || mkdir $as_dirs
23116   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23117 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23118    { (exit 1); exit 1; }; }; }
23119
23120     ac_builddir=.
23121
23122 if test "$ac_dir" != .; then
23123   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23124   # A "../" for each directory in $ac_dir_suffix.
23125   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23126 else
23127   ac_dir_suffix= ac_top_builddir=
23128 fi
23129
23130 case $srcdir in
23131   .)  # No --srcdir option.  We are building in place.
23132     ac_srcdir=.
23133     if test -z "$ac_top_builddir"; then
23134        ac_top_srcdir=.
23135     else
23136        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23137     fi ;;
23138   [\\/]* | ?:[\\/]* )  # Absolute path.
23139     ac_srcdir=$srcdir$ac_dir_suffix;
23140     ac_top_srcdir=$srcdir ;;
23141   *) # Relative path.
23142     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23143     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23144 esac
23145
23146 # Do not use `cd foo && pwd` to compute absolute paths, because
23147 # the directories may not exist.
23148 case `pwd` in
23149 .) ac_abs_builddir="$ac_dir";;
23150 *)
23151   case "$ac_dir" in
23152   .) ac_abs_builddir=`pwd`;;
23153   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23154   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23155   esac;;
23156 esac
23157 case $ac_abs_builddir in
23158 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23159 *)
23160   case ${ac_top_builddir}. in
23161   .) ac_abs_top_builddir=$ac_abs_builddir;;
23162   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23163   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23164   esac;;
23165 esac
23166 case $ac_abs_builddir in
23167 .) ac_abs_srcdir=$ac_srcdir;;
23168 *)
23169   case $ac_srcdir in
23170   .) ac_abs_srcdir=$ac_abs_builddir;;
23171   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23172   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23173   esac;;
23174 esac
23175 case $ac_abs_builddir in
23176 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23177 *)
23178   case $ac_top_srcdir in
23179   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23180   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23181   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23182   esac;;
23183 esac
23184
23185
23186     cd "$ac_dir"
23187
23188     # Check for guested configure; otherwise get Cygnus style configure.
23189     if test -f "$ac_srcdir/configure.gnu"; then
23190       ac_sub_configure=$ac_srcdir/configure.gnu
23191     elif test -f "$ac_srcdir/configure"; then
23192       ac_sub_configure=$ac_srcdir/configure
23193     elif test -f "$ac_srcdir/configure.in"; then
23194       # This should be Cygnus configure.
23195       ac_sub_configure=$ac_aux_dir/configure
23196     else
23197       { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
23198 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
23199       ac_sub_configure=
23200     fi
23201
23202     # The recursion is here.
23203     if test -n "$ac_sub_configure"; then
23204       # Make the cache file name correct relative to the subdirectory.
23205       case $cache_file in
23206       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
23207       *) # Relative path.
23208         ac_sub_cache_file=$ac_top_builddir$cache_file ;;
23209       esac
23210
23211       { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
23212 echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
23213       # The eval makes quoting arguments work.
23214       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
23215            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
23216         { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
23217 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
23218    { (exit 1); exit 1; }; }
23219     fi
23220
23221     cd "$ac_popdir"
23222   done
23223 fi
23224
23225
23226 exit 0