Copy edit File-I/O section of manual
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
b4e70030 3# Generated by GNU Autoconf 2.59.
c906108c 4#
b4e70030 5# Copyright (C) 2003 Free Software Foundation, Inc.
c906108c
SS
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
bec39cab
AC
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
11
12# Be Bourne compatible
13if 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+"$@"}'='"$@"'
b4e70030
JB
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
bec39cab
AC
21fi
22DUALCASE=1; export DUALCASE # for MKS sh
23
24# Support unset when possible.
25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
b4e70030 33$as_unset ENV MAIL MAILPATH
bec39cab
AC
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for 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
43do
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
b4e70030 47 $as_unset $as_var
bec39cab
AC
48 fi
49done
50
51# Required to use basename.
b4e70030 52if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
53 as_expr=expr
54else
55 as_expr=false
56fi
57
b4e70030 58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
bec39cab
AC
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
b4e70030 66as_me=`$as_basename "$0" ||
bec39cab
AC
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
bec39cab 71echo X/"$0" |
b4e70030
JB
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
bec39cab 76
4e8d927d 77
b4e70030
JB
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 85
b4e70030
JB
86# The user is always right.
87if 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
4e8d927d
DJ
97fi
98
4e8d927d 99
b4e70030
JB
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
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
4e8d927d 116
b4e70030
JB
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 '')
bec39cab 130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
b4e70030 131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab
AC
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
b4e70030
JB
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
bec39cab 137 /*)
b4e70030 138 if ("$as_dir/$as_base" -c '
4e8d927d
DJ
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
b4e70030 141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
4e8d927d 142 test "x$as_lineno_1" != "x$as_lineno_2" &&
b4e70030
JB
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
152done
153;;
154 esac
bec39cab
AC
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
b4e70030
JB
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.
bec39cab 162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b4e70030
JB
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
bec39cab
AC
165 sed '
166 N
b4e70030
JB
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
bec39cab 170 t loop
b4e70030
JB
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
bec39cab 173 ' >$as_me.lineno &&
b4e70030 174 chmod +x $as_me.lineno ||
bec39cab
AC
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
b4e70030
JB
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
bec39cab
AC
182 # Exit status is that of the last command.
183 exit
184}
185
186
b4e70030
JB
187case `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= ;;
bec39cab
AC
192esac
193
b4e70030 194if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030
JB
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
bec39cab 207 as_ln_s='cp -p'
b4e70030
JB
208 else
209 as_ln_s='ln -s'
210 fi
bec39cab
AC
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
b4e70030 216rm -f conf$$ conf$$.exe conf$$.file
bec39cab
AC
217
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
221 test -d ./-p && rmdir ./-p
222 as_mkdir_p=false
223fi
224
b4e70030 225as_executable_p="test -f"
bec39cab
AC
226
227# Sed expression to map a string onto a valid CPP name.
228as_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.
231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
232
233
b4e70030
JB
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
241$as_unset CDPATH
bec39cab 242
c906108c 243
bec39cab
AC
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
b4e70030
JB
249exec 6>&1
250
bec39cab
AC
251#
252# Initializations.
253#
c906108c 254ac_default_prefix=/usr/local
bec39cab
AC
255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
b4e70030
JB
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
bec39cab
AC
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="main.c"
20e95c23 275ac_subdirs_all="$ac_subdirs_all doc testsuite"
bec39cab
AC
276# Factoring default headers for most tests.
277ac_includes_default="\
278#include <stdio.h>
279#if HAVE_SYS_TYPES_H
280# include <sys/types.h>
281#endif
282#if HAVE_SYS_STAT_H
283# include <sys/stat.h>
284#endif
285#if STDC_HEADERS
286# include <stdlib.h>
287# include <stddef.h>
288#else
289# if HAVE_STDLIB_H
290# include <stdlib.h>
291# endif
292#endif
293#if HAVE_STRING_H
294# if !STDC_HEADERS && HAVE_MEMORY_H
295# include <memory.h>
296# endif
297# include <string.h>
298#endif
299#if HAVE_STRINGS_H
300# include <strings.h>
301#endif
302#if HAVE_INTTYPES_H
303# include <inttypes.h>
b4e70030
JB
304#else
305# if HAVE_STDINT_H
306# include <stdint.h>
307# endif
bec39cab
AC
308#endif
309#if HAVE_UNISTD_H
310# include <unistd.h>
311#endif"
312
b4e70030
JB
313ac_subdirs_all="$ac_subdirs_all gdbtk"
314ac_subdirs_all="$ac_subdirs_all multi-ice"
315ac_subdirs_all="$ac_subdirs_all gdbserver"
20e95c23 316ac_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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT localedir PACKAGE subdirs AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG 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_MAJOR_VERSION TCL_MINOR_VERSION TCL_CC TCL_DEFS TCL_SHLIB_CFLAGS TCL_SHLIB_LD TCL_SHLIB_LD_LIBS TCL_SHLIB_SUFFIX TCL_DL_LIBS TCL_LD_FLAGS TCL_LD_SEARCH_FLAGS TCL_CC_SEARCH_FLAGS TCL_COMPAT_OBJS TCL_RANLIB TCL_BUILD_LIB_SPEC TCL_LIB_SPEC TCL_LIB_VERSIONS_OK TK_VERSION TK_DEFS TK_BUILD_INCLUDES TK_XINCLUDES TK_XLIBSW TK_BUILD_LIB_SPEC TK_LIB_SPEC TCLHDIR TKHDIR ITCLHDIR ITKHDIR ITCL_VERSION ITCL_DEFS ITCL_BUILD_INCLUDES ITCL_BUILD_LIB_SPEC ITCL_LIB_SPEC ITK_VERSION ITK_DEFS ITK_BUILD_INCLUDES ITK_BUILD_LIB_SPEC ITK_LIB_SPEC X_CFLAGS X_LDFLAGS X_LIBS TCL_DEPS TK_DEPS ITCLLIB ITCL_DEPS ITKLIB ITK_DEPS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR IGNORE_SIM IGNORE_SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags xm_h tm_h nm_h LIBICONV LIBOBJS LTLIBOBJS'
b4e70030 317ac_subst_files='host_makefile_frag target_makefile_frag'
c906108c
SS
318
319# Initialize some variables set by options.
bec39cab
AC
320ac_init_help=
321ac_init_version=false
c906108c
SS
322# The variables have the same names as the options, with
323# dashes changed to underlines.
bec39cab 324cache_file=/dev/null
c906108c 325exec_prefix=NONE
c906108c 326no_create=
c906108c
SS
327no_recursion=
328prefix=NONE
329program_prefix=NONE
330program_suffix=NONE
331program_transform_name=s,x,x,
332silent=
333site=
334srcdir=
c906108c
SS
335verbose=
336x_includes=NONE
337x_libraries=NONE
bec39cab
AC
338
339# Installation directory options.
340# These are left unexpanded so users can "make install exec_prefix=/foo"
341# and all the variables that are supposed to be based on exec_prefix
342# by default will actually change.
343# Use braces instead of parens because sh, perl, etc. also accept them.
c906108c
SS
344bindir='${exec_prefix}/bin'
345sbindir='${exec_prefix}/sbin'
346libexecdir='${exec_prefix}/libexec'
b4e70030 347datadir='${prefix}/share'
c906108c
SS
348sysconfdir='${prefix}/etc'
349sharedstatedir='${prefix}/com'
350localstatedir='${prefix}/var'
b4e70030 351libdir='${exec_prefix}/lib'
c906108c
SS
352includedir='${prefix}/include'
353oldincludedir='/usr/include'
b4e70030
JB
354infodir='${prefix}/info'
355mandir='${prefix}/man'
c906108c 356
c906108c
SS
357ac_prev=
358for ac_option
359do
c906108c
SS
360 # If the previous option needs an argument, assign it.
361 if test -n "$ac_prev"; then
b4e70030 362 eval "$ac_prev=\$ac_option"
c906108c
SS
363 ac_prev=
364 continue
365 fi
366
b4e70030 367 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
c906108c
SS
368
369 # Accept the important Cygnus configure options, so we can diagnose typos.
370
b4e70030 371 case $ac_option in
c906108c
SS
372
373 -bindir | --bindir | --bindi | --bind | --bin | --bi)
374 ac_prev=bindir ;;
375 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 376 bindir=$ac_optarg ;;
c906108c
SS
377
378 -build | --build | --buil | --bui | --bu)
bec39cab 379 ac_prev=build_alias ;;
c906108c 380 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 381 build_alias=$ac_optarg ;;
c906108c
SS
382
383 -cache-file | --cache-file | --cache-fil | --cache-fi \
384 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
385 ac_prev=cache_file ;;
386 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
387 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
388 cache_file=$ac_optarg ;;
389
390 --config-cache | -C)
391 cache_file=config.cache ;;
c906108c 392
b4e70030 393 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
c906108c 394 ac_prev=datadir ;;
b4e70030
JB
395 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
396 | --da=*)
bec39cab 397 datadir=$ac_optarg ;;
c906108c
SS
398
399 -disable-* | --disable-*)
bec39cab 400 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 401 # Reject names that are not valid shell variable names.
bec39cab
AC
402 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
403 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
404 { (exit 1); exit 1; }; }
405 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
b4e70030 406 eval "enable_$ac_feature=no" ;;
c906108c
SS
407
408 -enable-* | --enable-*)
bec39cab 409 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 410 # Reject names that are not valid shell variable names.
bec39cab
AC
411 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
412 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
413 { (exit 1); exit 1; }; }
414 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
b4e70030
JB
415 case $ac_option in
416 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
417 *) ac_optarg=yes ;;
418 esac
419 eval "enable_$ac_feature='$ac_optarg'" ;;
c906108c
SS
420
421 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
422 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
423 | --exec | --exe | --ex)
424 ac_prev=exec_prefix ;;
425 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
426 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
427 | --exec=* | --exe=* | --ex=*)
bec39cab 428 exec_prefix=$ac_optarg ;;
c906108c
SS
429
430 -gas | --gas | --ga | --g)
431 # Obsolete; use --with-gas.
432 with_gas=yes ;;
433
bec39cab
AC
434 -help | --help | --hel | --he | -h)
435 ac_init_help=long ;;
436 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
437 ac_init_help=recursive ;;
438 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
439 ac_init_help=short ;;
c906108c
SS
440
441 -host | --host | --hos | --ho)
bec39cab 442 ac_prev=host_alias ;;
c906108c 443 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 444 host_alias=$ac_optarg ;;
c906108c
SS
445
446 -includedir | --includedir | --includedi | --included | --include \
447 | --includ | --inclu | --incl | --inc)
448 ac_prev=includedir ;;
449 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
450 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 451 includedir=$ac_optarg ;;
c906108c
SS
452
453 -infodir | --infodir | --infodi | --infod | --info | --inf)
454 ac_prev=infodir ;;
455 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 456 infodir=$ac_optarg ;;
c906108c
SS
457
458 -libdir | --libdir | --libdi | --libd)
459 ac_prev=libdir ;;
460 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 461 libdir=$ac_optarg ;;
c906108c
SS
462
463 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
464 | --libexe | --libex | --libe)
465 ac_prev=libexecdir ;;
466 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
467 | --libexe=* | --libex=* | --libe=*)
bec39cab 468 libexecdir=$ac_optarg ;;
c906108c
SS
469
470 -localstatedir | --localstatedir | --localstatedi | --localstated \
b4e70030
JB
471 | --localstate | --localstat | --localsta | --localst \
472 | --locals | --local | --loca | --loc | --lo)
c906108c
SS
473 ac_prev=localstatedir ;;
474 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
b4e70030
JB
475 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
476 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
bec39cab 477 localstatedir=$ac_optarg ;;
c906108c
SS
478
479 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
480 ac_prev=mandir ;;
481 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 482 mandir=$ac_optarg ;;
c906108c
SS
483
484 -nfp | --nfp | --nf)
485 # Obsolete; use --without-fp.
486 with_fp=no ;;
487
488 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 489 | --no-cr | --no-c | -n)
c906108c
SS
490 no_create=yes ;;
491
492 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
493 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
494 no_recursion=yes ;;
495
496 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
497 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
498 | --oldin | --oldi | --old | --ol | --o)
499 ac_prev=oldincludedir ;;
500 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
501 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
502 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 503 oldincludedir=$ac_optarg ;;
c906108c
SS
504
505 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
506 ac_prev=prefix ;;
507 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 508 prefix=$ac_optarg ;;
c906108c
SS
509
510 -program-prefix | --program-prefix | --program-prefi | --program-pref \
511 | --program-pre | --program-pr | --program-p)
512 ac_prev=program_prefix ;;
513 -program-prefix=* | --program-prefix=* | --program-prefi=* \
514 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 515 program_prefix=$ac_optarg ;;
c906108c
SS
516
517 -program-suffix | --program-suffix | --program-suffi | --program-suff \
518 | --program-suf | --program-su | --program-s)
519 ac_prev=program_suffix ;;
520 -program-suffix=* | --program-suffix=* | --program-suffi=* \
521 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 522 program_suffix=$ac_optarg ;;
c906108c
SS
523
524 -program-transform-name | --program-transform-name \
525 | --program-transform-nam | --program-transform-na \
526 | --program-transform-n | --program-transform- \
527 | --program-transform | --program-transfor \
528 | --program-transfo | --program-transf \
529 | --program-trans | --program-tran \
530 | --progr-tra | --program-tr | --program-t)
531 ac_prev=program_transform_name ;;
532 -program-transform-name=* | --program-transform-name=* \
533 | --program-transform-nam=* | --program-transform-na=* \
534 | --program-transform-n=* | --program-transform-=* \
535 | --program-transform=* | --program-transfor=* \
536 | --program-transfo=* | --program-transf=* \
537 | --program-trans=* | --program-tran=* \
538 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 539 program_transform_name=$ac_optarg ;;
c906108c
SS
540
541 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
542 | -silent | --silent | --silen | --sile | --sil)
543 silent=yes ;;
544
545 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
546 ac_prev=sbindir ;;
547 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
548 | --sbi=* | --sb=*)
bec39cab 549 sbindir=$ac_optarg ;;
c906108c
SS
550
551 -sharedstatedir | --sharedstatedir | --sharedstatedi \
552 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
553 | --sharedst | --shareds | --shared | --share | --shar \
554 | --sha | --sh)
555 ac_prev=sharedstatedir ;;
556 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
557 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
558 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
559 | --sha=* | --sh=*)
bec39cab 560 sharedstatedir=$ac_optarg ;;
c906108c
SS
561
562 -site | --site | --sit)
563 ac_prev=site ;;
564 -site=* | --site=* | --sit=*)
bec39cab 565 site=$ac_optarg ;;
3ace7edb 566
c906108c
SS
567 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
568 ac_prev=srcdir ;;
569 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 570 srcdir=$ac_optarg ;;
c906108c
SS
571
572 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
573 | --syscon | --sysco | --sysc | --sys | --sy)
574 ac_prev=sysconfdir ;;
575 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
576 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 577 sysconfdir=$ac_optarg ;;
c906108c
SS
578
579 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 580 ac_prev=target_alias ;;
c906108c 581 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 582 target_alias=$ac_optarg ;;
c906108c
SS
583
584 -v | -verbose | --verbose | --verbos | --verbo | --verb)
585 verbose=yes ;;
586
bec39cab
AC
587 -version | --version | --versio | --versi | --vers | -V)
588 ac_init_version=: ;;
c906108c
SS
589
590 -with-* | --with-*)
bec39cab 591 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 592 # Reject names that are not valid shell variable names.
bec39cab
AC
593 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
594 { echo "$as_me: error: invalid package name: $ac_package" >&2
595 { (exit 1); exit 1; }; }
c906108c 596 ac_package=`echo $ac_package| sed 's/-/_/g'`
b4e70030
JB
597 case $ac_option in
598 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
599 *) ac_optarg=yes ;;
600 esac
601 eval "with_$ac_package='$ac_optarg'" ;;
c906108c
SS
602
603 -without-* | --without-*)
bec39cab 604 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 605 # Reject names that are not valid shell variable names.
bec39cab
AC
606 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
607 { echo "$as_me: error: invalid package name: $ac_package" >&2
608 { (exit 1); exit 1; }; }
609 ac_package=`echo $ac_package | sed 's/-/_/g'`
b4e70030 610 eval "with_$ac_package=no" ;;
c906108c
SS
611
612 --x)
613 # Obsolete; use --with-x.
614 with_x=yes ;;
615
616 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
617 | --x-incl | --x-inc | --x-in | --x-i)
618 ac_prev=x_includes ;;
619 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
620 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 621 x_includes=$ac_optarg ;;
c906108c
SS
622
623 -x-libraries | --x-libraries | --x-librarie | --x-librari \
624 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
625 ac_prev=x_libraries ;;
626 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
627 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 628 x_libraries=$ac_optarg ;;
c906108c 629
bec39cab
AC
630 -*) { echo "$as_me: error: unrecognized option: $ac_option
631Try \`$0 --help' for more information." >&2
632 { (exit 1); exit 1; }; }
c906108c
SS
633 ;;
634
bec39cab
AC
635 *=*)
636 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
637 # Reject names that are not valid shell variable names.
638 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
639 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
640 { (exit 1); exit 1; }; }
b4e70030
JB
641 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
642 eval "$ac_envvar='$ac_optarg'"
bec39cab
AC
643 export $ac_envvar ;;
644
c906108c 645 *)
bec39cab
AC
646 # FIXME: should be removed in autoconf 3.0.
647 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
648 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
649 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
650 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
651 ;;
652
653 esac
654done
655
656if test -n "$ac_prev"; then
bec39cab
AC
657 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
658 { echo "$as_me: error: missing argument to $ac_option" >&2
659 { (exit 1); exit 1; }; }
c906108c 660fi
c906108c 661
b4e70030
JB
662# Be sure to have absolute paths.
663for ac_var in exec_prefix prefix
c906108c 664do
b4e70030 665 eval ac_val=$`echo $ac_var`
bec39cab 666 case $ac_val in
b4e70030
JB
667 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
668 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
669 { (exit 1); exit 1; }; };;
670 esac
671done
672
673# Be sure to have absolute paths.
674for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
675 localstatedir libdir includedir oldincludedir infodir mandir
676do
677 eval ac_val=$`echo $ac_var`
678 case $ac_val in
679 [\\/$]* | ?:[\\/]* ) ;;
680 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
681 { (exit 1); exit 1; }; };;
c906108c
SS
682 esac
683done
684
bec39cab
AC
685# There might be people who depend on the old broken behavior: `$host'
686# used to hold the argument of --host etc.
687# FIXME: To remove some day.
688build=$build_alias
689host=$host_alias
690target=$target_alias
691
692# FIXME: To remove some day.
693if test "x$host_alias" != x; then
694 if test "x$build_alias" = x; then
695 cross_compiling=maybe
696 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
697 If a cross compiler is detected then cross compile mode will be used." >&2
698 elif test "x$build_alias" != "x$host_alias"; then
699 cross_compiling=yes
700 fi
701fi
c906108c 702
bec39cab
AC
703ac_tool_prefix=
704test -n "$host_alias" && ac_tool_prefix=$host_alias-
705
706test "$silent" = yes && exec 6>/dev/null
c906108c 707
c906108c
SS
708
709# Find the source files, if location was not specified.
710if test -z "$srcdir"; then
711 ac_srcdir_defaulted=yes
b4e70030
JB
712 # Try the directory containing this script, then its parent.
713 ac_confdir=`(dirname "$0") 2>/dev/null ||
bec39cab
AC
714$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
715 X"$0" : 'X\(//\)[^/]' \| \
716 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
717 X"$0" : 'X\(/\)' \| \
718 . : '\(.\)' 2>/dev/null ||
bec39cab 719echo X"$0" |
b4e70030
JB
720 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
721 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
722 /^X\(\/\/\)$/{ s//\1/; q; }
723 /^X\(\/\).*/{ s//\1/; q; }
724 s/.*/./; q'`
c906108c 725 srcdir=$ac_confdir
b4e70030 726 if test ! -r $srcdir/$ac_unique_file; then
c906108c
SS
727 srcdir=..
728 fi
729else
730 ac_srcdir_defaulted=no
731fi
b4e70030
JB
732if test ! -r $srcdir/$ac_unique_file; then
733 if test "$ac_srcdir_defaulted" = yes; then
734 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
735 { (exit 1); exit 1; }; }
736 else
737 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
bec39cab 738 { (exit 1); exit 1; }; }
b4e70030 739 fi
c906108c 740fi
b4e70030
JB
741(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
742 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
bec39cab 743 { (exit 1); exit 1; }; }
b4e70030
JB
744srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
745ac_env_build_alias_set=${build_alias+set}
746ac_env_build_alias_value=$build_alias
747ac_cv_env_build_alias_set=${build_alias+set}
748ac_cv_env_build_alias_value=$build_alias
749ac_env_host_alias_set=${host_alias+set}
750ac_env_host_alias_value=$host_alias
751ac_cv_env_host_alias_set=${host_alias+set}
752ac_cv_env_host_alias_value=$host_alias
753ac_env_target_alias_set=${target_alias+set}
754ac_env_target_alias_value=$target_alias
755ac_cv_env_target_alias_set=${target_alias+set}
756ac_cv_env_target_alias_value=$target_alias
757ac_env_CC_set=${CC+set}
758ac_env_CC_value=$CC
759ac_cv_env_CC_set=${CC+set}
760ac_cv_env_CC_value=$CC
761ac_env_CFLAGS_set=${CFLAGS+set}
762ac_env_CFLAGS_value=$CFLAGS
763ac_cv_env_CFLAGS_set=${CFLAGS+set}
764ac_cv_env_CFLAGS_value=$CFLAGS
765ac_env_LDFLAGS_set=${LDFLAGS+set}
766ac_env_LDFLAGS_value=$LDFLAGS
767ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
768ac_cv_env_LDFLAGS_value=$LDFLAGS
769ac_env_CPPFLAGS_set=${CPPFLAGS+set}
770ac_env_CPPFLAGS_value=$CPPFLAGS
771ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
772ac_cv_env_CPPFLAGS_value=$CPPFLAGS
773ac_env_CPP_set=${CPP+set}
774ac_env_CPP_value=$CPP
775ac_cv_env_CPP_set=${CPP+set}
776ac_cv_env_CPP_value=$CPP
c906108c 777
bec39cab
AC
778#
779# Report the --help message.
780#
781if test "$ac_init_help" = "long"; then
782 # Omit some internal or obsolete options to make the list less imposing.
783 # This message is too long to be a string in the A/UX 3.1 sh.
784 cat <<_ACEOF
785\`configure' configures this package to adapt to many kinds of systems.
786
787Usage: $0 [OPTION]... [VAR=VALUE]...
788
789To assign environment variables (e.g., CC, CFLAGS...), specify them as
790VAR=VALUE. See below for descriptions of some of the useful variables.
791
792Defaults for the options are specified in brackets.
793
794Configuration:
795 -h, --help display this help and exit
796 --help=short display options specific to this package
797 --help=recursive display the short help of all the included packages
798 -V, --version display version information and exit
799 -q, --quiet, --silent do not print \`checking...' messages
800 --cache-file=FILE cache test results in FILE [disabled]
801 -C, --config-cache alias for \`--cache-file=config.cache'
802 -n, --no-create do not create output files
803 --srcdir=DIR find the sources in DIR [configure dir or \`..']
804
b4e70030
JB
805_ACEOF
806
807 cat <<_ACEOF
bec39cab
AC
808Installation directories:
809 --prefix=PREFIX install architecture-independent files in PREFIX
810 [$ac_default_prefix]
811 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
812 [PREFIX]
813
814By default, \`make install' will install all the files in
815\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
816an installation prefix other than \`$ac_default_prefix' using \`--prefix',
817for instance \`--prefix=\$HOME'.
818
819For better control, use the options below.
820
821Fine tuning of the installation directories:
822 --bindir=DIR user executables [EPREFIX/bin]
823 --sbindir=DIR system admin executables [EPREFIX/sbin]
824 --libexecdir=DIR program executables [EPREFIX/libexec]
b4e70030 825 --datadir=DIR read-only architecture-independent data [PREFIX/share]
bec39cab
AC
826 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
827 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
828 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
829 --libdir=DIR object code libraries [EPREFIX/lib]
830 --includedir=DIR C header files [PREFIX/include]
831 --oldincludedir=DIR C header files for non-gcc [/usr/include]
b4e70030
JB
832 --infodir=DIR info documentation [PREFIX/info]
833 --mandir=DIR man documentation [PREFIX/man]
bec39cab
AC
834_ACEOF
835
836 cat <<\_ACEOF
837
838Program names:
839 --program-prefix=PREFIX prepend PREFIX to installed program names
840 --program-suffix=SUFFIX append SUFFIX to installed program names
841 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
842
843X features:
844 --x-includes=DIR X include files are in DIR
845 --x-libraries=DIR X library files are in DIR
846
847System types:
848 --build=BUILD configure for building on BUILD [guessed]
849 --host=HOST cross-compile to build programs to run on HOST [BUILD]
850 --target=TARGET configure for building compilers for TARGET [HOST]
851_ACEOF
852fi
853
854if test -n "$ac_init_help"; then
855
856 cat <<\_ACEOF
857
858Optional Features:
859 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
860 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
861 --enable-maintainer-mode enable make rules and dependencies not useful
862 (and sometimes confusing) to the casual installer
bec39cab
AC
863 --disable-gdbcli disable command-line interface (CLI)
864 --disable-gdbmi disable machine-interface (MI)
865 --enable-tui enable full-screen terminal user interface (TUI)
866 --enable-gdbtk enable gdbtk graphical user interface (GUI)
867 --enable-profiling enable profiling of GDB
094a342e 868 --enable-werror treat compile warnings as errors
bec39cab
AC
869 --enable-build-warnings Enable build-time compiler warnings if gcc is used
870 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used
871 --enable-sim Link gdb with simulator
872 --enable-multi-ice build the multi-ice-gdb-server
873
874Optional Packages:
875 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
876 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
bec39cab
AC
877 --with-separate-debug-dir=path Look for global separate debug info in this path LIBDIR/debug
878 --with-libunwind Use libunwind frame unwinding support
879 --without-included-regex don't use included regex; this is the default
880 on systems with version 2 of the GNU C library
881 (use with caution on other system)
882 --with-sysroot=DIR Search for usr/lib et al within DIR.
883 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)
884 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)
885 --with-tclinclude=DIR Directory where tcl private headers are
886 --with-tkinclude=DIR Directory where tk private headers are
887 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)
888 --with-itkconfig Directory containing itk configuration (itkConfig.sh)
889 --with-x use the X Window System
890 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
891
892Some influential environment variables:
893 CC C compiler command
894 CFLAGS C compiler flags
895 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
896 nonstandard directory <lib dir>
b4e70030
JB
897 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
898 headers in a nonstandard directory <include dir>
bec39cab
AC
899 CPP C preprocessor
900
901Use these variables to override the choices made by `configure' or to help
902it to find libraries and programs with nonstandard names/locations.
903
904_ACEOF
905fi
906
907if test "$ac_init_help" = "recursive"; then
908 # If there are subdirs, report their specific --help.
b4e70030 909 ac_popdir=`pwd`
bec39cab
AC
910 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
911 test -d $ac_dir || continue
912 ac_builddir=.
913
b4e70030 914if test "$ac_dir" != .; then
bec39cab 915 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
916 # A "../" for each directory in $ac_dir_suffix.
917 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
918else
919 ac_dir_suffix= ac_top_builddir=
920fi
bec39cab
AC
921
922case $srcdir in
b4e70030 923 .) # No --srcdir option. We are building in place.
bec39cab 924 ac_srcdir=.
b4e70030
JB
925 if test -z "$ac_top_builddir"; then
926 ac_top_srcdir=.
927 else
928 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
929 fi ;;
930 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 931 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
932 ac_top_srcdir=$srcdir ;;
933 *) # Relative path.
934 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
935 ac_top_srcdir=$ac_top_builddir$srcdir ;;
936esac
937
938# Do not use `cd foo && pwd` to compute absolute paths, because
939# the directories may not exist.
940case `pwd` in
941.) ac_abs_builddir="$ac_dir";;
942*)
943 case "$ac_dir" in
944 .) ac_abs_builddir=`pwd`;;
945 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
946 *) ac_abs_builddir=`pwd`/"$ac_dir";;
947 esac;;
948esac
949case $ac_abs_builddir in
950.) ac_abs_top_builddir=${ac_top_builddir}.;;
951*)
952 case ${ac_top_builddir}. in
953 .) ac_abs_top_builddir=$ac_abs_builddir;;
954 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
955 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
956 esac;;
957esac
958case $ac_abs_builddir in
959.) ac_abs_srcdir=$ac_srcdir;;
960*)
961 case $ac_srcdir in
962 .) ac_abs_srcdir=$ac_abs_builddir;;
963 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
964 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
965 esac;;
966esac
967case $ac_abs_builddir in
968.) ac_abs_top_srcdir=$ac_top_srcdir;;
969*)
970 case $ac_top_srcdir in
971 .) ac_abs_top_srcdir=$ac_abs_builddir;;
972 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
973 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
974 esac;;
bec39cab
AC
975esac
976
b4e70030
JB
977 cd $ac_dir
978 # Check for guested configure; otherwise get Cygnus style configure.
bec39cab 979 if test -f $ac_srcdir/configure.gnu; then
b4e70030 980 echo
bec39cab
AC
981 $SHELL $ac_srcdir/configure.gnu --help=recursive
982 elif test -f $ac_srcdir/configure; then
b4e70030 983 echo
bec39cab 984 $SHELL $ac_srcdir/configure --help=recursive
b4e70030
JB
985 elif test -f $ac_srcdir/configure.ac ||
986 test -f $ac_srcdir/configure.in; then
987 echo
988 $ac_configure --help
3ace7edb 989 else
bec39cab 990 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b4e70030
JB
991 fi
992 cd $ac_popdir
bec39cab
AC
993 done
994fi
995
b4e70030 996test -n "$ac_init_help" && exit 0
bec39cab
AC
997if $ac_init_version; then
998 cat <<\_ACEOF
999
b4e70030 1000Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
1001This configure script is free software; the Free Software Foundation
1002gives unlimited permission to copy, distribute and modify it.
1003_ACEOF
b4e70030 1004 exit 0
bec39cab 1005fi
b4e70030
JB
1006exec 5>config.log
1007cat >&5 <<_ACEOF
bec39cab
AC
1008This file contains any messages produced by compilers while
1009running configure, to aid debugging if configure makes a mistake.
1010
1011It was created by $as_me, which was
b4e70030 1012generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
1013
1014 $ $0 $@
1015
1016_ACEOF
1017{
1018cat <<_ASUNAME
1019## --------- ##
1020## Platform. ##
1021## --------- ##
1022
1023hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1024uname -m = `(uname -m) 2>/dev/null || echo unknown`
1025uname -r = `(uname -r) 2>/dev/null || echo unknown`
1026uname -s = `(uname -s) 2>/dev/null || echo unknown`
1027uname -v = `(uname -v) 2>/dev/null || echo unknown`
1028
1029/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1030/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1031
1032/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1033/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1034/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b4e70030 1035hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
bec39cab
AC
1036/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1037/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1038/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1039
1040_ASUNAME
1041
1042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1043for as_dir in $PATH
1044do
1045 IFS=$as_save_IFS
1046 test -z "$as_dir" && as_dir=.
1047 echo "PATH: $as_dir"
1048done
1049
1050} >&5
1051
1052cat >&5 <<_ACEOF
1053
1054
1055## ----------- ##
1056## Core tests. ##
1057## ----------- ##
1058
1059_ACEOF
1060
1061
1062# Keep a trace of the command line.
1063# Strip out --no-create and --no-recursion so they do not pile up.
1064# Strip out --silent because we don't want to record it for future runs.
1065# Also quote any args containing shell meta-characters.
1066# Make two passes to allow for proper duplicate-argument suppression.
1067ac_configure_args=
1068ac_configure_args0=
1069ac_configure_args1=
1070ac_sep=
1071ac_must_keep_next=false
1072for ac_pass in 1 2
1073do
1074 for ac_arg
1075 do
1076 case $ac_arg in
1077 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1078 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1079 | -silent | --silent | --silen | --sile | --sil)
1080 continue ;;
b4e70030 1081 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
bec39cab
AC
1082 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1083 esac
1084 case $ac_pass in
1085 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1086 2)
1087 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1088 if test $ac_must_keep_next = true; then
1089 ac_must_keep_next=false # Got value, back to normal.
1090 else
1091 case $ac_arg in
1092 *=* | --config-cache | -C | -disable-* | --disable-* \
1093 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1094 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1095 | -with-* | --with-* | -without-* | --without-* | --x)
1096 case "$ac_configure_args0 " in
1097 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1098 esac
1099 ;;
1100 -* ) ac_must_keep_next=true ;;
1101 esac
1102 fi
1103 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1104 # Get rid of the leading space.
1105 ac_sep=" "
1106 ;;
1107 esac
1108 done
1109done
1110$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1111$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1112
1113# When interrupted or exit'd, cleanup temporary files, and complete
1114# config.log. We remove comments because anyway the quotes in there
1115# would cause problems or look ugly.
b4e70030
JB
1116# WARNING: Be sure not to use single quotes in there, as some shells,
1117# such as our DU 5.0 friend, will then `close' the trap.
bec39cab
AC
1118trap 'exit_status=$?
1119 # Save into config.log some information that might help in debugging.
1120 {
1121 echo
1122
1123 cat <<\_ASBOX
1124## ---------------- ##
1125## Cache variables. ##
1126## ---------------- ##
1127_ASBOX
1128 echo
1129 # The following way of writing the cache mishandles newlines in values,
b4e70030 1130{
bec39cab 1131 (set) 2>&1 |
b4e70030
JB
1132 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1133 *ac_space=\ *)
bec39cab 1134 sed -n \
b4e70030
JB
1135 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1136 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1137 ;;
bec39cab 1138 *)
b4e70030
JB
1139 sed -n \
1140 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 1141 ;;
b4e70030
JB
1142 esac;
1143}
bec39cab
AC
1144 echo
1145
1146 cat <<\_ASBOX
1147## ----------------- ##
1148## Output variables. ##
1149## ----------------- ##
1150_ASBOX
1151 echo
1152 for ac_var in $ac_subst_vars
1153 do
b4e70030
JB
1154 eval ac_val=$`echo $ac_var`
1155 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1156 done | sort
1157 echo
1158
1159 if test -n "$ac_subst_files"; then
1160 cat <<\_ASBOX
b4e70030
JB
1161## ------------- ##
1162## Output files. ##
1163## ------------- ##
bec39cab
AC
1164_ASBOX
1165 echo
1166 for ac_var in $ac_subst_files
1167 do
b4e70030
JB
1168 eval ac_val=$`echo $ac_var`
1169 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1170 done | sort
1171 echo
1172 fi
1173
1174 if test -s confdefs.h; then
1175 cat <<\_ASBOX
1176## ----------- ##
1177## confdefs.h. ##
1178## ----------- ##
1179_ASBOX
1180 echo
b4e70030 1181 sed "/^$/d" confdefs.h | sort
bec39cab 1182 echo
3ace7edb 1183 fi
bec39cab
AC
1184 test "$ac_signal" != 0 &&
1185 echo "$as_me: caught signal $ac_signal"
1186 echo "$as_me: exit $exit_status"
1187 } >&5
b4e70030
JB
1188 rm -f core *.core &&
1189 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
bec39cab 1190 exit $exit_status
b4e70030 1191 ' 0
bec39cab
AC
1192for ac_signal in 1 2 13 15; do
1193 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1194done
1195ac_signal=0
1196
1197# confdefs.h avoids OS command line length limits that DEFS can exceed.
b4e70030
JB
1198rm -rf conftest* confdefs.h
1199# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1200echo >confdefs.h
bec39cab
AC
1201
1202# Predefined preprocessor variables.
1203
1204cat >>confdefs.h <<_ACEOF
1205#define PACKAGE_NAME "$PACKAGE_NAME"
1206_ACEOF
1207
1208
1209cat >>confdefs.h <<_ACEOF
1210#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1211_ACEOF
1212
1213
1214cat >>confdefs.h <<_ACEOF
1215#define PACKAGE_VERSION "$PACKAGE_VERSION"
1216_ACEOF
1217
1218
1219cat >>confdefs.h <<_ACEOF
1220#define PACKAGE_STRING "$PACKAGE_STRING"
1221_ACEOF
1222
1223
1224cat >>confdefs.h <<_ACEOF
1225#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1226_ACEOF
1227
1228
1229# Let the site file select an alternate cache file if it wants to.
1230# Prefer explicitly selected file to automatically selected ones.
b4e70030
JB
1231if test -z "$CONFIG_SITE"; then
1232 if test "x$prefix" != xNONE; then
1233 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1234 else
1235 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1236 fi
c906108c 1237fi
b4e70030 1238for ac_site_file in $CONFIG_SITE; do
c906108c 1239 if test -r "$ac_site_file"; then
bec39cab
AC
1240 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1241echo "$as_me: loading site script $ac_site_file" >&6;}
1242 sed 's/^/| /' "$ac_site_file" >&5
c906108c
SS
1243 . "$ac_site_file"
1244 fi
1245done
1246
1247if test -r "$cache_file"; then
bec39cab
AC
1248 # Some versions of bash will fail to source /dev/null (special
1249 # files actually), so we avoid doing that.
1250 if test -f "$cache_file"; then
1251 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1252echo "$as_me: loading cache $cache_file" >&6;}
1253 case $cache_file in
1254 [\\/]* | ?:[\\/]* ) . $cache_file;;
1255 *) . ./$cache_file;;
1256 esac
1257 fi
c906108c 1258else
bec39cab
AC
1259 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1260echo "$as_me: creating cache $cache_file" >&6;}
1261 >$cache_file
1262fi
1263
1264# Check that the precious variables saved in the cache have kept the same
1265# value.
1266ac_cache_corrupted=false
b4e70030
JB
1267for ac_var in `(set) 2>&1 |
1268 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
bec39cab
AC
1269 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1270 eval ac_new_set=\$ac_env_${ac_var}_set
b4e70030
JB
1271 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1272 eval ac_new_val="\$ac_env_${ac_var}_value"
bec39cab
AC
1273 case $ac_old_set,$ac_new_set in
1274 set,)
1275 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1276echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1277 ac_cache_corrupted=: ;;
1278 ,set)
1279 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1280echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1281 ac_cache_corrupted=: ;;
1282 ,);;
1283 *)
1284 if test "x$ac_old_val" != "x$ac_new_val"; then
1285 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1286echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1287 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1288echo "$as_me: former value: $ac_old_val" >&2;}
1289 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1290echo "$as_me: current value: $ac_new_val" >&2;}
1291 ac_cache_corrupted=:
1292 fi;;
1293 esac
1294 # Pass precious variables to config.status.
1295 if test "$ac_new_set" = set; then
1296 case $ac_new_val in
b4e70030
JB
1297 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1298 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
1299 *) ac_arg=$ac_var=$ac_new_val ;;
1300 esac
1301 case " $ac_configure_args " in
1302 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1303 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1304 esac
1305 fi
1306done
1307if $ac_cache_corrupted; then
1308 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1309echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1310 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1311echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1312 { (exit 1); exit 1; }; }
c906108c
SS
1313fi
1314
b4e70030
JB
1315ac_ext=c
1316ac_cpp='$CPP $CPPFLAGS'
1317ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1318ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1319ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c
SS
1320
1321
bec39cab
AC
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
bec39cab 1338
b4e70030
JB
1339 ac_config_headers="$ac_config_headers config.h:config.in"
1340
1341echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1342echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
1343 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
413ccac7 1344if test "${enable_maintainer_mode+set}" = set; then
b4e70030
JB
1345 enableval="$enable_maintainer_mode"
1346 USE_MAINTAINER_MODE=$enableval
413ccac7
AC
1347else
1348 USE_MAINTAINER_MODE=no
b4e70030
JB
1349fi;
1350 echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
1351echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
413ccac7 1352
413ccac7
AC
1353
1354if test $USE_MAINTAINER_MODE = yes; then
1355 MAINTAINER_MODE_TRUE=
1356 MAINTAINER_MODE_FALSE='#'
1357else
1358 MAINTAINER_MODE_TRUE='#'
1359 MAINTAINER_MODE_FALSE=
1360fi
85981d60 1361
413ccac7 1362 MAINT=$MAINTAINER_MODE_TRUE
413ccac7 1363
c906108c 1364
bec39cab
AC
1365
1366ac_ext=c
1367ac_cpp='$CPP $CPPFLAGS'
1368ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1369ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1370ac_compiler_gnu=$ac_cv_c_compiler_gnu
1371if test -n "$ac_tool_prefix"; then
1372 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1373set dummy ${ac_tool_prefix}gcc; ac_word=$2
b4e70030
JB
1374echo "$as_me:$LINENO: checking for $ac_word" >&5
1375echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1376if test "${ac_cv_prog_CC+set}" = set; then
1377 echo $ECHO_N "(cached) $ECHO_C" >&6
1378else
1379 if test -n "$CC"; then
1380 ac_cv_prog_CC="$CC" # Let the user override the test.
1381else
1382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1383for as_dir in $PATH
1384do
1385 IFS=$as_save_IFS
1386 test -z "$as_dir" && as_dir=.
1387 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1388 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1389 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1390 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1391 break 2
1392 fi
1393done
1394done
1395
1396fi
1397fi
1398CC=$ac_cv_prog_CC
1399if test -n "$CC"; then
b4e70030
JB
1400 echo "$as_me:$LINENO: result: $CC" >&5
1401echo "${ECHO_T}$CC" >&6
bec39cab 1402else
b4e70030
JB
1403 echo "$as_me:$LINENO: result: no" >&5
1404echo "${ECHO_T}no" >&6
bec39cab
AC
1405fi
1406
1407fi
1408if test -z "$ac_cv_prog_CC"; then
1409 ac_ct_CC=$CC
1410 # Extract the first word of "gcc", so it can be a program name with args.
c906108c 1411set dummy gcc; ac_word=$2
b4e70030
JB
1412echo "$as_me:$LINENO: checking for $ac_word" >&5
1413echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1414if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1415 echo $ECHO_N "(cached) $ECHO_C" >&6
1416else
1417 if test -n "$ac_ct_CC"; then
1418 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1419else
1420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1421for as_dir in $PATH
1422do
1423 IFS=$as_save_IFS
1424 test -z "$as_dir" && as_dir=.
1425 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1426 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1427 ac_cv_prog_ac_ct_CC="gcc"
1428 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1429 break 2
1430 fi
1431done
1432done
1433
1434fi
1435fi
1436ac_ct_CC=$ac_cv_prog_ac_ct_CC
1437if test -n "$ac_ct_CC"; then
b4e70030
JB
1438 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1439echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1440else
b4e70030
JB
1441 echo "$as_me:$LINENO: result: no" >&5
1442echo "${ECHO_T}no" >&6
bec39cab
AC
1443fi
1444
b4e70030 1445 CC=$ac_ct_CC
bec39cab
AC
1446else
1447 CC="$ac_cv_prog_CC"
1448fi
1449
1450if test -z "$CC"; then
b4e70030
JB
1451 if test -n "$ac_tool_prefix"; then
1452 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
bec39cab 1453set dummy ${ac_tool_prefix}cc; ac_word=$2
b4e70030
JB
1454echo "$as_me:$LINENO: checking for $ac_word" >&5
1455echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1456if test "${ac_cv_prog_CC+set}" = set; then
1457 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1458else
1459 if test -n "$CC"; then
1460 ac_cv_prog_CC="$CC" # Let the user override the test.
1461else
bec39cab
AC
1462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1463for as_dir in $PATH
1464do
1465 IFS=$as_save_IFS
1466 test -z "$as_dir" && as_dir=.
1467 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1468 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1469 ac_cv_prog_CC="${ac_tool_prefix}cc"
1470 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1471 break 2
1472 fi
1473done
1474done
1475
c906108c
SS
1476fi
1477fi
bec39cab 1478CC=$ac_cv_prog_CC
c906108c 1479if test -n "$CC"; then
b4e70030
JB
1480 echo "$as_me:$LINENO: result: $CC" >&5
1481echo "${ECHO_T}$CC" >&6
c906108c 1482else
b4e70030
JB
1483 echo "$as_me:$LINENO: result: no" >&5
1484echo "${ECHO_T}no" >&6
c906108c
SS
1485fi
1486
b4e70030
JB
1487fi
1488if test -z "$ac_cv_prog_CC"; then
1489 ac_ct_CC=$CC
1490 # Extract the first word of "cc", so it can be a program name with args.
1491set dummy cc; ac_word=$2
1492echo "$as_me:$LINENO: checking for $ac_word" >&5
1493echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1494if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1495 echo $ECHO_N "(cached) $ECHO_C" >&6
1496else
1497 if test -n "$ac_ct_CC"; then
1498 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1499else
1500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1501for as_dir in $PATH
1502do
1503 IFS=$as_save_IFS
1504 test -z "$as_dir" && as_dir=.
1505 for ac_exec_ext in '' $ac_executable_extensions; do
1506 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1507 ac_cv_prog_ac_ct_CC="cc"
1508 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1509 break 2
4e8d927d 1510 fi
b4e70030
JB
1511done
1512done
1513
1514fi
1515fi
1516ac_ct_CC=$ac_cv_prog_ac_ct_CC
1517if test -n "$ac_ct_CC"; then
1518 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1519echo "${ECHO_T}$ac_ct_CC" >&6
1520else
1521 echo "$as_me:$LINENO: result: no" >&5
1522echo "${ECHO_T}no" >&6
1523fi
1524
1525 CC=$ac_ct_CC
1526else
1527 CC="$ac_cv_prog_CC"
1528fi
1529
bec39cab 1530fi
c906108c
SS
1531if test -z "$CC"; then
1532 # Extract the first word of "cc", so it can be a program name with args.
1533set dummy cc; ac_word=$2
b4e70030
JB
1534echo "$as_me:$LINENO: checking for $ac_word" >&5
1535echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1536if test "${ac_cv_prog_CC+set}" = set; then
1537 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1538else
1539 if test -n "$CC"; then
1540 ac_cv_prog_CC="$CC" # Let the user override the test.
1541else
c906108c 1542 ac_prog_rejected=no
bec39cab
AC
1543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1544for as_dir in $PATH
1545do
1546 IFS=$as_save_IFS
1547 test -z "$as_dir" && as_dir=.
1548 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1549 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1550 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1551 ac_prog_rejected=yes
1552 continue
1553 fi
1554 ac_cv_prog_CC="cc"
1555 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1556 break 2
1557 fi
1558done
1559done
1560
c906108c
SS
1561if test $ac_prog_rejected = yes; then
1562 # We found a bogon in the path, so make sure we never use it.
1563 set dummy $ac_cv_prog_CC
1564 shift
bec39cab 1565 if test $# != 0; then
c906108c
SS
1566 # We chose a different compiler from the bogus one.
1567 # However, it has the same basename, so the bogon will be chosen
1568 # first if we set CC to just the basename; use the full file name.
1569 shift
bec39cab 1570 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
1571 fi
1572fi
1573fi
1574fi
bec39cab 1575CC=$ac_cv_prog_CC
c906108c 1576if test -n "$CC"; then
b4e70030
JB
1577 echo "$as_me:$LINENO: result: $CC" >&5
1578echo "${ECHO_T}$CC" >&6
c906108c 1579else
b4e70030
JB
1580 echo "$as_me:$LINENO: result: no" >&5
1581echo "${ECHO_T}no" >&6
c906108c
SS
1582fi
1583
bec39cab
AC
1584fi
1585if test -z "$CC"; then
1586 if test -n "$ac_tool_prefix"; then
b4e70030 1587 for ac_prog in cl
bec39cab
AC
1588 do
1589 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1590set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b4e70030
JB
1591echo "$as_me:$LINENO: checking for $ac_word" >&5
1592echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1593if test "${ac_cv_prog_CC+set}" = set; then
1594 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1595else
1596 if test -n "$CC"; then
1597 ac_cv_prog_CC="$CC" # Let the user override the test.
1598else
bec39cab
AC
1599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1600for as_dir in $PATH
1601do
1602 IFS=$as_save_IFS
1603 test -z "$as_dir" && as_dir=.
1604 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1605 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1606 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1607 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1608 break 2
1609 fi
1610done
1611done
1612
c906108c
SS
1613fi
1614fi
bec39cab 1615CC=$ac_cv_prog_CC
c906108c 1616if test -n "$CC"; then
b4e70030
JB
1617 echo "$as_me:$LINENO: result: $CC" >&5
1618echo "${ECHO_T}$CC" >&6
c906108c 1619else
b4e70030
JB
1620 echo "$as_me:$LINENO: result: no" >&5
1621echo "${ECHO_T}no" >&6
c906108c 1622fi
bec39cab
AC
1623
1624 test -n "$CC" && break
1625 done
1626fi
1627if test -z "$CC"; then
1628 ac_ct_CC=$CC
b4e70030 1629 for ac_prog in cl
bec39cab
AC
1630do
1631 # Extract the first word of "$ac_prog", so it can be a program name with args.
1632set dummy $ac_prog; ac_word=$2
b4e70030
JB
1633echo "$as_me:$LINENO: checking for $ac_word" >&5
1634echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1635if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1636 echo $ECHO_N "(cached) $ECHO_C" >&6
1637else
1638 if test -n "$ac_ct_CC"; then
1639 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1640else
1641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1642for as_dir in $PATH
1643do
1644 IFS=$as_save_IFS
1645 test -z "$as_dir" && as_dir=.
1646 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1647 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1648 ac_cv_prog_ac_ct_CC="$ac_prog"
1649 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1650 break 2
c906108c 1651 fi
bec39cab
AC
1652done
1653done
1654
1655fi
1656fi
1657ac_ct_CC=$ac_cv_prog_ac_ct_CC
1658if test -n "$ac_ct_CC"; then
b4e70030
JB
1659 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1660echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1661else
b4e70030
JB
1662 echo "$as_me:$LINENO: result: no" >&5
1663echo "${ECHO_T}no" >&6
c906108c
SS
1664fi
1665
bec39cab
AC
1666 test -n "$ac_ct_CC" && break
1667done
c906108c 1668
b4e70030 1669 CC=$ac_ct_CC
bec39cab
AC
1670fi
1671
1672fi
1673
1674
1675test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1676See \`config.log' for more details." >&5
1677echo "$as_me: error: no acceptable C compiler found in \$PATH
1678See \`config.log' for more details." >&2;}
1679 { (exit 1); exit 1; }; }
1680
1681# Provide some information about the compiler.
b4e70030
JB
1682echo "$as_me:$LINENO:" \
1683 "checking for C compiler version" >&5
bec39cab 1684ac_compiler=`set X $ac_compile; echo $2`
b4e70030
JB
1685{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1686 (eval $ac_compiler --version </dev/null >&5) 2>&5
bec39cab
AC
1687 ac_status=$?
1688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1689 (exit $ac_status); }
b4e70030
JB
1690{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1691 (eval $ac_compiler -v </dev/null >&5) 2>&5
bec39cab
AC
1692 ac_status=$?
1693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1694 (exit $ac_status); }
b4e70030
JB
1695{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1696 (eval $ac_compiler -V </dev/null >&5) 2>&5
bec39cab
AC
1697 ac_status=$?
1698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1699 (exit $ac_status); }
1700
1701cat >conftest.$ac_ext <<_ACEOF
1702/* confdefs.h. */
1703_ACEOF
1704cat confdefs.h >>conftest.$ac_ext
1705cat >>conftest.$ac_ext <<_ACEOF
1706/* end confdefs.h. */
1707
1708int
1709main ()
1710{
1711
1712 ;
1713 return 0;
1714}
1715_ACEOF
1716ac_clean_files_save=$ac_clean_files
b4e70030 1717ac_clean_files="$ac_clean_files a.out a.exe b.out"
bec39cab
AC
1718# Try to create an executable without -o first, disregard a.out.
1719# It will help us diagnose broken compilers, and finding out an intuition
1720# of exeext.
b4e70030
JB
1721echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1722echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
bec39cab
AC
1723ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1724if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1725 (eval $ac_link_default) 2>&5
1726 ac_status=$?
1727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1728 (exit $ac_status); }; then
b4e70030
JB
1729 # Find the output, starting from the most likely. This scheme is
1730# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1731# resort.
1732
1733# Be careful to initialize this variable, since it used to be cached.
1734# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1735ac_cv_exeext=
1736# b.out is created by i960 compilers.
1737for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
bec39cab
AC
1738do
1739 test -f "$ac_file" || continue
1740 case $ac_file in
b4e70030
JB
1741 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1742 ;;
1743 conftest.$ac_ext )
1744 # This is the source file.
1745 ;;
1746 [ab].out )
1747 # We found the default executable, but exeext='' is most
1748 # certainly right.
1749 break;;
1750 *.* )
1751 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1752 # FIXME: I believe we export ac_cv_exeext for Libtool,
1753 # but it would be cool to find out if it's true. Does anybody
1754 # maintain Libtool? --akim.
1755 export ac_cv_exeext
1756 break;;
1757 * )
1758 break;;
bec39cab
AC
1759 esac
1760done
1761else
1762 echo "$as_me: failed program was:" >&5
1763sed 's/^/| /' conftest.$ac_ext >&5
1764
1765{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1766See \`config.log' for more details." >&5
1767echo "$as_me: error: C compiler cannot create executables
1768See \`config.log' for more details." >&2;}
1769 { (exit 77); exit 77; }; }
1770fi
1771
b4e70030
JB
1772ac_exeext=$ac_cv_exeext
1773echo "$as_me:$LINENO: result: $ac_file" >&5
1774echo "${ECHO_T}$ac_file" >&6
1775
1776# Check the compiler produces executables we can run. If not, either
bec39cab 1777# the compiler is broken, or we cross compile.
b4e70030
JB
1778echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1779echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
bec39cab
AC
1780# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1781# If not cross compiling, check that we can run a simple program.
1782if test "$cross_compiling" != yes; then
1783 if { ac_try='./$ac_file'
1784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1785 (eval $ac_try) 2>&5
1786 ac_status=$?
1787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1788 (exit $ac_status); }; }; then
1789 cross_compiling=no
c906108c 1790 else
bec39cab
AC
1791 if test "$cross_compiling" = maybe; then
1792 cross_compiling=yes
1793 else
1794 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1795If you meant to cross compile, use \`--host'.
1796See \`config.log' for more details." >&5
1797echo "$as_me: error: cannot run C compiled programs.
1798If you meant to cross compile, use \`--host'.
1799See \`config.log' for more details." >&2;}
1800 { (exit 1); exit 1; }; }
1801 fi
c906108c 1802 fi
bec39cab 1803fi
b4e70030
JB
1804echo "$as_me:$LINENO: result: yes" >&5
1805echo "${ECHO_T}yes" >&6
bec39cab 1806
b4e70030
JB
1807rm -f a.out a.exe conftest$ac_cv_exeext b.out
1808ac_clean_files=$ac_clean_files_save
1809# Check the compiler produces executables we can run. If not, either
1810# the compiler is broken, or we cross compile.
1811echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1812echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1813echo "$as_me:$LINENO: result: $cross_compiling" >&5
1814echo "${ECHO_T}$cross_compiling" >&6
4e8d927d 1815
b4e70030
JB
1816echo "$as_me:$LINENO: checking for suffix of executables" >&5
1817echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
bec39cab
AC
1819 (eval $ac_link) 2>&5
1820 ac_status=$?
1821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1822 (exit $ac_status); }; then
b4e70030
JB
1823 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1824# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1825# work properly (i.e., refer to `conftest.exe'), while it won't with
1826# `rm'.
1827for ac_file in conftest.exe conftest conftest.*; do
1828 test -f "$ac_file" || continue
1829 case $ac_file in
1830 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1831 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1832 export ac_cv_exeext
1833 break;;
1834 * ) break;;
1835 esac
1836done
c906108c 1837else
bec39cab
AC
1838 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1839See \`config.log' for more details." >&5
1840echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1841See \`config.log' for more details." >&2;}
1842 { (exit 1); exit 1; }; }
c906108c 1843fi
c906108c 1844
b4e70030
JB
1845rm -f conftest$ac_cv_exeext
1846echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1847echo "${ECHO_T}$ac_cv_exeext" >&6
c906108c 1848
b4e70030 1849rm -f conftest.$ac_ext
bec39cab
AC
1850EXEEXT=$ac_cv_exeext
1851ac_exeext=$EXEEXT
b4e70030
JB
1852echo "$as_me:$LINENO: checking for suffix of object files" >&5
1853echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
bec39cab
AC
1854if test "${ac_cv_objext+set}" = set; then
1855 echo $ECHO_N "(cached) $ECHO_C" >&6
1856else
b4e70030
JB
1857 cat >conftest.$ac_ext <<_ACEOF
1858/* confdefs.h. */
1859_ACEOF
1860cat confdefs.h >>conftest.$ac_ext
1861cat >>conftest.$ac_ext <<_ACEOF
1862/* end confdefs.h. */
1863
1864int
1865main ()
1866{
1867
1868 ;
1869 return 0;
1870}
1871_ACEOF
1872rm -f conftest.o conftest.obj
bec39cab
AC
1873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1874 (eval $ac_compile) 2>&5
1875 ac_status=$?
1876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1877 (exit $ac_status); }; then
b4e70030 1878 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
bec39cab 1879 case $ac_file in
b4e70030 1880 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
bec39cab
AC
1881 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1882 break;;
1883 esac
1884done
c906108c 1885else
bec39cab
AC
1886 echo "$as_me: failed program was:" >&5
1887sed 's/^/| /' conftest.$ac_ext >&5
1888
1889{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1890See \`config.log' for more details." >&5
1891echo "$as_me: error: cannot compute suffix of object files: cannot compile
1892See \`config.log' for more details." >&2;}
1893 { (exit 1); exit 1; }; }
c906108c
SS
1894fi
1895
b4e70030 1896rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 1897fi
b4e70030
JB
1898echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1899echo "${ECHO_T}$ac_cv_objext" >&6
bec39cab
AC
1900OBJEXT=$ac_cv_objext
1901ac_objext=$OBJEXT
b4e70030
JB
1902echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1903echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
bec39cab
AC
1904if test "${ac_cv_c_compiler_gnu+set}" = set; then
1905 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 1906else
bec39cab
AC
1907 cat >conftest.$ac_ext <<_ACEOF
1908/* confdefs.h. */
1909_ACEOF
1910cat confdefs.h >>conftest.$ac_ext
1911cat >>conftest.$ac_ext <<_ACEOF
1912/* end confdefs.h. */
1913
1914int
1915main ()
1916{
1917#ifndef __GNUC__
1918 choke me
1919#endif
1920
1921 ;
1922 return 0;
1923}
1924_ACEOF
1925rm -f conftest.$ac_objext
1926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1927 (eval $ac_compile) 2>conftest.er1
1928 ac_status=$?
1929 grep -v '^ *+' conftest.er1 >conftest.err
1930 rm -f conftest.er1
1931 cat conftest.err >&5
1932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1933 (exit $ac_status); } &&
b4e70030
JB
1934 { ac_try='test -z "$ac_c_werror_flag"
1935 || test ! -s conftest.err'
bec39cab
AC
1936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1937 (eval $ac_try) 2>&5
1938 ac_status=$?
1939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1940 (exit $ac_status); }; } &&
1941 { ac_try='test -s conftest.$ac_objext'
1942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1943 (eval $ac_try) 2>&5
1944 ac_status=$?
1945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1946 (exit $ac_status); }; }; then
1947 ac_compiler_gnu=yes
1948else
1949 echo "$as_me: failed program was:" >&5
1950sed 's/^/| /' conftest.$ac_ext >&5
1951
b4e70030 1952ac_compiler_gnu=no
bec39cab
AC
1953fi
1954rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1955ac_cv_c_compiler_gnu=$ac_compiler_gnu
1956
1957fi
b4e70030
JB
1958echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
1959echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
bec39cab
AC
1960GCC=`test $ac_compiler_gnu = yes && echo yes`
1961ac_test_CFLAGS=${CFLAGS+set}
1962ac_save_CFLAGS=$CFLAGS
b4e70030
JB
1963CFLAGS="-g"
1964echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
1965echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
bec39cab
AC
1966if test "${ac_cv_prog_cc_g+set}" = set; then
1967 echo $ECHO_N "(cached) $ECHO_C" >&6
1968else
b4e70030 1969 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
1970/* confdefs.h. */
1971_ACEOF
1972cat confdefs.h >>conftest.$ac_ext
1973cat >>conftest.$ac_ext <<_ACEOF
1974/* end confdefs.h. */
1975
1976int
1977main ()
1978{
1979
1980 ;
1981 return 0;
1982}
1983_ACEOF
1984rm -f conftest.$ac_objext
1985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1986 (eval $ac_compile) 2>conftest.er1
1987 ac_status=$?
1988 grep -v '^ *+' conftest.er1 >conftest.err
1989 rm -f conftest.er1
1990 cat conftest.err >&5
1991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1992 (exit $ac_status); } &&
b4e70030
JB
1993 { ac_try='test -z "$ac_c_werror_flag"
1994 || test ! -s conftest.err'
bec39cab
AC
1995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1996 (eval $ac_try) 2>&5
1997 ac_status=$?
1998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1999 (exit $ac_status); }; } &&
2000 { ac_try='test -s conftest.$ac_objext'
2001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2002 (eval $ac_try) 2>&5
2003 ac_status=$?
2004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2005 (exit $ac_status); }; }; then
c906108c
SS
2006 ac_cv_prog_cc_g=yes
2007else
bec39cab
AC
2008 echo "$as_me: failed program was:" >&5
2009sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2010
b4e70030 2011ac_cv_prog_cc_g=no
4e8d927d 2012fi
bec39cab
AC
2013rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2014fi
b4e70030
JB
2015echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2016echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c906108c 2017if test "$ac_test_CFLAGS" = set; then
bec39cab 2018 CFLAGS=$ac_save_CFLAGS
c906108c
SS
2019elif test $ac_cv_prog_cc_g = yes; then
2020 if test "$GCC" = yes; then
2021 CFLAGS="-g -O2"
2022 else
2023 CFLAGS="-g"
2024 fi
2025else
2026 if test "$GCC" = yes; then
2027 CFLAGS="-O2"
2028 else
2029 CFLAGS=
2030 fi
2031fi
b4e70030
JB
2032echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2033echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2034if test "${ac_cv_prog_cc_stdc+set}" = set; then
bec39cab
AC
2035 echo $ECHO_N "(cached) $ECHO_C" >&6
2036else
b4e70030 2037 ac_cv_prog_cc_stdc=no
bec39cab
AC
2038ac_save_CC=$CC
2039cat >conftest.$ac_ext <<_ACEOF
2040/* confdefs.h. */
2041_ACEOF
2042cat confdefs.h >>conftest.$ac_ext
2043cat >>conftest.$ac_ext <<_ACEOF
2044/* end confdefs.h. */
c906108c
SS
2045#include <stdarg.h>
2046#include <stdio.h>
2047#include <sys/types.h>
2048#include <sys/stat.h>
2049/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2050struct buf { int x; };
2051FILE * (*rcsopen) (struct buf *, struct stat *, int);
2052static char *e (p, i)
2053 char **p;
2054 int i;
2055{
2056 return p[i];
2057}
2058static char *f (char * (*g) (char **, int), char **p, ...)
2059{
2060 char *s;
2061 va_list v;
2062 va_start (v,p);
2063 s = g (p, va_arg (v,int));
2064 va_end (v);
2065 return s;
2066}
bec39cab
AC
2067
2068/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2069 function prototypes and stuff, but not '\xHH' hex character constants.
2070 These don't provoke an error unfortunately, instead are silently treated
b4e70030 2071 as 'x'. The following induces an error, until -std1 is added to get
bec39cab
AC
2072 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2073 array size at least. It's necessary to write '\x00'==0 to get something
b4e70030 2074 that's true only with -std1. */
bec39cab
AC
2075int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2076
c906108c
SS
2077int test (int i, double x);
2078struct s1 {int (*f) (int a);};
2079struct s2 {int (*f) (double a);};
2080int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2081int argc;
2082char **argv;
bec39cab
AC
2083int
2084main ()
2085{
c906108c 2086return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
2087 ;
2088 return 0;
2089}
2090_ACEOF
b4e70030
JB
2091# Don't try gcc -ansi; that turns off useful extensions and
2092# breaks some systems' header files.
2093# AIX -qlanglvl=ansi
2094# Ultrix and OSF/1 -std1
2095# HP-UX 10.20 and later -Ae
2096# HP-UX older versions -Aa -D_HPUX_SOURCE
2097# SVR4 -Xc -D__EXTENSIONS__
2098for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
2099do
2100 CC="$ac_save_CC $ac_arg"
2101 rm -f conftest.$ac_objext
2102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2103 (eval $ac_compile) 2>conftest.er1
2104 ac_status=$?
2105 grep -v '^ *+' conftest.er1 >conftest.err
2106 rm -f conftest.er1
2107 cat conftest.err >&5
2108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2109 (exit $ac_status); } &&
b4e70030
JB
2110 { ac_try='test -z "$ac_c_werror_flag"
2111 || test ! -s conftest.err'
bec39cab
AC
2112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2113 (eval $ac_try) 2>&5
2114 ac_status=$?
2115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2116 (exit $ac_status); }; } &&
2117 { ac_try='test -s conftest.$ac_objext'
2118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2119 (eval $ac_try) 2>&5
2120 ac_status=$?
2121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2122 (exit $ac_status); }; }; then
b4e70030
JB
2123 ac_cv_prog_cc_stdc=$ac_arg
2124break
c906108c 2125else
bec39cab
AC
2126 echo "$as_me: failed program was:" >&5
2127sed 's/^/| /' conftest.$ac_ext >&5
2128
c906108c 2129fi
bec39cab 2130rm -f conftest.err conftest.$ac_objext
c906108c 2131done
b4e70030 2132rm -f conftest.$ac_ext conftest.$ac_objext
bec39cab 2133CC=$ac_save_CC
c906108c
SS
2134
2135fi
b4e70030
JB
2136
2137case "x$ac_cv_prog_cc_stdc" in
2138 x|xno)
2139 echo "$as_me:$LINENO: result: none needed" >&5
2140echo "${ECHO_T}none needed" >&6 ;;
bec39cab 2141 *)
b4e70030
JB
2142 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2143echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2144 CC="$CC $ac_cv_prog_cc_stdc" ;;
c906108c
SS
2145esac
2146
b4e70030
JB
2147# Some people use a C++ compiler to compile C. Since we use `exit',
2148# in C++ we need to declare it. In case someone uses the same compiler
2149# for both compiling C and C++ we need to have the C++ compiler decide
2150# the declaration of exit, since it's the most demanding environment.
2151cat >conftest.$ac_ext <<_ACEOF
2152#ifndef __cplusplus
2153 choke me
2154#endif
2155_ACEOF
2156rm -f conftest.$ac_objext
2157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2158 (eval $ac_compile) 2>conftest.er1
2159 ac_status=$?
2160 grep -v '^ *+' conftest.er1 >conftest.err
2161 rm -f conftest.er1
2162 cat conftest.err >&5
2163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2164 (exit $ac_status); } &&
2165 { ac_try='test -z "$ac_c_werror_flag"
2166 || test ! -s conftest.err'
2167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2168 (eval $ac_try) 2>&5
2169 ac_status=$?
2170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2171 (exit $ac_status); }; } &&
2172 { ac_try='test -s conftest.$ac_objext'
2173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2174 (eval $ac_try) 2>&5
2175 ac_status=$?
2176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2177 (exit $ac_status); }; }; then
2178 for ac_declaration in \
2179 '' \
2180 'extern "C" void std::exit (int) throw (); using std::exit;' \
2181 'extern "C" void std::exit (int); using std::exit;' \
2182 'extern "C" void exit (int) throw ();' \
2183 'extern "C" void exit (int);' \
2184 'void exit (int);'
2185do
2186 cat >conftest.$ac_ext <<_ACEOF
2187/* confdefs.h. */
2188_ACEOF
2189cat confdefs.h >>conftest.$ac_ext
2190cat >>conftest.$ac_ext <<_ACEOF
2191/* end confdefs.h. */
2192$ac_declaration
2193#include <stdlib.h>
2194int
2195main ()
2196{
2197exit (42);
2198 ;
2199 return 0;
2200}
2201_ACEOF
2202rm -f conftest.$ac_objext
2203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2204 (eval $ac_compile) 2>conftest.er1
2205 ac_status=$?
2206 grep -v '^ *+' conftest.er1 >conftest.err
2207 rm -f conftest.er1
2208 cat conftest.err >&5
2209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2210 (exit $ac_status); } &&
2211 { ac_try='test -z "$ac_c_werror_flag"
2212 || test ! -s conftest.err'
2213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2214 (eval $ac_try) 2>&5
2215 ac_status=$?
2216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2217 (exit $ac_status); }; } &&
2218 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
2224 :
2225else
2226 echo "$as_me: failed program was:" >&5
2227sed 's/^/| /' conftest.$ac_ext >&5
2228
2229continue
2230fi
2231rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2232 cat >conftest.$ac_ext <<_ACEOF
2233/* confdefs.h. */
2234_ACEOF
2235cat confdefs.h >>conftest.$ac_ext
2236cat >>conftest.$ac_ext <<_ACEOF
2237/* end confdefs.h. */
2238$ac_declaration
2239int
2240main ()
2241{
2242exit (42);
2243 ;
2244 return 0;
2245}
2246_ACEOF
2247rm -f conftest.$ac_objext
2248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2249 (eval $ac_compile) 2>conftest.er1
2250 ac_status=$?
2251 grep -v '^ *+' conftest.er1 >conftest.err
2252 rm -f conftest.er1
2253 cat conftest.err >&5
2254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2255 (exit $ac_status); } &&
2256 { ac_try='test -z "$ac_c_werror_flag"
2257 || test ! -s conftest.err'
2258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2259 (eval $ac_try) 2>&5
2260 ac_status=$?
2261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2262 (exit $ac_status); }; } &&
2263 { ac_try='test -s conftest.$ac_objext'
2264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2265 (eval $ac_try) 2>&5
2266 ac_status=$?
2267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2268 (exit $ac_status); }; }; then
2269 break
2270else
2271 echo "$as_me: failed program was:" >&5
2272sed 's/^/| /' conftest.$ac_ext >&5
2273
2274fi
2275rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2276done
2277rm -f conftest*
2278if test -n "$ac_declaration"; then
2279 echo '#ifdef __cplusplus' >>confdefs.h
2280 echo $ac_declaration >>confdefs.h
2281 echo '#endif' >>confdefs.h
2282fi
2283
2284else
2285 echo "$as_me: failed program was:" >&5
2286sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2287
b4e70030
JB
2288fi
2289rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
2290ac_ext=c
2291ac_cpp='$CPP $CPPFLAGS'
2292ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2293ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2294ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 2295
60ca704f 2296
bec39cab
AC
2297cat >>confdefs.h <<\_ACEOF
2298#define _GNU_SOURCE 1
2299_ACEOF
c906108c
SS
2300
2301
8bb2c122 2302
bec39cab
AC
2303ac_ext=c
2304ac_cpp='$CPP $CPPFLAGS'
2305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2307ac_compiler_gnu=$ac_cv_c_compiler_gnu
b4e70030
JB
2308echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2309echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
bec39cab
AC
2310# On Suns, sometimes $CPP names a directory.
2311if test -n "$CPP" && test -d "$CPP"; then
2312 CPP=
8bb2c122 2313fi
bec39cab
AC
2314if test -z "$CPP"; then
2315 if test "${ac_cv_prog_CPP+set}" = set; then
2316 echo $ECHO_N "(cached) $ECHO_C" >&6
2317else
2318 # Double quotes because CPP needs to be expanded
2319 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2320 do
2321 ac_preproc_ok=false
2322for ac_c_preproc_warn_flag in '' yes
2323do
2324 # Use a header file that comes with gcc, so configuring glibc
2325 # with a fresh cross-compiler works.
2326 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2327 # <limits.h> exists even on freestanding compilers.
2328 # On the NeXT, cc -E runs the code through the compiler's parser,
2329 # not just through cpp. "Syntax error" is here to catch this case.
2330 cat >conftest.$ac_ext <<_ACEOF
2331/* confdefs.h. */
2332_ACEOF
2333cat confdefs.h >>conftest.$ac_ext
2334cat >>conftest.$ac_ext <<_ACEOF
2335/* end confdefs.h. */
2336#ifdef __STDC__
2337# include <limits.h>
2338#else
2339# include <assert.h>
2340#endif
2341 Syntax error
2342_ACEOF
2343if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2344 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2345 ac_status=$?
2346 grep -v '^ *+' conftest.er1 >conftest.err
2347 rm -f conftest.er1
2348 cat conftest.err >&5
2349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2350 (exit $ac_status); } >/dev/null; then
2351 if test -s conftest.err; then
2352 ac_cpp_err=$ac_c_preproc_warn_flag
2353 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2354 else
2355 ac_cpp_err=
2356 fi
8bb2c122 2357else
bec39cab 2358 ac_cpp_err=yes
8bb2c122 2359fi
bec39cab
AC
2360if test -z "$ac_cpp_err"; then
2361 :
8bb2c122 2362else
bec39cab
AC
2363 echo "$as_me: failed program was:" >&5
2364sed 's/^/| /' conftest.$ac_ext >&5
2365
2366 # Broken: fails on valid input.
2367continue
2368fi
2369rm -f conftest.err conftest.$ac_ext
2370
b4e70030 2371 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2372 # can be detected and how.
2373 cat >conftest.$ac_ext <<_ACEOF
2374/* confdefs.h. */
2375_ACEOF
2376cat confdefs.h >>conftest.$ac_ext
2377cat >>conftest.$ac_ext <<_ACEOF
2378/* end confdefs.h. */
2379#include <ac_nonexistent.h>
2380_ACEOF
2381if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2382 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2383 ac_status=$?
2384 grep -v '^ *+' conftest.er1 >conftest.err
2385 rm -f conftest.er1
2386 cat conftest.err >&5
2387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2388 (exit $ac_status); } >/dev/null; then
2389 if test -s conftest.err; then
2390 ac_cpp_err=$ac_c_preproc_warn_flag
2391 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2392 else
2393 ac_cpp_err=
2394 fi
8bb2c122 2395else
bec39cab 2396 ac_cpp_err=yes
8bb2c122 2397fi
bec39cab
AC
2398if test -z "$ac_cpp_err"; then
2399 # Broken: success on invalid input.
2400continue
8bb2c122 2401else
bec39cab
AC
2402 echo "$as_me: failed program was:" >&5
2403sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 2404
bec39cab
AC
2405 # Passes both tests.
2406ac_preproc_ok=:
2407break
8bb2c122 2408fi
bec39cab 2409rm -f conftest.err conftest.$ac_ext
8bb2c122 2410
bec39cab
AC
2411done
2412# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2413rm -f conftest.err conftest.$ac_ext
2414if $ac_preproc_ok; then
2415 break
2416fi
8bb2c122 2417
bec39cab
AC
2418 done
2419 ac_cv_prog_CPP=$CPP
ddc9cd0f 2420
c906108c 2421fi
bec39cab
AC
2422 CPP=$ac_cv_prog_CPP
2423else
2424 ac_cv_prog_CPP=$CPP
c906108c 2425fi
b4e70030
JB
2426echo "$as_me:$LINENO: result: $CPP" >&5
2427echo "${ECHO_T}$CPP" >&6
bec39cab
AC
2428ac_preproc_ok=false
2429for ac_c_preproc_warn_flag in '' yes
2430do
2431 # Use a header file that comes with gcc, so configuring glibc
2432 # with a fresh cross-compiler works.
2433 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2434 # <limits.h> exists even on freestanding compilers.
2435 # On the NeXT, cc -E runs the code through the compiler's parser,
2436 # not just through cpp. "Syntax error" is here to catch this case.
2437 cat >conftest.$ac_ext <<_ACEOF
2438/* confdefs.h. */
2439_ACEOF
2440cat confdefs.h >>conftest.$ac_ext
2441cat >>conftest.$ac_ext <<_ACEOF
2442/* end confdefs.h. */
2443#ifdef __STDC__
2444# include <limits.h>
2445#else
2446# include <assert.h>
2447#endif
2448 Syntax error
2449_ACEOF
2450if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2451 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2452 ac_status=$?
2453 grep -v '^ *+' conftest.er1 >conftest.err
2454 rm -f conftest.er1
2455 cat conftest.err >&5
2456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2457 (exit $ac_status); } >/dev/null; then
2458 if test -s conftest.err; then
2459 ac_cpp_err=$ac_c_preproc_warn_flag
2460 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2461 else
2462 ac_cpp_err=
2463 fi
c906108c 2464else
bec39cab 2465 ac_cpp_err=yes
c906108c 2466fi
bec39cab
AC
2467if test -z "$ac_cpp_err"; then
2468 :
c906108c 2469else
bec39cab
AC
2470 echo "$as_me: failed program was:" >&5
2471sed 's/^/| /' conftest.$ac_ext >&5
2472
2473 # Broken: fails on valid input.
2474continue
2475fi
2476rm -f conftest.err conftest.$ac_ext
2477
b4e70030 2478 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2479 # can be detected and how.
2480 cat >conftest.$ac_ext <<_ACEOF
2481/* confdefs.h. */
2482_ACEOF
2483cat confdefs.h >>conftest.$ac_ext
2484cat >>conftest.$ac_ext <<_ACEOF
2485/* end confdefs.h. */
2486#include <ac_nonexistent.h>
2487_ACEOF
2488if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2489 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2490 ac_status=$?
2491 grep -v '^ *+' conftest.er1 >conftest.err
2492 rm -f conftest.er1
2493 cat conftest.err >&5
2494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2495 (exit $ac_status); } >/dev/null; then
2496 if test -s conftest.err; then
2497 ac_cpp_err=$ac_c_preproc_warn_flag
2498 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2499 else
2500 ac_cpp_err=
2501 fi
c906108c 2502else
bec39cab 2503 ac_cpp_err=yes
c906108c 2504fi
bec39cab
AC
2505if test -z "$ac_cpp_err"; then
2506 # Broken: success on invalid input.
2507continue
c906108c 2508else
bec39cab
AC
2509 echo "$as_me: failed program was:" >&5
2510sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2511
bec39cab
AC
2512 # Passes both tests.
2513ac_preproc_ok=:
2514break
c906108c 2515fi
bec39cab 2516rm -f conftest.err conftest.$ac_ext
c906108c 2517
bec39cab
AC
2518done
2519# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2520rm -f conftest.err conftest.$ac_ext
2521if $ac_preproc_ok; then
c906108c
SS
2522 :
2523else
bec39cab
AC
2524 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2525See \`config.log' for more details." >&5
2526echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2527See \`config.log' for more details." >&2;}
2528 { (exit 1); exit 1; }; }
c906108c 2529fi
c906108c 2530
bec39cab
AC
2531ac_ext=c
2532ac_cpp='$CPP $CPPFLAGS'
2533ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2534ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2535ac_compiler_gnu=$ac_cv_c_compiler_gnu
2536
2537
b4e70030
JB
2538echo "$as_me:$LINENO: checking for egrep" >&5
2539echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2540if test "${ac_cv_prog_egrep+set}" = set; then
4e8d927d
DJ
2541 echo $ECHO_N "(cached) $ECHO_C" >&6
2542else
b4e70030
JB
2543 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2544 then ac_cv_prog_egrep='grep -E'
2545 else ac_cv_prog_egrep='egrep'
bec39cab 2546 fi
4e8d927d 2547fi
b4e70030
JB
2548echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2549echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2550 EGREP=$ac_cv_prog_egrep
c906108c 2551
bec39cab
AC
2552
2553
b4e70030
JB
2554echo "$as_me:$LINENO: checking for AIX" >&5
2555echo $ECHO_N "checking for AIX... $ECHO_C" >&6
bec39cab
AC
2556cat >conftest.$ac_ext <<_ACEOF
2557/* confdefs.h. */
2558_ACEOF
2559cat confdefs.h >>conftest.$ac_ext
2560cat >>conftest.$ac_ext <<_ACEOF
2561/* end confdefs.h. */
2562#ifdef _AIX
2563 yes
2564#endif
2565
2566_ACEOF
c906108c 2567if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 2568 $EGREP "yes" >/dev/null 2>&1; then
b4e70030
JB
2569 echo "$as_me:$LINENO: result: yes" >&5
2570echo "${ECHO_T}yes" >&6
bec39cab
AC
2571cat >>confdefs.h <<\_ACEOF
2572#define _ALL_SOURCE 1
2573_ACEOF
2574
c906108c 2575else
b4e70030
JB
2576 echo "$as_me:$LINENO: result: no" >&5
2577echo "${ECHO_T}no" >&6
c906108c
SS
2578fi
2579rm -f conftest*
2580
c906108c 2581
b4e70030
JB
2582echo "$as_me:$LINENO: checking for library containing strerror" >&5
2583echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
bec39cab
AC
2584if test "${ac_cv_search_strerror+set}" = set; then
2585 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2586else
bec39cab 2587 ac_func_search_save_LIBS=$LIBS
b4e70030 2588ac_cv_search_strerror=no
bec39cab
AC
2589cat >conftest.$ac_ext <<_ACEOF
2590/* confdefs.h. */
2591_ACEOF
2592cat confdefs.h >>conftest.$ac_ext
2593cat >>conftest.$ac_ext <<_ACEOF
2594/* end confdefs.h. */
c906108c 2595
b4e70030 2596/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
2597#ifdef __cplusplus
2598extern "C"
2599#endif
b4e70030
JB
2600/* We use char because int might match the return type of a gcc2
2601 builtin and then its argument prototype would still apply. */
bec39cab
AC
2602char strerror ();
2603int
2604main ()
2605{
b4e70030 2606strerror ();
bec39cab
AC
2607 ;
2608 return 0;
2609}
2610_ACEOF
b4e70030 2611rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
2612if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2613 (eval $ac_link) 2>conftest.er1
2614 ac_status=$?
2615 grep -v '^ *+' conftest.er1 >conftest.err
2616 rm -f conftest.er1
2617 cat conftest.err >&5
2618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2619 (exit $ac_status); } &&
b4e70030
JB
2620 { ac_try='test -z "$ac_c_werror_flag"
2621 || test ! -s conftest.err'
bec39cab
AC
2622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2623 (eval $ac_try) 2>&5
2624 ac_status=$?
2625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2626 (exit $ac_status); }; } &&
2627 { ac_try='test -s conftest$ac_exeext'
2628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2629 (eval $ac_try) 2>&5
2630 ac_status=$?
2631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2632 (exit $ac_status); }; }; then
b4e70030 2633 ac_cv_search_strerror="none required"
c906108c 2634else
bec39cab
AC
2635 echo "$as_me: failed program was:" >&5
2636sed 's/^/| /' conftest.$ac_ext >&5
c906108c
SS
2637
2638fi
bec39cab 2639rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
2640 conftest$ac_exeext conftest.$ac_ext
2641if test "$ac_cv_search_strerror" = no; then
2642 for ac_lib in cposix; do
2643 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
2644 cat >conftest.$ac_ext <<_ACEOF
2645/* confdefs.h. */
2646_ACEOF
2647cat confdefs.h >>conftest.$ac_ext
2648cat >>conftest.$ac_ext <<_ACEOF
2649/* end confdefs.h. */
2650
2651/* Override any gcc2 internal prototype to avoid an error. */
2652#ifdef __cplusplus
2653extern "C"
2654#endif
2655/* We use char because int might match the return type of a gcc2
2656 builtin and then its argument prototype would still apply. */
2657char strerror ();
2658int
2659main ()
2660{
2661strerror ();
2662 ;
2663 return 0;
2664}
2665_ACEOF
2666rm -f conftest.$ac_objext conftest$ac_exeext
2667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2668 (eval $ac_link) 2>conftest.er1
2669 ac_status=$?
2670 grep -v '^ *+' conftest.er1 >conftest.err
2671 rm -f conftest.er1
2672 cat conftest.err >&5
2673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2674 (exit $ac_status); } &&
2675 { ac_try='test -z "$ac_c_werror_flag"
2676 || test ! -s conftest.err'
2677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2678 (eval $ac_try) 2>&5
2679 ac_status=$?
2680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2681 (exit $ac_status); }; } &&
2682 { ac_try='test -s conftest$ac_exeext'
2683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2684 (eval $ac_try) 2>&5
2685 ac_status=$?
2686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2687 (exit $ac_status); }; }; then
2688 ac_cv_search_strerror="-l$ac_lib"
2689break
4e8d927d 2690else
b4e70030
JB
2691 echo "$as_me: failed program was:" >&5
2692sed 's/^/| /' conftest.$ac_ext >&5
2693
2694fi
2695rm -f conftest.err conftest.$ac_objext \
2696 conftest$ac_exeext conftest.$ac_ext
2697 done
c906108c 2698fi
bec39cab 2699LIBS=$ac_func_search_save_LIBS
c906108c 2700fi
b4e70030
JB
2701echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
2702echo "${ECHO_T}$ac_cv_search_strerror" >&6
2703if test "$ac_cv_search_strerror" != no; then
2704 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
bec39cab 2705
c906108c
SS
2706fi
2707
c906108c 2708
c906108c 2709
bec39cab 2710
b4e70030
JB
2711echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5
2712echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
bec39cab
AC
2713if test "${am_cv_prog_cc_stdc+set}" = set; then
2714 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2715else
bec39cab
AC
2716 am_cv_prog_cc_stdc=no
2717ac_save_CC="$CC"
2718# Don't try gcc -ansi; that turns off useful extensions and
2719# breaks some systems' header files.
2720# AIX -qlanglvl=ansi
2721# Ultrix and OSF/1 -std1
2722# HP-UX 10.20 and later -Ae
2723# HP-UX older versions -Aa -D_HPUX_SOURCE
2724# SVR4 -Xc -D__EXTENSIONS__
2725for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2726do
2727 CC="$ac_save_CC $ac_arg"
2728 cat >conftest.$ac_ext <<_ACEOF
2729/* confdefs.h. */
2730_ACEOF
2731cat confdefs.h >>conftest.$ac_ext
2732cat >>conftest.$ac_ext <<_ACEOF
2733/* end confdefs.h. */
2734#include <stdarg.h>
2735#include <stdio.h>
2736#include <sys/types.h>
2737#include <sys/stat.h>
2738/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2739struct buf { int x; };
2740FILE * (*rcsopen) (struct buf *, struct stat *, int);
2741static char *e (p, i)
2742 char **p;
2743 int i;
2744{
2745 return p[i];
2746}
2747static char *f (char * (*g) (char **, int), char **p, ...)
2748{
2749 char *s;
2750 va_list v;
2751 va_start (v,p);
2752 s = g (p, va_arg (v,int));
2753 va_end (v);
2754 return s;
2755}
2756int test (int i, double x);
2757struct s1 {int (*f) (int a);};
2758struct s2 {int (*f) (double a);};
2759int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2760int argc;
2761char **argv;
c906108c 2762
bec39cab
AC
2763int
2764main ()
2765{
c906108c 2766
bec39cab 2767return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
c906108c 2768
bec39cab
AC
2769 ;
2770 return 0;
2771}
2772_ACEOF
2773rm -f conftest.$ac_objext
2774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2775 (eval $ac_compile) 2>conftest.er1
2776 ac_status=$?
2777 grep -v '^ *+' conftest.er1 >conftest.err
2778 rm -f conftest.er1
2779 cat conftest.err >&5
2780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2781 (exit $ac_status); } &&
b4e70030
JB
2782 { ac_try='test -z "$ac_c_werror_flag"
2783 || test ! -s conftest.err'
bec39cab
AC
2784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2785 (eval $ac_try) 2>&5
2786 ac_status=$?
2787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2788 (exit $ac_status); }; } &&
2789 { ac_try='test -s conftest.$ac_objext'
2790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2791 (eval $ac_try) 2>&5
2792 ac_status=$?
2793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794 (exit $ac_status); }; }; then
2795 am_cv_prog_cc_stdc="$ac_arg"; break
c906108c 2796else
bec39cab
AC
2797 echo "$as_me: failed program was:" >&5
2798sed 's/^/| /' conftest.$ac_ext >&5
c906108c
SS
2799
2800fi
bec39cab
AC
2801rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2802done
2803CC="$ac_save_CC"
c906108c
SS
2804
2805fi
2806
bec39cab 2807if test -z "$am_cv_prog_cc_stdc"; then
b4e70030
JB
2808 echo "$as_me:$LINENO: result: none needed" >&5
2809echo "${ECHO_T}none needed" >&6
c906108c 2810else
b4e70030
JB
2811 echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5
2812echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6
c906108c 2813fi
bec39cab
AC
2814case "x$am_cv_prog_cc_stdc" in
2815 x|xno) ;;
2816 *) CC="$CC $am_cv_prog_cc_stdc" ;;
2817esac
c906108c 2818
c906108c 2819
bec39cab
AC
2820ac_aux_dir=
2821for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
2822 if test -f $ac_dir/install-sh; then
2823 ac_aux_dir=$ac_dir
2824 ac_install_sh="$ac_aux_dir/install-sh -c"
2825 break
2826 elif test -f $ac_dir/install.sh; then
2827 ac_aux_dir=$ac_dir
2828 ac_install_sh="$ac_aux_dir/install.sh -c"
2829 break
2830 elif test -f $ac_dir/shtool; then
2831 ac_aux_dir=$ac_dir
2832 ac_install_sh="$ac_aux_dir/shtool install -c"
2833 break
2834 fi
2835done
2836if test -z "$ac_aux_dir"; then
2837 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \`cd $srcdir;pwd\`/.. $srcdir/\`cd $srcdir;pwd\`/.." >&5
2838echo "$as_me: error: cannot find install-sh or install.sh in \`cd $srcdir;pwd\`/.. $srcdir/\`cd $srcdir;pwd\`/.." >&2;}
2839 { (exit 1); exit 1; }; }
c906108c 2840fi
bec39cab
AC
2841ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2842ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2843ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
c906108c 2844
bec39cab
AC
2845# Make sure we can run config.sub.
2846$ac_config_sub sun4 >/dev/null 2>&1 ||
2847 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
2848echo "$as_me: error: cannot run $ac_config_sub" >&2;}
2849 { (exit 1); exit 1; }; }
2850
b4e70030
JB
2851echo "$as_me:$LINENO: checking build system type" >&5
2852echo $ECHO_N "checking build system type... $ECHO_C" >&6
bec39cab
AC
2853if test "${ac_cv_build+set}" = set; then
2854 echo $ECHO_N "(cached) $ECHO_C" >&6
2855else
b4e70030
JB
2856 ac_cv_build_alias=$build_alias
2857test -z "$ac_cv_build_alias" &&
2858 ac_cv_build_alias=`$ac_config_guess`
2859test -z "$ac_cv_build_alias" &&
bec39cab
AC
2860 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2861echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2862 { (exit 1); exit 1; }; }
b4e70030
JB
2863ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
2864 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
2865echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
bec39cab
AC
2866 { (exit 1); exit 1; }; }
2867
2868fi
b4e70030
JB
2869echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2870echo "${ECHO_T}$ac_cv_build" >&6
bec39cab 2871build=$ac_cv_build
b4e70030
JB
2872build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2873build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2874build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
bec39cab
AC
2875
2876
b4e70030
JB
2877echo "$as_me:$LINENO: checking host system type" >&5
2878echo $ECHO_N "checking host system type... $ECHO_C" >&6
bec39cab
AC
2879if test "${ac_cv_host+set}" = set; then
2880 echo $ECHO_N "(cached) $ECHO_C" >&6
2881else
b4e70030
JB
2882 ac_cv_host_alias=$host_alias
2883test -z "$ac_cv_host_alias" &&
2884 ac_cv_host_alias=$ac_cv_build_alias
2885ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
2886 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
2887echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
bec39cab
AC
2888 { (exit 1); exit 1; }; }
2889
2890fi
b4e70030
JB
2891echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2892echo "${ECHO_T}$ac_cv_host" >&6
bec39cab 2893host=$ac_cv_host
b4e70030
JB
2894host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2895host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2896host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
bec39cab
AC
2897
2898
b4e70030
JB
2899echo "$as_me:$LINENO: checking target system type" >&5
2900echo $ECHO_N "checking target system type... $ECHO_C" >&6
bec39cab
AC
2901if test "${ac_cv_target+set}" = set; then
2902 echo $ECHO_N "(cached) $ECHO_C" >&6
2903else
b4e70030
JB
2904 ac_cv_target_alias=$target_alias
2905test "x$ac_cv_target_alias" = "x" &&
2906 ac_cv_target_alias=$ac_cv_host_alias
2907ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
2908 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
2909echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
bec39cab
AC
2910 { (exit 1); exit 1; }; }
2911
2912fi
b4e70030
JB
2913echo "$as_me:$LINENO: result: $ac_cv_target" >&5
2914echo "${ECHO_T}$ac_cv_target" >&6
bec39cab 2915target=$ac_cv_target
b4e70030
JB
2916target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2917target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2918target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
c906108c 2919
c906108c 2920
bec39cab
AC
2921# The aliases save the names the user supplied, while $host etc.
2922# will get canonicalized.
2923test -n "$target_alias" &&
2924 test "$program_prefix$program_suffix$program_transform_name" = \
2925 NONENONEs,x,x, &&
2926 program_prefix=${target_alias}-
c906108c 2927
c906108c 2928
bec39cab
AC
2929CONFIG_OBS=
2930CONFIG_DEPS=
2931CONFIG_SRCS=
2932ENABLE_CFLAGS=
c906108c 2933
bec39cab
AC
2934CONFIG_ALL=
2935CONFIG_CLEAN=
2936CONFIG_INSTALL=
2937CONFIG_UNINSTALL=
2938
20e95c23
DJ
2939# If we haven't got the data from the intl directory,
2940# assume NLS is disabled.
2941USE_NLS=no
2942LIBINTL=
2943LIBINTL_DEP=
2944INCINTL=
2945XGETTEXT=
2946GMSGFMT=
2947POSUB=
2948if test -f ../intl/config.intl; then
2949 . ../intl/config.intl
2950fi
2951echo "$as_me:$LINENO: checking whether NLS is requested" >&5
2952echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
2953if test x"$USE_NLS" != xyes; then
b4e70030
JB
2954 echo "$as_me:$LINENO: result: no" >&5
2955echo "${ECHO_T}no" >&6
c906108c 2956else
20e95c23
DJ
2957 echo "$as_me:$LINENO: result: yes" >&5
2958echo "${ECHO_T}yes" >&6
c906108c 2959
20e95c23
DJ
2960cat >>confdefs.h <<\_ACEOF
2961#define ENABLE_NLS 1
bec39cab 2962_ACEOF
c906108c 2963
c906108c 2964
20e95c23
DJ
2965 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
2966echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
2967 # Look for .po and .gmo files in the source directory.
2968 CATALOGS=
2969 XLINGUAS=
2970 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
2971 # If there aren't any .gmo files the shell will give us the
2972 # literal string "../path/to/srcdir/po/*.gmo" which has to be
2973 # weeded out.
2974 case "$cat" in *\**)
2975 continue;;
2976 esac
2977 # The quadruple backslash is collapsed to a double backslash
2978 # by the backticks, then collapsed again by the double quotes,
2979 # leaving us with one backslash in the sed expression (right
2980 # before the dot that mustn't act as a wildcard).
2981 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
2982 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
2983 # The user is allowed to set LINGUAS to a list of languages to
2984 # install catalogs for. If it's empty that means "all of them."
2985 if test "x$LINGUAS" = x; then
2986 CATALOGS="$CATALOGS $cat"
2987 XLINGUAS="$XLINGUAS $lang"
2988 else
2989 case "$LINGUAS" in *$lang*)
2990 CATALOGS="$CATALOGS $cat"
2991 XLINGUAS="$XLINGUAS $lang"
2992 ;;
2993 esac
2994 fi
2995 done
2996 LINGUAS="$XLINGUAS"
2997 echo "$as_me:$LINENO: result: $LINGUAS" >&5
2998echo "${ECHO_T}$LINGUAS" >&6
c906108c 2999
c906108c 3000
20e95c23 3001 DATADIRNAME=share
c906108c 3002
20e95c23 3003 INSTOBJEXT=.mo
c906108c 3004
20e95c23
DJ
3005 GENCAT=gencat
3006
3007 CATOBJEXT=.gmo
3008
3009fi
3010
3011localedir='${datadir}/locale'
c906108c 3012
bec39cab 3013
20e95c23 3014if test x"$USE_NLS" = xyes; then
bec39cab
AC
3015 CONFIG_ALL="$CONFIG_ALL all-po"
3016 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
3017 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
3018 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
3019fi
3020
3021PACKAGE=gdb
3022
3023cat >>confdefs.h <<_ACEOF
3024#define PACKAGE "$PACKAGE"
3025_ACEOF
3026
3027
3028
3029debugdir=${libdir}/debug
3030
3031
b4e70030 3032# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
bec39cab 3033if test "${with_separate_debug_dir+set}" = set; then
b4e70030
JB
3034 withval="$with_separate_debug_dir"
3035 debugdir="${withval}"
3036fi;
bec39cab
AC
3037
3038
3039 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
3040 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3041 ac_define_dir=`eval echo $debugdir`
3042 ac_define_dir=`eval echo $ac_define_dir`
3043
3044cat >>confdefs.h <<_ACEOF
3045#define DEBUGDIR "$ac_define_dir"
3046_ACEOF
3047
3048
3049#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
3050
b4e70030
JB
3051
3052
bec39cab
AC
3053subdirs="$subdirs doc testsuite"
3054
3055
121ce6e5
DJ
3056# Provide defaults for some variables set by the per-host and per-target
3057# configuration.
3058gdb_host_obs=posix-hdep.o
3059
bec39cab
AC
3060. $srcdir/configure.host
3061
3062. $srcdir/configure.tgt
3063
3064# Fetch the default architecture and default target vector from BFD.
3065targ=$target; . $srcdir/../bfd/config.bfd
3066
3067# We only want the first architecture, so strip off the others if
3068# there is more than one.
3069targ_archs=`echo $targ_archs | sed 's/ .*//'`
3070
3071if test "x$targ_archs" != x; then
3072
3073cat >>confdefs.h <<_ACEOF
3074#define DEFAULT_BFD_ARCH $targ_archs
3075_ACEOF
3076
3077fi
3078if test "x$targ_defvec" != x; then
3079
3080cat >>confdefs.h <<_ACEOF
3081#define DEFAULT_BFD_VEC $targ_defvec
3082_ACEOF
3083
3084fi
3085
3086test "$program_prefix" != NONE &&
b4e70030 3087 program_transform_name="s,^,$program_prefix,;$program_transform_name"
bec39cab
AC
3088# Use a double $ so make ignores it.
3089test "$program_suffix" != NONE &&
b4e70030 3090 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
bec39cab
AC
3091# Double any \ or $. echo might interpret backslashes.
3092# By default was `s,x,x', remove it if useless.
3093cat <<\_ACEOF >conftest.sed
3094s/[\\$]/&&/g;s/;s,x,x,$//
3095_ACEOF
3096program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
b4e70030 3097rm conftest.sed
bec39cab
AC
3098
3099
3100# The CLI cannot be disabled yet, but may be in the future.
3101
3102# Enable CLI.
b4e70030 3103# Check whether --enable-gdbcli or --disable-gdbcli was given.
bec39cab 3104if test "${enable_gdbcli+set}" = set; then
b4e70030
JB
3105 enableval="$enable_gdbcli"
3106 case $enableval in
bec39cab
AC
3107 yes)
3108 ;;
3109 no)
3110 { { echo "$as_me:$LINENO: error: the command-line interface cannot be disabled yet" >&5
3111echo "$as_me: error: the command-line interface cannot be disabled yet" >&2;}
3112 { (exit 1); exit 1; }; } ;;
3113 *)
3114 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbcli" >&5
3115echo "$as_me: error: bad value $enableval for --enable-gdbcli" >&2;}
3116 { (exit 1); exit 1; }; } ;;
3117 esac
3118else
3119 enable_gdbcli=yes
b4e70030 3120fi;
bec39cab
AC
3121if test x"$enable_gdbcli" = xyes; then
3122 if test -d $srcdir/cli; then
3123 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3124 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3125 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
3126 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
3127 fi
3128fi
3129
3130# Enable MI.
b4e70030 3131# Check whether --enable-gdbmi or --disable-gdbmi was given.
bec39cab 3132if test "${enable_gdbmi+set}" = set; then
b4e70030
JB
3133 enableval="$enable_gdbmi"
3134 case $enableval in
bec39cab
AC
3135 yes | no)
3136 ;;
3137 *)
3138 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbmi" >&5
3139echo "$as_me: error: bad value $enableval for --enable-gdbmi" >&2;}
3140 { (exit 1); exit 1; }; } ;;
3141 esac
3142else
3143 enable_gdbmi=yes
b4e70030 3144fi;
bec39cab
AC
3145if test x"$enable_gdbmi" = xyes; then
3146 if test -d $srcdir/mi; then
3147 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3148 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3149 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3150 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3151 fi
3152fi
3153
3154# Enable TUI.
b4e70030 3155# Check whether --enable-tui or --disable-tui was given.
bec39cab 3156if test "${enable_tui+set}" = set; then
b4e70030
JB
3157 enableval="$enable_tui"
3158 case $enableval in
bec39cab
AC
3159 yes | no)
3160 ;;
3161 *)
3162 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tui" >&5
3163echo "$as_me: error: bad value $enableval for --enable-tui" >&2;}
3164 { (exit 1); exit 1; }; } ;;
3165 esac
3166else
3167 enable_tui=yes
b4e70030 3168fi;
bec39cab
AC
3169
3170# Enable gdbtk.
b4e70030 3171# Check whether --enable-gdbtk or --disable-gdbtk was given.
bec39cab 3172if test "${enable_gdbtk+set}" = set; then
b4e70030
JB
3173 enableval="$enable_gdbtk"
3174 case $enableval in
bec39cab
AC
3175 yes | no)
3176 ;;
3177 *)
3178 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbtk" >&5
3179echo "$as_me: error: bad value $enableval for --enable-gdbtk" >&2;}
3180 { (exit 1); exit 1; }; } ;;
3181 esac
3182else
04ac69aa 3183 if test -d $srcdir/gdbtk -a -d $srcdir/../itcl; then
bec39cab
AC
3184 enable_gdbtk=yes
3185 else
3186 enable_gdbtk=no
3187 fi
b4e70030 3188fi;
bec39cab
AC
3189# We unconditionally disable gdbtk tests on selected platforms.
3190case $host_os in
3191 go32* | windows*)
3192 { echo "$as_me:$LINENO: WARNING: gdbtk isn't supported on $host; disabling" >&5
3193echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
3194 enable_gdbtk=no ;;
3195esac
3196
3197# Libunwind support.
20e95c23
DJ
3198echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3199echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3200if test "${ac_cv_header_stdc+set}" = set; then
3201 echo $ECHO_N "(cached) $ECHO_C" >&6
3202else
3203 cat >conftest.$ac_ext <<_ACEOF
3204/* confdefs.h. */
3205_ACEOF
3206cat confdefs.h >>conftest.$ac_ext
3207cat >>conftest.$ac_ext <<_ACEOF
3208/* end confdefs.h. */
3209#include <stdlib.h>
3210#include <stdarg.h>
3211#include <string.h>
3212#include <float.h>
3213
3214int
3215main ()
3216{
3217
3218 ;
3219 return 0;
3220}
3221_ACEOF
3222rm -f conftest.$ac_objext
3223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3224 (eval $ac_compile) 2>conftest.er1
3225 ac_status=$?
3226 grep -v '^ *+' conftest.er1 >conftest.err
3227 rm -f conftest.er1
3228 cat conftest.err >&5
3229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3230 (exit $ac_status); } &&
3231 { ac_try='test -z "$ac_c_werror_flag"
3232 || test ! -s conftest.err'
3233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3234 (eval $ac_try) 2>&5
3235 ac_status=$?
3236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3237 (exit $ac_status); }; } &&
3238 { ac_try='test -s conftest.$ac_objext'
3239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3240 (eval $ac_try) 2>&5
3241 ac_status=$?
3242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3243 (exit $ac_status); }; }; then
3244 ac_cv_header_stdc=yes
3245else
3246 echo "$as_me: failed program was:" >&5
3247sed 's/^/| /' conftest.$ac_ext >&5
3248
3249ac_cv_header_stdc=no
3250fi
3251rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3252
3253if test $ac_cv_header_stdc = yes; then
3254 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3255 cat >conftest.$ac_ext <<_ACEOF
3256/* confdefs.h. */
3257_ACEOF
3258cat confdefs.h >>conftest.$ac_ext
3259cat >>conftest.$ac_ext <<_ACEOF
3260/* end confdefs.h. */
3261#include <string.h>
3262
3263_ACEOF
3264if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3265 $EGREP "memchr" >/dev/null 2>&1; then
3266 :
3267else
3268 ac_cv_header_stdc=no
3269fi
3270rm -f conftest*
3271
3272fi
3273
3274if test $ac_cv_header_stdc = yes; then
3275 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3276 cat >conftest.$ac_ext <<_ACEOF
3277/* confdefs.h. */
3278_ACEOF
3279cat confdefs.h >>conftest.$ac_ext
3280cat >>conftest.$ac_ext <<_ACEOF
3281/* end confdefs.h. */
3282#include <stdlib.h>
3283
3284_ACEOF
3285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3286 $EGREP "free" >/dev/null 2>&1; then
3287 :
3288else
3289 ac_cv_header_stdc=no
3290fi
3291rm -f conftest*
3292
3293fi
3294
3295if test $ac_cv_header_stdc = yes; then
3296 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3297 if test "$cross_compiling" = yes; then
3298 :
3299else
3300 cat >conftest.$ac_ext <<_ACEOF
3301/* confdefs.h. */
3302_ACEOF
3303cat confdefs.h >>conftest.$ac_ext
3304cat >>conftest.$ac_ext <<_ACEOF
3305/* end confdefs.h. */
3306#include <ctype.h>
3307#if ((' ' & 0x0FF) == 0x020)
3308# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3309# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3310#else
3311# define ISLOWER(c) \
3312 (('a' <= (c) && (c) <= 'i') \
3313 || ('j' <= (c) && (c) <= 'r') \
3314 || ('s' <= (c) && (c) <= 'z'))
3315# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3316#endif
3317
3318#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3319int
3320main ()
3321{
3322 int i;
3323 for (i = 0; i < 256; i++)
3324 if (XOR (islower (i), ISLOWER (i))
3325 || toupper (i) != TOUPPER (i))
3326 exit(2);
3327 exit (0);
3328}
3329_ACEOF
3330rm -f conftest$ac_exeext
3331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3332 (eval $ac_link) 2>&5
3333 ac_status=$?
3334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3335 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3337 (eval $ac_try) 2>&5
3338 ac_status=$?
3339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3340 (exit $ac_status); }; }; then
3341 :
3342else
3343 echo "$as_me: program exited with status $ac_status" >&5
3344echo "$as_me: failed program was:" >&5
3345sed 's/^/| /' conftest.$ac_ext >&5
3346
3347( exit $ac_status )
3348ac_cv_header_stdc=no
3349fi
3350rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3351fi
3352fi
3353fi
3354echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3355echo "${ECHO_T}$ac_cv_header_stdc" >&6
3356if test $ac_cv_header_stdc = yes; then
3357
3358cat >>confdefs.h <<\_ACEOF
3359#define STDC_HEADERS 1
3360_ACEOF
3361
3362fi
3363
3364# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3375 inttypes.h stdint.h unistd.h
3376do
3377as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3378echo "$as_me:$LINENO: checking for $ac_header" >&5
3379echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3380if eval "test \"\${$as_ac_Header+set}\" = set"; then
3381 echo $ECHO_N "(cached) $ECHO_C" >&6
3382else
3383 cat >conftest.$ac_ext <<_ACEOF
3384/* confdefs.h. */
3385_ACEOF
3386cat confdefs.h >>conftest.$ac_ext
3387cat >>conftest.$ac_ext <<_ACEOF
3388/* end confdefs.h. */
3389$ac_includes_default
3390
3391#include <$ac_header>
3392_ACEOF
3393rm -f conftest.$ac_objext
3394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3395 (eval $ac_compile) 2>conftest.er1
3396 ac_status=$?
3397 grep -v '^ *+' conftest.er1 >conftest.err
3398 rm -f conftest.er1
3399 cat conftest.err >&5
3400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3401 (exit $ac_status); } &&
3402 { ac_try='test -z "$ac_c_werror_flag"
3403 || test ! -s conftest.err'
3404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3405 (eval $ac_try) 2>&5
3406 ac_status=$?
3407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3408 (exit $ac_status); }; } &&
3409 { ac_try='test -s conftest.$ac_objext'
3410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3411 (eval $ac_try) 2>&5
3412 ac_status=$?
3413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3414 (exit $ac_status); }; }; then
3415 eval "$as_ac_Header=yes"
3416else
3417 echo "$as_me: failed program was:" >&5
3418sed 's/^/| /' conftest.$ac_ext >&5
3419
3420eval "$as_ac_Header=no"
3421fi
3422rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3423fi
3424echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3425echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3426if test `eval echo '${'$as_ac_Header'}'` = yes; then
3427 cat >>confdefs.h <<_ACEOF
3428#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3429_ACEOF
3430
3431fi
3432
3433done
3434
3435
bec39cab 3436
b4e70030 3437# Check whether --with-libunwind or --without-libunwind was given.
bec39cab 3438if test "${with_libunwind+set}" = set; then
b4e70030
JB
3439 withval="$with_libunwind"
3440 case "${withval}" in
bec39cab
AC
3441 yes) enable_libunwind=yes ;;
3442 no) enable_libunwind=no ;;
3443 *) { { echo "$as_me:$LINENO: error: bad value ${withval} for GDB with-libunwind option" >&5
3444echo "$as_me: error: bad value ${withval} for GDB with-libunwind option" >&2;}
3445 { (exit 1); exit 1; }; } ;;
3446esac
3447else
3448
3449
3450for ac_header in libunwind.h
3451do
3452as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
3453if eval "test \"\${$as_ac_Header+set}\" = set"; then
3454 echo "$as_me:$LINENO: checking for $ac_header" >&5
3455echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3456if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
3457 echo $ECHO_N "(cached) $ECHO_C" >&6
3458fi
b4e70030
JB
3459echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3460echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
3461else
3462 # Is the header compilable?
b4e70030
JB
3463echo "$as_me:$LINENO: checking $ac_header usability" >&5
3464echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
3465cat >conftest.$ac_ext <<_ACEOF
3466/* confdefs.h. */
3467_ACEOF
3468cat confdefs.h >>conftest.$ac_ext
3469cat >>conftest.$ac_ext <<_ACEOF
3470/* end confdefs.h. */
3471$ac_includes_default
3472#include <$ac_header>
3473_ACEOF
3474rm -f conftest.$ac_objext
3475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3476 (eval $ac_compile) 2>conftest.er1
3477 ac_status=$?
3478 grep -v '^ *+' conftest.er1 >conftest.err
3479 rm -f conftest.er1
3480 cat conftest.err >&5
3481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3482 (exit $ac_status); } &&
b4e70030
JB
3483 { ac_try='test -z "$ac_c_werror_flag"
3484 || test ! -s conftest.err'
bec39cab
AC
3485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3486 (eval $ac_try) 2>&5
3487 ac_status=$?
3488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3489 (exit $ac_status); }; } &&
3490 { ac_try='test -s conftest.$ac_objext'
3491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3492 (eval $ac_try) 2>&5
3493 ac_status=$?
3494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3495 (exit $ac_status); }; }; then
3496 ac_header_compiler=yes
3497else
3498 echo "$as_me: failed program was:" >&5
3499sed 's/^/| /' conftest.$ac_ext >&5
3500
b4e70030 3501ac_header_compiler=no
bec39cab
AC
3502fi
3503rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
3504echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3505echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
3506
3507# Is the header present?
b4e70030
JB
3508echo "$as_me:$LINENO: checking $ac_header presence" >&5
3509echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
3510cat >conftest.$ac_ext <<_ACEOF
3511/* confdefs.h. */
3512_ACEOF
3513cat confdefs.h >>conftest.$ac_ext
3514cat >>conftest.$ac_ext <<_ACEOF
3515/* end confdefs.h. */
3516#include <$ac_header>
3517_ACEOF
3518if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3519 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3520 ac_status=$?
3521 grep -v '^ *+' conftest.er1 >conftest.err
3522 rm -f conftest.er1
3523 cat conftest.err >&5
3524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3525 (exit $ac_status); } >/dev/null; then
3526 if test -s conftest.err; then
3527 ac_cpp_err=$ac_c_preproc_warn_flag
3528 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3529 else
3530 ac_cpp_err=
3531 fi
3532else
3533 ac_cpp_err=yes
3534fi
3535if test -z "$ac_cpp_err"; then
3536 ac_header_preproc=yes
3537else
3538 echo "$as_me: failed program was:" >&5
3539sed 's/^/| /' conftest.$ac_ext >&5
3540
3541 ac_header_preproc=no
3542fi
3543rm -f conftest.err conftest.$ac_ext
b4e70030
JB
3544echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3545echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
3546
3547# So? What about this header?
3548case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3549 yes:no: )
3550 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3551echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3552 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
3553echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
3554 ac_header_preproc=yes
3555 ;;
3556 no:yes:* )
3557 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3558echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3559 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3560echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3561 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
3562echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
3563 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
3564echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
3565 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3566echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3567 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
3568echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
3569 (
3570 cat <<\_ASBOX
3571## ------------------------------------------ ##
3572## Report this to the AC_PACKAGE_NAME lists. ##
3573## ------------------------------------------ ##
3574_ASBOX
3575 ) |
3576 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
3577 ;;
3578esac
b4e70030
JB
3579echo "$as_me:$LINENO: checking for $ac_header" >&5
3580echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3581if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
3582 echo $ECHO_N "(cached) $ECHO_C" >&6
3583else
3584 eval "$as_ac_Header=\$ac_header_preproc"
3585fi
b4e70030
JB
3586echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3587echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
3588
3589fi
3590if test `eval echo '${'$as_ac_Header'}'` = yes; then
3591 cat >>confdefs.h <<_ACEOF
3592#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3593_ACEOF
3594
3595fi
3596
3597done
3598
3599
3600for ac_header in libunwind-ia64.h
3601do
3602as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
3603if eval "test \"\${$as_ac_Header+set}\" = set"; then
3604 echo "$as_me:$LINENO: checking for $ac_header" >&5
3605echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3606if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
3607 echo $ECHO_N "(cached) $ECHO_C" >&6
3608fi
b4e70030
JB
3609echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3610echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
3611else
3612 # Is the header compilable?
b4e70030
JB
3613echo "$as_me:$LINENO: checking $ac_header usability" >&5
3614echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
3615cat >conftest.$ac_ext <<_ACEOF
3616/* confdefs.h. */
3617_ACEOF
3618cat confdefs.h >>conftest.$ac_ext
3619cat >>conftest.$ac_ext <<_ACEOF
3620/* end confdefs.h. */
3621$ac_includes_default
3622#include <$ac_header>
3623_ACEOF
3624rm -f conftest.$ac_objext
3625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3626 (eval $ac_compile) 2>conftest.er1
3627 ac_status=$?
3628 grep -v '^ *+' conftest.er1 >conftest.err
3629 rm -f conftest.er1
3630 cat conftest.err >&5
3631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3632 (exit $ac_status); } &&
b4e70030
JB
3633 { ac_try='test -z "$ac_c_werror_flag"
3634 || test ! -s conftest.err'
bec39cab
AC
3635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3636 (eval $ac_try) 2>&5
3637 ac_status=$?
3638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3639 (exit $ac_status); }; } &&
3640 { ac_try='test -s conftest.$ac_objext'
3641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3642 (eval $ac_try) 2>&5
3643 ac_status=$?
3644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3645 (exit $ac_status); }; }; then
3646 ac_header_compiler=yes
3647else
3648 echo "$as_me: failed program was:" >&5
3649sed 's/^/| /' conftest.$ac_ext >&5
3650
b4e70030 3651ac_header_compiler=no
bec39cab
AC
3652fi
3653rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
3654echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3655echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
3656
3657# Is the header present?
b4e70030
JB
3658echo "$as_me:$LINENO: checking $ac_header presence" >&5
3659echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
3660cat >conftest.$ac_ext <<_ACEOF
3661/* confdefs.h. */
3662_ACEOF
3663cat confdefs.h >>conftest.$ac_ext
3664cat >>conftest.$ac_ext <<_ACEOF
3665/* end confdefs.h. */
3666#include <$ac_header>
3667_ACEOF
3668if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3669 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3670 ac_status=$?
3671 grep -v '^ *+' conftest.er1 >conftest.err
3672 rm -f conftest.er1
3673 cat conftest.err >&5
3674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3675 (exit $ac_status); } >/dev/null; then
3676 if test -s conftest.err; then
3677 ac_cpp_err=$ac_c_preproc_warn_flag
3678 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3679 else
3680 ac_cpp_err=
3681 fi
3682else
3683 ac_cpp_err=yes
3684fi
3685if test -z "$ac_cpp_err"; then
3686 ac_header_preproc=yes
3687else
3688 echo "$as_me: failed program was:" >&5
3689sed 's/^/| /' conftest.$ac_ext >&5
3690
3691 ac_header_preproc=no
3692fi
3693rm -f conftest.err conftest.$ac_ext
b4e70030
JB
3694echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3695echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
3696
3697# So? What about this header?
3698case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3699 yes:no: )
3700 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3701echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3702 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
3703echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
3704 ac_header_preproc=yes
3705 ;;
3706 no:yes:* )
3707 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3708echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3709 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3710echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3711 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
3712echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
3713 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
3714echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
3715 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3716echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3717 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
3718echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
3719 (
3720 cat <<\_ASBOX
3721## ------------------------------------------ ##
3722## Report this to the AC_PACKAGE_NAME lists. ##
3723## ------------------------------------------ ##
3724_ASBOX
3725 ) |
3726 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
3727 ;;
3728esac
b4e70030
JB
3729echo "$as_me:$LINENO: checking for $ac_header" >&5
3730echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3731if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
3732 echo $ECHO_N "(cached) $ECHO_C" >&6
3733else
3734 eval "$as_ac_Header=\$ac_header_preproc"
3735fi
b4e70030
JB
3736echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3737echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
3738
3739fi
3740if test `eval echo '${'$as_ac_Header'}'` = yes; then
3741 cat >>confdefs.h <<_ACEOF
3742#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3743_ACEOF
3744
3745fi
3746
3747done
3748
3749 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3750 enable_libunwind=yes;
3751 fi
3752
b4e70030 3753fi;
bec39cab
AC
3754
3755if test x"$enable_libunwind" = xyes; then
3756
3757for ac_header in libunwind.h
3758do
3759as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
3760if eval "test \"\${$as_ac_Header+set}\" = set"; then
3761 echo "$as_me:$LINENO: checking for $ac_header" >&5
3762echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3763if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
3764 echo $ECHO_N "(cached) $ECHO_C" >&6
3765fi
b4e70030
JB
3766echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3767echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
3768else
3769 # Is the header compilable?
b4e70030
JB
3770echo "$as_me:$LINENO: checking $ac_header usability" >&5
3771echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
3772cat >conftest.$ac_ext <<_ACEOF
3773/* confdefs.h. */
3774_ACEOF
3775cat confdefs.h >>conftest.$ac_ext
3776cat >>conftest.$ac_ext <<_ACEOF
3777/* end confdefs.h. */
3778$ac_includes_default
3779#include <$ac_header>
3780_ACEOF
3781rm -f conftest.$ac_objext
3782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3783 (eval $ac_compile) 2>conftest.er1
3784 ac_status=$?
3785 grep -v '^ *+' conftest.er1 >conftest.err
3786 rm -f conftest.er1
3787 cat conftest.err >&5
3788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3789 (exit $ac_status); } &&
b4e70030
JB
3790 { ac_try='test -z "$ac_c_werror_flag"
3791 || test ! -s conftest.err'
bec39cab
AC
3792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3793 (eval $ac_try) 2>&5
3794 ac_status=$?
3795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3796 (exit $ac_status); }; } &&
3797 { ac_try='test -s conftest.$ac_objext'
3798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3799 (eval $ac_try) 2>&5
3800 ac_status=$?
3801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3802 (exit $ac_status); }; }; then
3803 ac_header_compiler=yes
3804else
3805 echo "$as_me: failed program was:" >&5
3806sed 's/^/| /' conftest.$ac_ext >&5
3807
b4e70030 3808ac_header_compiler=no
bec39cab
AC
3809fi
3810rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
3811echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3812echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
3813
3814# Is the header present?
b4e70030
JB
3815echo "$as_me:$LINENO: checking $ac_header presence" >&5
3816echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
3817cat >conftest.$ac_ext <<_ACEOF
3818/* confdefs.h. */
3819_ACEOF
3820cat confdefs.h >>conftest.$ac_ext
3821cat >>conftest.$ac_ext <<_ACEOF
3822/* end confdefs.h. */
3823#include <$ac_header>
3824_ACEOF
3825if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3826 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3827 ac_status=$?
3828 grep -v '^ *+' conftest.er1 >conftest.err
3829 rm -f conftest.er1
3830 cat conftest.err >&5
3831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3832 (exit $ac_status); } >/dev/null; then
3833 if test -s conftest.err; then
3834 ac_cpp_err=$ac_c_preproc_warn_flag
3835 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3836 else
3837 ac_cpp_err=
3838 fi
3839else
3840 ac_cpp_err=yes
3841fi
3842if test -z "$ac_cpp_err"; then
3843 ac_header_preproc=yes
3844else
3845 echo "$as_me: failed program was:" >&5
3846sed 's/^/| /' conftest.$ac_ext >&5
3847
3848 ac_header_preproc=no
3849fi
3850rm -f conftest.err conftest.$ac_ext
b4e70030
JB
3851echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3852echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
3853
3854# So? What about this header?
3855case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3856 yes:no: )
3857 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3858echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3859 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
3860echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
3861 ac_header_preproc=yes
3862 ;;
3863 no:yes:* )
3864 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3865echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3866 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3867echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3868 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
3869echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
3870 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
3871echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
3872 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3873echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3874 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
3875echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
3876 (
3877 cat <<\_ASBOX
3878## ------------------------------------------ ##
3879## Report this to the AC_PACKAGE_NAME lists. ##
3880## ------------------------------------------ ##
3881_ASBOX
3882 ) |
3883 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
3884 ;;
3885esac
b4e70030
JB
3886echo "$as_me:$LINENO: checking for $ac_header" >&5
3887echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3888if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
3889 echo $ECHO_N "(cached) $ECHO_C" >&6
3890else
3891 eval "$as_ac_Header=\$ac_header_preproc"
3892fi
b4e70030
JB
3893echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3894echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
3895
3896fi
3897if test `eval echo '${'$as_ac_Header'}'` = yes; then
3898 cat >>confdefs.h <<_ACEOF
3899#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3900_ACEOF
3901
3902fi
3903
3904done
3905
3906
3907for ac_header in libunwind-ia64.h
3908do
3909as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
3910if eval "test \"\${$as_ac_Header+set}\" = set"; then
3911 echo "$as_me:$LINENO: checking for $ac_header" >&5
3912echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3913if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
3914 echo $ECHO_N "(cached) $ECHO_C" >&6
3915fi
b4e70030
JB
3916echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3917echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
3918else
3919 # Is the header compilable?
b4e70030
JB
3920echo "$as_me:$LINENO: checking $ac_header usability" >&5
3921echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
3922cat >conftest.$ac_ext <<_ACEOF
3923/* confdefs.h. */
3924_ACEOF
3925cat confdefs.h >>conftest.$ac_ext
3926cat >>conftest.$ac_ext <<_ACEOF
3927/* end confdefs.h. */
3928$ac_includes_default
3929#include <$ac_header>
3930_ACEOF
3931rm -f conftest.$ac_objext
3932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3933 (eval $ac_compile) 2>conftest.er1
3934 ac_status=$?
3935 grep -v '^ *+' conftest.er1 >conftest.err
3936 rm -f conftest.er1
3937 cat conftest.err >&5
3938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3939 (exit $ac_status); } &&
b4e70030
JB
3940 { ac_try='test -z "$ac_c_werror_flag"
3941 || test ! -s conftest.err'
bec39cab
AC
3942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3943 (eval $ac_try) 2>&5
3944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); }; } &&
3947 { ac_try='test -s conftest.$ac_objext'
3948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3949 (eval $ac_try) 2>&5
3950 ac_status=$?
3951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3952 (exit $ac_status); }; }; then
3953 ac_header_compiler=yes
3954else
3955 echo "$as_me: failed program was:" >&5
3956sed 's/^/| /' conftest.$ac_ext >&5
3957
b4e70030 3958ac_header_compiler=no
bec39cab
AC
3959fi
3960rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
3961echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3962echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
3963
3964# Is the header present?
b4e70030
JB
3965echo "$as_me:$LINENO: checking $ac_header presence" >&5
3966echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
3967cat >conftest.$ac_ext <<_ACEOF
3968/* confdefs.h. */
3969_ACEOF
3970cat confdefs.h >>conftest.$ac_ext
3971cat >>conftest.$ac_ext <<_ACEOF
3972/* end confdefs.h. */
3973#include <$ac_header>
3974_ACEOF
3975if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3976 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3977 ac_status=$?
3978 grep -v '^ *+' conftest.er1 >conftest.err
3979 rm -f conftest.er1
3980 cat conftest.err >&5
3981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3982 (exit $ac_status); } >/dev/null; then
3983 if test -s conftest.err; then
3984 ac_cpp_err=$ac_c_preproc_warn_flag
3985 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3986 else
3987 ac_cpp_err=
3988 fi
3989else
3990 ac_cpp_err=yes
3991fi
3992if test -z "$ac_cpp_err"; then
3993 ac_header_preproc=yes
3994else
3995 echo "$as_me: failed program was:" >&5
3996sed 's/^/| /' conftest.$ac_ext >&5
3997
3998 ac_header_preproc=no
3999fi
4000rm -f conftest.err conftest.$ac_ext
b4e70030
JB
4001echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4002echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
4003
4004# So? What about this header?
4005case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4006 yes:no: )
4007 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4008echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4009 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4010echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4011 ac_header_preproc=yes
4012 ;;
4013 no:yes:* )
4014 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4015echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4016 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4017echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4018 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4019echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4020 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4021echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4022 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4023echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4024 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4025echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
4026 (
4027 cat <<\_ASBOX
4028## ------------------------------------------ ##
4029## Report this to the AC_PACKAGE_NAME lists. ##
4030## ------------------------------------------ ##
4031_ASBOX
4032 ) |
4033 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
4034 ;;
4035esac
b4e70030
JB
4036echo "$as_me:$LINENO: checking for $ac_header" >&5
4037echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4038if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
4039 echo $ECHO_N "(cached) $ECHO_C" >&6
4040else
4041 eval "$as_ac_Header=\$ac_header_preproc"
4042fi
b4e70030
JB
4043echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4044echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
4045
4046fi
4047if test `eval echo '${'$as_ac_Header'}'` = yes; then
4048 cat >>confdefs.h <<_ACEOF
4049#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4050_ACEOF
4051
4052fi
4053
4054done
4055
60ca704f
SE
4056
4057cat >>confdefs.h <<\_ACEOF
bec39cab
AC
4058#define HAVE_LIBUNWIND 1
4059_ACEOF
4060
4061 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
4062 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
4063 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
4064fi
4065
4066# Profiling support.
b4e70030 4067# Check whether --enable-profiling or --disable-profiling was given.
bec39cab 4068if test "${enable_profiling+set}" = set; then
b4e70030
JB
4069 enableval="$enable_profiling"
4070 case $enableval in
bec39cab
AC
4071 yes | no)
4072 ;;
4073 *)
4074 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-profile" >&5
4075echo "$as_me: error: bad value $enableval for --enable-profile" >&2;}
4076 { (exit 1); exit 1; }; } ;;
4077 esac
4078else
4079 enable_profiling=no
b4e70030 4080fi;
bec39cab
AC
4081
4082
4083
4084for ac_func in monstartup _mcleanup
4085do
4086as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
4087echo "$as_me:$LINENO: checking for $ac_func" >&5
4088echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4089if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
4090 echo $ECHO_N "(cached) $ECHO_C" >&6
4091else
4092 cat >conftest.$ac_ext <<_ACEOF
4093/* confdefs.h. */
4094_ACEOF
4095cat confdefs.h >>conftest.$ac_ext
4096cat >>conftest.$ac_ext <<_ACEOF
4097/* end confdefs.h. */
4098/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4099 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4100#define $ac_func innocuous_$ac_func
4101
4102/* System header to define __stub macros and hopefully few prototypes,
4103 which can conflict with char $ac_func (); below.
4104 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4105 <limits.h> exists even on freestanding compilers. */
4106
4107#ifdef __STDC__
4108# include <limits.h>
4109#else
4110# include <assert.h>
4111#endif
4112
4113#undef $ac_func
4114
b4e70030 4115/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
4116#ifdef __cplusplus
4117extern "C"
b4e70030 4118{
bec39cab 4119#endif
b4e70030
JB
4120/* We use char because int might match the return type of a gcc2
4121 builtin and then its argument prototype would still apply. */
bec39cab
AC
4122char $ac_func ();
4123/* The GNU C library defines this for functions which it implements
4124 to always fail with ENOSYS. Some functions are actually named
4125 something starting with __ and the normal name is an alias. */
b4e70030 4126#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
bec39cab 4127choke me
b4e70030
JB
4128#else
4129char (*f) () = $ac_func;
4130#endif
4131#ifdef __cplusplus
4132}
bec39cab
AC
4133#endif
4134
4135int
4136main ()
4137{
b4e70030 4138return f != $ac_func;
bec39cab
AC
4139 ;
4140 return 0;
4141}
4142_ACEOF
4143rm -f conftest.$ac_objext conftest$ac_exeext
4144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4145 (eval $ac_link) 2>conftest.er1
4146 ac_status=$?
4147 grep -v '^ *+' conftest.er1 >conftest.err
4148 rm -f conftest.er1
4149 cat conftest.err >&5
4150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4151 (exit $ac_status); } &&
b4e70030
JB
4152 { ac_try='test -z "$ac_c_werror_flag"
4153 || test ! -s conftest.err'
bec39cab
AC
4154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4155 (eval $ac_try) 2>&5
4156 ac_status=$?
4157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4158 (exit $ac_status); }; } &&
4159 { ac_try='test -s conftest$ac_exeext'
4160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4161 (eval $ac_try) 2>&5
4162 ac_status=$?
4163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4164 (exit $ac_status); }; }; then
4165 eval "$as_ac_var=yes"
4166else
4167 echo "$as_me: failed program was:" >&5
4168sed 's/^/| /' conftest.$ac_ext >&5
4169
b4e70030 4170eval "$as_ac_var=no"
bec39cab
AC
4171fi
4172rm -f conftest.err conftest.$ac_objext \
4173 conftest$ac_exeext conftest.$ac_ext
4174fi
b4e70030
JB
4175echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4176echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
4177if test `eval echo '${'$as_ac_var'}'` = yes; then
4178 cat >>confdefs.h <<_ACEOF
4179#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4180_ACEOF
4181
4182fi
4183done
4184
b4e70030
JB
4185echo "$as_me:$LINENO: checking for _etext" >&5
4186echo $ECHO_N "checking for _etext... $ECHO_C" >&6
bec39cab
AC
4187if test "${ac_cv_var__etext+set}" = set; then
4188 echo $ECHO_N "(cached) $ECHO_C" >&6
4189else
4190 cat >conftest.$ac_ext <<_ACEOF
4191/* confdefs.h. */
4192_ACEOF
4193cat confdefs.h >>conftest.$ac_ext
4194cat >>conftest.$ac_ext <<_ACEOF
4195/* end confdefs.h. */
4196#include <stdlib.h>
4197extern char _etext;
4198
4199int
4200main ()
4201{
4202free (&_etext);
4203 ;
4204 return 0;
4205}
4206_ACEOF
4207rm -f conftest.$ac_objext conftest$ac_exeext
4208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4209 (eval $ac_link) 2>conftest.er1
4210 ac_status=$?
4211 grep -v '^ *+' conftest.er1 >conftest.err
4212 rm -f conftest.er1
4213 cat conftest.err >&5
4214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4215 (exit $ac_status); } &&
b4e70030
JB
4216 { ac_try='test -z "$ac_c_werror_flag"
4217 || test ! -s conftest.err'
bec39cab
AC
4218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4219 (eval $ac_try) 2>&5
4220 ac_status=$?
4221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4222 (exit $ac_status); }; } &&
4223 { ac_try='test -s conftest$ac_exeext'
4224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4225 (eval $ac_try) 2>&5
4226 ac_status=$?
4227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4228 (exit $ac_status); }; }; then
4229 ac_cv_var__etext=yes
4230else
4231 echo "$as_me: failed program was:" >&5
4232sed 's/^/| /' conftest.$ac_ext >&5
4233
b4e70030 4234ac_cv_var__etext=no
bec39cab
AC
4235fi
4236rm -f conftest.err conftest.$ac_objext \
4237 conftest$ac_exeext conftest.$ac_ext
4238fi
b4e70030
JB
4239echo "$as_me:$LINENO: result: $ac_cv_var__etext" >&5
4240echo "${ECHO_T}$ac_cv_var__etext" >&6
bec39cab
AC
4241if test $ac_cv_var__etext = yes; then
4242
4243cat >>confdefs.h <<\_ACEOF
4244#define HAVE__ETEXT 1
4245_ACEOF
4246
4247fi
4248if test "$enable_profiling" = yes ; then
4249 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
4250 { { echo "$as_me:$LINENO: error: --enable-profiling requires monstartup and _mcleanup" >&5
4251echo "$as_me: error: --enable-profiling requires monstartup and _mcleanup" >&2;}
4252 { (exit 1); exit 1; }; }
4253 fi
4254 PROFILE_CFLAGS=-pg
4255 OLD_CFLAGS="$CFLAGS"
4256 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
4257
b4e70030
JB
4258 echo "$as_me:$LINENO: checking whether $CC supports -pg" >&5
4259echo $ECHO_N "checking whether $CC supports -pg... $ECHO_C" >&6
bec39cab
AC
4260if test "${ac_cv_cc_supports_pg+set}" = set; then
4261 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 4262else
bec39cab
AC
4263 cat >conftest.$ac_ext <<_ACEOF
4264/* confdefs.h. */
4265_ACEOF
4266cat confdefs.h >>conftest.$ac_ext
4267cat >>conftest.$ac_ext <<_ACEOF
4268/* end confdefs.h. */
4269
4270int
4271main ()
4272{
4273int x;
4274 ;
4275 return 0;
4276}
4277_ACEOF
4278rm -f conftest.$ac_objext
4279if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4280 (eval $ac_compile) 2>conftest.er1
4281 ac_status=$?
4282 grep -v '^ *+' conftest.er1 >conftest.err
4283 rm -f conftest.er1
4284 cat conftest.err >&5
4285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4286 (exit $ac_status); } &&
b4e70030
JB
4287 { ac_try='test -z "$ac_c_werror_flag"
4288 || test ! -s conftest.err'
bec39cab
AC
4289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4290 (eval $ac_try) 2>&5
4291 ac_status=$?
4292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4293 (exit $ac_status); }; } &&
4294 { ac_try='test -s conftest.$ac_objext'
4295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4296 (eval $ac_try) 2>&5
4297 ac_status=$?
4298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4299 (exit $ac_status); }; }; then
4300 ac_cv_cc_supports_pg=yes
4301else
4302 echo "$as_me: failed program was:" >&5
4303sed 's/^/| /' conftest.$ac_ext >&5
4304
b4e70030 4305ac_cv_cc_supports_pg=no
bec39cab
AC
4306fi
4307rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4308fi
b4e70030
JB
4309echo "$as_me:$LINENO: result: $ac_cv_cc_supports_pg" >&5
4310echo "${ECHO_T}$ac_cv_cc_supports_pg" >&6
bec39cab
AC
4311
4312 if test $ac_cv_cc_supports_pg = no; then
4313 { { echo "$as_me:$LINENO: error: --enable-profiling requires a compiler which supports -pg" >&5
4314echo "$as_me: error: --enable-profiling requires a compiler which supports -pg" >&2;}
4315 { (exit 1); exit 1; }; }
4316 fi
4317
4318 CFLAGS="$OLD_CFLAGS"
4319fi
4320
4321# --------------------- #
4322# Checks for programs. #
4323# --------------------- #
4324
4325for ac_prog in gawk mawk nawk awk
4326do
4327 # Extract the first word of "$ac_prog", so it can be a program name with args.
4328set dummy $ac_prog; ac_word=$2
b4e70030
JB
4329echo "$as_me:$LINENO: checking for $ac_word" >&5
4330echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
4331if test "${ac_cv_prog_AWK+set}" = set; then
4332 echo $ECHO_N "(cached) $ECHO_C" >&6
4333else
4334 if test -n "$AWK"; then
4335 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4336else
4337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4338for as_dir in $PATH
4339do
4340 IFS=$as_save_IFS
4341 test -z "$as_dir" && as_dir=.
4342 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4343 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
4344 ac_cv_prog_AWK="$ac_prog"
4345 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4346 break 2
4347 fi
4348done
4349done
4350
4351fi
4352fi
4353AWK=$ac_cv_prog_AWK
4354if test -n "$AWK"; then
b4e70030
JB
4355 echo "$as_me:$LINENO: result: $AWK" >&5
4356echo "${ECHO_T}$AWK" >&6
bec39cab 4357else
b4e70030
JB
4358 echo "$as_me:$LINENO: result: no" >&5
4359echo "${ECHO_T}no" >&6
bec39cab
AC
4360fi
4361
4362 test -n "$AWK" && break
4363done
4364
4365# Find a good install program. We prefer a C program (faster),
4366# so one script is as good as another. But avoid the broken or
4367# incompatible versions:
4368# SysV /etc/install, /usr/sbin/install
4369# SunOS /usr/etc/install
4370# IRIX /sbin/install
4371# AIX /bin/install
4372# AmigaOS /C/install, which installs bootblocks on floppy discs
4373# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4374# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4375# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4376# OS/2's system install, which has a completely different semantic
4377# ./install, which can be erroneously created by make from ./install.sh.
b4e70030
JB
4378echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4379echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
bec39cab
AC
4380if test -z "$INSTALL"; then
4381if test "${ac_cv_path_install+set}" = set; then
4382 echo $ECHO_N "(cached) $ECHO_C" >&6
4383else
4384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4385for as_dir in $PATH
4386do
4387 IFS=$as_save_IFS
4388 test -z "$as_dir" && as_dir=.
4389 # Account for people who put trailing slashes in PATH elements.
4390case $as_dir/ in
4391 ./ | .// | /cC/* | \
4392 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4393 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4394 /usr/ucb/* ) ;;
c906108c 4395 *)
bec39cab
AC
4396 # OSF1 and SCO ODT 3.0 have their own names for install.
4397 # Don't use installbsd from OSF since it installs stuff as root
4398 # by default.
4399 for ac_prog in ginstall scoinst install; do
4400 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4401 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
bec39cab
AC
4402 if test $ac_prog = install &&
4403 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4404 # AIX install. It has an incompatible calling convention.
4405 :
4406 elif test $ac_prog = install &&
4407 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4408 # program-specific install script used by HP pwplus--don't use.
4409 :
4410 else
4411 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4412 break 3
4413 fi
4414 fi
4415 done
4416 done
4417 ;;
c906108c 4418esac
bec39cab
AC
4419done
4420
4421
4422fi
4423 if test "${ac_cv_path_install+set}" = set; then
4424 INSTALL=$ac_cv_path_install
4425 else
b4e70030
JB
4426 # As a last resort, use the slow shell script. We don't cache a
4427 # path for INSTALL within a source directory, because that will
bec39cab 4428 # break other packages using the cache if that directory is
b4e70030 4429 # removed, or if the path is relative.
bec39cab
AC
4430 INSTALL=$ac_install_sh
4431 fi
4432fi
b4e70030
JB
4433echo "$as_me:$LINENO: result: $INSTALL" >&5
4434echo "${ECHO_T}$INSTALL" >&6
bec39cab
AC
4435
4436# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4437# It thinks the first close brace ends the variable substitution.
4438test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4439
4440test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4441
4442test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4443
b4e70030
JB
4444echo "$as_me:$LINENO: checking whether ln -s works" >&5
4445echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
bec39cab
AC
4446LN_S=$as_ln_s
4447if test "$LN_S" = "ln -s"; then
b4e70030
JB
4448 echo "$as_me:$LINENO: result: yes" >&5
4449echo "${ECHO_T}yes" >&6
bec39cab 4450else
b4e70030
JB
4451 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4452echo "${ECHO_T}no, using $LN_S" >&6
bec39cab
AC
4453fi
4454
4455if test -n "$ac_tool_prefix"; then
4456 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4457set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b4e70030
JB
4458echo "$as_me:$LINENO: checking for $ac_word" >&5
4459echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
4460if test "${ac_cv_prog_RANLIB+set}" = set; then
4461 echo $ECHO_N "(cached) $ECHO_C" >&6
4462else
4463 if test -n "$RANLIB"; then
4464 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4465else
4466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4467for as_dir in $PATH
4468do
4469 IFS=$as_save_IFS
4470 test -z "$as_dir" && as_dir=.
4471 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4472 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
4473 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4474 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4475 break 2
4476 fi
4477done
4478done
4479
4480fi
4481fi
4482RANLIB=$ac_cv_prog_RANLIB
4483if test -n "$RANLIB"; then
b4e70030
JB
4484 echo "$as_me:$LINENO: result: $RANLIB" >&5
4485echo "${ECHO_T}$RANLIB" >&6
bec39cab 4486else
b4e70030
JB
4487 echo "$as_me:$LINENO: result: no" >&5
4488echo "${ECHO_T}no" >&6
bec39cab
AC
4489fi
4490
4491fi
4492if test -z "$ac_cv_prog_RANLIB"; then
4493 ac_ct_RANLIB=$RANLIB
4494 # Extract the first word of "ranlib", so it can be a program name with args.
4495set dummy ranlib; ac_word=$2
b4e70030
JB
4496echo "$as_me:$LINENO: checking for $ac_word" >&5
4497echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
4498if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4499 echo $ECHO_N "(cached) $ECHO_C" >&6
4500else
4501 if test -n "$ac_ct_RANLIB"; then
4502 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4503else
4504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4505for as_dir in $PATH
4506do
4507 IFS=$as_save_IFS
4508 test -z "$as_dir" && as_dir=.
4509 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4510 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
4511 ac_cv_prog_ac_ct_RANLIB="ranlib"
4512 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4513 break 2
4514 fi
4515done
4516done
4517
b4e70030 4518 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
bec39cab
AC
4519fi
4520fi
4521ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4522if test -n "$ac_ct_RANLIB"; then
b4e70030
JB
4523 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4524echo "${ECHO_T}$ac_ct_RANLIB" >&6
bec39cab 4525else
b4e70030
JB
4526 echo "$as_me:$LINENO: result: no" >&5
4527echo "${ECHO_T}no" >&6
bec39cab
AC
4528fi
4529
b4e70030 4530 RANLIB=$ac_ct_RANLIB
bec39cab
AC
4531else
4532 RANLIB="$ac_cv_prog_RANLIB"
4533fi
4534
4535for ac_prog in 'bison -y' byacc
4536do
4537 # Extract the first word of "$ac_prog", so it can be a program name with args.
4538set dummy $ac_prog; ac_word=$2
b4e70030
JB
4539echo "$as_me:$LINENO: checking for $ac_word" >&5
4540echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
4541if test "${ac_cv_prog_YACC+set}" = set; then
4542 echo $ECHO_N "(cached) $ECHO_C" >&6
4543else
4544 if test -n "$YACC"; then
4545 ac_cv_prog_YACC="$YACC" # Let the user override the test.
4546else
4547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4548for as_dir in $PATH
4549do
4550 IFS=$as_save_IFS
4551 test -z "$as_dir" && as_dir=.
4552 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4553 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
4554 ac_cv_prog_YACC="$ac_prog"
4555 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4556 break 2
4557 fi
4558done
4559done
4560
4561fi
4562fi
4563YACC=$ac_cv_prog_YACC
4564if test -n "$YACC"; then
b4e70030
JB
4565 echo "$as_me:$LINENO: result: $YACC" >&5
4566echo "${ECHO_T}$YACC" >&6
bec39cab 4567else
b4e70030
JB
4568 echo "$as_me:$LINENO: result: no" >&5
4569echo "${ECHO_T}no" >&6
bec39cab
AC
4570fi
4571
4572 test -n "$YACC" && break
4573done
4574test -n "$YACC" || YACC="yacc"
4575
4576
4577if test -n "$ac_tool_prefix"; then
4578 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4579set dummy ${ac_tool_prefix}ar; ac_word=$2
b4e70030
JB
4580echo "$as_me:$LINENO: checking for $ac_word" >&5
4581echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
4582if test "${ac_cv_prog_AR+set}" = set; then
4583 echo $ECHO_N "(cached) $ECHO_C" >&6
4584else
4585 if test -n "$AR"; then
4586 ac_cv_prog_AR="$AR" # Let the user override the test.
4587else
4588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4589for as_dir in $PATH
4590do
4591 IFS=$as_save_IFS
4592 test -z "$as_dir" && as_dir=.
4593 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4594 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
4595 ac_cv_prog_AR="${ac_tool_prefix}ar"
4596 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4597 break 2
4598 fi
4599done
4600done
4601
4602fi
4603fi
4604AR=$ac_cv_prog_AR
4605if test -n "$AR"; then
b4e70030
JB
4606 echo "$as_me:$LINENO: result: $AR" >&5
4607echo "${ECHO_T}$AR" >&6
bec39cab 4608else
b4e70030
JB
4609 echo "$as_me:$LINENO: result: no" >&5
4610echo "${ECHO_T}no" >&6
bec39cab
AC
4611fi
4612
4613fi
4614if test -z "$ac_cv_prog_AR"; then
4615 ac_ct_AR=$AR
4616 # Extract the first word of "ar", so it can be a program name with args.
4617set dummy ar; ac_word=$2
b4e70030
JB
4618echo "$as_me:$LINENO: checking for $ac_word" >&5
4619echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
4620if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4621 echo $ECHO_N "(cached) $ECHO_C" >&6
4622else
4623 if test -n "$ac_ct_AR"; then
4624 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4625else
4626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4627for as_dir in $PATH
4628do
4629 IFS=$as_save_IFS
4630 test -z "$as_dir" && as_dir=.
4631 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4632 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
4633 ac_cv_prog_ac_ct_AR="ar"
4634 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4635 break 2
4636 fi
4637done
4638done
4639
4640fi
4641fi
4642ac_ct_AR=$ac_cv_prog_ac_ct_AR
4643if test -n "$ac_ct_AR"; then
b4e70030
JB
4644 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
4645echo "${ECHO_T}$ac_ct_AR" >&6
bec39cab 4646else
b4e70030
JB
4647 echo "$as_me:$LINENO: result: no" >&5
4648echo "${ECHO_T}no" >&6
bec39cab
AC
4649fi
4650
b4e70030 4651 AR=$ac_ct_AR
bec39cab
AC
4652else
4653 AR="$ac_cv_prog_AR"
4654fi
4655
4656if test -n "$ac_tool_prefix"; then
4657 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4658set dummy ${ac_tool_prefix}dlltool; ac_word=$2
b4e70030
JB
4659echo "$as_me:$LINENO: checking for $ac_word" >&5
4660echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
4661if test "${ac_cv_prog_DLLTOOL+set}" = set; then
4662 echo $ECHO_N "(cached) $ECHO_C" >&6
4663else
4664 if test -n "$DLLTOOL"; then
4665 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4666else
4667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4668for as_dir in $PATH
4669do
4670 IFS=$as_save_IFS
4671 test -z "$as_dir" && as_dir=.
4672 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4673 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
4674 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4675 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4676 break 2
4677 fi
4678done
4679done
4680
4681fi
4682fi
4683DLLTOOL=$ac_cv_prog_DLLTOOL
4684if test -n "$DLLTOOL"; then
b4e70030
JB
4685 echo "$as_me:$LINENO: result: $DLLTOOL" >&5
4686echo "${ECHO_T}$DLLTOOL" >&6
bec39cab 4687else
b4e70030
JB
4688 echo "$as_me:$LINENO: result: no" >&5
4689echo "${ECHO_T}no" >&6
bec39cab
AC
4690fi
4691
4692fi
4693if test -z "$ac_cv_prog_DLLTOOL"; then
4694 ac_ct_DLLTOOL=$DLLTOOL
4695 # Extract the first word of "dlltool", so it can be a program name with args.
4696set dummy dlltool; ac_word=$2
b4e70030
JB
4697echo "$as_me:$LINENO: checking for $ac_word" >&5
4698echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
4699if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
4700 echo $ECHO_N "(cached) $ECHO_C" >&6
4701else
4702 if test -n "$ac_ct_DLLTOOL"; then
4703 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
4704else
4705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4706for as_dir in $PATH
4707do
4708 IFS=$as_save_IFS
4709 test -z "$as_dir" && as_dir=.
4710 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4711 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
4712 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
4713 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4714 break 2
4715 fi
4716done
4717done
4718
4719fi
4720fi
4721ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
4722if test -n "$ac_ct_DLLTOOL"; then
b4e70030
JB
4723 echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
4724echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
bec39cab 4725else
b4e70030
JB
4726 echo "$as_me:$LINENO: result: no" >&5
4727echo "${ECHO_T}no" >&6
bec39cab
AC
4728fi
4729
b4e70030 4730 DLLTOOL=$ac_ct_DLLTOOL
bec39cab
AC
4731else
4732 DLLTOOL="$ac_cv_prog_DLLTOOL"
4733fi
4734
4735if test -n "$ac_tool_prefix"; then
4736 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
4737set dummy ${ac_tool_prefix}windres; ac_word=$2
b4e70030
JB
4738echo "$as_me:$LINENO: checking for $ac_word" >&5
4739echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
4740if test "${ac_cv_prog_WINDRES+set}" = set; then
4741 echo $ECHO_N "(cached) $ECHO_C" >&6
4742else
4743 if test -n "$WINDRES"; then
4744 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4745else
4746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747for as_dir in $PATH
4748do
4749 IFS=$as_save_IFS
4750 test -z "$as_dir" && as_dir=.
4751 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4752 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
4753 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
4754 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4755 break 2
4756 fi
4757done
4758done
4759
4760fi
4761fi
4762WINDRES=$ac_cv_prog_WINDRES
4763if test -n "$WINDRES"; then
b4e70030
JB
4764 echo "$as_me:$LINENO: result: $WINDRES" >&5
4765echo "${ECHO_T}$WINDRES" >&6
bec39cab 4766else
b4e70030
JB
4767 echo "$as_me:$LINENO: result: no" >&5
4768echo "${ECHO_T}no" >&6
bec39cab
AC
4769fi
4770
4771fi
4772if test -z "$ac_cv_prog_WINDRES"; then
4773 ac_ct_WINDRES=$WINDRES
4774 # Extract the first word of "windres", so it can be a program name with args.
4775set dummy windres; ac_word=$2
b4e70030
JB
4776echo "$as_me:$LINENO: checking for $ac_word" >&5
4777echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
4778if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
4779 echo $ECHO_N "(cached) $ECHO_C" >&6
4780else
4781 if test -n "$ac_ct_WINDRES"; then
4782 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
4783else
4784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4785for as_dir in $PATH
4786do
4787 IFS=$as_save_IFS
4788 test -z "$as_dir" && as_dir=.
4789 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4790 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
4791 ac_cv_prog_ac_ct_WINDRES="windres"
4792 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4793 break 2
4794 fi
4795done
4796done
4797
4798fi
4799fi
4800ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
4801if test -n "$ac_ct_WINDRES"; then
b4e70030
JB
4802 echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
4803echo "${ECHO_T}$ac_ct_WINDRES" >&6
bec39cab 4804else
b4e70030
JB
4805 echo "$as_me:$LINENO: result: no" >&5
4806echo "${ECHO_T}no" >&6
c906108c 4807fi
bec39cab 4808
b4e70030 4809 WINDRES=$ac_ct_WINDRES
c906108c 4810else
bec39cab 4811 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
4812fi
4813
bec39cab
AC
4814
4815# Needed for GNU/Hurd.
4816if test -n "$ac_tool_prefix"; then
4817 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
4818set dummy ${ac_tool_prefix}mig; ac_word=$2
b4e70030
JB
4819echo "$as_me:$LINENO: checking for $ac_word" >&5
4820echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
4821if test "${ac_cv_prog_MIG+set}" = set; then
4822 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 4823else
bec39cab
AC
4824 if test -n "$MIG"; then
4825 ac_cv_prog_MIG="$MIG" # Let the user override the test.
4826else
4827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4828for as_dir in $PATH
4829do
4830 IFS=$as_save_IFS
4831 test -z "$as_dir" && as_dir=.
4832 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4833 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
4834 ac_cv_prog_MIG="${ac_tool_prefix}mig"
4835 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4836 break 2
4837 fi
4838done
4839done
4840
c906108c 4841fi
bec39cab
AC
4842fi
4843MIG=$ac_cv_prog_MIG
4844if test -n "$MIG"; then
b4e70030
JB
4845 echo "$as_me:$LINENO: result: $MIG" >&5
4846echo "${ECHO_T}$MIG" >&6
c906108c 4847else
b4e70030
JB
4848 echo "$as_me:$LINENO: result: no" >&5
4849echo "${ECHO_T}no" >&6
c906108c
SS
4850fi
4851
bec39cab
AC
4852fi
4853if test -z "$ac_cv_prog_MIG"; then
4854 ac_ct_MIG=$MIG
4855 # Extract the first word of "mig", so it can be a program name with args.
4856set dummy mig; ac_word=$2
b4e70030
JB
4857echo "$as_me:$LINENO: checking for $ac_word" >&5
4858echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
4859if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then
4860 echo $ECHO_N "(cached) $ECHO_C" >&6
4861else
4862 if test -n "$ac_ct_MIG"; then
4863 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
4864else
4865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4866for as_dir in $PATH
4867do
4868 IFS=$as_save_IFS
4869 test -z "$as_dir" && as_dir=.
4870 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 4871 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
4872 ac_cv_prog_ac_ct_MIG="mig"
4873 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4874 break 2
4875 fi
4876done
4877done
c906108c 4878
bec39cab
AC
4879fi
4880fi
4881ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
4882if test -n "$ac_ct_MIG"; then
b4e70030
JB
4883 echo "$as_me:$LINENO: result: $ac_ct_MIG" >&5
4884echo "${ECHO_T}$ac_ct_MIG" >&6
bec39cab 4885else
b4e70030
JB
4886 echo "$as_me:$LINENO: result: no" >&5
4887echo "${ECHO_T}no" >&6
bec39cab 4888fi
c906108c 4889
b4e70030 4890 MIG=$ac_ct_MIG
bec39cab
AC
4891else
4892 MIG="$ac_cv_prog_MIG"
4893fi
c906108c 4894
c906108c 4895
bec39cab
AC
4896# ---------------------- #
4897# Checks for libraries. #
4898# ---------------------- #
c906108c 4899
bec39cab 4900# We might need to link with -lm; most simulators need it.
c906108c 4901
b4e70030
JB
4902echo "$as_me:$LINENO: checking for main in -lm" >&5
4903echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
bec39cab
AC
4904if test "${ac_cv_lib_m_main+set}" = set; then
4905 echo $ECHO_N "(cached) $ECHO_C" >&6
4906else
4907 ac_check_lib_save_LIBS=$LIBS
4908LIBS="-lm $LIBS"
4909cat >conftest.$ac_ext <<_ACEOF
4910/* confdefs.h. */
4911_ACEOF
4912cat confdefs.h >>conftest.$ac_ext
4913cat >>conftest.$ac_ext <<_ACEOF
4914/* end confdefs.h. */
c906108c 4915
c906108c 4916
bec39cab
AC
4917int
4918main ()
4919{
b4e70030 4920main ();
bec39cab
AC
4921 ;
4922 return 0;
4923}
4924_ACEOF
4925rm -f conftest.$ac_objext conftest$ac_exeext
4926if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4927 (eval $ac_link) 2>conftest.er1
4928 ac_status=$?
4929 grep -v '^ *+' conftest.er1 >conftest.err
4930 rm -f conftest.er1
4931 cat conftest.err >&5
4932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933 (exit $ac_status); } &&
b4e70030
JB
4934 { ac_try='test -z "$ac_c_werror_flag"
4935 || test ! -s conftest.err'
bec39cab
AC
4936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4937 (eval $ac_try) 2>&5
4938 ac_status=$?
4939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4940 (exit $ac_status); }; } &&
4941 { ac_try='test -s conftest$ac_exeext'
4942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4943 (eval $ac_try) 2>&5
4944 ac_status=$?
4945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4946 (exit $ac_status); }; }; then
4947 ac_cv_lib_m_main=yes
4948else
4949 echo "$as_me: failed program was:" >&5
4950sed 's/^/| /' conftest.$ac_ext >&5
4951
b4e70030 4952ac_cv_lib_m_main=no
bec39cab
AC
4953fi
4954rm -f conftest.err conftest.$ac_objext \
4955 conftest$ac_exeext conftest.$ac_ext
4956LIBS=$ac_check_lib_save_LIBS
4957fi
b4e70030
JB
4958echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
4959echo "${ECHO_T}$ac_cv_lib_m_main" >&6
bec39cab
AC
4960if test $ac_cv_lib_m_main = yes; then
4961 cat >>confdefs.h <<_ACEOF
4962#define HAVE_LIBM 1
4963_ACEOF
4964
4965 LIBS="-lm $LIBS"
c906108c 4966
c906108c 4967fi
bec39cab
AC
4968
4969
4970# We need to link with -lw to get `wctype' on Solaris before Solaris
4971# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
4972# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
4973# is known to have this problem). Therefore we avoid libw if we can.
b4e70030
JB
4974echo "$as_me:$LINENO: checking for wctype" >&5
4975echo $ECHO_N "checking for wctype... $ECHO_C" >&6
bec39cab
AC
4976if test "${ac_cv_func_wctype+set}" = set; then
4977 echo $ECHO_N "(cached) $ECHO_C" >&6
4978else
4979 cat >conftest.$ac_ext <<_ACEOF
4980/* confdefs.h. */
4981_ACEOF
4982cat confdefs.h >>conftest.$ac_ext
4983cat >>conftest.$ac_ext <<_ACEOF
4984/* end confdefs.h. */
4985/* Define wctype to an innocuous variant, in case <limits.h> declares wctype.
4986 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4987#define wctype innocuous_wctype
4988
4989/* System header to define __stub macros and hopefully few prototypes,
4990 which can conflict with char wctype (); below.
4991 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4992 <limits.h> exists even on freestanding compilers. */
4993
4994#ifdef __STDC__
4995# include <limits.h>
4996#else
4997# include <assert.h>
4998#endif
4999
5000#undef wctype
5001
b4e70030 5002/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
5003#ifdef __cplusplus
5004extern "C"
b4e70030 5005{
bec39cab 5006#endif
b4e70030
JB
5007/* We use char because int might match the return type of a gcc2
5008 builtin and then its argument prototype would still apply. */
bec39cab
AC
5009char wctype ();
5010/* The GNU C library defines this for functions which it implements
5011 to always fail with ENOSYS. Some functions are actually named
5012 something starting with __ and the normal name is an alias. */
b4e70030 5013#if defined (__stub_wctype) || defined (__stub___wctype)
bec39cab 5014choke me
b4e70030
JB
5015#else
5016char (*f) () = wctype;
5017#endif
5018#ifdef __cplusplus
5019}
bec39cab
AC
5020#endif
5021
5022int
5023main ()
5024{
b4e70030 5025return f != wctype;
bec39cab
AC
5026 ;
5027 return 0;
5028}
5029_ACEOF
5030rm -f conftest.$ac_objext conftest$ac_exeext
5031if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5032 (eval $ac_link) 2>conftest.er1
5033 ac_status=$?
5034 grep -v '^ *+' conftest.er1 >conftest.err
5035 rm -f conftest.er1
5036 cat conftest.err >&5
5037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5038 (exit $ac_status); } &&
b4e70030
JB
5039 { ac_try='test -z "$ac_c_werror_flag"
5040 || test ! -s conftest.err'
bec39cab
AC
5041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5042 (eval $ac_try) 2>&5
5043 ac_status=$?
5044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5045 (exit $ac_status); }; } &&
5046 { ac_try='test -s conftest$ac_exeext'
5047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5048 (eval $ac_try) 2>&5
5049 ac_status=$?
5050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5051 (exit $ac_status); }; }; then
5052 ac_cv_func_wctype=yes
5053else
5054 echo "$as_me: failed program was:" >&5
5055sed 's/^/| /' conftest.$ac_ext >&5
5056
b4e70030 5057ac_cv_func_wctype=no
bec39cab
AC
5058fi
5059rm -f conftest.err conftest.$ac_objext \
5060 conftest$ac_exeext conftest.$ac_ext
5061fi
b4e70030
JB
5062echo "$as_me:$LINENO: result: $ac_cv_func_wctype" >&5
5063echo "${ECHO_T}$ac_cv_func_wctype" >&6
bec39cab
AC
5064if test $ac_cv_func_wctype = yes; then
5065 :
c906108c 5066else
c906108c 5067
b4e70030
JB
5068echo "$as_me:$LINENO: checking for wctype in -lw" >&5
5069echo $ECHO_N "checking for wctype in -lw... $ECHO_C" >&6
bec39cab
AC
5070if test "${ac_cv_lib_w_wctype+set}" = set; then
5071 echo $ECHO_N "(cached) $ECHO_C" >&6
5072else
5073 ac_check_lib_save_LIBS=$LIBS
5074LIBS="-lw $LIBS"
5075cat >conftest.$ac_ext <<_ACEOF
5076/* confdefs.h. */
5077_ACEOF
5078cat confdefs.h >>conftest.$ac_ext
5079cat >>conftest.$ac_ext <<_ACEOF
5080/* end confdefs.h. */
c906108c 5081
b4e70030 5082/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
5083#ifdef __cplusplus
5084extern "C"
5085#endif
b4e70030
JB
5086/* We use char because int might match the return type of a gcc2
5087 builtin and then its argument prototype would still apply. */
bec39cab
AC
5088char wctype ();
5089int
5090main ()
5091{
b4e70030 5092wctype ();
bec39cab
AC
5093 ;
5094 return 0;
5095}
5096_ACEOF
5097rm -f conftest.$ac_objext conftest$ac_exeext
5098if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5099 (eval $ac_link) 2>conftest.er1
5100 ac_status=$?
5101 grep -v '^ *+' conftest.er1 >conftest.err
5102 rm -f conftest.er1
5103 cat conftest.err >&5
5104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5105 (exit $ac_status); } &&
b4e70030
JB
5106 { ac_try='test -z "$ac_c_werror_flag"
5107 || test ! -s conftest.err'
bec39cab
AC
5108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5109 (eval $ac_try) 2>&5
5110 ac_status=$?
5111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5112 (exit $ac_status); }; } &&
5113 { ac_try='test -s conftest$ac_exeext'
5114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5115 (eval $ac_try) 2>&5
5116 ac_status=$?
5117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5118 (exit $ac_status); }; }; then
5119 ac_cv_lib_w_wctype=yes
5120else
5121 echo "$as_me: failed program was:" >&5
5122sed 's/^/| /' conftest.$ac_ext >&5
5123
b4e70030 5124ac_cv_lib_w_wctype=no
bec39cab
AC
5125fi
5126rm -f conftest.err conftest.$ac_objext \
5127 conftest$ac_exeext conftest.$ac_ext
5128LIBS=$ac_check_lib_save_LIBS
5129fi
b4e70030
JB
5130echo "$as_me:$LINENO: result: $ac_cv_lib_w_wctype" >&5
5131echo "${ECHO_T}$ac_cv_lib_w_wctype" >&6
bec39cab
AC
5132if test $ac_cv_lib_w_wctype = yes; then
5133 cat >>confdefs.h <<_ACEOF
5134#define HAVE_LIBW 1
5135_ACEOF
c906108c 5136
bec39cab 5137 LIBS="-lw $LIBS"
c906108c 5138
bec39cab 5139fi
c906108c 5140
bec39cab 5141fi
c906108c 5142
ddc9cd0f 5143
bec39cab 5144# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
b4e70030
JB
5145echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
5146echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
bec39cab
AC
5147if test "${ac_cv_search_gethostbyname+set}" = set; then
5148 echo $ECHO_N "(cached) $ECHO_C" >&6
5149else
5150 ac_func_search_save_LIBS=$LIBS
b4e70030 5151ac_cv_search_gethostbyname=no
bec39cab
AC
5152cat >conftest.$ac_ext <<_ACEOF
5153/* confdefs.h. */
5154_ACEOF
5155cat confdefs.h >>conftest.$ac_ext
5156cat >>conftest.$ac_ext <<_ACEOF
5157/* end confdefs.h. */
ddc9cd0f 5158
b4e70030 5159/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
5160#ifdef __cplusplus
5161extern "C"
5162#endif
b4e70030
JB
5163/* We use char because int might match the return type of a gcc2
5164 builtin and then its argument prototype would still apply. */
bec39cab
AC
5165char gethostbyname ();
5166int
5167main ()
5168{
b4e70030 5169gethostbyname ();
bec39cab
AC
5170 ;
5171 return 0;
5172}
5173_ACEOF
b4e70030 5174rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
5175if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5176 (eval $ac_link) 2>conftest.er1
5177 ac_status=$?
5178 grep -v '^ *+' conftest.er1 >conftest.err
5179 rm -f conftest.er1
5180 cat conftest.err >&5
5181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5182 (exit $ac_status); } &&
b4e70030
JB
5183 { ac_try='test -z "$ac_c_werror_flag"
5184 || test ! -s conftest.err'
bec39cab
AC
5185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5186 (eval $ac_try) 2>&5
5187 ac_status=$?
5188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5189 (exit $ac_status); }; } &&
5190 { ac_try='test -s conftest$ac_exeext'
5191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5192 (eval $ac_try) 2>&5
5193 ac_status=$?
5194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5195 (exit $ac_status); }; }; then
b4e70030 5196 ac_cv_search_gethostbyname="none required"
bec39cab
AC
5197else
5198 echo "$as_me: failed program was:" >&5
5199sed 's/^/| /' conftest.$ac_ext >&5
ddc9cd0f 5200
bec39cab
AC
5201fi
5202rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
5203 conftest$ac_exeext conftest.$ac_ext
5204if test "$ac_cv_search_gethostbyname" = no; then
5205 for ac_lib in nsl; do
5206 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5207 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
5208/* confdefs.h. */
5209_ACEOF
5210cat confdefs.h >>conftest.$ac_ext
5211cat >>conftest.$ac_ext <<_ACEOF
5212/* end confdefs.h. */
ddc9cd0f 5213
b4e70030 5214/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
5215#ifdef __cplusplus
5216extern "C"
5217#endif
b4e70030
JB
5218/* We use char because int might match the return type of a gcc2
5219 builtin and then its argument prototype would still apply. */
5220char gethostbyname ();
bec39cab
AC
5221int
5222main ()
5223{
b4e70030 5224gethostbyname ();
bec39cab
AC
5225 ;
5226 return 0;
5227}
5228_ACEOF
b4e70030 5229rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
5230if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5231 (eval $ac_link) 2>conftest.er1
5232 ac_status=$?
5233 grep -v '^ *+' conftest.er1 >conftest.err
5234 rm -f conftest.er1
5235 cat conftest.err >&5
5236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5237 (exit $ac_status); } &&
b4e70030
JB
5238 { ac_try='test -z "$ac_c_werror_flag"
5239 || test ! -s conftest.err'
bec39cab
AC
5240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5241 (eval $ac_try) 2>&5
5242 ac_status=$?
5243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5244 (exit $ac_status); }; } &&
5245 { ac_try='test -s conftest$ac_exeext'
5246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5247 (eval $ac_try) 2>&5
5248 ac_status=$?
5249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5250 (exit $ac_status); }; }; then
b4e70030
JB
5251 ac_cv_search_gethostbyname="-l$ac_lib"
5252break
bec39cab
AC
5253else
5254 echo "$as_me: failed program was:" >&5
5255sed 's/^/| /' conftest.$ac_ext >&5
5256
5257fi
5258rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
5259 conftest$ac_exeext conftest.$ac_ext
5260 done
bec39cab
AC
5261fi
5262LIBS=$ac_func_search_save_LIBS
5263fi
b4e70030
JB
5264echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
5265echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
5266if test "$ac_cv_search_gethostbyname" != no; then
5267 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
96baa820 5268
bec39cab 5269fi
96baa820 5270
c906108c 5271
b4e70030
JB
5272# Some systems (e.g. Solaris) have `socketpair' in libsocket.
5273echo "$as_me:$LINENO: checking for library containing socketpair" >&5
5274echo $ECHO_N "checking for library containing socketpair... $ECHO_C" >&6
5275if test "${ac_cv_search_socketpair+set}" = set; then
5276 echo $ECHO_N "(cached) $ECHO_C" >&6
5277else
5278 ac_func_search_save_LIBS=$LIBS
5279ac_cv_search_socketpair=no
5280cat >conftest.$ac_ext <<_ACEOF
5281/* confdefs.h. */
5282_ACEOF
5283cat confdefs.h >>conftest.$ac_ext
5284cat >>conftest.$ac_ext <<_ACEOF
5285/* end confdefs.h. */
5286
5287/* Override any gcc2 internal prototype to avoid an error. */
5288#ifdef __cplusplus
5289extern "C"
5290#endif
5291/* We use char because int might match the return type of a gcc2
5292 builtin and then its argument prototype would still apply. */
5293char socketpair ();
5294int
5295main ()
5296{
5297socketpair ();
5298 ;
5299 return 0;
5300}
5301_ACEOF
5302rm -f conftest.$ac_objext conftest$ac_exeext
5303if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5304 (eval $ac_link) 2>conftest.er1
5305 ac_status=$?
5306 grep -v '^ *+' conftest.er1 >conftest.err
5307 rm -f conftest.er1
5308 cat conftest.err >&5
5309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5310 (exit $ac_status); } &&
5311 { ac_try='test -z "$ac_c_werror_flag"
5312 || test ! -s conftest.err'
5313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5314 (eval $ac_try) 2>&5
5315 ac_status=$?
5316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5317 (exit $ac_status); }; } &&
5318 { ac_try='test -s conftest$ac_exeext'
5319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5320 (eval $ac_try) 2>&5
5321 ac_status=$?
5322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5323 (exit $ac_status); }; }; then
5324 ac_cv_search_socketpair="none required"
5325else
5326 echo "$as_me: failed program was:" >&5
5327sed 's/^/| /' conftest.$ac_ext >&5
5328
5329fi
5330rm -f conftest.err conftest.$ac_objext \
5331 conftest$ac_exeext conftest.$ac_ext
5332if test "$ac_cv_search_socketpair" = no; then
5333 for ac_lib in socket; do
5334 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5335 cat >conftest.$ac_ext <<_ACEOF
5336/* confdefs.h. */
5337_ACEOF
5338cat confdefs.h >>conftest.$ac_ext
5339cat >>conftest.$ac_ext <<_ACEOF
5340/* end confdefs.h. */
5341
5342/* Override any gcc2 internal prototype to avoid an error. */
5343#ifdef __cplusplus
5344extern "C"
5345#endif
5346/* We use char because int might match the return type of a gcc2
5347 builtin and then its argument prototype would still apply. */
5348char socketpair ();
5349int
5350main ()
5351{
5352socketpair ();
5353 ;
5354 return 0;
5355}
5356_ACEOF
5357rm -f conftest.$ac_objext conftest$ac_exeext
5358if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5359 (eval $ac_link) 2>conftest.er1
5360 ac_status=$?
5361 grep -v '^ *+' conftest.er1 >conftest.err
5362 rm -f conftest.er1
5363 cat conftest.err >&5
5364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5365 (exit $ac_status); } &&
5366 { ac_try='test -z "$ac_c_werror_flag"
5367 || test ! -s conftest.err'
5368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5369 (eval $ac_try) 2>&5
5370 ac_status=$?
5371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5372 (exit $ac_status); }; } &&
5373 { ac_try='test -s conftest$ac_exeext'
5374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5375 (eval $ac_try) 2>&5
5376 ac_status=$?
5377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5378 (exit $ac_status); }; }; then
5379 ac_cv_search_socketpair="-l$ac_lib"
5380break
5381else
5382 echo "$as_me: failed program was:" >&5
5383sed 's/^/| /' conftest.$ac_ext >&5
5384
5385fi
5386rm -f conftest.err conftest.$ac_objext \
5387 conftest$ac_exeext conftest.$ac_ext
5388 done
5389fi
5390LIBS=$ac_func_search_save_LIBS
5391fi
5392echo "$as_me:$LINENO: result: $ac_cv_search_socketpair" >&5
5393echo "${ECHO_T}$ac_cv_search_socketpair" >&6
5394if test "$ac_cv_search_socketpair" != no; then
5395 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
5396
5397fi
5398
5399
5400# For the TUI, we need enhanced curses functionality.
bec39cab
AC
5401#
5402# FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
5403# curses library because the latter might not provide all the
5404# functionality we need. However, this leads to problems on systems
5405# where the linker searches /usr/local/lib, but the compiler doesn't
5406# search /usr/local/include, if ncurses is installed in /usr/local. A
5407# default installation of ncurses on alpha*-dec-osf* will lead to such
5408# a situation.
b4e70030
JB
5409echo "$as_me:$LINENO: checking for library containing waddstr" >&5
5410echo $ECHO_N "checking for library containing waddstr... $ECHO_C" >&6
bec39cab
AC
5411if test "${ac_cv_search_waddstr+set}" = set; then
5412 echo $ECHO_N "(cached) $ECHO_C" >&6
5413else
5414 ac_func_search_save_LIBS=$LIBS
b4e70030 5415ac_cv_search_waddstr=no
bec39cab
AC
5416cat >conftest.$ac_ext <<_ACEOF
5417/* confdefs.h. */
5418_ACEOF
5419cat confdefs.h >>conftest.$ac_ext
5420cat >>conftest.$ac_ext <<_ACEOF
5421/* end confdefs.h. */
c906108c 5422
b4e70030 5423/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
5424#ifdef __cplusplus
5425extern "C"
5426#endif
b4e70030
JB
5427/* We use char because int might match the return type of a gcc2
5428 builtin and then its argument prototype would still apply. */
bec39cab
AC
5429char waddstr ();
5430int
5431main ()
5432{
b4e70030 5433waddstr ();
bec39cab
AC
5434 ;
5435 return 0;
5436}
5437_ACEOF
b4e70030 5438rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
5439if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5440 (eval $ac_link) 2>conftest.er1
5441 ac_status=$?
5442 grep -v '^ *+' conftest.er1 >conftest.err
5443 rm -f conftest.er1
5444 cat conftest.err >&5
5445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5446 (exit $ac_status); } &&
b4e70030
JB
5447 { ac_try='test -z "$ac_c_werror_flag"
5448 || test ! -s conftest.err'
bec39cab
AC
5449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5450 (eval $ac_try) 2>&5
5451 ac_status=$?
5452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5453 (exit $ac_status); }; } &&
5454 { ac_try='test -s conftest$ac_exeext'
5455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5456 (eval $ac_try) 2>&5
5457 ac_status=$?
5458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5459 (exit $ac_status); }; }; then
b4e70030 5460 ac_cv_search_waddstr="none required"
bec39cab
AC
5461else
5462 echo "$as_me: failed program was:" >&5
5463sed 's/^/| /' conftest.$ac_ext >&5
1ba607ad
AC
5464
5465fi
bec39cab 5466rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
5467 conftest$ac_exeext conftest.$ac_ext
5468if test "$ac_cv_search_waddstr" = no; then
5469 for ac_lib in ncurses cursesX curses; do
5470 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5471 cat >conftest.$ac_ext <<_ACEOF
5472/* confdefs.h. */
5473_ACEOF
5474cat confdefs.h >>conftest.$ac_ext
5475cat >>conftest.$ac_ext <<_ACEOF
5476/* end confdefs.h. */
5477
5478/* Override any gcc2 internal prototype to avoid an error. */
5479#ifdef __cplusplus
5480extern "C"
5481#endif
5482/* We use char because int might match the return type of a gcc2
5483 builtin and then its argument prototype would still apply. */
5484char waddstr ();
5485int
5486main ()
5487{
5488waddstr ();
5489 ;
5490 return 0;
5491}
5492_ACEOF
5493rm -f conftest.$ac_objext conftest$ac_exeext
5494if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5495 (eval $ac_link) 2>conftest.er1
5496 ac_status=$?
5497 grep -v '^ *+' conftest.er1 >conftest.err
5498 rm -f conftest.er1
5499 cat conftest.err >&5
5500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5501 (exit $ac_status); } &&
5502 { ac_try='test -z "$ac_c_werror_flag"
5503 || test ! -s conftest.err'
5504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5505 (eval $ac_try) 2>&5
5506 ac_status=$?
5507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5508 (exit $ac_status); }; } &&
5509 { ac_try='test -s conftest$ac_exeext'
5510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5511 (eval $ac_try) 2>&5
5512 ac_status=$?
5513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5514 (exit $ac_status); }; }; then
5515 ac_cv_search_waddstr="-l$ac_lib"
5516break
4e8d927d 5517else
b4e70030
JB
5518 echo "$as_me: failed program was:" >&5
5519sed 's/^/| /' conftest.$ac_ext >&5
5520
5521fi
5522rm -f conftest.err conftest.$ac_objext \
5523 conftest$ac_exeext conftest.$ac_ext
5524 done
1ba607ad 5525fi
bec39cab
AC
5526LIBS=$ac_func_search_save_LIBS
5527fi
b4e70030
JB
5528echo "$as_me:$LINENO: result: $ac_cv_search_waddstr" >&5
5529echo "${ECHO_T}$ac_cv_search_waddstr" >&6
5530if test "$ac_cv_search_waddstr" != no; then
5531 test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
c906108c 5532
8bb2c122 5533fi
8bb2c122 5534
8bb2c122 5535
bec39cab
AC
5536# Since GDB uses Readline, we need termcap functionality. In many
5537# cases this will be provided by the curses library, but some systems
5538# have a seperate termcap library, or no curses library at all.
8bb2c122 5539
bec39cab
AC
5540case $host_os in
5541 cygwin*)
5542 if test -d $srcdir/libtermcap; then
5543 LIBS="../libtermcap/libtermcap.a $LIBS"
5544 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
5545 fi ;;
5546 go32* | *djgpp*)
5547 ac_cv_search_tgetent="none required"
5548 ;;
7ef34f2c
MM
5549 *mingw32*)
5550 ac_cv_search_tgetent="none required"
5551 CONFIG_OBS="$CONFIG_OBS win32-termcap.o"
5552 ;;
bec39cab 5553esac
627af7ea 5554
bec39cab 5555# These are the libraries checked by Readline.
b4e70030
JB
5556echo "$as_me:$LINENO: checking for library containing tgetent" >&5
5557echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6
bec39cab
AC
5558if test "${ac_cv_search_tgetent+set}" = set; then
5559 echo $ECHO_N "(cached) $ECHO_C" >&6
5560else
5561 ac_func_search_save_LIBS=$LIBS
b4e70030 5562ac_cv_search_tgetent=no
bec39cab
AC
5563cat >conftest.$ac_ext <<_ACEOF
5564/* confdefs.h. */
5565_ACEOF
5566cat confdefs.h >>conftest.$ac_ext
5567cat >>conftest.$ac_ext <<_ACEOF
5568/* end confdefs.h. */
5569
b4e70030 5570/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
5571#ifdef __cplusplus
5572extern "C"
5573#endif
b4e70030
JB
5574/* We use char because int might match the return type of a gcc2
5575 builtin and then its argument prototype would still apply. */
bec39cab
AC
5576char tgetent ();
5577int
5578main ()
5579{
b4e70030 5580tgetent ();
bec39cab
AC
5581 ;
5582 return 0;
5583}
5584_ACEOF
b4e70030 5585rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
5586if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5587 (eval $ac_link) 2>conftest.er1
5588 ac_status=$?
5589 grep -v '^ *+' conftest.er1 >conftest.err
5590 rm -f conftest.er1
5591 cat conftest.err >&5
5592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5593 (exit $ac_status); } &&
b4e70030
JB
5594 { ac_try='test -z "$ac_c_werror_flag"
5595 || test ! -s conftest.err'
bec39cab
AC
5596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5597 (eval $ac_try) 2>&5
5598 ac_status=$?
5599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5600 (exit $ac_status); }; } &&
5601 { ac_try='test -s conftest$ac_exeext'
5602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5603 (eval $ac_try) 2>&5
5604 ac_status=$?
5605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5606 (exit $ac_status); }; }; then
b4e70030 5607 ac_cv_search_tgetent="none required"
627af7ea 5608else
bec39cab
AC
5609 echo "$as_me: failed program was:" >&5
5610sed 's/^/| /' conftest.$ac_ext >&5
627af7ea 5611
627af7ea 5612fi
bec39cab 5613rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
5614 conftest$ac_exeext conftest.$ac_ext
5615if test "$ac_cv_search_tgetent" = no; then
5616 for ac_lib in termcap tinfo curses ncurses; do
5617 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5618 cat >conftest.$ac_ext <<_ACEOF
5619/* confdefs.h. */
5620_ACEOF
5621cat confdefs.h >>conftest.$ac_ext
5622cat >>conftest.$ac_ext <<_ACEOF
5623/* end confdefs.h. */
5624
5625/* Override any gcc2 internal prototype to avoid an error. */
5626#ifdef __cplusplus
5627extern "C"
5628#endif
5629/* We use char because int might match the return type of a gcc2
5630 builtin and then its argument prototype would still apply. */
5631char tgetent ();
5632int
5633main ()
5634{
5635tgetent ();
5636 ;
5637 return 0;
5638}
5639_ACEOF
5640rm -f conftest.$ac_objext conftest$ac_exeext
5641if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5642 (eval $ac_link) 2>conftest.er1
5643 ac_status=$?
5644 grep -v '^ *+' conftest.er1 >conftest.err
5645 rm -f conftest.er1
5646 cat conftest.err >&5
5647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5648 (exit $ac_status); } &&
5649 { ac_try='test -z "$ac_c_werror_flag"
5650 || test ! -s conftest.err'
5651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5652 (eval $ac_try) 2>&5
5653 ac_status=$?
5654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5655 (exit $ac_status); }; } &&
5656 { ac_try='test -s conftest$ac_exeext'
5657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5658 (eval $ac_try) 2>&5
5659 ac_status=$?
5660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5661 (exit $ac_status); }; }; then
5662 ac_cv_search_tgetent="-l$ac_lib"
5663break
4e8d927d 5664else
b4e70030
JB
5665 echo "$as_me: failed program was:" >&5
5666sed 's/^/| /' conftest.$ac_ext >&5
5667
5668fi
5669rm -f conftest.err conftest.$ac_objext \
5670 conftest$ac_exeext conftest.$ac_ext
5671 done
bec39cab
AC
5672fi
5673LIBS=$ac_func_search_save_LIBS
5674fi
b4e70030
JB
5675echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5
5676echo "${ECHO_T}$ac_cv_search_tgetent" >&6
5677if test "$ac_cv_search_tgetent" != no; then
5678 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
627af7ea 5679
06825bd1
MK
5680fi
5681
06825bd1 5682
bec39cab
AC
5683if test "$ac_cv_search_tgetent" = no; then
5684 { { echo "$as_me:$LINENO: error: no termcap library found" >&5
5685echo "$as_me: error: no termcap library found" >&2;}
5686 { (exit 1); exit 1; }; }
8ee53726
MK
5687fi
5688
bec39cab
AC
5689# ------------------------- #
5690# Checks for header files. #
5691# ------------------------- #
8ee53726 5692
0e5d83e3 5693
bec39cab
AC
5694
5695
5696
5697
5698ac_header_dirent=no
5699for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5700 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
b4e70030
JB
5701echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5702echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
5703if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
5704 echo $ECHO_N "(cached) $ECHO_C" >&6
5705else
5706 cat >conftest.$ac_ext <<_ACEOF
5707/* confdefs.h. */
5708_ACEOF
5709cat confdefs.h >>conftest.$ac_ext
5710cat >>conftest.$ac_ext <<_ACEOF
5711/* end confdefs.h. */
5712#include <sys/types.h>
0e5d83e3 5713#include <$ac_hdr>
bec39cab
AC
5714
5715int
5716main ()
5717{
5718if ((DIR *) 0)
5719return 0;
5720 ;
5721 return 0;
5722}
5723_ACEOF
5724rm -f conftest.$ac_objext
5725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5726 (eval $ac_compile) 2>conftest.er1
5727 ac_status=$?
5728 grep -v '^ *+' conftest.er1 >conftest.err
5729 rm -f conftest.er1
5730 cat conftest.err >&5
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); } &&
b4e70030
JB
5733 { ac_try='test -z "$ac_c_werror_flag"
5734 || test ! -s conftest.err'
bec39cab
AC
5735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5736 (eval $ac_try) 2>&5
5737 ac_status=$?
5738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5739 (exit $ac_status); }; } &&
5740 { ac_try='test -s conftest.$ac_objext'
5741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5742 (eval $ac_try) 2>&5
5743 ac_status=$?
5744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5745 (exit $ac_status); }; }; then
5746 eval "$as_ac_Header=yes"
5747else
5748 echo "$as_me: failed program was:" >&5
5749sed 's/^/| /' conftest.$ac_ext >&5
5750
b4e70030 5751eval "$as_ac_Header=no"
bec39cab
AC
5752fi
5753rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5754fi
b4e70030
JB
5755echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5756echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
5757if test `eval echo '${'$as_ac_Header'}'` = yes; then
5758 cat >>confdefs.h <<_ACEOF
5759#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5760_ACEOF
5761
5762ac_header_dirent=$ac_hdr; break
0e5d83e3 5763fi
0e5d83e3 5764
bec39cab
AC
5765done
5766# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5767if test $ac_header_dirent = dirent.h; then
b4e70030
JB
5768 echo "$as_me:$LINENO: checking for library containing opendir" >&5
5769echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
5770if test "${ac_cv_search_opendir+set}" = set; then
5771 echo $ECHO_N "(cached) $ECHO_C" >&6
5772else
5773 ac_func_search_save_LIBS=$LIBS
b4e70030 5774ac_cv_search_opendir=no
bec39cab
AC
5775cat >conftest.$ac_ext <<_ACEOF
5776/* confdefs.h. */
5777_ACEOF
5778cat confdefs.h >>conftest.$ac_ext
5779cat >>conftest.$ac_ext <<_ACEOF
5780/* end confdefs.h. */
0e5d83e3 5781
b4e70030 5782/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
5783#ifdef __cplusplus
5784extern "C"
5785#endif
b4e70030
JB
5786/* We use char because int might match the return type of a gcc2
5787 builtin and then its argument prototype would still apply. */
bec39cab
AC
5788char opendir ();
5789int
5790main ()
5791{
b4e70030 5792opendir ();
bec39cab
AC
5793 ;
5794 return 0;
5795}
5796_ACEOF
b4e70030 5797rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
5798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5799 (eval $ac_link) 2>conftest.er1
5800 ac_status=$?
5801 grep -v '^ *+' conftest.er1 >conftest.err
5802 rm -f conftest.er1
5803 cat conftest.err >&5
5804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5805 (exit $ac_status); } &&
b4e70030
JB
5806 { ac_try='test -z "$ac_c_werror_flag"
5807 || test ! -s conftest.err'
bec39cab
AC
5808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5809 (eval $ac_try) 2>&5
5810 ac_status=$?
5811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5812 (exit $ac_status); }; } &&
5813 { ac_try='test -s conftest$ac_exeext'
5814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5815 (eval $ac_try) 2>&5
5816 ac_status=$?
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); }; }; then
b4e70030 5819 ac_cv_search_opendir="none required"
bec39cab
AC
5820else
5821 echo "$as_me: failed program was:" >&5
5822sed 's/^/| /' conftest.$ac_ext >&5
5823
5824fi
bec39cab 5825rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
5826 conftest$ac_exeext conftest.$ac_ext
5827if test "$ac_cv_search_opendir" = no; then
5828 for ac_lib in dir; do
5829 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5830 cat >conftest.$ac_ext <<_ACEOF
5831/* confdefs.h. */
5832_ACEOF
5833cat confdefs.h >>conftest.$ac_ext
5834cat >>conftest.$ac_ext <<_ACEOF
5835/* end confdefs.h. */
5836
5837/* Override any gcc2 internal prototype to avoid an error. */
5838#ifdef __cplusplus
5839extern "C"
5840#endif
5841/* We use char because int might match the return type of a gcc2
5842 builtin and then its argument prototype would still apply. */
5843char opendir ();
5844int
5845main ()
5846{
5847opendir ();
5848 ;
5849 return 0;
5850}
5851_ACEOF
5852rm -f conftest.$ac_objext conftest$ac_exeext
5853if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5854 (eval $ac_link) 2>conftest.er1
5855 ac_status=$?
5856 grep -v '^ *+' conftest.er1 >conftest.err
5857 rm -f conftest.er1
5858 cat conftest.err >&5
5859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5860 (exit $ac_status); } &&
5861 { ac_try='test -z "$ac_c_werror_flag"
5862 || test ! -s conftest.err'
5863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5864 (eval $ac_try) 2>&5
5865 ac_status=$?
5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867 (exit $ac_status); }; } &&
5868 { ac_try='test -s conftest$ac_exeext'
5869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5870 (eval $ac_try) 2>&5
5871 ac_status=$?
5872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5873 (exit $ac_status); }; }; then
5874 ac_cv_search_opendir="-l$ac_lib"
5875break
4e8d927d 5876else
b4e70030
JB
5877 echo "$as_me: failed program was:" >&5
5878sed 's/^/| /' conftest.$ac_ext >&5
5879
5880fi
5881rm -f conftest.err conftest.$ac_objext \
5882 conftest$ac_exeext conftest.$ac_ext
5883 done
0e5d83e3 5884fi
bec39cab 5885LIBS=$ac_func_search_save_LIBS
0e5d83e3 5886fi
b4e70030
JB
5887echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5888echo "${ECHO_T}$ac_cv_search_opendir" >&6
5889if test "$ac_cv_search_opendir" != no; then
5890 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
0e5d83e3 5891
0e5d83e3
JJ
5892fi
5893
d28f9cdf 5894else
b4e70030
JB
5895 echo "$as_me:$LINENO: checking for library containing opendir" >&5
5896echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
5897if test "${ac_cv_search_opendir+set}" = set; then
5898 echo $ECHO_N "(cached) $ECHO_C" >&6
5899else
5900 ac_func_search_save_LIBS=$LIBS
b4e70030 5901ac_cv_search_opendir=no
bec39cab
AC
5902cat >conftest.$ac_ext <<_ACEOF
5903/* confdefs.h. */
5904_ACEOF
5905cat confdefs.h >>conftest.$ac_ext
5906cat >>conftest.$ac_ext <<_ACEOF
5907/* end confdefs.h. */
d28f9cdf 5908
b4e70030 5909/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
5910#ifdef __cplusplus
5911extern "C"
d28f9cdf 5912#endif
b4e70030
JB
5913/* We use char because int might match the return type of a gcc2
5914 builtin and then its argument prototype would still apply. */
bec39cab
AC
5915char opendir ();
5916int
5917main ()
5918{
b4e70030 5919opendir ();
bec39cab
AC
5920 ;
5921 return 0;
5922}
5923_ACEOF
b4e70030 5924rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
5925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5926 (eval $ac_link) 2>conftest.er1
5927 ac_status=$?
5928 grep -v '^ *+' conftest.er1 >conftest.err
5929 rm -f conftest.er1
5930 cat conftest.err >&5
5931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5932 (exit $ac_status); } &&
b4e70030
JB
5933 { ac_try='test -z "$ac_c_werror_flag"
5934 || test ! -s conftest.err'
bec39cab
AC
5935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5936 (eval $ac_try) 2>&5
5937 ac_status=$?
5938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5939 (exit $ac_status); }; } &&
5940 { ac_try='test -s conftest$ac_exeext'
5941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5942 (eval $ac_try) 2>&5
5943 ac_status=$?
5944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5945 (exit $ac_status); }; }; then
b4e70030 5946 ac_cv_search_opendir="none required"
d28f9cdf 5947else
bec39cab
AC
5948 echo "$as_me: failed program was:" >&5
5949sed 's/^/| /' conftest.$ac_ext >&5
5950
d28f9cdf 5951fi
bec39cab 5952rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
5953 conftest$ac_exeext conftest.$ac_ext
5954if test "$ac_cv_search_opendir" = no; then
5955 for ac_lib in x; do
5956 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5957 cat >conftest.$ac_ext <<_ACEOF
5958/* confdefs.h. */
5959_ACEOF
5960cat confdefs.h >>conftest.$ac_ext
5961cat >>conftest.$ac_ext <<_ACEOF
5962/* end confdefs.h. */
5963
5964/* Override any gcc2 internal prototype to avoid an error. */
5965#ifdef __cplusplus
5966extern "C"
5967#endif
5968/* We use char because int might match the return type of a gcc2
5969 builtin and then its argument prototype would still apply. */
5970char opendir ();
5971int
5972main ()
5973{
5974opendir ();
5975 ;
5976 return 0;
5977}
5978_ACEOF
5979rm -f conftest.$ac_objext conftest$ac_exeext
5980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5981 (eval $ac_link) 2>conftest.er1
5982 ac_status=$?
5983 grep -v '^ *+' conftest.er1 >conftest.err
5984 rm -f conftest.er1
5985 cat conftest.err >&5
5986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5987 (exit $ac_status); } &&
5988 { ac_try='test -z "$ac_c_werror_flag"
5989 || test ! -s conftest.err'
5990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5991 (eval $ac_try) 2>&5
5992 ac_status=$?
5993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5994 (exit $ac_status); }; } &&
5995 { ac_try='test -s conftest$ac_exeext'
5996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5997 (eval $ac_try) 2>&5
5998 ac_status=$?
5999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6000 (exit $ac_status); }; }; then
6001 ac_cv_search_opendir="-l$ac_lib"
6002break
4e8d927d 6003else
b4e70030
JB
6004 echo "$as_me: failed program was:" >&5
6005sed 's/^/| /' conftest.$ac_ext >&5
6006
6007fi
6008rm -f conftest.err conftest.$ac_objext \
6009 conftest$ac_exeext conftest.$ac_ext
6010 done
bec39cab
AC
6011fi
6012LIBS=$ac_func_search_save_LIBS
d28f9cdf 6013fi
b4e70030
JB
6014echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6015echo "${ECHO_T}$ac_cv_search_opendir" >&6
6016if test "$ac_cv_search_opendir" != no; then
6017 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
d28f9cdf 6018
d28f9cdf
DJ
6019fi
6020
bec39cab 6021fi
b0b1c2c0 6022
b4e70030
JB
6023echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
6024echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
bec39cab
AC
6025if test "${ac_cv_header_stat_broken+set}" = set; then
6026 echo $ECHO_N "(cached) $ECHO_C" >&6
b0b1c2c0 6027else
bec39cab
AC
6028 cat >conftest.$ac_ext <<_ACEOF
6029/* confdefs.h. */
6030_ACEOF
6031cat confdefs.h >>conftest.$ac_ext
6032cat >>conftest.$ac_ext <<_ACEOF
6033/* end confdefs.h. */
6034#include <sys/types.h>
6035#include <sys/stat.h>
b0b1c2c0 6036
b4e70030 6037#if defined(S_ISBLK) && defined(S_IFDIR)
bec39cab
AC
6038# if S_ISBLK (S_IFDIR)
6039You lose.
6040# endif
6041#endif
b0b1c2c0 6042
b4e70030 6043#if defined(S_ISBLK) && defined(S_IFCHR)
bec39cab
AC
6044# if S_ISBLK (S_IFCHR)
6045You lose.
6046# endif
6047#endif
d28f9cdf 6048
b4e70030 6049#if defined(S_ISLNK) && defined(S_IFREG)
bec39cab
AC
6050# if S_ISLNK (S_IFREG)
6051You lose.
6052# endif
6053#endif
d28f9cdf 6054
b4e70030 6055#if defined(S_ISSOCK) && defined(S_IFREG)
bec39cab
AC
6056# if S_ISSOCK (S_IFREG)
6057You lose.
6058# endif
6059#endif
6060
6061_ACEOF
6062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6063 $EGREP "You lose" >/dev/null 2>&1; then
6064 ac_cv_header_stat_broken=yes
d28f9cdf 6065else
bec39cab 6066 ac_cv_header_stat_broken=no
d28f9cdf
DJ
6067fi
6068rm -f conftest*
d28f9cdf 6069
d28f9cdf 6070fi
b4e70030
JB
6071echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
6072echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
bec39cab 6073if test $ac_cv_header_stat_broken = yes; then
d28f9cdf 6074
bec39cab
AC
6075cat >>confdefs.h <<\_ACEOF
6076#define STAT_MACROS_BROKEN 1
6077_ACEOF
8bb2c122 6078
7a292a7a 6079fi
bec39cab 6080
b4e70030
JB
6081echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6082echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
bec39cab
AC
6083if test "${ac_cv_header_stdc+set}" = set; then
6084 echo $ECHO_N "(cached) $ECHO_C" >&6
7a292a7a 6085else
bec39cab
AC
6086 cat >conftest.$ac_ext <<_ACEOF
6087/* confdefs.h. */
6088_ACEOF
6089cat confdefs.h >>conftest.$ac_ext
6090cat >>conftest.$ac_ext <<_ACEOF
6091/* end confdefs.h. */
6092#include <stdlib.h>
6093#include <stdarg.h>
6094#include <string.h>
6095#include <float.h>
7a292a7a 6096
bec39cab
AC
6097int
6098main ()
6099{
7a292a7a 6100
bec39cab
AC
6101 ;
6102 return 0;
6103}
6104_ACEOF
6105rm -f conftest.$ac_objext
6106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6107 (eval $ac_compile) 2>conftest.er1
6108 ac_status=$?
6109 grep -v '^ *+' conftest.er1 >conftest.err
6110 rm -f conftest.er1
6111 cat conftest.err >&5
6112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6113 (exit $ac_status); } &&
b4e70030
JB
6114 { ac_try='test -z "$ac_c_werror_flag"
6115 || test ! -s conftest.err'
bec39cab
AC
6116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6117 (eval $ac_try) 2>&5
6118 ac_status=$?
6119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6120 (exit $ac_status); }; } &&
6121 { ac_try='test -s conftest.$ac_objext'
6122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6123 (eval $ac_try) 2>&5
6124 ac_status=$?
6125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6126 (exit $ac_status); }; }; then
6127 ac_cv_header_stdc=yes
c906108c 6128else
bec39cab
AC
6129 echo "$as_me: failed program was:" >&5
6130sed 's/^/| /' conftest.$ac_ext >&5
c906108c 6131
b4e70030 6132ac_cv_header_stdc=no
c906108c 6133fi
bec39cab 6134rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 6135
bec39cab
AC
6136if test $ac_cv_header_stdc = yes; then
6137 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6138 cat >conftest.$ac_ext <<_ACEOF
6139/* confdefs.h. */
6140_ACEOF
6141cat confdefs.h >>conftest.$ac_ext
6142cat >>conftest.$ac_ext <<_ACEOF
6143/* end confdefs.h. */
6144#include <string.h>
c906108c 6145
bec39cab
AC
6146_ACEOF
6147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6148 $EGREP "memchr" >/dev/null 2>&1; then
6149 :
8bb2c122 6150else
bec39cab 6151 ac_cv_header_stdc=no
8bb2c122 6152fi
bec39cab
AC
6153rm -f conftest*
6154
c906108c
SS
6155fi
6156
bec39cab
AC
6157if test $ac_cv_header_stdc = yes; then
6158 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6159 cat >conftest.$ac_ext <<_ACEOF
6160/* confdefs.h. */
6161_ACEOF
6162cat confdefs.h >>conftest.$ac_ext
6163cat >>conftest.$ac_ext <<_ACEOF
6164/* end confdefs.h. */
6165#include <stdlib.h>
6166
6167_ACEOF
6168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6169 $EGREP "free" >/dev/null 2>&1; then
6170 :
c906108c 6171else
bec39cab 6172 ac_cv_header_stdc=no
c906108c 6173fi
bec39cab
AC
6174rm -f conftest*
6175
c906108c
SS
6176fi
6177
bec39cab
AC
6178if test $ac_cv_header_stdc = yes; then
6179 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6180 if test "$cross_compiling" = yes; then
6181 :
c906108c 6182else
bec39cab
AC
6183 cat >conftest.$ac_ext <<_ACEOF
6184/* confdefs.h. */
6185_ACEOF
6186cat confdefs.h >>conftest.$ac_ext
6187cat >>conftest.$ac_ext <<_ACEOF
6188/* end confdefs.h. */
6189#include <ctype.h>
6190#if ((' ' & 0x0FF) == 0x020)
6191# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6192# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6193#else
6194# define ISLOWER(c) \
6195 (('a' <= (c) && (c) <= 'i') \
6196 || ('j' <= (c) && (c) <= 'r') \
6197 || ('s' <= (c) && (c) <= 'z'))
6198# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6199#endif
6200
6201#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6202int
6203main ()
6204{
6205 int i;
6206 for (i = 0; i < 256; i++)
6207 if (XOR (islower (i), ISLOWER (i))
6208 || toupper (i) != TOUPPER (i))
b4e70030
JB
6209 exit(2);
6210 exit (0);
bec39cab
AC
6211}
6212_ACEOF
6213rm -f conftest$ac_exeext
6214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6215 (eval $ac_link) 2>&5
6216 ac_status=$?
6217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6220 (eval $ac_try) 2>&5
6221 ac_status=$?
6222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223 (exit $ac_status); }; }; then
6224 :
6225else
6226 echo "$as_me: program exited with status $ac_status" >&5
6227echo "$as_me: failed program was:" >&5
6228sed 's/^/| /' conftest.$ac_ext >&5
6229
6230( exit $ac_status )
6231ac_cv_header_stdc=no
c906108c 6232fi
b4e70030 6233rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 6234fi
c906108c 6235fi
bec39cab 6236fi
b4e70030
JB
6237echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6238echo "${ECHO_T}$ac_cv_header_stdc" >&6
bec39cab 6239if test $ac_cv_header_stdc = yes; then
c906108c 6240
bec39cab
AC
6241cat >>confdefs.h <<\_ACEOF
6242#define STDC_HEADERS 1
6243_ACEOF
c906108c 6244
bec39cab 6245fi
8bb2c122 6246
bec39cab 6247
7cb9022a 6248for ac_header in nlist.h
bec39cab
AC
6249do
6250as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
6251if eval "test \"\${$as_ac_Header+set}\" = set"; then
6252 echo "$as_me:$LINENO: checking for $ac_header" >&5
6253echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6254if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
6255 echo $ECHO_N "(cached) $ECHO_C" >&6
6256fi
b4e70030
JB
6257echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6258echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
6259else
6260 # Is the header compilable?
b4e70030
JB
6261echo "$as_me:$LINENO: checking $ac_header usability" >&5
6262echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
6263cat >conftest.$ac_ext <<_ACEOF
6264/* confdefs.h. */
6265_ACEOF
6266cat confdefs.h >>conftest.$ac_ext
6267cat >>conftest.$ac_ext <<_ACEOF
6268/* end confdefs.h. */
6269$ac_includes_default
6270#include <$ac_header>
6271_ACEOF
6272rm -f conftest.$ac_objext
6273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6274 (eval $ac_compile) 2>conftest.er1
6275 ac_status=$?
6276 grep -v '^ *+' conftest.er1 >conftest.err
6277 rm -f conftest.er1
6278 cat conftest.err >&5
6279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6280 (exit $ac_status); } &&
b4e70030
JB
6281 { ac_try='test -z "$ac_c_werror_flag"
6282 || test ! -s conftest.err'
bec39cab
AC
6283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6284 (eval $ac_try) 2>&5
6285 ac_status=$?
6286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6287 (exit $ac_status); }; } &&
6288 { ac_try='test -s conftest.$ac_objext'
6289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6290 (eval $ac_try) 2>&5
6291 ac_status=$?
6292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6293 (exit $ac_status); }; }; then
6294 ac_header_compiler=yes
6295else
6296 echo "$as_me: failed program was:" >&5
6297sed 's/^/| /' conftest.$ac_ext >&5
6298
b4e70030 6299ac_header_compiler=no
bec39cab
AC
6300fi
6301rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
6302echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6303echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
6304
6305# Is the header present?
b4e70030
JB
6306echo "$as_me:$LINENO: checking $ac_header presence" >&5
6307echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
6308cat >conftest.$ac_ext <<_ACEOF
6309/* confdefs.h. */
6310_ACEOF
6311cat confdefs.h >>conftest.$ac_ext
6312cat >>conftest.$ac_ext <<_ACEOF
6313/* end confdefs.h. */
6314#include <$ac_header>
6315_ACEOF
6316if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6317 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6318 ac_status=$?
6319 grep -v '^ *+' conftest.er1 >conftest.err
6320 rm -f conftest.er1
6321 cat conftest.err >&5
6322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6323 (exit $ac_status); } >/dev/null; then
6324 if test -s conftest.err; then
6325 ac_cpp_err=$ac_c_preproc_warn_flag
6326 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6327 else
6328 ac_cpp_err=
6329 fi
c906108c 6330else
bec39cab 6331 ac_cpp_err=yes
c906108c 6332fi
bec39cab
AC
6333if test -z "$ac_cpp_err"; then
6334 ac_header_preproc=yes
c906108c 6335else
bec39cab
AC
6336 echo "$as_me: failed program was:" >&5
6337sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 6338
bec39cab
AC
6339 ac_header_preproc=no
6340fi
6341rm -f conftest.err conftest.$ac_ext
b4e70030
JB
6342echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6343echo "${ECHO_T}$ac_header_preproc" >&6
c906108c 6344
bec39cab
AC
6345# So? What about this header?
6346case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6347 yes:no: )
6348 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6349echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6350 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6351echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6352 ac_header_preproc=yes
6353 ;;
6354 no:yes:* )
6355 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6356echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6357 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6358echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6359 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6360echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6361 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6362echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6363 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6364echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6365 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6366echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
6367 (
6368 cat <<\_ASBOX
6369## ------------------------------------------ ##
6370## Report this to the AC_PACKAGE_NAME lists. ##
6371## ------------------------------------------ ##
6372_ASBOX
6373 ) |
6374 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
6375 ;;
6376esac
b4e70030
JB
6377echo "$as_me:$LINENO: checking for $ac_header" >&5
6378echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6379if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 6380 echo $ECHO_N "(cached) $ECHO_C" >&6
95ca63c4 6381else
bec39cab 6382 eval "$as_ac_Header=\$ac_header_preproc"
95ca63c4 6383fi
b4e70030
JB
6384echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6385echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 6386
95ca63c4 6387fi
bec39cab
AC
6388if test `eval echo '${'$as_ac_Header'}'` = yes; then
6389 cat >>confdefs.h <<_ACEOF
6390#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6391_ACEOF
6392
95ca63c4
CF
6393fi
6394
bec39cab 6395done
95ca63c4
CF
6396
6397
7cb9022a 6398for ac_header in link.h
bec39cab
AC
6399do
6400as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
6401echo "$as_me:$LINENO: checking for $ac_header" >&5
6402echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6403if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 6404 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 6405else
7cb9022a 6406 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
6407/* confdefs.h. */
6408_ACEOF
6409cat confdefs.h >>conftest.$ac_ext
6410cat >>conftest.$ac_ext <<_ACEOF
6411/* end confdefs.h. */
7cb9022a
MK
6412#if HAVE_SYS_TYPES_H
6413# include <sys/types.h>
6414#endif
6415#if HAVE_NLIST_H
6416# include <nlist.h>
6417#endif
6418
6419
bec39cab
AC
6420#include <$ac_header>
6421_ACEOF
6422rm -f conftest.$ac_objext
6423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6424 (eval $ac_compile) 2>conftest.er1
6425 ac_status=$?
6426 grep -v '^ *+' conftest.er1 >conftest.err
6427 rm -f conftest.er1
6428 cat conftest.err >&5
6429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6430 (exit $ac_status); } &&
b4e70030
JB
6431 { ac_try='test -z "$ac_c_werror_flag"
6432 || test ! -s conftest.err'
bec39cab
AC
6433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6434 (eval $ac_try) 2>&5
6435 ac_status=$?
6436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6437 (exit $ac_status); }; } &&
6438 { ac_try='test -s conftest.$ac_objext'
6439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6440 (eval $ac_try) 2>&5
6441 ac_status=$?
6442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6443 (exit $ac_status); }; }; then
7cb9022a 6444 eval "$as_ac_Header=yes"
bec39cab
AC
6445else
6446 echo "$as_me: failed program was:" >&5
6447sed 's/^/| /' conftest.$ac_ext >&5
6448
b4e70030 6449eval "$as_ac_Header=no"
bec39cab
AC
6450fi
6451rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6452fi
b4e70030
JB
6453echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6454echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
6455if test `eval echo '${'$as_ac_Header'}'` = yes; then
6456 cat >>confdefs.h <<_ACEOF
6457#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6458_ACEOF
95ca63c4 6459
bec39cab 6460fi
95ca63c4 6461
bec39cab 6462done
95ca63c4 6463
c906108c 6464
7cb9022a 6465for ac_header in machine/reg.h
bec39cab
AC
6466do
6467as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
6468if eval "test \"\${$as_ac_Header+set}\" = set"; then
6469 echo "$as_me:$LINENO: checking for $ac_header" >&5
6470echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6471if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
6472 echo $ECHO_N "(cached) $ECHO_C" >&6
6473fi
b4e70030
JB
6474echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6475echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
6476else
6477 # Is the header compilable?
b4e70030
JB
6478echo "$as_me:$LINENO: checking $ac_header usability" >&5
6479echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
6480cat >conftest.$ac_ext <<_ACEOF
6481/* confdefs.h. */
6482_ACEOF
6483cat confdefs.h >>conftest.$ac_ext
6484cat >>conftest.$ac_ext <<_ACEOF
6485/* end confdefs.h. */
6486$ac_includes_default
6487#include <$ac_header>
6488_ACEOF
6489rm -f conftest.$ac_objext
6490if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6491 (eval $ac_compile) 2>conftest.er1
6492 ac_status=$?
6493 grep -v '^ *+' conftest.er1 >conftest.err
6494 rm -f conftest.er1
6495 cat conftest.err >&5
6496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6497 (exit $ac_status); } &&
b4e70030
JB
6498 { ac_try='test -z "$ac_c_werror_flag"
6499 || test ! -s conftest.err'
bec39cab
AC
6500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6501 (eval $ac_try) 2>&5
6502 ac_status=$?
6503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6504 (exit $ac_status); }; } &&
6505 { ac_try='test -s conftest.$ac_objext'
6506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6507 (eval $ac_try) 2>&5
6508 ac_status=$?
6509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6510 (exit $ac_status); }; }; then
6511 ac_header_compiler=yes
6512else
6513 echo "$as_me: failed program was:" >&5
6514sed 's/^/| /' conftest.$ac_ext >&5
6515
b4e70030 6516ac_header_compiler=no
bec39cab
AC
6517fi
6518rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
6519echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6520echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
6521
6522# Is the header present?
b4e70030
JB
6523echo "$as_me:$LINENO: checking $ac_header presence" >&5
6524echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
6525cat >conftest.$ac_ext <<_ACEOF
6526/* confdefs.h. */
6527_ACEOF
6528cat confdefs.h >>conftest.$ac_ext
6529cat >>conftest.$ac_ext <<_ACEOF
6530/* end confdefs.h. */
6531#include <$ac_header>
6532_ACEOF
6533if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6534 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6535 ac_status=$?
6536 grep -v '^ *+' conftest.er1 >conftest.err
6537 rm -f conftest.er1
6538 cat conftest.err >&5
6539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6540 (exit $ac_status); } >/dev/null; then
6541 if test -s conftest.err; then
6542 ac_cpp_err=$ac_c_preproc_warn_flag
6543 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6544 else
6545 ac_cpp_err=
6546 fi
75c6e08a 6547else
bec39cab 6548 ac_cpp_err=yes
75c6e08a 6549fi
bec39cab
AC
6550if test -z "$ac_cpp_err"; then
6551 ac_header_preproc=yes
6552else
6553 echo "$as_me: failed program was:" >&5
6554sed 's/^/| /' conftest.$ac_ext >&5
6555
6556 ac_header_preproc=no
75c6e08a 6557fi
bec39cab 6558rm -f conftest.err conftest.$ac_ext
b4e70030
JB
6559echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6560echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
6561
6562# So? What about this header?
6563case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6564 yes:no: )
6565 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6566echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6567 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6568echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6569 ac_header_preproc=yes
6570 ;;
6571 no:yes:* )
6572 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6573echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6574 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6575echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6576 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6577echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6578 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6579echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6580 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6581echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6582 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6583echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
6584 (
6585 cat <<\_ASBOX
6586## ------------------------------------------ ##
6587## Report this to the AC_PACKAGE_NAME lists. ##
6588## ------------------------------------------ ##
6589_ASBOX
6590 ) |
6591 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
6592 ;;
6593esac
b4e70030
JB
6594echo "$as_me:$LINENO: checking for $ac_header" >&5
6595echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6596if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 6597 echo $ECHO_N "(cached) $ECHO_C" >&6
75c6e08a 6598else
bec39cab
AC
6599 eval "$as_ac_Header=\$ac_header_preproc"
6600fi
b4e70030
JB
6601echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6602echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 6603
75c6e08a 6604fi
bec39cab
AC
6605if test `eval echo '${'$as_ac_Header'}'` = yes; then
6606 cat >>confdefs.h <<_ACEOF
6607#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6608_ACEOF
75c6e08a 6609
bec39cab 6610fi
75c6e08a 6611
bec39cab 6612done
75c6e08a
MK
6613
6614
9a156167 6615
bec39cab
AC
6616for ac_header in poll.h sys/poll.h
6617do
6618as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
6619if eval "test \"\${$as_ac_Header+set}\" = set"; then
6620 echo "$as_me:$LINENO: checking for $ac_header" >&5
6621echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6622if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
6623 echo $ECHO_N "(cached) $ECHO_C" >&6
6624fi
b4e70030
JB
6625echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6626echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
6627else
6628 # Is the header compilable?
b4e70030
JB
6629echo "$as_me:$LINENO: checking $ac_header usability" >&5
6630echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
6631cat >conftest.$ac_ext <<_ACEOF
6632/* confdefs.h. */
6633_ACEOF
6634cat confdefs.h >>conftest.$ac_ext
6635cat >>conftest.$ac_ext <<_ACEOF
6636/* end confdefs.h. */
6637$ac_includes_default
6638#include <$ac_header>
6639_ACEOF
6640rm -f conftest.$ac_objext
6641if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6642 (eval $ac_compile) 2>conftest.er1
6643 ac_status=$?
6644 grep -v '^ *+' conftest.er1 >conftest.err
6645 rm -f conftest.er1
6646 cat conftest.err >&5
6647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6648 (exit $ac_status); } &&
b4e70030
JB
6649 { ac_try='test -z "$ac_c_werror_flag"
6650 || test ! -s conftest.err'
bec39cab
AC
6651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6652 (eval $ac_try) 2>&5
6653 ac_status=$?
6654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6655 (exit $ac_status); }; } &&
6656 { ac_try='test -s conftest.$ac_objext'
6657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6658 (eval $ac_try) 2>&5
6659 ac_status=$?
6660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6661 (exit $ac_status); }; }; then
6662 ac_header_compiler=yes
6663else
6664 echo "$as_me: failed program was:" >&5
6665sed 's/^/| /' conftest.$ac_ext >&5
6666
b4e70030 6667ac_header_compiler=no
bec39cab
AC
6668fi
6669rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
6670echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6671echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
6672
6673# Is the header present?
b4e70030
JB
6674echo "$as_me:$LINENO: checking $ac_header presence" >&5
6675echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
6676cat >conftest.$ac_ext <<_ACEOF
6677/* confdefs.h. */
6678_ACEOF
6679cat confdefs.h >>conftest.$ac_ext
6680cat >>conftest.$ac_ext <<_ACEOF
6681/* end confdefs.h. */
6682#include <$ac_header>
6683_ACEOF
6684if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6685 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6686 ac_status=$?
6687 grep -v '^ *+' conftest.er1 >conftest.err
6688 rm -f conftest.er1
6689 cat conftest.err >&5
6690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6691 (exit $ac_status); } >/dev/null; then
6692 if test -s conftest.err; then
6693 ac_cpp_err=$ac_c_preproc_warn_flag
6694 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6695 else
6696 ac_cpp_err=
6697 fi
9a156167 6698else
bec39cab 6699 ac_cpp_err=yes
9a156167 6700fi
bec39cab
AC
6701if test -z "$ac_cpp_err"; then
6702 ac_header_preproc=yes
6703else
6704 echo "$as_me: failed program was:" >&5
6705sed 's/^/| /' conftest.$ac_ext >&5
9a156167 6706
bec39cab 6707 ac_header_preproc=no
9a156167 6708fi
bec39cab 6709rm -f conftest.err conftest.$ac_ext
b4e70030
JB
6710echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6711echo "${ECHO_T}$ac_header_preproc" >&6
9a156167 6712
bec39cab
AC
6713# So? What about this header?
6714case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6715 yes:no: )
6716 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6717echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6718 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6719echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6720 ac_header_preproc=yes
6721 ;;
6722 no:yes:* )
6723 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6724echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6725 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6726echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6727 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6728echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6729 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6730echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6731 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6732echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6733 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6734echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
6735 (
6736 cat <<\_ASBOX
6737## ------------------------------------------ ##
6738## Report this to the AC_PACKAGE_NAME lists. ##
6739## ------------------------------------------ ##
6740_ASBOX
6741 ) |
6742 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
6743 ;;
6744esac
b4e70030
JB
6745echo "$as_me:$LINENO: checking for $ac_header" >&5
6746echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6747if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 6748 echo $ECHO_N "(cached) $ECHO_C" >&6
9a156167 6749else
bec39cab 6750 eval "$as_ac_Header=\$ac_header_preproc"
9a156167 6751fi
b4e70030
JB
6752echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6753echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9a156167 6754
bec39cab
AC
6755fi
6756if test `eval echo '${'$as_ac_Header'}'` = yes; then
6757 cat >>confdefs.h <<_ACEOF
6758#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6759_ACEOF
9a156167 6760
bec39cab 6761fi
9a156167 6762
bec39cab 6763done
9a156167 6764
9a156167 6765
9a156167 6766
bec39cab
AC
6767
6768for ac_header in proc_service.h thread_db.h gnu/libc-version.h
6769do
6770as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
6771if eval "test \"\${$as_ac_Header+set}\" = set"; then
6772 echo "$as_me:$LINENO: checking for $ac_header" >&5
6773echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6774if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
6775 echo $ECHO_N "(cached) $ECHO_C" >&6
6776fi
b4e70030
JB
6777echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6778echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
6779else
6780 # Is the header compilable?
b4e70030
JB
6781echo "$as_me:$LINENO: checking $ac_header usability" >&5
6782echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
6783cat >conftest.$ac_ext <<_ACEOF
6784/* confdefs.h. */
6785_ACEOF
6786cat confdefs.h >>conftest.$ac_ext
6787cat >>conftest.$ac_ext <<_ACEOF
6788/* end confdefs.h. */
6789$ac_includes_default
6790#include <$ac_header>
6791_ACEOF
6792rm -f conftest.$ac_objext
6793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6794 (eval $ac_compile) 2>conftest.er1
6795 ac_status=$?
6796 grep -v '^ *+' conftest.er1 >conftest.err
6797 rm -f conftest.er1
6798 cat conftest.err >&5
6799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6800 (exit $ac_status); } &&
b4e70030
JB
6801 { ac_try='test -z "$ac_c_werror_flag"
6802 || test ! -s conftest.err'
bec39cab
AC
6803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6804 (eval $ac_try) 2>&5
6805 ac_status=$?
6806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6807 (exit $ac_status); }; } &&
6808 { ac_try='test -s conftest.$ac_objext'
6809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6810 (eval $ac_try) 2>&5
6811 ac_status=$?
6812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6813 (exit $ac_status); }; }; then
6814 ac_header_compiler=yes
6815else
6816 echo "$as_me: failed program was:" >&5
6817sed 's/^/| /' conftest.$ac_ext >&5
6818
b4e70030 6819ac_header_compiler=no
bec39cab
AC
6820fi
6821rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
6822echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6823echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
6824
6825# Is the header present?
b4e70030
JB
6826echo "$as_me:$LINENO: checking $ac_header presence" >&5
6827echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
6828cat >conftest.$ac_ext <<_ACEOF
6829/* confdefs.h. */
6830_ACEOF
6831cat confdefs.h >>conftest.$ac_ext
6832cat >>conftest.$ac_ext <<_ACEOF
6833/* end confdefs.h. */
6834#include <$ac_header>
6835_ACEOF
6836if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6837 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6838 ac_status=$?
6839 grep -v '^ *+' conftest.er1 >conftest.err
6840 rm -f conftest.er1
6841 cat conftest.err >&5
6842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6843 (exit $ac_status); } >/dev/null; then
6844 if test -s conftest.err; then
6845 ac_cpp_err=$ac_c_preproc_warn_flag
6846 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6847 else
6848 ac_cpp_err=
6849 fi
9a156167 6850else
bec39cab 6851 ac_cpp_err=yes
9a156167 6852fi
bec39cab
AC
6853if test -z "$ac_cpp_err"; then
6854 ac_header_preproc=yes
6855else
6856 echo "$as_me: failed program was:" >&5
6857sed 's/^/| /' conftest.$ac_ext >&5
9a156167 6858
bec39cab 6859 ac_header_preproc=no
9a156167 6860fi
bec39cab 6861rm -f conftest.err conftest.$ac_ext
b4e70030
JB
6862echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6863echo "${ECHO_T}$ac_header_preproc" >&6
9a156167 6864
bec39cab
AC
6865# So? What about this header?
6866case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6867 yes:no: )
6868 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6869echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6870 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6871echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6872 ac_header_preproc=yes
6873 ;;
6874 no:yes:* )
6875 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6876echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6877 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6878echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6879 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6880echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6881 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6882echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6883 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6884echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6885 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6886echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
6887 (
6888 cat <<\_ASBOX
6889## ------------------------------------------ ##
6890## Report this to the AC_PACKAGE_NAME lists. ##
6891## ------------------------------------------ ##
6892_ASBOX
6893 ) |
6894 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
6895 ;;
6896esac
b4e70030
JB
6897echo "$as_me:$LINENO: checking for $ac_header" >&5
6898echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6899if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 6900 echo $ECHO_N "(cached) $ECHO_C" >&6
9a156167 6901else
bec39cab 6902 eval "$as_ac_Header=\$ac_header_preproc"
9a156167 6903fi
b4e70030
JB
6904echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6905echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9a156167
MK
6906
6907fi
bec39cab
AC
6908if test `eval echo '${'$as_ac_Header'}'` = yes; then
6909 cat >>confdefs.h <<_ACEOF
6910#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6911_ACEOF
9a156167 6912
bec39cab
AC
6913fi
6914
6915done
9a156167 6916
c890192f 6917
bec39cab
AC
6918for ac_header in stddef.h
6919do
6920as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
6921if eval "test \"\${$as_ac_Header+set}\" = set"; then
6922 echo "$as_me:$LINENO: checking for $ac_header" >&5
6923echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6924if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
6925 echo $ECHO_N "(cached) $ECHO_C" >&6
6926fi
b4e70030
JB
6927echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6928echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
6929else
6930 # Is the header compilable?
b4e70030
JB
6931echo "$as_me:$LINENO: checking $ac_header usability" >&5
6932echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
6933cat >conftest.$ac_ext <<_ACEOF
6934/* confdefs.h. */
6935_ACEOF
6936cat confdefs.h >>conftest.$ac_ext
6937cat >>conftest.$ac_ext <<_ACEOF
6938/* end confdefs.h. */
6939$ac_includes_default
6940#include <$ac_header>
6941_ACEOF
6942rm -f conftest.$ac_objext
6943if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6944 (eval $ac_compile) 2>conftest.er1
6945 ac_status=$?
6946 grep -v '^ *+' conftest.er1 >conftest.err
6947 rm -f conftest.er1
6948 cat conftest.err >&5
6949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6950 (exit $ac_status); } &&
b4e70030
JB
6951 { ac_try='test -z "$ac_c_werror_flag"
6952 || test ! -s conftest.err'
bec39cab
AC
6953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6954 (eval $ac_try) 2>&5
6955 ac_status=$?
6956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6957 (exit $ac_status); }; } &&
6958 { ac_try='test -s conftest.$ac_objext'
6959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6960 (eval $ac_try) 2>&5
6961 ac_status=$?
6962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6963 (exit $ac_status); }; }; then
6964 ac_header_compiler=yes
6965else
6966 echo "$as_me: failed program was:" >&5
6967sed 's/^/| /' conftest.$ac_ext >&5
6968
b4e70030 6969ac_header_compiler=no
bec39cab
AC
6970fi
6971rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
6972echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6973echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
6974
6975# Is the header present?
b4e70030
JB
6976echo "$as_me:$LINENO: checking $ac_header presence" >&5
6977echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
6978cat >conftest.$ac_ext <<_ACEOF
6979/* confdefs.h. */
6980_ACEOF
6981cat confdefs.h >>conftest.$ac_ext
6982cat >>conftest.$ac_ext <<_ACEOF
6983/* end confdefs.h. */
6984#include <$ac_header>
6985_ACEOF
6986if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6987 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6988 ac_status=$?
6989 grep -v '^ *+' conftest.er1 >conftest.err
6990 rm -f conftest.er1
6991 cat conftest.err >&5
6992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6993 (exit $ac_status); } >/dev/null; then
6994 if test -s conftest.err; then
6995 ac_cpp_err=$ac_c_preproc_warn_flag
6996 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6997 else
6998 ac_cpp_err=
6999 fi
c890192f 7000else
bec39cab
AC
7001 ac_cpp_err=yes
7002fi
7003if test -z "$ac_cpp_err"; then
7004 ac_header_preproc=yes
c890192f 7005else
bec39cab
AC
7006 echo "$as_me: failed program was:" >&5
7007sed 's/^/| /' conftest.$ac_ext >&5
7008
7009 ac_header_preproc=no
c890192f 7010fi
bec39cab 7011rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7012echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7013echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
7014
7015# So? What about this header?
7016case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7017 yes:no: )
7018 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7019echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7020 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7021echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7022 ac_header_preproc=yes
7023 ;;
7024 no:yes:* )
7025 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7026echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7027 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7028echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7029 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7030echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7031 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7032echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7033 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7034echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7035 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7036echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
7037 (
7038 cat <<\_ASBOX
7039## ------------------------------------------ ##
7040## Report this to the AC_PACKAGE_NAME lists. ##
7041## ------------------------------------------ ##
7042_ASBOX
7043 ) |
7044 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
7045 ;;
7046esac
b4e70030
JB
7047echo "$as_me:$LINENO: checking for $ac_header" >&5
7048echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7049if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 7050 echo $ECHO_N "(cached) $ECHO_C" >&6
c890192f 7051else
bec39cab 7052 eval "$as_ac_Header=\$ac_header_preproc"
c890192f 7053fi
b4e70030
JB
7054echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7055echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 7056
c890192f 7057fi
bec39cab
AC
7058if test `eval echo '${'$as_ac_Header'}'` = yes; then
7059 cat >>confdefs.h <<_ACEOF
7060#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7061_ACEOF
c890192f 7062
c890192f
MK
7063fi
7064
bec39cab 7065done
9a156167 7066
bec39cab
AC
7067
7068for ac_header in stdlib.h
7069do
7070as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7071if eval "test \"\${$as_ac_Header+set}\" = set"; then
7072 echo "$as_me:$LINENO: checking for $ac_header" >&5
7073echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7074if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7075 echo $ECHO_N "(cached) $ECHO_C" >&6
7076fi
b4e70030
JB
7077echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7078echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7079else
7080 # Is the header compilable?
b4e70030
JB
7081echo "$as_me:$LINENO: checking $ac_header usability" >&5
7082echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7083cat >conftest.$ac_ext <<_ACEOF
7084/* confdefs.h. */
7085_ACEOF
7086cat confdefs.h >>conftest.$ac_ext
7087cat >>conftest.$ac_ext <<_ACEOF
7088/* end confdefs.h. */
7089$ac_includes_default
7090#include <$ac_header>
7091_ACEOF
7092rm -f conftest.$ac_objext
7093if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7094 (eval $ac_compile) 2>conftest.er1
7095 ac_status=$?
7096 grep -v '^ *+' conftest.er1 >conftest.err
7097 rm -f conftest.er1
7098 cat conftest.err >&5
7099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7100 (exit $ac_status); } &&
b4e70030
JB
7101 { ac_try='test -z "$ac_c_werror_flag"
7102 || test ! -s conftest.err'
bec39cab
AC
7103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7104 (eval $ac_try) 2>&5
7105 ac_status=$?
7106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7107 (exit $ac_status); }; } &&
7108 { ac_try='test -s conftest.$ac_objext'
7109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7110 (eval $ac_try) 2>&5
7111 ac_status=$?
7112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7113 (exit $ac_status); }; }; then
7114 ac_header_compiler=yes
7115else
7116 echo "$as_me: failed program was:" >&5
7117sed 's/^/| /' conftest.$ac_ext >&5
7118
b4e70030 7119ac_header_compiler=no
bec39cab
AC
7120fi
7121rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
7122echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7123echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
7124
7125# Is the header present?
b4e70030
JB
7126echo "$as_me:$LINENO: checking $ac_header presence" >&5
7127echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
7128cat >conftest.$ac_ext <<_ACEOF
7129/* confdefs.h. */
7130_ACEOF
7131cat confdefs.h >>conftest.$ac_ext
7132cat >>conftest.$ac_ext <<_ACEOF
7133/* end confdefs.h. */
7134#include <$ac_header>
7135_ACEOF
7136if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7137 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7138 ac_status=$?
7139 grep -v '^ *+' conftest.er1 >conftest.err
7140 rm -f conftest.er1
7141 cat conftest.err >&5
7142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7143 (exit $ac_status); } >/dev/null; then
7144 if test -s conftest.err; then
7145 ac_cpp_err=$ac_c_preproc_warn_flag
7146 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7147 else
7148 ac_cpp_err=
7149 fi
9a156167 7150else
bec39cab
AC
7151 ac_cpp_err=yes
7152fi
7153if test -z "$ac_cpp_err"; then
7154 ac_header_preproc=yes
9a156167 7155else
bec39cab
AC
7156 echo "$as_me: failed program was:" >&5
7157sed 's/^/| /' conftest.$ac_ext >&5
7158
7159 ac_header_preproc=no
9a156167 7160fi
bec39cab 7161rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7162echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7163echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
7164
7165# So? What about this header?
7166case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7167 yes:no: )
7168 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7169echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7170 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7171echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7172 ac_header_preproc=yes
7173 ;;
7174 no:yes:* )
7175 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7176echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7177 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7178echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7179 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7180echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7181 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7182echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7183 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7184echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7185 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7186echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
7187 (
7188 cat <<\_ASBOX
7189## ------------------------------------------ ##
7190## Report this to the AC_PACKAGE_NAME lists. ##
7191## ------------------------------------------ ##
7192_ASBOX
7193 ) |
7194 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
7195 ;;
7196esac
b4e70030
JB
7197echo "$as_me:$LINENO: checking for $ac_header" >&5
7198echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7199if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 7200 echo $ECHO_N "(cached) $ECHO_C" >&6
9a156167 7201else
bec39cab 7202 eval "$as_ac_Header=\$ac_header_preproc"
9a156167 7203fi
b4e70030
JB
7204echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7205echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 7206
9a156167 7207fi
bec39cab
AC
7208if test `eval echo '${'$as_ac_Header'}'` = yes; then
7209 cat >>confdefs.h <<_ACEOF
7210#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7211_ACEOF
9a156167 7212
9a156167
MK
7213fi
7214
bec39cab
AC
7215done
7216
06825bd1 7217
bec39cab
AC
7218for ac_header in stdint.h
7219do
7220as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7221if eval "test \"\${$as_ac_Header+set}\" = set"; then
7222 echo "$as_me:$LINENO: checking for $ac_header" >&5
7223echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7224if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7225 echo $ECHO_N "(cached) $ECHO_C" >&6
7226fi
b4e70030
JB
7227echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7228echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7229else
7230 # Is the header compilable?
b4e70030
JB
7231echo "$as_me:$LINENO: checking $ac_header usability" >&5
7232echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7233cat >conftest.$ac_ext <<_ACEOF
7234/* confdefs.h. */
7235_ACEOF
7236cat confdefs.h >>conftest.$ac_ext
7237cat >>conftest.$ac_ext <<_ACEOF
7238/* end confdefs.h. */
7239$ac_includes_default
7240#include <$ac_header>
7241_ACEOF
7242rm -f conftest.$ac_objext
7243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7244 (eval $ac_compile) 2>conftest.er1
7245 ac_status=$?
7246 grep -v '^ *+' conftest.er1 >conftest.err
7247 rm -f conftest.er1
7248 cat conftest.err >&5
7249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250 (exit $ac_status); } &&
b4e70030
JB
7251 { ac_try='test -z "$ac_c_werror_flag"
7252 || test ! -s conftest.err'
bec39cab
AC
7253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7254 (eval $ac_try) 2>&5
7255 ac_status=$?
7256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7257 (exit $ac_status); }; } &&
7258 { ac_try='test -s conftest.$ac_objext'
7259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7260 (eval $ac_try) 2>&5
7261 ac_status=$?
7262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7263 (exit $ac_status); }; }; then
7264 ac_header_compiler=yes
7265else
7266 echo "$as_me: failed program was:" >&5
7267sed 's/^/| /' conftest.$ac_ext >&5
7268
b4e70030 7269ac_header_compiler=no
bec39cab
AC
7270fi
7271rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
7272echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7273echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
7274
7275# Is the header present?
b4e70030
JB
7276echo "$as_me:$LINENO: checking $ac_header presence" >&5
7277echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
7278cat >conftest.$ac_ext <<_ACEOF
7279/* confdefs.h. */
7280_ACEOF
7281cat confdefs.h >>conftest.$ac_ext
7282cat >>conftest.$ac_ext <<_ACEOF
7283/* end confdefs.h. */
7284#include <$ac_header>
7285_ACEOF
7286if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7287 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7288 ac_status=$?
7289 grep -v '^ *+' conftest.er1 >conftest.err
7290 rm -f conftest.er1
7291 cat conftest.err >&5
7292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7293 (exit $ac_status); } >/dev/null; then
7294 if test -s conftest.err; then
7295 ac_cpp_err=$ac_c_preproc_warn_flag
7296 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7297 else
7298 ac_cpp_err=
7299 fi
06825bd1 7300else
bec39cab
AC
7301 ac_cpp_err=yes
7302fi
7303if test -z "$ac_cpp_err"; then
7304 ac_header_preproc=yes
06825bd1 7305else
bec39cab
AC
7306 echo "$as_me: failed program was:" >&5
7307sed 's/^/| /' conftest.$ac_ext >&5
7308
7309 ac_header_preproc=no
06825bd1 7310fi
bec39cab 7311rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7312echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7313echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
7314
7315# So? What about this header?
7316case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7317 yes:no: )
7318 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7319echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7320 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7321echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7322 ac_header_preproc=yes
7323 ;;
7324 no:yes:* )
7325 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7326echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7327 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7328echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7329 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7330echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7331 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7332echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7333 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7334echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7335 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7336echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
7337 (
7338 cat <<\_ASBOX
7339## ------------------------------------------ ##
7340## Report this to the AC_PACKAGE_NAME lists. ##
7341## ------------------------------------------ ##
7342_ASBOX
7343 ) |
7344 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
7345 ;;
7346esac
b4e70030
JB
7347echo "$as_me:$LINENO: checking for $ac_header" >&5
7348echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7349if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 7350 echo $ECHO_N "(cached) $ECHO_C" >&6
06825bd1 7351else
bec39cab 7352 eval "$as_ac_Header=\$ac_header_preproc"
06825bd1 7353fi
b4e70030
JB
7354echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7355echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 7356
06825bd1 7357fi
bec39cab
AC
7358if test `eval echo '${'$as_ac_Header'}'` = yes; then
7359 cat >>confdefs.h <<_ACEOF
7360#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7361_ACEOF
06825bd1 7362
06825bd1 7363fi
4f0be353 7364
bec39cab 7365done
4f0be353 7366
06825bd1 7367
06825bd1 7368
bec39cab
AC
7369
7370for ac_header in string.h memory.h strings.h
7371do
7372as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7373if eval "test \"\${$as_ac_Header+set}\" = set"; then
7374 echo "$as_me:$LINENO: checking for $ac_header" >&5
7375echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7376if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7377 echo $ECHO_N "(cached) $ECHO_C" >&6
7378fi
b4e70030
JB
7379echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7380echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7381else
7382 # Is the header compilable?
b4e70030
JB
7383echo "$as_me:$LINENO: checking $ac_header usability" >&5
7384echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7385cat >conftest.$ac_ext <<_ACEOF
7386/* confdefs.h. */
7387_ACEOF
7388cat confdefs.h >>conftest.$ac_ext
7389cat >>conftest.$ac_ext <<_ACEOF
7390/* end confdefs.h. */
7391$ac_includes_default
7392#include <$ac_header>
7393_ACEOF
7394rm -f conftest.$ac_objext
7395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7396 (eval $ac_compile) 2>conftest.er1
7397 ac_status=$?
7398 grep -v '^ *+' conftest.er1 >conftest.err
7399 rm -f conftest.er1
7400 cat conftest.err >&5
7401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7402 (exit $ac_status); } &&
b4e70030
JB
7403 { ac_try='test -z "$ac_c_werror_flag"
7404 || test ! -s conftest.err'
bec39cab
AC
7405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7406 (eval $ac_try) 2>&5
7407 ac_status=$?
7408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7409 (exit $ac_status); }; } &&
7410 { ac_try='test -s conftest.$ac_objext'
7411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7412 (eval $ac_try) 2>&5
7413 ac_status=$?
7414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7415 (exit $ac_status); }; }; then
7416 ac_header_compiler=yes
7417else
7418 echo "$as_me: failed program was:" >&5
7419sed 's/^/| /' conftest.$ac_ext >&5
7420
b4e70030 7421ac_header_compiler=no
bec39cab
AC
7422fi
7423rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
7424echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7425echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
7426
7427# Is the header present?
b4e70030
JB
7428echo "$as_me:$LINENO: checking $ac_header presence" >&5
7429echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
7430cat >conftest.$ac_ext <<_ACEOF
7431/* confdefs.h. */
7432_ACEOF
7433cat confdefs.h >>conftest.$ac_ext
7434cat >>conftest.$ac_ext <<_ACEOF
7435/* end confdefs.h. */
7436#include <$ac_header>
7437_ACEOF
7438if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7439 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7440 ac_status=$?
7441 grep -v '^ *+' conftest.er1 >conftest.err
7442 rm -f conftest.er1
7443 cat conftest.err >&5
7444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445 (exit $ac_status); } >/dev/null; then
7446 if test -s conftest.err; then
7447 ac_cpp_err=$ac_c_preproc_warn_flag
7448 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7449 else
7450 ac_cpp_err=
7451 fi
06825bd1 7452else
bec39cab
AC
7453 ac_cpp_err=yes
7454fi
7455if test -z "$ac_cpp_err"; then
7456 ac_header_preproc=yes
06825bd1 7457else
bec39cab
AC
7458 echo "$as_me: failed program was:" >&5
7459sed 's/^/| /' conftest.$ac_ext >&5
7460
7461 ac_header_preproc=no
06825bd1 7462fi
bec39cab 7463rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7464echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7465echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
7466
7467# So? What about this header?
7468case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7469 yes:no: )
7470 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7471echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7472 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7473echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7474 ac_header_preproc=yes
7475 ;;
7476 no:yes:* )
7477 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7478echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7479 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7480echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7481 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7482echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7483 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7484echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7485 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7486echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7487 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7488echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
7489 (
7490 cat <<\_ASBOX
7491## ------------------------------------------ ##
7492## Report this to the AC_PACKAGE_NAME lists. ##
7493## ------------------------------------------ ##
7494_ASBOX
7495 ) |
7496 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
7497 ;;
7498esac
b4e70030
JB
7499echo "$as_me:$LINENO: checking for $ac_header" >&5
7500echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7501if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7502 echo $ECHO_N "(cached) $ECHO_C" >&6
7503else
7504 eval "$as_ac_Header=\$ac_header_preproc"
06825bd1 7505fi
b4e70030
JB
7506echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7507echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
06825bd1 7508
06825bd1 7509fi
bec39cab
AC
7510if test `eval echo '${'$as_ac_Header'}'` = yes; then
7511 cat >>confdefs.h <<_ACEOF
7512#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7513_ACEOF
06825bd1 7514
06825bd1
MK
7515fi
7516
bec39cab 7517done
5ee754fc 7518
bec39cab
AC
7519
7520for ac_header in sys/fault.h
5ee754fc 7521do
bec39cab 7522as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7523if eval "test \"\${$as_ac_Header+set}\" = set"; then
7524 echo "$as_me:$LINENO: checking for $ac_header" >&5
7525echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7526if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7527 echo $ECHO_N "(cached) $ECHO_C" >&6
7528fi
b4e70030
JB
7529echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7530echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7531else
7532 # Is the header compilable?
b4e70030
JB
7533echo "$as_me:$LINENO: checking $ac_header usability" >&5
7534echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7535cat >conftest.$ac_ext <<_ACEOF
7536/* confdefs.h. */
7537_ACEOF
7538cat confdefs.h >>conftest.$ac_ext
7539cat >>conftest.$ac_ext <<_ACEOF
7540/* end confdefs.h. */
7541$ac_includes_default
7542#include <$ac_header>
7543_ACEOF
7544rm -f conftest.$ac_objext
7545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7546 (eval $ac_compile) 2>conftest.er1
7547 ac_status=$?
7548 grep -v '^ *+' conftest.er1 >conftest.err
7549 rm -f conftest.er1
7550 cat conftest.err >&5
7551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7552 (exit $ac_status); } &&
b4e70030
JB
7553 { ac_try='test -z "$ac_c_werror_flag"
7554 || test ! -s conftest.err'
bec39cab
AC
7555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7556 (eval $ac_try) 2>&5
7557 ac_status=$?
7558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7559 (exit $ac_status); }; } &&
7560 { ac_try='test -s conftest.$ac_objext'
7561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7562 (eval $ac_try) 2>&5
7563 ac_status=$?
7564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7565 (exit $ac_status); }; }; then
7566 ac_header_compiler=yes
7567else
7568 echo "$as_me: failed program was:" >&5
7569sed 's/^/| /' conftest.$ac_ext >&5
7570
b4e70030 7571ac_header_compiler=no
bec39cab
AC
7572fi
7573rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
7574echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7575echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
7576
7577# Is the header present?
b4e70030
JB
7578echo "$as_me:$LINENO: checking $ac_header presence" >&5
7579echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
7580cat >conftest.$ac_ext <<_ACEOF
7581/* confdefs.h. */
7582_ACEOF
7583cat confdefs.h >>conftest.$ac_ext
7584cat >>conftest.$ac_ext <<_ACEOF
7585/* end confdefs.h. */
7586#include <$ac_header>
7587_ACEOF
7588if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7589 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7590 ac_status=$?
7591 grep -v '^ *+' conftest.er1 >conftest.err
7592 rm -f conftest.er1
7593 cat conftest.err >&5
7594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7595 (exit $ac_status); } >/dev/null; then
7596 if test -s conftest.err; then
7597 ac_cpp_err=$ac_c_preproc_warn_flag
7598 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7599 else
7600 ac_cpp_err=
7601 fi
5ee754fc 7602else
bec39cab 7603 ac_cpp_err=yes
5ee754fc 7604fi
bec39cab
AC
7605if test -z "$ac_cpp_err"; then
7606 ac_header_preproc=yes
7607else
7608 echo "$as_me: failed program was:" >&5
7609sed 's/^/| /' conftest.$ac_ext >&5
5ee754fc 7610
bec39cab 7611 ac_header_preproc=no
5ee754fc 7612fi
bec39cab 7613rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7614echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7615echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
7616
7617# So? What about this header?
7618case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7619 yes:no: )
7620 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7621echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7622 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7623echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7624 ac_header_preproc=yes
7625 ;;
7626 no:yes:* )
7627 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7628echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7629 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7630echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7631 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7632echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7633 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7634echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7635 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7636echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7637 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7638echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
7639 (
7640 cat <<\_ASBOX
7641## ------------------------------------------ ##
7642## Report this to the AC_PACKAGE_NAME lists. ##
7643## ------------------------------------------ ##
7644_ASBOX
7645 ) |
7646 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
7647 ;;
7648esac
b4e70030
JB
7649echo "$as_me:$LINENO: checking for $ac_header" >&5
7650echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7651if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 7652 echo $ECHO_N "(cached) $ECHO_C" >&6
5ee754fc 7653else
bec39cab 7654 eval "$as_ac_Header=\$ac_header_preproc"
c906108c 7655fi
b4e70030
JB
7656echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7657echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c906108c 7658
5ee754fc 7659fi
bec39cab
AC
7660if test `eval echo '${'$as_ac_Header'}'` = yes; then
7661 cat >>confdefs.h <<_ACEOF
7662#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7663_ACEOF
c906108c 7664
5ee754fc 7665fi
bec39cab
AC
7666
7667done
7668
7669
7670for ac_header in sys/file.h
7671do
7672as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7673if eval "test \"\${$as_ac_Header+set}\" = set"; then
7674 echo "$as_me:$LINENO: checking for $ac_header" >&5
7675echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7676if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7677 echo $ECHO_N "(cached) $ECHO_C" >&6
7678fi
b4e70030
JB
7679echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7680echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7681else
7682 # Is the header compilable?
b4e70030
JB
7683echo "$as_me:$LINENO: checking $ac_header usability" >&5
7684echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7685cat >conftest.$ac_ext <<_ACEOF
7686/* confdefs.h. */
7687_ACEOF
7688cat confdefs.h >>conftest.$ac_ext
7689cat >>conftest.$ac_ext <<_ACEOF
7690/* end confdefs.h. */
7691$ac_includes_default
7692#include <$ac_header>
7693_ACEOF
7694rm -f conftest.$ac_objext
7695if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7696 (eval $ac_compile) 2>conftest.er1
7697 ac_status=$?
7698 grep -v '^ *+' conftest.er1 >conftest.err
7699 rm -f conftest.er1
7700 cat conftest.err >&5
7701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7702 (exit $ac_status); } &&
b4e70030
JB
7703 { ac_try='test -z "$ac_c_werror_flag"
7704 || test ! -s conftest.err'
bec39cab
AC
7705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7706 (eval $ac_try) 2>&5
7707 ac_status=$?
7708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7709 (exit $ac_status); }; } &&
7710 { ac_try='test -s conftest.$ac_objext'
7711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7712 (eval $ac_try) 2>&5
7713 ac_status=$?
7714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7715 (exit $ac_status); }; }; then
7716 ac_header_compiler=yes
7717else
7718 echo "$as_me: failed program was:" >&5
7719sed 's/^/| /' conftest.$ac_ext >&5
7720
b4e70030 7721ac_header_compiler=no
bec39cab
AC
7722fi
7723rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
7724echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7725echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
7726
7727# Is the header present?
b4e70030
JB
7728echo "$as_me:$LINENO: checking $ac_header presence" >&5
7729echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
7730cat >conftest.$ac_ext <<_ACEOF
7731/* confdefs.h. */
7732_ACEOF
7733cat confdefs.h >>conftest.$ac_ext
7734cat >>conftest.$ac_ext <<_ACEOF
7735/* end confdefs.h. */
7736#include <$ac_header>
7737_ACEOF
7738if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7739 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7740 ac_status=$?
7741 grep -v '^ *+' conftest.er1 >conftest.err
7742 rm -f conftest.er1
7743 cat conftest.err >&5
7744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7745 (exit $ac_status); } >/dev/null; then
7746 if test -s conftest.err; then
7747 ac_cpp_err=$ac_c_preproc_warn_flag
7748 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7749 else
7750 ac_cpp_err=
7751 fi
5ee754fc 7752else
bec39cab 7753 ac_cpp_err=yes
5ee754fc 7754fi
bec39cab
AC
7755if test -z "$ac_cpp_err"; then
7756 ac_header_preproc=yes
7757else
7758 echo "$as_me: failed program was:" >&5
7759sed 's/^/| /' conftest.$ac_ext >&5
c906108c 7760
bec39cab 7761 ac_header_preproc=no
5ee754fc 7762fi
bec39cab 7763rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7764echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7765echo "${ECHO_T}$ac_header_preproc" >&6
c906108c 7766
bec39cab
AC
7767# So? What about this header?
7768case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7769 yes:no: )
7770 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7771echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7772 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7773echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7774 ac_header_preproc=yes
7775 ;;
7776 no:yes:* )
7777 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7778echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7779 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7780echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7781 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7782echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7783 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7784echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7785 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7786echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7787 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7788echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
7789 (
7790 cat <<\_ASBOX
7791## ------------------------------------------ ##
7792## Report this to the AC_PACKAGE_NAME lists. ##
7793## ------------------------------------------ ##
7794_ASBOX
7795 ) |
7796 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
7797 ;;
7798esac
b4e70030
JB
7799echo "$as_me:$LINENO: checking for $ac_header" >&5
7800echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7801if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 7802 echo $ECHO_N "(cached) $ECHO_C" >&6
9608ab8b 7803else
bec39cab
AC
7804 eval "$as_ac_Header=\$ac_header_preproc"
7805fi
b4e70030
JB
7806echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7807echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5ee754fc 7808
bec39cab
AC
7809fi
7810if test `eval echo '${'$as_ac_Header'}'` = yes; then
7811 cat >>confdefs.h <<_ACEOF
7812#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7813_ACEOF
5ee754fc 7814
bec39cab 7815fi
5ee754fc 7816
bec39cab 7817done
5ee754fc 7818
5ee754fc 7819
bec39cab
AC
7820for ac_header in sys/filio.h
7821do
7822as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7823if eval "test \"\${$as_ac_Header+set}\" = set"; then
7824 echo "$as_me:$LINENO: checking for $ac_header" >&5
7825echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7826if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7827 echo $ECHO_N "(cached) $ECHO_C" >&6
7828fi
b4e70030
JB
7829echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7830echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7831else
7832 # Is the header compilable?
b4e70030
JB
7833echo "$as_me:$LINENO: checking $ac_header usability" >&5
7834echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7835cat >conftest.$ac_ext <<_ACEOF
7836/* confdefs.h. */
7837_ACEOF
7838cat confdefs.h >>conftest.$ac_ext
7839cat >>conftest.$ac_ext <<_ACEOF
7840/* end confdefs.h. */
7841$ac_includes_default
7842#include <$ac_header>
7843_ACEOF
7844rm -f conftest.$ac_objext
7845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7846 (eval $ac_compile) 2>conftest.er1
7847 ac_status=$?
7848 grep -v '^ *+' conftest.er1 >conftest.err
7849 rm -f conftest.er1
7850 cat conftest.err >&5
7851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7852 (exit $ac_status); } &&
b4e70030
JB
7853 { ac_try='test -z "$ac_c_werror_flag"
7854 || test ! -s conftest.err'
bec39cab
AC
7855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7856 (eval $ac_try) 2>&5
7857 ac_status=$?
7858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7859 (exit $ac_status); }; } &&
7860 { ac_try='test -s conftest.$ac_objext'
7861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7862 (eval $ac_try) 2>&5
7863 ac_status=$?
7864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7865 (exit $ac_status); }; }; then
7866 ac_header_compiler=yes
7867else
7868 echo "$as_me: failed program was:" >&5
7869sed 's/^/| /' conftest.$ac_ext >&5
7870
b4e70030 7871ac_header_compiler=no
bec39cab
AC
7872fi
7873rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
7874echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7875echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
7876
7877# Is the header present?
b4e70030
JB
7878echo "$as_me:$LINENO: checking $ac_header presence" >&5
7879echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
7880cat >conftest.$ac_ext <<_ACEOF
7881/* confdefs.h. */
7882_ACEOF
7883cat confdefs.h >>conftest.$ac_ext
7884cat >>conftest.$ac_ext <<_ACEOF
7885/* end confdefs.h. */
7886#include <$ac_header>
7887_ACEOF
7888if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7889 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7890 ac_status=$?
7891 grep -v '^ *+' conftest.er1 >conftest.err
7892 rm -f conftest.er1
7893 cat conftest.err >&5
7894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895 (exit $ac_status); } >/dev/null; then
7896 if test -s conftest.err; then
7897 ac_cpp_err=$ac_c_preproc_warn_flag
7898 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7899 else
7900 ac_cpp_err=
7901 fi
5ee754fc 7902else
bec39cab 7903 ac_cpp_err=yes
5ee754fc 7904fi
bec39cab
AC
7905if test -z "$ac_cpp_err"; then
7906 ac_header_preproc=yes
7907else
7908 echo "$as_me: failed program was:" >&5
7909sed 's/^/| /' conftest.$ac_ext >&5
5ee754fc 7910
bec39cab 7911 ac_header_preproc=no
5ee754fc 7912fi
bec39cab 7913rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7914echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7915echo "${ECHO_T}$ac_header_preproc" >&6
5ee754fc 7916
bec39cab
AC
7917# So? What about this header?
7918case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7919 yes:no: )
7920 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7921echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7922 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7923echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7924 ac_header_preproc=yes
7925 ;;
7926 no:yes:* )
7927 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7928echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7929 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7930echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7931 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7932echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7933 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7934echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7935 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7936echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7937 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7938echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
7939 (
7940 cat <<\_ASBOX
7941## ------------------------------------------ ##
7942## Report this to the AC_PACKAGE_NAME lists. ##
7943## ------------------------------------------ ##
7944_ASBOX
7945 ) |
7946 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
7947 ;;
7948esac
b4e70030
JB
7949echo "$as_me:$LINENO: checking for $ac_header" >&5
7950echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7951if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 7952 echo $ECHO_N "(cached) $ECHO_C" >&6
5ee754fc 7953else
bec39cab 7954 eval "$as_ac_Header=\$ac_header_preproc"
5ee754fc 7955fi
b4e70030
JB
7956echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7957echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5ee754fc 7958
5ee754fc 7959fi
bec39cab
AC
7960if test `eval echo '${'$as_ac_Header'}'` = yes; then
7961 cat >>confdefs.h <<_ACEOF
7962#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7963_ACEOF
5ee754fc
MK
7964
7965fi
7966
bec39cab
AC
7967done
7968
7969
7970for ac_header in sys/ioctl.h
7971do
7972as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7973if eval "test \"\${$as_ac_Header+set}\" = set"; then
7974 echo "$as_me:$LINENO: checking for $ac_header" >&5
7975echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7976if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7977 echo $ECHO_N "(cached) $ECHO_C" >&6
7978fi
b4e70030
JB
7979echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7980echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7981else
7982 # Is the header compilable?
b4e70030
JB
7983echo "$as_me:$LINENO: checking $ac_header usability" >&5
7984echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7985cat >conftest.$ac_ext <<_ACEOF
7986/* confdefs.h. */
7987_ACEOF
7988cat confdefs.h >>conftest.$ac_ext
7989cat >>conftest.$ac_ext <<_ACEOF
7990/* end confdefs.h. */
7991$ac_includes_default
7992#include <$ac_header>
7993_ACEOF
7994rm -f conftest.$ac_objext
7995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7996 (eval $ac_compile) 2>conftest.er1
7997 ac_status=$?
7998 grep -v '^ *+' conftest.er1 >conftest.err
7999 rm -f conftest.er1
8000 cat conftest.err >&5
8001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8002 (exit $ac_status); } &&
b4e70030
JB
8003 { ac_try='test -z "$ac_c_werror_flag"
8004 || test ! -s conftest.err'
bec39cab
AC
8005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8006 (eval $ac_try) 2>&5
8007 ac_status=$?
8008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8009 (exit $ac_status); }; } &&
8010 { ac_try='test -s conftest.$ac_objext'
8011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8012 (eval $ac_try) 2>&5
8013 ac_status=$?
8014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8015 (exit $ac_status); }; }; then
8016 ac_header_compiler=yes
8017else
8018 echo "$as_me: failed program was:" >&5
8019sed 's/^/| /' conftest.$ac_ext >&5
8020
b4e70030 8021ac_header_compiler=no
bec39cab
AC
8022fi
8023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8024echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8025echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8026
8027# Is the header present?
b4e70030
JB
8028echo "$as_me:$LINENO: checking $ac_header presence" >&5
8029echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8030cat >conftest.$ac_ext <<_ACEOF
8031/* confdefs.h. */
8032_ACEOF
8033cat confdefs.h >>conftest.$ac_ext
8034cat >>conftest.$ac_ext <<_ACEOF
8035/* end confdefs.h. */
8036#include <$ac_header>
8037_ACEOF
8038if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8039 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8040 ac_status=$?
8041 grep -v '^ *+' conftest.er1 >conftest.err
8042 rm -f conftest.er1
8043 cat conftest.err >&5
8044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8045 (exit $ac_status); } >/dev/null; then
8046 if test -s conftest.err; then
8047 ac_cpp_err=$ac_c_preproc_warn_flag
8048 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8049 else
8050 ac_cpp_err=
8051 fi
5ee754fc 8052else
bec39cab 8053 ac_cpp_err=yes
5ee754fc 8054fi
bec39cab
AC
8055if test -z "$ac_cpp_err"; then
8056 ac_header_preproc=yes
8057else
8058 echo "$as_me: failed program was:" >&5
8059sed 's/^/| /' conftest.$ac_ext >&5
5ee754fc 8060
bec39cab 8061 ac_header_preproc=no
5ee754fc 8062fi
bec39cab 8063rm -f conftest.err conftest.$ac_ext
b4e70030
JB
8064echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8065echo "${ECHO_T}$ac_header_preproc" >&6
5ee754fc 8066
bec39cab
AC
8067# So? What about this header?
8068case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8069 yes:no: )
8070 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8071echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8072 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8073echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8074 ac_header_preproc=yes
8075 ;;
8076 no:yes:* )
8077 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8078echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8079 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8080echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8081 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8082echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8083 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8084echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8085 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8086echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8087 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8088echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8089 (
8090 cat <<\_ASBOX
8091## ------------------------------------------ ##
8092## Report this to the AC_PACKAGE_NAME lists. ##
8093## ------------------------------------------ ##
8094_ASBOX
8095 ) |
8096 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8097 ;;
8098esac
b4e70030
JB
8099echo "$as_me:$LINENO: checking for $ac_header" >&5
8100echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8101if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 8102 echo $ECHO_N "(cached) $ECHO_C" >&6
9608ab8b 8103else
bec39cab 8104 eval "$as_ac_Header=\$ac_header_preproc"
5ee754fc 8105fi
b4e70030
JB
8106echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8107echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5ee754fc
MK
8108
8109fi
bec39cab
AC
8110if test `eval echo '${'$as_ac_Header'}'` = yes; then
8111 cat >>confdefs.h <<_ACEOF
8112#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8113_ACEOF
8114
5ee754fc
MK
8115fi
8116
bec39cab 8117done
5ee754fc 8118
5ee754fc 8119
bec39cab 8120for ac_header in sys/param.h
5ee754fc 8121do
bec39cab 8122as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
8123if eval "test \"\${$as_ac_Header+set}\" = set"; then
8124 echo "$as_me:$LINENO: checking for $ac_header" >&5
8125echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8126if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8127 echo $ECHO_N "(cached) $ECHO_C" >&6
8128fi
b4e70030
JB
8129echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8130echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8131else
8132 # Is the header compilable?
b4e70030
JB
8133echo "$as_me:$LINENO: checking $ac_header usability" >&5
8134echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
8135cat >conftest.$ac_ext <<_ACEOF
8136/* confdefs.h. */
8137_ACEOF
8138cat confdefs.h >>conftest.$ac_ext
8139cat >>conftest.$ac_ext <<_ACEOF
8140/* end confdefs.h. */
8141$ac_includes_default
8142#include <$ac_header>
8143_ACEOF
8144rm -f conftest.$ac_objext
8145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8146 (eval $ac_compile) 2>conftest.er1
8147 ac_status=$?
8148 grep -v '^ *+' conftest.er1 >conftest.err
8149 rm -f conftest.er1
8150 cat conftest.err >&5
8151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8152 (exit $ac_status); } &&
b4e70030
JB
8153 { ac_try='test -z "$ac_c_werror_flag"
8154 || test ! -s conftest.err'
bec39cab
AC
8155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8156 (eval $ac_try) 2>&5
8157 ac_status=$?
8158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8159 (exit $ac_status); }; } &&
8160 { ac_try='test -s conftest.$ac_objext'
8161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8162 (eval $ac_try) 2>&5
8163 ac_status=$?
8164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8165 (exit $ac_status); }; }; then
8166 ac_header_compiler=yes
8167else
8168 echo "$as_me: failed program was:" >&5
8169sed 's/^/| /' conftest.$ac_ext >&5
8170
b4e70030 8171ac_header_compiler=no
bec39cab
AC
8172fi
8173rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8174echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8175echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8176
8177# Is the header present?
b4e70030
JB
8178echo "$as_me:$LINENO: checking $ac_header presence" >&5
8179echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8180cat >conftest.$ac_ext <<_ACEOF
8181/* confdefs.h. */
8182_ACEOF
8183cat confdefs.h >>conftest.$ac_ext
8184cat >>conftest.$ac_ext <<_ACEOF
8185/* end confdefs.h. */
8186#include <$ac_header>
8187_ACEOF
8188if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8189 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8190 ac_status=$?
8191 grep -v '^ *+' conftest.er1 >conftest.err
8192 rm -f conftest.er1
8193 cat conftest.err >&5
8194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8195 (exit $ac_status); } >/dev/null; then
8196 if test -s conftest.err; then
8197 ac_cpp_err=$ac_c_preproc_warn_flag
8198 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8199 else
8200 ac_cpp_err=
8201 fi
5ee754fc 8202else
bec39cab 8203 ac_cpp_err=yes
5ee754fc 8204fi
bec39cab
AC
8205if test -z "$ac_cpp_err"; then
8206 ac_header_preproc=yes
8207else
8208 echo "$as_me: failed program was:" >&5
8209sed 's/^/| /' conftest.$ac_ext >&5
5ee754fc 8210
bec39cab 8211 ac_header_preproc=no
5ee754fc 8212fi
bec39cab 8213rm -f conftest.err conftest.$ac_ext
b4e70030
JB
8214echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8215echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
8216
8217# So? What about this header?
8218case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8219 yes:no: )
8220 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8221echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8222 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8223echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8224 ac_header_preproc=yes
8225 ;;
8226 no:yes:* )
8227 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8228echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8229 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8230echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8231 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8232echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8233 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8234echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8235 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8236echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8237 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8238echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8239 (
8240 cat <<\_ASBOX
8241## ------------------------------------------ ##
8242## Report this to the AC_PACKAGE_NAME lists. ##
8243## ------------------------------------------ ##
8244_ASBOX
8245 ) |
8246 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8247 ;;
8248esac
b4e70030
JB
8249echo "$as_me:$LINENO: checking for $ac_header" >&5
8250echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8251if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 8252 echo $ECHO_N "(cached) $ECHO_C" >&6
5ee754fc 8253else
bec39cab 8254 eval "$as_ac_Header=\$ac_header_preproc"
5ee754fc 8255fi
b4e70030
JB
8256echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8257echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5ee754fc 8258
5ee754fc 8259fi
bec39cab
AC
8260if test `eval echo '${'$as_ac_Header'}'` = yes; then
8261 cat >>confdefs.h <<_ACEOF
8262#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8263_ACEOF
8264
5ee754fc 8265fi
bec39cab 8266
5ee754fc
MK
8267done
8268
bec39cab
AC
8269
8270for ac_header in sys/proc.h
5ee754fc 8271do
bec39cab 8272as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
8273echo "$as_me:$LINENO: checking for $ac_header" >&5
8274echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8275if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 8276 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8277else
7cb9022a 8278 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8279/* confdefs.h. */
8280_ACEOF
8281cat confdefs.h >>conftest.$ac_ext
8282cat >>conftest.$ac_ext <<_ACEOF
8283/* end confdefs.h. */
7cb9022a
MK
8284#if HAVE_SYS_PARAM_H
8285# include <sys/param.h>
8286#endif
8287
8288
bec39cab
AC
8289#include <$ac_header>
8290_ACEOF
8291rm -f conftest.$ac_objext
8292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8293 (eval $ac_compile) 2>conftest.er1
8294 ac_status=$?
8295 grep -v '^ *+' conftest.er1 >conftest.err
8296 rm -f conftest.er1
8297 cat conftest.err >&5
8298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8299 (exit $ac_status); } &&
b4e70030
JB
8300 { ac_try='test -z "$ac_c_werror_flag"
8301 || test ! -s conftest.err'
bec39cab
AC
8302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8303 (eval $ac_try) 2>&5
8304 ac_status=$?
8305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8306 (exit $ac_status); }; } &&
8307 { ac_try='test -s conftest.$ac_objext'
8308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8309 (eval $ac_try) 2>&5
8310 ac_status=$?
8311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8312 (exit $ac_status); }; }; then
7cb9022a 8313 eval "$as_ac_Header=yes"
bec39cab
AC
8314else
8315 echo "$as_me: failed program was:" >&5
8316sed 's/^/| /' conftest.$ac_ext >&5
8317
b4e70030 8318eval "$as_ac_Header=no"
bec39cab
AC
8319fi
8320rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 8321fi
b4e70030
JB
8322echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8323echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8324if test `eval echo '${'$as_ac_Header'}'` = yes; then
8325 cat >>confdefs.h <<_ACEOF
8326#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8327_ACEOF
8328
5ee754fc 8329fi
bec39cab 8330
5ee754fc
MK
8331done
8332
bec39cab
AC
8333
8334for ac_header in sys/procfs.h
5ee754fc 8335do
bec39cab 8336as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
8337if eval "test \"\${$as_ac_Header+set}\" = set"; then
8338 echo "$as_me:$LINENO: checking for $ac_header" >&5
8339echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8340if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8341 echo $ECHO_N "(cached) $ECHO_C" >&6
8342fi
b4e70030
JB
8343echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8344echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8345else
8346 # Is the header compilable?
b4e70030
JB
8347echo "$as_me:$LINENO: checking $ac_header usability" >&5
8348echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
8349cat >conftest.$ac_ext <<_ACEOF
8350/* confdefs.h. */
8351_ACEOF
8352cat confdefs.h >>conftest.$ac_ext
8353cat >>conftest.$ac_ext <<_ACEOF
8354/* end confdefs.h. */
8355$ac_includes_default
8356#include <$ac_header>
8357_ACEOF
8358rm -f conftest.$ac_objext
8359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8360 (eval $ac_compile) 2>conftest.er1
8361 ac_status=$?
8362 grep -v '^ *+' conftest.er1 >conftest.err
8363 rm -f conftest.er1
8364 cat conftest.err >&5
8365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8366 (exit $ac_status); } &&
b4e70030
JB
8367 { ac_try='test -z "$ac_c_werror_flag"
8368 || test ! -s conftest.err'
bec39cab
AC
8369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8370 (eval $ac_try) 2>&5
8371 ac_status=$?
8372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8373 (exit $ac_status); }; } &&
8374 { ac_try='test -s conftest.$ac_objext'
8375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8376 (eval $ac_try) 2>&5
8377 ac_status=$?
8378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8379 (exit $ac_status); }; }; then
8380 ac_header_compiler=yes
8381else
8382 echo "$as_me: failed program was:" >&5
8383sed 's/^/| /' conftest.$ac_ext >&5
8384
b4e70030 8385ac_header_compiler=no
bec39cab
AC
8386fi
8387rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8388echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8389echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8390
8391# Is the header present?
b4e70030
JB
8392echo "$as_me:$LINENO: checking $ac_header presence" >&5
8393echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8394cat >conftest.$ac_ext <<_ACEOF
8395/* confdefs.h. */
8396_ACEOF
8397cat confdefs.h >>conftest.$ac_ext
8398cat >>conftest.$ac_ext <<_ACEOF
8399/* end confdefs.h. */
8400#include <$ac_header>
8401_ACEOF
8402if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8403 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8404 ac_status=$?
8405 grep -v '^ *+' conftest.er1 >conftest.err
8406 rm -f conftest.er1
8407 cat conftest.err >&5
8408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8409 (exit $ac_status); } >/dev/null; then
8410 if test -s conftest.err; then
8411 ac_cpp_err=$ac_c_preproc_warn_flag
8412 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8413 else
8414 ac_cpp_err=
8415 fi
8416else
8417 ac_cpp_err=yes
5ee754fc 8418fi
bec39cab
AC
8419if test -z "$ac_cpp_err"; then
8420 ac_header_preproc=yes
5ee754fc 8421else
bec39cab
AC
8422 echo "$as_me: failed program was:" >&5
8423sed 's/^/| /' conftest.$ac_ext >&5
8424
8425 ac_header_preproc=no
5ee754fc 8426fi
bec39cab 8427rm -f conftest.err conftest.$ac_ext
b4e70030
JB
8428echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8429echo "${ECHO_T}$ac_header_preproc" >&6
5ee754fc 8430
bec39cab
AC
8431# So? What about this header?
8432case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8433 yes:no: )
8434 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8435echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8436 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8437echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8438 ac_header_preproc=yes
8439 ;;
8440 no:yes:* )
8441 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8442echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8443 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8444echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8445 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8446echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8447 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8448echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8449 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8450echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8451 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8452echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8453 (
8454 cat <<\_ASBOX
8455## ------------------------------------------ ##
8456## Report this to the AC_PACKAGE_NAME lists. ##
8457## ------------------------------------------ ##
8458_ASBOX
8459 ) |
8460 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8461 ;;
8462esac
b4e70030
JB
8463echo "$as_me:$LINENO: checking for $ac_header" >&5
8464echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8465if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8466 echo $ECHO_N "(cached) $ECHO_C" >&6
8467else
8468 eval "$as_ac_Header=\$ac_header_preproc"
5ee754fc 8469fi
b4e70030
JB
8470echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8471echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 8472
5ee754fc 8473fi
bec39cab
AC
8474if test `eval echo '${'$as_ac_Header'}'` = yes; then
8475 cat >>confdefs.h <<_ACEOF
8476#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8477_ACEOF
8478
5ee754fc 8479fi
bec39cab 8480
5ee754fc
MK
8481done
8482
bec39cab
AC
8483
8484
8485for ac_header in sys/ptrace.h ptrace.h
5ee754fc 8486do
bec39cab 8487as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
8488if eval "test \"\${$as_ac_Header+set}\" = set"; then
8489 echo "$as_me:$LINENO: checking for $ac_header" >&5
8490echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8491if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8492 echo $ECHO_N "(cached) $ECHO_C" >&6
8493fi
b4e70030
JB
8494echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8495echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8496else
8497 # Is the header compilable?
b4e70030
JB
8498echo "$as_me:$LINENO: checking $ac_header usability" >&5
8499echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
8500cat >conftest.$ac_ext <<_ACEOF
8501/* confdefs.h. */
8502_ACEOF
8503cat confdefs.h >>conftest.$ac_ext
8504cat >>conftest.$ac_ext <<_ACEOF
8505/* end confdefs.h. */
8506$ac_includes_default
8507#include <$ac_header>
8508_ACEOF
8509rm -f conftest.$ac_objext
8510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8511 (eval $ac_compile) 2>conftest.er1
8512 ac_status=$?
8513 grep -v '^ *+' conftest.er1 >conftest.err
8514 rm -f conftest.er1
8515 cat conftest.err >&5
8516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8517 (exit $ac_status); } &&
b4e70030
JB
8518 { ac_try='test -z "$ac_c_werror_flag"
8519 || test ! -s conftest.err'
bec39cab
AC
8520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8521 (eval $ac_try) 2>&5
8522 ac_status=$?
8523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8524 (exit $ac_status); }; } &&
8525 { ac_try='test -s conftest.$ac_objext'
8526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8527 (eval $ac_try) 2>&5
8528 ac_status=$?
8529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8530 (exit $ac_status); }; }; then
8531 ac_header_compiler=yes
8532else
8533 echo "$as_me: failed program was:" >&5
8534sed 's/^/| /' conftest.$ac_ext >&5
8535
b4e70030 8536ac_header_compiler=no
bec39cab
AC
8537fi
8538rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8539echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8540echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8541
8542# Is the header present?
b4e70030
JB
8543echo "$as_me:$LINENO: checking $ac_header presence" >&5
8544echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8545cat >conftest.$ac_ext <<_ACEOF
8546/* confdefs.h. */
8547_ACEOF
8548cat confdefs.h >>conftest.$ac_ext
8549cat >>conftest.$ac_ext <<_ACEOF
8550/* end confdefs.h. */
8551#include <$ac_header>
8552_ACEOF
8553if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8554 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8555 ac_status=$?
8556 grep -v '^ *+' conftest.er1 >conftest.err
8557 rm -f conftest.er1
8558 cat conftest.err >&5
8559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8560 (exit $ac_status); } >/dev/null; then
8561 if test -s conftest.err; then
8562 ac_cpp_err=$ac_c_preproc_warn_flag
8563 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8564 else
8565 ac_cpp_err=
8566 fi
8567else
8568 ac_cpp_err=yes
5ee754fc 8569fi
bec39cab
AC
8570if test -z "$ac_cpp_err"; then
8571 ac_header_preproc=yes
5ee754fc 8572else
bec39cab
AC
8573 echo "$as_me: failed program was:" >&5
8574sed 's/^/| /' conftest.$ac_ext >&5
8575
8576 ac_header_preproc=no
5ee754fc 8577fi
bec39cab 8578rm -f conftest.err conftest.$ac_ext
b4e70030
JB
8579echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8580echo "${ECHO_T}$ac_header_preproc" >&6
5ee754fc 8581
bec39cab
AC
8582# So? What about this header?
8583case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8584 yes:no: )
8585 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8586echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8587 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8588echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8589 ac_header_preproc=yes
8590 ;;
8591 no:yes:* )
8592 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8593echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8594 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8595echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8596 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8597echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8598 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8599echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8600 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8601echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8602 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8603echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8604 (
8605 cat <<\_ASBOX
8606## ------------------------------------------ ##
8607## Report this to the AC_PACKAGE_NAME lists. ##
8608## ------------------------------------------ ##
8609_ASBOX
8610 ) |
8611 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8612 ;;
8613esac
b4e70030
JB
8614echo "$as_me:$LINENO: checking for $ac_header" >&5
8615echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8616if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8617 echo $ECHO_N "(cached) $ECHO_C" >&6
8618else
8619 eval "$as_ac_Header=\$ac_header_preproc"
5ee754fc 8620fi
b4e70030
JB
8621echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8622echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 8623
5ee754fc 8624fi
bec39cab
AC
8625if test `eval echo '${'$as_ac_Header'}'` = yes; then
8626 cat >>confdefs.h <<_ACEOF
8627#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8628_ACEOF
8629
5ee754fc 8630fi
bec39cab 8631
5ee754fc
MK
8632done
8633
bec39cab
AC
8634
8635
8636for ac_header in sys/reg.h sys/debugreg.h
5ee754fc 8637do
bec39cab 8638as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
8639if eval "test \"\${$as_ac_Header+set}\" = set"; then
8640 echo "$as_me:$LINENO: checking for $ac_header" >&5
8641echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8642if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8643 echo $ECHO_N "(cached) $ECHO_C" >&6
8644fi
b4e70030
JB
8645echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8646echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8647else
8648 # Is the header compilable?
b4e70030
JB
8649echo "$as_me:$LINENO: checking $ac_header usability" >&5
8650echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
8651cat >conftest.$ac_ext <<_ACEOF
8652/* confdefs.h. */
8653_ACEOF
8654cat confdefs.h >>conftest.$ac_ext
8655cat >>conftest.$ac_ext <<_ACEOF
8656/* end confdefs.h. */
8657$ac_includes_default
8658#include <$ac_header>
8659_ACEOF
8660rm -f conftest.$ac_objext
8661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8662 (eval $ac_compile) 2>conftest.er1
8663 ac_status=$?
8664 grep -v '^ *+' conftest.er1 >conftest.err
8665 rm -f conftest.er1
8666 cat conftest.err >&5
8667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8668 (exit $ac_status); } &&
b4e70030
JB
8669 { ac_try='test -z "$ac_c_werror_flag"
8670 || test ! -s conftest.err'
bec39cab
AC
8671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8672 (eval $ac_try) 2>&5
8673 ac_status=$?
8674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8675 (exit $ac_status); }; } &&
8676 { ac_try='test -s conftest.$ac_objext'
8677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8678 (eval $ac_try) 2>&5
8679 ac_status=$?
8680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8681 (exit $ac_status); }; }; then
8682 ac_header_compiler=yes
8683else
8684 echo "$as_me: failed program was:" >&5
8685sed 's/^/| /' conftest.$ac_ext >&5
8686
b4e70030 8687ac_header_compiler=no
bec39cab
AC
8688fi
8689rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8690echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8691echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8692
8693# Is the header present?
b4e70030
JB
8694echo "$as_me:$LINENO: checking $ac_header presence" >&5
8695echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8696cat >conftest.$ac_ext <<_ACEOF
8697/* confdefs.h. */
8698_ACEOF
8699cat confdefs.h >>conftest.$ac_ext
8700cat >>conftest.$ac_ext <<_ACEOF
8701/* end confdefs.h. */
8702#include <$ac_header>
8703_ACEOF
8704if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8705 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8706 ac_status=$?
8707 grep -v '^ *+' conftest.er1 >conftest.err
8708 rm -f conftest.er1
8709 cat conftest.err >&5
8710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8711 (exit $ac_status); } >/dev/null; then
8712 if test -s conftest.err; then
8713 ac_cpp_err=$ac_c_preproc_warn_flag
8714 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8715 else
8716 ac_cpp_err=
8717 fi
8718else
8719 ac_cpp_err=yes
5ee754fc 8720fi
bec39cab
AC
8721if test -z "$ac_cpp_err"; then
8722 ac_header_preproc=yes
5ee754fc 8723else
bec39cab
AC
8724 echo "$as_me: failed program was:" >&5
8725sed 's/^/| /' conftest.$ac_ext >&5
8726
8727 ac_header_preproc=no
5ee754fc 8728fi
bec39cab 8729rm -f conftest.err conftest.$ac_ext
b4e70030
JB
8730echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8731echo "${ECHO_T}$ac_header_preproc" >&6
5ee754fc 8732
bec39cab
AC
8733# So? What about this header?
8734case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8735 yes:no: )
8736 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8737echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8738 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8739echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8740 ac_header_preproc=yes
8741 ;;
8742 no:yes:* )
8743 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8744echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8745 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8746echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8747 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8748echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8749 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8750echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8751 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8752echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8753 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8754echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8755 (
8756 cat <<\_ASBOX
8757## ------------------------------------------ ##
8758## Report this to the AC_PACKAGE_NAME lists. ##
8759## ------------------------------------------ ##
8760_ASBOX
8761 ) |
8762 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8763 ;;
8764esac
b4e70030
JB
8765echo "$as_me:$LINENO: checking for $ac_header" >&5
8766echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8767if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8768 echo $ECHO_N "(cached) $ECHO_C" >&6
8769else
8770 eval "$as_ac_Header=\$ac_header_preproc"
5ee754fc 8771fi
b4e70030
JB
8772echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8773echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 8774
5ee754fc 8775fi
bec39cab
AC
8776if test `eval echo '${'$as_ac_Header'}'` = yes; then
8777 cat >>confdefs.h <<_ACEOF
8778#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8779_ACEOF
8780
5ee754fc 8781fi
bec39cab 8782
5ee754fc
MK
8783done
8784
bec39cab
AC
8785
8786for ac_header in sys/select.h
5ee754fc 8787do
bec39cab 8788as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
8789if eval "test \"\${$as_ac_Header+set}\" = set"; then
8790 echo "$as_me:$LINENO: checking for $ac_header" >&5
8791echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8792if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8793 echo $ECHO_N "(cached) $ECHO_C" >&6
8794fi
b4e70030
JB
8795echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8796echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8797else
8798 # Is the header compilable?
b4e70030
JB
8799echo "$as_me:$LINENO: checking $ac_header usability" >&5
8800echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
8801cat >conftest.$ac_ext <<_ACEOF
8802/* confdefs.h. */
8803_ACEOF
8804cat confdefs.h >>conftest.$ac_ext
8805cat >>conftest.$ac_ext <<_ACEOF
8806/* end confdefs.h. */
8807$ac_includes_default
8808#include <$ac_header>
8809_ACEOF
8810rm -f conftest.$ac_objext
8811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8812 (eval $ac_compile) 2>conftest.er1
8813 ac_status=$?
8814 grep -v '^ *+' conftest.er1 >conftest.err
8815 rm -f conftest.er1
8816 cat conftest.err >&5
8817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8818 (exit $ac_status); } &&
b4e70030
JB
8819 { ac_try='test -z "$ac_c_werror_flag"
8820 || test ! -s conftest.err'
bec39cab
AC
8821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8822 (eval $ac_try) 2>&5
8823 ac_status=$?
8824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8825 (exit $ac_status); }; } &&
8826 { ac_try='test -s conftest.$ac_objext'
8827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8828 (eval $ac_try) 2>&5
8829 ac_status=$?
8830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8831 (exit $ac_status); }; }; then
8832 ac_header_compiler=yes
8833else
8834 echo "$as_me: failed program was:" >&5
8835sed 's/^/| /' conftest.$ac_ext >&5
8836
b4e70030 8837ac_header_compiler=no
bec39cab
AC
8838fi
8839rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8840echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8841echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8842
8843# Is the header present?
b4e70030
JB
8844echo "$as_me:$LINENO: checking $ac_header presence" >&5
8845echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8846cat >conftest.$ac_ext <<_ACEOF
8847/* confdefs.h. */
8848_ACEOF
8849cat confdefs.h >>conftest.$ac_ext
8850cat >>conftest.$ac_ext <<_ACEOF
8851/* end confdefs.h. */
8852#include <$ac_header>
8853_ACEOF
8854if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8855 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8856 ac_status=$?
8857 grep -v '^ *+' conftest.er1 >conftest.err
8858 rm -f conftest.er1
8859 cat conftest.err >&5
8860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8861 (exit $ac_status); } >/dev/null; then
8862 if test -s conftest.err; then
8863 ac_cpp_err=$ac_c_preproc_warn_flag
8864 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8865 else
8866 ac_cpp_err=
8867 fi
8868else
8869 ac_cpp_err=yes
5ee754fc 8870fi
bec39cab
AC
8871if test -z "$ac_cpp_err"; then
8872 ac_header_preproc=yes
5ee754fc 8873else
bec39cab
AC
8874 echo "$as_me: failed program was:" >&5
8875sed 's/^/| /' conftest.$ac_ext >&5
8876
8877 ac_header_preproc=no
5ee754fc 8878fi
bec39cab 8879rm -f conftest.err conftest.$ac_ext
b4e70030
JB
8880echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8881echo "${ECHO_T}$ac_header_preproc" >&6
5ee754fc 8882
bec39cab
AC
8883# So? What about this header?
8884case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8885 yes:no: )
8886 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8887echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8888 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8889echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8890 ac_header_preproc=yes
8891 ;;
8892 no:yes:* )
8893 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8894echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8895 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8896echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8897 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8898echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8899 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8900echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8901 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8902echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8903 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8904echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8905 (
8906 cat <<\_ASBOX
8907## ------------------------------------------ ##
8908## Report this to the AC_PACKAGE_NAME lists. ##
8909## ------------------------------------------ ##
8910_ASBOX
8911 ) |
8912 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8913 ;;
8914esac
b4e70030
JB
8915echo "$as_me:$LINENO: checking for $ac_header" >&5
8916echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8917if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8918 echo $ECHO_N "(cached) $ECHO_C" >&6
8919else
8920 eval "$as_ac_Header=\$ac_header_preproc"
5ee754fc 8921fi
b4e70030
JB
8922echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8923echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 8924
5ee754fc 8925fi
bec39cab
AC
8926if test `eval echo '${'$as_ac_Header'}'` = yes; then
8927 cat >>confdefs.h <<_ACEOF
8928#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8929_ACEOF
8930
5ee754fc 8931fi
bec39cab 8932
5ee754fc
MK
8933done
8934
bec39cab
AC
8935
8936for ac_header in sys/syscall.h
5ee754fc 8937do
bec39cab 8938as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
8939if eval "test \"\${$as_ac_Header+set}\" = set"; then
8940 echo "$as_me:$LINENO: checking for $ac_header" >&5
8941echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8942if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8943 echo $ECHO_N "(cached) $ECHO_C" >&6
8944fi
b4e70030
JB
8945echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8946echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8947else
8948 # Is the header compilable?
b4e70030
JB
8949echo "$as_me:$LINENO: checking $ac_header usability" >&5
8950echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
8951cat >conftest.$ac_ext <<_ACEOF
8952/* confdefs.h. */
8953_ACEOF
8954cat confdefs.h >>conftest.$ac_ext
8955cat >>conftest.$ac_ext <<_ACEOF
8956/* end confdefs.h. */
8957$ac_includes_default
8958#include <$ac_header>
8959_ACEOF
8960rm -f conftest.$ac_objext
8961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8962 (eval $ac_compile) 2>conftest.er1
8963 ac_status=$?
8964 grep -v '^ *+' conftest.er1 >conftest.err
8965 rm -f conftest.er1
8966 cat conftest.err >&5
8967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968 (exit $ac_status); } &&
b4e70030
JB
8969 { ac_try='test -z "$ac_c_werror_flag"
8970 || test ! -s conftest.err'
bec39cab
AC
8971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8972 (eval $ac_try) 2>&5
8973 ac_status=$?
8974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8975 (exit $ac_status); }; } &&
8976 { ac_try='test -s conftest.$ac_objext'
8977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8978 (eval $ac_try) 2>&5
8979 ac_status=$?
8980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8981 (exit $ac_status); }; }; then
8982 ac_header_compiler=yes
8983else
8984 echo "$as_me: failed program was:" >&5
8985sed 's/^/| /' conftest.$ac_ext >&5
8986
b4e70030 8987ac_header_compiler=no
bec39cab
AC
8988fi
8989rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8990echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8991echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8992
8993# Is the header present?
b4e70030
JB
8994echo "$as_me:$LINENO: checking $ac_header presence" >&5
8995echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8996cat >conftest.$ac_ext <<_ACEOF
8997/* confdefs.h. */
8998_ACEOF
8999cat confdefs.h >>conftest.$ac_ext
9000cat >>conftest.$ac_ext <<_ACEOF
9001/* end confdefs.h. */
9002#include <$ac_header>
9003_ACEOF
9004if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9005 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9006 ac_status=$?
9007 grep -v '^ *+' conftest.er1 >conftest.err
9008 rm -f conftest.er1
9009 cat conftest.err >&5
9010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9011 (exit $ac_status); } >/dev/null; then
9012 if test -s conftest.err; then
9013 ac_cpp_err=$ac_c_preproc_warn_flag
9014 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9015 else
9016 ac_cpp_err=
9017 fi
9018else
9019 ac_cpp_err=yes
5ee754fc 9020fi
bec39cab
AC
9021if test -z "$ac_cpp_err"; then
9022 ac_header_preproc=yes
5ee754fc 9023else
bec39cab
AC
9024 echo "$as_me: failed program was:" >&5
9025sed 's/^/| /' conftest.$ac_ext >&5
9026
9027 ac_header_preproc=no
5ee754fc 9028fi
bec39cab 9029rm -f conftest.err conftest.$ac_ext
b4e70030
JB
9030echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9031echo "${ECHO_T}$ac_header_preproc" >&6
5ee754fc 9032
bec39cab
AC
9033# So? What about this header?
9034case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9035 yes:no: )
9036 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9037echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9038 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9039echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9040 ac_header_preproc=yes
9041 ;;
9042 no:yes:* )
9043 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9044echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9045 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9046echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9047 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9048echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9049 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9050echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9051 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9052echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9053 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9054echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
9055 (
9056 cat <<\_ASBOX
9057## ------------------------------------------ ##
9058## Report this to the AC_PACKAGE_NAME lists. ##
9059## ------------------------------------------ ##
9060_ASBOX
9061 ) |
9062 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
9063 ;;
9064esac
b4e70030
JB
9065echo "$as_me:$LINENO: checking for $ac_header" >&5
9066echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9067if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
9068 echo $ECHO_N "(cached) $ECHO_C" >&6
9069else
9070 eval "$as_ac_Header=\$ac_header_preproc"
5ee754fc 9071fi
b4e70030
JB
9072echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9073echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 9074
5ee754fc 9075fi
bec39cab
AC
9076if test `eval echo '${'$as_ac_Header'}'` = yes; then
9077 cat >>confdefs.h <<_ACEOF
9078#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9079_ACEOF
9080
5ee754fc 9081fi
bec39cab 9082
5ee754fc
MK
9083done
9084
bec39cab
AC
9085
9086for ac_header in sys/types.h
5ee754fc 9087do
bec39cab 9088as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
9089if eval "test \"\${$as_ac_Header+set}\" = set"; then
9090 echo "$as_me:$LINENO: checking for $ac_header" >&5
9091echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9092if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
9093 echo $ECHO_N "(cached) $ECHO_C" >&6
9094fi
b4e70030
JB
9095echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9096echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
9097else
9098 # Is the header compilable?
b4e70030
JB
9099echo "$as_me:$LINENO: checking $ac_header usability" >&5
9100echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
9101cat >conftest.$ac_ext <<_ACEOF
9102/* confdefs.h. */
9103_ACEOF
9104cat confdefs.h >>conftest.$ac_ext
9105cat >>conftest.$ac_ext <<_ACEOF
9106/* end confdefs.h. */
9107$ac_includes_default
9108#include <$ac_header>
9109_ACEOF
9110rm -f conftest.$ac_objext
9111if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9112 (eval $ac_compile) 2>conftest.er1
9113 ac_status=$?
9114 grep -v '^ *+' conftest.er1 >conftest.err
9115 rm -f conftest.er1
9116 cat conftest.err >&5
9117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9118 (exit $ac_status); } &&
b4e70030
JB
9119 { ac_try='test -z "$ac_c_werror_flag"
9120 || test ! -s conftest.err'
bec39cab
AC
9121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9122 (eval $ac_try) 2>&5
9123 ac_status=$?
9124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9125 (exit $ac_status); }; } &&
9126 { ac_try='test -s conftest.$ac_objext'
9127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9128 (eval $ac_try) 2>&5
9129 ac_status=$?
9130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9131 (exit $ac_status); }; }; then
9132 ac_header_compiler=yes
9133else
9134 echo "$as_me: failed program was:" >&5
9135sed 's/^/| /' conftest.$ac_ext >&5
9136
b4e70030 9137ac_header_compiler=no
bec39cab
AC
9138fi
9139rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
9140echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9141echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
9142
9143# Is the header present?
b4e70030
JB
9144echo "$as_me:$LINENO: checking $ac_header presence" >&5
9145echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
9146cat >conftest.$ac_ext <<_ACEOF
9147/* confdefs.h. */
9148_ACEOF
9149cat confdefs.h >>conftest.$ac_ext
9150cat >>conftest.$ac_ext <<_ACEOF
9151/* end confdefs.h. */
9152#include <$ac_header>
9153_ACEOF
9154if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9155 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9156 ac_status=$?
9157 grep -v '^ *+' conftest.er1 >conftest.err
9158 rm -f conftest.er1
9159 cat conftest.err >&5
9160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9161 (exit $ac_status); } >/dev/null; then
9162 if test -s conftest.err; then
9163 ac_cpp_err=$ac_c_preproc_warn_flag
9164 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9165 else
9166 ac_cpp_err=
9167 fi
9168else
9169 ac_cpp_err=yes
5ee754fc 9170fi
bec39cab
AC
9171if test -z "$ac_cpp_err"; then
9172 ac_header_preproc=yes
5ee754fc 9173else
bec39cab
AC
9174 echo "$as_me: failed program was:" >&5
9175sed 's/^/| /' conftest.$ac_ext >&5
9176
9177 ac_header_preproc=no
5ee754fc 9178fi
bec39cab 9179rm -f conftest.err conftest.$ac_ext
b4e70030
JB
9180echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9181echo "${ECHO_T}$ac_header_preproc" >&6
5ee754fc 9182
bec39cab
AC
9183# So? What about this header?
9184case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9185 yes:no: )
9186 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9187echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9188 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9189echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9190 ac_header_preproc=yes
9191 ;;
9192 no:yes:* )
9193 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9194echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9195 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9196echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9197 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9198echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9199 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9200echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9201 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9202echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9203 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9204echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
9205 (
9206 cat <<\_ASBOX
9207## ------------------------------------------ ##
9208## Report this to the AC_PACKAGE_NAME lists. ##
9209## ------------------------------------------ ##
9210_ASBOX
9211 ) |
9212 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
9213 ;;
9214esac
b4e70030
JB
9215echo "$as_me:$LINENO: checking for $ac_header" >&5
9216echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9217if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
9218 echo $ECHO_N "(cached) $ECHO_C" >&6
9219else
9220 eval "$as_ac_Header=\$ac_header_preproc"
5ee754fc 9221fi
b4e70030
JB
9222echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9223echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 9224
5ee754fc 9225fi
bec39cab
AC
9226if test `eval echo '${'$as_ac_Header'}'` = yes; then
9227 cat >>confdefs.h <<_ACEOF
9228#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9229_ACEOF
9230
5ee754fc 9231fi
bec39cab 9232
5ee754fc
MK
9233done
9234
bec39cab
AC
9235
9236for ac_header in sys/user.h
5ee754fc 9237do
bec39cab 9238as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
9239echo "$as_me:$LINENO: checking for $ac_header" >&5
9240echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9241if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 9242 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 9243else
7cb9022a 9244 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
9245/* confdefs.h. */
9246_ACEOF
9247cat confdefs.h >>conftest.$ac_ext
9248cat >>conftest.$ac_ext <<_ACEOF
9249/* end confdefs.h. */
7cb9022a
MK
9250#if HAVE_SYS_PARAM_H
9251# include <sys/param.h>
9252#endif
9253
9254
bec39cab
AC
9255#include <$ac_header>
9256_ACEOF
9257rm -f conftest.$ac_objext
9258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9259 (eval $ac_compile) 2>conftest.er1
9260 ac_status=$?
9261 grep -v '^ *+' conftest.er1 >conftest.err
9262 rm -f conftest.er1
9263 cat conftest.err >&5
9264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9265 (exit $ac_status); } &&
b4e70030
JB
9266 { ac_try='test -z "$ac_c_werror_flag"
9267 || test ! -s conftest.err'
bec39cab
AC
9268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9269 (eval $ac_try) 2>&5
9270 ac_status=$?
9271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9272 (exit $ac_status); }; } &&
9273 { ac_try='test -s conftest.$ac_objext'
9274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9275 (eval $ac_try) 2>&5
9276 ac_status=$?
9277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9278 (exit $ac_status); }; }; then
7cb9022a 9279 eval "$as_ac_Header=yes"
bec39cab
AC
9280else
9281 echo "$as_me: failed program was:" >&5
9282sed 's/^/| /' conftest.$ac_ext >&5
9283
b4e70030 9284eval "$as_ac_Header=no"
bec39cab
AC
9285fi
9286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9287fi
b4e70030
JB
9288echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9289echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
9290if test `eval echo '${'$as_ac_Header'}'` = yes; then
9291 cat >>confdefs.h <<_ACEOF
9292#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9293_ACEOF
9294
5ee754fc 9295fi
bec39cab 9296
5ee754fc
MK
9297done
9298
bec39cab
AC
9299
9300
9301for ac_header in sys/wait.h wait.h
5ee754fc 9302do
bec39cab 9303as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
9304if eval "test \"\${$as_ac_Header+set}\" = set"; then
9305 echo "$as_me:$LINENO: checking for $ac_header" >&5
9306echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9307if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
9308 echo $ECHO_N "(cached) $ECHO_C" >&6
9309fi
b4e70030
JB
9310echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9311echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
9312else
9313 # Is the header compilable?
b4e70030
JB
9314echo "$as_me:$LINENO: checking $ac_header usability" >&5
9315echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
9316cat >conftest.$ac_ext <<_ACEOF
9317/* confdefs.h. */
9318_ACEOF
9319cat confdefs.h >>conftest.$ac_ext
9320cat >>conftest.$ac_ext <<_ACEOF
9321/* end confdefs.h. */
9322$ac_includes_default
9323#include <$ac_header>
9324_ACEOF
9325rm -f conftest.$ac_objext
9326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9327 (eval $ac_compile) 2>conftest.er1
9328 ac_status=$?
9329 grep -v '^ *+' conftest.er1 >conftest.err
9330 rm -f conftest.er1
9331 cat conftest.err >&5
9332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9333 (exit $ac_status); } &&
b4e70030
JB
9334 { ac_try='test -z "$ac_c_werror_flag"
9335 || test ! -s conftest.err'
bec39cab
AC
9336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9337 (eval $ac_try) 2>&5
9338 ac_status=$?
9339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9340 (exit $ac_status); }; } &&
9341 { ac_try='test -s conftest.$ac_objext'
9342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9343 (eval $ac_try) 2>&5
9344 ac_status=$?
9345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9346 (exit $ac_status); }; }; then
9347 ac_header_compiler=yes
9348else
9349 echo "$as_me: failed program was:" >&5
9350sed 's/^/| /' conftest.$ac_ext >&5
9351
b4e70030 9352ac_header_compiler=no
bec39cab
AC
9353fi
9354rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
9355echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9356echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
9357
9358# Is the header present?
b4e70030
JB
9359echo "$as_me:$LINENO: checking $ac_header presence" >&5
9360echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
9361cat >conftest.$ac_ext <<_ACEOF
9362/* confdefs.h. */
9363_ACEOF
9364cat confdefs.h >>conftest.$ac_ext
9365cat >>conftest.$ac_ext <<_ACEOF
9366/* end confdefs.h. */
9367#include <$ac_header>
9368_ACEOF
9369if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9370 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9371 ac_status=$?
9372 grep -v '^ *+' conftest.er1 >conftest.err
9373 rm -f conftest.er1
9374 cat conftest.err >&5
9375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9376 (exit $ac_status); } >/dev/null; then
9377 if test -s conftest.err; then
9378 ac_cpp_err=$ac_c_preproc_warn_flag
9379 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9380 else
9381 ac_cpp_err=
9382 fi
9383else
9384 ac_cpp_err=yes
5ee754fc 9385fi
bec39cab
AC
9386if test -z "$ac_cpp_err"; then
9387 ac_header_preproc=yes
5ee754fc 9388else
bec39cab
AC
9389 echo "$as_me: failed program was:" >&5
9390sed 's/^/| /' conftest.$ac_ext >&5
9391
9392 ac_header_preproc=no
5ee754fc 9393fi
bec39cab 9394rm -f conftest.err conftest.$ac_ext
b4e70030
JB
9395echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9396echo "${ECHO_T}$ac_header_preproc" >&6
5ee754fc 9397
bec39cab
AC
9398# So? What about this header?
9399case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9400 yes:no: )
9401 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9402echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9403 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9404echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9405 ac_header_preproc=yes
9406 ;;
9407 no:yes:* )
9408 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9409echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9410 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9411echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9412 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9413echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9414 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9415echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9416 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9417echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9418 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9419echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
9420 (
9421 cat <<\_ASBOX
9422## ------------------------------------------ ##
9423## Report this to the AC_PACKAGE_NAME lists. ##
9424## ------------------------------------------ ##
9425_ASBOX
9426 ) |
9427 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
9428 ;;
9429esac
b4e70030
JB
9430echo "$as_me:$LINENO: checking for $ac_header" >&5
9431echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9432if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
9433 echo $ECHO_N "(cached) $ECHO_C" >&6
9434else
9435 eval "$as_ac_Header=\$ac_header_preproc"
9608ab8b 9436fi
b4e70030
JB
9437echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9438echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 9439
9608ab8b 9440fi
bec39cab
AC
9441if test `eval echo '${'$as_ac_Header'}'` = yes; then
9442 cat >>confdefs.h <<_ACEOF
9443#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9444_ACEOF
9445
9608ab8b 9446fi
bec39cab 9447
9608ab8b 9448done
5ee754fc 9449
bec39cab
AC
9450
9451
9452
9453for ac_header in termios.h termio.h sgtty.h
5ee754fc 9454do
bec39cab 9455as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
9456if eval "test \"\${$as_ac_Header+set}\" = set"; then
9457 echo "$as_me:$LINENO: checking for $ac_header" >&5
9458echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9459if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
9460 echo $ECHO_N "(cached) $ECHO_C" >&6
9461fi
b4e70030
JB
9462echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9463echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
9464else
9465 # Is the header compilable?
b4e70030
JB
9466echo "$as_me:$LINENO: checking $ac_header usability" >&5
9467echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
9468cat >conftest.$ac_ext <<_ACEOF
9469/* confdefs.h. */
9470_ACEOF
9471cat confdefs.h >>conftest.$ac_ext
9472cat >>conftest.$ac_ext <<_ACEOF
9473/* end confdefs.h. */
9474$ac_includes_default
9475#include <$ac_header>
9476_ACEOF
9477rm -f conftest.$ac_objext
9478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9479 (eval $ac_compile) 2>conftest.er1
9480 ac_status=$?
9481 grep -v '^ *+' conftest.er1 >conftest.err
9482 rm -f conftest.er1
9483 cat conftest.err >&5
9484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9485 (exit $ac_status); } &&
b4e70030
JB
9486 { ac_try='test -z "$ac_c_werror_flag"
9487 || test ! -s conftest.err'
bec39cab
AC
9488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9489 (eval $ac_try) 2>&5
9490 ac_status=$?
9491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9492 (exit $ac_status); }; } &&
9493 { ac_try='test -s conftest.$ac_objext'
9494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9495 (eval $ac_try) 2>&5
9496 ac_status=$?
9497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9498 (exit $ac_status); }; }; then
9499 ac_header_compiler=yes
9500else
9501 echo "$as_me: failed program was:" >&5
9502sed 's/^/| /' conftest.$ac_ext >&5
9503
b4e70030 9504ac_header_compiler=no
bec39cab
AC
9505fi
9506rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
9507echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9508echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
9509
9510# Is the header present?
b4e70030
JB
9511echo "$as_me:$LINENO: checking $ac_header presence" >&5
9512echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
9513cat >conftest.$ac_ext <<_ACEOF
9514/* confdefs.h. */
9515_ACEOF
9516cat confdefs.h >>conftest.$ac_ext
9517cat >>conftest.$ac_ext <<_ACEOF
9518/* end confdefs.h. */
9519#include <$ac_header>
9520_ACEOF
9521if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9522 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9523 ac_status=$?
9524 grep -v '^ *+' conftest.er1 >conftest.err
9525 rm -f conftest.er1
9526 cat conftest.err >&5
9527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9528 (exit $ac_status); } >/dev/null; then
9529 if test -s conftest.err; then
9530 ac_cpp_err=$ac_c_preproc_warn_flag
9531 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9532 else
9533 ac_cpp_err=
9534 fi
9535else
9536 ac_cpp_err=yes
9608ab8b 9537fi
bec39cab
AC
9538if test -z "$ac_cpp_err"; then
9539 ac_header_preproc=yes
9608ab8b 9540else
bec39cab
AC
9541 echo "$as_me: failed program was:" >&5
9542sed 's/^/| /' conftest.$ac_ext >&5
9543
9544 ac_header_preproc=no
9608ab8b 9545fi
bec39cab 9546rm -f conftest.err conftest.$ac_ext
b4e70030
JB
9547echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9548echo "${ECHO_T}$ac_header_preproc" >&6
9608ab8b 9549
bec39cab
AC
9550# So? What about this header?
9551case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9552 yes:no: )
9553 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9554echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9555 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9556echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9557 ac_header_preproc=yes
9558 ;;
9559 no:yes:* )
9560 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9561echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9562 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9563echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9564 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9565echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9566 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9567echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9568 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9569echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9570 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9571echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
9572 (
9573 cat <<\_ASBOX
9574## ------------------------------------------ ##
9575## Report this to the AC_PACKAGE_NAME lists. ##
9576## ------------------------------------------ ##
9577_ASBOX
9578 ) |
9579 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
9580 ;;
9581esac
b4e70030
JB
9582echo "$as_me:$LINENO: checking for $ac_header" >&5
9583echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9584if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
9585 echo $ECHO_N "(cached) $ECHO_C" >&6
9586else
9587 eval "$as_ac_Header=\$ac_header_preproc"
9608ab8b 9588fi
b4e70030
JB
9589echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9590echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 9591
9608ab8b 9592fi
bec39cab
AC
9593if test `eval echo '${'$as_ac_Header'}'` = yes; then
9594 cat >>confdefs.h <<_ACEOF
9595#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9596_ACEOF
9597
9608ab8b 9598fi
bec39cab 9599
5ee754fc 9600done
9608ab8b 9601
bec39cab
AC
9602
9603for ac_header in unistd.h
78434e59 9604do
bec39cab 9605as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
9606if eval "test \"\${$as_ac_Header+set}\" = set"; then
9607 echo "$as_me:$LINENO: checking for $ac_header" >&5
9608echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9609if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
9610 echo $ECHO_N "(cached) $ECHO_C" >&6
9611fi
b4e70030
JB
9612echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9613echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
9614else
9615 # Is the header compilable?
b4e70030
JB
9616echo "$as_me:$LINENO: checking $ac_header usability" >&5
9617echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
9618cat >conftest.$ac_ext <<_ACEOF
9619/* confdefs.h. */
9620_ACEOF
9621cat confdefs.h >>conftest.$ac_ext
9622cat >>conftest.$ac_ext <<_ACEOF
9623/* end confdefs.h. */
9624$ac_includes_default
9625#include <$ac_header>
9626_ACEOF
9627rm -f conftest.$ac_objext
9628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9629 (eval $ac_compile) 2>conftest.er1
9630 ac_status=$?
9631 grep -v '^ *+' conftest.er1 >conftest.err
9632 rm -f conftest.er1
9633 cat conftest.err >&5
9634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9635 (exit $ac_status); } &&
b4e70030
JB
9636 { ac_try='test -z "$ac_c_werror_flag"
9637 || test ! -s conftest.err'
bec39cab
AC
9638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9639 (eval $ac_try) 2>&5
9640 ac_status=$?
9641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9642 (exit $ac_status); }; } &&
9643 { ac_try='test -s conftest.$ac_objext'
9644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9645 (eval $ac_try) 2>&5
9646 ac_status=$?
9647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9648 (exit $ac_status); }; }; then
9649 ac_header_compiler=yes
9650else
9651 echo "$as_me: failed program was:" >&5
9652sed 's/^/| /' conftest.$ac_ext >&5
9653
b4e70030 9654ac_header_compiler=no
bec39cab
AC
9655fi
9656rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
9657echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9658echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
9659
9660# Is the header present?
b4e70030
JB
9661echo "$as_me:$LINENO: checking $ac_header presence" >&5
9662echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
9663cat >conftest.$ac_ext <<_ACEOF
9664/* confdefs.h. */
9665_ACEOF
9666cat confdefs.h >>conftest.$ac_ext
9667cat >>conftest.$ac_ext <<_ACEOF
9668/* end confdefs.h. */
9669#include <$ac_header>
9670_ACEOF
9671if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9672 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9673 ac_status=$?
9674 grep -v '^ *+' conftest.er1 >conftest.err
9675 rm -f conftest.er1
9676 cat conftest.err >&5
9677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9678 (exit $ac_status); } >/dev/null; then
9679 if test -s conftest.err; then
9680 ac_cpp_err=$ac_c_preproc_warn_flag
9681 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9682 else
9683 ac_cpp_err=
9684 fi
9685else
9686 ac_cpp_err=yes
78434e59 9687fi
bec39cab
AC
9688if test -z "$ac_cpp_err"; then
9689 ac_header_preproc=yes
78434e59 9690else
bec39cab
AC
9691 echo "$as_me: failed program was:" >&5
9692sed 's/^/| /' conftest.$ac_ext >&5
9693
9694 ac_header_preproc=no
78434e59 9695fi
bec39cab 9696rm -f conftest.err conftest.$ac_ext
b4e70030
JB
9697echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9698echo "${ECHO_T}$ac_header_preproc" >&6
78434e59 9699
bec39cab
AC
9700# So? What about this header?
9701case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9702 yes:no: )
9703 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9704echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9705 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9706echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9707 ac_header_preproc=yes
9708 ;;
9709 no:yes:* )
9710 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9711echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9712 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9713echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9714 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9715echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9716 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9717echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9718 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9719echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9720 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9721echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
9722 (
9723 cat <<\_ASBOX
9724## ------------------------------------------ ##
9725## Report this to the AC_PACKAGE_NAME lists. ##
9726## ------------------------------------------ ##
9727_ASBOX
9728 ) |
9729 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
9730 ;;
9731esac
b4e70030
JB
9732echo "$as_me:$LINENO: checking for $ac_header" >&5
9733echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9734if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
9735 echo $ECHO_N "(cached) $ECHO_C" >&6
9736else
9737 eval "$as_ac_Header=\$ac_header_preproc"
086ec9eb 9738fi
b4e70030
JB
9739echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9740echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 9741
086ec9eb 9742fi
bec39cab
AC
9743if test `eval echo '${'$as_ac_Header'}'` = yes; then
9744 cat >>confdefs.h <<_ACEOF
9745#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9746_ACEOF
9747
086ec9eb 9748fi
bec39cab 9749
086ec9eb
MK
9750done
9751
9608ab8b 9752
b1d19a62 9753# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
5ee754fc
MK
9754# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
9755# think that we don't have <curses.h> if we're using GCC.
9756case $host_os in
b1d19a62 9757 solaris2.[789])
5ee754fc 9758 if test "$GCC" = yes; then
bec39cab
AC
9759
9760cat >>confdefs.h <<\_ACEOF
5ee754fc 9761#define _MSE_INT_H 1
bec39cab 9762_ACEOF
5ee754fc
MK
9763
9764 fi ;;
9765esac
bec39cab
AC
9766
9767
9768
9769
9770for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h
5ee754fc 9771do
bec39cab 9772as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
9773if eval "test \"\${$as_ac_Header+set}\" = set"; then
9774 echo "$as_me:$LINENO: checking for $ac_header" >&5
9775echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9776if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
9777 echo $ECHO_N "(cached) $ECHO_C" >&6
9778fi
b4e70030
JB
9779echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9780echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
9781else
9782 # Is the header compilable?
b4e70030
JB
9783echo "$as_me:$LINENO: checking $ac_header usability" >&5
9784echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
9785cat >conftest.$ac_ext <<_ACEOF
9786/* confdefs.h. */
9787_ACEOF
9788cat confdefs.h >>conftest.$ac_ext
9789cat >>conftest.$ac_ext <<_ACEOF
9790/* end confdefs.h. */
9791$ac_includes_default
9792#include <$ac_header>
9793_ACEOF
9794rm -f conftest.$ac_objext
9795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9796 (eval $ac_compile) 2>conftest.er1
9797 ac_status=$?
9798 grep -v '^ *+' conftest.er1 >conftest.err
9799 rm -f conftest.er1
9800 cat conftest.err >&5
9801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9802 (exit $ac_status); } &&
b4e70030
JB
9803 { ac_try='test -z "$ac_c_werror_flag"
9804 || test ! -s conftest.err'
bec39cab
AC
9805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9806 (eval $ac_try) 2>&5
9807 ac_status=$?
9808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9809 (exit $ac_status); }; } &&
9810 { ac_try='test -s conftest.$ac_objext'
9811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9812 (eval $ac_try) 2>&5
9813 ac_status=$?
9814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9815 (exit $ac_status); }; }; then
9816 ac_header_compiler=yes
9817else
9818 echo "$as_me: failed program was:" >&5
9819sed 's/^/| /' conftest.$ac_ext >&5
9820
b4e70030 9821ac_header_compiler=no
bec39cab
AC
9822fi
9823rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
9824echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9825echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
9826
9827# Is the header present?
b4e70030
JB
9828echo "$as_me:$LINENO: checking $ac_header presence" >&5
9829echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
9830cat >conftest.$ac_ext <<_ACEOF
9831/* confdefs.h. */
9832_ACEOF
9833cat confdefs.h >>conftest.$ac_ext
9834cat >>conftest.$ac_ext <<_ACEOF
9835/* end confdefs.h. */
9836#include <$ac_header>
9837_ACEOF
9838if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9839 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9840 ac_status=$?
9841 grep -v '^ *+' conftest.er1 >conftest.err
9842 rm -f conftest.er1
9843 cat conftest.err >&5
9844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9845 (exit $ac_status); } >/dev/null; then
9846 if test -s conftest.err; then
9847 ac_cpp_err=$ac_c_preproc_warn_flag
9848 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9849 else
9850 ac_cpp_err=
9851 fi
9852else
9853 ac_cpp_err=yes
c906108c 9854fi
bec39cab
AC
9855if test -z "$ac_cpp_err"; then
9856 ac_header_preproc=yes
9857else
9858 echo "$as_me: failed program was:" >&5
9859sed 's/^/| /' conftest.$ac_ext >&5
9860
9861 ac_header_preproc=no
c906108c 9862fi
bec39cab 9863rm -f conftest.err conftest.$ac_ext
b4e70030
JB
9864echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9865echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
9866
9867# So? What about this header?
9868case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9869 yes:no: )
9870 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9871echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9872 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9873echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9874 ac_header_preproc=yes
9875 ;;
9876 no:yes:* )
9877 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9878echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9879 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9880echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9881 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9882echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9883 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9884echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9885 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9886echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9887 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9888echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
9889 (
9890 cat <<\_ASBOX
9891## ------------------------------------------ ##
9892## Report this to the AC_PACKAGE_NAME lists. ##
9893## ------------------------------------------ ##
9894_ASBOX
9895 ) |
9896 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
9897 ;;
9898esac
b4e70030
JB
9899echo "$as_me:$LINENO: checking for $ac_header" >&5
9900echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9901if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 9902 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 9903else
bec39cab 9904 eval "$as_ac_Header=\$ac_header_preproc"
c906108c 9905fi
b4e70030
JB
9906echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9907echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
9908
9909fi
9910if test `eval echo '${'$as_ac_Header'}'` = yes; then
9911 cat >>confdefs.h <<_ACEOF
9912#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9913_ACEOF
9914
9915fi
9916
5ee754fc 9917done
c906108c 9918
bec39cab 9919
065a1afc 9920for ac_header in ncurses/term.h
3b78cdbb 9921do
bec39cab 9922as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
9923if eval "test \"\${$as_ac_Header+set}\" = set"; then
9924 echo "$as_me:$LINENO: checking for $ac_header" >&5
9925echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9926if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
9927 echo $ECHO_N "(cached) $ECHO_C" >&6
9928fi
b4e70030
JB
9929echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9930echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
9931else
9932 # Is the header compilable?
b4e70030
JB
9933echo "$as_me:$LINENO: checking $ac_header usability" >&5
9934echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
9935cat >conftest.$ac_ext <<_ACEOF
9936/* confdefs.h. */
9937_ACEOF
9938cat confdefs.h >>conftest.$ac_ext
9939cat >>conftest.$ac_ext <<_ACEOF
9940/* end confdefs.h. */
9941$ac_includes_default
9942#include <$ac_header>
9943_ACEOF
9944rm -f conftest.$ac_objext
9945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9946 (eval $ac_compile) 2>conftest.er1
9947 ac_status=$?
9948 grep -v '^ *+' conftest.er1 >conftest.err
9949 rm -f conftest.er1
9950 cat conftest.err >&5
9951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9952 (exit $ac_status); } &&
b4e70030
JB
9953 { ac_try='test -z "$ac_c_werror_flag"
9954 || test ! -s conftest.err'
bec39cab
AC
9955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9956 (eval $ac_try) 2>&5
9957 ac_status=$?
9958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9959 (exit $ac_status); }; } &&
9960 { ac_try='test -s conftest.$ac_objext'
9961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9962 (eval $ac_try) 2>&5
9963 ac_status=$?
9964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9965 (exit $ac_status); }; }; then
9966 ac_header_compiler=yes
9967else
9968 echo "$as_me: failed program was:" >&5
9969sed 's/^/| /' conftest.$ac_ext >&5
9970
b4e70030 9971ac_header_compiler=no
bec39cab
AC
9972fi
9973rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
9974echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9975echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
9976
9977# Is the header present?
b4e70030
JB
9978echo "$as_me:$LINENO: checking $ac_header presence" >&5
9979echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
9980cat >conftest.$ac_ext <<_ACEOF
9981/* confdefs.h. */
9982_ACEOF
9983cat confdefs.h >>conftest.$ac_ext
9984cat >>conftest.$ac_ext <<_ACEOF
9985/* end confdefs.h. */
9986#include <$ac_header>
9987_ACEOF
9988if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9989 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9990 ac_status=$?
9991 grep -v '^ *+' conftest.er1 >conftest.err
9992 rm -f conftest.er1
9993 cat conftest.err >&5
9994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9995 (exit $ac_status); } >/dev/null; then
9996 if test -s conftest.err; then
9997 ac_cpp_err=$ac_c_preproc_warn_flag
9998 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9999 else
10000 ac_cpp_err=
10001 fi
10002else
10003 ac_cpp_err=yes
3b78cdbb 10004fi
bec39cab
AC
10005if test -z "$ac_cpp_err"; then
10006 ac_header_preproc=yes
10007else
10008 echo "$as_me: failed program was:" >&5
10009sed 's/^/| /' conftest.$ac_ext >&5
10010
10011 ac_header_preproc=no
3b78cdbb 10012fi
bec39cab 10013rm -f conftest.err conftest.$ac_ext
b4e70030
JB
10014echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10015echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
10016
10017# So? What about this header?
10018case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10019 yes:no: )
10020 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10021echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10022 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10023echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10024 ac_header_preproc=yes
10025 ;;
10026 no:yes:* )
10027 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10028echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10029 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10030echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10031 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10032echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10033 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10034echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
10035 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10036echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10037 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10038echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
10039 (
10040 cat <<\_ASBOX
10041## ------------------------------------------ ##
10042## Report this to the AC_PACKAGE_NAME lists. ##
10043## ------------------------------------------ ##
10044_ASBOX
10045 ) |
10046 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
10047 ;;
10048esac
b4e70030
JB
10049echo "$as_me:$LINENO: checking for $ac_header" >&5
10050echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10051if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 10052 echo $ECHO_N "(cached) $ECHO_C" >&6
3b78cdbb 10053else
bec39cab
AC
10054 eval "$as_ac_Header=\$ac_header_preproc"
10055fi
b4e70030
JB
10056echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10057echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 10058
3b78cdbb 10059fi
bec39cab
AC
10060if test `eval echo '${'$as_ac_Header'}'` = yes; then
10061 cat >>confdefs.h <<_ACEOF
10062#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10063_ACEOF
10064
10065fi
10066
3b78cdbb
DA
10067done
10068
c906108c 10069
065a1afc
JB
10070for ac_header in term.h
10071do
10072as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
10073echo "$as_me:$LINENO: checking for $ac_header" >&5
10074echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10075if eval "test \"\${$as_ac_Header+set}\" = set"; then
065a1afc
JB
10076 echo $ECHO_N "(cached) $ECHO_C" >&6
10077else
10078 cat >conftest.$ac_ext <<_ACEOF
10079/* confdefs.h. */
10080_ACEOF
10081cat confdefs.h >>conftest.$ac_ext
10082cat >>conftest.$ac_ext <<_ACEOF
10083/* end confdefs.h. */
10084#if HAVE_CURSES_H
10085# include <curses.h>
10086#endif
10087
10088
10089#include <$ac_header>
10090_ACEOF
10091rm -f conftest.$ac_objext
10092if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10093 (eval $ac_compile) 2>conftest.er1
10094 ac_status=$?
10095 grep -v '^ *+' conftest.er1 >conftest.err
10096 rm -f conftest.er1
10097 cat conftest.err >&5
10098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10099 (exit $ac_status); } &&
b4e70030
JB
10100 { ac_try='test -z "$ac_c_werror_flag"
10101 || test ! -s conftest.err'
065a1afc
JB
10102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10103 (eval $ac_try) 2>&5
10104 ac_status=$?
10105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10106 (exit $ac_status); }; } &&
10107 { ac_try='test -s conftest.$ac_objext'
10108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10109 (eval $ac_try) 2>&5
10110 ac_status=$?
10111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10112 (exit $ac_status); }; }; then
10113 eval "$as_ac_Header=yes"
10114else
10115 echo "$as_me: failed program was:" >&5
10116sed 's/^/| /' conftest.$ac_ext >&5
10117
b4e70030 10118eval "$as_ac_Header=no"
065a1afc
JB
10119fi
10120rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10121fi
b4e70030
JB
10122echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10123echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
065a1afc
JB
10124if test `eval echo '${'$as_ac_Header'}'` = yes; then
10125 cat >>confdefs.h <<_ACEOF
10126#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10127_ACEOF
10128
10129fi
10130
10131done
10132
10133
5ee754fc
MK
10134# FIXME: kettenis/20030102: In most cases we include these
10135# unconditionally, so what's the point in checking these?
bec39cab
AC
10136
10137
10138for ac_header in ctype.h time.h
c906108c 10139do
bec39cab 10140as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
10141if eval "test \"\${$as_ac_Header+set}\" = set"; then
10142 echo "$as_me:$LINENO: checking for $ac_header" >&5
10143echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10144if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
10145 echo $ECHO_N "(cached) $ECHO_C" >&6
10146fi
b4e70030
JB
10147echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10148echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
10149else
10150 # Is the header compilable?
b4e70030
JB
10151echo "$as_me:$LINENO: checking $ac_header usability" >&5
10152echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
10153cat >conftest.$ac_ext <<_ACEOF
10154/* confdefs.h. */
10155_ACEOF
10156cat confdefs.h >>conftest.$ac_ext
10157cat >>conftest.$ac_ext <<_ACEOF
10158/* end confdefs.h. */
10159$ac_includes_default
10160#include <$ac_header>
10161_ACEOF
10162rm -f conftest.$ac_objext
10163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10164 (eval $ac_compile) 2>conftest.er1
10165 ac_status=$?
10166 grep -v '^ *+' conftest.er1 >conftest.err
10167 rm -f conftest.er1
10168 cat conftest.err >&5
10169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10170 (exit $ac_status); } &&
b4e70030
JB
10171 { ac_try='test -z "$ac_c_werror_flag"
10172 || test ! -s conftest.err'
bec39cab
AC
10173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10174 (eval $ac_try) 2>&5
10175 ac_status=$?
10176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10177 (exit $ac_status); }; } &&
10178 { ac_try='test -s conftest.$ac_objext'
10179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10180 (eval $ac_try) 2>&5
10181 ac_status=$?
10182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10183 (exit $ac_status); }; }; then
10184 ac_header_compiler=yes
10185else
10186 echo "$as_me: failed program was:" >&5
10187sed 's/^/| /' conftest.$ac_ext >&5
10188
b4e70030 10189ac_header_compiler=no
bec39cab
AC
10190fi
10191rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
10192echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10193echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
10194
10195# Is the header present?
b4e70030
JB
10196echo "$as_me:$LINENO: checking $ac_header presence" >&5
10197echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
10198cat >conftest.$ac_ext <<_ACEOF
10199/* confdefs.h. */
10200_ACEOF
10201cat confdefs.h >>conftest.$ac_ext
10202cat >>conftest.$ac_ext <<_ACEOF
10203/* end confdefs.h. */
10204#include <$ac_header>
10205_ACEOF
10206if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10207 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10208 ac_status=$?
10209 grep -v '^ *+' conftest.er1 >conftest.err
10210 rm -f conftest.er1
10211 cat conftest.err >&5
10212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10213 (exit $ac_status); } >/dev/null; then
10214 if test -s conftest.err; then
10215 ac_cpp_err=$ac_c_preproc_warn_flag
10216 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10217 else
10218 ac_cpp_err=
10219 fi
10220else
10221 ac_cpp_err=yes
c906108c 10222fi
bec39cab
AC
10223if test -z "$ac_cpp_err"; then
10224 ac_header_preproc=yes
10225else
10226 echo "$as_me: failed program was:" >&5
10227sed 's/^/| /' conftest.$ac_ext >&5
10228
10229 ac_header_preproc=no
c906108c 10230fi
bec39cab 10231rm -f conftest.err conftest.$ac_ext
b4e70030
JB
10232echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10233echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
10234
10235# So? What about this header?
10236case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10237 yes:no: )
10238 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10239echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10240 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10241echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10242 ac_header_preproc=yes
10243 ;;
10244 no:yes:* )
10245 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10246echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10247 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10248echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10249 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10250echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10251 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10252echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
10253 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10254echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10255 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10256echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
10257 (
10258 cat <<\_ASBOX
10259## ------------------------------------------ ##
10260## Report this to the AC_PACKAGE_NAME lists. ##
10261## ------------------------------------------ ##
10262_ASBOX
10263 ) |
10264 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
10265 ;;
10266esac
b4e70030
JB
10267echo "$as_me:$LINENO: checking for $ac_header" >&5
10268echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10269if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 10270 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 10271else
bec39cab
AC
10272 eval "$as_ac_Header=\$ac_header_preproc"
10273fi
b4e70030
JB
10274echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10275echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
10276
10277fi
10278if test `eval echo '${'$as_ac_Header'}'` = yes; then
10279 cat >>confdefs.h <<_ACEOF
10280#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10281_ACEOF
10282
c906108c 10283fi
bec39cab 10284
c906108c
SS
10285done
10286
5ee754fc 10287
4e8d927d 10288# Create a header we can use portably to get the standard integer types.
666ec76f 10289
4e8d927d
DJ
10290
10291inttype_headers=`echo inttypes.h sys/inttypes.h | sed -e 's/,/ /g'`
10292
10293acx_cv_header_stdint=stddef.h
10294acx_cv_header_stdint_kind="(already complete)"
10295for i in stdint.h $inttype_headers; do
10296 unset ac_cv_type_uintptr_t
10297 unset ac_cv_type_uintmax_t
10298 unset ac_cv_type_int_least32_t
10299 unset ac_cv_type_int_fast32_t
10300 unset ac_cv_type_uint64_t
10301 echo $ECHO_N "looking for a compliant stdint.h in $i, $ECHO_C" >&6
b4e70030
JB
10302 echo "$as_me:$LINENO: checking for uintmax_t" >&5
10303echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6
4e8d927d 10304if test "${ac_cv_type_uintmax_t+set}" = set; then
bec39cab 10305 echo $ECHO_N "(cached) $ECHO_C" >&6
40a7debc 10306else
bec39cab
AC
10307 cat >conftest.$ac_ext <<_ACEOF
10308/* confdefs.h. */
10309_ACEOF
10310cat confdefs.h >>conftest.$ac_ext
10311cat >>conftest.$ac_ext <<_ACEOF
10312/* end confdefs.h. */
4e8d927d
DJ
10313#include <sys/types.h>
10314#include <$i>
10315
bec39cab
AC
10316int
10317main ()
10318{
b4e70030 10319if ((uintmax_t *) 0)
4e8d927d 10320 return 0;
b4e70030 10321if (sizeof (uintmax_t))
4e8d927d
DJ
10322 return 0;
10323 ;
bec39cab
AC
10324 return 0;
10325}
10326_ACEOF
10327rm -f conftest.$ac_objext
10328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10329 (eval $ac_compile) 2>conftest.er1
10330 ac_status=$?
10331 grep -v '^ *+' conftest.er1 >conftest.err
10332 rm -f conftest.er1
10333 cat conftest.err >&5
10334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10335 (exit $ac_status); } &&
b4e70030
JB
10336 { ac_try='test -z "$ac_c_werror_flag"
10337 || test ! -s conftest.err'
bec39cab
AC
10338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10339 (eval $ac_try) 2>&5
10340 ac_status=$?
10341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10342 (exit $ac_status); }; } &&
10343 { ac_try='test -s conftest.$ac_objext'
10344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10345 (eval $ac_try) 2>&5
10346 ac_status=$?
10347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10348 (exit $ac_status); }; }; then
4e8d927d 10349 ac_cv_type_uintmax_t=yes
40a7debc 10350else
bec39cab
AC
10351 echo "$as_me: failed program was:" >&5
10352sed 's/^/| /' conftest.$ac_ext >&5
10353
b4e70030 10354ac_cv_type_uintmax_t=no
40a7debc 10355fi
bec39cab 10356rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
40a7debc 10357fi
b4e70030
JB
10358echo "$as_me:$LINENO: result: $ac_cv_type_uintmax_t" >&5
10359echo "${ECHO_T}$ac_cv_type_uintmax_t" >&6
4e8d927d
DJ
10360if test $ac_cv_type_uintmax_t = yes; then
10361 acx_cv_header_stdint=$i
666ec76f 10362else
4e8d927d 10363 continue
666ec76f 10364fi
4e8d927d 10365
b4e70030
JB
10366 echo "$as_me:$LINENO: checking for uintptr_t" >&5
10367echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
4e8d927d 10368if test "${ac_cv_type_uintptr_t+set}" = set; then
bec39cab
AC
10369 echo $ECHO_N "(cached) $ECHO_C" >&6
10370else
10371 cat >conftest.$ac_ext <<_ACEOF
10372/* confdefs.h. */
10373_ACEOF
10374cat confdefs.h >>conftest.$ac_ext
10375cat >>conftest.$ac_ext <<_ACEOF
10376/* end confdefs.h. */
4e8d927d
DJ
10377#include <sys/types.h>
10378#include <$i>
10379
666ec76f
MK
10380int
10381main ()
10382{
b4e70030 10383if ((uintptr_t *) 0)
4e8d927d 10384 return 0;
b4e70030 10385if (sizeof (uintptr_t))
4e8d927d 10386 return 0;
666ec76f
MK
10387 ;
10388 return 0;
10389}
10390_ACEOF
10391rm -f conftest.$ac_objext
10392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10393 (eval $ac_compile) 2>conftest.er1
10394 ac_status=$?
10395 grep -v '^ *+' conftest.er1 >conftest.err
10396 rm -f conftest.er1
10397 cat conftest.err >&5
10398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10399 (exit $ac_status); } &&
b4e70030
JB
10400 { ac_try='test -z "$ac_c_werror_flag"
10401 || test ! -s conftest.err'
666ec76f
MK
10402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10403 (eval $ac_try) 2>&5
10404 ac_status=$?
10405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10406 (exit $ac_status); }; } &&
10407 { ac_try='test -s conftest.$ac_objext'
10408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10409 (eval $ac_try) 2>&5
10410 ac_status=$?
10411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10412 (exit $ac_status); }; }; then
4e8d927d 10413 ac_cv_type_uintptr_t=yes
666ec76f
MK
10414else
10415 echo "$as_me: failed program was:" >&5
10416sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 10417
b4e70030 10418ac_cv_type_uintptr_t=no
a3828db0
MK
10419fi
10420rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10421fi
b4e70030
JB
10422echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
10423echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
4e8d927d
DJ
10424if test $ac_cv_type_uintptr_t = yes; then
10425 :
a3828db0 10426else
4e8d927d 10427 acx_cv_header_stdint_kind="(mostly complete)"
a3828db0 10428fi
4e8d927d 10429
b4e70030
JB
10430 echo "$as_me:$LINENO: checking for int_least32_t" >&5
10431echo $ECHO_N "checking for int_least32_t... $ECHO_C" >&6
4e8d927d 10432if test "${ac_cv_type_int_least32_t+set}" = set; then
a3828db0
MK
10433 echo $ECHO_N "(cached) $ECHO_C" >&6
10434else
10435 cat >conftest.$ac_ext <<_ACEOF
666ec76f
MK
10436/* confdefs.h. */
10437_ACEOF
10438cat confdefs.h >>conftest.$ac_ext
10439cat >>conftest.$ac_ext <<_ACEOF
10440/* end confdefs.h. */
4e8d927d
DJ
10441#include <sys/types.h>
10442#include <$i>
10443
bec39cab
AC
10444int
10445main ()
10446{
b4e70030 10447if ((int_least32_t *) 0)
4e8d927d 10448 return 0;
b4e70030 10449if (sizeof (int_least32_t))
4e8d927d 10450 return 0;
bec39cab
AC
10451 ;
10452 return 0;
10453}
10454_ACEOF
10455rm -f conftest.$ac_objext
10456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10457 (eval $ac_compile) 2>conftest.er1
10458 ac_status=$?
10459 grep -v '^ *+' conftest.er1 >conftest.err
10460 rm -f conftest.er1
10461 cat conftest.err >&5
10462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10463 (exit $ac_status); } &&
b4e70030
JB
10464 { ac_try='test -z "$ac_c_werror_flag"
10465 || test ! -s conftest.err'
bec39cab
AC
10466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10467 (eval $ac_try) 2>&5
10468 ac_status=$?
10469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10470 (exit $ac_status); }; } &&
10471 { ac_try='test -s conftest.$ac_objext'
10472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10473 (eval $ac_try) 2>&5
10474 ac_status=$?
10475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10476 (exit $ac_status); }; }; then
4e8d927d 10477 ac_cv_type_int_least32_t=yes
b9362cc7 10478else
bec39cab
AC
10479 echo "$as_me: failed program was:" >&5
10480sed 's/^/| /' conftest.$ac_ext >&5
10481
b4e70030 10482ac_cv_type_int_least32_t=no
b9362cc7 10483fi
bec39cab 10484rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b9362cc7 10485fi
b4e70030
JB
10486echo "$as_me:$LINENO: result: $ac_cv_type_int_least32_t" >&5
10487echo "${ECHO_T}$ac_cv_type_int_least32_t" >&6
4e8d927d
DJ
10488if test $ac_cv_type_int_least32_t = yes; then
10489 :
a3828db0 10490else
4e8d927d 10491 acx_cv_header_stdint_kind="(mostly complete)"
a3828db0 10492fi
5ee754fc 10493
b4e70030
JB
10494 echo "$as_me:$LINENO: checking for int_fast32_t" >&5
10495echo $ECHO_N "checking for int_fast32_t... $ECHO_C" >&6
4e8d927d 10496if test "${ac_cv_type_int_fast32_t+set}" = set; then
bec39cab
AC
10497 echo $ECHO_N "(cached) $ECHO_C" >&6
10498else
10499 cat >conftest.$ac_ext <<_ACEOF
10500/* confdefs.h. */
10501_ACEOF
10502cat confdefs.h >>conftest.$ac_ext
10503cat >>conftest.$ac_ext <<_ACEOF
10504/* end confdefs.h. */
4e8d927d
DJ
10505#include <sys/types.h>
10506#include <$i>
10507
bec39cab
AC
10508int
10509main ()
10510{
b4e70030 10511if ((int_fast32_t *) 0)
4e8d927d 10512 return 0;
b4e70030 10513if (sizeof (int_fast32_t))
4e8d927d 10514 return 0;
bec39cab
AC
10515 ;
10516 return 0;
10517}
10518_ACEOF
10519rm -f conftest.$ac_objext
10520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10521 (eval $ac_compile) 2>conftest.er1
10522 ac_status=$?
10523 grep -v '^ *+' conftest.er1 >conftest.err
10524 rm -f conftest.er1
10525 cat conftest.err >&5
10526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10527 (exit $ac_status); } &&
b4e70030
JB
10528 { ac_try='test -z "$ac_c_werror_flag"
10529 || test ! -s conftest.err'
bec39cab
AC
10530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10531 (eval $ac_try) 2>&5
10532 ac_status=$?
10533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10534 (exit $ac_status); }; } &&
10535 { ac_try='test -s conftest.$ac_objext'
10536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10537 (eval $ac_try) 2>&5
10538 ac_status=$?
10539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10540 (exit $ac_status); }; }; then
4e8d927d 10541 ac_cv_type_int_fast32_t=yes
c906108c 10542else
bec39cab
AC
10543 echo "$as_me: failed program was:" >&5
10544sed 's/^/| /' conftest.$ac_ext >&5
10545
b4e70030 10546ac_cv_type_int_fast32_t=no
c906108c 10547fi
bec39cab 10548rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10549fi
b4e70030
JB
10550echo "$as_me:$LINENO: result: $ac_cv_type_int_fast32_t" >&5
10551echo "${ECHO_T}$ac_cv_type_int_fast32_t" >&6
4e8d927d
DJ
10552if test $ac_cv_type_int_fast32_t = yes; then
10553 :
a3828db0 10554else
4e8d927d 10555 acx_cv_header_stdint_kind="(mostly complete)"
a3828db0 10556fi
4e8d927d 10557
b4e70030
JB
10558 echo "$as_me:$LINENO: checking for uint64_t" >&5
10559echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6
4e8d927d 10560if test "${ac_cv_type_uint64_t+set}" = set; then
bec39cab
AC
10561 echo $ECHO_N "(cached) $ECHO_C" >&6
10562else
10563 cat >conftest.$ac_ext <<_ACEOF
10564/* confdefs.h. */
10565_ACEOF
10566cat confdefs.h >>conftest.$ac_ext
10567cat >>conftest.$ac_ext <<_ACEOF
10568/* end confdefs.h. */
4e8d927d
DJ
10569#include <sys/types.h>
10570#include <$i>
10571
bec39cab
AC
10572int
10573main ()
10574{
b4e70030 10575if ((uint64_t *) 0)
4e8d927d 10576 return 0;
b4e70030 10577if (sizeof (uint64_t))
4e8d927d 10578 return 0;
bec39cab
AC
10579 ;
10580 return 0;
10581}
10582_ACEOF
10583rm -f conftest.$ac_objext
10584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10585 (eval $ac_compile) 2>conftest.er1
10586 ac_status=$?
10587 grep -v '^ *+' conftest.er1 >conftest.err
10588 rm -f conftest.er1
10589 cat conftest.err >&5
10590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10591 (exit $ac_status); } &&
b4e70030
JB
10592 { ac_try='test -z "$ac_c_werror_flag"
10593 || test ! -s conftest.err'
bec39cab
AC
10594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10595 (eval $ac_try) 2>&5
10596 ac_status=$?
10597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10598 (exit $ac_status); }; } &&
10599 { ac_try='test -s conftest.$ac_objext'
10600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10601 (eval $ac_try) 2>&5
10602 ac_status=$?
10603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10604 (exit $ac_status); }; }; then
4e8d927d 10605 ac_cv_type_uint64_t=yes
c906108c 10606else
bec39cab
AC
10607 echo "$as_me: failed program was:" >&5
10608sed 's/^/| /' conftest.$ac_ext >&5
10609
b4e70030 10610ac_cv_type_uint64_t=no
c906108c 10611fi
bec39cab 10612rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10613fi
b4e70030
JB
10614echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
10615echo "${ECHO_T}$ac_cv_type_uint64_t" >&6
4e8d927d
DJ
10616if test $ac_cv_type_uint64_t = yes; then
10617 :
a3828db0 10618else
4e8d927d 10619 acx_cv_header_stdint_kind="(lacks uint64_t)"
c906108c
SS
10620fi
10621
4e8d927d
DJ
10622 break
10623done
10624if test "$acx_cv_header_stdint" = stddef.h; then
10625 acx_cv_header_stdint_kind="(lacks uintptr_t)"
10626 for i in stdint.h $inttype_headers; do
10627 unset ac_cv_type_uint32_t
10628 unset ac_cv_type_uint64_t
10629 echo $ECHO_N "looking for an incomplete stdint.h in $i, $ECHO_C" >&6
b4e70030
JB
10630 echo "$as_me:$LINENO: checking for uint32_t" >&5
10631echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6
4e8d927d 10632if test "${ac_cv_type_uint32_t+set}" = set; then
bec39cab 10633 echo $ECHO_N "(cached) $ECHO_C" >&6
bce58c09 10634else
bec39cab
AC
10635 cat >conftest.$ac_ext <<_ACEOF
10636/* confdefs.h. */
10637_ACEOF
10638cat confdefs.h >>conftest.$ac_ext
10639cat >>conftest.$ac_ext <<_ACEOF
10640/* end confdefs.h. */
4e8d927d
DJ
10641#include <sys/types.h>
10642#include <$i>
10643
a3828db0
MK
10644int
10645main ()
10646{
b4e70030 10647if ((uint32_t *) 0)
4e8d927d 10648 return 0;
b4e70030 10649if (sizeof (uint32_t))
4e8d927d 10650 return 0;
a3828db0
MK
10651 ;
10652 return 0;
10653}
bec39cab
AC
10654_ACEOF
10655rm -f conftest.$ac_objext
10656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10657 (eval $ac_compile) 2>conftest.er1
10658 ac_status=$?
10659 grep -v '^ *+' conftest.er1 >conftest.err
10660 rm -f conftest.er1
10661 cat conftest.err >&5
10662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10663 (exit $ac_status); } &&
b4e70030
JB
10664 { ac_try='test -z "$ac_c_werror_flag"
10665 || test ! -s conftest.err'
bec39cab
AC
10666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10667 (eval $ac_try) 2>&5
10668 ac_status=$?
10669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10670 (exit $ac_status); }; } &&
10671 { ac_try='test -s conftest.$ac_objext'
10672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10673 (eval $ac_try) 2>&5
10674 ac_status=$?
10675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10676 (exit $ac_status); }; }; then
4e8d927d 10677 ac_cv_type_uint32_t=yes
bce58c09 10678else
bec39cab
AC
10679 echo "$as_me: failed program was:" >&5
10680sed 's/^/| /' conftest.$ac_ext >&5
10681
b4e70030 10682ac_cv_type_uint32_t=no
bce58c09 10683fi
bec39cab 10684rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bce58c09 10685fi
b4e70030
JB
10686echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
10687echo "${ECHO_T}$ac_cv_type_uint32_t" >&6
4e8d927d
DJ
10688if test $ac_cv_type_uint32_t = yes; then
10689 acx_cv_header_stdint=$i
a3828db0 10690else
4e8d927d 10691 continue
e5a7de23 10692fi
4e8d927d 10693
b4e70030
JB
10694 echo "$as_me:$LINENO: checking for uint64_t" >&5
10695echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6
4e8d927d 10696if test "${ac_cv_type_uint64_t+set}" = set; then
e5a7de23
EZ
10697 echo $ECHO_N "(cached) $ECHO_C" >&6
10698else
10699 cat >conftest.$ac_ext <<_ACEOF
10700/* confdefs.h. */
10701_ACEOF
10702cat confdefs.h >>conftest.$ac_ext
10703cat >>conftest.$ac_ext <<_ACEOF
10704/* end confdefs.h. */
4e8d927d
DJ
10705#include <sys/types.h>
10706#include <$i>
10707
e5a7de23
EZ
10708int
10709main ()
10710{
b4e70030 10711if ((uint64_t *) 0)
4e8d927d 10712 return 0;
b4e70030 10713if (sizeof (uint64_t))
4e8d927d 10714 return 0;
e5a7de23
EZ
10715 ;
10716 return 0;
10717}
10718_ACEOF
10719rm -f conftest.$ac_objext
10720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10721 (eval $ac_compile) 2>conftest.er1
10722 ac_status=$?
10723 grep -v '^ *+' conftest.er1 >conftest.err
10724 rm -f conftest.er1
10725 cat conftest.err >&5
10726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10727 (exit $ac_status); } &&
b4e70030
JB
10728 { ac_try='test -z "$ac_c_werror_flag"
10729 || test ! -s conftest.err'
e5a7de23
EZ
10730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10731 (eval $ac_try) 2>&5
10732 ac_status=$?
10733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10734 (exit $ac_status); }; } &&
10735 { ac_try='test -s conftest.$ac_objext'
10736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10737 (eval $ac_try) 2>&5
10738 ac_status=$?
10739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10740 (exit $ac_status); }; }; then
4e8d927d 10741 ac_cv_type_uint64_t=yes
e5a7de23
EZ
10742else
10743 echo "$as_me: failed program was:" >&5
10744sed 's/^/| /' conftest.$ac_ext >&5
10745
b4e70030 10746ac_cv_type_uint64_t=no
e5a7de23
EZ
10747fi
10748rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10749fi
b4e70030
JB
10750echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
10751echo "${ECHO_T}$ac_cv_type_uint64_t" >&6
4e8d927d
DJ
10752if test $ac_cv_type_uint64_t = yes; then
10753 :
e5a7de23 10754else
4e8d927d
DJ
10755 acx_cv_header_stdint_kind="(lacks uintptr_t and uint64_t)"
10756fi
e5a7de23 10757
4e8d927d
DJ
10758 break
10759 done
e5a7de23 10760fi
4e8d927d
DJ
10761if test "$acx_cv_header_stdint" = stddef.h; then
10762 acx_cv_header_stdint_kind="(u_intXX_t style)"
10763 for i in sys/types.h $inttype_headers; do
10764 unset ac_cv_type_u_int32_t
10765 unset ac_cv_type_u_int64_t
10766 echo $ECHO_N "looking for u_intXX_t types in $i, $ECHO_C" >&6
b4e70030
JB
10767 echo "$as_me:$LINENO: checking for u_int32_t" >&5
10768echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6
4e8d927d 10769if test "${ac_cv_type_u_int32_t+set}" = set; then
e5a7de23
EZ
10770 echo $ECHO_N "(cached) $ECHO_C" >&6
10771else
10772 cat >conftest.$ac_ext <<_ACEOF
10773/* confdefs.h. */
10774_ACEOF
10775cat confdefs.h >>conftest.$ac_ext
10776cat >>conftest.$ac_ext <<_ACEOF
10777/* end confdefs.h. */
4e8d927d
DJ
10778#include <sys/types.h>
10779#include <$i>
10780
e5a7de23
EZ
10781int
10782main ()
10783{
b4e70030 10784if ((u_int32_t *) 0)
4e8d927d 10785 return 0;
b4e70030 10786if (sizeof (u_int32_t))
4e8d927d 10787 return 0;
e5a7de23
EZ
10788 ;
10789 return 0;
10790}
10791_ACEOF
10792rm -f conftest.$ac_objext
10793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10794 (eval $ac_compile) 2>conftest.er1
10795 ac_status=$?
10796 grep -v '^ *+' conftest.er1 >conftest.err
10797 rm -f conftest.er1
10798 cat conftest.err >&5
10799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10800 (exit $ac_status); } &&
b4e70030
JB
10801 { ac_try='test -z "$ac_c_werror_flag"
10802 || test ! -s conftest.err'
e5a7de23
EZ
10803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10804 (eval $ac_try) 2>&5
10805 ac_status=$?
10806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10807 (exit $ac_status); }; } &&
10808 { ac_try='test -s conftest.$ac_objext'
10809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10810 (eval $ac_try) 2>&5
10811 ac_status=$?
10812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10813 (exit $ac_status); }; }; then
4e8d927d 10814 ac_cv_type_u_int32_t=yes
e5a7de23
EZ
10815else
10816 echo "$as_me: failed program was:" >&5
10817sed 's/^/| /' conftest.$ac_ext >&5
10818
b4e70030 10819ac_cv_type_u_int32_t=no
e5a7de23
EZ
10820fi
10821rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10822fi
b4e70030
JB
10823echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5
10824echo "${ECHO_T}$ac_cv_type_u_int32_t" >&6
4e8d927d
DJ
10825if test $ac_cv_type_u_int32_t = yes; then
10826 acx_cv_header_stdint=$i
e5a7de23 10827else
4e8d927d 10828 continue
a3828db0 10829fi
5ee754fc 10830
b4e70030
JB
10831 echo "$as_me:$LINENO: checking for u_int64_t" >&5
10832echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6
4e8d927d 10833if test "${ac_cv_type_u_int64_t+set}" = set; then
bec39cab
AC
10834 echo $ECHO_N "(cached) $ECHO_C" >&6
10835else
10836 cat >conftest.$ac_ext <<_ACEOF
10837/* confdefs.h. */
10838_ACEOF
10839cat confdefs.h >>conftest.$ac_ext
10840cat >>conftest.$ac_ext <<_ACEOF
10841/* end confdefs.h. */
4e8d927d
DJ
10842#include <sys/types.h>
10843#include <$i>
10844
bec39cab
AC
10845int
10846main ()
10847{
b4e70030 10848if ((u_int64_t *) 0)
4e8d927d 10849 return 0;
b4e70030 10850if (sizeof (u_int64_t))
4e8d927d 10851 return 0;
bec39cab
AC
10852 ;
10853 return 0;
10854}
10855_ACEOF
a3828db0
MK
10856rm -f conftest.$ac_objext
10857if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10858 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
10859 ac_status=$?
10860 grep -v '^ *+' conftest.er1 >conftest.err
10861 rm -f conftest.er1
10862 cat conftest.err >&5
10863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10864 (exit $ac_status); } &&
b4e70030
JB
10865 { ac_try='test -z "$ac_c_werror_flag"
10866 || test ! -s conftest.err'
bec39cab
AC
10867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10868 (eval $ac_try) 2>&5
10869 ac_status=$?
10870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10871 (exit $ac_status); }; } &&
a3828db0 10872 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
10873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10874 (eval $ac_try) 2>&5
10875 ac_status=$?
10876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10877 (exit $ac_status); }; }; then
4e8d927d 10878 ac_cv_type_u_int64_t=yes
bec39cab
AC
10879else
10880 echo "$as_me: failed program was:" >&5
10881sed 's/^/| /' conftest.$ac_ext >&5
10882
b4e70030 10883ac_cv_type_u_int64_t=no
4e8d927d 10884fi
4e8d927d
DJ
10885rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10886fi
b4e70030
JB
10887echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5
10888echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6
4e8d927d
DJ
10889if test $ac_cv_type_u_int64_t = yes; then
10890 :
10891else
10892 acx_cv_header_stdint_kind="(u_intXX_t style, lacks u_int64_t)"
10893fi
10894
10895 break
10896 done
10897fi
10898if test "$acx_cv_header_stdint" = stddef.h; then
10899 acx_cv_header_stdint_kind="(using manual detection)"
10900fi
10901
10902test -z "$ac_cv_type_uintptr_t" && ac_cv_type_uintptr_t=no
10903test -z "$ac_cv_type_uint64_t" && ac_cv_type_uint64_t=no
10904test -z "$ac_cv_type_u_int64_t" && ac_cv_type_u_int64_t=no
10905test -z "$ac_cv_type_int_least32_t" && ac_cv_type_int_least32_t=no
10906test -z "$ac_cv_type_int_fast32_t" && ac_cv_type_int_fast32_t=no
10907
10908# ----------------- Summarize what we found so far
10909
b4e70030
JB
10910echo "$as_me:$LINENO: checking what to include in gdb_stdint.h" >&5
10911echo $ECHO_N "checking what to include in gdb_stdint.h... $ECHO_C" >&6
4e8d927d 10912
b4e70030 10913case `$as_basename gdb_stdint.h ||
4e8d927d
DJ
10914$as_expr X/gdb_stdint.h : '.*/\([^/][^/]*\)/*$' \| \
10915 Xgdb_stdint.h : 'X\(//\)$' \| \
b4e70030
JB
10916 Xgdb_stdint.h : 'X\(/\)$' \| \
10917 . : '\(.\)' 2>/dev/null ||
4e8d927d 10918echo X/gdb_stdint.h |
b4e70030
JB
10919 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
10920 /^X\/\(\/\/\)$/{ s//\1/; q; }
10921 /^X\/\(\/\).*/{ s//\1/; q; }
10922 s/.*/./; q'` in
4e8d927d
DJ
10923 stdint.h) { echo "$as_me:$LINENO: WARNING: are you sure you want it there?" >&5
10924echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;;
10925 inttypes.h) { echo "$as_me:$LINENO: WARNING: are you sure you want it there?" >&5
10926echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;;
10927 *) ;;
10928esac
10929
b4e70030
JB
10930echo "$as_me:$LINENO: result: $acx_cv_header_stdint $acx_cv_header_stdint_kind" >&5
10931echo "${ECHO_T}$acx_cv_header_stdint $acx_cv_header_stdint_kind" >&6
4e8d927d
DJ
10932
10933# ----------------- done included file, check C basic types --------
10934
10935# Lacking an uintptr_t? Test size of void *
10936case "$acx_cv_header_stdint:$ac_cv_type_uintptr_t" in
b4e70030
JB
10937 stddef.h:* | *:no) echo "$as_me:$LINENO: checking for void *" >&5
10938echo $ECHO_N "checking for void *... $ECHO_C" >&6
4e8d927d
DJ
10939if test "${ac_cv_type_void_p+set}" = set; then
10940 echo $ECHO_N "(cached) $ECHO_C" >&6
10941else
10942 cat >conftest.$ac_ext <<_ACEOF
a3828db0 10943/* confdefs.h. */
bec39cab
AC
10944_ACEOF
10945cat confdefs.h >>conftest.$ac_ext
10946cat >>conftest.$ac_ext <<_ACEOF
10947/* end confdefs.h. */
a3828db0 10948$ac_includes_default
bec39cab
AC
10949int
10950main ()
10951{
b4e70030 10952if ((void * *) 0)
4e8d927d 10953 return 0;
b4e70030 10954if (sizeof (void *))
4e8d927d 10955 return 0;
bec39cab
AC
10956 ;
10957 return 0;
10958}
10959_ACEOF
a3828db0
MK
10960rm -f conftest.$ac_objext
10961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10962 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
10963 ac_status=$?
10964 grep -v '^ *+' conftest.er1 >conftest.err
10965 rm -f conftest.er1
10966 cat conftest.err >&5
10967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10968 (exit $ac_status); } &&
b4e70030
JB
10969 { ac_try='test -z "$ac_c_werror_flag"
10970 || test ! -s conftest.err'
bec39cab
AC
10971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10972 (eval $ac_try) 2>&5
10973 ac_status=$?
10974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10975 (exit $ac_status); }; } &&
a3828db0 10976 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
10977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10978 (eval $ac_try) 2>&5
10979 ac_status=$?
10980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10981 (exit $ac_status); }; }; then
4e8d927d 10982 ac_cv_type_void_p=yes
46711df8 10983else
bec39cab
AC
10984 echo "$as_me: failed program was:" >&5
10985sed 's/^/| /' conftest.$ac_ext >&5
10986
b4e70030 10987ac_cv_type_void_p=no
a3828db0 10988fi
4e8d927d 10989rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d3ea6809 10990fi
b4e70030
JB
10991echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
10992echo "${ECHO_T}$ac_cv_type_void_p" >&6
d3ea6809 10993
b4e70030
JB
10994echo "$as_me:$LINENO: checking size of void *" >&5
10995echo $ECHO_N "checking size of void *... $ECHO_C" >&6
4e8d927d 10996if test "${ac_cv_sizeof_void_p+set}" = set; then
d3ea6809
MM
10997 echo $ECHO_N "(cached) $ECHO_C" >&6
10998else
4e8d927d 10999 if test "$ac_cv_type_void_p" = yes; then
b4e70030 11000 # The cast to unsigned long works around a bug in the HP C Compiler
4e8d927d
DJ
11001 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11002 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11003 # This bug is HP SR number 8606223364.
11004 if test "$cross_compiling" = yes; then
11005 # Depending upon the size, compute the lo and hi bounds.
11006cat >conftest.$ac_ext <<_ACEOF
d3ea6809
MM
11007/* confdefs.h. */
11008_ACEOF
11009cat confdefs.h >>conftest.$ac_ext
11010cat >>conftest.$ac_ext <<_ACEOF
11011/* end confdefs.h. */
11012$ac_includes_default
11013int
11014main ()
11015{
b4e70030 11016static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
4e8d927d
DJ
11017test_array [0] = 0
11018
d3ea6809
MM
11019 ;
11020 return 0;
11021}
11022_ACEOF
11023rm -f conftest.$ac_objext
11024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11025 (eval $ac_compile) 2>conftest.er1
11026 ac_status=$?
11027 grep -v '^ *+' conftest.er1 >conftest.err
11028 rm -f conftest.er1
11029 cat conftest.err >&5
11030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11031 (exit $ac_status); } &&
b4e70030
JB
11032 { ac_try='test -z "$ac_c_werror_flag"
11033 || test ! -s conftest.err'
d3ea6809
MM
11034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11035 (eval $ac_try) 2>&5
11036 ac_status=$?
11037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11038 (exit $ac_status); }; } &&
11039 { ac_try='test -s conftest.$ac_objext'
11040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11041 (eval $ac_try) 2>&5
11042 ac_status=$?
11043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11044 (exit $ac_status); }; }; then
4e8d927d
DJ
11045 ac_lo=0 ac_mid=0
11046 while :; do
11047 cat >conftest.$ac_ext <<_ACEOF
d3ea6809
MM
11048/* confdefs.h. */
11049_ACEOF
11050cat confdefs.h >>conftest.$ac_ext
11051cat >>conftest.$ac_ext <<_ACEOF
11052/* end confdefs.h. */
11053$ac_includes_default
11054int
11055main ()
11056{
b4e70030 11057static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
4e8d927d
DJ
11058test_array [0] = 0
11059
d3ea6809
MM
11060 ;
11061 return 0;
11062}
11063_ACEOF
11064rm -f conftest.$ac_objext
11065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11066 (eval $ac_compile) 2>conftest.er1
11067 ac_status=$?
11068 grep -v '^ *+' conftest.er1 >conftest.err
11069 rm -f conftest.er1
11070 cat conftest.err >&5
11071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11072 (exit $ac_status); } &&
b4e70030
JB
11073 { ac_try='test -z "$ac_c_werror_flag"
11074 || test ! -s conftest.err'
d3ea6809
MM
11075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11076 (eval $ac_try) 2>&5
11077 ac_status=$?
11078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11079 (exit $ac_status); }; } &&
11080 { ac_try='test -s conftest.$ac_objext'
11081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11082 (eval $ac_try) 2>&5
11083 ac_status=$?
11084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11085 (exit $ac_status); }; }; then
4e8d927d 11086 ac_hi=$ac_mid; break
d3ea6809
MM
11087else
11088 echo "$as_me: failed program was:" >&5
11089sed 's/^/| /' conftest.$ac_ext >&5
11090
b4e70030
JB
11091ac_lo=`expr $ac_mid + 1`
11092 if test $ac_lo -le $ac_mid; then
11093 ac_lo= ac_hi=
11094 break
11095 fi
11096 ac_mid=`expr 2 '*' $ac_mid + 1`
a3828db0 11097fi
4e8d927d
DJ
11098rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11099 done
bec39cab 11100else
4e8d927d
DJ
11101 echo "$as_me: failed program was:" >&5
11102sed 's/^/| /' conftest.$ac_ext >&5
11103
b4e70030 11104cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
11105/* confdefs.h. */
11106_ACEOF
11107cat confdefs.h >>conftest.$ac_ext
11108cat >>conftest.$ac_ext <<_ACEOF
11109/* end confdefs.h. */
4e8d927d 11110$ac_includes_default
bec39cab
AC
11111int
11112main ()
11113{
b4e70030 11114static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
4e8d927d
DJ
11115test_array [0] = 0
11116
bec39cab
AC
11117 ;
11118 return 0;
11119}
11120_ACEOF
a3828db0
MK
11121rm -f conftest.$ac_objext
11122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11123 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
11124 ac_status=$?
11125 grep -v '^ *+' conftest.er1 >conftest.err
11126 rm -f conftest.er1
11127 cat conftest.err >&5
11128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11129 (exit $ac_status); } &&
b4e70030
JB
11130 { ac_try='test -z "$ac_c_werror_flag"
11131 || test ! -s conftest.err'
bec39cab
AC
11132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11133 (eval $ac_try) 2>&5
11134 ac_status=$?
11135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11136 (exit $ac_status); }; } &&
a3828db0 11137 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
11138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11139 (eval $ac_try) 2>&5
11140 ac_status=$?
11141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11142 (exit $ac_status); }; }; then
4e8d927d
DJ
11143 ac_hi=-1 ac_mid=-1
11144 while :; do
11145 cat >conftest.$ac_ext <<_ACEOF
f9f87d2c
MK
11146/* confdefs.h. */
11147_ACEOF
11148cat confdefs.h >>conftest.$ac_ext
11149cat >>conftest.$ac_ext <<_ACEOF
11150/* end confdefs.h. */
4e8d927d 11151$ac_includes_default
f9f87d2c
MK
11152int
11153main ()
11154{
b4e70030 11155static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
4e8d927d
DJ
11156test_array [0] = 0
11157
f9f87d2c
MK
11158 ;
11159 return 0;
11160}
11161_ACEOF
11162rm -f conftest.$ac_objext
11163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11164 (eval $ac_compile) 2>conftest.er1
11165 ac_status=$?
11166 grep -v '^ *+' conftest.er1 >conftest.err
11167 rm -f conftest.er1
11168 cat conftest.err >&5
11169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11170 (exit $ac_status); } &&
b4e70030
JB
11171 { ac_try='test -z "$ac_c_werror_flag"
11172 || test ! -s conftest.err'
f9f87d2c
MK
11173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11174 (eval $ac_try) 2>&5
11175 ac_status=$?
11176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11177 (exit $ac_status); }; } &&
11178 { ac_try='test -s conftest.$ac_objext'
11179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11180 (eval $ac_try) 2>&5
11181 ac_status=$?
11182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11183 (exit $ac_status); }; }; then
4e8d927d 11184 ac_lo=$ac_mid; break
f9f87d2c
MK
11185else
11186 echo "$as_me: failed program was:" >&5
11187sed 's/^/| /' conftest.$ac_ext >&5
11188
b4e70030
JB
11189ac_hi=`expr '(' $ac_mid ')' - 1`
11190 if test $ac_mid -le $ac_hi; then
11191 ac_lo= ac_hi=
11192 break
11193 fi
11194 ac_mid=`expr 2 '*' $ac_mid`
f9f87d2c 11195fi
4e8d927d
DJ
11196rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11197 done
11198else
11199 echo "$as_me: failed program was:" >&5
11200sed 's/^/| /' conftest.$ac_ext >&5
f9f87d2c 11201
b4e70030 11202ac_lo= ac_hi=
4e8d927d 11203fi
4e8d927d 11204rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3be60c3d 11205fi
4e8d927d
DJ
11206rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11207# Binary search between lo and hi bounds.
11208while test "x$ac_lo" != "x$ac_hi"; do
11209 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3be60c3d
MK
11210 cat >conftest.$ac_ext <<_ACEOF
11211/* confdefs.h. */
11212_ACEOF
11213cat confdefs.h >>conftest.$ac_ext
11214cat >>conftest.$ac_ext <<_ACEOF
11215/* end confdefs.h. */
4e8d927d 11216$ac_includes_default
3be60c3d
MK
11217int
11218main ()
11219{
b4e70030 11220static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
4e8d927d
DJ
11221test_array [0] = 0
11222
3be60c3d
MK
11223 ;
11224 return 0;
11225}
11226_ACEOF
11227rm -f conftest.$ac_objext
11228if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11229 (eval $ac_compile) 2>conftest.er1
11230 ac_status=$?
11231 grep -v '^ *+' conftest.er1 >conftest.err
11232 rm -f conftest.er1
11233 cat conftest.err >&5
11234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11235 (exit $ac_status); } &&
b4e70030
JB
11236 { ac_try='test -z "$ac_c_werror_flag"
11237 || test ! -s conftest.err'
3be60c3d
MK
11238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11239 (eval $ac_try) 2>&5
11240 ac_status=$?
11241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11242 (exit $ac_status); }; } &&
11243 { ac_try='test -s conftest.$ac_objext'
11244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11245 (eval $ac_try) 2>&5
11246 ac_status=$?
11247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11248 (exit $ac_status); }; }; then
4e8d927d 11249 ac_hi=$ac_mid
3be60c3d
MK
11250else
11251 echo "$as_me: failed program was:" >&5
11252sed 's/^/| /' conftest.$ac_ext >&5
11253
b4e70030 11254ac_lo=`expr '(' $ac_mid ')' + 1`
3be60c3d 11255fi
4e8d927d
DJ
11256rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11257done
11258case $ac_lo in
11259?*) ac_cv_sizeof_void_p=$ac_lo;;
b4e70030 11260'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
4e8d927d 11261See \`config.log' for more details." >&5
b4e70030 11262echo "$as_me: error: cannot compute sizeof (void *), 77
4e8d927d 11263See \`config.log' for more details." >&2;}
b4e70030 11264 { (exit 1); exit 1; }; } ;;
4e8d927d 11265esac
b4e70030
JB
11266else
11267 if test "$cross_compiling" = yes; then
11268 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
11269See \`config.log' for more details." >&5
11270echo "$as_me: error: cannot run test program while cross compiling
11271See \`config.log' for more details." >&2;}
11272 { (exit 1); exit 1; }; }
4e8d927d
DJ
11273else
11274 cat >conftest.$ac_ext <<_ACEOF
11275/* confdefs.h. */
3be60c3d 11276_ACEOF
4e8d927d
DJ
11277cat confdefs.h >>conftest.$ac_ext
11278cat >>conftest.$ac_ext <<_ACEOF
11279/* end confdefs.h. */
11280$ac_includes_default
b4e70030
JB
11281long longval () { return (long) (sizeof (void *)); }
11282unsigned long ulongval () { return (long) (sizeof (void *)); }
4e8d927d
DJ
11283#include <stdio.h>
11284#include <stdlib.h>
11285int
11286main ()
11287{
11288
11289 FILE *f = fopen ("conftest.val", "w");
11290 if (! f)
b4e70030
JB
11291 exit (1);
11292 if (((long) (sizeof (void *))) < 0)
4e8d927d 11293 {
b4e70030
JB
11294 long i = longval ();
11295 if (i != ((long) (sizeof (void *))))
11296 exit (1);
4e8d927d
DJ
11297 fprintf (f, "%ld\n", i);
11298 }
11299 else
11300 {
b4e70030
JB
11301 unsigned long i = ulongval ();
11302 if (i != ((long) (sizeof (void *))))
11303 exit (1);
4e8d927d
DJ
11304 fprintf (f, "%lu\n", i);
11305 }
b4e70030 11306 exit (ferror (f) || fclose (f) != 0);
3be60c3d 11307
4e8d927d
DJ
11308 ;
11309 return 0;
11310}
11311_ACEOF
11312rm -f conftest$ac_exeext
11313if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11314 (eval $ac_link) 2>&5
11315 ac_status=$?
11316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11317 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11319 (eval $ac_try) 2>&5
11320 ac_status=$?
11321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11322 (exit $ac_status); }; }; then
11323 ac_cv_sizeof_void_p=`cat conftest.val`
11324else
11325 echo "$as_me: program exited with status $ac_status" >&5
11326echo "$as_me: failed program was:" >&5
11327sed 's/^/| /' conftest.$ac_ext >&5
3be60c3d 11328
4e8d927d 11329( exit $ac_status )
b4e70030 11330{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
4e8d927d 11331See \`config.log' for more details." >&5
b4e70030 11332echo "$as_me: error: cannot compute sizeof (void *), 77
4e8d927d 11333See \`config.log' for more details." >&2;}
b4e70030
JB
11334 { (exit 1); exit 1; }; }
11335fi
11336rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
f9f87d2c 11337fi
4e8d927d
DJ
11338fi
11339rm -f conftest.val
11340else
11341 ac_cv_sizeof_void_p=0
11342fi
11343fi
b4e70030
JB
11344echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
11345echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
4e8d927d
DJ
11346cat >>confdefs.h <<_ACEOF
11347#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
11348_ACEOF
f9f87d2c 11349
4e8d927d
DJ
11350 ;;
11351esac
46711df8 11352
4e8d927d
DJ
11353# Lacking an uint64_t? Test size of long
11354case "$acx_cv_header_stdint:$ac_cv_type_uint64_t:$ac_cv_type_u_int64_t" in
b4e70030
JB
11355 stddef.h:*:* | *:no:no) echo "$as_me:$LINENO: checking for long" >&5
11356echo $ECHO_N "checking for long... $ECHO_C" >&6
4e8d927d 11357if test "${ac_cv_type_long+set}" = set; then
bec39cab 11358 echo $ECHO_N "(cached) $ECHO_C" >&6
46711df8 11359else
bec39cab
AC
11360 cat >conftest.$ac_ext <<_ACEOF
11361/* confdefs.h. */
11362_ACEOF
11363cat confdefs.h >>conftest.$ac_ext
11364cat >>conftest.$ac_ext <<_ACEOF
11365/* end confdefs.h. */
4e8d927d 11366$ac_includes_default
bec39cab 11367int
46711df8
MK
11368main ()
11369{
b4e70030 11370if ((long *) 0)
4e8d927d 11371 return 0;
b4e70030 11372if (sizeof (long))
4e8d927d 11373 return 0;
a3828db0
MK
11374 ;
11375 return 0;
46711df8 11376}
bec39cab 11377_ACEOF
a3828db0
MK
11378rm -f conftest.$ac_objext
11379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11380 (eval $ac_compile) 2>conftest.er1
11381 ac_status=$?
11382 grep -v '^ *+' conftest.er1 >conftest.err
11383 rm -f conftest.er1
11384 cat conftest.err >&5
11385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11386 (exit $ac_status); } &&
b4e70030
JB
11387 { ac_try='test -z "$ac_c_werror_flag"
11388 || test ! -s conftest.err'
a3828db0
MK
11389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11390 (eval $ac_try) 2>&5
bec39cab
AC
11391 ac_status=$?
11392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0
MK
11393 (exit $ac_status); }; } &&
11394 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
11395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11396 (eval $ac_try) 2>&5
11397 ac_status=$?
11398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11399 (exit $ac_status); }; }; then
4e8d927d 11400 ac_cv_type_long=yes
46711df8 11401else
a3828db0 11402 echo "$as_me: failed program was:" >&5
bec39cab
AC
11403sed 's/^/| /' conftest.$ac_ext >&5
11404
b4e70030 11405ac_cv_type_long=no
46711df8 11406fi
4e8d927d 11407rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
46711df8 11408fi
b4e70030
JB
11409echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
11410echo "${ECHO_T}$ac_cv_type_long" >&6
46711df8 11411
b4e70030
JB
11412echo "$as_me:$LINENO: checking size of long" >&5
11413echo $ECHO_N "checking size of long... $ECHO_C" >&6
4e8d927d 11414if test "${ac_cv_sizeof_long+set}" = set; then
bec39cab 11415 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 11416else
4e8d927d 11417 if test "$ac_cv_type_long" = yes; then
b4e70030 11418 # The cast to unsigned long works around a bug in the HP C Compiler
4e8d927d
DJ
11419 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11420 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11421 # This bug is HP SR number 8606223364.
11422 if test "$cross_compiling" = yes; then
11423 # Depending upon the size, compute the lo and hi bounds.
11424cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
11425/* confdefs.h. */
11426_ACEOF
11427cat confdefs.h >>conftest.$ac_ext
11428cat >>conftest.$ac_ext <<_ACEOF
11429/* end confdefs.h. */
4e8d927d 11430$ac_includes_default
4e8d927d
DJ
11431int
11432main ()
11433{
b4e70030 11434static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4e8d927d 11435test_array [0] = 0
a3828db0 11436
4e8d927d
DJ
11437 ;
11438 return 0;
11439}
bec39cab
AC
11440_ACEOF
11441rm -f conftest.$ac_objext
11442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11443 (eval $ac_compile) 2>conftest.er1
11444 ac_status=$?
11445 grep -v '^ *+' conftest.er1 >conftest.err
11446 rm -f conftest.er1
11447 cat conftest.err >&5
11448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11449 (exit $ac_status); } &&
b4e70030
JB
11450 { ac_try='test -z "$ac_c_werror_flag"
11451 || test ! -s conftest.err'
bec39cab
AC
11452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11453 (eval $ac_try) 2>&5
11454 ac_status=$?
11455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11456 (exit $ac_status); }; } &&
11457 { ac_try='test -s conftest.$ac_objext'
11458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11459 (eval $ac_try) 2>&5
11460 ac_status=$?
11461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11462 (exit $ac_status); }; }; then
4e8d927d
DJ
11463 ac_lo=0 ac_mid=0
11464 while :; do
11465 cat >conftest.$ac_ext <<_ACEOF
11466/* confdefs.h. */
11467_ACEOF
11468cat confdefs.h >>conftest.$ac_ext
11469cat >>conftest.$ac_ext <<_ACEOF
11470/* end confdefs.h. */
11471$ac_includes_default
4e8d927d
DJ
11472int
11473main ()
11474{
b4e70030 11475static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4e8d927d
DJ
11476test_array [0] = 0
11477
11478 ;
11479 return 0;
11480}
11481_ACEOF
11482rm -f conftest.$ac_objext
11483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11484 (eval $ac_compile) 2>conftest.er1
11485 ac_status=$?
11486 grep -v '^ *+' conftest.er1 >conftest.err
11487 rm -f conftest.er1
11488 cat conftest.err >&5
11489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11490 (exit $ac_status); } &&
b4e70030
JB
11491 { ac_try='test -z "$ac_c_werror_flag"
11492 || test ! -s conftest.err'
4e8d927d
DJ
11493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11494 (eval $ac_try) 2>&5
11495 ac_status=$?
11496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11497 (exit $ac_status); }; } &&
11498 { ac_try='test -s conftest.$ac_objext'
11499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11500 (eval $ac_try) 2>&5
11501 ac_status=$?
11502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11503 (exit $ac_status); }; }; then
11504 ac_hi=$ac_mid; break
11505else
11506 echo "$as_me: failed program was:" >&5
11507sed 's/^/| /' conftest.$ac_ext >&5
11508
b4e70030
JB
11509ac_lo=`expr $ac_mid + 1`
11510 if test $ac_lo -le $ac_mid; then
11511 ac_lo= ac_hi=
11512 break
11513 fi
11514 ac_mid=`expr 2 '*' $ac_mid + 1`
4e8d927d 11515fi
4e8d927d
DJ
11516rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11517 done
11518else
11519 echo "$as_me: failed program was:" >&5
11520sed 's/^/| /' conftest.$ac_ext >&5
11521
b4e70030 11522cat >conftest.$ac_ext <<_ACEOF
4e8d927d
DJ
11523/* confdefs.h. */
11524_ACEOF
11525cat confdefs.h >>conftest.$ac_ext
11526cat >>conftest.$ac_ext <<_ACEOF
11527/* end confdefs.h. */
11528$ac_includes_default
4e8d927d
DJ
11529int
11530main ()
11531{
b4e70030 11532static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4e8d927d
DJ
11533test_array [0] = 0
11534
11535 ;
11536 return 0;
11537}
11538_ACEOF
11539rm -f conftest.$ac_objext
11540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11541 (eval $ac_compile) 2>conftest.er1
11542 ac_status=$?
11543 grep -v '^ *+' conftest.er1 >conftest.err
11544 rm -f conftest.er1
11545 cat conftest.err >&5
11546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11547 (exit $ac_status); } &&
b4e70030
JB
11548 { ac_try='test -z "$ac_c_werror_flag"
11549 || test ! -s conftest.err'
4e8d927d
DJ
11550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11551 (eval $ac_try) 2>&5
11552 ac_status=$?
11553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11554 (exit $ac_status); }; } &&
11555 { ac_try='test -s conftest.$ac_objext'
11556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11557 (eval $ac_try) 2>&5
11558 ac_status=$?
11559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11560 (exit $ac_status); }; }; then
11561 ac_hi=-1 ac_mid=-1
11562 while :; do
11563 cat >conftest.$ac_ext <<_ACEOF
11564/* confdefs.h. */
11565_ACEOF
11566cat confdefs.h >>conftest.$ac_ext
11567cat >>conftest.$ac_ext <<_ACEOF
11568/* end confdefs.h. */
11569$ac_includes_default
4e8d927d
DJ
11570int
11571main ()
11572{
b4e70030 11573static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
4e8d927d
DJ
11574test_array [0] = 0
11575
11576 ;
11577 return 0;
11578}
11579_ACEOF
11580rm -f conftest.$ac_objext
11581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11582 (eval $ac_compile) 2>conftest.er1
11583 ac_status=$?
11584 grep -v '^ *+' conftest.er1 >conftest.err
11585 rm -f conftest.er1
11586 cat conftest.err >&5
11587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11588 (exit $ac_status); } &&
b4e70030
JB
11589 { ac_try='test -z "$ac_c_werror_flag"
11590 || test ! -s conftest.err'
4e8d927d
DJ
11591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11592 (eval $ac_try) 2>&5
11593 ac_status=$?
11594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11595 (exit $ac_status); }; } &&
11596 { ac_try='test -s conftest.$ac_objext'
11597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11598 (eval $ac_try) 2>&5
11599 ac_status=$?
11600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11601 (exit $ac_status); }; }; then
11602 ac_lo=$ac_mid; break
11603else
11604 echo "$as_me: failed program was:" >&5
11605sed 's/^/| /' conftest.$ac_ext >&5
11606
b4e70030
JB
11607ac_hi=`expr '(' $ac_mid ')' - 1`
11608 if test $ac_mid -le $ac_hi; then
11609 ac_lo= ac_hi=
11610 break
11611 fi
11612 ac_mid=`expr 2 '*' $ac_mid`
4e8d927d 11613fi
4e8d927d
DJ
11614rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11615 done
11616else
11617 echo "$as_me: failed program was:" >&5
11618sed 's/^/| /' conftest.$ac_ext >&5
11619
b4e70030 11620ac_lo= ac_hi=
4e8d927d 11621fi
4e8d927d
DJ
11622rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11623fi
4e8d927d
DJ
11624rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11625# Binary search between lo and hi bounds.
11626while test "x$ac_lo" != "x$ac_hi"; do
11627 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11628 cat >conftest.$ac_ext <<_ACEOF
11629/* confdefs.h. */
11630_ACEOF
11631cat confdefs.h >>conftest.$ac_ext
11632cat >>conftest.$ac_ext <<_ACEOF
11633/* end confdefs.h. */
11634$ac_includes_default
4e8d927d
DJ
11635int
11636main ()
11637{
b4e70030 11638static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4e8d927d
DJ
11639test_array [0] = 0
11640
11641 ;
11642 return 0;
11643}
11644_ACEOF
11645rm -f conftest.$ac_objext
11646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11647 (eval $ac_compile) 2>conftest.er1
11648 ac_status=$?
11649 grep -v '^ *+' conftest.er1 >conftest.err
11650 rm -f conftest.er1
11651 cat conftest.err >&5
11652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11653 (exit $ac_status); } &&
b4e70030
JB
11654 { ac_try='test -z "$ac_c_werror_flag"
11655 || test ! -s conftest.err'
4e8d927d
DJ
11656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11657 (eval $ac_try) 2>&5
11658 ac_status=$?
11659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11660 (exit $ac_status); }; } &&
11661 { ac_try='test -s conftest.$ac_objext'
11662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11663 (eval $ac_try) 2>&5
11664 ac_status=$?
11665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11666 (exit $ac_status); }; }; then
11667 ac_hi=$ac_mid
11668else
11669 echo "$as_me: failed program was:" >&5
11670sed 's/^/| /' conftest.$ac_ext >&5
11671
b4e70030 11672ac_lo=`expr '(' $ac_mid ')' + 1`
4e8d927d 11673fi
4e8d927d
DJ
11674rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11675done
11676case $ac_lo in
11677?*) ac_cv_sizeof_long=$ac_lo;;
b4e70030 11678'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
4e8d927d 11679See \`config.log' for more details." >&5
b4e70030 11680echo "$as_me: error: cannot compute sizeof (long), 77
4e8d927d 11681See \`config.log' for more details." >&2;}
b4e70030 11682 { (exit 1); exit 1; }; } ;;
4e8d927d 11683esac
b4e70030
JB
11684else
11685 if test "$cross_compiling" = yes; then
11686 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
11687See \`config.log' for more details." >&5
11688echo "$as_me: error: cannot run test program while cross compiling
11689See \`config.log' for more details." >&2;}
11690 { (exit 1); exit 1; }; }
4e8d927d
DJ
11691else
11692 cat >conftest.$ac_ext <<_ACEOF
11693/* confdefs.h. */
11694_ACEOF
11695cat confdefs.h >>conftest.$ac_ext
11696cat >>conftest.$ac_ext <<_ACEOF
11697/* end confdefs.h. */
11698$ac_includes_default
b4e70030
JB
11699long longval () { return (long) (sizeof (long)); }
11700unsigned long ulongval () { return (long) (sizeof (long)); }
4e8d927d
DJ
11701#include <stdio.h>
11702#include <stdlib.h>
11703int
11704main ()
11705{
11706
11707 FILE *f = fopen ("conftest.val", "w");
11708 if (! f)
b4e70030
JB
11709 exit (1);
11710 if (((long) (sizeof (long))) < 0)
4e8d927d 11711 {
b4e70030
JB
11712 long i = longval ();
11713 if (i != ((long) (sizeof (long))))
11714 exit (1);
4e8d927d
DJ
11715 fprintf (f, "%ld\n", i);
11716 }
11717 else
11718 {
b4e70030
JB
11719 unsigned long i = ulongval ();
11720 if (i != ((long) (sizeof (long))))
11721 exit (1);
4e8d927d
DJ
11722 fprintf (f, "%lu\n", i);
11723 }
b4e70030 11724 exit (ferror (f) || fclose (f) != 0);
4e8d927d
DJ
11725
11726 ;
11727 return 0;
11728}
11729_ACEOF
11730rm -f conftest$ac_exeext
11731if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11732 (eval $ac_link) 2>&5
11733 ac_status=$?
11734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11735 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11737 (eval $ac_try) 2>&5
11738 ac_status=$?
11739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11740 (exit $ac_status); }; }; then
11741 ac_cv_sizeof_long=`cat conftest.val`
11742else
11743 echo "$as_me: program exited with status $ac_status" >&5
11744echo "$as_me: failed program was:" >&5
11745sed 's/^/| /' conftest.$ac_ext >&5
11746
11747( exit $ac_status )
b4e70030 11748{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
4e8d927d 11749See \`config.log' for more details." >&5
b4e70030 11750echo "$as_me: error: cannot compute sizeof (long), 77
4e8d927d 11751See \`config.log' for more details." >&2;}
b4e70030
JB
11752 { (exit 1); exit 1; }; }
11753fi
11754rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4e8d927d 11755fi
4e8d927d
DJ
11756fi
11757rm -f conftest.val
11758else
11759 ac_cv_sizeof_long=0
11760fi
11761fi
b4e70030
JB
11762echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
11763echo "${ECHO_T}$ac_cv_sizeof_long" >&6
4e8d927d
DJ
11764cat >>confdefs.h <<_ACEOF
11765#define SIZEOF_LONG $ac_cv_sizeof_long
11766_ACEOF
11767
11768 ;;
11769esac
11770
11771if test $acx_cv_header_stdint = stddef.h; then
11772 # Lacking a good header? Test size of everything and deduce all types.
b4e70030
JB
11773 echo "$as_me:$LINENO: checking for int" >&5
11774echo $ECHO_N "checking for int... $ECHO_C" >&6
4e8d927d
DJ
11775if test "${ac_cv_type_int+set}" = set; then
11776 echo $ECHO_N "(cached) $ECHO_C" >&6
11777else
11778 cat >conftest.$ac_ext <<_ACEOF
11779/* confdefs.h. */
11780_ACEOF
11781cat confdefs.h >>conftest.$ac_ext
11782cat >>conftest.$ac_ext <<_ACEOF
11783/* end confdefs.h. */
11784$ac_includes_default
4e8d927d
DJ
11785int
11786main ()
11787{
b4e70030 11788if ((int *) 0)
4e8d927d 11789 return 0;
b4e70030 11790if (sizeof (int))
4e8d927d
DJ
11791 return 0;
11792 ;
11793 return 0;
11794}
11795_ACEOF
11796rm -f conftest.$ac_objext
11797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11798 (eval $ac_compile) 2>conftest.er1
11799 ac_status=$?
11800 grep -v '^ *+' conftest.er1 >conftest.err
11801 rm -f conftest.er1
11802 cat conftest.err >&5
11803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11804 (exit $ac_status); } &&
b4e70030
JB
11805 { ac_try='test -z "$ac_c_werror_flag"
11806 || test ! -s conftest.err'
4e8d927d
DJ
11807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11808 (eval $ac_try) 2>&5
11809 ac_status=$?
11810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11811 (exit $ac_status); }; } &&
11812 { ac_try='test -s conftest.$ac_objext'
11813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11814 (eval $ac_try) 2>&5
11815 ac_status=$?
11816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11817 (exit $ac_status); }; }; then
11818 ac_cv_type_int=yes
11819else
11820 echo "$as_me: failed program was:" >&5
11821sed 's/^/| /' conftest.$ac_ext >&5
11822
b4e70030 11823ac_cv_type_int=no
4e8d927d 11824fi
4e8d927d
DJ
11825rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11826fi
b4e70030
JB
11827echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
11828echo "${ECHO_T}$ac_cv_type_int" >&6
4e8d927d 11829
b4e70030
JB
11830echo "$as_me:$LINENO: checking size of int" >&5
11831echo $ECHO_N "checking size of int... $ECHO_C" >&6
4e8d927d
DJ
11832if test "${ac_cv_sizeof_int+set}" = set; then
11833 echo $ECHO_N "(cached) $ECHO_C" >&6
11834else
11835 if test "$ac_cv_type_int" = yes; then
b4e70030 11836 # The cast to unsigned long works around a bug in the HP C Compiler
4e8d927d
DJ
11837 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11838 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11839 # This bug is HP SR number 8606223364.
11840 if test "$cross_compiling" = yes; then
11841 # Depending upon the size, compute the lo and hi bounds.
11842cat >conftest.$ac_ext <<_ACEOF
11843/* confdefs.h. */
11844_ACEOF
11845cat confdefs.h >>conftest.$ac_ext
11846cat >>conftest.$ac_ext <<_ACEOF
11847/* end confdefs.h. */
11848$ac_includes_default
4e8d927d
DJ
11849int
11850main ()
11851{
b4e70030 11852static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4e8d927d
DJ
11853test_array [0] = 0
11854
11855 ;
11856 return 0;
11857}
11858_ACEOF
11859rm -f conftest.$ac_objext
11860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11861 (eval $ac_compile) 2>conftest.er1
11862 ac_status=$?
11863 grep -v '^ *+' conftest.er1 >conftest.err
11864 rm -f conftest.er1
11865 cat conftest.err >&5
11866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11867 (exit $ac_status); } &&
b4e70030
JB
11868 { ac_try='test -z "$ac_c_werror_flag"
11869 || test ! -s conftest.err'
4e8d927d
DJ
11870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11871 (eval $ac_try) 2>&5
11872 ac_status=$?
11873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11874 (exit $ac_status); }; } &&
11875 { ac_try='test -s conftest.$ac_objext'
11876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11877 (eval $ac_try) 2>&5
11878 ac_status=$?
11879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11880 (exit $ac_status); }; }; then
11881 ac_lo=0 ac_mid=0
11882 while :; do
11883 cat >conftest.$ac_ext <<_ACEOF
11884/* confdefs.h. */
11885_ACEOF
11886cat confdefs.h >>conftest.$ac_ext
11887cat >>conftest.$ac_ext <<_ACEOF
11888/* end confdefs.h. */
11889$ac_includes_default
4e8d927d
DJ
11890int
11891main ()
11892{
b4e70030 11893static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4e8d927d
DJ
11894test_array [0] = 0
11895
11896 ;
11897 return 0;
11898}
11899_ACEOF
11900rm -f conftest.$ac_objext
11901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11902 (eval $ac_compile) 2>conftest.er1
11903 ac_status=$?
11904 grep -v '^ *+' conftest.er1 >conftest.err
11905 rm -f conftest.er1
11906 cat conftest.err >&5
11907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11908 (exit $ac_status); } &&
b4e70030
JB
11909 { ac_try='test -z "$ac_c_werror_flag"
11910 || test ! -s conftest.err'
4e8d927d
DJ
11911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11912 (eval $ac_try) 2>&5
11913 ac_status=$?
11914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11915 (exit $ac_status); }; } &&
11916 { ac_try='test -s conftest.$ac_objext'
11917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11918 (eval $ac_try) 2>&5
11919 ac_status=$?
11920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11921 (exit $ac_status); }; }; then
11922 ac_hi=$ac_mid; break
11923else
11924 echo "$as_me: failed program was:" >&5
11925sed 's/^/| /' conftest.$ac_ext >&5
11926
b4e70030
JB
11927ac_lo=`expr $ac_mid + 1`
11928 if test $ac_lo -le $ac_mid; then
11929 ac_lo= ac_hi=
11930 break
11931 fi
11932 ac_mid=`expr 2 '*' $ac_mid + 1`
4e8d927d 11933fi
4e8d927d
DJ
11934rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11935 done
11936else
11937 echo "$as_me: failed program was:" >&5
11938sed 's/^/| /' conftest.$ac_ext >&5
11939
b4e70030 11940cat >conftest.$ac_ext <<_ACEOF
4e8d927d
DJ
11941/* confdefs.h. */
11942_ACEOF
11943cat confdefs.h >>conftest.$ac_ext
11944cat >>conftest.$ac_ext <<_ACEOF
11945/* end confdefs.h. */
11946$ac_includes_default
4e8d927d
DJ
11947int
11948main ()
11949{
b4e70030 11950static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4e8d927d
DJ
11951test_array [0] = 0
11952
11953 ;
11954 return 0;
11955}
11956_ACEOF
11957rm -f conftest.$ac_objext
11958if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11959 (eval $ac_compile) 2>conftest.er1
11960 ac_status=$?
11961 grep -v '^ *+' conftest.er1 >conftest.err
11962 rm -f conftest.er1
11963 cat conftest.err >&5
11964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11965 (exit $ac_status); } &&
b4e70030
JB
11966 { ac_try='test -z "$ac_c_werror_flag"
11967 || test ! -s conftest.err'
4e8d927d
DJ
11968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11969 (eval $ac_try) 2>&5
11970 ac_status=$?
11971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11972 (exit $ac_status); }; } &&
11973 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
11979 ac_hi=-1 ac_mid=-1
11980 while :; do
11981 cat >conftest.$ac_ext <<_ACEOF
11982/* confdefs.h. */
11983_ACEOF
11984cat confdefs.h >>conftest.$ac_ext
11985cat >>conftest.$ac_ext <<_ACEOF
11986/* end confdefs.h. */
11987$ac_includes_default
4e8d927d
DJ
11988int
11989main ()
11990{
b4e70030 11991static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4e8d927d
DJ
11992test_array [0] = 0
11993
11994 ;
11995 return 0;
11996}
11997_ACEOF
11998rm -f conftest.$ac_objext
11999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12000 (eval $ac_compile) 2>conftest.er1
12001 ac_status=$?
12002 grep -v '^ *+' conftest.er1 >conftest.err
12003 rm -f conftest.er1
12004 cat conftest.err >&5
12005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12006 (exit $ac_status); } &&
b4e70030
JB
12007 { ac_try='test -z "$ac_c_werror_flag"
12008 || test ! -s conftest.err'
4e8d927d
DJ
12009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12010 (eval $ac_try) 2>&5
12011 ac_status=$?
12012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12013 (exit $ac_status); }; } &&
12014 { ac_try='test -s conftest.$ac_objext'
12015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12016 (eval $ac_try) 2>&5
12017 ac_status=$?
12018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12019 (exit $ac_status); }; }; then
12020 ac_lo=$ac_mid; break
12021else
12022 echo "$as_me: failed program was:" >&5
12023sed 's/^/| /' conftest.$ac_ext >&5
12024
b4e70030
JB
12025ac_hi=`expr '(' $ac_mid ')' - 1`
12026 if test $ac_mid -le $ac_hi; then
12027 ac_lo= ac_hi=
12028 break
12029 fi
12030 ac_mid=`expr 2 '*' $ac_mid`
4e8d927d 12031fi
4e8d927d
DJ
12032rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12033 done
12034else
12035 echo "$as_me: failed program was:" >&5
12036sed 's/^/| /' conftest.$ac_ext >&5
12037
b4e70030 12038ac_lo= ac_hi=
4e8d927d 12039fi
4e8d927d
DJ
12040rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12041fi
4e8d927d
DJ
12042rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12043# Binary search between lo and hi bounds.
12044while test "x$ac_lo" != "x$ac_hi"; do
12045 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12046 cat >conftest.$ac_ext <<_ACEOF
12047/* confdefs.h. */
12048_ACEOF
12049cat confdefs.h >>conftest.$ac_ext
12050cat >>conftest.$ac_ext <<_ACEOF
12051/* end confdefs.h. */
12052$ac_includes_default
4e8d927d
DJ
12053int
12054main ()
12055{
b4e70030 12056static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4e8d927d
DJ
12057test_array [0] = 0
12058
12059 ;
12060 return 0;
12061}
12062_ACEOF
12063rm -f conftest.$ac_objext
12064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12065 (eval $ac_compile) 2>conftest.er1
12066 ac_status=$?
12067 grep -v '^ *+' conftest.er1 >conftest.err
12068 rm -f conftest.er1
12069 cat conftest.err >&5
12070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12071 (exit $ac_status); } &&
b4e70030
JB
12072 { ac_try='test -z "$ac_c_werror_flag"
12073 || test ! -s conftest.err'
4e8d927d
DJ
12074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12075 (eval $ac_try) 2>&5
12076 ac_status=$?
12077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12078 (exit $ac_status); }; } &&
12079 { ac_try='test -s conftest.$ac_objext'
12080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12081 (eval $ac_try) 2>&5
12082 ac_status=$?
12083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12084 (exit $ac_status); }; }; then
12085 ac_hi=$ac_mid
12086else
12087 echo "$as_me: failed program was:" >&5
12088sed 's/^/| /' conftest.$ac_ext >&5
12089
b4e70030 12090ac_lo=`expr '(' $ac_mid ')' + 1`
4e8d927d 12091fi
4e8d927d
DJ
12092rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12093done
12094case $ac_lo in
12095?*) ac_cv_sizeof_int=$ac_lo;;
b4e70030 12096'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4e8d927d 12097See \`config.log' for more details." >&5
b4e70030 12098echo "$as_me: error: cannot compute sizeof (int), 77
4e8d927d 12099See \`config.log' for more details." >&2;}
b4e70030 12100 { (exit 1); exit 1; }; } ;;
4e8d927d 12101esac
b4e70030
JB
12102else
12103 if test "$cross_compiling" = yes; then
12104 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
12105See \`config.log' for more details." >&5
12106echo "$as_me: error: cannot run test program while cross compiling
12107See \`config.log' for more details." >&2;}
12108 { (exit 1); exit 1; }; }
4e8d927d
DJ
12109else
12110 cat >conftest.$ac_ext <<_ACEOF
12111/* confdefs.h. */
12112_ACEOF
12113cat confdefs.h >>conftest.$ac_ext
12114cat >>conftest.$ac_ext <<_ACEOF
12115/* end confdefs.h. */
12116$ac_includes_default
b4e70030
JB
12117long longval () { return (long) (sizeof (int)); }
12118unsigned long ulongval () { return (long) (sizeof (int)); }
4e8d927d
DJ
12119#include <stdio.h>
12120#include <stdlib.h>
12121int
12122main ()
12123{
12124
12125 FILE *f = fopen ("conftest.val", "w");
12126 if (! f)
b4e70030
JB
12127 exit (1);
12128 if (((long) (sizeof (int))) < 0)
4e8d927d 12129 {
b4e70030
JB
12130 long i = longval ();
12131 if (i != ((long) (sizeof (int))))
12132 exit (1);
4e8d927d
DJ
12133 fprintf (f, "%ld\n", i);
12134 }
12135 else
12136 {
b4e70030
JB
12137 unsigned long i = ulongval ();
12138 if (i != ((long) (sizeof (int))))
12139 exit (1);
4e8d927d
DJ
12140 fprintf (f, "%lu\n", i);
12141 }
b4e70030 12142 exit (ferror (f) || fclose (f) != 0);
4e8d927d
DJ
12143
12144 ;
12145 return 0;
12146}
12147_ACEOF
12148rm -f conftest$ac_exeext
12149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12150 (eval $ac_link) 2>&5
12151 ac_status=$?
12152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12153 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12155 (eval $ac_try) 2>&5
12156 ac_status=$?
12157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12158 (exit $ac_status); }; }; then
12159 ac_cv_sizeof_int=`cat conftest.val`
12160else
12161 echo "$as_me: program exited with status $ac_status" >&5
12162echo "$as_me: failed program was:" >&5
12163sed 's/^/| /' conftest.$ac_ext >&5
12164
12165( exit $ac_status )
b4e70030 12166{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4e8d927d 12167See \`config.log' for more details." >&5
b4e70030 12168echo "$as_me: error: cannot compute sizeof (int), 77
4e8d927d 12169See \`config.log' for more details." >&2;}
b4e70030
JB
12170 { (exit 1); exit 1; }; }
12171fi
12172rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4e8d927d 12173fi
4e8d927d
DJ
12174fi
12175rm -f conftest.val
12176else
12177 ac_cv_sizeof_int=0
12178fi
12179fi
b4e70030
JB
12180echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
12181echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4e8d927d
DJ
12182cat >>confdefs.h <<_ACEOF
12183#define SIZEOF_INT $ac_cv_sizeof_int
12184_ACEOF
12185
12186
b4e70030
JB
12187 echo "$as_me:$LINENO: checking for short" >&5
12188echo $ECHO_N "checking for short... $ECHO_C" >&6
4e8d927d
DJ
12189if test "${ac_cv_type_short+set}" = set; then
12190 echo $ECHO_N "(cached) $ECHO_C" >&6
12191else
12192 cat >conftest.$ac_ext <<_ACEOF
12193/* confdefs.h. */
12194_ACEOF
12195cat confdefs.h >>conftest.$ac_ext
12196cat >>conftest.$ac_ext <<_ACEOF
12197/* end confdefs.h. */
12198$ac_includes_default
4e8d927d
DJ
12199int
12200main ()
12201{
b4e70030 12202if ((short *) 0)
4e8d927d 12203 return 0;
b4e70030 12204if (sizeof (short))
4e8d927d
DJ
12205 return 0;
12206 ;
12207 return 0;
12208}
12209_ACEOF
12210rm -f conftest.$ac_objext
12211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12212 (eval $ac_compile) 2>conftest.er1
12213 ac_status=$?
12214 grep -v '^ *+' conftest.er1 >conftest.err
12215 rm -f conftest.er1
12216 cat conftest.err >&5
12217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12218 (exit $ac_status); } &&
b4e70030
JB
12219 { ac_try='test -z "$ac_c_werror_flag"
12220 || test ! -s conftest.err'
4e8d927d
DJ
12221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12222 (eval $ac_try) 2>&5
12223 ac_status=$?
12224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12225 (exit $ac_status); }; } &&
12226 { ac_try='test -s conftest.$ac_objext'
12227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12228 (eval $ac_try) 2>&5
12229 ac_status=$?
12230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12231 (exit $ac_status); }; }; then
12232 ac_cv_type_short=yes
12233else
12234 echo "$as_me: failed program was:" >&5
12235sed 's/^/| /' conftest.$ac_ext >&5
12236
b4e70030 12237ac_cv_type_short=no
4e8d927d 12238fi
4e8d927d
DJ
12239rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12240fi
b4e70030
JB
12241echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
12242echo "${ECHO_T}$ac_cv_type_short" >&6
4e8d927d 12243
b4e70030
JB
12244echo "$as_me:$LINENO: checking size of short" >&5
12245echo $ECHO_N "checking size of short... $ECHO_C" >&6
4e8d927d
DJ
12246if test "${ac_cv_sizeof_short+set}" = set; then
12247 echo $ECHO_N "(cached) $ECHO_C" >&6
12248else
12249 if test "$ac_cv_type_short" = yes; then
b4e70030 12250 # The cast to unsigned long works around a bug in the HP C Compiler
4e8d927d
DJ
12251 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12252 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12253 # This bug is HP SR number 8606223364.
12254 if test "$cross_compiling" = yes; then
12255 # Depending upon the size, compute the lo and hi bounds.
12256cat >conftest.$ac_ext <<_ACEOF
12257/* confdefs.h. */
12258_ACEOF
12259cat confdefs.h >>conftest.$ac_ext
12260cat >>conftest.$ac_ext <<_ACEOF
12261/* end confdefs.h. */
12262$ac_includes_default
4e8d927d
DJ
12263int
12264main ()
12265{
b4e70030 12266static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
4e8d927d
DJ
12267test_array [0] = 0
12268
12269 ;
12270 return 0;
12271}
12272_ACEOF
12273rm -f conftest.$ac_objext
12274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12275 (eval $ac_compile) 2>conftest.er1
12276 ac_status=$?
12277 grep -v '^ *+' conftest.er1 >conftest.err
12278 rm -f conftest.er1
12279 cat conftest.err >&5
12280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12281 (exit $ac_status); } &&
b4e70030
JB
12282 { ac_try='test -z "$ac_c_werror_flag"
12283 || test ! -s conftest.err'
4e8d927d
DJ
12284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12285 (eval $ac_try) 2>&5
12286 ac_status=$?
12287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12288 (exit $ac_status); }; } &&
12289 { ac_try='test -s conftest.$ac_objext'
12290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12291 (eval $ac_try) 2>&5
12292 ac_status=$?
12293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12294 (exit $ac_status); }; }; then
12295 ac_lo=0 ac_mid=0
12296 while :; do
12297 cat >conftest.$ac_ext <<_ACEOF
12298/* confdefs.h. */
12299_ACEOF
12300cat confdefs.h >>conftest.$ac_ext
12301cat >>conftest.$ac_ext <<_ACEOF
12302/* end confdefs.h. */
12303$ac_includes_default
4e8d927d
DJ
12304int
12305main ()
12306{
b4e70030 12307static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4e8d927d
DJ
12308test_array [0] = 0
12309
12310 ;
12311 return 0;
12312}
12313_ACEOF
12314rm -f conftest.$ac_objext
12315if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12316 (eval $ac_compile) 2>conftest.er1
12317 ac_status=$?
12318 grep -v '^ *+' conftest.er1 >conftest.err
12319 rm -f conftest.er1
12320 cat conftest.err >&5
12321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12322 (exit $ac_status); } &&
b4e70030
JB
12323 { ac_try='test -z "$ac_c_werror_flag"
12324 || test ! -s conftest.err'
4e8d927d
DJ
12325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12326 (eval $ac_try) 2>&5
12327 ac_status=$?
12328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12329 (exit $ac_status); }; } &&
12330 { ac_try='test -s conftest.$ac_objext'
12331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12332 (eval $ac_try) 2>&5
12333 ac_status=$?
12334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12335 (exit $ac_status); }; }; then
12336 ac_hi=$ac_mid; break
12337else
12338 echo "$as_me: failed program was:" >&5
12339sed 's/^/| /' conftest.$ac_ext >&5
12340
b4e70030
JB
12341ac_lo=`expr $ac_mid + 1`
12342 if test $ac_lo -le $ac_mid; then
12343 ac_lo= ac_hi=
12344 break
12345 fi
12346 ac_mid=`expr 2 '*' $ac_mid + 1`
4e8d927d 12347fi
4e8d927d
DJ
12348rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12349 done
12350else
12351 echo "$as_me: failed program was:" >&5
12352sed 's/^/| /' conftest.$ac_ext >&5
12353
b4e70030 12354cat >conftest.$ac_ext <<_ACEOF
4e8d927d
DJ
12355/* confdefs.h. */
12356_ACEOF
12357cat confdefs.h >>conftest.$ac_ext
12358cat >>conftest.$ac_ext <<_ACEOF
12359/* end confdefs.h. */
12360$ac_includes_default
4e8d927d
DJ
12361int
12362main ()
12363{
b4e70030 12364static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4e8d927d
DJ
12365test_array [0] = 0
12366
12367 ;
12368 return 0;
12369}
12370_ACEOF
12371rm -f conftest.$ac_objext
12372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12373 (eval $ac_compile) 2>conftest.er1
12374 ac_status=$?
12375 grep -v '^ *+' conftest.er1 >conftest.err
12376 rm -f conftest.er1
12377 cat conftest.err >&5
12378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12379 (exit $ac_status); } &&
b4e70030
JB
12380 { ac_try='test -z "$ac_c_werror_flag"
12381 || test ! -s conftest.err'
4e8d927d
DJ
12382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12383 (eval $ac_try) 2>&5
12384 ac_status=$?
12385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12386 (exit $ac_status); }; } &&
12387 { ac_try='test -s conftest.$ac_objext'
12388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12389 (eval $ac_try) 2>&5
12390 ac_status=$?
12391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12392 (exit $ac_status); }; }; then
12393 ac_hi=-1 ac_mid=-1
12394 while :; do
12395 cat >conftest.$ac_ext <<_ACEOF
12396/* confdefs.h. */
12397_ACEOF
12398cat confdefs.h >>conftest.$ac_ext
12399cat >>conftest.$ac_ext <<_ACEOF
12400/* end confdefs.h. */
12401$ac_includes_default
4e8d927d
DJ
12402int
12403main ()
12404{
b4e70030 12405static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4e8d927d
DJ
12406test_array [0] = 0
12407
12408 ;
12409 return 0;
12410}
12411_ACEOF
12412rm -f conftest.$ac_objext
12413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12414 (eval $ac_compile) 2>conftest.er1
12415 ac_status=$?
12416 grep -v '^ *+' conftest.er1 >conftest.err
12417 rm -f conftest.er1
12418 cat conftest.err >&5
12419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12420 (exit $ac_status); } &&
b4e70030
JB
12421 { ac_try='test -z "$ac_c_werror_flag"
12422 || test ! -s conftest.err'
4e8d927d
DJ
12423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12424 (eval $ac_try) 2>&5
12425 ac_status=$?
12426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12427 (exit $ac_status); }; } &&
12428 { ac_try='test -s conftest.$ac_objext'
12429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12430 (eval $ac_try) 2>&5
12431 ac_status=$?
12432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12433 (exit $ac_status); }; }; then
12434 ac_lo=$ac_mid; break
12435else
12436 echo "$as_me: failed program was:" >&5
12437sed 's/^/| /' conftest.$ac_ext >&5
12438
b4e70030
JB
12439ac_hi=`expr '(' $ac_mid ')' - 1`
12440 if test $ac_mid -le $ac_hi; then
12441 ac_lo= ac_hi=
12442 break
12443 fi
12444 ac_mid=`expr 2 '*' $ac_mid`
4e8d927d 12445fi
4e8d927d
DJ
12446rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12447 done
12448else
12449 echo "$as_me: failed program was:" >&5
12450sed 's/^/| /' conftest.$ac_ext >&5
12451
b4e70030 12452ac_lo= ac_hi=
4e8d927d 12453fi
4e8d927d
DJ
12454rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12455fi
4e8d927d
DJ
12456rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12457# Binary search between lo and hi bounds.
12458while test "x$ac_lo" != "x$ac_hi"; do
12459 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12460 cat >conftest.$ac_ext <<_ACEOF
12461/* confdefs.h. */
12462_ACEOF
12463cat confdefs.h >>conftest.$ac_ext
12464cat >>conftest.$ac_ext <<_ACEOF
12465/* end confdefs.h. */
12466$ac_includes_default
4e8d927d
DJ
12467int
12468main ()
12469{
b4e70030 12470static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4e8d927d
DJ
12471test_array [0] = 0
12472
12473 ;
12474 return 0;
12475}
12476_ACEOF
12477rm -f conftest.$ac_objext
12478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12479 (eval $ac_compile) 2>conftest.er1
12480 ac_status=$?
12481 grep -v '^ *+' conftest.er1 >conftest.err
12482 rm -f conftest.er1
12483 cat conftest.err >&5
12484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12485 (exit $ac_status); } &&
b4e70030
JB
12486 { ac_try='test -z "$ac_c_werror_flag"
12487 || test ! -s conftest.err'
4e8d927d
DJ
12488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12489 (eval $ac_try) 2>&5
12490 ac_status=$?
12491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12492 (exit $ac_status); }; } &&
12493 { ac_try='test -s conftest.$ac_objext'
12494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12495 (eval $ac_try) 2>&5
12496 ac_status=$?
12497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12498 (exit $ac_status); }; }; then
12499 ac_hi=$ac_mid
12500else
12501 echo "$as_me: failed program was:" >&5
12502sed 's/^/| /' conftest.$ac_ext >&5
12503
b4e70030 12504ac_lo=`expr '(' $ac_mid ')' + 1`
4e8d927d 12505fi
4e8d927d
DJ
12506rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12507done
12508case $ac_lo in
12509?*) ac_cv_sizeof_short=$ac_lo;;
b4e70030 12510'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4e8d927d 12511See \`config.log' for more details." >&5
b4e70030 12512echo "$as_me: error: cannot compute sizeof (short), 77
4e8d927d 12513See \`config.log' for more details." >&2;}
b4e70030 12514 { (exit 1); exit 1; }; } ;;
4e8d927d 12515esac
b4e70030
JB
12516else
12517 if test "$cross_compiling" = yes; then
12518 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
12519See \`config.log' for more details." >&5
12520echo "$as_me: error: cannot run test program while cross compiling
12521See \`config.log' for more details." >&2;}
12522 { (exit 1); exit 1; }; }
4e8d927d
DJ
12523else
12524 cat >conftest.$ac_ext <<_ACEOF
12525/* confdefs.h. */
12526_ACEOF
12527cat confdefs.h >>conftest.$ac_ext
12528cat >>conftest.$ac_ext <<_ACEOF
12529/* end confdefs.h. */
12530$ac_includes_default
b4e70030
JB
12531long longval () { return (long) (sizeof (short)); }
12532unsigned long ulongval () { return (long) (sizeof (short)); }
4e8d927d
DJ
12533#include <stdio.h>
12534#include <stdlib.h>
12535int
12536main ()
12537{
12538
12539 FILE *f = fopen ("conftest.val", "w");
12540 if (! f)
b4e70030
JB
12541 exit (1);
12542 if (((long) (sizeof (short))) < 0)
4e8d927d 12543 {
b4e70030
JB
12544 long i = longval ();
12545 if (i != ((long) (sizeof (short))))
12546 exit (1);
4e8d927d
DJ
12547 fprintf (f, "%ld\n", i);
12548 }
12549 else
12550 {
b4e70030
JB
12551 unsigned long i = ulongval ();
12552 if (i != ((long) (sizeof (short))))
12553 exit (1);
4e8d927d
DJ
12554 fprintf (f, "%lu\n", i);
12555 }
b4e70030 12556 exit (ferror (f) || fclose (f) != 0);
4e8d927d
DJ
12557
12558 ;
12559 return 0;
12560}
12561_ACEOF
12562rm -f conftest$ac_exeext
12563if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12564 (eval $ac_link) 2>&5
12565 ac_status=$?
12566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12569 (eval $ac_try) 2>&5
12570 ac_status=$?
12571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12572 (exit $ac_status); }; }; then
12573 ac_cv_sizeof_short=`cat conftest.val`
12574else
12575 echo "$as_me: program exited with status $ac_status" >&5
12576echo "$as_me: failed program was:" >&5
12577sed 's/^/| /' conftest.$ac_ext >&5
12578
12579( exit $ac_status )
b4e70030 12580{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4e8d927d 12581See \`config.log' for more details." >&5
b4e70030 12582echo "$as_me: error: cannot compute sizeof (short), 77
4e8d927d 12583See \`config.log' for more details." >&2;}
b4e70030
JB
12584 { (exit 1); exit 1; }; }
12585fi
12586rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4e8d927d 12587fi
4e8d927d
DJ
12588fi
12589rm -f conftest.val
12590else
12591 ac_cv_sizeof_short=0
12592fi
12593fi
b4e70030
JB
12594echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
12595echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4e8d927d
DJ
12596cat >>confdefs.h <<_ACEOF
12597#define SIZEOF_SHORT $ac_cv_sizeof_short
12598_ACEOF
12599
12600
b4e70030
JB
12601 echo "$as_me:$LINENO: checking for char" >&5
12602echo $ECHO_N "checking for char... $ECHO_C" >&6
4e8d927d
DJ
12603if test "${ac_cv_type_char+set}" = set; then
12604 echo $ECHO_N "(cached) $ECHO_C" >&6
12605else
12606 cat >conftest.$ac_ext <<_ACEOF
12607/* confdefs.h. */
12608_ACEOF
12609cat confdefs.h >>conftest.$ac_ext
12610cat >>conftest.$ac_ext <<_ACEOF
12611/* end confdefs.h. */
12612$ac_includes_default
4e8d927d
DJ
12613int
12614main ()
12615{
b4e70030 12616if ((char *) 0)
4e8d927d 12617 return 0;
b4e70030 12618if (sizeof (char))
4e8d927d
DJ
12619 return 0;
12620 ;
12621 return 0;
12622}
12623_ACEOF
12624rm -f conftest.$ac_objext
12625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12626 (eval $ac_compile) 2>conftest.er1
12627 ac_status=$?
12628 grep -v '^ *+' conftest.er1 >conftest.err
12629 rm -f conftest.er1
12630 cat conftest.err >&5
12631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12632 (exit $ac_status); } &&
b4e70030
JB
12633 { ac_try='test -z "$ac_c_werror_flag"
12634 || test ! -s conftest.err'
4e8d927d
DJ
12635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12636 (eval $ac_try) 2>&5
12637 ac_status=$?
12638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12639 (exit $ac_status); }; } &&
12640 { ac_try='test -s conftest.$ac_objext'
12641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12642 (eval $ac_try) 2>&5
12643 ac_status=$?
12644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12645 (exit $ac_status); }; }; then
12646 ac_cv_type_char=yes
12647else
12648 echo "$as_me: failed program was:" >&5
12649sed 's/^/| /' conftest.$ac_ext >&5
12650
b4e70030 12651ac_cv_type_char=no
4e8d927d 12652fi
4e8d927d
DJ
12653rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12654fi
b4e70030
JB
12655echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
12656echo "${ECHO_T}$ac_cv_type_char" >&6
4e8d927d 12657
b4e70030
JB
12658echo "$as_me:$LINENO: checking size of char" >&5
12659echo $ECHO_N "checking size of char... $ECHO_C" >&6
4e8d927d
DJ
12660if test "${ac_cv_sizeof_char+set}" = set; then
12661 echo $ECHO_N "(cached) $ECHO_C" >&6
12662else
12663 if test "$ac_cv_type_char" = yes; then
b4e70030 12664 # The cast to unsigned long works around a bug in the HP C Compiler
4e8d927d
DJ
12665 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12666 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12667 # This bug is HP SR number 8606223364.
12668 if test "$cross_compiling" = yes; then
12669 # Depending upon the size, compute the lo and hi bounds.
12670cat >conftest.$ac_ext <<_ACEOF
12671/* confdefs.h. */
12672_ACEOF
12673cat confdefs.h >>conftest.$ac_ext
12674cat >>conftest.$ac_ext <<_ACEOF
12675/* end confdefs.h. */
12676$ac_includes_default
4e8d927d
DJ
12677int
12678main ()
12679{
b4e70030 12680static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
4e8d927d
DJ
12681test_array [0] = 0
12682
12683 ;
12684 return 0;
12685}
12686_ACEOF
12687rm -f conftest.$ac_objext
12688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12689 (eval $ac_compile) 2>conftest.er1
12690 ac_status=$?
12691 grep -v '^ *+' conftest.er1 >conftest.err
12692 rm -f conftest.er1
12693 cat conftest.err >&5
12694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12695 (exit $ac_status); } &&
b4e70030
JB
12696 { ac_try='test -z "$ac_c_werror_flag"
12697 || test ! -s conftest.err'
4e8d927d
DJ
12698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12699 (eval $ac_try) 2>&5
12700 ac_status=$?
12701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12702 (exit $ac_status); }; } &&
12703 { ac_try='test -s conftest.$ac_objext'
12704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12705 (eval $ac_try) 2>&5
12706 ac_status=$?
12707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12708 (exit $ac_status); }; }; then
12709 ac_lo=0 ac_mid=0
12710 while :; do
12711 cat >conftest.$ac_ext <<_ACEOF
12712/* confdefs.h. */
12713_ACEOF
12714cat confdefs.h >>conftest.$ac_ext
12715cat >>conftest.$ac_ext <<_ACEOF
12716/* end confdefs.h. */
12717$ac_includes_default
4e8d927d
DJ
12718int
12719main ()
12720{
b4e70030 12721static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
4e8d927d
DJ
12722test_array [0] = 0
12723
12724 ;
12725 return 0;
12726}
12727_ACEOF
12728rm -f conftest.$ac_objext
12729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12730 (eval $ac_compile) 2>conftest.er1
12731 ac_status=$?
12732 grep -v '^ *+' conftest.er1 >conftest.err
12733 rm -f conftest.er1
12734 cat conftest.err >&5
12735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12736 (exit $ac_status); } &&
b4e70030
JB
12737 { ac_try='test -z "$ac_c_werror_flag"
12738 || test ! -s conftest.err'
4e8d927d
DJ
12739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12740 (eval $ac_try) 2>&5
12741 ac_status=$?
12742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12743 (exit $ac_status); }; } &&
12744 { ac_try='test -s conftest.$ac_objext'
12745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12746 (eval $ac_try) 2>&5
12747 ac_status=$?
12748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12749 (exit $ac_status); }; }; then
12750 ac_hi=$ac_mid; break
12751else
12752 echo "$as_me: failed program was:" >&5
12753sed 's/^/| /' conftest.$ac_ext >&5
12754
b4e70030
JB
12755ac_lo=`expr $ac_mid + 1`
12756 if test $ac_lo -le $ac_mid; then
12757 ac_lo= ac_hi=
12758 break
12759 fi
12760 ac_mid=`expr 2 '*' $ac_mid + 1`
4e8d927d 12761fi
4e8d927d
DJ
12762rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12763 done
12764else
12765 echo "$as_me: failed program was:" >&5
12766sed 's/^/| /' conftest.$ac_ext >&5
12767
b4e70030 12768cat >conftest.$ac_ext <<_ACEOF
4e8d927d
DJ
12769/* confdefs.h. */
12770_ACEOF
12771cat confdefs.h >>conftest.$ac_ext
12772cat >>conftest.$ac_ext <<_ACEOF
12773/* end confdefs.h. */
12774$ac_includes_default
4e8d927d
DJ
12775int
12776main ()
12777{
b4e70030 12778static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
4e8d927d
DJ
12779test_array [0] = 0
12780
12781 ;
12782 return 0;
12783}
12784_ACEOF
12785rm -f conftest.$ac_objext
12786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12787 (eval $ac_compile) 2>conftest.er1
12788 ac_status=$?
12789 grep -v '^ *+' conftest.er1 >conftest.err
12790 rm -f conftest.er1
12791 cat conftest.err >&5
12792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12793 (exit $ac_status); } &&
b4e70030
JB
12794 { ac_try='test -z "$ac_c_werror_flag"
12795 || test ! -s conftest.err'
4e8d927d
DJ
12796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12797 (eval $ac_try) 2>&5
12798 ac_status=$?
12799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12800 (exit $ac_status); }; } &&
12801 { ac_try='test -s conftest.$ac_objext'
12802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12803 (eval $ac_try) 2>&5
12804 ac_status=$?
12805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12806 (exit $ac_status); }; }; then
12807 ac_hi=-1 ac_mid=-1
12808 while :; do
12809 cat >conftest.$ac_ext <<_ACEOF
12810/* confdefs.h. */
12811_ACEOF
12812cat confdefs.h >>conftest.$ac_ext
12813cat >>conftest.$ac_ext <<_ACEOF
12814/* end confdefs.h. */
12815$ac_includes_default
4e8d927d
DJ
12816int
12817main ()
12818{
b4e70030 12819static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
4e8d927d
DJ
12820test_array [0] = 0
12821
12822 ;
12823 return 0;
12824}
12825_ACEOF
12826rm -f conftest.$ac_objext
12827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12828 (eval $ac_compile) 2>conftest.er1
12829 ac_status=$?
12830 grep -v '^ *+' conftest.er1 >conftest.err
12831 rm -f conftest.er1
12832 cat conftest.err >&5
12833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12834 (exit $ac_status); } &&
b4e70030
JB
12835 { ac_try='test -z "$ac_c_werror_flag"
12836 || test ! -s conftest.err'
4e8d927d
DJ
12837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12838 (eval $ac_try) 2>&5
12839 ac_status=$?
12840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12841 (exit $ac_status); }; } &&
12842 { ac_try='test -s conftest.$ac_objext'
12843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12844 (eval $ac_try) 2>&5
12845 ac_status=$?
12846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12847 (exit $ac_status); }; }; then
12848 ac_lo=$ac_mid; break
12849else
12850 echo "$as_me: failed program was:" >&5
12851sed 's/^/| /' conftest.$ac_ext >&5
12852
b4e70030
JB
12853ac_hi=`expr '(' $ac_mid ')' - 1`
12854 if test $ac_mid -le $ac_hi; then
12855 ac_lo= ac_hi=
12856 break
12857 fi
12858 ac_mid=`expr 2 '*' $ac_mid`
4e8d927d 12859fi
4e8d927d
DJ
12860rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12861 done
12862else
12863 echo "$as_me: failed program was:" >&5
12864sed 's/^/| /' conftest.$ac_ext >&5
12865
b4e70030 12866ac_lo= ac_hi=
4e8d927d 12867fi
4e8d927d
DJ
12868rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12869fi
4e8d927d
DJ
12870rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12871# Binary search between lo and hi bounds.
12872while test "x$ac_lo" != "x$ac_hi"; do
12873 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12874 cat >conftest.$ac_ext <<_ACEOF
12875/* confdefs.h. */
12876_ACEOF
12877cat confdefs.h >>conftest.$ac_ext
12878cat >>conftest.$ac_ext <<_ACEOF
12879/* end confdefs.h. */
12880$ac_includes_default
4e8d927d
DJ
12881int
12882main ()
12883{
b4e70030 12884static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
4e8d927d
DJ
12885test_array [0] = 0
12886
12887 ;
12888 return 0;
12889}
12890_ACEOF
12891rm -f conftest.$ac_objext
12892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12893 (eval $ac_compile) 2>conftest.er1
12894 ac_status=$?
12895 grep -v '^ *+' conftest.er1 >conftest.err
12896 rm -f conftest.er1
12897 cat conftest.err >&5
12898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12899 (exit $ac_status); } &&
b4e70030
JB
12900 { ac_try='test -z "$ac_c_werror_flag"
12901 || test ! -s conftest.err'
4e8d927d
DJ
12902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12903 (eval $ac_try) 2>&5
12904 ac_status=$?
12905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12906 (exit $ac_status); }; } &&
12907 { ac_try='test -s conftest.$ac_objext'
12908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12909 (eval $ac_try) 2>&5
12910 ac_status=$?
12911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12912 (exit $ac_status); }; }; then
12913 ac_hi=$ac_mid
12914else
12915 echo "$as_me: failed program was:" >&5
12916sed 's/^/| /' conftest.$ac_ext >&5
12917
b4e70030 12918ac_lo=`expr '(' $ac_mid ')' + 1`
4e8d927d 12919fi
4e8d927d
DJ
12920rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12921done
12922case $ac_lo in
12923?*) ac_cv_sizeof_char=$ac_lo;;
b4e70030 12924'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
4e8d927d 12925See \`config.log' for more details." >&5
b4e70030 12926echo "$as_me: error: cannot compute sizeof (char), 77
4e8d927d 12927See \`config.log' for more details." >&2;}
b4e70030 12928 { (exit 1); exit 1; }; } ;;
4e8d927d 12929esac
b4e70030
JB
12930else
12931 if test "$cross_compiling" = yes; then
12932 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
12933See \`config.log' for more details." >&5
12934echo "$as_me: error: cannot run test program while cross compiling
12935See \`config.log' for more details." >&2;}
12936 { (exit 1); exit 1; }; }
4e8d927d
DJ
12937else
12938 cat >conftest.$ac_ext <<_ACEOF
12939/* confdefs.h. */
12940_ACEOF
12941cat confdefs.h >>conftest.$ac_ext
12942cat >>conftest.$ac_ext <<_ACEOF
12943/* end confdefs.h. */
12944$ac_includes_default
b4e70030
JB
12945long longval () { return (long) (sizeof (char)); }
12946unsigned long ulongval () { return (long) (sizeof (char)); }
4e8d927d
DJ
12947#include <stdio.h>
12948#include <stdlib.h>
12949int
12950main ()
12951{
12952
12953 FILE *f = fopen ("conftest.val", "w");
12954 if (! f)
b4e70030
JB
12955 exit (1);
12956 if (((long) (sizeof (char))) < 0)
4e8d927d 12957 {
b4e70030
JB
12958 long i = longval ();
12959 if (i != ((long) (sizeof (char))))
12960 exit (1);
4e8d927d
DJ
12961 fprintf (f, "%ld\n", i);
12962 }
12963 else
12964 {
b4e70030
JB
12965 unsigned long i = ulongval ();
12966 if (i != ((long) (sizeof (char))))
12967 exit (1);
4e8d927d
DJ
12968 fprintf (f, "%lu\n", i);
12969 }
b4e70030 12970 exit (ferror (f) || fclose (f) != 0);
4e8d927d
DJ
12971
12972 ;
12973 return 0;
12974}
12975_ACEOF
12976rm -f conftest$ac_exeext
12977if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12978 (eval $ac_link) 2>&5
12979 ac_status=$?
12980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12981 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12983 (eval $ac_try) 2>&5
12984 ac_status=$?
12985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12986 (exit $ac_status); }; }; then
12987 ac_cv_sizeof_char=`cat conftest.val`
12988else
12989 echo "$as_me: program exited with status $ac_status" >&5
12990echo "$as_me: failed program was:" >&5
12991sed 's/^/| /' conftest.$ac_ext >&5
12992
12993( exit $ac_status )
b4e70030 12994{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
4e8d927d 12995See \`config.log' for more details." >&5
b4e70030 12996echo "$as_me: error: cannot compute sizeof (char), 77
4e8d927d 12997See \`config.log' for more details." >&2;}
b4e70030
JB
12998 { (exit 1); exit 1; }; }
12999fi
13000rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4e8d927d 13001fi
4e8d927d
DJ
13002fi
13003rm -f conftest.val
13004else
13005 ac_cv_sizeof_char=0
13006fi
13007fi
b4e70030
JB
13008echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
13009echo "${ECHO_T}$ac_cv_sizeof_char" >&6
4e8d927d
DJ
13010cat >>confdefs.h <<_ACEOF
13011#define SIZEOF_CHAR $ac_cv_sizeof_char
13012_ACEOF
13013
13014
13015
b4e70030
JB
13016 echo "$as_me:$LINENO: checking for type equivalent to int8_t" >&5
13017echo $ECHO_N "checking for type equivalent to int8_t... $ECHO_C" >&6
4e8d927d
DJ
13018 case "$ac_cv_sizeof_char" in
13019 1) acx_cv_type_int8_t=char ;;
13020 *) { { echo "$as_me:$LINENO: error: no 8-bit type" >&5
13021echo "$as_me: error: no 8-bit type" >&2;}
13022 { (exit please report a bug); exit please report a bug; }; }
13023 esac
b4e70030
JB
13024 echo "$as_me:$LINENO: result: $acx_cv_type_int8_t" >&5
13025echo "${ECHO_T}$acx_cv_type_int8_t" >&6
4e8d927d 13026
b4e70030
JB
13027 echo "$as_me:$LINENO: checking for type equivalent to int16_t" >&5
13028echo $ECHO_N "checking for type equivalent to int16_t... $ECHO_C" >&6
4e8d927d
DJ
13029 case "$ac_cv_sizeof_int:$ac_cv_sizeof_short" in
13030 2:*) acx_cv_type_int16_t=int ;;
13031 *:2) acx_cv_type_int16_t=short ;;
13032 *) { { echo "$as_me:$LINENO: error: no 16-bit type" >&5
13033echo "$as_me: error: no 16-bit type" >&2;}
13034 { (exit please report a bug); exit please report a bug; }; }
13035 esac
b4e70030
JB
13036 echo "$as_me:$LINENO: result: $acx_cv_type_int16_t" >&5
13037echo "${ECHO_T}$acx_cv_type_int16_t" >&6
4e8d927d 13038
b4e70030
JB
13039 echo "$as_me:$LINENO: checking for type equivalent to int32_t" >&5
13040echo $ECHO_N "checking for type equivalent to int32_t... $ECHO_C" >&6
4e8d927d
DJ
13041 case "$ac_cv_sizeof_int:$ac_cv_sizeof_long" in
13042 4:*) acx_cv_type_int32_t=int ;;
13043 *:4) acx_cv_type_int32_t=long ;;
13044 *) { { echo "$as_me:$LINENO: error: no 32-bit type" >&5
13045echo "$as_me: error: no 32-bit type" >&2;}
13046 { (exit please report a bug); exit please report a bug; }; }
13047 esac
b4e70030
JB
13048 echo "$as_me:$LINENO: result: $acx_cv_type_int32_t" >&5
13049echo "${ECHO_T}$acx_cv_type_int32_t" >&6
4e8d927d
DJ
13050fi
13051
13052# These tests are here to make the output prettier
13053
13054if test "$ac_cv_type_uint64_t" != yes && test "$ac_cv_type_u_int64_t" != yes; then
13055 case "$ac_cv_sizeof_long" in
13056 8) acx_cv_type_int64_t=long ;;
13057 esac
b4e70030
JB
13058 echo "$as_me:$LINENO: checking for type equivalent to int64_t" >&5
13059echo $ECHO_N "checking for type equivalent to int64_t... $ECHO_C" >&6
13060 echo "$as_me:$LINENO: result: ${acx_cv_type_int64_t-'using preprocessor symbols'}" >&5
13061echo "${ECHO_T}${acx_cv_type_int64_t-'using preprocessor symbols'}" >&6
4e8d927d
DJ
13062fi
13063
13064# Now we can use the above types
13065
13066if test "$ac_cv_type_uintptr_t" != yes; then
b4e70030
JB
13067 echo "$as_me:$LINENO: checking for type equivalent to intptr_t" >&5
13068echo $ECHO_N "checking for type equivalent to intptr_t... $ECHO_C" >&6
4e8d927d
DJ
13069 case $ac_cv_sizeof_void_p in
13070 2) acx_cv_type_intptr_t=int16_t ;;
13071 4) acx_cv_type_intptr_t=int32_t ;;
13072 8) acx_cv_type_intptr_t=int64_t ;;
13073 *) { { echo "$as_me:$LINENO: error: no equivalent for intptr_t" >&5
13074echo "$as_me: error: no equivalent for intptr_t" >&2;}
13075 { (exit please report a bug); exit please report a bug; }; }
13076 esac
b4e70030
JB
13077 echo "$as_me:$LINENO: result: $acx_cv_type_intptr_t" >&5
13078echo "${ECHO_T}$acx_cv_type_intptr_t" >&6
4e8d927d
DJ
13079fi
13080
13081# ----------------- done all checks, emit header -------------
b4e70030 13082 ac_config_commands="$ac_config_commands gdb_stdint.h"
4e8d927d
DJ
13083
13084
13085
13086
13087# ------------------------- #
13088# Checks for declarations. #
13089# ------------------------- #
13090
b4e70030
JB
13091echo "$as_me:$LINENO: checking whether free is declared" >&5
13092echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
4e8d927d
DJ
13093if test "${ac_cv_have_decl_free+set}" = set; then
13094 echo $ECHO_N "(cached) $ECHO_C" >&6
13095else
13096 cat >conftest.$ac_ext <<_ACEOF
13097/* confdefs.h. */
13098_ACEOF
13099cat confdefs.h >>conftest.$ac_ext
13100cat >>conftest.$ac_ext <<_ACEOF
13101/* end confdefs.h. */
13102$ac_includes_default
13103int
13104main ()
13105{
13106#ifndef free
13107 char *p = (char *) free;
4e8d927d
DJ
13108#endif
13109
13110 ;
13111 return 0;
13112}
13113_ACEOF
13114rm -f conftest.$ac_objext
13115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13116 (eval $ac_compile) 2>conftest.er1
13117 ac_status=$?
13118 grep -v '^ *+' conftest.er1 >conftest.err
13119 rm -f conftest.er1
13120 cat conftest.err >&5
13121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13122 (exit $ac_status); } &&
b4e70030
JB
13123 { ac_try='test -z "$ac_c_werror_flag"
13124 || test ! -s conftest.err'
4e8d927d
DJ
13125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13126 (eval $ac_try) 2>&5
13127 ac_status=$?
13128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13129 (exit $ac_status); }; } &&
13130 { ac_try='test -s conftest.$ac_objext'
13131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13132 (eval $ac_try) 2>&5
13133 ac_status=$?
13134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13135 (exit $ac_status); }; }; then
13136 ac_cv_have_decl_free=yes
13137else
13138 echo "$as_me: failed program was:" >&5
13139sed 's/^/| /' conftest.$ac_ext >&5
13140
b4e70030 13141ac_cv_have_decl_free=no
4e8d927d 13142fi
4e8d927d
DJ
13143rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13144fi
b4e70030
JB
13145echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
13146echo "${ECHO_T}$ac_cv_have_decl_free" >&6
4e8d927d
DJ
13147if test $ac_cv_have_decl_free = yes; then
13148
13149cat >>confdefs.h <<_ACEOF
13150#define HAVE_DECL_FREE 1
13151_ACEOF
13152
13153
13154else
13155 cat >>confdefs.h <<_ACEOF
13156#define HAVE_DECL_FREE 0
13157_ACEOF
13158
13159
13160fi
b4e70030
JB
13161echo "$as_me:$LINENO: checking whether malloc is declared" >&5
13162echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
4e8d927d
DJ
13163if test "${ac_cv_have_decl_malloc+set}" = set; then
13164 echo $ECHO_N "(cached) $ECHO_C" >&6
13165else
13166 cat >conftest.$ac_ext <<_ACEOF
13167/* confdefs.h. */
13168_ACEOF
13169cat confdefs.h >>conftest.$ac_ext
13170cat >>conftest.$ac_ext <<_ACEOF
13171/* end confdefs.h. */
13172$ac_includes_default
13173int
13174main ()
13175{
13176#ifndef malloc
13177 char *p = (char *) malloc;
4e8d927d
DJ
13178#endif
13179
13180 ;
13181 return 0;
13182}
13183_ACEOF
13184rm -f conftest.$ac_objext
13185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13186 (eval $ac_compile) 2>conftest.er1
13187 ac_status=$?
13188 grep -v '^ *+' conftest.er1 >conftest.err
13189 rm -f conftest.er1
13190 cat conftest.err >&5
13191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13192 (exit $ac_status); } &&
b4e70030
JB
13193 { ac_try='test -z "$ac_c_werror_flag"
13194 || test ! -s conftest.err'
4e8d927d
DJ
13195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13196 (eval $ac_try) 2>&5
13197 ac_status=$?
13198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13199 (exit $ac_status); }; } &&
13200 { ac_try='test -s conftest.$ac_objext'
13201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13202 (eval $ac_try) 2>&5
13203 ac_status=$?
13204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13205 (exit $ac_status); }; }; then
13206 ac_cv_have_decl_malloc=yes
13207else
13208 echo "$as_me: failed program was:" >&5
13209sed 's/^/| /' conftest.$ac_ext >&5
13210
b4e70030 13211ac_cv_have_decl_malloc=no
4e8d927d 13212fi
4e8d927d
DJ
13213rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13214fi
b4e70030
JB
13215echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
13216echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
4e8d927d
DJ
13217if test $ac_cv_have_decl_malloc = yes; then
13218
13219cat >>confdefs.h <<_ACEOF
13220#define HAVE_DECL_MALLOC 1
13221_ACEOF
13222
13223
13224else
13225 cat >>confdefs.h <<_ACEOF
13226#define HAVE_DECL_MALLOC 0
13227_ACEOF
13228
13229
13230fi
b4e70030
JB
13231echo "$as_me:$LINENO: checking whether realloc is declared" >&5
13232echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
4e8d927d
DJ
13233if test "${ac_cv_have_decl_realloc+set}" = set; then
13234 echo $ECHO_N "(cached) $ECHO_C" >&6
13235else
13236 cat >conftest.$ac_ext <<_ACEOF
13237/* confdefs.h. */
13238_ACEOF
13239cat confdefs.h >>conftest.$ac_ext
13240cat >>conftest.$ac_ext <<_ACEOF
13241/* end confdefs.h. */
13242$ac_includes_default
13243int
13244main ()
13245{
13246#ifndef realloc
13247 char *p = (char *) realloc;
4e8d927d
DJ
13248#endif
13249
13250 ;
13251 return 0;
13252}
13253_ACEOF
13254rm -f conftest.$ac_objext
13255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13256 (eval $ac_compile) 2>conftest.er1
13257 ac_status=$?
13258 grep -v '^ *+' conftest.er1 >conftest.err
13259 rm -f conftest.er1
13260 cat conftest.err >&5
13261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13262 (exit $ac_status); } &&
b4e70030
JB
13263 { ac_try='test -z "$ac_c_werror_flag"
13264 || test ! -s conftest.err'
4e8d927d
DJ
13265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13266 (eval $ac_try) 2>&5
13267 ac_status=$?
13268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13269 (exit $ac_status); }; } &&
13270 { ac_try='test -s conftest.$ac_objext'
13271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13272 (eval $ac_try) 2>&5
13273 ac_status=$?
13274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13275 (exit $ac_status); }; }; then
13276 ac_cv_have_decl_realloc=yes
13277else
13278 echo "$as_me: failed program was:" >&5
13279sed 's/^/| /' conftest.$ac_ext >&5
13280
b4e70030 13281ac_cv_have_decl_realloc=no
4e8d927d 13282fi
4e8d927d
DJ
13283rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13284fi
b4e70030
JB
13285echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
13286echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
4e8d927d
DJ
13287if test $ac_cv_have_decl_realloc = yes; then
13288
13289cat >>confdefs.h <<_ACEOF
13290#define HAVE_DECL_REALLOC 1
13291_ACEOF
13292
13293
13294else
13295 cat >>confdefs.h <<_ACEOF
13296#define HAVE_DECL_REALLOC 0
13297_ACEOF
13298
13299
13300fi
13301
13302
b4e70030
JB
13303echo "$as_me:$LINENO: checking whether strerror is declared" >&5
13304echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
4e8d927d
DJ
13305if test "${ac_cv_have_decl_strerror+set}" = set; then
13306 echo $ECHO_N "(cached) $ECHO_C" >&6
13307else
13308 cat >conftest.$ac_ext <<_ACEOF
13309/* confdefs.h. */
13310_ACEOF
13311cat confdefs.h >>conftest.$ac_ext
13312cat >>conftest.$ac_ext <<_ACEOF
13313/* end confdefs.h. */
13314$ac_includes_default
13315int
13316main ()
13317{
13318#ifndef strerror
13319 char *p = (char *) strerror;
4e8d927d
DJ
13320#endif
13321
13322 ;
13323 return 0;
13324}
13325_ACEOF
13326rm -f conftest.$ac_objext
13327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13328 (eval $ac_compile) 2>conftest.er1
13329 ac_status=$?
13330 grep -v '^ *+' conftest.er1 >conftest.err
13331 rm -f conftest.er1
13332 cat conftest.err >&5
13333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13334 (exit $ac_status); } &&
b4e70030
JB
13335 { ac_try='test -z "$ac_c_werror_flag"
13336 || test ! -s conftest.err'
4e8d927d
DJ
13337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13338 (eval $ac_try) 2>&5
13339 ac_status=$?
13340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13341 (exit $ac_status); }; } &&
13342 { ac_try='test -s conftest.$ac_objext'
13343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13344 (eval $ac_try) 2>&5
13345 ac_status=$?
13346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13347 (exit $ac_status); }; }; then
13348 ac_cv_have_decl_strerror=yes
13349else
13350 echo "$as_me: failed program was:" >&5
13351sed 's/^/| /' conftest.$ac_ext >&5
13352
b4e70030 13353ac_cv_have_decl_strerror=no
4e8d927d 13354fi
4e8d927d
DJ
13355rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13356fi
b4e70030
JB
13357echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
13358echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
4e8d927d
DJ
13359if test $ac_cv_have_decl_strerror = yes; then
13360
13361cat >>confdefs.h <<_ACEOF
13362#define HAVE_DECL_STRERROR 1
13363_ACEOF
13364
13365
13366else
13367 cat >>confdefs.h <<_ACEOF
13368#define HAVE_DECL_STRERROR 0
13369_ACEOF
13370
13371
13372fi
b4e70030
JB
13373echo "$as_me:$LINENO: checking whether strstr is declared" >&5
13374echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
4e8d927d
DJ
13375if test "${ac_cv_have_decl_strstr+set}" = set; then
13376 echo $ECHO_N "(cached) $ECHO_C" >&6
13377else
13378 cat >conftest.$ac_ext <<_ACEOF
13379/* confdefs.h. */
13380_ACEOF
13381cat confdefs.h >>conftest.$ac_ext
13382cat >>conftest.$ac_ext <<_ACEOF
13383/* end confdefs.h. */
13384$ac_includes_default
13385int
13386main ()
13387{
13388#ifndef strstr
13389 char *p = (char *) strstr;
4e8d927d
DJ
13390#endif
13391
13392 ;
13393 return 0;
13394}
13395_ACEOF
13396rm -f conftest.$ac_objext
13397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13398 (eval $ac_compile) 2>conftest.er1
13399 ac_status=$?
13400 grep -v '^ *+' conftest.er1 >conftest.err
13401 rm -f conftest.er1
13402 cat conftest.err >&5
13403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13404 (exit $ac_status); } &&
b4e70030
JB
13405 { ac_try='test -z "$ac_c_werror_flag"
13406 || test ! -s conftest.err'
4e8d927d
DJ
13407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13408 (eval $ac_try) 2>&5
13409 ac_status=$?
13410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13411 (exit $ac_status); }; } &&
13412 { ac_try='test -s conftest.$ac_objext'
13413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13414 (eval $ac_try) 2>&5
13415 ac_status=$?
13416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13417 (exit $ac_status); }; }; then
13418 ac_cv_have_decl_strstr=yes
13419else
13420 echo "$as_me: failed program was:" >&5
13421sed 's/^/| /' conftest.$ac_ext >&5
13422
b4e70030 13423ac_cv_have_decl_strstr=no
4e8d927d 13424fi
4e8d927d
DJ
13425rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13426fi
b4e70030
JB
13427echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
13428echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
4e8d927d
DJ
13429if test $ac_cv_have_decl_strstr = yes; then
13430
13431cat >>confdefs.h <<_ACEOF
13432#define HAVE_DECL_STRSTR 1
13433_ACEOF
13434
13435
13436else
13437 cat >>confdefs.h <<_ACEOF
13438#define HAVE_DECL_STRSTR 0
13439_ACEOF
13440
13441
13442fi
13443
13444
b4e70030
JB
13445echo "$as_me:$LINENO: checking whether getopt is declared" >&5
13446echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
4e8d927d
DJ
13447if test "${ac_cv_have_decl_getopt+set}" = set; then
13448 echo $ECHO_N "(cached) $ECHO_C" >&6
13449else
13450 cat >conftest.$ac_ext <<_ACEOF
13451/* confdefs.h. */
13452_ACEOF
13453cat confdefs.h >>conftest.$ac_ext
13454cat >>conftest.$ac_ext <<_ACEOF
13455/* end confdefs.h. */
13456$ac_includes_default
13457int
13458main ()
13459{
13460#ifndef getopt
13461 char *p = (char *) getopt;
4e8d927d
DJ
13462#endif
13463
13464 ;
13465 return 0;
13466}
13467_ACEOF
13468rm -f conftest.$ac_objext
13469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13470 (eval $ac_compile) 2>conftest.er1
13471 ac_status=$?
13472 grep -v '^ *+' conftest.er1 >conftest.err
13473 rm -f conftest.er1
13474 cat conftest.err >&5
13475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13476 (exit $ac_status); } &&
b4e70030
JB
13477 { ac_try='test -z "$ac_c_werror_flag"
13478 || test ! -s conftest.err'
4e8d927d
DJ
13479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13480 (eval $ac_try) 2>&5
13481 ac_status=$?
13482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13483 (exit $ac_status); }; } &&
13484 { ac_try='test -s conftest.$ac_objext'
13485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13486 (eval $ac_try) 2>&5
13487 ac_status=$?
13488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13489 (exit $ac_status); }; }; then
13490 ac_cv_have_decl_getopt=yes
13491else
13492 echo "$as_me: failed program was:" >&5
13493sed 's/^/| /' conftest.$ac_ext >&5
13494
b4e70030 13495ac_cv_have_decl_getopt=no
4e8d927d 13496fi
4e8d927d
DJ
13497rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13498fi
b4e70030
JB
13499echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
13500echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
4e8d927d
DJ
13501if test $ac_cv_have_decl_getopt = yes; then
13502
13503cat >>confdefs.h <<_ACEOF
13504#define HAVE_DECL_GETOPT 1
13505_ACEOF
13506
13507
13508else
13509 cat >>confdefs.h <<_ACEOF
13510#define HAVE_DECL_GETOPT 0
13511_ACEOF
13512
13513
13514fi
b4e70030
JB
13515echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
13516echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
4e8d927d
DJ
13517if test "${ac_cv_have_decl_snprintf+set}" = set; then
13518 echo $ECHO_N "(cached) $ECHO_C" >&6
13519else
13520 cat >conftest.$ac_ext <<_ACEOF
13521/* confdefs.h. */
13522_ACEOF
13523cat confdefs.h >>conftest.$ac_ext
13524cat >>conftest.$ac_ext <<_ACEOF
13525/* end confdefs.h. */
13526$ac_includes_default
13527int
13528main ()
13529{
13530#ifndef snprintf
13531 char *p = (char *) snprintf;
4e8d927d
DJ
13532#endif
13533
13534 ;
13535 return 0;
13536}
13537_ACEOF
13538rm -f conftest.$ac_objext
13539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13540 (eval $ac_compile) 2>conftest.er1
13541 ac_status=$?
13542 grep -v '^ *+' conftest.er1 >conftest.err
13543 rm -f conftest.er1
13544 cat conftest.err >&5
13545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13546 (exit $ac_status); } &&
b4e70030
JB
13547 { ac_try='test -z "$ac_c_werror_flag"
13548 || test ! -s conftest.err'
4e8d927d
DJ
13549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13550 (eval $ac_try) 2>&5
13551 ac_status=$?
13552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13553 (exit $ac_status); }; } &&
13554 { ac_try='test -s conftest.$ac_objext'
13555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13556 (eval $ac_try) 2>&5
13557 ac_status=$?
13558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13559 (exit $ac_status); }; }; then
13560 ac_cv_have_decl_snprintf=yes
13561else
13562 echo "$as_me: failed program was:" >&5
13563sed 's/^/| /' conftest.$ac_ext >&5
13564
b4e70030 13565ac_cv_have_decl_snprintf=no
4e8d927d 13566fi
4e8d927d
DJ
13567rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13568fi
b4e70030
JB
13569echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
13570echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
4e8d927d
DJ
13571if test $ac_cv_have_decl_snprintf = yes; then
13572
13573cat >>confdefs.h <<_ACEOF
13574#define HAVE_DECL_SNPRINTF 1
13575_ACEOF
13576
13577
13578else
13579 cat >>confdefs.h <<_ACEOF
13580#define HAVE_DECL_SNPRINTF 0
13581_ACEOF
13582
13583
13584fi
b4e70030
JB
13585echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
13586echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
4e8d927d
DJ
13587if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
13588 echo $ECHO_N "(cached) $ECHO_C" >&6
13589else
13590 cat >conftest.$ac_ext <<_ACEOF
13591/* confdefs.h. */
13592_ACEOF
13593cat confdefs.h >>conftest.$ac_ext
13594cat >>conftest.$ac_ext <<_ACEOF
13595/* end confdefs.h. */
13596$ac_includes_default
13597int
13598main ()
13599{
13600#ifndef vsnprintf
13601 char *p = (char *) vsnprintf;
4e8d927d
DJ
13602#endif
13603
13604 ;
13605 return 0;
13606}
13607_ACEOF
13608rm -f conftest.$ac_objext
13609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13610 (eval $ac_compile) 2>conftest.er1
13611 ac_status=$?
13612 grep -v '^ *+' conftest.er1 >conftest.err
13613 rm -f conftest.er1
13614 cat conftest.err >&5
13615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13616 (exit $ac_status); } &&
b4e70030
JB
13617 { ac_try='test -z "$ac_c_werror_flag"
13618 || test ! -s conftest.err'
4e8d927d
DJ
13619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13620 (eval $ac_try) 2>&5
13621 ac_status=$?
13622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13623 (exit $ac_status); }; } &&
13624 { ac_try='test -s conftest.$ac_objext'
13625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13626 (eval $ac_try) 2>&5
13627 ac_status=$?
13628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13629 (exit $ac_status); }; }; then
13630 ac_cv_have_decl_vsnprintf=yes
13631else
13632 echo "$as_me: failed program was:" >&5
13633sed 's/^/| /' conftest.$ac_ext >&5
13634
b4e70030 13635ac_cv_have_decl_vsnprintf=no
4e8d927d 13636fi
4e8d927d
DJ
13637rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13638fi
b4e70030
JB
13639echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
13640echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
4e8d927d
DJ
13641if test $ac_cv_have_decl_vsnprintf = yes; then
13642
13643cat >>confdefs.h <<_ACEOF
13644#define HAVE_DECL_VSNPRINTF 1
13645_ACEOF
13646
13647
13648else
13649 cat >>confdefs.h <<_ACEOF
13650#define HAVE_DECL_VSNPRINTF 0
13651_ACEOF
13652
13653
13654fi
13655
13656
13657
13658# ----------------------- #
13659# Checks for structures. #
13660# ----------------------- #
13661
b4e70030
JB
13662echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13663echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
4e8d927d
DJ
13664if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13665 echo $ECHO_N "(cached) $ECHO_C" >&6
13666else
13667 cat >conftest.$ac_ext <<_ACEOF
13668/* confdefs.h. */
13669_ACEOF
13670cat confdefs.h >>conftest.$ac_ext
13671cat >>conftest.$ac_ext <<_ACEOF
13672/* end confdefs.h. */
13673$ac_includes_default
13674int
13675main ()
13676{
13677static struct stat ac_aggr;
13678if (ac_aggr.st_blocks)
13679return 0;
13680 ;
13681 return 0;
13682}
13683_ACEOF
13684rm -f conftest.$ac_objext
13685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13686 (eval $ac_compile) 2>conftest.er1
13687 ac_status=$?
13688 grep -v '^ *+' conftest.er1 >conftest.err
13689 rm -f conftest.er1
13690 cat conftest.err >&5
13691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13692 (exit $ac_status); } &&
b4e70030
JB
13693 { ac_try='test -z "$ac_c_werror_flag"
13694 || test ! -s conftest.err'
4e8d927d
DJ
13695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13696 (eval $ac_try) 2>&5
13697 ac_status=$?
13698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13699 (exit $ac_status); }; } &&
13700 { ac_try='test -s conftest.$ac_objext'
13701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13702 (eval $ac_try) 2>&5
13703 ac_status=$?
13704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13705 (exit $ac_status); }; }; then
13706 ac_cv_member_struct_stat_st_blocks=yes
13707else
13708 echo "$as_me: failed program was:" >&5
13709sed 's/^/| /' conftest.$ac_ext >&5
13710
b4e70030 13711cat >conftest.$ac_ext <<_ACEOF
4e8d927d
DJ
13712/* confdefs.h. */
13713_ACEOF
13714cat confdefs.h >>conftest.$ac_ext
13715cat >>conftest.$ac_ext <<_ACEOF
13716/* end confdefs.h. */
13717$ac_includes_default
13718int
13719main ()
13720{
13721static struct stat ac_aggr;
13722if (sizeof ac_aggr.st_blocks)
13723return 0;
13724 ;
13725 return 0;
13726}
13727_ACEOF
13728rm -f conftest.$ac_objext
13729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13730 (eval $ac_compile) 2>conftest.er1
13731 ac_status=$?
13732 grep -v '^ *+' conftest.er1 >conftest.err
13733 rm -f conftest.er1
13734 cat conftest.err >&5
13735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13736 (exit $ac_status); } &&
b4e70030
JB
13737 { ac_try='test -z "$ac_c_werror_flag"
13738 || test ! -s conftest.err'
4e8d927d
DJ
13739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13740 (eval $ac_try) 2>&5
13741 ac_status=$?
13742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13743 (exit $ac_status); }; } &&
13744 { ac_try='test -s conftest.$ac_objext'
13745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13746 (eval $ac_try) 2>&5
13747 ac_status=$?
13748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13749 (exit $ac_status); }; }; then
13750 ac_cv_member_struct_stat_st_blocks=yes
13751else
13752 echo "$as_me: failed program was:" >&5
13753sed 's/^/| /' conftest.$ac_ext >&5
13754
b4e70030 13755ac_cv_member_struct_stat_st_blocks=no
4e8d927d 13756fi
4e8d927d
DJ
13757rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13758fi
4e8d927d
DJ
13759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13760fi
b4e70030
JB
13761echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13762echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
4e8d927d
DJ
13763if test $ac_cv_member_struct_stat_st_blocks = yes; then
13764
13765cat >>confdefs.h <<_ACEOF
13766#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13767_ACEOF
13768
13769
13770fi
13771
b4e70030
JB
13772echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13773echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
4e8d927d
DJ
13774if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13775 echo $ECHO_N "(cached) $ECHO_C" >&6
13776else
13777 cat >conftest.$ac_ext <<_ACEOF
13778/* confdefs.h. */
13779_ACEOF
13780cat confdefs.h >>conftest.$ac_ext
13781cat >>conftest.$ac_ext <<_ACEOF
13782/* end confdefs.h. */
13783$ac_includes_default
13784int
13785main ()
13786{
13787static struct stat ac_aggr;
13788if (ac_aggr.st_blksize)
13789return 0;
13790 ;
13791 return 0;
13792}
13793_ACEOF
13794rm -f conftest.$ac_objext
13795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13796 (eval $ac_compile) 2>conftest.er1
13797 ac_status=$?
13798 grep -v '^ *+' conftest.er1 >conftest.err
13799 rm -f conftest.er1
13800 cat conftest.err >&5
13801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13802 (exit $ac_status); } &&
b4e70030
JB
13803 { ac_try='test -z "$ac_c_werror_flag"
13804 || test ! -s conftest.err'
4e8d927d
DJ
13805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13806 (eval $ac_try) 2>&5
13807 ac_status=$?
13808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13809 (exit $ac_status); }; } &&
13810 { ac_try='test -s conftest.$ac_objext'
13811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13812 (eval $ac_try) 2>&5
13813 ac_status=$?
13814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13815 (exit $ac_status); }; }; then
13816 ac_cv_member_struct_stat_st_blksize=yes
13817else
13818 echo "$as_me: failed program was:" >&5
13819sed 's/^/| /' conftest.$ac_ext >&5
13820
b4e70030 13821cat >conftest.$ac_ext <<_ACEOF
4e8d927d
DJ
13822/* confdefs.h. */
13823_ACEOF
13824cat confdefs.h >>conftest.$ac_ext
13825cat >>conftest.$ac_ext <<_ACEOF
13826/* end confdefs.h. */
13827$ac_includes_default
13828int
13829main ()
13830{
13831static struct stat ac_aggr;
13832if (sizeof ac_aggr.st_blksize)
13833return 0;
13834 ;
13835 return 0;
13836}
13837_ACEOF
13838rm -f conftest.$ac_objext
13839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13840 (eval $ac_compile) 2>conftest.er1
13841 ac_status=$?
13842 grep -v '^ *+' conftest.er1 >conftest.err
13843 rm -f conftest.er1
13844 cat conftest.err >&5
13845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13846 (exit $ac_status); } &&
b4e70030
JB
13847 { ac_try='test -z "$ac_c_werror_flag"
13848 || test ! -s conftest.err'
4e8d927d
DJ
13849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13850 (eval $ac_try) 2>&5
13851 ac_status=$?
13852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13853 (exit $ac_status); }; } &&
13854 { ac_try='test -s conftest.$ac_objext'
13855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13856 (eval $ac_try) 2>&5
13857 ac_status=$?
13858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13859 (exit $ac_status); }; }; then
13860 ac_cv_member_struct_stat_st_blksize=yes
13861else
13862 echo "$as_me: failed program was:" >&5
13863sed 's/^/| /' conftest.$ac_ext >&5
13864
b4e70030 13865ac_cv_member_struct_stat_st_blksize=no
4e8d927d 13866fi
4e8d927d
DJ
13867rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13868fi
4e8d927d
DJ
13869rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13870fi
b4e70030
JB
13871echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13872echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
4e8d927d
DJ
13873if test $ac_cv_member_struct_stat_st_blksize = yes; then
13874
13875cat >>confdefs.h <<_ACEOF
13876#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13877_ACEOF
13878
13879
13880fi
13881
13882
13883# ------------------ #
13884# Checks for types. #
13885# ------------------ #
13886
b4e70030
JB
13887echo "$as_me:$LINENO: checking return type of signal handlers" >&5
13888echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4e8d927d
DJ
13889if test "${ac_cv_type_signal+set}" = set; then
13890 echo $ECHO_N "(cached) $ECHO_C" >&6
13891else
13892 cat >conftest.$ac_ext <<_ACEOF
13893/* confdefs.h. */
13894_ACEOF
13895cat confdefs.h >>conftest.$ac_ext
13896cat >>conftest.$ac_ext <<_ACEOF
13897/* end confdefs.h. */
13898#include <sys/types.h>
13899#include <signal.h>
b4e70030
JB
13900#ifdef signal
13901# undef signal
13902#endif
13903#ifdef __cplusplus
13904extern "C" void (*signal (int, void (*)(int)))(int);
13905#else
13906void (*signal ()) ();
13907#endif
4e8d927d
DJ
13908
13909int
13910main ()
13911{
b4e70030 13912int i;
4e8d927d
DJ
13913 ;
13914 return 0;
13915}
13916_ACEOF
13917rm -f conftest.$ac_objext
13918if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13919 (eval $ac_compile) 2>conftest.er1
13920 ac_status=$?
13921 grep -v '^ *+' conftest.er1 >conftest.err
13922 rm -f conftest.er1
13923 cat conftest.err >&5
13924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13925 (exit $ac_status); } &&
b4e70030
JB
13926 { ac_try='test -z "$ac_c_werror_flag"
13927 || test ! -s conftest.err'
4e8d927d
DJ
13928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13929 (eval $ac_try) 2>&5
13930 ac_status=$?
13931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13932 (exit $ac_status); }; } &&
13933 { ac_try='test -s conftest.$ac_objext'
13934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13935 (eval $ac_try) 2>&5
13936 ac_status=$?
13937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13938 (exit $ac_status); }; }; then
b4e70030 13939 ac_cv_type_signal=void
4e8d927d
DJ
13940else
13941 echo "$as_me: failed program was:" >&5
13942sed 's/^/| /' conftest.$ac_ext >&5
13943
b4e70030 13944ac_cv_type_signal=int
4e8d927d 13945fi
4e8d927d
DJ
13946rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13947fi
b4e70030
JB
13948echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
13949echo "${ECHO_T}$ac_cv_type_signal" >&6
4e8d927d
DJ
13950
13951cat >>confdefs.h <<_ACEOF
13952#define RETSIGTYPE $ac_cv_type_signal
13953_ACEOF
13954
13955
b4e70030
JB
13956echo "$as_me:$LINENO: checking for socklen_t" >&5
13957echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
4e8d927d
DJ
13958if test "${ac_cv_type_socklen_t+set}" = set; then
13959 echo $ECHO_N "(cached) $ECHO_C" >&6
13960else
13961 cat >conftest.$ac_ext <<_ACEOF
13962/* confdefs.h. */
13963_ACEOF
13964cat confdefs.h >>conftest.$ac_ext
13965cat >>conftest.$ac_ext <<_ACEOF
13966/* end confdefs.h. */
13967#include <sys/types.h>
13968#include <sys/socket.h>
13969
13970
4e8d927d
DJ
13971int
13972main ()
13973{
b4e70030 13974if ((socklen_t *) 0)
4e8d927d 13975 return 0;
b4e70030 13976if (sizeof (socklen_t))
4e8d927d
DJ
13977 return 0;
13978 ;
13979 return 0;
13980}
13981_ACEOF
13982rm -f conftest.$ac_objext
13983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13984 (eval $ac_compile) 2>conftest.er1
13985 ac_status=$?
13986 grep -v '^ *+' conftest.er1 >conftest.err
13987 rm -f conftest.er1
13988 cat conftest.err >&5
13989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13990 (exit $ac_status); } &&
b4e70030
JB
13991 { ac_try='test -z "$ac_c_werror_flag"
13992 || test ! -s conftest.err'
4e8d927d
DJ
13993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13994 (eval $ac_try) 2>&5
13995 ac_status=$?
13996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13997 (exit $ac_status); }; } &&
13998 { ac_try='test -s conftest.$ac_objext'
13999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14000 (eval $ac_try) 2>&5
14001 ac_status=$?
14002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14003 (exit $ac_status); }; }; then
14004 ac_cv_type_socklen_t=yes
14005else
14006 echo "$as_me: failed program was:" >&5
14007sed 's/^/| /' conftest.$ac_ext >&5
14008
b4e70030 14009ac_cv_type_socklen_t=no
4e8d927d 14010fi
4e8d927d
DJ
14011rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14012fi
b4e70030
JB
14013echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
14014echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
4e8d927d
DJ
14015if test $ac_cv_type_socklen_t = yes; then
14016
14017cat >>confdefs.h <<_ACEOF
14018#define HAVE_SOCKLEN_T 1
14019_ACEOF
14020
14021
14022fi
14023
b4e70030
JB
14024echo "$as_me:$LINENO: checking for uintptr_t" >&5
14025echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
4e8d927d
DJ
14026if test "${ac_cv_type_uintptr_t+set}" = set; then
14027 echo $ECHO_N "(cached) $ECHO_C" >&6
14028else
14029 cat >conftest.$ac_ext <<_ACEOF
14030/* confdefs.h. */
14031_ACEOF
14032cat confdefs.h >>conftest.$ac_ext
14033cat >>conftest.$ac_ext <<_ACEOF
14034/* end confdefs.h. */
14035#include <stdint.h>
14036
4e8d927d
DJ
14037int
14038main ()
14039{
b4e70030 14040if ((uintptr_t *) 0)
4e8d927d 14041 return 0;
b4e70030 14042if (sizeof (uintptr_t))
4e8d927d
DJ
14043 return 0;
14044 ;
14045 return 0;
14046}
14047_ACEOF
14048rm -f conftest.$ac_objext
14049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14050 (eval $ac_compile) 2>conftest.er1
14051 ac_status=$?
14052 grep -v '^ *+' conftest.er1 >conftest.err
14053 rm -f conftest.er1
14054 cat conftest.err >&5
14055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14056 (exit $ac_status); } &&
b4e70030
JB
14057 { ac_try='test -z "$ac_c_werror_flag"
14058 || test ! -s conftest.err'
4e8d927d
DJ
14059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14060 (eval $ac_try) 2>&5
14061 ac_status=$?
14062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14063 (exit $ac_status); }; } &&
14064 { ac_try='test -s conftest.$ac_objext'
14065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14066 (eval $ac_try) 2>&5
14067 ac_status=$?
14068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14069 (exit $ac_status); }; }; then
14070 ac_cv_type_uintptr_t=yes
14071else
14072 echo "$as_me: failed program was:" >&5
14073sed 's/^/| /' conftest.$ac_ext >&5
14074
b4e70030 14075ac_cv_type_uintptr_t=no
4e8d927d 14076fi
4e8d927d
DJ
14077rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14078fi
b4e70030
JB
14079echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
14080echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
4e8d927d
DJ
14081if test $ac_cv_type_uintptr_t = yes; then
14082
14083cat >>confdefs.h <<_ACEOF
14084#define HAVE_UINTPTR_T 1
14085_ACEOF
14086
14087
14088fi
14089
14090
14091# ------------------------------------- #
14092# Checks for compiler characteristics. #
14093# ------------------------------------- #
14094
b4e70030
JB
14095echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14096echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4e8d927d
DJ
14097if test "${ac_cv_c_const+set}" = set; then
14098 echo $ECHO_N "(cached) $ECHO_C" >&6
14099else
14100 cat >conftest.$ac_ext <<_ACEOF
14101/* confdefs.h. */
14102_ACEOF
14103cat confdefs.h >>conftest.$ac_ext
14104cat >>conftest.$ac_ext <<_ACEOF
14105/* end confdefs.h. */
14106
14107int
14108main ()
14109{
14110/* FIXME: Include the comments suggested by Paul. */
14111#ifndef __cplusplus
14112 /* Ultrix mips cc rejects this. */
14113 typedef int charset[2];
14114 const charset x;
14115 /* SunOS 4.1.1 cc rejects this. */
14116 char const *const *ccp;
14117 char **p;
14118 /* NEC SVR4.0.2 mips cc rejects this. */
14119 struct point {int x, y;};
14120 static struct point const zero = {0,0};
14121 /* AIX XL C 1.02.0.0 rejects this.
14122 It does not let you subtract one const X* pointer from another in
14123 an arm of an if-expression whose if-part is not a constant
14124 expression */
14125 const char *g = "string";
14126 ccp = &g + (g ? g-g : 0);
14127 /* HPUX 7.0 cc rejects these. */
14128 ++ccp;
14129 p = (char**) ccp;
14130 ccp = (char const *const *) p;
14131 { /* SCO 3.2v4 cc rejects this. */
14132 char *t;
14133 char const *s = 0 ? (char *) 0 : (char const *) 0;
14134
14135 *t++ = 0;
4e8d927d
DJ
14136 }
14137 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14138 int x[] = {25, 17};
14139 const int *foo = &x[0];
14140 ++foo;
14141 }
14142 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14143 typedef const int *iptr;
14144 iptr p = 0;
14145 ++p;
14146 }
14147 { /* AIX XL C 1.02.0.0 rejects this saying
14148 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14149 struct s { int j; const int *ap[3]; };
14150 struct s *b; b->j = 5;
14151 }
14152 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14153 const int foo = 10;
4e8d927d 14154 }
4e8d927d
DJ
14155#endif
14156
14157 ;
14158 return 0;
14159}
14160_ACEOF
14161rm -f conftest.$ac_objext
14162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14163 (eval $ac_compile) 2>conftest.er1
14164 ac_status=$?
14165 grep -v '^ *+' conftest.er1 >conftest.err
14166 rm -f conftest.er1
14167 cat conftest.err >&5
14168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14169 (exit $ac_status); } &&
b4e70030
JB
14170 { ac_try='test -z "$ac_c_werror_flag"
14171 || test ! -s conftest.err'
4e8d927d
DJ
14172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14173 (eval $ac_try) 2>&5
14174 ac_status=$?
14175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14176 (exit $ac_status); }; } &&
14177 { ac_try='test -s conftest.$ac_objext'
14178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14179 (eval $ac_try) 2>&5
14180 ac_status=$?
14181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14182 (exit $ac_status); }; }; then
14183 ac_cv_c_const=yes
14184else
14185 echo "$as_me: failed program was:" >&5
14186sed 's/^/| /' conftest.$ac_ext >&5
14187
b4e70030 14188ac_cv_c_const=no
4e8d927d 14189fi
4e8d927d
DJ
14190rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14191fi
b4e70030
JB
14192echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14193echo "${ECHO_T}$ac_cv_c_const" >&6
4e8d927d
DJ
14194if test $ac_cv_c_const = no; then
14195
14196cat >>confdefs.h <<\_ACEOF
14197#define const
14198_ACEOF
14199
14200fi
14201
b4e70030
JB
14202echo "$as_me:$LINENO: checking for inline" >&5
14203echo $ECHO_N "checking for inline... $ECHO_C" >&6
4e8d927d
DJ
14204if test "${ac_cv_c_inline+set}" = set; then
14205 echo $ECHO_N "(cached) $ECHO_C" >&6
14206else
14207 ac_cv_c_inline=no
14208for ac_kw in inline __inline__ __inline; do
14209 cat >conftest.$ac_ext <<_ACEOF
14210/* confdefs.h. */
14211_ACEOF
14212cat confdefs.h >>conftest.$ac_ext
14213cat >>conftest.$ac_ext <<_ACEOF
14214/* end confdefs.h. */
14215#ifndef __cplusplus
14216typedef int foo_t;
14217static $ac_kw foo_t static_foo () {return 0; }
14218$ac_kw foo_t foo () {return 0; }
14219#endif
14220
14221_ACEOF
14222rm -f conftest.$ac_objext
14223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14224 (eval $ac_compile) 2>conftest.er1
14225 ac_status=$?
14226 grep -v '^ *+' conftest.er1 >conftest.err
14227 rm -f conftest.er1
14228 cat conftest.err >&5
14229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14230 (exit $ac_status); } &&
b4e70030
JB
14231 { ac_try='test -z "$ac_c_werror_flag"
14232 || test ! -s conftest.err'
4e8d927d
DJ
14233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14234 (eval $ac_try) 2>&5
14235 ac_status=$?
14236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14237 (exit $ac_status); }; } &&
14238 { ac_try='test -s conftest.$ac_objext'
14239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14240 (eval $ac_try) 2>&5
14241 ac_status=$?
14242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14243 (exit $ac_status); }; }; then
b4e70030 14244 ac_cv_c_inline=$ac_kw; break
4e8d927d
DJ
14245else
14246 echo "$as_me: failed program was:" >&5
14247sed 's/^/| /' conftest.$ac_ext >&5
14248
4e8d927d 14249fi
4e8d927d 14250rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d
DJ
14251done
14252
14253fi
b4e70030
JB
14254echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
14255echo "${ECHO_T}$ac_cv_c_inline" >&6
bec39cab 14256
bec39cab 14257
a3828db0
MK
14258case $ac_cv_c_inline in
14259 inline | yes) ;;
14260 *)
14261 case $ac_cv_c_inline in
14262 no) ac_val=;;
14263 *) ac_val=$ac_cv_c_inline;;
14264 esac
14265 cat >>confdefs.h <<_ACEOF
14266#ifndef __cplusplus
14267#define inline $ac_val
14268#endif
14269_ACEOF
bec39cab
AC
14270 ;;
14271esac
bec39cab 14272
74c1b268 14273
a3828db0
MK
14274# ------------------------------ #
14275# Checks for library functions. #
14276# ------------------------------ #
bec39cab 14277
a3828db0
MK
14278# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14279# for constant arguments. Useless!
b4e70030
JB
14280echo "$as_me:$LINENO: checking for working alloca.h" >&5
14281echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
a3828db0 14282if test "${ac_cv_working_alloca_h+set}" = set; then
bec39cab
AC
14283 echo $ECHO_N "(cached) $ECHO_C" >&6
14284else
14285 cat >conftest.$ac_ext <<_ACEOF
14286/* confdefs.h. */
14287_ACEOF
14288cat confdefs.h >>conftest.$ac_ext
14289cat >>conftest.$ac_ext <<_ACEOF
14290/* end confdefs.h. */
a3828db0 14291#include <alloca.h>
bec39cab
AC
14292int
14293main ()
14294{
a3828db0 14295char *p = (char *) alloca (2 * sizeof (int));
bec39cab
AC
14296 ;
14297 return 0;
14298}
14299_ACEOF
14300rm -f conftest.$ac_objext conftest$ac_exeext
14301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14302 (eval $ac_link) 2>conftest.er1
14303 ac_status=$?
14304 grep -v '^ *+' conftest.er1 >conftest.err
14305 rm -f conftest.er1
14306 cat conftest.err >&5
14307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14308 (exit $ac_status); } &&
b4e70030
JB
14309 { ac_try='test -z "$ac_c_werror_flag"
14310 || test ! -s conftest.err'
bec39cab
AC
14311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14312 (eval $ac_try) 2>&5
14313 ac_status=$?
14314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14315 (exit $ac_status); }; } &&
14316 { ac_try='test -s conftest$ac_exeext'
14317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14318 (eval $ac_try) 2>&5
14319 ac_status=$?
14320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14321 (exit $ac_status); }; }; then
a3828db0 14322 ac_cv_working_alloca_h=yes
bec39cab
AC
14323else
14324 echo "$as_me: failed program was:" >&5
14325sed 's/^/| /' conftest.$ac_ext >&5
14326
b4e70030 14327ac_cv_working_alloca_h=no
bec39cab
AC
14328fi
14329rm -f conftest.err conftest.$ac_objext \
14330 conftest$ac_exeext conftest.$ac_ext
14331fi
b4e70030
JB
14332echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14333echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
a3828db0
MK
14334if test $ac_cv_working_alloca_h = yes; then
14335
14336cat >>confdefs.h <<\_ACEOF
14337#define HAVE_ALLOCA_H 1
bec39cab 14338_ACEOF
74c1b268 14339
74c1b268
AC
14340fi
14341
b4e70030
JB
14342echo "$as_me:$LINENO: checking for alloca" >&5
14343echo $ECHO_N "checking for alloca... $ECHO_C" >&6
a3828db0 14344if test "${ac_cv_func_alloca_works+set}" = set; then
bec39cab 14345 echo $ECHO_N "(cached) $ECHO_C" >&6
74c1b268 14346else
bec39cab
AC
14347 cat >conftest.$ac_ext <<_ACEOF
14348/* confdefs.h. */
14349_ACEOF
14350cat confdefs.h >>conftest.$ac_ext
14351cat >>conftest.$ac_ext <<_ACEOF
14352/* end confdefs.h. */
a3828db0
MK
14353#ifdef __GNUC__
14354# define alloca __builtin_alloca
14355#else
14356# ifdef _MSC_VER
14357# include <malloc.h>
14358# define alloca _alloca
14359# else
14360# if HAVE_ALLOCA_H
14361# include <alloca.h>
14362# else
14363# ifdef _AIX
14364 #pragma alloca
14365# else
14366# ifndef alloca /* predefined by HP cc +Olibcalls */
14367char *alloca ();
14368# endif
14369# endif
14370# endif
97bf5e38 14371# endif
a3828db0 14372#endif
97bf5e38 14373
bec39cab
AC
14374int
14375main ()
14376{
a3828db0 14377char *p = (char *) alloca (1);
bec39cab
AC
14378 ;
14379 return 0;
14380}
14381_ACEOF
a3828db0
MK
14382rm -f conftest.$ac_objext conftest$ac_exeext
14383if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14384 (eval $ac_link) 2>conftest.er1
bec39cab
AC
14385 ac_status=$?
14386 grep -v '^ *+' conftest.er1 >conftest.err
14387 rm -f conftest.er1
14388 cat conftest.err >&5
14389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14390 (exit $ac_status); } &&
b4e70030
JB
14391 { ac_try='test -z "$ac_c_werror_flag"
14392 || test ! -s conftest.err'
bec39cab
AC
14393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14394 (eval $ac_try) 2>&5
14395 ac_status=$?
14396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14397 (exit $ac_status); }; } &&
a3828db0 14398 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
14399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14400 (eval $ac_try) 2>&5
14401 ac_status=$?
14402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14403 (exit $ac_status); }; }; then
a3828db0 14404 ac_cv_func_alloca_works=yes
0200359f 14405else
bec39cab
AC
14406 echo "$as_me: failed program was:" >&5
14407sed 's/^/| /' conftest.$ac_ext >&5
0200359f 14408
b4e70030 14409ac_cv_func_alloca_works=no
0200359f 14410fi
a3828db0
MK
14411rm -f conftest.err conftest.$ac_objext \
14412 conftest$ac_exeext conftest.$ac_ext
72473524 14413fi
b4e70030
JB
14414echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14415echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
bec39cab 14416
a3828db0
MK
14417if test $ac_cv_func_alloca_works = yes; then
14418
14419cat >>confdefs.h <<\_ACEOF
14420#define HAVE_ALLOCA 1
bec39cab
AC
14421_ACEOF
14422
a3828db0
MK
14423else
14424 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14425# that cause trouble. Some versions do not even contain alloca or
14426# contain a buggy version. If you still want to use their alloca,
14427# use ar to extract alloca.o from them instead of compiling alloca.c.
72473524 14428
b4e70030 14429ALLOCA=alloca.$ac_objext
bec39cab 14430
a3828db0
MK
14431cat >>confdefs.h <<\_ACEOF
14432#define C_ALLOCA 1
14433_ACEOF
bec39cab 14434
a3828db0 14435
b4e70030
JB
14436echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14437echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
a3828db0 14438if test "${ac_cv_os_cray+set}" = set; then
bec39cab 14439 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 14440else
a3828db0 14441 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14442/* confdefs.h. */
14443_ACEOF
14444cat confdefs.h >>conftest.$ac_ext
14445cat >>conftest.$ac_ext <<_ACEOF
14446/* end confdefs.h. */
b4e70030 14447#if defined(CRAY) && ! defined(CRAY2)
a3828db0
MK
14448webecray
14449#else
14450wenotbecray
14451#endif
14452
14453_ACEOF
14454if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14455 $EGREP "webecray" >/dev/null 2>&1; then
14456 ac_cv_os_cray=yes
14457else
14458 ac_cv_os_cray=no
14459fi
14460rm -f conftest*
14461
14462fi
b4e70030
JB
14463echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14464echo "${ECHO_T}$ac_cv_os_cray" >&6
a3828db0
MK
14465if test $ac_cv_os_cray = yes; then
14466 for ac_func in _getb67 GETB67 getb67; do
14467 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14468echo "$as_me:$LINENO: checking for $ac_func" >&5
14469echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14470if eval "test \"\${$as_ac_var+set}\" = set"; then
a3828db0
MK
14471 echo $ECHO_N "(cached) $ECHO_C" >&6
14472else
14473 cat >conftest.$ac_ext <<_ACEOF
14474/* confdefs.h. */
14475_ACEOF
14476cat confdefs.h >>conftest.$ac_ext
14477cat >>conftest.$ac_ext <<_ACEOF
14478/* end confdefs.h. */
14479/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14480 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14481#define $ac_func innocuous_$ac_func
14482
14483/* System header to define __stub macros and hopefully few prototypes,
14484 which can conflict with char $ac_func (); below.
14485 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14486 <limits.h> exists even on freestanding compilers. */
14487
14488#ifdef __STDC__
14489# include <limits.h>
14490#else
14491# include <assert.h>
14492#endif
14493
14494#undef $ac_func
14495
b4e70030 14496/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
14497#ifdef __cplusplus
14498extern "C"
b4e70030 14499{
a3828db0 14500#endif
b4e70030
JB
14501/* We use char because int might match the return type of a gcc2
14502 builtin and then its argument prototype would still apply. */
a3828db0
MK
14503char $ac_func ();
14504/* The GNU C library defines this for functions which it implements
14505 to always fail with ENOSYS. Some functions are actually named
14506 something starting with __ and the normal name is an alias. */
b4e70030 14507#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 14508choke me
b4e70030
JB
14509#else
14510char (*f) () = $ac_func;
14511#endif
14512#ifdef __cplusplus
14513}
a3828db0
MK
14514#endif
14515
14516int
14517main ()
14518{
b4e70030 14519return f != $ac_func;
a3828db0
MK
14520 ;
14521 return 0;
14522}
14523_ACEOF
14524rm -f conftest.$ac_objext conftest$ac_exeext
14525if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14526 (eval $ac_link) 2>conftest.er1
14527 ac_status=$?
14528 grep -v '^ *+' conftest.er1 >conftest.err
14529 rm -f conftest.er1
14530 cat conftest.err >&5
14531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14532 (exit $ac_status); } &&
b4e70030
JB
14533 { ac_try='test -z "$ac_c_werror_flag"
14534 || test ! -s conftest.err'
a3828db0
MK
14535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14536 (eval $ac_try) 2>&5
14537 ac_status=$?
14538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14539 (exit $ac_status); }; } &&
14540 { ac_try='test -s conftest$ac_exeext'
14541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14542 (eval $ac_try) 2>&5
14543 ac_status=$?
14544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14545 (exit $ac_status); }; }; then
14546 eval "$as_ac_var=yes"
14547else
14548 echo "$as_me: failed program was:" >&5
14549sed 's/^/| /' conftest.$ac_ext >&5
14550
b4e70030 14551eval "$as_ac_var=no"
a3828db0
MK
14552fi
14553rm -f conftest.err conftest.$ac_objext \
14554 conftest$ac_exeext conftest.$ac_ext
14555fi
b4e70030
JB
14556echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14557echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
14558if test `eval echo '${'$as_ac_var'}'` = yes; then
14559
14560cat >>confdefs.h <<_ACEOF
14561#define CRAY_STACKSEG_END $ac_func
14562_ACEOF
14563
14564 break
14565fi
14566
14567 done
14568fi
14569
b4e70030
JB
14570echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14571echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
a3828db0
MK
14572if test "${ac_cv_c_stack_direction+set}" = set; then
14573 echo $ECHO_N "(cached) $ECHO_C" >&6
14574else
14575 if test "$cross_compiling" = yes; then
14576 ac_cv_c_stack_direction=0
14577else
14578 cat >conftest.$ac_ext <<_ACEOF
14579/* confdefs.h. */
14580_ACEOF
14581cat confdefs.h >>conftest.$ac_ext
14582cat >>conftest.$ac_ext <<_ACEOF
14583/* end confdefs.h. */
14584int
14585find_stack_direction ()
14586{
14587 static char *addr = 0;
14588 auto char dummy;
14589 if (addr == 0)
14590 {
14591 addr = &dummy;
14592 return find_stack_direction ();
14593 }
14594 else
14595 return (&dummy > addr) ? 1 : -1;
14596}
14597
14598int
14599main ()
14600{
b4e70030 14601 exit (find_stack_direction () < 0);
a3828db0
MK
14602}
14603_ACEOF
14604rm -f conftest$ac_exeext
14605if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14606 (eval $ac_link) 2>&5
14607 ac_status=$?
14608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14609 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14611 (eval $ac_try) 2>&5
14612 ac_status=$?
14613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14614 (exit $ac_status); }; }; then
14615 ac_cv_c_stack_direction=1
14616else
14617 echo "$as_me: program exited with status $ac_status" >&5
14618echo "$as_me: failed program was:" >&5
14619sed 's/^/| /' conftest.$ac_ext >&5
14620
14621( exit $ac_status )
14622ac_cv_c_stack_direction=-1
14623fi
b4e70030 14624rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
14625fi
14626fi
b4e70030
JB
14627echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14628echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
a3828db0
MK
14629
14630cat >>confdefs.h <<_ACEOF
14631#define STACK_DIRECTION $ac_cv_c_stack_direction
14632_ACEOF
14633
14634
14635fi
14636
14637
14638
14639for ac_header in stdlib.h unistd.h
14640do
14641as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
14642if eval "test \"\${$as_ac_Header+set}\" = set"; then
14643 echo "$as_me:$LINENO: checking for $ac_header" >&5
14644echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14645if eval "test \"\${$as_ac_Header+set}\" = set"; then
a3828db0
MK
14646 echo $ECHO_N "(cached) $ECHO_C" >&6
14647fi
b4e70030
JB
14648echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14649echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
a3828db0
MK
14650else
14651 # Is the header compilable?
b4e70030
JB
14652echo "$as_me:$LINENO: checking $ac_header usability" >&5
14653echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
a3828db0
MK
14654cat >conftest.$ac_ext <<_ACEOF
14655/* confdefs.h. */
14656_ACEOF
14657cat confdefs.h >>conftest.$ac_ext
14658cat >>conftest.$ac_ext <<_ACEOF
14659/* end confdefs.h. */
14660$ac_includes_default
14661#include <$ac_header>
14662_ACEOF
14663rm -f conftest.$ac_objext
14664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14665 (eval $ac_compile) 2>conftest.er1
14666 ac_status=$?
bec39cab
AC
14667 grep -v '^ *+' conftest.er1 >conftest.err
14668 rm -f conftest.er1
14669 cat conftest.err >&5
14670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14671 (exit $ac_status); } &&
b4e70030
JB
14672 { ac_try='test -z "$ac_c_werror_flag"
14673 || test ! -s conftest.err'
bec39cab
AC
14674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14675 (eval $ac_try) 2>&5
14676 ac_status=$?
14677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14678 (exit $ac_status); }; } &&
14679 { ac_try='test -s conftest.$ac_objext'
14680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14681 (eval $ac_try) 2>&5
14682 ac_status=$?
14683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14684 (exit $ac_status); }; }; then
14685 ac_header_compiler=yes
14686else
14687 echo "$as_me: failed program was:" >&5
14688sed 's/^/| /' conftest.$ac_ext >&5
14689
b4e70030 14690ac_header_compiler=no
bec39cab
AC
14691fi
14692rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
14693echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14694echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
14695
14696# Is the header present?
b4e70030
JB
14697echo "$as_me:$LINENO: checking $ac_header presence" >&5
14698echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
14699cat >conftest.$ac_ext <<_ACEOF
14700/* confdefs.h. */
14701_ACEOF
14702cat confdefs.h >>conftest.$ac_ext
14703cat >>conftest.$ac_ext <<_ACEOF
14704/* end confdefs.h. */
14705#include <$ac_header>
14706_ACEOF
14707if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14708 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14709 ac_status=$?
14710 grep -v '^ *+' conftest.er1 >conftest.err
14711 rm -f conftest.er1
14712 cat conftest.err >&5
14713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14714 (exit $ac_status); } >/dev/null; then
14715 if test -s conftest.err; then
14716 ac_cpp_err=$ac_c_preproc_warn_flag
14717 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14718 else
14719 ac_cpp_err=
14720 fi
14721else
14722 ac_cpp_err=yes
14723fi
14724if test -z "$ac_cpp_err"; then
14725 ac_header_preproc=yes
97bf5e38 14726else
bec39cab
AC
14727 echo "$as_me: failed program was:" >&5
14728sed 's/^/| /' conftest.$ac_ext >&5
14729
14730 ac_header_preproc=no
72473524 14731fi
bec39cab 14732rm -f conftest.err conftest.$ac_ext
b4e70030
JB
14733echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14734echo "${ECHO_T}$ac_header_preproc" >&6
c906108c 14735
bec39cab
AC
14736# So? What about this header?
14737case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14738 yes:no: )
14739 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14740echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14741 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14742echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14743 ac_header_preproc=yes
14744 ;;
14745 no:yes:* )
14746 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14747echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14748 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14749echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14750 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14751echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14752 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14753echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
14754 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14755echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14756 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14757echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
14758 (
14759 cat <<\_ASBOX
14760## ------------------------------------------ ##
14761## Report this to the AC_PACKAGE_NAME lists. ##
14762## ------------------------------------------ ##
14763_ASBOX
14764 ) |
14765 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
14766 ;;
14767esac
b4e70030
JB
14768echo "$as_me:$LINENO: checking for $ac_header" >&5
14769echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14770if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 14771 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 14772else
bec39cab
AC
14773 eval "$as_ac_Header=\$ac_header_preproc"
14774fi
b4e70030
JB
14775echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14776echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
14777
14778fi
14779if test `eval echo '${'$as_ac_Header'}'` = yes; then
14780 cat >>confdefs.h <<_ACEOF
14781#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14782_ACEOF
14783
14784fi
14785
14786done
14787
14788
a3828db0 14789for ac_func in getpagesize
bec39cab
AC
14790do
14791as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14792echo "$as_me:$LINENO: checking for $ac_func" >&5
14793echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14794if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
14795 echo $ECHO_N "(cached) $ECHO_C" >&6
14796else
14797 cat >conftest.$ac_ext <<_ACEOF
14798/* confdefs.h. */
14799_ACEOF
14800cat confdefs.h >>conftest.$ac_ext
14801cat >>conftest.$ac_ext <<_ACEOF
14802/* end confdefs.h. */
14803/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14804 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14805#define $ac_func innocuous_$ac_func
14806
97bf5e38 14807/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
14808 which can conflict with char $ac_func (); below.
14809 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14810 <limits.h> exists even on freestanding compilers. */
2b2d558c 14811
bec39cab
AC
14812#ifdef __STDC__
14813# include <limits.h>
14814#else
14815# include <assert.h>
14816#endif
97bf5e38 14817
bec39cab
AC
14818#undef $ac_func
14819
b4e70030 14820/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
14821#ifdef __cplusplus
14822extern "C"
b4e70030 14823{
bec39cab 14824#endif
b4e70030
JB
14825/* We use char because int might match the return type of a gcc2
14826 builtin and then its argument prototype would still apply. */
bec39cab 14827char $ac_func ();
97bf5e38
MK
14828/* The GNU C library defines this for functions which it implements
14829 to always fail with ENOSYS. Some functions are actually named
14830 something starting with __ and the normal name is an alias. */
b4e70030 14831#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
97bf5e38 14832choke me
b4e70030
JB
14833#else
14834char (*f) () = $ac_func;
14835#endif
14836#ifdef __cplusplus
14837}
97bf5e38
MK
14838#endif
14839
bec39cab
AC
14840int
14841main ()
14842{
b4e70030 14843return f != $ac_func;
bec39cab
AC
14844 ;
14845 return 0;
14846}
14847_ACEOF
14848rm -f conftest.$ac_objext conftest$ac_exeext
14849if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14850 (eval $ac_link) 2>conftest.er1
14851 ac_status=$?
14852 grep -v '^ *+' conftest.er1 >conftest.err
14853 rm -f conftest.er1
14854 cat conftest.err >&5
14855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14856 (exit $ac_status); } &&
b4e70030
JB
14857 { ac_try='test -z "$ac_c_werror_flag"
14858 || test ! -s conftest.err'
bec39cab
AC
14859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14860 (eval $ac_try) 2>&5
14861 ac_status=$?
14862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14863 (exit $ac_status); }; } &&
14864 { ac_try='test -s conftest$ac_exeext'
14865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14866 (eval $ac_try) 2>&5
14867 ac_status=$?
14868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14869 (exit $ac_status); }; }; then
14870 eval "$as_ac_var=yes"
14871else
14872 echo "$as_me: failed program was:" >&5
14873sed 's/^/| /' conftest.$ac_ext >&5
14874
b4e70030 14875eval "$as_ac_var=no"
bec39cab
AC
14876fi
14877rm -f conftest.err conftest.$ac_objext \
14878 conftest$ac_exeext conftest.$ac_ext
14879fi
b4e70030
JB
14880echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14881echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
14882if test `eval echo '${'$as_ac_var'}'` = yes; then
14883 cat >>confdefs.h <<_ACEOF
14884#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14885_ACEOF
14886
2b2d558c 14887fi
bec39cab 14888done
2b2d558c 14889
b4e70030
JB
14890echo "$as_me:$LINENO: checking for working mmap" >&5
14891echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
a3828db0 14892if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
bec39cab 14893 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 14894else
bec39cab 14895 if test "$cross_compiling" = yes; then
a3828db0 14896 ac_cv_func_mmap_fixed_mapped=no
bec39cab
AC
14897else
14898 cat >conftest.$ac_ext <<_ACEOF
a3828db0 14899/* confdefs.h. */
bec39cab
AC
14900_ACEOF
14901cat confdefs.h >>conftest.$ac_ext
14902cat >>conftest.$ac_ext <<_ACEOF
14903/* end confdefs.h. */
a3828db0
MK
14904$ac_includes_default
14905/* malloc might have been renamed as rpl_malloc. */
14906#undef malloc
bec39cab 14907
a3828db0
MK
14908/* Thanks to Mike Haertel and Jim Avera for this test.
14909 Here is a matrix of mmap possibilities:
14910 mmap private not fixed
14911 mmap private fixed at somewhere currently unmapped
14912 mmap private fixed at somewhere already mapped
14913 mmap shared not fixed
14914 mmap shared fixed at somewhere currently unmapped
14915 mmap shared fixed at somewhere already mapped
14916 For private mappings, we should verify that changes cannot be read()
14917 back from the file, nor mmap's back from the file at a different
14918 address. (There have been systems where private was not correctly
14919 implemented like the infamous i386 svr4.0, and systems where the
14920 VM page cache was not coherent with the file system buffer cache
14921 like early versions of FreeBSD and possibly contemporary NetBSD.)
14922 For shared mappings, we should conversely verify that changes get
14923 propagated back to all the places they're supposed to be.
7dfa765c 14924
a3828db0
MK
14925 Grep wants private fixed already mapped.
14926 The main things grep needs to know about mmap are:
14927 * does it exist and is it safe to write into the mmap'd area
14928 * how to use it (BSD variants) */
7dfa765c 14929
a3828db0
MK
14930#include <fcntl.h>
14931#include <sys/mman.h>
7dfa765c 14932
a3828db0
MK
14933#if !STDC_HEADERS && !HAVE_STDLIB_H
14934char *malloc ();
14935#endif
7dfa765c 14936
a3828db0
MK
14937/* This mess was copied from the GNU getpagesize.h. */
14938#if !HAVE_GETPAGESIZE
14939/* Assume that all systems that can run configure have sys/param.h. */
14940# if !HAVE_SYS_PARAM_H
14941# define HAVE_SYS_PARAM_H 1
14942# endif
64bb1671 14943
a3828db0
MK
14944# ifdef _SC_PAGESIZE
14945# define getpagesize() sysconf(_SC_PAGESIZE)
14946# else /* no _SC_PAGESIZE */
14947# if HAVE_SYS_PARAM_H
14948# include <sys/param.h>
14949# ifdef EXEC_PAGESIZE
14950# define getpagesize() EXEC_PAGESIZE
14951# else /* no EXEC_PAGESIZE */
14952# ifdef NBPG
14953# define getpagesize() NBPG * CLSIZE
14954# ifndef CLSIZE
14955# define CLSIZE 1
14956# endif /* no CLSIZE */
14957# else /* no NBPG */
14958# ifdef NBPC
14959# define getpagesize() NBPC
14960# else /* no NBPC */
14961# ifdef PAGESIZE
14962# define getpagesize() PAGESIZE
14963# endif /* PAGESIZE */
14964# endif /* no NBPC */
14965# endif /* no NBPG */
14966# endif /* no EXEC_PAGESIZE */
14967# else /* no HAVE_SYS_PARAM_H */
14968# define getpagesize() 8192 /* punt totally */
14969# endif /* no HAVE_SYS_PARAM_H */
14970# endif /* no _SC_PAGESIZE */
64bb1671 14971
a3828db0 14972#endif /* no HAVE_GETPAGESIZE */
64bb1671 14973
a3828db0
MK
14974int
14975main ()
14976{
14977 char *data, *data2, *data3;
14978 int i, pagesize;
14979 int fd;
97bf5e38 14980
a3828db0
MK
14981 pagesize = getpagesize ();
14982
14983 /* First, make a file with some known garbage in it. */
14984 data = (char *) malloc (pagesize);
14985 if (!data)
b4e70030 14986 exit (1);
a3828db0
MK
14987 for (i = 0; i < pagesize; ++i)
14988 *(data + i) = rand ();
14989 umask (0);
14990 fd = creat ("conftest.mmap", 0600);
14991 if (fd < 0)
b4e70030 14992 exit (1);
a3828db0 14993 if (write (fd, data, pagesize) != pagesize)
b4e70030 14994 exit (1);
a3828db0
MK
14995 close (fd);
14996
14997 /* Next, try to mmap the file at a fixed address which already has
14998 something else allocated at it. If we can, also make sure that
14999 we see the same garbage. */
15000 fd = open ("conftest.mmap", O_RDWR);
15001 if (fd < 0)
b4e70030 15002 exit (1);
a3828db0
MK
15003 data2 = (char *) malloc (2 * pagesize);
15004 if (!data2)
b4e70030
JB
15005 exit (1);
15006 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
a3828db0
MK
15007 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
15008 MAP_PRIVATE | MAP_FIXED, fd, 0L))
b4e70030 15009 exit (1);
a3828db0
MK
15010 for (i = 0; i < pagesize; ++i)
15011 if (*(data + i) != *(data2 + i))
b4e70030 15012 exit (1);
a3828db0
MK
15013
15014 /* Finally, make sure that changes to the mapped area do not
15015 percolate back to the file as seen by read(). (This is a bug on
15016 some variants of i386 svr4.0.) */
15017 for (i = 0; i < pagesize; ++i)
15018 *(data2 + i) = *(data2 + i) + 1;
15019 data3 = (char *) malloc (pagesize);
15020 if (!data3)
b4e70030 15021 exit (1);
a3828db0 15022 if (read (fd, data3, pagesize) != pagesize)
b4e70030 15023 exit (1);
a3828db0
MK
15024 for (i = 0; i < pagesize; ++i)
15025 if (*(data + i) != *(data3 + i))
b4e70030 15026 exit (1);
a3828db0 15027 close (fd);
b4e70030 15028 exit (0);
97bf5e38 15029}
bec39cab
AC
15030_ACEOF
15031rm -f conftest$ac_exeext
15032if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15033 (eval $ac_link) 2>&5
15034 ac_status=$?
15035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15036 (exit $ac_status); } && { ac_try='./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
a3828db0 15042 ac_cv_func_mmap_fixed_mapped=yes
5c44784c 15043else
bec39cab
AC
15044 echo "$as_me: program exited with status $ac_status" >&5
15045echo "$as_me: failed program was:" >&5
15046sed 's/^/| /' conftest.$ac_ext >&5
15047
15048( exit $ac_status )
a3828db0 15049ac_cv_func_mmap_fixed_mapped=no
0afdd437 15050fi
b4e70030 15051rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bec39cab 15052fi
a3828db0 15053fi
b4e70030
JB
15054echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
15055echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
a3828db0 15056if test $ac_cv_func_mmap_fixed_mapped = yes; then
bec39cab
AC
15057
15058cat >>confdefs.h <<\_ACEOF
a3828db0 15059#define HAVE_MMAP 1
bec39cab 15060_ACEOF
0afdd437
MK
15061
15062fi
a3828db0 15063rm -f conftest.mmap
0afdd437 15064
b4e70030
JB
15065echo "$as_me:$LINENO: checking for pid_t" >&5
15066echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
a3828db0 15067if test "${ac_cv_type_pid_t+set}" = set; then
bec39cab
AC
15068 echo $ECHO_N "(cached) $ECHO_C" >&6
15069else
15070 cat >conftest.$ac_ext <<_ACEOF
15071/* confdefs.h. */
15072_ACEOF
15073cat confdefs.h >>conftest.$ac_ext
15074cat >>conftest.$ac_ext <<_ACEOF
15075/* end confdefs.h. */
a3828db0 15076$ac_includes_default
bec39cab
AC
15077int
15078main ()
15079{
b4e70030 15080if ((pid_t *) 0)
a3828db0 15081 return 0;
b4e70030 15082if (sizeof (pid_t))
a3828db0 15083 return 0;
bec39cab
AC
15084 ;
15085 return 0;
15086}
15087_ACEOF
a3828db0
MK
15088rm -f conftest.$ac_objext
15089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15090 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
15091 ac_status=$?
15092 grep -v '^ *+' conftest.er1 >conftest.err
15093 rm -f conftest.er1
15094 cat conftest.err >&5
15095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15096 (exit $ac_status); } &&
b4e70030
JB
15097 { ac_try='test -z "$ac_c_werror_flag"
15098 || test ! -s conftest.err'
bec39cab
AC
15099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15100 (eval $ac_try) 2>&5
15101 ac_status=$?
15102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15103 (exit $ac_status); }; } &&
a3828db0 15104 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
15105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15106 (eval $ac_try) 2>&5
15107 ac_status=$?
15108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15109 (exit $ac_status); }; }; then
a3828db0 15110 ac_cv_type_pid_t=yes
bec39cab
AC
15111else
15112 echo "$as_me: failed program was:" >&5
15113sed 's/^/| /' conftest.$ac_ext >&5
15114
b4e70030 15115ac_cv_type_pid_t=no
bec39cab 15116fi
a3828db0 15117rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 15118fi
b4e70030
JB
15119echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
15120echo "${ECHO_T}$ac_cv_type_pid_t" >&6
a3828db0
MK
15121if test $ac_cv_type_pid_t = yes; then
15122 :
15123else
15124
15125cat >>confdefs.h <<_ACEOF
15126#define pid_t int
bec39cab 15127_ACEOF
7e89e357 15128
7e89e357
JT
15129fi
15130
bec39cab 15131
b4e70030
JB
15132
15133for ac_header in unistd.h vfork.h
7be570e7 15134do
a3828db0 15135as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
15136if eval "test \"\${$as_ac_Header+set}\" = set"; then
15137 echo "$as_me:$LINENO: checking for $ac_header" >&5
15138echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15139if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 15140 echo $ECHO_N "(cached) $ECHO_C" >&6
a3828db0 15141fi
b4e70030
JB
15142echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15143echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 15144else
a3828db0 15145 # Is the header compilable?
b4e70030
JB
15146echo "$as_me:$LINENO: checking $ac_header usability" >&5
15147echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
a3828db0 15148cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15149/* confdefs.h. */
15150_ACEOF
15151cat confdefs.h >>conftest.$ac_ext
15152cat >>conftest.$ac_ext <<_ACEOF
15153/* end confdefs.h. */
a3828db0
MK
15154$ac_includes_default
15155#include <$ac_header>
bec39cab 15156_ACEOF
a3828db0
MK
15157rm -f conftest.$ac_objext
15158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15159 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
15160 ac_status=$?
15161 grep -v '^ *+' conftest.er1 >conftest.err
15162 rm -f conftest.er1
15163 cat conftest.err >&5
15164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15165 (exit $ac_status); } &&
b4e70030
JB
15166 { ac_try='test -z "$ac_c_werror_flag"
15167 || test ! -s conftest.err'
bec39cab
AC
15168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15169 (eval $ac_try) 2>&5
15170 ac_status=$?
15171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15172 (exit $ac_status); }; } &&
a3828db0 15173 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
15174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15175 (eval $ac_try) 2>&5
15176 ac_status=$?
15177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15178 (exit $ac_status); }; }; then
a3828db0 15179 ac_header_compiler=yes
bec39cab
AC
15180else
15181 echo "$as_me: failed program was:" >&5
15182sed 's/^/| /' conftest.$ac_ext >&5
15183
b4e70030 15184ac_header_compiler=no
bec39cab 15185fi
a3828db0 15186rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
15187echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15188echo "${ECHO_T}$ac_header_compiler" >&6
a3828db0
MK
15189
15190# Is the header present?
b4e70030
JB
15191echo "$as_me:$LINENO: checking $ac_header presence" >&5
15192echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
a3828db0
MK
15193cat >conftest.$ac_ext <<_ACEOF
15194/* confdefs.h. */
15195_ACEOF
15196cat confdefs.h >>conftest.$ac_ext
15197cat >>conftest.$ac_ext <<_ACEOF
15198/* end confdefs.h. */
15199#include <$ac_header>
15200_ACEOF
15201if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15202 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15203 ac_status=$?
15204 grep -v '^ *+' conftest.er1 >conftest.err
15205 rm -f conftest.er1
15206 cat conftest.err >&5
15207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15208 (exit $ac_status); } >/dev/null; then
15209 if test -s conftest.err; then
15210 ac_cpp_err=$ac_c_preproc_warn_flag
15211 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15212 else
15213 ac_cpp_err=
15214 fi
15215else
15216 ac_cpp_err=yes
15217fi
15218if test -z "$ac_cpp_err"; then
15219 ac_header_preproc=yes
15220else
15221 echo "$as_me: failed program was:" >&5
15222sed 's/^/| /' conftest.$ac_ext >&5
15223
15224 ac_header_preproc=no
15225fi
15226rm -f conftest.err conftest.$ac_ext
b4e70030
JB
15227echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15228echo "${ECHO_T}$ac_header_preproc" >&6
a3828db0
MK
15229
15230# So? What about this header?
15231case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15232 yes:no: )
15233 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15234echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15235 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15236echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15237 ac_header_preproc=yes
15238 ;;
15239 no:yes:* )
15240 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15241echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15242 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15243echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15244 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15245echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15246 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15247echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
15248 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15249echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15250 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15251echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
15252 (
15253 cat <<\_ASBOX
15254## ------------------------------------------ ##
15255## Report this to the AC_PACKAGE_NAME lists. ##
15256## ------------------------------------------ ##
15257_ASBOX
15258 ) |
15259 sed "s/^/$as_me: WARNING: /" >&2
a3828db0
MK
15260 ;;
15261esac
b4e70030
JB
15262echo "$as_me:$LINENO: checking for $ac_header" >&5
15263echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15264if eval "test \"\${$as_ac_Header+set}\" = set"; then
a3828db0
MK
15265 echo $ECHO_N "(cached) $ECHO_C" >&6
15266else
15267 eval "$as_ac_Header=\$ac_header_preproc"
15268fi
b4e70030
JB
15269echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15270echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
a3828db0 15271
bec39cab 15272fi
a3828db0 15273if test `eval echo '${'$as_ac_Header'}'` = yes; then
bec39cab 15274 cat >>confdefs.h <<_ACEOF
a3828db0 15275#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 15276_ACEOF
14abd0fb 15277
14abd0fb 15278fi
a3828db0 15279
14abd0fb
MK
15280done
15281
bec39cab 15282
a3828db0
MK
15283
15284for ac_func in fork vfork
14abd0fb 15285do
bec39cab 15286as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15287echo "$as_me:$LINENO: checking for $ac_func" >&5
15288echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15289if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
15290 echo $ECHO_N "(cached) $ECHO_C" >&6
15291else
15292 cat >conftest.$ac_ext <<_ACEOF
15293/* confdefs.h. */
15294_ACEOF
15295cat confdefs.h >>conftest.$ac_ext
15296cat >>conftest.$ac_ext <<_ACEOF
15297/* end confdefs.h. */
15298/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15299 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15300#define $ac_func innocuous_$ac_func
15301
14abd0fb 15302/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
15303 which can conflict with char $ac_func (); below.
15304 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15305 <limits.h> exists even on freestanding compilers. */
15306
15307#ifdef __STDC__
15308# include <limits.h>
15309#else
15310# include <assert.h>
15311#endif
14abd0fb 15312
bec39cab 15313#undef $ac_func
14abd0fb 15314
b4e70030 15315/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
15316#ifdef __cplusplus
15317extern "C"
b4e70030 15318{
bec39cab 15319#endif
b4e70030
JB
15320/* We use char because int might match the return type of a gcc2
15321 builtin and then its argument prototype would still apply. */
bec39cab 15322char $ac_func ();
14abd0fb
MK
15323/* The GNU C library defines this for functions which it implements
15324 to always fail with ENOSYS. Some functions are actually named
15325 something starting with __ and the normal name is an alias. */
b4e70030 15326#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14abd0fb 15327choke me
b4e70030
JB
15328#else
15329char (*f) () = $ac_func;
15330#endif
15331#ifdef __cplusplus
15332}
14abd0fb
MK
15333#endif
15334
bec39cab
AC
15335int
15336main ()
15337{
b4e70030 15338return f != $ac_func;
bec39cab
AC
15339 ;
15340 return 0;
15341}
15342_ACEOF
15343rm -f conftest.$ac_objext conftest$ac_exeext
15344if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15345 (eval $ac_link) 2>conftest.er1
15346 ac_status=$?
15347 grep -v '^ *+' conftest.er1 >conftest.err
15348 rm -f conftest.er1
15349 cat conftest.err >&5
15350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15351 (exit $ac_status); } &&
b4e70030
JB
15352 { ac_try='test -z "$ac_c_werror_flag"
15353 || test ! -s conftest.err'
bec39cab
AC
15354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15355 (eval $ac_try) 2>&5
15356 ac_status=$?
15357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15358 (exit $ac_status); }; } &&
15359 { ac_try='test -s conftest$ac_exeext'
15360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15361 (eval $ac_try) 2>&5
15362 ac_status=$?
15363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15364 (exit $ac_status); }; }; then
15365 eval "$as_ac_var=yes"
15366else
15367 echo "$as_me: failed program was:" >&5
15368sed 's/^/| /' conftest.$ac_ext >&5
15369
b4e70030 15370eval "$as_ac_var=no"
bec39cab
AC
15371fi
15372rm -f conftest.err conftest.$ac_objext \
15373 conftest$ac_exeext conftest.$ac_ext
15374fi
b4e70030
JB
15375echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15376echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
15377if test `eval echo '${'$as_ac_var'}'` = yes; then
15378 cat >>confdefs.h <<_ACEOF
15379#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15380_ACEOF
7be570e7 15381
7be570e7
JM
15382fi
15383done
15384
a3828db0 15385if test "x$ac_cv_func_fork" = xyes; then
b4e70030
JB
15386 echo "$as_me:$LINENO: checking for working fork" >&5
15387echo $ECHO_N "checking for working fork... $ECHO_C" >&6
a3828db0
MK
15388if test "${ac_cv_func_fork_works+set}" = set; then
15389 echo $ECHO_N "(cached) $ECHO_C" >&6
15390else
15391 if test "$cross_compiling" = yes; then
15392 ac_cv_func_fork_works=cross
15393else
15394 cat >conftest.$ac_ext <<_ACEOF
b4e70030
JB
15395/* By Ruediger Kuhlmann. */
15396 #include <sys/types.h>
15397 #if HAVE_UNISTD_H
15398 # include <unistd.h>
15399 #endif
15400 /* Some systems only have a dummy stub for fork() */
15401 int main ()
15402 {
15403 if (fork() < 0)
15404 exit (1);
15405 exit (0);
15406 }
a3828db0
MK
15407_ACEOF
15408rm -f conftest$ac_exeext
15409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15410 (eval $ac_link) 2>&5
15411 ac_status=$?
15412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15413 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15415 (eval $ac_try) 2>&5
15416 ac_status=$?
15417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15418 (exit $ac_status); }; }; then
15419 ac_cv_func_fork_works=yes
15420else
15421 echo "$as_me: program exited with status $ac_status" >&5
15422echo "$as_me: failed program was:" >&5
15423sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 15424
a3828db0
MK
15425( exit $ac_status )
15426ac_cv_func_fork_works=no
15427fi
b4e70030 15428rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
15429fi
15430fi
b4e70030
JB
15431echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
15432echo "${ECHO_T}$ac_cv_func_fork_works" >&6
a3828db0
MK
15433
15434else
15435 ac_cv_func_fork_works=$ac_cv_func_fork
15436fi
15437if test "x$ac_cv_func_fork_works" = xcross; then
15438 case $host in
15439 *-*-amigaos* | *-*-msdosdjgpp*)
15440 # Override, as these systems have only a dummy fork() stub
15441 ac_cv_func_fork_works=no
15442 ;;
15443 *)
15444 ac_cv_func_fork_works=yes
15445 ;;
15446 esac
15447 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15448echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15449fi
15450ac_cv_func_vfork_works=$ac_cv_func_vfork
15451if test "x$ac_cv_func_vfork" = xyes; then
b4e70030
JB
15452 echo "$as_me:$LINENO: checking for working vfork" >&5
15453echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
a3828db0 15454if test "${ac_cv_func_vfork_works+set}" = set; then
bec39cab 15455 echo $ECHO_N "(cached) $ECHO_C" >&6
a3828db0
MK
15456else
15457 if test "$cross_compiling" = yes; then
15458 ac_cv_func_vfork_works=cross
bec39cab
AC
15459else
15460 cat >conftest.$ac_ext <<_ACEOF
15461/* confdefs.h. */
15462_ACEOF
15463cat confdefs.h >>conftest.$ac_ext
15464cat >>conftest.$ac_ext <<_ACEOF
15465/* end confdefs.h. */
a3828db0 15466/* Thanks to Paul Eggert for this test. */
b4e70030
JB
15467#include <stdio.h>
15468#include <stdlib.h>
15469#include <sys/types.h>
15470#include <sys/stat.h>
a3828db0 15471#include <sys/wait.h>
b4e70030
JB
15472#if HAVE_UNISTD_H
15473# include <unistd.h>
15474#endif
a3828db0
MK
15475#if HAVE_VFORK_H
15476# include <vfork.h>
bec39cab 15477#endif
a3828db0
MK
15478/* On some sparc systems, changes by the child to local and incoming
15479 argument registers are propagated back to the parent. The compiler
15480 is told about this with #include <vfork.h>, but some compilers
15481 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15482 static variable whose address is put into a register that is
15483 clobbered by the vfork. */
15484static void
bec39cab 15485#ifdef __cplusplus
a3828db0
MK
15486sparc_address_test (int arg)
15487# else
15488sparc_address_test (arg) int arg;
c906108c 15489#endif
a3828db0
MK
15490{
15491 static pid_t child;
15492 if (!child) {
15493 child = vfork ();
15494 if (child < 0) {
15495 perror ("vfork");
15496 _exit(2);
15497 }
15498 if (!child) {
15499 arg = getpid();
15500 write(-1, "", 0);
15501 _exit (arg);
15502 }
15503 }
15504}
97bf5e38 15505
bec39cab
AC
15506int
15507main ()
15508{
a3828db0
MK
15509 pid_t parent = getpid ();
15510 pid_t child;
15511
15512 sparc_address_test (0);
15513
15514 child = vfork ();
15515
15516 if (child == 0) {
15517 /* Here is another test for sparc vfork register problems. This
15518 test uses lots of local variables, at least as many local
15519 variables as main has allocated so far including compiler
15520 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15521 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15522 reuse the register of parent for one of the local variables,
15523 since it will think that parent can't possibly be used any more
15524 in this routine. Assigning to the local variable will thus
15525 munge parent in the parent process. */
15526 pid_t
15527 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15528 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15529 /* Convince the compiler that p..p7 are live; otherwise, it might
15530 use the same hardware register for all 8 local variables. */
15531 if (p != p1 || p != p2 || p != p3 || p != p4
15532 || p != p5 || p != p6 || p != p7)
15533 _exit(1);
15534
15535 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15536 from child file descriptors. If the child closes a descriptor
15537 before it execs or exits, this munges the parent's descriptor
15538 as well. Test for this by closing stdout in the child. */
15539 _exit(close(fileno(stdout)) != 0);
15540 } else {
15541 int status;
15542 struct stat st;
15543
15544 while (wait(&status) != child)
15545 ;
b4e70030 15546 exit(
a3828db0
MK
15547 /* Was there some problem with vforking? */
15548 child < 0
15549
15550 /* Did the child fail? (This shouldn't happen.) */
15551 || status
15552
15553 /* Did the vfork/compiler bug occur? */
15554 || parent != getpid()
15555
15556 /* Did the file descriptor bug occur? */
15557 || fstat(fileno(stdout), &st) != 0
15558 );
15559 }
bec39cab
AC
15560}
15561_ACEOF
a3828db0 15562rm -f conftest$ac_exeext
bec39cab 15563if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a3828db0 15564 (eval $ac_link) 2>&5
bec39cab
AC
15565 ac_status=$?
15566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 15567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
15568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15569 (eval $ac_try) 2>&5
15570 ac_status=$?
15571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15572 (exit $ac_status); }; }; then
a3828db0
MK
15573 ac_cv_func_vfork_works=yes
15574else
15575 echo "$as_me: program exited with status $ac_status" >&5
15576echo "$as_me: failed program was:" >&5
15577sed 's/^/| /' conftest.$ac_ext >&5
15578
15579( exit $ac_status )
15580ac_cv_func_vfork_works=no
15581fi
b4e70030 15582rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
15583fi
15584fi
b4e70030
JB
15585echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
15586echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
a3828db0
MK
15587
15588fi;
15589if test "x$ac_cv_func_fork_works" = xcross; then
15590 ac_cv_func_vfork_works=$ac_cv_func_vfork
15591 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15592echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15593fi
15594
15595if test "x$ac_cv_func_vfork_works" = xyes; then
15596
15597cat >>confdefs.h <<\_ACEOF
15598#define HAVE_WORKING_VFORK 1
15599_ACEOF
15600
bec39cab 15601else
bec39cab 15602
a3828db0
MK
15603cat >>confdefs.h <<\_ACEOF
15604#define vfork fork
15605_ACEOF
15606
bec39cab 15607fi
a3828db0
MK
15608if test "x$ac_cv_func_fork_works" = xyes; then
15609
15610cat >>confdefs.h <<\_ACEOF
15611#define HAVE_WORKING_FORK 1
bec39cab 15612_ACEOF
c906108c 15613
c906108c
SS
15614fi
15615
bec39cab
AC
15616
15617
a3828db0 15618for ac_func in canonicalize_file_name realpath
97bf5e38 15619do
bec39cab 15620as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15621echo "$as_me:$LINENO: checking for $ac_func" >&5
15622echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15623if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
15624 echo $ECHO_N "(cached) $ECHO_C" >&6
15625else
15626 cat >conftest.$ac_ext <<_ACEOF
15627/* confdefs.h. */
15628_ACEOF
15629cat confdefs.h >>conftest.$ac_ext
15630cat >>conftest.$ac_ext <<_ACEOF
15631/* end confdefs.h. */
15632/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15633 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15634#define $ac_func innocuous_$ac_func
15635
d3ea6809
MM
15636/* System header to define __stub macros and hopefully few prototypes,
15637 which can conflict with char $ac_func (); below.
15638 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15639 <limits.h> exists even on freestanding compilers. */
15640
15641#ifdef __STDC__
15642# include <limits.h>
15643#else
15644# include <assert.h>
15645#endif
15646
15647#undef $ac_func
15648
b4e70030 15649/* Override any gcc2 internal prototype to avoid an error. */
d3ea6809
MM
15650#ifdef __cplusplus
15651extern "C"
b4e70030 15652{
d3ea6809 15653#endif
b4e70030
JB
15654/* We use char because int might match the return type of a gcc2
15655 builtin and then its argument prototype would still apply. */
d3ea6809
MM
15656char $ac_func ();
15657/* The GNU C library defines this for functions which it implements
15658 to always fail with ENOSYS. Some functions are actually named
15659 something starting with __ and the normal name is an alias. */
b4e70030 15660#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d3ea6809 15661choke me
b4e70030
JB
15662#else
15663char (*f) () = $ac_func;
15664#endif
15665#ifdef __cplusplus
15666}
d3ea6809
MM
15667#endif
15668
15669int
15670main ()
15671{
b4e70030 15672return f != $ac_func;
d3ea6809
MM
15673 ;
15674 return 0;
15675}
15676_ACEOF
15677rm -f conftest.$ac_objext conftest$ac_exeext
15678if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15679 (eval $ac_link) 2>conftest.er1
15680 ac_status=$?
15681 grep -v '^ *+' conftest.er1 >conftest.err
15682 rm -f conftest.er1
15683 cat conftest.err >&5
15684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15685 (exit $ac_status); } &&
b4e70030
JB
15686 { ac_try='test -z "$ac_c_werror_flag"
15687 || test ! -s conftest.err'
d3ea6809
MM
15688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15689 (eval $ac_try) 2>&5
15690 ac_status=$?
15691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15692 (exit $ac_status); }; } &&
15693 { ac_try='test -s conftest$ac_exeext'
15694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15695 (eval $ac_try) 2>&5
15696 ac_status=$?
15697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15698 (exit $ac_status); }; }; then
15699 eval "$as_ac_var=yes"
15700else
15701 echo "$as_me: failed program was:" >&5
15702sed 's/^/| /' conftest.$ac_ext >&5
15703
b4e70030 15704eval "$as_ac_var=no"
d3ea6809
MM
15705fi
15706rm -f conftest.err conftest.$ac_objext \
15707 conftest$ac_exeext conftest.$ac_ext
15708fi
b4e70030
JB
15709echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15710echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
d3ea6809
MM
15711if test `eval echo '${'$as_ac_var'}'` = yes; then
15712 cat >>confdefs.h <<_ACEOF
15713#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15714_ACEOF
15715
15716fi
15717done
15718
15719
15720
15721for ac_func in getuid getgid
15722do
15723as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15724echo "$as_me:$LINENO: checking for $ac_func" >&5
15725echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15726if eval "test \"\${$as_ac_var+set}\" = set"; then
d3ea6809
MM
15727 echo $ECHO_N "(cached) $ECHO_C" >&6
15728else
15729 cat >conftest.$ac_ext <<_ACEOF
15730/* confdefs.h. */
15731_ACEOF
15732cat confdefs.h >>conftest.$ac_ext
15733cat >>conftest.$ac_ext <<_ACEOF
15734/* end confdefs.h. */
15735/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15736 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15737#define $ac_func innocuous_$ac_func
15738
97bf5e38 15739/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
15740 which can conflict with char $ac_func (); below.
15741 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15742 <limits.h> exists even on freestanding compilers. */
c906108c 15743
bec39cab
AC
15744#ifdef __STDC__
15745# include <limits.h>
15746#else
15747# include <assert.h>
15748#endif
97bf5e38 15749
bec39cab
AC
15750#undef $ac_func
15751
b4e70030 15752/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
15753#ifdef __cplusplus
15754extern "C"
b4e70030 15755{
bec39cab 15756#endif
b4e70030
JB
15757/* We use char because int might match the return type of a gcc2
15758 builtin and then its argument prototype would still apply. */
bec39cab 15759char $ac_func ();
97bf5e38
MK
15760/* The GNU C library defines this for functions which it implements
15761 to always fail with ENOSYS. Some functions are actually named
15762 something starting with __ and the normal name is an alias. */
b4e70030 15763#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
97bf5e38 15764choke me
b4e70030
JB
15765#else
15766char (*f) () = $ac_func;
15767#endif
15768#ifdef __cplusplus
15769}
c906108c 15770#endif
97bf5e38 15771
bec39cab
AC
15772int
15773main ()
15774{
b4e70030 15775return f != $ac_func;
bec39cab
AC
15776 ;
15777 return 0;
15778}
15779_ACEOF
15780rm -f conftest.$ac_objext conftest$ac_exeext
15781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15782 (eval $ac_link) 2>conftest.er1
15783 ac_status=$?
15784 grep -v '^ *+' conftest.er1 >conftest.err
15785 rm -f conftest.er1
15786 cat conftest.err >&5
15787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15788 (exit $ac_status); } &&
b4e70030
JB
15789 { ac_try='test -z "$ac_c_werror_flag"
15790 || test ! -s conftest.err'
bec39cab
AC
15791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15792 (eval $ac_try) 2>&5
15793 ac_status=$?
15794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15795 (exit $ac_status); }; } &&
15796 { ac_try='test -s conftest$ac_exeext'
15797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15798 (eval $ac_try) 2>&5
15799 ac_status=$?
15800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15801 (exit $ac_status); }; }; then
15802 eval "$as_ac_var=yes"
15803else
15804 echo "$as_me: failed program was:" >&5
15805sed 's/^/| /' conftest.$ac_ext >&5
15806
b4e70030 15807eval "$as_ac_var=no"
bec39cab
AC
15808fi
15809rm -f conftest.err conftest.$ac_objext \
15810 conftest$ac_exeext conftest.$ac_ext
15811fi
b4e70030
JB
15812echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15813echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
15814if test `eval echo '${'$as_ac_var'}'` = yes; then
15815 cat >>confdefs.h <<_ACEOF
15816#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15817_ACEOF
c906108c 15818
c906108c 15819fi
97bf5e38 15820done
c906108c 15821
bec39cab 15822
a3828db0 15823for ac_func in poll
97bf5e38 15824do
bec39cab 15825as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15826echo "$as_me:$LINENO: checking for $ac_func" >&5
15827echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15828if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
15829 echo $ECHO_N "(cached) $ECHO_C" >&6
15830else
15831 cat >conftest.$ac_ext <<_ACEOF
15832/* confdefs.h. */
15833_ACEOF
15834cat confdefs.h >>conftest.$ac_ext
15835cat >>conftest.$ac_ext <<_ACEOF
15836/* end confdefs.h. */
15837/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15838 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15839#define $ac_func innocuous_$ac_func
15840
97bf5e38 15841/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
15842 which can conflict with char $ac_func (); below.
15843 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15844 <limits.h> exists even on freestanding compilers. */
15845
15846#ifdef __STDC__
15847# include <limits.h>
15848#else
15849# include <assert.h>
15850#endif
c906108c 15851
bec39cab 15852#undef $ac_func
97bf5e38 15853
b4e70030 15854/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
15855#ifdef __cplusplus
15856extern "C"
b4e70030 15857{
bec39cab 15858#endif
b4e70030
JB
15859/* We use char because int might match the return type of a gcc2
15860 builtin and then its argument prototype would still apply. */
bec39cab 15861char $ac_func ();
97bf5e38
MK
15862/* The GNU C library defines this for functions which it implements
15863 to always fail with ENOSYS. Some functions are actually named
15864 something starting with __ and the normal name is an alias. */
b4e70030 15865#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
97bf5e38 15866choke me
b4e70030
JB
15867#else
15868char (*f) () = $ac_func;
15869#endif
15870#ifdef __cplusplus
15871}
c906108c 15872#endif
97bf5e38 15873
bec39cab
AC
15874int
15875main ()
15876{
b4e70030 15877return f != $ac_func;
bec39cab
AC
15878 ;
15879 return 0;
15880}
15881_ACEOF
15882rm -f conftest.$ac_objext conftest$ac_exeext
15883if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15884 (eval $ac_link) 2>conftest.er1
15885 ac_status=$?
15886 grep -v '^ *+' conftest.er1 >conftest.err
15887 rm -f conftest.er1
15888 cat conftest.err >&5
15889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15890 (exit $ac_status); } &&
b4e70030
JB
15891 { ac_try='test -z "$ac_c_werror_flag"
15892 || test ! -s conftest.err'
bec39cab
AC
15893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15894 (eval $ac_try) 2>&5
15895 ac_status=$?
15896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15897 (exit $ac_status); }; } &&
15898 { ac_try='test -s conftest$ac_exeext'
15899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15900 (eval $ac_try) 2>&5
15901 ac_status=$?
15902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15903 (exit $ac_status); }; }; then
15904 eval "$as_ac_var=yes"
15905else
15906 echo "$as_me: failed program was:" >&5
15907sed 's/^/| /' conftest.$ac_ext >&5
15908
b4e70030 15909eval "$as_ac_var=no"
bec39cab
AC
15910fi
15911rm -f conftest.err conftest.$ac_objext \
15912 conftest$ac_exeext conftest.$ac_ext
15913fi
b4e70030
JB
15914echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15915echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
15916if test `eval echo '${'$as_ac_var'}'` = yes; then
15917 cat >>confdefs.h <<_ACEOF
15918#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15919_ACEOF
c906108c 15920
c906108c 15921fi
97bf5e38 15922done
c906108c 15923
bec39cab 15924
a3828db0 15925for ac_func in pread64
97bf5e38 15926do
bec39cab 15927as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15928echo "$as_me:$LINENO: checking for $ac_func" >&5
15929echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15930if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
15931 echo $ECHO_N "(cached) $ECHO_C" >&6
15932else
15933 cat >conftest.$ac_ext <<_ACEOF
15934/* confdefs.h. */
15935_ACEOF
15936cat confdefs.h >>conftest.$ac_ext
15937cat >>conftest.$ac_ext <<_ACEOF
15938/* end confdefs.h. */
15939/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15940 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15941#define $ac_func innocuous_$ac_func
15942
97bf5e38 15943/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
15944 which can conflict with char $ac_func (); below.
15945 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15946 <limits.h> exists even on freestanding compilers. */
15947
15948#ifdef __STDC__
15949# include <limits.h>
15950#else
15951# include <assert.h>
15952#endif
c906108c 15953
bec39cab 15954#undef $ac_func
97bf5e38 15955
b4e70030 15956/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
15957#ifdef __cplusplus
15958extern "C"
b4e70030 15959{
bec39cab 15960#endif
b4e70030
JB
15961/* We use char because int might match the return type of a gcc2
15962 builtin and then its argument prototype would still apply. */
bec39cab 15963char $ac_func ();
97bf5e38
MK
15964/* The GNU C library defines this for functions which it implements
15965 to always fail with ENOSYS. Some functions are actually named
15966 something starting with __ and the normal name is an alias. */
b4e70030 15967#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
97bf5e38 15968choke me
b4e70030
JB
15969#else
15970char (*f) () = $ac_func;
15971#endif
15972#ifdef __cplusplus
15973}
c906108c 15974#endif
97bf5e38 15975
bec39cab
AC
15976int
15977main ()
15978{
b4e70030 15979return f != $ac_func;
bec39cab
AC
15980 ;
15981 return 0;
15982}
15983_ACEOF
15984rm -f conftest.$ac_objext conftest$ac_exeext
15985if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15986 (eval $ac_link) 2>conftest.er1
15987 ac_status=$?
15988 grep -v '^ *+' conftest.er1 >conftest.err
15989 rm -f conftest.er1
15990 cat conftest.err >&5
15991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15992 (exit $ac_status); } &&
b4e70030
JB
15993 { ac_try='test -z "$ac_c_werror_flag"
15994 || test ! -s conftest.err'
bec39cab
AC
15995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15996 (eval $ac_try) 2>&5
15997 ac_status=$?
15998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15999 (exit $ac_status); }; } &&
16000 { ac_try='test -s conftest$ac_exeext'
16001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16002 (eval $ac_try) 2>&5
16003 ac_status=$?
16004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16005 (exit $ac_status); }; }; then
16006 eval "$as_ac_var=yes"
16007else
16008 echo "$as_me: failed program was:" >&5
16009sed 's/^/| /' conftest.$ac_ext >&5
16010
b4e70030 16011eval "$as_ac_var=no"
bec39cab
AC
16012fi
16013rm -f conftest.err conftest.$ac_objext \
16014 conftest$ac_exeext conftest.$ac_ext
16015fi
b4e70030
JB
16016echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16017echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
16018if test `eval echo '${'$as_ac_var'}'` = yes; then
16019 cat >>confdefs.h <<_ACEOF
16020#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16021_ACEOF
c906108c 16022
c906108c 16023fi
97bf5e38 16024done
c906108c 16025
bec39cab 16026
a3828db0 16027for ac_func in sbrk
b757528f 16028do
bec39cab 16029as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
16030echo "$as_me:$LINENO: checking for $ac_func" >&5
16031echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16032if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
16033 echo $ECHO_N "(cached) $ECHO_C" >&6
16034else
16035 cat >conftest.$ac_ext <<_ACEOF
16036/* confdefs.h. */
16037_ACEOF
16038cat confdefs.h >>conftest.$ac_ext
16039cat >>conftest.$ac_ext <<_ACEOF
16040/* end confdefs.h. */
16041/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16042 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16043#define $ac_func innocuous_$ac_func
16044
b757528f 16045/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
16046 which can conflict with char $ac_func (); below.
16047 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16048 <limits.h> exists even on freestanding compilers. */
16049
16050#ifdef __STDC__
16051# include <limits.h>
16052#else
16053# include <assert.h>
16054#endif
b757528f 16055
bec39cab 16056#undef $ac_func
b757528f 16057
b4e70030 16058/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
16059#ifdef __cplusplus
16060extern "C"
b4e70030 16061{
bec39cab 16062#endif
b4e70030
JB
16063/* We use char because int might match the return type of a gcc2
16064 builtin and then its argument prototype would still apply. */
bec39cab 16065char $ac_func ();
b757528f
JJ
16066/* The GNU C library defines this for functions which it implements
16067 to always fail with ENOSYS. Some functions are actually named
16068 something starting with __ and the normal name is an alias. */
b4e70030 16069#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
b757528f 16070choke me
b4e70030
JB
16071#else
16072char (*f) () = $ac_func;
16073#endif
16074#ifdef __cplusplus
16075}
b757528f
JJ
16076#endif
16077
bec39cab
AC
16078int
16079main ()
16080{
b4e70030 16081return f != $ac_func;
bec39cab
AC
16082 ;
16083 return 0;
16084}
16085_ACEOF
16086rm -f conftest.$ac_objext conftest$ac_exeext
16087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16088 (eval $ac_link) 2>conftest.er1
16089 ac_status=$?
16090 grep -v '^ *+' conftest.er1 >conftest.err
16091 rm -f conftest.er1
16092 cat conftest.err >&5
16093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16094 (exit $ac_status); } &&
b4e70030
JB
16095 { ac_try='test -z "$ac_c_werror_flag"
16096 || test ! -s conftest.err'
bec39cab
AC
16097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16098 (eval $ac_try) 2>&5
16099 ac_status=$?
16100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16101 (exit $ac_status); }; } &&
16102 { ac_try='test -s conftest$ac_exeext'
16103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16104 (eval $ac_try) 2>&5
16105 ac_status=$?
16106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16107 (exit $ac_status); }; }; then
16108 eval "$as_ac_var=yes"
16109else
16110 echo "$as_me: failed program was:" >&5
16111sed 's/^/| /' conftest.$ac_ext >&5
16112
b4e70030 16113eval "$as_ac_var=no"
bec39cab
AC
16114fi
16115rm -f conftest.err conftest.$ac_objext \
16116 conftest$ac_exeext conftest.$ac_ext
16117fi
b4e70030
JB
16118echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16119echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
16120if test `eval echo '${'$as_ac_var'}'` = yes; then
16121 cat >>confdefs.h <<_ACEOF
16122#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16123_ACEOF
b757528f 16124
b757528f
JJ
16125fi
16126done
16127
bec39cab 16128
a3828db0
MK
16129
16130for ac_func in setpgid setpgrp
bcb3dc3d 16131do
bec39cab 16132as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
16133echo "$as_me:$LINENO: checking for $ac_func" >&5
16134echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16135if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
16136 echo $ECHO_N "(cached) $ECHO_C" >&6
16137else
16138 cat >conftest.$ac_ext <<_ACEOF
16139/* confdefs.h. */
16140_ACEOF
16141cat confdefs.h >>conftest.$ac_ext
16142cat >>conftest.$ac_ext <<_ACEOF
16143/* end confdefs.h. */
16144/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16145 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16146#define $ac_func innocuous_$ac_func
16147
bcb3dc3d 16148/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
16149 which can conflict with char $ac_func (); below.
16150 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16151 <limits.h> exists even on freestanding compilers. */
16152
16153#ifdef __STDC__
16154# include <limits.h>
16155#else
16156# include <assert.h>
16157#endif
bcb3dc3d 16158
bec39cab 16159#undef $ac_func
bcb3dc3d 16160
b4e70030 16161/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
16162#ifdef __cplusplus
16163extern "C"
b4e70030 16164{
bec39cab 16165#endif
b4e70030
JB
16166/* We use char because int might match the return type of a gcc2
16167 builtin and then its argument prototype would still apply. */
bec39cab 16168char $ac_func ();
bcb3dc3d
MK
16169/* The GNU C library defines this for functions which it implements
16170 to always fail with ENOSYS. Some functions are actually named
16171 something starting with __ and the normal name is an alias. */
b4e70030 16172#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
bcb3dc3d 16173choke me
b4e70030
JB
16174#else
16175char (*f) () = $ac_func;
16176#endif
16177#ifdef __cplusplus
16178}
bcb3dc3d
MK
16179#endif
16180
bec39cab
AC
16181int
16182main ()
16183{
b4e70030 16184return f != $ac_func;
bec39cab
AC
16185 ;
16186 return 0;
16187}
16188_ACEOF
16189rm -f conftest.$ac_objext conftest$ac_exeext
16190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16191 (eval $ac_link) 2>conftest.er1
16192 ac_status=$?
16193 grep -v '^ *+' conftest.er1 >conftest.err
16194 rm -f conftest.er1
16195 cat conftest.err >&5
16196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16197 (exit $ac_status); } &&
b4e70030
JB
16198 { ac_try='test -z "$ac_c_werror_flag"
16199 || test ! -s conftest.err'
bec39cab
AC
16200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16201 (eval $ac_try) 2>&5
16202 ac_status=$?
16203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16204 (exit $ac_status); }; } &&
16205 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
16211 eval "$as_ac_var=yes"
16212else
16213 echo "$as_me: failed program was:" >&5
16214sed 's/^/| /' conftest.$ac_ext >&5
16215
b4e70030 16216eval "$as_ac_var=no"
bec39cab
AC
16217fi
16218rm -f conftest.err conftest.$ac_objext \
16219 conftest$ac_exeext conftest.$ac_ext
16220fi
b4e70030
JB
16221echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16222echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
16223if test `eval echo '${'$as_ac_var'}'` = yes; then
16224 cat >>confdefs.h <<_ACEOF
16225#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16226_ACEOF
bcb3dc3d 16227
bcb3dc3d
MK
16228fi
16229done
16230
bec39cab 16231
a3828db0
MK
16232
16233
16234for ac_func in sigaction sigprocmask sigsetmask
8b9cf735 16235do
bec39cab 16236as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
16237echo "$as_me:$LINENO: checking for $ac_func" >&5
16238echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16239if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
16240 echo $ECHO_N "(cached) $ECHO_C" >&6
16241else
16242 cat >conftest.$ac_ext <<_ACEOF
16243/* confdefs.h. */
16244_ACEOF
16245cat confdefs.h >>conftest.$ac_ext
16246cat >>conftest.$ac_ext <<_ACEOF
16247/* end confdefs.h. */
16248/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16249 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16250#define $ac_func innocuous_$ac_func
16251
8b9cf735 16252/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
16253 which can conflict with char $ac_func (); below.
16254 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16255 <limits.h> exists even on freestanding compilers. */
16256
16257#ifdef __STDC__
16258# include <limits.h>
16259#else
16260# include <assert.h>
16261#endif
8b9cf735 16262
bec39cab 16263#undef $ac_func
8b9cf735 16264
b4e70030 16265/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
16266#ifdef __cplusplus
16267extern "C"
b4e70030 16268{
a3828db0 16269#endif
b4e70030
JB
16270/* We use char because int might match the return type of a gcc2
16271 builtin and then its argument prototype would still apply. */
a3828db0
MK
16272char $ac_func ();
16273/* The GNU C library defines this for functions which it implements
16274 to always fail with ENOSYS. Some functions are actually named
16275 something starting with __ and the normal name is an alias. */
b4e70030 16276#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 16277choke me
b4e70030
JB
16278#else
16279char (*f) () = $ac_func;
16280#endif
16281#ifdef __cplusplus
16282}
a3828db0
MK
16283#endif
16284
bec39cab
AC
16285int
16286main ()
16287{
b4e70030 16288return f != $ac_func;
bec39cab
AC
16289 ;
16290 return 0;
16291}
16292_ACEOF
a3828db0
MK
16293rm -f conftest.$ac_objext conftest$ac_exeext
16294if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16295 (eval $ac_link) 2>conftest.er1
bec39cab
AC
16296 ac_status=$?
16297 grep -v '^ *+' conftest.er1 >conftest.err
16298 rm -f conftest.er1
16299 cat conftest.err >&5
16300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16301 (exit $ac_status); } &&
b4e70030
JB
16302 { ac_try='test -z "$ac_c_werror_flag"
16303 || test ! -s conftest.err'
bec39cab
AC
16304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16305 (eval $ac_try) 2>&5
16306 ac_status=$?
16307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16308 (exit $ac_status); }; } &&
a3828db0 16309 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
16310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16311 (eval $ac_try) 2>&5
16312 ac_status=$?
16313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16314 (exit $ac_status); }; }; then
a3828db0 16315 eval "$as_ac_var=yes"
086ec9eb 16316else
bec39cab
AC
16317 echo "$as_me: failed program was:" >&5
16318sed 's/^/| /' conftest.$ac_ext >&5
16319
b4e70030 16320eval "$as_ac_var=no"
a3828db0
MK
16321fi
16322rm -f conftest.err conftest.$ac_objext \
16323 conftest$ac_exeext conftest.$ac_ext
16324fi
b4e70030
JB
16325echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16326echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
16327if test `eval echo '${'$as_ac_var'}'` = yes; then
16328 cat >>confdefs.h <<_ACEOF
16329#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16330_ACEOF
16331
086ec9eb 16332fi
a3828db0
MK
16333done
16334
16335
16336for ac_func in socketpair
16337do
16338as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
16339echo "$as_me:$LINENO: checking for $ac_func" >&5
16340echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16341if eval "test \"\${$as_ac_var+set}\" = set"; then
a3828db0
MK
16342 echo $ECHO_N "(cached) $ECHO_C" >&6
16343else
16344 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
16345/* confdefs.h. */
16346_ACEOF
16347cat confdefs.h >>conftest.$ac_ext
16348cat >>conftest.$ac_ext <<_ACEOF
16349/* end confdefs.h. */
a3828db0
MK
16350/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16351 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16352#define $ac_func innocuous_$ac_func
16353
16354/* System header to define __stub macros and hopefully few prototypes,
16355 which can conflict with char $ac_func (); below.
16356 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16357 <limits.h> exists even on freestanding compilers. */
16358
16359#ifdef __STDC__
16360# include <limits.h>
16361#else
16362# include <assert.h>
16363#endif
16364
16365#undef $ac_func
16366
b4e70030 16367/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
16368#ifdef __cplusplus
16369extern "C"
b4e70030 16370{
a3828db0 16371#endif
b4e70030
JB
16372/* We use char because int might match the return type of a gcc2
16373 builtin and then its argument prototype would still apply. */
a3828db0
MK
16374char $ac_func ();
16375/* The GNU C library defines this for functions which it implements
16376 to always fail with ENOSYS. Some functions are actually named
16377 something starting with __ and the normal name is an alias. */
b4e70030 16378#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 16379choke me
b4e70030
JB
16380#else
16381char (*f) () = $ac_func;
16382#endif
16383#ifdef __cplusplus
16384}
a3828db0
MK
16385#endif
16386
bec39cab
AC
16387int
16388main ()
16389{
b4e70030 16390return f != $ac_func;
bec39cab
AC
16391 ;
16392 return 0;
16393}
16394_ACEOF
a3828db0
MK
16395rm -f conftest.$ac_objext conftest$ac_exeext
16396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16397 (eval $ac_link) 2>conftest.er1
bec39cab
AC
16398 ac_status=$?
16399 grep -v '^ *+' conftest.er1 >conftest.err
16400 rm -f conftest.er1
16401 cat conftest.err >&5
16402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16403 (exit $ac_status); } &&
b4e70030
JB
16404 { ac_try='test -z "$ac_c_werror_flag"
16405 || test ! -s conftest.err'
bec39cab
AC
16406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16407 (eval $ac_try) 2>&5
16408 ac_status=$?
16409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16410 (exit $ac_status); }; } &&
a3828db0 16411 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
16412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16413 (eval $ac_try) 2>&5
16414 ac_status=$?
16415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16416 (exit $ac_status); }; }; then
a3828db0 16417 eval "$as_ac_var=yes"
086ec9eb 16418else
bec39cab
AC
16419 echo "$as_me: failed program was:" >&5
16420sed 's/^/| /' conftest.$ac_ext >&5
16421
b4e70030 16422eval "$as_ac_var=no"
086ec9eb 16423fi
a3828db0
MK
16424rm -f conftest.err conftest.$ac_objext \
16425 conftest$ac_exeext conftest.$ac_ext
086ec9eb 16426fi
b4e70030
JB
16427echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16428echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
16429if test `eval echo '${'$as_ac_var'}'` = yes; then
16430 cat >>confdefs.h <<_ACEOF
16431#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 16432_ACEOF
086ec9eb
MK
16433
16434fi
a3828db0 16435done
086ec9eb 16436
a3828db0
MK
16437
16438for ac_func in syscall
16439do
16440as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
16441echo "$as_me:$LINENO: checking for $ac_func" >&5
16442echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16443if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 16444 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab
AC
16445else
16446 cat >conftest.$ac_ext <<_ACEOF
16447/* confdefs.h. */
16448_ACEOF
16449cat confdefs.h >>conftest.$ac_ext
16450cat >>conftest.$ac_ext <<_ACEOF
16451/* end confdefs.h. */
a3828db0
MK
16452/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16453 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16454#define $ac_func innocuous_$ac_func
16455
16456/* System header to define __stub macros and hopefully few prototypes,
16457 which can conflict with char $ac_func (); below.
16458 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16459 <limits.h> exists even on freestanding compilers. */
16460
16461#ifdef __STDC__
16462# include <limits.h>
16463#else
16464# include <assert.h>
16465#endif
16466
16467#undef $ac_func
16468
b4e70030 16469/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
16470#ifdef __cplusplus
16471extern "C"
b4e70030 16472{
a3828db0 16473#endif
b4e70030
JB
16474/* We use char because int might match the return type of a gcc2
16475 builtin and then its argument prototype would still apply. */
a3828db0
MK
16476char $ac_func ();
16477/* The GNU C library defines this for functions which it implements
16478 to always fail with ENOSYS. Some functions are actually named
16479 something starting with __ and the normal name is an alias. */
b4e70030 16480#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 16481choke me
b4e70030
JB
16482#else
16483char (*f) () = $ac_func;
16484#endif
16485#ifdef __cplusplus
16486}
c906108c 16487#endif
97bf5e38 16488
bec39cab
AC
16489int
16490main ()
97bf5e38 16491{
b4e70030 16492return f != $ac_func;
bec39cab
AC
16493 ;
16494 return 0;
97bf5e38 16495}
bec39cab 16496_ACEOF
a3828db0 16497rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab 16498if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a3828db0 16499 (eval $ac_link) 2>conftest.er1
bec39cab 16500 ac_status=$?
a3828db0
MK
16501 grep -v '^ *+' conftest.er1 >conftest.err
16502 rm -f conftest.er1
16503 cat conftest.err >&5
bec39cab 16504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 16505 (exit $ac_status); } &&
b4e70030
JB
16506 { ac_try='test -z "$ac_c_werror_flag"
16507 || test ! -s conftest.err'
a3828db0
MK
16508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16509 (eval $ac_try) 2>&5
16510 ac_status=$?
16511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16512 (exit $ac_status); }; } &&
16513 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
16514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16515 (eval $ac_try) 2>&5
16516 ac_status=$?
16517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16518 (exit $ac_status); }; }; then
a3828db0 16519 eval "$as_ac_var=yes"
c906108c 16520else
a3828db0 16521 echo "$as_me: failed program was:" >&5
bec39cab
AC
16522sed 's/^/| /' conftest.$ac_ext >&5
16523
b4e70030 16524eval "$as_ac_var=no"
97bf5e38 16525fi
a3828db0
MK
16526rm -f conftest.err conftest.$ac_objext \
16527 conftest$ac_exeext conftest.$ac_ext
16528fi
b4e70030
JB
16529echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16530echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
16531if test `eval echo '${'$as_ac_var'}'` = yes; then
16532 cat >>confdefs.h <<_ACEOF
16533#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 16534_ACEOF
c906108c
SS
16535
16536fi
a3828db0 16537done
c906108c 16538
a3828db0
MK
16539
16540for ac_func in ttrace
16541do
16542as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
16543echo "$as_me:$LINENO: checking for $ac_func" >&5
16544echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16545if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 16546 echo $ECHO_N "(cached) $ECHO_C" >&6
b83266a0 16547else
bec39cab
AC
16548 cat >conftest.$ac_ext <<_ACEOF
16549/* confdefs.h. */
16550_ACEOF
16551cat confdefs.h >>conftest.$ac_ext
16552cat >>conftest.$ac_ext <<_ACEOF
16553/* end confdefs.h. */
a3828db0
MK
16554/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16555 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16556#define $ac_func innocuous_$ac_func
b83266a0 16557
a3828db0
MK
16558/* System header to define __stub macros and hopefully few prototypes,
16559 which can conflict with char $ac_func (); below.
16560 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16561 <limits.h> exists even on freestanding compilers. */
16562
16563#ifdef __STDC__
16564# include <limits.h>
16565#else
16566# include <assert.h>
16567#endif
16568
16569#undef $ac_func
16570
b4e70030 16571/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
16572#ifdef __cplusplus
16573extern "C"
b4e70030 16574{
a3828db0 16575#endif
b4e70030
JB
16576/* We use char because int might match the return type of a gcc2
16577 builtin and then its argument prototype would still apply. */
a3828db0
MK
16578char $ac_func ();
16579/* The GNU C library defines this for functions which it implements
16580 to always fail with ENOSYS. Some functions are actually named
16581 something starting with __ and the normal name is an alias. */
b4e70030 16582#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 16583choke me
b4e70030
JB
16584#else
16585char (*f) () = $ac_func;
16586#endif
16587#ifdef __cplusplus
16588}
a3828db0 16589#endif
97bf5e38 16590
bec39cab
AC
16591int
16592main ()
16593{
b4e70030 16594return f != $ac_func;
bec39cab
AC
16595 ;
16596 return 0;
16597}
16598_ACEOF
a3828db0
MK
16599rm -f conftest.$ac_objext conftest$ac_exeext
16600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16601 (eval $ac_link) 2>conftest.er1
bec39cab
AC
16602 ac_status=$?
16603 grep -v '^ *+' conftest.er1 >conftest.err
16604 rm -f conftest.er1
16605 cat conftest.err >&5
16606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16607 (exit $ac_status); } &&
b4e70030
JB
16608 { ac_try='test -z "$ac_c_werror_flag"
16609 || test ! -s conftest.err'
bec39cab
AC
16610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16611 (eval $ac_try) 2>&5
16612 ac_status=$?
16613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16614 (exit $ac_status); }; } &&
a3828db0 16615 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
16616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16617 (eval $ac_try) 2>&5
16618 ac_status=$?
16619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16620 (exit $ac_status); }; }; then
a3828db0 16621 eval "$as_ac_var=yes"
b83266a0 16622else
bec39cab
AC
16623 echo "$as_me: failed program was:" >&5
16624sed 's/^/| /' conftest.$ac_ext >&5
16625
b4e70030 16626eval "$as_ac_var=no"
b83266a0 16627fi
a3828db0
MK
16628rm -f conftest.err conftest.$ac_objext \
16629 conftest$ac_exeext conftest.$ac_ext
b83266a0 16630fi
b4e70030
JB
16631echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16632echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
16633if test `eval echo '${'$as_ac_var'}'` = yes; then
16634 cat >>confdefs.h <<_ACEOF
16635#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 16636_ACEOF
b83266a0 16637
97bf5e38 16638fi
a3828db0 16639done
b83266a0 16640
a3828db0
MK
16641
16642for ac_func in wborder
16643do
16644as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
16645echo "$as_me:$LINENO: checking for $ac_func" >&5
16646echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16647if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
16648 echo $ECHO_N "(cached) $ECHO_C" >&6
16649else
16650 cat >conftest.$ac_ext <<_ACEOF
16651/* confdefs.h. */
16652_ACEOF
16653cat confdefs.h >>conftest.$ac_ext
16654cat >>conftest.$ac_ext <<_ACEOF
16655/* end confdefs.h. */
a3828db0
MK
16656/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16657 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16658#define $ac_func innocuous_$ac_func
a4db0f07 16659
a3828db0
MK
16660/* System header to define __stub macros and hopefully few prototypes,
16661 which can conflict with char $ac_func (); below.
16662 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16663 <limits.h> exists even on freestanding compilers. */
16664
16665#ifdef __STDC__
16666# include <limits.h>
16667#else
16668# include <assert.h>
16669#endif
16670
16671#undef $ac_func
16672
b4e70030 16673/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
16674#ifdef __cplusplus
16675extern "C"
b4e70030 16676{
a3828db0 16677#endif
b4e70030
JB
16678/* We use char because int might match the return type of a gcc2
16679 builtin and then its argument prototype would still apply. */
a3828db0
MK
16680char $ac_func ();
16681/* The GNU C library defines this for functions which it implements
16682 to always fail with ENOSYS. Some functions are actually named
16683 something starting with __ and the normal name is an alias. */
b4e70030 16684#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 16685choke me
b4e70030
JB
16686#else
16687char (*f) () = $ac_func;
16688#endif
16689#ifdef __cplusplus
16690}
a3828db0 16691#endif
97bf5e38 16692
bec39cab
AC
16693int
16694main ()
16695{
b4e70030 16696return f != $ac_func;
bec39cab
AC
16697 ;
16698 return 0;
16699}
16700_ACEOF
a3828db0
MK
16701rm -f conftest.$ac_objext conftest$ac_exeext
16702if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16703 (eval $ac_link) 2>conftest.er1
bec39cab
AC
16704 ac_status=$?
16705 grep -v '^ *+' conftest.er1 >conftest.err
16706 rm -f conftest.er1
16707 cat conftest.err >&5
16708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16709 (exit $ac_status); } &&
b4e70030
JB
16710 { ac_try='test -z "$ac_c_werror_flag"
16711 || test ! -s conftest.err'
bec39cab
AC
16712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16713 (eval $ac_try) 2>&5
16714 ac_status=$?
16715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16716 (exit $ac_status); }; } &&
a3828db0 16717 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
16718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16719 (eval $ac_try) 2>&5
16720 ac_status=$?
16721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16722 (exit $ac_status); }; }; then
a3828db0 16723 eval "$as_ac_var=yes"
a4db0f07 16724else
bec39cab
AC
16725 echo "$as_me: failed program was:" >&5
16726sed 's/^/| /' conftest.$ac_ext >&5
16727
b4e70030 16728eval "$as_ac_var=no"
a4db0f07 16729fi
a3828db0
MK
16730rm -f conftest.err conftest.$ac_objext \
16731 conftest$ac_exeext conftest.$ac_ext
a4db0f07 16732fi
b4e70030
JB
16733echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16734echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
16735if test `eval echo '${'$as_ac_var'}'` = yes; then
16736 cat >>confdefs.h <<_ACEOF
16737#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 16738_ACEOF
a4db0f07
RH
16739
16740fi
a3828db0 16741done
c906108c 16742
06825bd1 16743
a3828db0
MK
16744# Check the return and argument types of ptrace. No canned test for
16745# this, so roll our own.
16746gdb_ptrace_headers='
16747#if HAVE_SYS_TYPES_H
16748# include <sys/types.h>
16749#endif
16750#if HAVE_SYS_PTRACE_H
16751# include <sys/ptrace.h>
16752#endif
16753#if HAVE_UNISTD_H
16754# include <unistd.h>
16755#endif
16756'
16757# There is no point in checking if we don't have a prototype.
b4e70030
JB
16758echo "$as_me:$LINENO: checking whether ptrace is declared" >&5
16759echo $ECHO_N "checking whether ptrace is declared... $ECHO_C" >&6
a3828db0 16760if test "${ac_cv_have_decl_ptrace+set}" = set; then
bec39cab
AC
16761 echo $ECHO_N "(cached) $ECHO_C" >&6
16762else
16763 cat >conftest.$ac_ext <<_ACEOF
16764/* confdefs.h. */
16765_ACEOF
16766cat confdefs.h >>conftest.$ac_ext
16767cat >>conftest.$ac_ext <<_ACEOF
16768/* end confdefs.h. */
a3828db0
MK
16769$gdb_ptrace_headers
16770
bec39cab
AC
16771int
16772main ()
16773{
a3828db0
MK
16774#ifndef ptrace
16775 char *p = (char *) ptrace;
06825bd1 16776#endif
a3828db0 16777
bec39cab
AC
16778 ;
16779 return 0;
16780}
16781_ACEOF
16782rm -f conftest.$ac_objext
16783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16784 (eval $ac_compile) 2>conftest.er1
16785 ac_status=$?
16786 grep -v '^ *+' conftest.er1 >conftest.err
16787 rm -f conftest.er1
16788 cat conftest.err >&5
16789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16790 (exit $ac_status); } &&
b4e70030
JB
16791 { ac_try='test -z "$ac_c_werror_flag"
16792 || test ! -s conftest.err'
bec39cab
AC
16793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16794 (eval $ac_try) 2>&5
16795 ac_status=$?
16796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16797 (exit $ac_status); }; } &&
16798 { ac_try='test -s conftest.$ac_objext'
16799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16800 (eval $ac_try) 2>&5
16801 ac_status=$?
16802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16803 (exit $ac_status); }; }; then
a3828db0 16804 ac_cv_have_decl_ptrace=yes
06825bd1 16805else
bec39cab
AC
16806 echo "$as_me: failed program was:" >&5
16807sed 's/^/| /' conftest.$ac_ext >&5
16808
b4e70030 16809ac_cv_have_decl_ptrace=no
06825bd1 16810fi
bec39cab 16811rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 16812fi
b4e70030
JB
16813echo "$as_me:$LINENO: result: $ac_cv_have_decl_ptrace" >&5
16814echo "${ECHO_T}$ac_cv_have_decl_ptrace" >&6
a3828db0 16815if test $ac_cv_have_decl_ptrace = yes; then
06825bd1 16816
a3828db0
MK
16817cat >>confdefs.h <<_ACEOF
16818#define HAVE_DECL_PTRACE 1
16819_ACEOF
bec39cab 16820
bec39cab 16821
a3828db0
MK
16822else
16823 cat >>confdefs.h <<_ACEOF
16824#define HAVE_DECL_PTRACE 0
bec39cab 16825_ACEOF
06825bd1 16826
a3828db0
MK
16827
16828 : ${gdb_cv_func_ptrace_ret='int'}
16829 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
16830
06825bd1
MK
16831fi
16832
a3828db0
MK
16833
16834# Check return type.
b4e70030
JB
16835echo "$as_me:$LINENO: checking return type of ptrace" >&5
16836echo $ECHO_N "checking return type of ptrace... $ECHO_C" >&6
a3828db0 16837if test "${gdb_cv_func_ptrace_ret+set}" = set; then
bec39cab
AC
16838 echo $ECHO_N "(cached) $ECHO_C" >&6
16839else
16840 cat >conftest.$ac_ext <<_ACEOF
16841/* confdefs.h. */
16842_ACEOF
16843cat confdefs.h >>conftest.$ac_ext
16844cat >>conftest.$ac_ext <<_ACEOF
16845/* end confdefs.h. */
a3828db0 16846$gdb_ptrace_headers
bec39cab
AC
16847int
16848main ()
16849{
a3828db0 16850extern int ptrace ();
bec39cab
AC
16851 ;
16852 return 0;
16853}
16854_ACEOF
16855rm -f conftest.$ac_objext
16856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16857 (eval $ac_compile) 2>conftest.er1
16858 ac_status=$?
16859 grep -v '^ *+' conftest.er1 >conftest.err
16860 rm -f conftest.er1
16861 cat conftest.err >&5
16862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16863 (exit $ac_status); } &&
b4e70030
JB
16864 { ac_try='test -z "$ac_c_werror_flag"
16865 || test ! -s conftest.err'
bec39cab
AC
16866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16867 (eval $ac_try) 2>&5
16868 ac_status=$?
16869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16870 (exit $ac_status); }; } &&
16871 { ac_try='test -s conftest.$ac_objext'
16872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16873 (eval $ac_try) 2>&5
16874 ac_status=$?
16875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16876 (exit $ac_status); }; }; then
a3828db0 16877 gdb_cv_func_ptrace_ret='int'
70f9f479 16878else
bec39cab
AC
16879 echo "$as_me: failed program was:" >&5
16880sed 's/^/| /' conftest.$ac_ext >&5
16881
b4e70030 16882gdb_cv_func_ptrace_ret='long'
70f9f479 16883fi
bec39cab 16884rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 16885fi
b4e70030
JB
16886echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_ret" >&5
16887echo "${ECHO_T}$gdb_cv_func_ptrace_ret" >&6
bec39cab 16888
a3828db0
MK
16889cat >>confdefs.h <<_ACEOF
16890#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 16891_ACEOF
70f9f479 16892
a3828db0 16893# Check argument types.
b4e70030
JB
16894echo "$as_me:$LINENO: checking types of arguments for ptrace" >&5
16895echo $ECHO_N "checking types of arguments for ptrace... $ECHO_C" >&6
a3828db0 16896if test "${gdb_cv_func_ptrace_args+set}" = set; then
bec39cab
AC
16897 echo $ECHO_N "(cached) $ECHO_C" >&6
16898else
a3828db0
MK
16899
16900for gdb_arg1 in 'int' 'long'; do
16901 for gdb_arg2 in 'pid_t' 'int' 'long'; do
16902 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long'; do
16903 for gdb_arg4 in 'int' 'long'; do
16904 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
16905/* confdefs.h. */
16906_ACEOF
16907cat confdefs.h >>conftest.$ac_ext
16908cat >>conftest.$ac_ext <<_ACEOF
16909/* end confdefs.h. */
a3828db0 16910$gdb_ptrace_headers
bec39cab
AC
16911int
16912main ()
16913{
a3828db0
MK
16914
16915extern $gdb_cv_func_ptrace_ret
16916 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
16917
bec39cab
AC
16918 ;
16919 return 0;
16920}
16921_ACEOF
16922rm -f conftest.$ac_objext
16923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16924 (eval $ac_compile) 2>conftest.er1
16925 ac_status=$?
16926 grep -v '^ *+' conftest.er1 >conftest.err
16927 rm -f conftest.er1
16928 cat conftest.err >&5
16929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16930 (exit $ac_status); } &&
b4e70030
JB
16931 { ac_try='test -z "$ac_c_werror_flag"
16932 || test ! -s conftest.err'
bec39cab
AC
16933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16934 (eval $ac_try) 2>&5
16935 ac_status=$?
16936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16937 (exit $ac_status); }; } &&
16938 { ac_try='test -s conftest.$ac_objext'
16939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16940 (eval $ac_try) 2>&5
16941 ac_status=$?
16942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16943 (exit $ac_status); }; }; then
a3828db0
MK
16944 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
16945 break 4;
5c7f2947 16946else
bec39cab
AC
16947 echo "$as_me: failed program was:" >&5
16948sed 's/^/| /' conftest.$ac_ext >&5
16949
5c7f2947 16950fi
bec39cab 16951rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
16952 for gdb_arg5 in 'int *' 'int' 'long'; do
16953 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
16954/* confdefs.h. */
16955_ACEOF
16956cat confdefs.h >>conftest.$ac_ext
16957cat >>conftest.$ac_ext <<_ACEOF
16958/* end confdefs.h. */
a3828db0 16959$gdb_ptrace_headers
bec39cab
AC
16960int
16961main ()
16962{
a3828db0
MK
16963
16964extern $gdb_cv_func_ptrace_ret
16965 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
16966
bec39cab
AC
16967 ;
16968 return 0;
16969}
16970_ACEOF
16971rm -f conftest.$ac_objext
16972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16973 (eval $ac_compile) 2>conftest.er1
16974 ac_status=$?
16975 grep -v '^ *+' conftest.er1 >conftest.err
16976 rm -f conftest.er1
16977 cat conftest.err >&5
16978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16979 (exit $ac_status); } &&
b4e70030
JB
16980 { ac_try='test -z "$ac_c_werror_flag"
16981 || test ! -s conftest.err'
bec39cab
AC
16982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16983 (eval $ac_try) 2>&5
16984 ac_status=$?
16985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16986 (exit $ac_status); }; } &&
16987 { ac_try='test -s conftest.$ac_objext'
16988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16989 (eval $ac_try) 2>&5
16990 ac_status=$?
16991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16992 (exit $ac_status); }; }; then
a3828db0
MK
16993
16994gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
16995 break 5;
78434e59 16996else
bec39cab
AC
16997 echo "$as_me: failed program was:" >&5
16998sed 's/^/| /' conftest.$ac_ext >&5
16999
78434e59 17000fi
bec39cab 17001rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
17002 done
17003 done
17004 done
17005 done
17006done
17007# Provide a safe default value.
17008: ${gdb_cv_func_ptrace_args='int,int,long,long'}
17009
78434e59 17010fi
b4e70030
JB
17011echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_args" >&5
17012echo "${ECHO_T}$gdb_cv_func_ptrace_args" >&6
a3828db0
MK
17013ac_save_IFS=$IFS; IFS=','
17014set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
17015IFS=$ac_save_IFS
17016shift
bec39cab 17017
a3828db0
MK
17018cat >>confdefs.h <<_ACEOF
17019#define PTRACE_TYPE_ARG3 $3
17020_ACEOF
17021
17022if test -n "$5"; then
17023
17024cat >>confdefs.h <<_ACEOF
17025#define PTRACE_TYPE_ARG5 $5
bec39cab 17026_ACEOF
78434e59
MK
17027
17028fi
17029
a3828db0 17030if test "$cross_compiling" = no; then
b4e70030
JB
17031 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
17032echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 17033if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 17034 echo $ECHO_N "(cached) $ECHO_C" >&6
a3828db0
MK
17035else
17036 if test "$cross_compiling" = yes; then
17037 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
17038echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
17039 { (exit 1); exit 1; }; }
bec39cab
AC
17040else
17041 cat >conftest.$ac_ext <<_ACEOF
17042/* confdefs.h. */
17043_ACEOF
17044cat confdefs.h >>conftest.$ac_ext
17045cat >>conftest.$ac_ext <<_ACEOF
17046/* end confdefs.h. */
b4e70030
JB
17047#if HAVE_UNISTD_H
17048# include <unistd.h>
17049#endif
17050
bec39cab
AC
17051int
17052main ()
17053{
a3828db0
MK
17054/* If this system has a BSD-style setpgrp which takes arguments,
17055 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
17056 exit successfully. */
b4e70030 17057 exit (setpgrp (1,1) == -1 ? 0 : 1);
bec39cab
AC
17058 ;
17059 return 0;
17060}
17061_ACEOF
a3828db0
MK
17062rm -f conftest$ac_exeext
17063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17064 (eval $ac_link) 2>&5
bec39cab
AC
17065 ac_status=$?
17066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 17067 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
17068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17069 (eval $ac_try) 2>&5
17070 ac_status=$?
17071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17072 (exit $ac_status); }; }; then
a3828db0 17073 ac_cv_func_setpgrp_void=no
c906108c 17074else
a3828db0
MK
17075 echo "$as_me: program exited with status $ac_status" >&5
17076echo "$as_me: failed program was:" >&5
bec39cab
AC
17077sed 's/^/| /' conftest.$ac_ext >&5
17078
a3828db0
MK
17079( exit $ac_status )
17080ac_cv_func_setpgrp_void=yes
c906108c 17081fi
b4e70030 17082rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 17083fi
a3828db0 17084fi
b4e70030
JB
17085echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
17086echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0
MK
17087if test $ac_cv_func_setpgrp_void = yes; then
17088
17089cat >>confdefs.h <<\_ACEOF
17090#define SETPGRP_VOID 1
bec39cab 17091_ACEOF
97bf5e38
MK
17092
17093fi
a3828db0
MK
17094
17095else
b4e70030
JB
17096 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
17097echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 17098if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 17099 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 17100else
bec39cab
AC
17101 cat >conftest.$ac_ext <<_ACEOF
17102/* confdefs.h. */
17103_ACEOF
17104cat confdefs.h >>conftest.$ac_ext
17105cat >>conftest.$ac_ext <<_ACEOF
17106/* end confdefs.h. */
a3828db0
MK
17107
17108#include <unistd.h>
17109
bec39cab
AC
17110int
17111main ()
17112{
a3828db0
MK
17113
17114 if (setpgrp(1,1) == -1)
17115 exit (0);
17116 else
17117 exit (1);
17118
bec39cab
AC
17119 ;
17120 return 0;
17121}
17122_ACEOF
17123rm -f conftest.$ac_objext
17124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17125 (eval $ac_compile) 2>conftest.er1
17126 ac_status=$?
17127 grep -v '^ *+' conftest.er1 >conftest.err
17128 rm -f conftest.er1
17129 cat conftest.err >&5
17130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17131 (exit $ac_status); } &&
b4e70030
JB
17132 { ac_try='test -z "$ac_c_werror_flag"
17133 || test ! -s conftest.err'
bec39cab
AC
17134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17135 (eval $ac_try) 2>&5
17136 ac_status=$?
17137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17138 (exit $ac_status); }; } &&
17139 { ac_try='test -s conftest.$ac_objext'
17140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17141 (eval $ac_try) 2>&5
17142 ac_status=$?
17143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17144 (exit $ac_status); }; }; then
a3828db0 17145 ac_cv_func_setpgrp_void=no
c906108c 17146else
bec39cab
AC
17147 echo "$as_me: failed program was:" >&5
17148sed 's/^/| /' conftest.$ac_ext >&5
17149
b4e70030 17150ac_cv_func_setpgrp_void=yes
c906108c 17151fi
bec39cab 17152rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 17153fi
b4e70030
JB
17154echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
17155echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0 17156if test $ac_cv_func_setpgrp_void = yes; then
bec39cab 17157 cat >>confdefs.h <<\_ACEOF
a3828db0 17158#define SETPGRP_VOID 1
bec39cab 17159_ACEOF
c3f6f71d 17160
a3828db0 17161fi
c906108c
SS
17162fi
17163
a3828db0
MK
17164# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
17165# since sigsetjmp might only be defined as a macro.
b4e70030
JB
17166echo "$as_me:$LINENO: checking for sigsetjmp" >&5
17167echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
a3828db0 17168if test "${gdb_cv_func_sigsetjmp+set}" = set; then
bec39cab
AC
17169 echo $ECHO_N "(cached) $ECHO_C" >&6
17170else
17171 cat >conftest.$ac_ext <<_ACEOF
17172/* confdefs.h. */
17173_ACEOF
17174cat confdefs.h >>conftest.$ac_ext
17175cat >>conftest.$ac_ext <<_ACEOF
17176/* end confdefs.h. */
a3828db0
MK
17177
17178#include <setjmp.h>
17179
bec39cab
AC
17180int
17181main ()
17182{
a3828db0 17183sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
17184 ;
17185 return 0;
17186}
17187_ACEOF
17188rm -f conftest.$ac_objext
17189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17190 (eval $ac_compile) 2>conftest.er1
17191 ac_status=$?
17192 grep -v '^ *+' conftest.er1 >conftest.err
17193 rm -f conftest.er1
17194 cat conftest.err >&5
17195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17196 (exit $ac_status); } &&
b4e70030
JB
17197 { ac_try='test -z "$ac_c_werror_flag"
17198 || test ! -s conftest.err'
bec39cab
AC
17199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17200 (eval $ac_try) 2>&5
17201 ac_status=$?
17202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17203 (exit $ac_status); }; } &&
17204 { ac_try='test -s conftest.$ac_objext'
17205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17206 (eval $ac_try) 2>&5
17207 ac_status=$?
17208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17209 (exit $ac_status); }; }; then
a3828db0 17210 gdb_cv_func_sigsetjmp=yes
c906108c 17211else
bec39cab
AC
17212 echo "$as_me: failed program was:" >&5
17213sed 's/^/| /' conftest.$ac_ext >&5
17214
b4e70030 17215gdb_cv_func_sigsetjmp=no
c906108c 17216fi
bec39cab 17217rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 17218fi
b4e70030
JB
17219echo "$as_me:$LINENO: result: $gdb_cv_func_sigsetjmp" >&5
17220echo "${ECHO_T}$gdb_cv_func_sigsetjmp" >&6
a3828db0 17221if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 17222
a3828db0
MK
17223cat >>confdefs.h <<\_ACEOF
17224#define HAVE_SIGSETJMP 1
bec39cab 17225_ACEOF
c906108c 17226
97bf5e38 17227fi
c906108c 17228
a3828db0
MK
17229# Assume we'll default to using the included libiberty regex.
17230gdb_use_included_regex=yes
17231
17232# However, if the system regex is GNU regex, then default to *not*
17233# using the included regex.
b4e70030
JB
17234echo "$as_me:$LINENO: checking for GNU regex" >&5
17235echo $ECHO_N "checking for GNU regex... $ECHO_C" >&6
a3828db0 17236if test "${gdb_cv_have_gnu_regex+set}" = set; then
bec39cab
AC
17237 echo $ECHO_N "(cached) $ECHO_C" >&6
17238else
17239 cat >conftest.$ac_ext <<_ACEOF
17240/* confdefs.h. */
17241_ACEOF
17242cat confdefs.h >>conftest.$ac_ext
17243cat >>conftest.$ac_ext <<_ACEOF
17244/* end confdefs.h. */
a3828db0 17245#include <gnu-versions.h>
bec39cab
AC
17246int
17247main ()
17248{
a3828db0
MK
17249#define REGEX_INTERFACE_VERSION 1
17250#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
17251# error "Version mismatch"
17252#endif
bec39cab
AC
17253 ;
17254 return 0;
17255}
17256_ACEOF
17257rm -f conftest.$ac_objext
17258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17259 (eval $ac_compile) 2>conftest.er1
17260 ac_status=$?
17261 grep -v '^ *+' conftest.er1 >conftest.err
17262 rm -f conftest.er1
17263 cat conftest.err >&5
17264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17265 (exit $ac_status); } &&
b4e70030
JB
17266 { ac_try='test -z "$ac_c_werror_flag"
17267 || test ! -s conftest.err'
bec39cab
AC
17268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17269 (eval $ac_try) 2>&5
17270 ac_status=$?
17271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17272 (exit $ac_status); }; } &&
17273 { ac_try='test -s conftest.$ac_objext'
17274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17275 (eval $ac_try) 2>&5
17276 ac_status=$?
17277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17278 (exit $ac_status); }; }; then
a3828db0 17279 gdb_cv_have_gnu_regex=yes
c906108c 17280else
bec39cab
AC
17281 echo "$as_me: failed program was:" >&5
17282sed 's/^/| /' conftest.$ac_ext >&5
17283
b4e70030 17284gdb_cv_have_gnu_regex=no
c906108c 17285fi
bec39cab 17286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 17287fi
b4e70030
JB
17288echo "$as_me:$LINENO: result: $gdb_cv_have_gnu_regex" >&5
17289echo "${ECHO_T}$gdb_cv_have_gnu_regex" >&6
a3828db0
MK
17290if test $gdb_cv_have_gnu_regex = yes; then
17291 gdb_use_included_regex=no
17292fi
c906108c 17293
a3828db0 17294
b4e70030 17295# Check whether --with-included-regex or --without-included-regex was given.
a3828db0 17296if test "${with_included_regex+set}" = set; then
b4e70030
JB
17297 withval="$with_included_regex"
17298 gdb_with_regex=$withval
a3828db0
MK
17299else
17300 gdb_with_regex=$gdb_use_included_regex
b4e70030 17301fi;
a3828db0
MK
17302if test "$gdb_with_regex" = yes; then
17303
17304cat >>confdefs.h <<\_ACEOF
17305#define USE_INCLUDED_REGEX 1
bec39cab 17306_ACEOF
c906108c 17307
97bf5e38 17308fi
c906108c 17309
5c45e068 17310# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
b4e70030
JB
17311echo "$as_me:$LINENO: checking for struct thread.td_pcb" >&5
17312echo $ECHO_N "checking for struct thread.td_pcb... $ECHO_C" >&6
5c45e068 17313if test "${ac_cv_member_struct_thread_td_pcb+set}" = set; then
bec39cab
AC
17314 echo $ECHO_N "(cached) $ECHO_C" >&6
17315else
17316 cat >conftest.$ac_ext <<_ACEOF
17317/* confdefs.h. */
17318_ACEOF
17319cat confdefs.h >>conftest.$ac_ext
17320cat >>conftest.$ac_ext <<_ACEOF
17321/* end confdefs.h. */
a3828db0
MK
17322#include <sys/param.h>
17323#include <sys/proc.h>
5c45e068
MK
17324
17325
bec39cab
AC
17326int
17327main ()
17328{
5c45e068
MK
17329static struct thread ac_aggr;
17330if (ac_aggr.td_pcb)
17331return 0;
bec39cab
AC
17332 ;
17333 return 0;
17334}
17335_ACEOF
17336rm -f conftest.$ac_objext
17337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17338 (eval $ac_compile) 2>conftest.er1
17339 ac_status=$?
17340 grep -v '^ *+' conftest.er1 >conftest.err
17341 rm -f conftest.er1
17342 cat conftest.err >&5
17343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17344 (exit $ac_status); } &&
b4e70030
JB
17345 { ac_try='test -z "$ac_c_werror_flag"
17346 || test ! -s conftest.err'
bec39cab
AC
17347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17348 (eval $ac_try) 2>&5
17349 ac_status=$?
17350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17351 (exit $ac_status); }; } &&
17352 { ac_try='test -s conftest.$ac_objext'
17353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17354 (eval $ac_try) 2>&5
17355 ac_status=$?
17356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17357 (exit $ac_status); }; }; then
5c45e068 17358 ac_cv_member_struct_thread_td_pcb=yes
c906108c 17359else
bec39cab
AC
17360 echo "$as_me: failed program was:" >&5
17361sed 's/^/| /' conftest.$ac_ext >&5
17362
b4e70030 17363cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
17364/* confdefs.h. */
17365_ACEOF
17366cat confdefs.h >>conftest.$ac_ext
17367cat >>conftest.$ac_ext <<_ACEOF
17368/* end confdefs.h. */
17369#include <sys/param.h>
17370#include <sys/proc.h>
17371
17372
17373int
17374main ()
17375{
17376static struct thread ac_aggr;
17377if (sizeof ac_aggr.td_pcb)
17378return 0;
17379 ;
17380 return 0;
17381}
17382_ACEOF
17383rm -f conftest.$ac_objext
17384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17385 (eval $ac_compile) 2>conftest.er1
17386 ac_status=$?
17387 grep -v '^ *+' conftest.er1 >conftest.err
17388 rm -f conftest.er1
17389 cat conftest.err >&5
17390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17391 (exit $ac_status); } &&
b4e70030
JB
17392 { ac_try='test -z "$ac_c_werror_flag"
17393 || test ! -s conftest.err'
5c45e068
MK
17394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17395 (eval $ac_try) 2>&5
17396 ac_status=$?
17397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17398 (exit $ac_status); }; } &&
17399 { ac_try='test -s conftest.$ac_objext'
17400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17401 (eval $ac_try) 2>&5
17402 ac_status=$?
17403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17404 (exit $ac_status); }; }; then
17405 ac_cv_member_struct_thread_td_pcb=yes
17406else
17407 echo "$as_me: failed program was:" >&5
17408sed 's/^/| /' conftest.$ac_ext >&5
17409
b4e70030 17410ac_cv_member_struct_thread_td_pcb=no
5c45e068
MK
17411fi
17412rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 17413fi
bec39cab 17414rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 17415fi
b4e70030
JB
17416echo "$as_me:$LINENO: result: $ac_cv_member_struct_thread_td_pcb" >&5
17417echo "${ECHO_T}$ac_cv_member_struct_thread_td_pcb" >&6
5c45e068 17418if test $ac_cv_member_struct_thread_td_pcb = yes; then
c906108c 17419
5c45e068 17420cat >>confdefs.h <<_ACEOF
a3828db0 17421#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 17422_ACEOF
c906108c 17423
5c45e068 17424
97bf5e38 17425fi
c906108c 17426
5c45e068 17427
a3828db0 17428# See if <sys/lwp.h> defines `struct lwp`.
b4e70030
JB
17429echo "$as_me:$LINENO: checking for struct lwp" >&5
17430echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
a3828db0 17431if test "${gdb_cv_struct_lwp+set}" = set; then
bec39cab
AC
17432 echo $ECHO_N "(cached) $ECHO_C" >&6
17433else
17434 cat >conftest.$ac_ext <<_ACEOF
17435/* confdefs.h. */
17436_ACEOF
17437cat confdefs.h >>conftest.$ac_ext
17438cat >>conftest.$ac_ext <<_ACEOF
17439/* end confdefs.h. */
a3828db0
MK
17440#include <sys/param.h>
17441#include <sys/lwp.h>
bec39cab
AC
17442int
17443main ()
17444{
a3828db0 17445struct lwp l;
bec39cab
AC
17446 ;
17447 return 0;
17448}
17449_ACEOF
17450rm -f conftest.$ac_objext
17451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17452 (eval $ac_compile) 2>conftest.er1
17453 ac_status=$?
17454 grep -v '^ *+' conftest.er1 >conftest.err
17455 rm -f conftest.er1
17456 cat conftest.err >&5
17457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17458 (exit $ac_status); } &&
b4e70030
JB
17459 { ac_try='test -z "$ac_c_werror_flag"
17460 || test ! -s conftest.err'
bec39cab
AC
17461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17462 (eval $ac_try) 2>&5
17463 ac_status=$?
17464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17465 (exit $ac_status); }; } &&
17466 { ac_try='test -s conftest.$ac_objext'
17467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17468 (eval $ac_try) 2>&5
17469 ac_status=$?
17470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17471 (exit $ac_status); }; }; then
a3828db0 17472 gdb_cv_struct_lwp=yes
c906108c 17473else
bec39cab
AC
17474 echo "$as_me: failed program was:" >&5
17475sed 's/^/| /' conftest.$ac_ext >&5
17476
b4e70030 17477gdb_cv_struct_lwp=no
c906108c 17478fi
bec39cab 17479rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 17480fi
b4e70030
JB
17481echo "$as_me:$LINENO: result: $gdb_cv_struct_lwp" >&5
17482echo "${ECHO_T}$gdb_cv_struct_lwp" >&6
a3828db0 17483if test $gdb_cv_struct_lwp = yes; then
c906108c 17484
a3828db0
MK
17485cat >>confdefs.h <<\_ACEOF
17486#define HAVE_STRUCT_LWP 1
bec39cab 17487_ACEOF
c906108c 17488
97bf5e38 17489fi
c906108c 17490
a3828db0 17491# See if <machine/reg.h> degines `struct reg'.
b4e70030
JB
17492echo "$as_me:$LINENO: checking for struct reg in machine/reg.h" >&5
17493echo $ECHO_N "checking for struct reg in machine/reg.h... $ECHO_C" >&6
a3828db0 17494if test "${gdb_cv_struct_reg+set}" = set; then
bec39cab
AC
17495 echo $ECHO_N "(cached) $ECHO_C" >&6
17496else
17497 cat >conftest.$ac_ext <<_ACEOF
17498/* confdefs.h. */
17499_ACEOF
17500cat confdefs.h >>conftest.$ac_ext
17501cat >>conftest.$ac_ext <<_ACEOF
17502/* end confdefs.h. */
a3828db0
MK
17503#include <sys/types.h>
17504#include <machine/reg.h>
bec39cab
AC
17505int
17506main ()
17507{
a3828db0 17508struct reg r;
bec39cab
AC
17509 ;
17510 return 0;
17511}
17512_ACEOF
17513rm -f conftest.$ac_objext
17514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17515 (eval $ac_compile) 2>conftest.er1
17516 ac_status=$?
17517 grep -v '^ *+' conftest.er1 >conftest.err
17518 rm -f conftest.er1
17519 cat conftest.err >&5
17520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17521 (exit $ac_status); } &&
b4e70030
JB
17522 { ac_try='test -z "$ac_c_werror_flag"
17523 || test ! -s conftest.err'
bec39cab
AC
17524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17525 (eval $ac_try) 2>&5
17526 ac_status=$?
17527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17528 (exit $ac_status); }; } &&
17529 { ac_try='test -s conftest.$ac_objext'
17530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17531 (eval $ac_try) 2>&5
17532 ac_status=$?
17533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17534 (exit $ac_status); }; }; then
a3828db0 17535 gdb_cv_struct_reg=yes
27ca5dad 17536else
bec39cab
AC
17537 echo "$as_me: failed program was:" >&5
17538sed 's/^/| /' conftest.$ac_ext >&5
17539
b4e70030 17540gdb_cv_struct_reg=no
27ca5dad 17541fi
bec39cab 17542rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 17543fi
b4e70030
JB
17544echo "$as_me:$LINENO: result: $gdb_cv_struct_reg" >&5
17545echo "${ECHO_T}$gdb_cv_struct_reg" >&6
a3828db0 17546if test $gdb_cv_struct_reg = yes; then
bec39cab
AC
17547
17548cat >>confdefs.h <<\_ACEOF
a3828db0 17549#define HAVE_STRUCT_REG 1
bec39cab 17550_ACEOF
27ca5dad
MC
17551
17552fi
97bf5e38 17553
a3828db0
MK
17554# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
17555# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
b4e70030
JB
17556echo "$as_me:$LINENO: checking for struct reg.r_fs" >&5
17557echo $ECHO_N "checking for struct reg.r_fs... $ECHO_C" >&6
5c45e068 17558if test "${ac_cv_member_struct_reg_r_fs+set}" = set; then
bec39cab 17559 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17560else
bec39cab
AC
17561 cat >conftest.$ac_ext <<_ACEOF
17562/* confdefs.h. */
17563_ACEOF
17564cat confdefs.h >>conftest.$ac_ext
17565cat >>conftest.$ac_ext <<_ACEOF
17566/* end confdefs.h. */
a3828db0 17567#include <machine/reg.h>
5c45e068
MK
17568
17569int
17570main ()
17571{
17572static struct reg ac_aggr;
17573if (ac_aggr.r_fs)
17574return 0;
17575 ;
17576 return 0;
17577}
17578_ACEOF
17579rm -f conftest.$ac_objext
17580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17581 (eval $ac_compile) 2>conftest.er1
17582 ac_status=$?
17583 grep -v '^ *+' conftest.er1 >conftest.err
17584 rm -f conftest.er1
17585 cat conftest.err >&5
17586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17587 (exit $ac_status); } &&
b4e70030
JB
17588 { ac_try='test -z "$ac_c_werror_flag"
17589 || test ! -s conftest.err'
5c45e068
MK
17590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17591 (eval $ac_try) 2>&5
17592 ac_status=$?
17593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17594 (exit $ac_status); }; } &&
17595 { ac_try='test -s conftest.$ac_objext'
17596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17597 (eval $ac_try) 2>&5
17598 ac_status=$?
17599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17600 (exit $ac_status); }; }; then
17601 ac_cv_member_struct_reg_r_fs=yes
17602else
17603 echo "$as_me: failed program was:" >&5
17604sed 's/^/| /' conftest.$ac_ext >&5
17605
b4e70030 17606cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
17607/* confdefs.h. */
17608_ACEOF
17609cat confdefs.h >>conftest.$ac_ext
17610cat >>conftest.$ac_ext <<_ACEOF
17611/* end confdefs.h. */
17612#include <machine/reg.h>
17613
bec39cab
AC
17614int
17615main ()
17616{
5c45e068
MK
17617static struct reg ac_aggr;
17618if (sizeof ac_aggr.r_fs)
17619return 0;
bec39cab
AC
17620 ;
17621 return 0;
17622}
17623_ACEOF
17624rm -f conftest.$ac_objext
17625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17626 (eval $ac_compile) 2>conftest.er1
17627 ac_status=$?
17628 grep -v '^ *+' conftest.er1 >conftest.err
17629 rm -f conftest.er1
17630 cat conftest.err >&5
17631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17632 (exit $ac_status); } &&
b4e70030
JB
17633 { ac_try='test -z "$ac_c_werror_flag"
17634 || test ! -s conftest.err'
bec39cab
AC
17635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17636 (eval $ac_try) 2>&5
17637 ac_status=$?
17638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17639 (exit $ac_status); }; } &&
17640 { ac_try='test -s conftest.$ac_objext'
17641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17642 (eval $ac_try) 2>&5
17643 ac_status=$?
17644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17645 (exit $ac_status); }; }; then
5c45e068 17646 ac_cv_member_struct_reg_r_fs=yes
3862412b 17647else
bec39cab
AC
17648 echo "$as_me: failed program was:" >&5
17649sed 's/^/| /' conftest.$ac_ext >&5
17650
b4e70030 17651ac_cv_member_struct_reg_r_fs=no
3862412b 17652fi
bec39cab 17653rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 17654fi
5c45e068
MK
17655rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17656fi
b4e70030
JB
17657echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_fs" >&5
17658echo "${ECHO_T}$ac_cv_member_struct_reg_r_fs" >&6
5c45e068
MK
17659if test $ac_cv_member_struct_reg_r_fs = yes; then
17660
17661cat >>confdefs.h <<_ACEOF
a3828db0 17662#define HAVE_STRUCT_REG_R_FS 1
bec39cab 17663_ACEOF
3862412b 17664
5c45e068 17665
97bf5e38 17666fi
b4e70030
JB
17667echo "$as_me:$LINENO: checking for struct reg.r_gs" >&5
17668echo $ECHO_N "checking for struct reg.r_gs... $ECHO_C" >&6
5c45e068 17669if test "${ac_cv_member_struct_reg_r_gs+set}" = set; then
bec39cab 17670 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17671else
bec39cab
AC
17672 cat >conftest.$ac_ext <<_ACEOF
17673/* confdefs.h. */
17674_ACEOF
17675cat confdefs.h >>conftest.$ac_ext
17676cat >>conftest.$ac_ext <<_ACEOF
17677/* end confdefs.h. */
a3828db0 17678#include <machine/reg.h>
5c45e068 17679
bec39cab
AC
17680int
17681main ()
17682{
5c45e068
MK
17683static struct reg ac_aggr;
17684if (ac_aggr.r_gs)
17685return 0;
bec39cab
AC
17686 ;
17687 return 0;
17688}
17689_ACEOF
17690rm -f conftest.$ac_objext
17691if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17692 (eval $ac_compile) 2>conftest.er1
17693 ac_status=$?
17694 grep -v '^ *+' conftest.er1 >conftest.err
17695 rm -f conftest.er1
17696 cat conftest.err >&5
17697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17698 (exit $ac_status); } &&
b4e70030
JB
17699 { ac_try='test -z "$ac_c_werror_flag"
17700 || test ! -s conftest.err'
bec39cab
AC
17701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17702 (eval $ac_try) 2>&5
17703 ac_status=$?
17704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17705 (exit $ac_status); }; } &&
17706 { ac_try='test -s conftest.$ac_objext'
17707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17708 (eval $ac_try) 2>&5
17709 ac_status=$?
17710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17711 (exit $ac_status); }; }; then
5c45e068 17712 ac_cv_member_struct_reg_r_gs=yes
3862412b 17713else
bec39cab
AC
17714 echo "$as_me: failed program was:" >&5
17715sed 's/^/| /' conftest.$ac_ext >&5
17716
b4e70030 17717cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
17718/* confdefs.h. */
17719_ACEOF
17720cat confdefs.h >>conftest.$ac_ext
17721cat >>conftest.$ac_ext <<_ACEOF
17722/* end confdefs.h. */
17723#include <machine/reg.h>
17724
17725int
17726main ()
17727{
17728static struct reg ac_aggr;
17729if (sizeof ac_aggr.r_gs)
17730return 0;
17731 ;
17732 return 0;
17733}
17734_ACEOF
17735rm -f conftest.$ac_objext
17736if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17737 (eval $ac_compile) 2>conftest.er1
17738 ac_status=$?
17739 grep -v '^ *+' conftest.er1 >conftest.err
17740 rm -f conftest.er1
17741 cat conftest.err >&5
17742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17743 (exit $ac_status); } &&
b4e70030
JB
17744 { ac_try='test -z "$ac_c_werror_flag"
17745 || test ! -s conftest.err'
5c45e068
MK
17746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17747 (eval $ac_try) 2>&5
17748 ac_status=$?
17749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17750 (exit $ac_status); }; } &&
17751 { ac_try='test -s conftest.$ac_objext'
17752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17753 (eval $ac_try) 2>&5
17754 ac_status=$?
17755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17756 (exit $ac_status); }; }; then
17757 ac_cv_member_struct_reg_r_gs=yes
17758else
17759 echo "$as_me: failed program was:" >&5
17760sed 's/^/| /' conftest.$ac_ext >&5
17761
b4e70030 17762ac_cv_member_struct_reg_r_gs=no
3862412b 17763fi
bec39cab 17764rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 17765fi
5c45e068
MK
17766rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17767fi
b4e70030
JB
17768echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_gs" >&5
17769echo "${ECHO_T}$ac_cv_member_struct_reg_r_gs" >&6
5c45e068
MK
17770if test $ac_cv_member_struct_reg_r_gs = yes; then
17771
17772cat >>confdefs.h <<_ACEOF
a3828db0 17773#define HAVE_STRUCT_REG_R_GS 1
bec39cab 17774_ACEOF
3862412b 17775
5c45e068 17776
97bf5e38 17777fi
3862412b 17778
5c45e068 17779
a3828db0 17780# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
b4e70030
JB
17781echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
17782echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
a3828db0 17783if test "${gdb_cv_have_ptrace_getregs+set}" = set; then
bec39cab 17784 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 17785else
bec39cab
AC
17786 cat >conftest.$ac_ext <<_ACEOF
17787/* confdefs.h. */
17788_ACEOF
17789cat confdefs.h >>conftest.$ac_ext
17790cat >>conftest.$ac_ext <<_ACEOF
17791/* end confdefs.h. */
a3828db0 17792#include <sys/ptrace.h>
bec39cab
AC
17793int
17794main ()
17795{
a3828db0 17796PTRACE_GETREGS;
bec39cab
AC
17797 ;
17798 return 0;
17799}
17800_ACEOF
17801rm -f conftest.$ac_objext
17802if { (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); } &&
b4e70030
JB
17810 { ac_try='test -z "$ac_c_werror_flag"
17811 || test ! -s conftest.err'
bec39cab
AC
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
a3828db0 17823 gdb_cv_have_ptrace_getregs=yes
451928c5 17824else
bec39cab
AC
17825 echo "$as_me: failed program was:" >&5
17826sed 's/^/| /' conftest.$ac_ext >&5
17827
b4e70030 17828gdb_cv_have_ptrace_getregs=no
451928c5 17829fi
bec39cab 17830rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
17831fi
17832
b4e70030
JB
17833echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getregs" >&5
17834echo "${ECHO_T}$gdb_cv_have_ptrace_getregs" >&6
a3828db0 17835if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f
SE
17836
17837cat >>confdefs.h <<\_ACEOF
a3828db0 17838#define HAVE_PTRACE_GETREGS 1
bec39cab 17839_ACEOF
451928c5 17840
97bf5e38 17841fi
451928c5 17842
a3828db0 17843# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
b4e70030
JB
17844echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5
17845echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6
a3828db0 17846if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then
bec39cab 17847 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 17848else
bec39cab
AC
17849 cat >conftest.$ac_ext <<_ACEOF
17850/* confdefs.h. */
17851_ACEOF
17852cat confdefs.h >>conftest.$ac_ext
17853cat >>conftest.$ac_ext <<_ACEOF
17854/* end confdefs.h. */
a3828db0 17855#include <sys/ptrace.h>
bec39cab
AC
17856int
17857main ()
17858{
a3828db0 17859PTRACE_GETFPXREGS;
bec39cab
AC
17860 ;
17861 return 0;
17862}
17863_ACEOF
17864rm -f conftest.$ac_objext
17865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17866 (eval $ac_compile) 2>conftest.er1
17867 ac_status=$?
17868 grep -v '^ *+' conftest.er1 >conftest.err
17869 rm -f conftest.er1
17870 cat conftest.err >&5
17871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17872 (exit $ac_status); } &&
b4e70030
JB
17873 { ac_try='test -z "$ac_c_werror_flag"
17874 || test ! -s conftest.err'
bec39cab
AC
17875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17876 (eval $ac_try) 2>&5
17877 ac_status=$?
17878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17879 (exit $ac_status); }; } &&
17880 { ac_try='test -s conftest.$ac_objext'
17881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17882 (eval $ac_try) 2>&5
17883 ac_status=$?
17884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17885 (exit $ac_status); }; }; then
a3828db0 17886 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 17887else
bec39cab
AC
17888 echo "$as_me: failed program was:" >&5
17889sed 's/^/| /' conftest.$ac_ext >&5
17890
b4e70030 17891gdb_cv_have_ptrace_getfpxregs=no
451928c5 17892fi
bec39cab 17893rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
17894fi
17895
b4e70030
JB
17896echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getfpxregs" >&5
17897echo "${ECHO_T}$gdb_cv_have_ptrace_getfpxregs" >&6
a3828db0 17898if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f
SE
17899
17900cat >>confdefs.h <<\_ACEOF
a3828db0 17901#define HAVE_PTRACE_GETFPXREGS 1
bec39cab 17902_ACEOF
451928c5 17903
97bf5e38 17904fi
451928c5 17905
a3828db0 17906# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
b4e70030
JB
17907echo "$as_me:$LINENO: checking for PT_GETDBREGS" >&5
17908echo $ECHO_N "checking for PT_GETDBREGS... $ECHO_C" >&6
a3828db0 17909if test "${gdb_cv_have_pt_getdbregs+set}" = set; then
bec39cab 17910 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17911else
bec39cab
AC
17912 cat >conftest.$ac_ext <<_ACEOF
17913/* confdefs.h. */
17914_ACEOF
17915cat confdefs.h >>conftest.$ac_ext
17916cat >>conftest.$ac_ext <<_ACEOF
17917/* end confdefs.h. */
a3828db0
MK
17918#include <sys/types.h>
17919#include <sys/ptrace.h>
bec39cab
AC
17920int
17921main ()
17922{
a3828db0 17923PT_GETDBREGS;
bec39cab
AC
17924 ;
17925 return 0;
17926}
17927_ACEOF
17928rm -f conftest.$ac_objext
17929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17930 (eval $ac_compile) 2>conftest.er1
17931 ac_status=$?
17932 grep -v '^ *+' conftest.er1 >conftest.err
17933 rm -f conftest.er1
17934 cat conftest.err >&5
17935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17936 (exit $ac_status); } &&
b4e70030
JB
17937 { ac_try='test -z "$ac_c_werror_flag"
17938 || test ! -s conftest.err'
bec39cab
AC
17939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17940 (eval $ac_try) 2>&5
17941 ac_status=$?
17942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17943 (exit $ac_status); }; } &&
17944 { ac_try='test -s conftest.$ac_objext'
17945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17946 (eval $ac_try) 2>&5
17947 ac_status=$?
17948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17949 (exit $ac_status); }; }; then
a3828db0 17950 gdb_cv_have_pt_getdbregs=yes
3862412b 17951else
bec39cab
AC
17952 echo "$as_me: failed program was:" >&5
17953sed 's/^/| /' conftest.$ac_ext >&5
17954
b4e70030 17955gdb_cv_have_pt_getdbregs=no
3862412b 17956fi
bec39cab 17957rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
17958fi
17959
b4e70030
JB
17960echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getdbregs" >&5
17961echo "${ECHO_T}$gdb_cv_have_pt_getdbregs" >&6
a3828db0 17962if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f
SE
17963
17964cat >>confdefs.h <<\_ACEOF
a3828db0 17965#define HAVE_PT_GETDBREGS 1
bec39cab 17966_ACEOF
3862412b 17967
97bf5e38 17968fi
3862412b 17969
a3828db0 17970# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
b4e70030
JB
17971echo "$as_me:$LINENO: checking for PT_GETXMMREGS" >&5
17972echo $ECHO_N "checking for PT_GETXMMREGS... $ECHO_C" >&6
a3828db0 17973if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then
bec39cab 17974 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17975else
bec39cab
AC
17976 cat >conftest.$ac_ext <<_ACEOF
17977/* confdefs.h. */
17978_ACEOF
17979cat confdefs.h >>conftest.$ac_ext
17980cat >>conftest.$ac_ext <<_ACEOF
17981/* end confdefs.h. */
a3828db0
MK
17982#include <sys/types.h>
17983#include <sys/ptrace.h>
bec39cab
AC
17984int
17985main ()
17986{
a3828db0 17987PT_GETXMMREGS;
bec39cab
AC
17988 ;
17989 return 0;
17990}
17991_ACEOF
17992rm -f conftest.$ac_objext
17993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17994 (eval $ac_compile) 2>conftest.er1
17995 ac_status=$?
17996 grep -v '^ *+' conftest.er1 >conftest.err
17997 rm -f conftest.er1
17998 cat conftest.err >&5
17999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18000 (exit $ac_status); } &&
b4e70030
JB
18001 { ac_try='test -z "$ac_c_werror_flag"
18002 || test ! -s conftest.err'
bec39cab
AC
18003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18004 (eval $ac_try) 2>&5
18005 ac_status=$?
18006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18007 (exit $ac_status); }; } &&
18008 { ac_try='test -s conftest.$ac_objext'
18009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18010 (eval $ac_try) 2>&5
18011 ac_status=$?
18012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18013 (exit $ac_status); }; }; then
a3828db0 18014 gdb_cv_have_pt_getxmmregs=yes
3862412b 18015else
bec39cab
AC
18016 echo "$as_me: failed program was:" >&5
18017sed 's/^/| /' conftest.$ac_ext >&5
18018
b4e70030 18019gdb_cv_have_pt_getxmmregs=no
3862412b 18020fi
bec39cab 18021rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
18022fi
18023
b4e70030
JB
18024echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getxmmregs" >&5
18025echo "${ECHO_T}$gdb_cv_have_pt_getxmmregs" >&6
a3828db0 18026if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f
SE
18027
18028cat >>confdefs.h <<\_ACEOF
a3828db0 18029#define HAVE_PT_GETXMMREGS 1
bec39cab 18030_ACEOF
3862412b 18031
97bf5e38 18032fi
3862412b 18033
97bf5e38
MK
18034# If we are configured native on GNU/Linux, work around problems with
18035# sys/procfs.h
18036# Also detect which type of /proc is in use, such as for Unixware or Solaris.
18037
18038if test "${target}" = "${host}"; then
18039 case "${host}" in
18040 i[3456]86-*-linux*)
60ca704f
SE
18041
18042cat >>confdefs.h <<\_ACEOF
97bf5e38 18043#define START_INFERIOR_TRAPS_EXPECTED 2
bec39cab 18044_ACEOF
97bf5e38 18045
60ca704f
SE
18046
18047cat >>confdefs.h <<\_ACEOF
97bf5e38 18048#define sys_quotactl 1
bec39cab 18049_ACEOF
97bf5e38
MK
18050
18051 ;;
97bf5e38 18052 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f
SE
18053
18054cat >>confdefs.h <<\_ACEOF
97bf5e38 18055#define NEW_PROC_API 1
bec39cab 18056_ACEOF
97bf5e38
MK
18057
18058 ;;
0bbc026e 18059 *-*-solaris2.[6789] | *-*-solaris2.1[0-9])
60ca704f
SE
18060
18061cat >>confdefs.h <<\_ACEOF
97bf5e38 18062#define NEW_PROC_API 1
bec39cab 18063_ACEOF
c960c18f
AC
18064
18065 ;;
18066 mips-sgi-irix5*)
18067 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f
SE
18068
18069cat >>confdefs.h <<\_ACEOF
c960c18f 18070#define _KMEMUSER 1
bec39cab 18071_ACEOF
97bf5e38
MK
18072
18073 ;;
18074 esac
18075fi
18076
18077if test "$ac_cv_header_sys_procfs_h" = yes; then
b4e70030
JB
18078 echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5
18079echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18080 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then
18081 echo $ECHO_N "(cached) $ECHO_C" >&6
18082else
18083 cat >conftest.$ac_ext <<_ACEOF
18084/* confdefs.h. */
18085_ACEOF
18086cat confdefs.h >>conftest.$ac_ext
18087cat >>conftest.$ac_ext <<_ACEOF
18088/* end confdefs.h. */
596c9d4b
KB
18089
18090#define _SYSCALL32
18091#include <sys/procfs.h>
bec39cab
AC
18092int
18093main ()
18094{
97bf5e38 18095pstatus_t avar
bec39cab
AC
18096 ;
18097 return 0;
18098}
18099_ACEOF
18100rm -f conftest.$ac_objext
18101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18102 (eval $ac_compile) 2>conftest.er1
18103 ac_status=$?
18104 grep -v '^ *+' conftest.er1 >conftest.err
18105 rm -f conftest.er1
18106 cat conftest.err >&5
18107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18108 (exit $ac_status); } &&
b4e70030
JB
18109 { ac_try='test -z "$ac_c_werror_flag"
18110 || test ! -s conftest.err'
bec39cab
AC
18111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18112 (eval $ac_try) 2>&5
18113 ac_status=$?
18114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18115 (exit $ac_status); }; } &&
18116 { ac_try='test -s conftest.$ac_objext'
18117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18118 (eval $ac_try) 2>&5
18119 ac_status=$?
18120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18121 (exit $ac_status); }; }; then
97bf5e38 18122 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 18123else
bec39cab
AC
18124 echo "$as_me: failed program was:" >&5
18125sed 's/^/| /' conftest.$ac_ext >&5
18126
b4e70030 18127bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 18128
596c9d4b 18129fi
bec39cab 18130rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
18131fi
18132
97bf5e38 18133 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab
AC
18134
18135cat >>confdefs.h <<\_ACEOF
97bf5e38 18136#define HAVE_PSTATUS_T 1
bec39cab 18137_ACEOF
596c9d4b
KB
18138
18139 fi
b4e70030
JB
18140 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
18141echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6
596c9d4b 18142
b4e70030
JB
18143 echo "$as_me:$LINENO: checking for prrun_t in sys/procfs.h" >&5
18144echo $ECHO_N "checking for prrun_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18145 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then
18146 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 18147else
bec39cab
AC
18148 cat >conftest.$ac_ext <<_ACEOF
18149/* confdefs.h. */
18150_ACEOF
18151cat confdefs.h >>conftest.$ac_ext
18152cat >>conftest.$ac_ext <<_ACEOF
18153/* end confdefs.h. */
596c9d4b
KB
18154
18155#define _SYSCALL32
18156#include <sys/procfs.h>
bec39cab
AC
18157int
18158main ()
18159{
97bf5e38 18160prrun_t avar
bec39cab
AC
18161 ;
18162 return 0;
18163}
18164_ACEOF
18165rm -f conftest.$ac_objext
18166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18167 (eval $ac_compile) 2>conftest.er1
18168 ac_status=$?
18169 grep -v '^ *+' conftest.er1 >conftest.err
18170 rm -f conftest.er1
18171 cat conftest.err >&5
18172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18173 (exit $ac_status); } &&
b4e70030
JB
18174 { ac_try='test -z "$ac_c_werror_flag"
18175 || test ! -s conftest.err'
bec39cab
AC
18176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18177 (eval $ac_try) 2>&5
18178 ac_status=$?
18179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18180 (exit $ac_status); }; } &&
18181 { ac_try='test -s conftest.$ac_objext'
18182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18183 (eval $ac_try) 2>&5
18184 ac_status=$?
18185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18186 (exit $ac_status); }; }; then
97bf5e38 18187 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 18188else
bec39cab
AC
18189 echo "$as_me: failed program was:" >&5
18190sed 's/^/| /' conftest.$ac_ext >&5
18191
b4e70030 18192bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 18193
596c9d4b 18194fi
bec39cab 18195rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
18196fi
18197
97bf5e38 18198 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab
AC
18199
18200cat >>confdefs.h <<\_ACEOF
97bf5e38 18201#define HAVE_PRRUN_T 1
bec39cab 18202_ACEOF
596c9d4b
KB
18203
18204 fi
b4e70030
JB
18205 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
18206echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prrun_t" >&6
596c9d4b 18207
b4e70030
JB
18208 echo "$as_me:$LINENO: checking for gregset_t in sys/procfs.h" >&5
18209echo $ECHO_N "checking for gregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18210 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then
18211 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 18212else
bec39cab
AC
18213 cat >conftest.$ac_ext <<_ACEOF
18214/* confdefs.h. */
18215_ACEOF
18216cat confdefs.h >>conftest.$ac_ext
18217cat >>conftest.$ac_ext <<_ACEOF
18218/* end confdefs.h. */
596c9d4b
KB
18219
18220#define _SYSCALL32
18221#include <sys/procfs.h>
bec39cab
AC
18222int
18223main ()
18224{
97bf5e38 18225gregset_t avar
bec39cab
AC
18226 ;
18227 return 0;
18228}
18229_ACEOF
18230rm -f conftest.$ac_objext
18231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18232 (eval $ac_compile) 2>conftest.er1
18233 ac_status=$?
18234 grep -v '^ *+' conftest.er1 >conftest.err
18235 rm -f conftest.er1
18236 cat conftest.err >&5
18237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18238 (exit $ac_status); } &&
b4e70030
JB
18239 { ac_try='test -z "$ac_c_werror_flag"
18240 || test ! -s conftest.err'
bec39cab
AC
18241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18242 (eval $ac_try) 2>&5
18243 ac_status=$?
18244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18245 (exit $ac_status); }; } &&
18246 { ac_try='test -s conftest.$ac_objext'
18247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18248 (eval $ac_try) 2>&5
18249 ac_status=$?
18250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18251 (exit $ac_status); }; }; then
97bf5e38 18252 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 18253else
bec39cab
AC
18254 echo "$as_me: failed program was:" >&5
18255sed 's/^/| /' conftest.$ac_ext >&5
18256
b4e70030 18257bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 18258
596c9d4b 18259fi
bec39cab 18260rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
18261fi
18262
97bf5e38 18263 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab
AC
18264
18265cat >>confdefs.h <<\_ACEOF
97bf5e38 18266#define HAVE_GREGSET_T 1
bec39cab 18267_ACEOF
596c9d4b
KB
18268
18269 fi
b4e70030
JB
18270 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
18271echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_gregset_t" >&6
451928c5 18272
b4e70030
JB
18273 echo "$as_me:$LINENO: checking for fpregset_t in sys/procfs.h" >&5
18274echo $ECHO_N "checking for fpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18275 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then
18276 echo $ECHO_N "(cached) $ECHO_C" >&6
d84dd0c5 18277else
bec39cab
AC
18278 cat >conftest.$ac_ext <<_ACEOF
18279/* confdefs.h. */
18280_ACEOF
18281cat confdefs.h >>conftest.$ac_ext
18282cat >>conftest.$ac_ext <<_ACEOF
18283/* end confdefs.h. */
97bf5e38
MK
18284
18285#define _SYSCALL32
d84dd0c5 18286#include <sys/procfs.h>
bec39cab
AC
18287int
18288main ()
18289{
97bf5e38 18290fpregset_t avar
bec39cab
AC
18291 ;
18292 return 0;
18293}
18294_ACEOF
18295rm -f conftest.$ac_objext
18296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18297 (eval $ac_compile) 2>conftest.er1
18298 ac_status=$?
18299 grep -v '^ *+' conftest.er1 >conftest.err
18300 rm -f conftest.er1
18301 cat conftest.err >&5
18302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18303 (exit $ac_status); } &&
b4e70030
JB
18304 { ac_try='test -z "$ac_c_werror_flag"
18305 || test ! -s conftest.err'
bec39cab
AC
18306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18307 (eval $ac_try) 2>&5
18308 ac_status=$?
18309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18310 (exit $ac_status); }; } &&
18311 { ac_try='test -s conftest.$ac_objext'
18312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18313 (eval $ac_try) 2>&5
18314 ac_status=$?
18315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18316 (exit $ac_status); }; }; then
97bf5e38 18317 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 18318else
bec39cab
AC
18319 echo "$as_me: failed program was:" >&5
18320sed 's/^/| /' conftest.$ac_ext >&5
18321
b4e70030 18322bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 18323
d84dd0c5 18324fi
bec39cab 18325rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
18326fi
18327
97bf5e38 18328 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab
AC
18329
18330cat >>confdefs.h <<\_ACEOF
97bf5e38 18331#define HAVE_FPREGSET_T 1
bec39cab 18332_ACEOF
d84dd0c5 18333
97bf5e38 18334 fi
b4e70030
JB
18335 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
18336echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_fpregset_t" >&6
d84dd0c5 18337
b4e70030
JB
18338 echo "$as_me:$LINENO: checking for prgregset_t in sys/procfs.h" >&5
18339echo $ECHO_N "checking for prgregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18340 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then
18341 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18342else
bec39cab
AC
18343 cat >conftest.$ac_ext <<_ACEOF
18344/* confdefs.h. */
18345_ACEOF
18346cat confdefs.h >>conftest.$ac_ext
18347cat >>conftest.$ac_ext <<_ACEOF
18348/* end confdefs.h. */
c906108c 18349
97bf5e38
MK
18350#define _SYSCALL32
18351#include <sys/procfs.h>
bec39cab
AC
18352int
18353main ()
18354{
97bf5e38 18355prgregset_t avar
bec39cab
AC
18356 ;
18357 return 0;
18358}
18359_ACEOF
18360rm -f conftest.$ac_objext
18361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18362 (eval $ac_compile) 2>conftest.er1
18363 ac_status=$?
18364 grep -v '^ *+' conftest.er1 >conftest.err
18365 rm -f conftest.er1
18366 cat conftest.err >&5
18367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18368 (exit $ac_status); } &&
b4e70030
JB
18369 { ac_try='test -z "$ac_c_werror_flag"
18370 || test ! -s conftest.err'
bec39cab
AC
18371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18372 (eval $ac_try) 2>&5
18373 ac_status=$?
18374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18375 (exit $ac_status); }; } &&
18376 { ac_try='test -s conftest.$ac_objext'
18377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18378 (eval $ac_try) 2>&5
18379 ac_status=$?
18380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18381 (exit $ac_status); }; }; then
97bf5e38 18382 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 18383else
bec39cab
AC
18384 echo "$as_me: failed program was:" >&5
18385sed 's/^/| /' conftest.$ac_ext >&5
18386
b4e70030 18387bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 18388
c906108c 18389fi
bec39cab 18390rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18391fi
18392
97bf5e38 18393 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab
AC
18394
18395cat >>confdefs.h <<\_ACEOF
97bf5e38 18396#define HAVE_PRGREGSET_T 1
bec39cab 18397_ACEOF
c906108c 18398
97bf5e38 18399 fi
b4e70030
JB
18400 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
18401echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset_t" >&6
c906108c 18402
b4e70030
JB
18403 echo "$as_me:$LINENO: checking for prfpregset_t in sys/procfs.h" >&5
18404echo $ECHO_N "checking for prfpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18405 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then
18406 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 18407else
bec39cab
AC
18408 cat >conftest.$ac_ext <<_ACEOF
18409/* confdefs.h. */
18410_ACEOF
18411cat confdefs.h >>conftest.$ac_ext
18412cat >>conftest.$ac_ext <<_ACEOF
18413/* end confdefs.h. */
97bf5e38
MK
18414
18415#define _SYSCALL32
18416#include <sys/procfs.h>
bec39cab
AC
18417int
18418main ()
18419{
97bf5e38 18420prfpregset_t avar
bec39cab
AC
18421 ;
18422 return 0;
18423}
18424_ACEOF
18425rm -f conftest.$ac_objext
18426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18427 (eval $ac_compile) 2>conftest.er1
18428 ac_status=$?
18429 grep -v '^ *+' conftest.er1 >conftest.err
18430 rm -f conftest.er1
18431 cat conftest.err >&5
18432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18433 (exit $ac_status); } &&
b4e70030
JB
18434 { ac_try='test -z "$ac_c_werror_flag"
18435 || test ! -s conftest.err'
bec39cab
AC
18436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18437 (eval $ac_try) 2>&5
18438 ac_status=$?
18439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18440 (exit $ac_status); }; } &&
18441 { ac_try='test -s conftest.$ac_objext'
18442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18443 (eval $ac_try) 2>&5
18444 ac_status=$?
18445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18446 (exit $ac_status); }; }; then
97bf5e38 18447 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 18448else
bec39cab
AC
18449 echo "$as_me: failed program was:" >&5
18450sed 's/^/| /' conftest.$ac_ext >&5
18451
b4e70030 18452bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 18453
d45fe813 18454fi
bec39cab 18455rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
18456fi
18457
97bf5e38 18458 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab
AC
18459
18460cat >>confdefs.h <<\_ACEOF
97bf5e38 18461#define HAVE_PRFPREGSET_T 1
bec39cab 18462_ACEOF
d45fe813 18463
97bf5e38 18464 fi
b4e70030
JB
18465 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
18466echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6
d45fe813 18467
b4e70030
JB
18468 echo "$as_me:$LINENO: checking for prgregset32_t in sys/procfs.h" >&5
18469echo $ECHO_N "checking for prgregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18470 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then
18471 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 18472else
bec39cab
AC
18473 cat >conftest.$ac_ext <<_ACEOF
18474/* confdefs.h. */
18475_ACEOF
18476cat confdefs.h >>conftest.$ac_ext
18477cat >>conftest.$ac_ext <<_ACEOF
18478/* end confdefs.h. */
97bf5e38
MK
18479
18480#define _SYSCALL32
18481#include <sys/procfs.h>
bec39cab
AC
18482int
18483main ()
18484{
97bf5e38 18485prgregset32_t avar
bec39cab
AC
18486 ;
18487 return 0;
18488}
18489_ACEOF
18490rm -f conftest.$ac_objext
18491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18492 (eval $ac_compile) 2>conftest.er1
18493 ac_status=$?
18494 grep -v '^ *+' conftest.er1 >conftest.err
18495 rm -f conftest.er1
18496 cat conftest.err >&5
18497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18498 (exit $ac_status); } &&
b4e70030
JB
18499 { ac_try='test -z "$ac_c_werror_flag"
18500 || test ! -s conftest.err'
bec39cab
AC
18501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18502 (eval $ac_try) 2>&5
18503 ac_status=$?
18504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18505 (exit $ac_status); }; } &&
18506 { ac_try='test -s conftest.$ac_objext'
18507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18508 (eval $ac_try) 2>&5
18509 ac_status=$?
18510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18511 (exit $ac_status); }; }; then
97bf5e38 18512 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 18513else
bec39cab
AC
18514 echo "$as_me: failed program was:" >&5
18515sed 's/^/| /' conftest.$ac_ext >&5
18516
b4e70030 18517bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 18518
d45fe813 18519fi
bec39cab 18520rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
18521fi
18522
97bf5e38 18523 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab
AC
18524
18525cat >>confdefs.h <<\_ACEOF
97bf5e38 18526#define HAVE_PRGREGSET32_T 1
bec39cab 18527_ACEOF
d45fe813 18528
97bf5e38 18529 fi
b4e70030
JB
18530 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
18531echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6
d45fe813 18532
b4e70030
JB
18533 echo "$as_me:$LINENO: checking for prfpregset32_t in sys/procfs.h" >&5
18534echo $ECHO_N "checking for prfpregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18535 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then
18536 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 18537else
bec39cab
AC
18538 cat >conftest.$ac_ext <<_ACEOF
18539/* confdefs.h. */
18540_ACEOF
18541cat confdefs.h >>conftest.$ac_ext
18542cat >>conftest.$ac_ext <<_ACEOF
18543/* end confdefs.h. */
97bf5e38
MK
18544
18545#define _SYSCALL32
18546#include <sys/procfs.h>
bec39cab
AC
18547int
18548main ()
18549{
97bf5e38 18550prfpregset32_t avar
bec39cab
AC
18551 ;
18552 return 0;
18553}
18554_ACEOF
18555rm -f conftest.$ac_objext
18556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18557 (eval $ac_compile) 2>conftest.er1
18558 ac_status=$?
18559 grep -v '^ *+' conftest.er1 >conftest.err
18560 rm -f conftest.er1
18561 cat conftest.err >&5
18562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18563 (exit $ac_status); } &&
b4e70030
JB
18564 { ac_try='test -z "$ac_c_werror_flag"
18565 || test ! -s conftest.err'
bec39cab
AC
18566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18567 (eval $ac_try) 2>&5
18568 ac_status=$?
18569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18570 (exit $ac_status); }; } &&
18571 { ac_try='test -s conftest.$ac_objext'
18572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18573 (eval $ac_try) 2>&5
18574 ac_status=$?
18575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18576 (exit $ac_status); }; }; then
97bf5e38 18577 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 18578else
bec39cab
AC
18579 echo "$as_me: failed program was:" >&5
18580sed 's/^/| /' conftest.$ac_ext >&5
18581
b4e70030 18582bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 18583
d45fe813 18584fi
bec39cab 18585rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
18586fi
18587
97bf5e38 18588 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab
AC
18589
18590cat >>confdefs.h <<\_ACEOF
97bf5e38 18591#define HAVE_PRFPREGSET32_T 1
bec39cab 18592_ACEOF
d45fe813 18593
97bf5e38 18594 fi
b4e70030
JB
18595 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
18596echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6
d45fe813 18597
b4e70030
JB
18598 echo "$as_me:$LINENO: checking for lwpid_t in sys/procfs.h" >&5
18599echo $ECHO_N "checking for lwpid_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18600 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then
18601 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 18602else
bec39cab
AC
18603 cat >conftest.$ac_ext <<_ACEOF
18604/* confdefs.h. */
18605_ACEOF
18606cat confdefs.h >>conftest.$ac_ext
18607cat >>conftest.$ac_ext <<_ACEOF
18608/* end confdefs.h. */
97bf5e38 18609
d45fe813 18610#define _SYSCALL32
97bf5e38 18611#include <sys/procfs.h>
bec39cab
AC
18612int
18613main ()
18614{
97bf5e38 18615lwpid_t avar
bec39cab
AC
18616 ;
18617 return 0;
18618}
18619_ACEOF
18620rm -f conftest.$ac_objext
18621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18622 (eval $ac_compile) 2>conftest.er1
18623 ac_status=$?
18624 grep -v '^ *+' conftest.er1 >conftest.err
18625 rm -f conftest.er1
18626 cat conftest.err >&5
18627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18628 (exit $ac_status); } &&
b4e70030
JB
18629 { ac_try='test -z "$ac_c_werror_flag"
18630 || test ! -s conftest.err'
bec39cab
AC
18631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18632 (eval $ac_try) 2>&5
18633 ac_status=$?
18634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18635 (exit $ac_status); }; } &&
18636 { ac_try='test -s conftest.$ac_objext'
18637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18638 (eval $ac_try) 2>&5
18639 ac_status=$?
18640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18641 (exit $ac_status); }; }; then
97bf5e38 18642 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 18643else
bec39cab
AC
18644 echo "$as_me: failed program was:" >&5
18645sed 's/^/| /' conftest.$ac_ext >&5
18646
b4e70030 18647bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 18648
d45fe813 18649fi
bec39cab 18650rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
18651fi
18652
97bf5e38 18653 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab
AC
18654
18655cat >>confdefs.h <<\_ACEOF
97bf5e38 18656#define HAVE_LWPID_T 1
bec39cab 18657_ACEOF
d45fe813 18658
97bf5e38 18659 fi
b4e70030
JB
18660 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
18661echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpid_t" >&6
c906108c 18662
b4e70030
JB
18663 echo "$as_me:$LINENO: checking for psaddr_t in sys/procfs.h" >&5
18664echo $ECHO_N "checking for psaddr_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18665 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then
18666 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18667else
bec39cab
AC
18668 cat >conftest.$ac_ext <<_ACEOF
18669/* confdefs.h. */
18670_ACEOF
18671cat confdefs.h >>conftest.$ac_ext
18672cat >>conftest.$ac_ext <<_ACEOF
18673/* end confdefs.h. */
c906108c 18674
97bf5e38
MK
18675#define _SYSCALL32
18676#include <sys/procfs.h>
bec39cab
AC
18677int
18678main ()
18679{
97bf5e38 18680psaddr_t avar
bec39cab
AC
18681 ;
18682 return 0;
18683}
18684_ACEOF
18685rm -f conftest.$ac_objext
18686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18687 (eval $ac_compile) 2>conftest.er1
18688 ac_status=$?
18689 grep -v '^ *+' conftest.er1 >conftest.err
18690 rm -f conftest.er1
18691 cat conftest.err >&5
18692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18693 (exit $ac_status); } &&
b4e70030
JB
18694 { ac_try='test -z "$ac_c_werror_flag"
18695 || test ! -s conftest.err'
bec39cab
AC
18696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18697 (eval $ac_try) 2>&5
18698 ac_status=$?
18699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18700 (exit $ac_status); }; } &&
18701 { ac_try='test -s conftest.$ac_objext'
18702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18703 (eval $ac_try) 2>&5
18704 ac_status=$?
18705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18706 (exit $ac_status); }; }; then
97bf5e38 18707 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 18708else
bec39cab
AC
18709 echo "$as_me: failed program was:" >&5
18710sed 's/^/| /' conftest.$ac_ext >&5
18711
b4e70030 18712bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 18713
c906108c 18714fi
bec39cab 18715rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18716fi
18717
97bf5e38 18718 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab
AC
18719
18720cat >>confdefs.h <<\_ACEOF
97bf5e38 18721#define HAVE_PSADDR_T 1
bec39cab 18722_ACEOF
c906108c 18723
97bf5e38 18724 fi
b4e70030
JB
18725 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
18726echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psaddr_t" >&6
c906108c 18727
b4e70030
JB
18728 echo "$as_me:$LINENO: checking for prsysent_t in sys/procfs.h" >&5
18729echo $ECHO_N "checking for prsysent_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18730 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then
18731 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18732else
bec39cab
AC
18733 cat >conftest.$ac_ext <<_ACEOF
18734/* confdefs.h. */
18735_ACEOF
18736cat confdefs.h >>conftest.$ac_ext
18737cat >>conftest.$ac_ext <<_ACEOF
18738/* end confdefs.h. */
c906108c 18739
97bf5e38
MK
18740#define _SYSCALL32
18741#include <sys/procfs.h>
bec39cab
AC
18742int
18743main ()
18744{
97bf5e38 18745prsysent_t avar
bec39cab
AC
18746 ;
18747 return 0;
18748}
18749_ACEOF
18750rm -f conftest.$ac_objext
18751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18752 (eval $ac_compile) 2>conftest.er1
18753 ac_status=$?
18754 grep -v '^ *+' conftest.er1 >conftest.err
18755 rm -f conftest.er1
18756 cat conftest.err >&5
18757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18758 (exit $ac_status); } &&
b4e70030
JB
18759 { ac_try='test -z "$ac_c_werror_flag"
18760 || test ! -s conftest.err'
bec39cab
AC
18761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18762 (eval $ac_try) 2>&5
18763 ac_status=$?
18764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18765 (exit $ac_status); }; } &&
18766 { ac_try='test -s conftest.$ac_objext'
18767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18768 (eval $ac_try) 2>&5
18769 ac_status=$?
18770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18771 (exit $ac_status); }; }; then
97bf5e38 18772 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 18773else
bec39cab
AC
18774 echo "$as_me: failed program was:" >&5
18775sed 's/^/| /' conftest.$ac_ext >&5
18776
b4e70030 18777bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 18778
c906108c 18779fi
bec39cab 18780rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18781fi
18782
97bf5e38 18783 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab
AC
18784
18785cat >>confdefs.h <<\_ACEOF
97bf5e38 18786#define HAVE_PRSYSENT_T 1
bec39cab 18787_ACEOF
c906108c 18788
97bf5e38 18789 fi
b4e70030
JB
18790 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
18791echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prsysent_t" >&6
c906108c 18792
b4e70030
JB
18793 echo "$as_me:$LINENO: checking for pr_sigset_t in sys/procfs.h" >&5
18794echo $ECHO_N "checking for pr_sigset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18795 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then
18796 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18797else
bec39cab
AC
18798 cat >conftest.$ac_ext <<_ACEOF
18799/* confdefs.h. */
18800_ACEOF
18801cat confdefs.h >>conftest.$ac_ext
18802cat >>conftest.$ac_ext <<_ACEOF
18803/* end confdefs.h. */
c906108c 18804
97bf5e38
MK
18805#define _SYSCALL32
18806#include <sys/procfs.h>
bec39cab
AC
18807int
18808main ()
18809{
97bf5e38 18810pr_sigset_t avar
bec39cab
AC
18811 ;
18812 return 0;
18813}
18814_ACEOF
18815rm -f conftest.$ac_objext
18816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18817 (eval $ac_compile) 2>conftest.er1
18818 ac_status=$?
18819 grep -v '^ *+' conftest.er1 >conftest.err
18820 rm -f conftest.er1
18821 cat conftest.err >&5
18822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18823 (exit $ac_status); } &&
b4e70030
JB
18824 { ac_try='test -z "$ac_c_werror_flag"
18825 || test ! -s conftest.err'
bec39cab
AC
18826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18827 (eval $ac_try) 2>&5
18828 ac_status=$?
18829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18830 (exit $ac_status); }; } &&
18831 { ac_try='test -s conftest.$ac_objext'
18832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18833 (eval $ac_try) 2>&5
18834 ac_status=$?
18835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18836 (exit $ac_status); }; }; then
97bf5e38 18837 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 18838else
bec39cab
AC
18839 echo "$as_me: failed program was:" >&5
18840sed 's/^/| /' conftest.$ac_ext >&5
18841
b4e70030 18842bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 18843
c906108c 18844fi
bec39cab 18845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18846fi
18847
97bf5e38 18848 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab
AC
18849
18850cat >>confdefs.h <<\_ACEOF
97bf5e38 18851#define HAVE_PR_SIGSET_T 1
bec39cab 18852_ACEOF
c906108c 18853
97bf5e38 18854 fi
b4e70030
JB
18855 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
18856echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6
c906108c 18857
b4e70030
JB
18858 echo "$as_me:$LINENO: checking for pr_sigaction64_t in sys/procfs.h" >&5
18859echo $ECHO_N "checking for pr_sigaction64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18860 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then
18861 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18862else
bec39cab
AC
18863 cat >conftest.$ac_ext <<_ACEOF
18864/* confdefs.h. */
18865_ACEOF
18866cat confdefs.h >>conftest.$ac_ext
18867cat >>conftest.$ac_ext <<_ACEOF
18868/* end confdefs.h. */
c906108c 18869
97bf5e38
MK
18870#define _SYSCALL32
18871#include <sys/procfs.h>
bec39cab
AC
18872int
18873main ()
18874{
97bf5e38 18875pr_sigaction64_t avar
bec39cab
AC
18876 ;
18877 return 0;
18878}
18879_ACEOF
18880rm -f conftest.$ac_objext
18881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18882 (eval $ac_compile) 2>conftest.er1
18883 ac_status=$?
18884 grep -v '^ *+' conftest.er1 >conftest.err
18885 rm -f conftest.er1
18886 cat conftest.err >&5
18887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18888 (exit $ac_status); } &&
b4e70030
JB
18889 { ac_try='test -z "$ac_c_werror_flag"
18890 || test ! -s conftest.err'
bec39cab
AC
18891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18892 (eval $ac_try) 2>&5
18893 ac_status=$?
18894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18895 (exit $ac_status); }; } &&
18896 { ac_try='test -s conftest.$ac_objext'
18897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18898 (eval $ac_try) 2>&5
18899 ac_status=$?
18900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18901 (exit $ac_status); }; }; then
97bf5e38 18902 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 18903else
bec39cab
AC
18904 echo "$as_me: failed program was:" >&5
18905sed 's/^/| /' conftest.$ac_ext >&5
18906
b4e70030 18907bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 18908
c906108c 18909fi
bec39cab 18910rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18911fi
18912
97bf5e38 18913 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab
AC
18914
18915cat >>confdefs.h <<\_ACEOF
97bf5e38 18916#define HAVE_PR_SIGACTION64_T 1
bec39cab 18917_ACEOF
c906108c 18918
97bf5e38 18919 fi
b4e70030
JB
18920 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
18921echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6
97bf5e38 18922
b4e70030
JB
18923 echo "$as_me:$LINENO: checking for pr_siginfo64_t in sys/procfs.h" >&5
18924echo $ECHO_N "checking for pr_siginfo64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18925 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then
18926 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18927else
bec39cab
AC
18928 cat >conftest.$ac_ext <<_ACEOF
18929/* confdefs.h. */
18930_ACEOF
18931cat confdefs.h >>conftest.$ac_ext
18932cat >>conftest.$ac_ext <<_ACEOF
18933/* end confdefs.h. */
97bf5e38
MK
18934
18935#define _SYSCALL32
18936#include <sys/procfs.h>
bec39cab
AC
18937int
18938main ()
18939{
97bf5e38 18940pr_siginfo64_t avar
bec39cab
AC
18941 ;
18942 return 0;
18943}
18944_ACEOF
18945rm -f conftest.$ac_objext
18946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18947 (eval $ac_compile) 2>conftest.er1
18948 ac_status=$?
18949 grep -v '^ *+' conftest.er1 >conftest.err
18950 rm -f conftest.er1
18951 cat conftest.err >&5
18952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18953 (exit $ac_status); } &&
b4e70030
JB
18954 { ac_try='test -z "$ac_c_werror_flag"
18955 || test ! -s conftest.err'
bec39cab
AC
18956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18957 (eval $ac_try) 2>&5
18958 ac_status=$?
18959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18960 (exit $ac_status); }; } &&
18961 { ac_try='test -s conftest.$ac_objext'
18962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18963 (eval $ac_try) 2>&5
18964 ac_status=$?
18965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18966 (exit $ac_status); }; }; then
97bf5e38
MK
18967 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
18968else
bec39cab
AC
18969 echo "$as_me: failed program was:" >&5
18970sed 's/^/| /' conftest.$ac_ext >&5
18971
b4e70030 18972bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 18973
97bf5e38 18974fi
bec39cab 18975rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18976fi
c906108c 18977
97bf5e38 18978 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab
AC
18979
18980cat >>confdefs.h <<\_ACEOF
97bf5e38 18981#define HAVE_PR_SIGINFO64_T 1
bec39cab 18982_ACEOF
c906108c 18983
97bf5e38 18984 fi
b4e70030
JB
18985 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
18986echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6
bec39cab
AC
18987
18988
97bf5e38
MK
18989
18990
18991
97bf5e38 18992 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
b4e70030
JB
18993 echo "$as_me:$LINENO: checking whether prfpregset_t type is broken" >&5
18994echo $ECHO_N "checking whether prfpregset_t type is broken... $ECHO_C" >&6
bec39cab
AC
18995 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then
18996 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
18997else
18998 if test "$cross_compiling" = yes; then
97bf5e38 18999 gdb_cv_prfpregset_t_broken=yes
c906108c 19000else
bec39cab
AC
19001 cat >conftest.$ac_ext <<_ACEOF
19002/* confdefs.h. */
19003_ACEOF
19004cat confdefs.h >>conftest.$ac_ext
19005cat >>conftest.$ac_ext <<_ACEOF
19006/* end confdefs.h. */
97bf5e38
MK
19007#include <sys/procfs.h>
19008 int main ()
19009 {
19010 if (sizeof (prfpregset_t) == sizeof (void *))
19011 return 1;
19012 return 0;
19013 }
bec39cab
AC
19014_ACEOF
19015rm -f conftest$ac_exeext
19016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19017 (eval $ac_link) 2>&5
19018 ac_status=$?
19019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19022 (eval $ac_try) 2>&5
19023 ac_status=$?
19024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19025 (exit $ac_status); }; }; then
97bf5e38 19026 gdb_cv_prfpregset_t_broken=no
c906108c 19027else
bec39cab
AC
19028 echo "$as_me: program exited with status $ac_status" >&5
19029echo "$as_me: failed program was:" >&5
19030sed 's/^/| /' conftest.$ac_ext >&5
19031
19032( exit $ac_status )
19033gdb_cv_prfpregset_t_broken=yes
c906108c 19034fi
b4e70030 19035rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 19036fi
c906108c
SS
19037fi
19038
b4e70030
JB
19039 echo "$as_me:$LINENO: result: $gdb_cv_prfpregset_t_broken" >&5
19040echo "${ECHO_T}$gdb_cv_prfpregset_t_broken" >&6
97bf5e38 19041 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f
SE
19042
19043cat >>confdefs.h <<\_ACEOF
97bf5e38 19044#define PRFPREGSET_T_BROKEN 1
bec39cab 19045_ACEOF
c906108c 19046
97bf5e38
MK
19047 fi
19048 fi
c906108c 19049
bec39cab 19050
b4e70030
JB
19051 echo "$as_me:$LINENO: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
19052echo $ECHO_N "checking for PIOCSET ioctl entry in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
19053 if test "${gdb_cv_have_procfs_piocset+set}" = set; then
19054 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19055else
bec39cab
AC
19056 cat >conftest.$ac_ext <<_ACEOF
19057/* confdefs.h. */
19058_ACEOF
19059cat confdefs.h >>conftest.$ac_ext
19060cat >>conftest.$ac_ext <<_ACEOF
19061/* end confdefs.h. */
97bf5e38
MK
19062#include <unistd.h>
19063#include <sys/types.h>
19064#include <sys/procfs.h>
19065
bec39cab
AC
19066int
19067main ()
19068{
97bf5e38
MK
19069
19070 int dummy;;
19071 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
19072
19073 ;
19074 return 0;
19075}
19076_ACEOF
19077rm -f conftest.$ac_objext
19078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19079 (eval $ac_compile) 2>conftest.er1
19080 ac_status=$?
19081 grep -v '^ *+' conftest.er1 >conftest.err
19082 rm -f conftest.er1
19083 cat conftest.err >&5
19084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19085 (exit $ac_status); } &&
b4e70030
JB
19086 { ac_try='test -z "$ac_c_werror_flag"
19087 || test ! -s conftest.err'
bec39cab
AC
19088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19089 (eval $ac_try) 2>&5
19090 ac_status=$?
19091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19092 (exit $ac_status); }; } &&
19093 { ac_try='test -s conftest.$ac_objext'
19094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19095 (eval $ac_try) 2>&5
19096 ac_status=$?
19097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19098 (exit $ac_status); }; }; then
97bf5e38 19099 gdb_cv_have_procfs_piocset=yes
c906108c 19100else
bec39cab
AC
19101 echo "$as_me: failed program was:" >&5
19102sed 's/^/| /' conftest.$ac_ext >&5
19103
b4e70030 19104gdb_cv_have_procfs_piocset=no
c906108c 19105fi
bec39cab 19106rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 19107fi
97bf5e38 19108
b4e70030
JB
19109 echo "$as_me:$LINENO: result: $gdb_cv_have_procfs_piocset" >&5
19110echo "${ECHO_T}$gdb_cv_have_procfs_piocset" >&6
97bf5e38 19111 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f
SE
19112
19113cat >>confdefs.h <<\_ACEOF
97bf5e38 19114#define HAVE_PROCFS_PIOCSET 1
bec39cab 19115_ACEOF
97bf5e38
MK
19116
19117 fi
c906108c 19118fi
c906108c 19119
97bf5e38 19120if test ${host} = ${target} ; then
bec39cab 19121
b4e70030
JB
19122 echo "$as_me:$LINENO: checking for member l_addr in struct link_map" >&5
19123echo $ECHO_N "checking for member l_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
19124 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then
19125 echo $ECHO_N "(cached) $ECHO_C" >&6
19126else
19127 cat >conftest.$ac_ext <<_ACEOF
19128/* confdefs.h. */
19129_ACEOF
19130cat confdefs.h >>conftest.$ac_ext
19131cat >>conftest.$ac_ext <<_ACEOF
19132/* end confdefs.h. */
97bf5e38 19133#include <link.h>
bec39cab
AC
19134int
19135main ()
19136{
97bf5e38 19137struct link_map lm; (void) lm.l_addr;
bec39cab
AC
19138 ;
19139 return 0;
19140}
19141_ACEOF
19142rm -f conftest.$ac_objext
19143if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19144 (eval $ac_compile) 2>conftest.er1
19145 ac_status=$?
19146 grep -v '^ *+' conftest.er1 >conftest.err
19147 rm -f conftest.er1
19148 cat conftest.err >&5
19149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19150 (exit $ac_status); } &&
b4e70030
JB
19151 { ac_try='test -z "$ac_c_werror_flag"
19152 || test ! -s conftest.err'
bec39cab
AC
19153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19154 (eval $ac_try) 2>&5
19155 ac_status=$?
19156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19157 (exit $ac_status); }; } &&
19158 { ac_try='test -s conftest.$ac_objext'
19159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19160 (eval $ac_try) 2>&5
19161 ac_status=$?
19162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19163 (exit $ac_status); }; }; then
97bf5e38 19164 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 19165else
bec39cab
AC
19166 echo "$as_me: failed program was:" >&5
19167sed 's/^/| /' conftest.$ac_ext >&5
19168
b4e70030 19169gdb_cv_have_struct_link_map_with_l_members=no
c906108c 19170fi
bec39cab 19171rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
19172fi
19173
b4e70030
JB
19174 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
19175echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_l_members" >&6
97bf5e38 19176 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f
SE
19177
19178cat >>confdefs.h <<\_ACEOF
97bf5e38 19179#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
bec39cab 19180_ACEOF
97bf5e38
MK
19181
19182 fi
19183
bec39cab 19184
b4e70030
JB
19185 echo "$as_me:$LINENO: checking for member lm_addr in struct link_map" >&5
19186echo $ECHO_N "checking for member lm_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
19187 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then
19188 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19189else
bec39cab
AC
19190 cat >conftest.$ac_ext <<_ACEOF
19191/* confdefs.h. */
19192_ACEOF
19193cat confdefs.h >>conftest.$ac_ext
19194cat >>conftest.$ac_ext <<_ACEOF
19195/* end confdefs.h. */
97bf5e38
MK
19196#include <sys/types.h>
19197#include <link.h>
bec39cab
AC
19198int
19199main ()
19200{
97bf5e38 19201struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
19202 ;
19203 return 0;
19204}
19205_ACEOF
19206rm -f conftest.$ac_objext
19207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19208 (eval $ac_compile) 2>conftest.er1
19209 ac_status=$?
19210 grep -v '^ *+' conftest.er1 >conftest.err
19211 rm -f conftest.er1
19212 cat conftest.err >&5
19213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19214 (exit $ac_status); } &&
b4e70030
JB
19215 { ac_try='test -z "$ac_c_werror_flag"
19216 || test ! -s conftest.err'
bec39cab
AC
19217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19218 (eval $ac_try) 2>&5
19219 ac_status=$?
19220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19221 (exit $ac_status); }; } &&
19222 { ac_try='test -s conftest.$ac_objext'
19223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19224 (eval $ac_try) 2>&5
19225 ac_status=$?
19226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19227 (exit $ac_status); }; }; then
97bf5e38
MK
19228 gdb_cv_have_struct_link_map_with_lm_members=yes
19229else
bec39cab
AC
19230 echo "$as_me: failed program was:" >&5
19231sed 's/^/| /' conftest.$ac_ext >&5
19232
b4e70030 19233gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 19234fi
bec39cab 19235rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 19236fi
c906108c 19237
b4e70030
JB
19238 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
19239echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_lm_members" >&6
97bf5e38 19240 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f
SE
19241
19242cat >>confdefs.h <<\_ACEOF
97bf5e38 19243#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
bec39cab 19244_ACEOF
97bf5e38
MK
19245
19246 fi
19247
bec39cab 19248
b4e70030
JB
19249 echo "$as_me:$LINENO: checking for member som_addr in struct so_map" >&5
19250echo $ECHO_N "checking for member som_addr in struct so_map... $ECHO_C" >&6
bec39cab
AC
19251 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then
19252 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19253else
bec39cab
AC
19254 cat >conftest.$ac_ext <<_ACEOF
19255/* confdefs.h. */
19256_ACEOF
19257cat confdefs.h >>conftest.$ac_ext
19258cat >>conftest.$ac_ext <<_ACEOF
19259/* end confdefs.h. */
97bf5e38
MK
19260#include <sys/types.h>
19261#ifdef HAVE_NLIST_H
19262#include <nlist.h>
19263#endif
19264#include <link.h>
bec39cab
AC
19265int
19266main ()
19267{
97bf5e38 19268struct so_map lm; (void) lm.som_addr;
bec39cab
AC
19269 ;
19270 return 0;
19271}
19272_ACEOF
19273rm -f conftest.$ac_objext
19274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19275 (eval $ac_compile) 2>conftest.er1
19276 ac_status=$?
19277 grep -v '^ *+' conftest.er1 >conftest.err
19278 rm -f conftest.er1
19279 cat conftest.err >&5
19280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19281 (exit $ac_status); } &&
b4e70030
JB
19282 { ac_try='test -z "$ac_c_werror_flag"
19283 || test ! -s conftest.err'
bec39cab
AC
19284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19285 (eval $ac_try) 2>&5
19286 ac_status=$?
19287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19288 (exit $ac_status); }; } &&
19289 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
97bf5e38
MK
19295 gdb_cv_have_struct_so_map_with_som_members=yes
19296else
bec39cab
AC
19297 echo "$as_me: failed program was:" >&5
19298sed 's/^/| /' conftest.$ac_ext >&5
19299
b4e70030 19300gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 19301fi
bec39cab 19302rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 19303fi
c906108c 19304
b4e70030
JB
19305 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
19306echo "${ECHO_T}$gdb_cv_have_struct_so_map_with_som_members" >&6
97bf5e38 19307 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f
SE
19308
19309cat >>confdefs.h <<\_ACEOF
97bf5e38 19310#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
bec39cab 19311_ACEOF
c906108c 19312
97bf5e38 19313 fi
c906108c 19314
bec39cab 19315
b4e70030
JB
19316 echo "$as_me:$LINENO: checking for struct link_map32 in sys/link.h" >&5
19317echo $ECHO_N "checking for struct link_map32 in sys/link.h... $ECHO_C" >&6
bec39cab
AC
19318 if test "${gdb_cv_have_struct_link_map32+set}" = set; then
19319 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 19320else
bec39cab
AC
19321 cat >conftest.$ac_ext <<_ACEOF
19322/* confdefs.h. */
19323_ACEOF
19324cat confdefs.h >>conftest.$ac_ext
19325cat >>conftest.$ac_ext <<_ACEOF
19326/* end confdefs.h. */
97bf5e38
MK
19327#define _SYSCALL32
19328#include <sys/link.h>
bec39cab
AC
19329int
19330main ()
19331{
97bf5e38 19332struct link_map32 l;
bec39cab
AC
19333 ;
19334 return 0;
19335}
19336_ACEOF
19337rm -f conftest.$ac_objext
19338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19339 (eval $ac_compile) 2>conftest.er1
19340 ac_status=$?
19341 grep -v '^ *+' conftest.er1 >conftest.err
19342 rm -f conftest.er1
19343 cat conftest.err >&5
19344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19345 (exit $ac_status); } &&
b4e70030
JB
19346 { ac_try='test -z "$ac_c_werror_flag"
19347 || test ! -s conftest.err'
bec39cab
AC
19348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19349 (eval $ac_try) 2>&5
19350 ac_status=$?
19351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19352 (exit $ac_status); }; } &&
19353 { ac_try='test -s conftest.$ac_objext'
19354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19355 (eval $ac_try) 2>&5
19356 ac_status=$?
19357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19358 (exit $ac_status); }; }; then
97bf5e38
MK
19359 gdb_cv_have_struct_link_map32=yes
19360else
bec39cab
AC
19361 echo "$as_me: failed program was:" >&5
19362sed 's/^/| /' conftest.$ac_ext >&5
19363
b4e70030 19364gdb_cv_have_struct_link_map32=no
97bf5e38 19365fi
bec39cab 19366rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 19367fi
c906108c 19368
b4e70030
JB
19369 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map32" >&5
19370echo "${ECHO_T}$gdb_cv_have_struct_link_map32" >&6
97bf5e38 19371 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f
SE
19372
19373cat >>confdefs.h <<\_ACEOF
97bf5e38 19374#define HAVE_STRUCT_LINK_MAP32 1
bec39cab 19375_ACEOF
c906108c 19376
60ca704f
SE
19377
19378cat >>confdefs.h <<\_ACEOF
97bf5e38 19379#define _SYSCALL32 1
bec39cab 19380_ACEOF
c906108c 19381
97bf5e38
MK
19382 fi
19383fi
c906108c 19384
bc8bcb4b 19385# Check if the compiler supports the `long long' type.
c906108c 19386
b4e70030
JB
19387echo "$as_me:$LINENO: checking for long long support in compiler" >&5
19388echo $ECHO_N "checking for long long support in compiler... $ECHO_C" >&6
bec39cab
AC
19389if test "${gdb_cv_c_long_long+set}" = set; then
19390 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 19391else
bec39cab
AC
19392 cat >conftest.$ac_ext <<_ACEOF
19393/* confdefs.h. */
19394_ACEOF
19395cat confdefs.h >>conftest.$ac_ext
19396cat >>conftest.$ac_ext <<_ACEOF
19397/* end confdefs.h. */
bc8bcb4b 19398extern long long foo;
bec39cab
AC
19399int
19400main ()
19401{
bc8bcb4b 19402switch (foo & 2) { case 0: return 1; }
bec39cab
AC
19403 ;
19404 return 0;
19405}
19406_ACEOF
19407rm -f conftest.$ac_objext
19408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19409 (eval $ac_compile) 2>conftest.er1
19410 ac_status=$?
19411 grep -v '^ *+' conftest.er1 >conftest.err
19412 rm -f conftest.er1
19413 cat conftest.err >&5
19414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19415 (exit $ac_status); } &&
b4e70030
JB
19416 { ac_try='test -z "$ac_c_werror_flag"
19417 || test ! -s conftest.err'
bec39cab
AC
19418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19419 (eval $ac_try) 2>&5
19420 ac_status=$?
19421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19422 (exit $ac_status); }; } &&
19423 { ac_try='test -s conftest.$ac_objext'
19424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19425 (eval $ac_try) 2>&5
19426 ac_status=$?
19427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19428 (exit $ac_status); }; }; then
97bf5e38
MK
19429 gdb_cv_c_long_long=yes
19430else
bec39cab
AC
19431 echo "$as_me: failed program was:" >&5
19432sed 's/^/| /' conftest.$ac_ext >&5
19433
b4e70030 19434gdb_cv_c_long_long=no
97bf5e38 19435fi
bec39cab 19436rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 19437fi
b4e70030
JB
19438echo "$as_me:$LINENO: result: $gdb_cv_c_long_long" >&5
19439echo "${ECHO_T}$gdb_cv_c_long_long" >&6
97bf5e38 19440if test $gdb_cv_c_long_long = yes; then
bc8bcb4b
MK
19441
19442cat >>confdefs.h <<\_ACEOF
97bf5e38 19443#define CC_HAS_LONG_LONG 1
bec39cab 19444_ACEOF
97bf5e38
MK
19445
19446fi
19447
bc8bcb4b 19448# Check if the compiler and runtime support printing long longs.
97bf5e38 19449
b4e70030
JB
19450echo "$as_me:$LINENO: checking for long long support in printf" >&5
19451echo $ECHO_N "checking for long long support in printf... $ECHO_C" >&6
bec39cab
AC
19452if test "${gdb_cv_printf_has_long_long+set}" = set; then
19453 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
19454else
19455 if test "$cross_compiling" = yes; then
19456 gdb_cv_printf_has_long_long=no
19457else
bec39cab
AC
19458 cat >conftest.$ac_ext <<_ACEOF
19459/* confdefs.h. */
19460_ACEOF
19461cat confdefs.h >>conftest.$ac_ext
19462cat >>conftest.$ac_ext <<_ACEOF
19463/* end confdefs.h. */
bc8bcb4b
MK
19464$ac_includes_default
19465int
19466main ()
19467{
19468char buf[32];
97bf5e38
MK
19469 long long l = 0;
19470 l = (l << 16) + 0x0123;
19471 l = (l << 16) + 0x4567;
19472 l = (l << 16) + 0x89ab;
19473 l = (l << 16) + 0xcdef;
19474 sprintf (buf, "0x%016llx", l);
19475 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
19476 ;
19477 return 0;
c906108c 19478}
bec39cab
AC
19479_ACEOF
19480rm -f conftest$ac_exeext
19481if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19482 (eval $ac_link) 2>&5
19483 ac_status=$?
19484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19485 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19487 (eval $ac_try) 2>&5
19488 ac_status=$?
19489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19490 (exit $ac_status); }; }; then
97bf5e38
MK
19491 gdb_cv_printf_has_long_long=yes
19492else
bec39cab
AC
19493 echo "$as_me: program exited with status $ac_status" >&5
19494echo "$as_me: failed program was:" >&5
19495sed 's/^/| /' conftest.$ac_ext >&5
19496
19497( exit $ac_status )
19498gdb_cv_printf_has_long_long=no
97bf5e38 19499fi
b4e70030 19500rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 19501fi
97bf5e38 19502fi
b4e70030
JB
19503echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_long" >&5
19504echo "${ECHO_T}$gdb_cv_printf_has_long_long" >&6
97bf5e38 19505if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b
MK
19506
19507cat >>confdefs.h <<\_ACEOF
97bf5e38 19508#define PRINTF_HAS_LONG_LONG 1
bec39cab 19509_ACEOF
97bf5e38
MK
19510
19511fi
97bf5e38 19512
bc8bcb4b
MK
19513# Check if the compiler supports the `long double' type. We can't use
19514# AC_C_LONG_DOUBLE because that one does additional checks on the
19515# constants defined in <float.h> that fail on some systems,
19516# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 19517
b4e70030
JB
19518echo "$as_me:$LINENO: checking for long double support in compiler" >&5
19519echo $ECHO_N "checking for long double support in compiler... $ECHO_C" >&6
bc8bcb4b 19520if test "${gdb_cv_c_long_double+set}" = set; then
bec39cab 19521 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 19522else
bec39cab
AC
19523 cat >conftest.$ac_ext <<_ACEOF
19524/* confdefs.h. */
19525_ACEOF
19526cat confdefs.h >>conftest.$ac_ext
19527cat >>conftest.$ac_ext <<_ACEOF
19528/* end confdefs.h. */
97bf5e38 19529long double foo;
bec39cab
AC
19530_ACEOF
19531rm -f conftest.$ac_objext
19532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19533 (eval $ac_compile) 2>conftest.er1
19534 ac_status=$?
19535 grep -v '^ *+' conftest.er1 >conftest.err
19536 rm -f conftest.er1
19537 cat conftest.err >&5
19538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19539 (exit $ac_status); } &&
b4e70030
JB
19540 { ac_try='test -z "$ac_c_werror_flag"
19541 || test ! -s conftest.err'
bec39cab
AC
19542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19543 (eval $ac_try) 2>&5
19544 ac_status=$?
19545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19546 (exit $ac_status); }; } &&
19547 { ac_try='test -s conftest.$ac_objext'
19548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19549 (eval $ac_try) 2>&5
19550 ac_status=$?
19551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19552 (exit $ac_status); }; }; then
bc8bcb4b 19553 gdb_cv_c_long_double=yes
97bf5e38 19554else
bec39cab
AC
19555 echo "$as_me: failed program was:" >&5
19556sed 's/^/| /' conftest.$ac_ext >&5
19557
b4e70030 19558gdb_cv_c_long_double=no
97bf5e38 19559fi
bec39cab 19560rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 19561fi
b4e70030
JB
19562echo "$as_me:$LINENO: result: $gdb_cv_c_long_double" >&5
19563echo "${ECHO_T}$gdb_cv_c_long_double" >&6
bc8bcb4b 19564if test $gdb_cv_c_long_double = yes; then
c906108c 19565
bc8bcb4b 19566cat >>confdefs.h <<\_ACEOF
97bf5e38 19567#define HAVE_LONG_DOUBLE 1
bec39cab 19568_ACEOF
97bf5e38
MK
19569
19570fi
19571
bc8bcb4b 19572# Check if the compiler and runtime support printing long doubles.
97bf5e38 19573
b4e70030
JB
19574echo "$as_me:$LINENO: checking for long double support in printf" >&5
19575echo $ECHO_N "checking for long double support in printf... $ECHO_C" >&6
bec39cab
AC
19576if test "${gdb_cv_printf_has_long_double+set}" = set; then
19577 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
19578else
19579 if test "$cross_compiling" = yes; then
19580 gdb_cv_printf_has_long_double=no
19581else
bec39cab
AC
19582 cat >conftest.$ac_ext <<_ACEOF
19583/* confdefs.h. */
19584_ACEOF
19585cat confdefs.h >>conftest.$ac_ext
19586cat >>conftest.$ac_ext <<_ACEOF
19587/* end confdefs.h. */
bc8bcb4b
MK
19588$ac_includes_default
19589int
19590main ()
19591{
19592char buf[16];
97bf5e38
MK
19593 long double f = 3.141592653;
19594 sprintf (buf, "%Lg", f);
19595 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
19596 ;
19597 return 0;
97bf5e38 19598}
bec39cab
AC
19599_ACEOF
19600rm -f conftest$ac_exeext
19601if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19602 (eval $ac_link) 2>&5
19603 ac_status=$?
19604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19605 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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
97bf5e38 19611 gdb_cv_printf_has_long_double=yes
c906108c 19612else
bec39cab
AC
19613 echo "$as_me: program exited with status $ac_status" >&5
19614echo "$as_me: failed program was:" >&5
19615sed 's/^/| /' conftest.$ac_ext >&5
19616
19617( exit $ac_status )
19618gdb_cv_printf_has_long_double=no
c906108c 19619fi
b4e70030 19620rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 19621fi
c906108c 19622fi
b4e70030
JB
19623echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_double" >&5
19624echo "${ECHO_T}$gdb_cv_printf_has_long_double" >&6
97bf5e38 19625if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b
MK
19626
19627cat >>confdefs.h <<\_ACEOF
97bf5e38 19628#define PRINTF_HAS_LONG_DOUBLE 1
bec39cab 19629_ACEOF
97bf5e38
MK
19630
19631fi
97bf5e38 19632
bc8bcb4b 19633# Check if the compiler and runtime support scanning long doubles.
97bf5e38 19634
b4e70030
JB
19635echo "$as_me:$LINENO: checking for long double support in scanf" >&5
19636echo $ECHO_N "checking for long double support in scanf... $ECHO_C" >&6
bec39cab
AC
19637if test "${gdb_cv_scanf_has_long_double+set}" = set; then
19638 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
19639else
19640 if test "$cross_compiling" = yes; then
19641 gdb_cv_scanf_has_long_double=no
19642else
bec39cab
AC
19643 cat >conftest.$ac_ext <<_ACEOF
19644/* confdefs.h. */
19645_ACEOF
19646cat confdefs.h >>conftest.$ac_ext
19647cat >>conftest.$ac_ext <<_ACEOF
19648/* end confdefs.h. */
bc8bcb4b
MK
19649#include <stdio.h>
19650int
19651main ()
19652{
19653char *buf = "3.141592653";
97bf5e38
MK
19654 long double f = 0;
19655 sscanf (buf, "%Lg", &f);
19656 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
19657 ;
19658 return 0;
97bf5e38 19659}
bec39cab
AC
19660_ACEOF
19661rm -f conftest$ac_exeext
19662if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19663 (eval $ac_link) 2>&5
19664 ac_status=$?
19665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19666 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19668 (eval $ac_try) 2>&5
19669 ac_status=$?
19670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19671 (exit $ac_status); }; }; then
97bf5e38
MK
19672 gdb_cv_scanf_has_long_double=yes
19673else
bec39cab
AC
19674 echo "$as_me: program exited with status $ac_status" >&5
19675echo "$as_me: failed program was:" >&5
19676sed 's/^/| /' conftest.$ac_ext >&5
19677
19678( exit $ac_status )
19679gdb_cv_scanf_has_long_double=no
97bf5e38 19680fi
b4e70030 19681rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 19682fi
c906108c 19683fi
b4e70030
JB
19684echo "$as_me:$LINENO: result: $gdb_cv_scanf_has_long_double" >&5
19685echo "${ECHO_T}$gdb_cv_scanf_has_long_double" >&6
97bf5e38 19686if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b
MK
19687
19688cat >>confdefs.h <<\_ACEOF
97bf5e38 19689#define SCANF_HAS_LONG_DOUBLE 1
bec39cab 19690_ACEOF
97bf5e38
MK
19691
19692fi
c906108c 19693
438013df
AO
19694case ${host_os} in
19695aix*)
b4e70030
JB
19696 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
19697echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
bec39cab
AC
19698if test "${gdb_cv_bigtoc+set}" = set; then
19699 echo $ECHO_N "(cached) $ECHO_C" >&6
438013df 19700else
bec39cab 19701
438013df
AO
19702 SAVE_LDFLAGS=$LDFLAGS
19703
19704 case $GCC in
19705 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
19706 *) gdb_cv_bigtoc=-bbigtoc ;;
19707 esac
19708
19709 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
bec39cab
AC
19710 cat >conftest.$ac_ext <<_ACEOF
19711/* confdefs.h. */
19712_ACEOF
19713cat confdefs.h >>conftest.$ac_ext
19714cat >>conftest.$ac_ext <<_ACEOF
19715/* end confdefs.h. */
438013df 19716
bec39cab
AC
19717int
19718main ()
19719{
438013df 19720int i;
bec39cab
AC
19721 ;
19722 return 0;
19723}
19724_ACEOF
19725rm -f conftest.$ac_objext conftest$ac_exeext
19726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19727 (eval $ac_link) 2>conftest.er1
19728 ac_status=$?
19729 grep -v '^ *+' conftest.er1 >conftest.err
19730 rm -f conftest.er1
19731 cat conftest.err >&5
19732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19733 (exit $ac_status); } &&
b4e70030
JB
19734 { ac_try='test -z "$ac_c_werror_flag"
19735 || test ! -s conftest.err'
bec39cab
AC
19736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19737 (eval $ac_try) 2>&5
19738 ac_status=$?
19739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19740 (exit $ac_status); }; } &&
19741 { ac_try='test -s conftest$ac_exeext'
19742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19743 (eval $ac_try) 2>&5
19744 ac_status=$?
19745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19746 (exit $ac_status); }; }; then
438013df
AO
19747 :
19748else
bec39cab
AC
19749 echo "$as_me: failed program was:" >&5
19750sed 's/^/| /' conftest.$ac_ext >&5
19751
b4e70030 19752gdb_cv_bigtoc=
438013df 19753fi
bec39cab
AC
19754rm -f conftest.err conftest.$ac_objext \
19755 conftest$ac_exeext conftest.$ac_ext
ec76baa5 19756 LDFLAGS="${SAVE_LDFLAGS}"
438013df 19757
bec39cab 19758fi
b4e70030
JB
19759echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
19760echo "${ECHO_T}$gdb_cv_bigtoc" >&6
438013df
AO
19761 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
19762 ;;
19763esac
19764
c906108c
SS
19765
19766
19767if test ${build} = ${host} -a ${host} = ${target} ; then
19768 case ${host_os} in
19769 hpux*)
b4e70030
JB
19770 echo "$as_me:$LINENO: checking for HPUX/OSF thread support" >&5
19771echo $ECHO_N "checking for HPUX/OSF thread support... $ECHO_C" >&6
c906108c
SS
19772 if test -f /usr/include/dce/cma_config.h ; then
19773 if test "$GCC" = "yes" ; then
b4e70030
JB
19774 echo "$as_me:$LINENO: result: yes" >&5
19775echo "${ECHO_T}yes" >&6
60ca704f
SE
19776
19777cat >>confdefs.h <<\_ACEOF
c906108c 19778#define HAVE_HPUX_THREAD_SUPPORT 1
bec39cab 19779_ACEOF
c906108c 19780
3483b318 19781 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
19782 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
19783 else
b4e70030
JB
19784 echo "$as_me:$LINENO: result: no (suppressed because you are not using GCC)" >&5
19785echo "${ECHO_T}no (suppressed because you are not using GCC)" >&6
c906108c
SS
19786 fi
19787 else
b4e70030
JB
19788 echo "$as_me:$LINENO: result: no" >&5
19789echo "${ECHO_T}no" >&6
c906108c
SS
19790 fi
19791 ;;
19792 solaris*)
d92419e5
JB
19793 # See if thread_db library is around for Solaris thread debugging.
19794 # Note that we must explicitly test for version 1 of the library
19795 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
19796 # the same API.
b4e70030
JB
19797 echo "$as_me:$LINENO: checking for Solaris thread debugging library" >&5
19798echo $ECHO_N "checking for Solaris thread debugging library... $ECHO_C" >&6
c906108c 19799 if test -f /usr/lib/libthread_db.so.1 ; then
b4e70030
JB
19800 echo "$as_me:$LINENO: result: yes" >&5
19801echo "${ECHO_T}yes" >&6
60ca704f
SE
19802
19803cat >>confdefs.h <<\_ACEOF
c906108c 19804#define HAVE_THREAD_DB_LIB 1
bec39cab 19805_ACEOF
c906108c 19806
3483b318 19807 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 19808 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
bec39cab 19809
b4e70030
JB
19810echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19811echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
bec39cab
AC
19812if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19813 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19814else
bec39cab 19815 ac_check_lib_save_LIBS=$LIBS
c906108c 19816LIBS="-ldl $LIBS"
bec39cab
AC
19817cat >conftest.$ac_ext <<_ACEOF
19818/* confdefs.h. */
19819_ACEOF
19820cat confdefs.h >>conftest.$ac_ext
19821cat >>conftest.$ac_ext <<_ACEOF
19822/* end confdefs.h. */
19823
b4e70030 19824/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
19825#ifdef __cplusplus
19826extern "C"
19827#endif
b4e70030
JB
19828/* We use char because int might match the return type of a gcc2
19829 builtin and then its argument prototype would still apply. */
bec39cab
AC
19830char dlopen ();
19831int
19832main ()
19833{
b4e70030 19834dlopen ();
bec39cab
AC
19835 ;
19836 return 0;
19837}
19838_ACEOF
19839rm -f conftest.$ac_objext conftest$ac_exeext
19840if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19841 (eval $ac_link) 2>conftest.er1
19842 ac_status=$?
19843 grep -v '^ *+' conftest.er1 >conftest.err
19844 rm -f conftest.er1
19845 cat conftest.err >&5
19846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19847 (exit $ac_status); } &&
b4e70030
JB
19848 { ac_try='test -z "$ac_c_werror_flag"
19849 || test ! -s conftest.err'
bec39cab
AC
19850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19851 (eval $ac_try) 2>&5
19852 ac_status=$?
19853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19854 (exit $ac_status); }; } &&
19855 { ac_try='test -s conftest$ac_exeext'
19856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19857 (eval $ac_try) 2>&5
19858 ac_status=$?
19859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19860 (exit $ac_status); }; }; then
19861 ac_cv_lib_dl_dlopen=yes
19862else
19863 echo "$as_me: failed program was:" >&5
19864sed 's/^/| /' conftest.$ac_ext >&5
19865
b4e70030 19866ac_cv_lib_dl_dlopen=no
bec39cab
AC
19867fi
19868rm -f conftest.err conftest.$ac_objext \
19869 conftest$ac_exeext conftest.$ac_ext
19870LIBS=$ac_check_lib_save_LIBS
19871fi
b4e70030
JB
19872echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19873echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
bec39cab
AC
19874if test $ac_cv_lib_dl_dlopen = yes; then
19875 cat >>confdefs.h <<_ACEOF
19876#define HAVE_LIBDL 1
19877_ACEOF
c906108c
SS
19878
19879 LIBS="-ldl $LIBS"
19880
c906108c
SS
19881fi
19882
19883 if test "$GCC" = "yes" ; then
19884 # The GNU linker requires the -export-dynamic option to make
19885 # all symbols visible in the dynamic symbol table.
19886 hold_ldflags=$LDFLAGS
b4e70030
JB
19887 echo "$as_me:$LINENO: checking for the ld -export-dynamic flag" >&5
19888echo $ECHO_N "checking for the ld -export-dynamic flag... $ECHO_C" >&6
c906108c 19889 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
bec39cab
AC
19890 cat >conftest.$ac_ext <<_ACEOF
19891/* confdefs.h. */
19892_ACEOF
19893cat confdefs.h >>conftest.$ac_ext
19894cat >>conftest.$ac_ext <<_ACEOF
19895/* end confdefs.h. */
c906108c 19896
bec39cab
AC
19897int
19898main ()
19899{
c906108c 19900int i;
bec39cab
AC
19901 ;
19902 return 0;
19903}
19904_ACEOF
19905rm -f conftest.$ac_objext conftest$ac_exeext
19906if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19907 (eval $ac_link) 2>conftest.er1
19908 ac_status=$?
19909 grep -v '^ *+' conftest.er1 >conftest.err
19910 rm -f conftest.er1
19911 cat conftest.err >&5
19912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19913 (exit $ac_status); } &&
b4e70030
JB
19914 { ac_try='test -z "$ac_c_werror_flag"
19915 || test ! -s conftest.err'
bec39cab
AC
19916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19917 (eval $ac_try) 2>&5
19918 ac_status=$?
19919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19920 (exit $ac_status); }; } &&
19921 { ac_try='test -s conftest$ac_exeext'
19922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19923 (eval $ac_try) 2>&5
19924 ac_status=$?
19925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19926 (exit $ac_status); }; }; then
c906108c
SS
19927 found=yes
19928else
bec39cab
AC
19929 echo "$as_me: failed program was:" >&5
19930sed 's/^/| /' conftest.$ac_ext >&5
19931
b4e70030 19932found=no
c906108c 19933fi
bec39cab
AC
19934rm -f conftest.err conftest.$ac_objext \
19935 conftest$ac_exeext conftest.$ac_ext
c906108c 19936 LDFLAGS=$hold_ldflags
b4e70030
JB
19937 echo "$as_me:$LINENO: result: $found" >&5
19938echo "${ECHO_T}$found" >&6
c906108c
SS
19939 if test $found = yes; then
19940 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
19941 fi
19942 fi
19943 # Sun randomly tweaked the prototypes in <proc_service.h>
19944 # at one point.
b4e70030
JB
19945 echo "$as_me:$LINENO: checking if <proc_service.h> is old" >&5
19946echo $ECHO_N "checking if <proc_service.h> is old... $ECHO_C" >&6
bec39cab
AC
19947 if test "${gdb_cv_proc_service_is_old+set}" = set; then
19948 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19949else
bec39cab
AC
19950
19951 cat >conftest.$ac_ext <<_ACEOF
19952/* confdefs.h. */
19953_ACEOF
19954cat confdefs.h >>conftest.$ac_ext
19955cat >>conftest.$ac_ext <<_ACEOF
19956/* end confdefs.h. */
c906108c
SS
19957
19958 #include <proc_service.h>
19959 ps_err_e ps_pdwrite
19960 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 19961
bec39cab
AC
19962int
19963main ()
19964{
19965
19966 ;
19967 return 0;
19968}
19969_ACEOF
19970rm -f conftest.$ac_objext
19971if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19972 (eval $ac_compile) 2>conftest.er1
19973 ac_status=$?
19974 grep -v '^ *+' conftest.er1 >conftest.err
19975 rm -f conftest.er1
19976 cat conftest.err >&5
19977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19978 (exit $ac_status); } &&
b4e70030
JB
19979 { ac_try='test -z "$ac_c_werror_flag"
19980 || test ! -s conftest.err'
bec39cab
AC
19981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19982 (eval $ac_try) 2>&5
19983 ac_status=$?
19984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19985 (exit $ac_status); }; } &&
19986 { ac_try='test -s conftest.$ac_objext'
19987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19988 (eval $ac_try) 2>&5
19989 ac_status=$?
19990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19991 (exit $ac_status); }; }; then
c906108c
SS
19992 gdb_cv_proc_service_is_old=no
19993else
bec39cab
AC
19994 echo "$as_me: failed program was:" >&5
19995sed 's/^/| /' conftest.$ac_ext >&5
19996
b4e70030 19997gdb_cv_proc_service_is_old=yes
c906108c 19998fi
bec39cab
AC
19999rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20000
c906108c
SS
20001fi
20002
b4e70030
JB
20003 echo "$as_me:$LINENO: result: $gdb_cv_proc_service_is_old" >&5
20004echo "${ECHO_T}$gdb_cv_proc_service_is_old" >&6
c906108c 20005 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f
SE
20006
20007cat >>confdefs.h <<\_ACEOF
c906108c 20008#define PROC_SERVICE_IS_OLD 1
bec39cab 20009_ACEOF
c906108c
SS
20010
20011 fi
20012 else
b4e70030
JB
20013 echo "$as_me:$LINENO: result: no" >&5
20014echo "${ECHO_T}no" >&6
c906108c
SS
20015 fi
20016 ;;
d92419e5 20017 aix*)
b4e70030
JB
20018 echo "$as_me:$LINENO: checking for AiX thread debugging library" >&5
20019echo $ECHO_N "checking for AiX thread debugging library... $ECHO_C" >&6
bec39cab
AC
20020 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then
20021 echo $ECHO_N "(cached) $ECHO_C" >&6
20022else
20023 cat >conftest.$ac_ext <<_ACEOF
20024/* confdefs.h. */
20025_ACEOF
20026cat confdefs.h >>conftest.$ac_ext
20027cat >>conftest.$ac_ext <<_ACEOF
20028/* end confdefs.h. */
d92419e5 20029#include <sys/pthdebug.h>
bec39cab
AC
20030int
20031main ()
20032{
d92419e5
JB
20033#ifndef PTHDB_VERSION_3
20034 #error
20035 #endif
bec39cab
AC
20036 ;
20037 return 0;
20038}
20039_ACEOF
20040rm -f conftest.$ac_objext
20041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20042 (eval $ac_compile) 2>conftest.er1
20043 ac_status=$?
20044 grep -v '^ *+' conftest.er1 >conftest.err
20045 rm -f conftest.er1
20046 cat conftest.err >&5
20047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20048 (exit $ac_status); } &&
b4e70030
JB
20049 { ac_try='test -z "$ac_c_werror_flag"
20050 || test ! -s conftest.err'
bec39cab
AC
20051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20052 (eval $ac_try) 2>&5
20053 ac_status=$?
20054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20055 (exit $ac_status); }; } &&
20056 { ac_try='test -s conftest.$ac_objext'
20057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20058 (eval $ac_try) 2>&5
20059 ac_status=$?
20060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20061 (exit $ac_status); }; }; then
d92419e5
JB
20062 gdb_cv_have_aix_thread_debug=yes
20063else
bec39cab
AC
20064 echo "$as_me: failed program was:" >&5
20065sed 's/^/| /' conftest.$ac_ext >&5
20066
b4e70030 20067gdb_cv_have_aix_thread_debug=no
d92419e5 20068fi
bec39cab 20069rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
20070fi
20071
b4e70030
JB
20072 echo "$as_me:$LINENO: result: $gdb_cv_have_aix_thread_debug" >&5
20073echo "${ECHO_T}$gdb_cv_have_aix_thread_debug" >&6
d92419e5
JB
20074 if test $gdb_cv_have_aix_thread_debug = yes; then
20075 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 20076 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
20077 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
20078 fi
20079 ;;
c906108c 20080 esac
bec39cab 20081
c906108c
SS
20082fi
20083
3f47be5c 20084if test "x$ac_cv_header_thread_db_h" = "xyes"; then
b4e70030
JB
20085 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTALLOC" >&5
20086echo $ECHO_N "checking whether <thread_db.h> has TD_NOTALLOC... $ECHO_C" >&6
bec39cab
AC
20087if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then
20088 echo $ECHO_N "(cached) $ECHO_C" >&6
20089else
20090 cat >conftest.$ac_ext <<_ACEOF
20091/* confdefs.h. */
20092_ACEOF
20093cat confdefs.h >>conftest.$ac_ext
20094cat >>conftest.$ac_ext <<_ACEOF
20095/* end confdefs.h. */
3f47be5c 20096#include <thread_db.h>
bec39cab
AC
20097int
20098main ()
20099{
3f47be5c 20100int i = TD_NOTALLOC;
bec39cab
AC
20101 ;
20102 return 0;
20103}
20104_ACEOF
20105rm -f conftest.$ac_objext
20106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20107 (eval $ac_compile) 2>conftest.er1
20108 ac_status=$?
20109 grep -v '^ *+' conftest.er1 >conftest.err
20110 rm -f conftest.er1
20111 cat conftest.err >&5
20112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20113 (exit $ac_status); } &&
b4e70030
JB
20114 { ac_try='test -z "$ac_c_werror_flag"
20115 || test ! -s conftest.err'
bec39cab
AC
20116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20117 (eval $ac_try) 2>&5
20118 ac_status=$?
20119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20120 (exit $ac_status); }; } &&
20121 { ac_try='test -s conftest.$ac_objext'
20122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20123 (eval $ac_try) 2>&5
20124 ac_status=$?
20125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20126 (exit $ac_status); }; }; then
3f47be5c
EZ
20127 gdb_cv_thread_db_h_has_td_notalloc=yes
20128else
bec39cab
AC
20129 echo "$as_me: failed program was:" >&5
20130sed 's/^/| /' conftest.$ac_ext >&5
20131
b4e70030 20132gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 20133
3f47be5c 20134fi
bec39cab 20135rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 20136
bec39cab 20137fi
b4e70030
JB
20138echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
20139echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notalloc" >&6
3f47be5c
EZ
20140fi
20141if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab
AC
20142
20143cat >>confdefs.h <<\_ACEOF
3f47be5c 20144#define THREAD_DB_HAS_TD_NOTALLOC 1
bec39cab 20145_ACEOF
3f47be5c
EZ
20146
20147fi
20148
b757528f 20149if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
b4e70030
JB
20150 echo "$as_me:$LINENO: checking whether <sys/syscall.h> has __NR_tkill" >&5
20151echo $ECHO_N "checking whether <sys/syscall.h> has __NR_tkill... $ECHO_C" >&6
bec39cab
AC
20152if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then
20153 echo $ECHO_N "(cached) $ECHO_C" >&6
20154else
20155 cat >conftest.$ac_ext <<_ACEOF
20156/* confdefs.h. */
20157_ACEOF
20158cat confdefs.h >>conftest.$ac_ext
20159cat >>conftest.$ac_ext <<_ACEOF
20160/* end confdefs.h. */
b757528f 20161#include <sys/syscall.h>
bec39cab
AC
20162int
20163main ()
20164{
b757528f 20165int i = __NR_tkill;
bec39cab
AC
20166 ;
20167 return 0;
20168}
20169_ACEOF
20170rm -f conftest.$ac_objext
20171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20172 (eval $ac_compile) 2>conftest.er1
20173 ac_status=$?
20174 grep -v '^ *+' conftest.er1 >conftest.err
20175 rm -f conftest.er1
20176 cat conftest.err >&5
20177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20178 (exit $ac_status); } &&
b4e70030
JB
20179 { ac_try='test -z "$ac_c_werror_flag"
20180 || test ! -s conftest.err'
bec39cab
AC
20181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20182 (eval $ac_try) 2>&5
20183 ac_status=$?
20184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20185 (exit $ac_status); }; } &&
20186 { ac_try='test -s conftest.$ac_objext'
20187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20188 (eval $ac_try) 2>&5
20189 ac_status=$?
20190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20191 (exit $ac_status); }; }; then
b757528f
JJ
20192 gdb_cv_sys_syscall_h_has_tkill=yes
20193else
bec39cab
AC
20194 echo "$as_me: failed program was:" >&5
20195sed 's/^/| /' conftest.$ac_ext >&5
20196
b4e70030 20197gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 20198
b757528f 20199fi
bec39cab 20200rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 20201
bec39cab 20202fi
b4e70030
JB
20203echo "$as_me:$LINENO: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
20204echo "${ECHO_T}$gdb_cv_sys_syscall_h_has_tkill" >&6
b757528f
JJ
20205fi
20206if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab
AC
20207
20208cat >>confdefs.h <<\_ACEOF
b757528f 20209#define HAVE_TKILL_SYSCALL 1
bec39cab 20210_ACEOF
b757528f
JJ
20211
20212fi
20213
fb40c209 20214
bec39cab 20215
b4e70030 20216# Check whether --with-sysroot or --without-sysroot was given.
030292b7 20217if test "${with_sysroot+set}" = set; then
b4e70030
JB
20218 withval="$with_sysroot"
20219
030292b7 20220 case ${with_sysroot} in
715d1656 20221 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
20222 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
20223 esac
20224
20225 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
20226
20227 if test "x$exec_prefix" = xNONE; then
20228 if test "x$prefix" = xNONE; then
20229 test_prefix=/usr/local
20230 else
20231 test_prefix=$prefix
20232 fi
20233 else
20234 test_prefix=$exec_prefix
20235 fi
20236 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
20237 "${test_prefix}"|"${test_prefix}/"*|\
20238 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
20239 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
20240 TARGET_SYSTEM_ROOT_DEFINE="$t"
20241 ;;
20242 esac
20243
20244else
bec39cab 20245
030292b7
DJ
20246 TARGET_SYSTEM_ROOT=
20247 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
20248
b4e70030 20249fi;
030292b7
DJ
20250
20251
20252
b4e70030 20253# Check whether --enable-werror or --disable-werror was given.
094a342e 20254if test "${enable_werror+set}" = set; then
b4e70030
JB
20255 enableval="$enable_werror"
20256 case "${enableval}" in
094a342e
MK
20257 yes | y) ERROR_ON_WARNING="yes" ;;
20258 no | n) ERROR_ON_WARNING="no" ;;
20259 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
20260echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
20261 { (exit 1); exit 1; }; } ;;
20262 esac
b4e70030 20263fi;
094a342e
MK
20264
20265# Enable -Werror by default when using gcc
20266if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
20267 ERROR_ON_WARNING=yes
20268fi
20269
20270WERROR_CFLAGS=""
20271if test "${ERROR_ON_WARNING}" = yes ; then
20272 WERROR_CFLAGS="-Werror"
20273fi
20274
3b851bce
AC
20275# NOTE: Don't add -Wall or -Wunused, they both include
20276# -Wunused-parameter which reports bogus warnings.
20277# NOTE: If you add to this list, remember to update
20278# gdb/doc/gdbint.texinfo.
1decb323 20279build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
a3b362c4 20280-Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral \
7be93b9e 20281-Wunused-label -Wunused-function -Wno-pointer-sign"
a3b362c4
JB
20282
20283# GCC supports -Wuninitialized only with -O or -On, n != 0.
ca231fcc 20284if test x${CFLAGS+set} = xset; then
a3b362c4
JB
20285 case "${CFLAGS}" in
20286 *"-O0"* ) ;;
20287 *"-O"* )
20288 build_warnings="${build_warnings} -Wuninitialized"
20289 ;;
20290 esac
20291else
20292 build_warnings="${build_warnings} -Wuninitialized"
20293fi
20294
d8038014 20295# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
0f0cffd2 20296# -Wunused-function -Wunused-variable -Wunused-value
93d56215 20297# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
20298# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
20299# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
20300# -Woverloaded-virtual -Winline -Werror"
b4e70030 20301# Check whether --enable-build-warnings or --disable-build-warnings was given.
c906108c 20302if test "${enable_build_warnings+set}" = set; then
b4e70030
JB
20303 enableval="$enable_build_warnings"
20304 case "${enableval}" in
c906108c
SS
20305 yes) ;;
20306 no) build_warnings="-w";;
20307 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20308 build_warnings="${build_warnings} ${t}";;
20309 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20310 build_warnings="${t} ${build_warnings}";;
20311 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
20312esac
d4f3574e 20313if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 20314 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 20315fi
b4e70030 20316fi; # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
3b851bce 20317if test "${enable_gdb_build_warnings+set}" = set; then
b4e70030
JB
20318 enableval="$enable_gdb_build_warnings"
20319 case "${enableval}" in
3b851bce
AC
20320 yes) ;;
20321 no) build_warnings="-w";;
20322 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20323 build_warnings="${build_warnings} ${t}";;
20324 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20325 build_warnings="${t} ${build_warnings}";;
20326 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
20327esac
20328if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
20329 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
20330fi
b4e70030 20331fi; WARN_CFLAGS=""
c906108c
SS
20332if test "x${build_warnings}" != x -a "x$GCC" = xyes
20333then
b4e70030
JB
20334 echo "$as_me:$LINENO: checking compiler warning flags" >&5
20335echo $ECHO_N "checking compiler warning flags... $ECHO_C" >&6
746a987d
AC
20336 # Separate out the -Werror flag as some files just cannot be
20337 # compiled with it enabled.
20338 for w in ${build_warnings}; do
20339 case $w in
20340 -Werr*) WERROR_CFLAGS=-Werror ;;
20341 *) # Check that GCC accepts it
4536bbc6
AC
20342 saved_CFLAGS="$CFLAGS"
20343 CFLAGS="$CFLAGS $w"
bec39cab
AC
20344 cat >conftest.$ac_ext <<_ACEOF
20345/* confdefs.h. */
20346_ACEOF
20347cat confdefs.h >>conftest.$ac_ext
20348cat >>conftest.$ac_ext <<_ACEOF
20349/* end confdefs.h. */
4536bbc6 20350
bec39cab
AC
20351int
20352main ()
20353{
4536bbc6 20354
bec39cab
AC
20355 ;
20356 return 0;
20357}
20358_ACEOF
20359rm -f conftest.$ac_objext
20360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20361 (eval $ac_compile) 2>conftest.er1
20362 ac_status=$?
20363 grep -v '^ *+' conftest.er1 >conftest.err
20364 rm -f conftest.er1
20365 cat conftest.err >&5
20366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20367 (exit $ac_status); } &&
b4e70030
JB
20368 { ac_try='test -z "$ac_c_werror_flag"
20369 || test ! -s conftest.err'
bec39cab
AC
20370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20371 (eval $ac_try) 2>&5
20372 ac_status=$?
20373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20374 (exit $ac_status); }; } &&
20375 { ac_try='test -s conftest.$ac_objext'
20376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20377 (eval $ac_try) 2>&5
20378 ac_status=$?
20379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20380 (exit $ac_status); }; }; then
4536bbc6
AC
20381 WARN_CFLAGS="${WARN_CFLAGS} $w"
20382else
bec39cab
AC
20383 echo "$as_me: failed program was:" >&5
20384sed 's/^/| /' conftest.$ac_ext >&5
20385
4536bbc6 20386fi
bec39cab 20387rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 20388 CFLAGS="$saved_CFLAGS"
746a987d
AC
20389 esac
20390 done
b4e70030
JB
20391 echo "$as_me:$LINENO: result: ${WARN_CFLAGS}${WERROR_CFLAGS}" >&5
20392echo "${ECHO_T}${WARN_CFLAGS}${WERROR_CFLAGS}" >&6
c906108c
SS
20393fi
20394
20395
104c1213 20396
7a292a7a 20397# In the Cygwin environment, we need some additional flags.
b4e70030
JB
20398echo "$as_me:$LINENO: checking for cygwin" >&5
20399echo $ECHO_N "checking for cygwin... $ECHO_C" >&6
bec39cab
AC
20400if test "${gdb_cv_os_cygwin+set}" = set; then
20401 echo $ECHO_N "(cached) $ECHO_C" >&6
20402else
20403 cat >conftest.$ac_ext <<_ACEOF
20404/* confdefs.h. */
20405_ACEOF
20406cat confdefs.h >>conftest.$ac_ext
20407cat >>conftest.$ac_ext <<_ACEOF
20408/* end confdefs.h. */
7a292a7a
SS
20409
20410#if defined (__CYGWIN__) || defined (__CYGWIN32__)
20411lose
20412#endif
bec39cab 20413_ACEOF
7a292a7a 20414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 20415 $EGREP "lose" >/dev/null 2>&1; then
7a292a7a
SS
20416 gdb_cv_os_cygwin=yes
20417else
7a292a7a
SS
20418 gdb_cv_os_cygwin=no
20419fi
20420rm -f conftest*
20421
20422fi
b4e70030
JB
20423echo "$as_me:$LINENO: result: $gdb_cv_os_cygwin" >&5
20424echo "${ECHO_T}$gdb_cv_os_cygwin" >&6
7a292a7a 20425
aff38e61 20426
3eb25fda 20427SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 20428case ${host} in
95cbc983
AC
20429 *go32* ) SER_HARDWIRE=ser-go32.o ;;
20430 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 20431 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
20432esac
20433
20434
cd0fc7c3
SS
20435# libreadline needs libuser32.a in a cygwin environment
20436WIN32LIBS=
20437if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
20438 WIN32LIBS="-luser32"
20439 case "${target}" in
20440 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
20441 ;;
20442 esac
cd0fc7c3 20443fi
c906108c 20444
b4505029
MM
20445# The ser-tcp.c module requires sockets.
20446case ${host} in
20447 *mingw32*)
20448
20449cat >>confdefs.h <<\_ACEOF
20450#define USE_WIN32API 1
20451_ACEOF
20452
20453 WIN32LIBS="$WIN32LIBS -lws2_32"
20454 ;;
20455esac
20456
7a292a7a 20457
121ce6e5
DJ
20458# Add any host-specific objects to GDB.
20459CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
20460
3fc11d3e
JM
20461LIBGUI="../libgui/src/libgui.a"
20462GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
20463
20464
7a292a7a 20465
3fc11d3e
JM
20466WIN32LDAPP=
20467
20468
20469
d91670b9
CV
20470case "${host}" in
20471*-*-cygwin*)
20472 configdir="win"
20473 ;;
20474*)
20475 configdir="unix"
20476 ;;
20477esac
3fc11d3e
JM
20478
20479GDBTKLIBS=
20480if test "${enable_gdbtk}" = "yes"; then
20481
d1c3b63a
KS
20482 # Gdbtk must have an absolute path to srcdir in order to run
20483 # properly when not installed.
20484 here=`pwd`
20485 cd ${srcdir}
20486 GDBTK_SRC_DIR=`pwd`
20487 cd $here
20488
bec39cab 20489
3fc11d3e
JM
20490#
20491# Ok, lets find the tcl configuration
bec39cab 20492# First, look for one uninstalled.
3fc11d3e
JM
20493# the alternative search directory is invoked by --with-tclconfig
20494#
20495
20496if test x"${no_tcl}" = x ; then
20497 # we reset no_tcl in case something fails here
20498 no_tcl=true
bec39cab 20499
b4e70030 20500# Check whether --with-tclconfig or --without-tclconfig was given.
3fc11d3e 20501if test "${with_tclconfig+set}" = set; then
b4e70030
JB
20502 withval="$with_tclconfig"
20503 with_tclconfig=${withval}
20504fi;
20505 echo "$as_me:$LINENO: checking for Tcl configuration" >&5
20506echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
bec39cab
AC
20507 if test "${ac_cv_c_tclconfig+set}" = set; then
20508 echo $ECHO_N "(cached) $ECHO_C" >&6
3fc11d3e 20509else
bec39cab 20510
3fc11d3e
JM
20511
20512 # First check to see if --with-tclconfig was specified.
20513 if test x"${with_tclconfig}" != x ; then
20514 if test -f "${with_tclconfig}/tclConfig.sh" ; then
20515 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
20516 else
bec39cab
AC
20517 { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
20518echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
20519 { (exit 1); exit 1; }; }
3fc11d3e
JM
20520 fi
20521 fi
20522
20523 # then check for a private Tcl installation
20524 if test x"${ac_cv_c_tclconfig}" = x ; then
20525 for i in \
20526 ../tcl \
20527 `ls -dr ../tcl[7-9]* 2>/dev/null` \
20528 ../../tcl \
20529 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
20530 ../../../tcl \
20531 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
20532 if test -f "$i/${configdir}/tclConfig.sh" ; then
20533 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
20534 break
20535 fi
20536 done
20537 fi
20538 # check in a few common install locations
20539 if test x"${ac_cv_c_tclconfig}" = x ; then
20540 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
20541 if test -f "$i/tclConfig.sh" ; then
20542 ac_cv_c_tclconfig=`(cd $i; pwd)`
20543 break
20544 fi
20545 done
20546 fi
20547 # check in a few other private locations
20548 if test x"${ac_cv_c_tclconfig}" = x ; then
20549 for i in \
20550 ${srcdir}/../tcl \
20551 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
20552 if test -f "$i/${configdir}/tclConfig.sh" ; then
20553 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
20554 break
20555 fi
20556 done
20557 fi
bec39cab 20558
3fc11d3e
JM
20559fi
20560
20561 if test x"${ac_cv_c_tclconfig}" = x ; then
20562 TCLCONFIG="# no Tcl configs found"
bec39cab
AC
20563 { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
20564echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
3fc11d3e
JM
20565 else
20566 no_tcl=
20567 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
b4e70030
JB
20568 echo "$as_me:$LINENO: result: found $TCLCONFIG" >&5
20569echo "${ECHO_T}found $TCLCONFIG" >&6
3fc11d3e
JM
20570 fi
20571fi
20572
20573 if test -z "${no_tcl}"; then
bec39cab 20574
3fc11d3e
JM
20575 . $TCLCONFIG
20576
3fc11d3e
JM
20577
20578
20579
20580
3fc11d3e
JM
20581
20582
20583
bec39cab
AC
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
3fc11d3e
JM
20603#
20604# Ok, lets find the tk configuration
bec39cab 20605# First, look for one uninstalled.
3fc11d3e
JM
20606# the alternative search directory is invoked by --with-tkconfig
20607#
20608
20609if test x"${no_tk}" = x ; then
20610 # we reset no_tk in case something fails here
20611 no_tk=true
bec39cab 20612
b4e70030 20613# Check whether --with-tkconfig or --without-tkconfig was given.
3fc11d3e 20614if test "${with_tkconfig+set}" = set; then
b4e70030
JB
20615 withval="$with_tkconfig"
20616 with_tkconfig=${withval}
20617fi;
20618 echo "$as_me:$LINENO: checking for Tk configuration" >&5
20619echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6
bec39cab
AC
20620 if test "${ac_cv_c_tkconfig+set}" = set; then
20621 echo $ECHO_N "(cached) $ECHO_C" >&6
3fc11d3e 20622else
bec39cab 20623
3fc11d3e
JM
20624
20625 # First check to see if --with-tkconfig was specified.
20626 if test x"${with_tkconfig}" != x ; then
20627 if test -f "${with_tkconfig}/tkConfig.sh" ; then
20628 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
20629 else
bec39cab
AC
20630 { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
20631echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
20632 { (exit 1); exit 1; }; }
3fc11d3e
JM
20633 fi
20634 fi
20635
20636 # then check for a private Tk library
20637 if test x"${ac_cv_c_tkconfig}" = x ; then
20638 for i in \
20639 ../tk \
20640 `ls -dr ../tk[4-9]* 2>/dev/null` \
20641 ../../tk \
20642 `ls -dr ../../tk[4-9]* 2>/dev/null` \
20643 ../../../tk \
20644 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
20645 if test -f "$i/${configdir}/tkConfig.sh" ; then
20646 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
20647 break
20648 fi
20649 done
20650 fi
20651 # check in a few common install locations
20652 if test x"${ac_cv_c_tkconfig}" = x ; then
20653 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
20654 if test -f "$i/tkConfig.sh" ; then
20655 ac_cv_c_tkconfig=`(cd $i; pwd)`
20656 break
20657 fi
20658 done
20659 fi
20660 # check in a few other private locations
20661 if test x"${ac_cv_c_tkconfig}" = x ; then
20662 for i in \
20663 ${srcdir}/../tk \
20664 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
20665 if test -f "$i/${configdir}/tkConfig.sh" ; then
20666 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
20667 break
20668 fi
20669 done
20670 fi
bec39cab 20671
3fc11d3e
JM
20672fi
20673
20674 if test x"${ac_cv_c_tkconfig}" = x ; then
20675 TKCONFIG="# no Tk configs found"
bec39cab
AC
20676 { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
20677echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
3fc11d3e
JM
20678 else
20679 no_tk=
20680 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
b4e70030
JB
20681 echo "$as_me:$LINENO: result: found $TKCONFIG" >&5
20682echo "${ECHO_T}found $TKCONFIG" >&6
3fc11d3e
JM
20683 fi
20684fi
20685
20686
20687
dd2504ab
JM
20688 # now look for Tcl library stuff
20689
d91670b9 20690 tcldir="../tcl/${configdir}/"
dd2504ab
JM
20691
20692 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
20693
3fc11d3e
JM
20694 # If $no_tk is nonempty, then we can't do Tk, and there is no
20695 # point to doing Tcl.
20696 if test -z "${no_tk}"; then
bec39cab 20697
3fc11d3e
JM
20698 if test -f "$TKCONFIG" ; then
20699 . $TKCONFIG
20700 fi
20701
3fc11d3e 20702
3fc11d3e
JM
20703
20704
3fc11d3e 20705
bec39cab
AC
20706
20707
20708
20709
20710
20711
20712
20713
20714
3fc11d3e
JM
20715#
20716# Ok, lets find the tcl source trees so we can use the headers
20717# Warning: transition of version 9 to 10 will break this algorithm
20718# because 10 sorts before 9. We also look for just tcl. We have to
20719# be careful that we don't match stuff like tclX by accident.
20720# the alternative search directory is involked by --with-tclinclude
20721#
20722
20723no_tcl=true
b4e70030
JB
20724echo "$as_me:$LINENO: checking for Tcl private headers. dir=${configdir}" >&5
20725echo $ECHO_N "checking for Tcl private headers. dir=${configdir}... $ECHO_C" >&6
bec39cab 20726
b4e70030 20727# Check whether --with-tclinclude or --without-tclinclude was given.
3fc11d3e 20728if test "${with_tclinclude+set}" = set; then
b4e70030
JB
20729 withval="$with_tclinclude"
20730 with_tclinclude=${withval}
20731fi;
bec39cab
AC
20732if test "${ac_cv_c_tclh+set}" = set; then
20733 echo $ECHO_N "(cached) $ECHO_C" >&6
3fc11d3e 20734else
bec39cab 20735
3fc11d3e
JM
20736# first check to see if --with-tclinclude was specified
20737if test x"${with_tclinclude}" != x ; then
20738 if test -f ${with_tclinclude}/tclInt.h ; then
20739 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
20740 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
20741 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
20742 else
bec39cab
AC
20743 { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory doesn't contain private headers" >&5
20744echo "$as_me: error: ${with_tclinclude} directory doesn't contain private headers" >&2;}
20745 { (exit 1); exit 1; }; }
3fc11d3e
JM
20746 fi
20747fi
20748
20749# next check if it came with Tcl configuration file
20750if test x"${ac_cv_c_tclconfig}" = x ; then
20751 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
20752 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
20753 fi
20754fi
20755
20756# next check in private source directory
20757#
20758# since ls returns lowest version numbers first, reverse its output
20759if test x"${ac_cv_c_tclh}" = x ; then
20760 for i in \
20761 ${srcdir}/../tcl \
20762 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
20763 ${srcdir}/../../tcl \
20764 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
20765 ${srcdir}/../../../tcl \
20766 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
20767 if test -f $i/generic/tclInt.h ; then
20768 ac_cv_c_tclh=`(cd $i/generic; pwd)`
20769 break
20770 fi
20771 done
20772fi
20773# finally check in a few common install locations
20774#
20775# since ls returns lowest version numbers first, reverse its output
20776if test x"${ac_cv_c_tclh}" = x ; then
20777 for i in \
20778 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
20779 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
20780 /usr/local/src/tcl \
20781 /usr/local/lib/tcl \
20782 ${prefix}/include ; do
20783 if test -f $i/generic/tclInt.h ; then
20784 ac_cv_c_tclh=`(cd $i/generic; pwd)`
20785 break
20786 fi
20787 done
20788fi
20789# see if one is installed
20790if test x"${ac_cv_c_tclh}" = x ; then
bec39cab 20791 if test "${ac_cv_header_tclInt_h+set}" = set; then
b4e70030
JB
20792 echo "$as_me:$LINENO: checking for tclInt.h" >&5
20793echo $ECHO_N "checking for tclInt.h... $ECHO_C" >&6
bec39cab
AC
20794if test "${ac_cv_header_tclInt_h+set}" = set; then
20795 echo $ECHO_N "(cached) $ECHO_C" >&6
20796fi
b4e70030
JB
20797echo "$as_me:$LINENO: result: $ac_cv_header_tclInt_h" >&5
20798echo "${ECHO_T}$ac_cv_header_tclInt_h" >&6
bec39cab
AC
20799else
20800 # Is the header compilable?
b4e70030
JB
20801echo "$as_me:$LINENO: checking tclInt.h usability" >&5
20802echo $ECHO_N "checking tclInt.h usability... $ECHO_C" >&6
bec39cab
AC
20803cat >conftest.$ac_ext <<_ACEOF
20804/* confdefs.h. */
20805_ACEOF
20806cat confdefs.h >>conftest.$ac_ext
20807cat >>conftest.$ac_ext <<_ACEOF
20808/* end confdefs.h. */
20809$ac_includes_default
20810#include <tclInt.h>
20811_ACEOF
20812rm -f conftest.$ac_objext
20813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20814 (eval $ac_compile) 2>conftest.er1
20815 ac_status=$?
20816 grep -v '^ *+' conftest.er1 >conftest.err
20817 rm -f conftest.er1
20818 cat conftest.err >&5
20819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20820 (exit $ac_status); } &&
b4e70030
JB
20821 { ac_try='test -z "$ac_c_werror_flag"
20822 || test ! -s conftest.err'
bec39cab
AC
20823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20824 (eval $ac_try) 2>&5
20825 ac_status=$?
20826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20827 (exit $ac_status); }; } &&
20828 { ac_try='test -s conftest.$ac_objext'
20829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20830 (eval $ac_try) 2>&5
20831 ac_status=$?
20832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20833 (exit $ac_status); }; }; then
20834 ac_header_compiler=yes
20835else
20836 echo "$as_me: failed program was:" >&5
20837sed 's/^/| /' conftest.$ac_ext >&5
20838
b4e70030 20839ac_header_compiler=no
bec39cab
AC
20840fi
20841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
20842echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20843echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
20844
20845# Is the header present?
b4e70030
JB
20846echo "$as_me:$LINENO: checking tclInt.h presence" >&5
20847echo $ECHO_N "checking tclInt.h presence... $ECHO_C" >&6
bec39cab
AC
20848cat >conftest.$ac_ext <<_ACEOF
20849/* confdefs.h. */
20850_ACEOF
20851cat confdefs.h >>conftest.$ac_ext
20852cat >>conftest.$ac_ext <<_ACEOF
20853/* end confdefs.h. */
3fc11d3e 20854#include <tclInt.h>
bec39cab
AC
20855_ACEOF
20856if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20857 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20858 ac_status=$?
20859 grep -v '^ *+' conftest.er1 >conftest.err
20860 rm -f conftest.er1
20861 cat conftest.err >&5
20862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20863 (exit $ac_status); } >/dev/null; then
20864 if test -s conftest.err; then
20865 ac_cpp_err=$ac_c_preproc_warn_flag
20866 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20867 else
20868 ac_cpp_err=
20869 fi
20870else
20871 ac_cpp_err=yes
3fc11d3e 20872fi
bec39cab
AC
20873if test -z "$ac_cpp_err"; then
20874 ac_header_preproc=yes
20875else
20876 echo "$as_me: failed program was:" >&5
20877sed 's/^/| /' conftest.$ac_ext >&5
20878
20879 ac_header_preproc=no
3fc11d3e 20880fi
bec39cab 20881rm -f conftest.err conftest.$ac_ext
b4e70030
JB
20882echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20883echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
20884
20885# So? What about this header?
20886case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20887 yes:no: )
20888 { echo "$as_me:$LINENO: WARNING: tclInt.h: accepted by the compiler, rejected by the preprocessor!" >&5
20889echo "$as_me: WARNING: tclInt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20890 { echo "$as_me:$LINENO: WARNING: tclInt.h: proceeding with the compiler's result" >&5
20891echo "$as_me: WARNING: tclInt.h: proceeding with the compiler's result" >&2;}
20892 ac_header_preproc=yes
20893 ;;
20894 no:yes:* )
20895 { echo "$as_me:$LINENO: WARNING: tclInt.h: present but cannot be compiled" >&5
20896echo "$as_me: WARNING: tclInt.h: present but cannot be compiled" >&2;}
20897 { echo "$as_me:$LINENO: WARNING: tclInt.h: check for missing prerequisite headers?" >&5
20898echo "$as_me: WARNING: tclInt.h: check for missing prerequisite headers?" >&2;}
20899 { echo "$as_me:$LINENO: WARNING: tclInt.h: see the Autoconf documentation" >&5
20900echo "$as_me: WARNING: tclInt.h: see the Autoconf documentation" >&2;}
20901 { echo "$as_me:$LINENO: WARNING: tclInt.h: section \"Present But Cannot Be Compiled\"" >&5
20902echo "$as_me: WARNING: tclInt.h: section \"Present But Cannot Be Compiled\"" >&2;}
20903 { echo "$as_me:$LINENO: WARNING: tclInt.h: proceeding with the preprocessor's result" >&5
20904echo "$as_me: WARNING: tclInt.h: proceeding with the preprocessor's result" >&2;}
20905 { echo "$as_me:$LINENO: WARNING: tclInt.h: in the future, the compiler will take precedence" >&5
20906echo "$as_me: WARNING: tclInt.h: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
20907 (
20908 cat <<\_ASBOX
20909## ------------------------------------------ ##
20910## Report this to the AC_PACKAGE_NAME lists. ##
20911## ------------------------------------------ ##
20912_ASBOX
20913 ) |
20914 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
20915 ;;
20916esac
b4e70030
JB
20917echo "$as_me:$LINENO: checking for tclInt.h" >&5
20918echo $ECHO_N "checking for tclInt.h... $ECHO_C" >&6
bec39cab
AC
20919if test "${ac_cv_header_tclInt_h+set}" = set; then
20920 echo $ECHO_N "(cached) $ECHO_C" >&6
20921else
20922 ac_cv_header_tclInt_h=$ac_header_preproc
20923fi
b4e70030
JB
20924echo "$as_me:$LINENO: result: $ac_cv_header_tclInt_h" >&5
20925echo "${ECHO_T}$ac_cv_header_tclInt_h" >&6
bec39cab
AC
20926
20927fi
20928if test $ac_cv_header_tclInt_h = yes; then
3fc11d3e
JM
20929 ac_cv_c_tclh=installed
20930else
bec39cab 20931 ac_cv_c_tclh=""
3fc11d3e
JM
20932fi
20933
bec39cab 20934
3fc11d3e
JM
20935fi
20936
20937fi
20938
20939if test x"${ac_cv_c_tclh}" = x ; then
20940 TCLHDIR="# no Tcl private headers found"
bec39cab
AC
20941 { { echo "$as_me:$LINENO: error: Can't find Tcl private headers" >&5
20942echo "$as_me: error: Can't find Tcl private headers" >&2;}
20943 { (exit 1); exit 1; }; }
3fc11d3e
JM
20944fi
20945if test x"${ac_cv_c_tclh}" != x ; then
20946 no_tcl=""
20947 if test x"${ac_cv_c_tclh}" = x"installed" ; then
b4e70030
JB
20948 echo "$as_me:$LINENO: result: is installed" >&5
20949echo "${ECHO_T}is installed" >&6
3fc11d3e
JM
20950 TCLHDIR=""
20951 else
b4e70030
JB
20952 echo "$as_me:$LINENO: result: found in ${ac_cv_c_tclh}" >&5
20953echo "${ECHO_T}found in ${ac_cv_c_tclh}" >&6
3fc11d3e
JM
20954 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
20955 TCLHDIR="-I${ac_cv_c_tclh}"
20956 fi
20957fi
20958
20959
20960
bec39cab 20961
3fc11d3e
JM
20962#
20963# Ok, lets find the tk source trees so we can use the headers
20964# If the directory (presumably symlink) named "tk" exists, use that one
20965# in preference to any others. Same logic is used when choosing library
20966# and again with Tcl. The search order is the best place to look first, then in
20967# decreasing significance. The loop breaks if the trigger file is found.
20968# Note the gross little conversion here of srcdir by cd'ing to the found
20969# directory. This converts the path from a relative to an absolute, so
20970# recursive cache variables for the path will work right. We check all
20971# the possible paths in one loop rather than many seperate loops to speed
20972# things up.
20973# the alternative search directory is involked by --with-tkinclude
20974#
20975no_tk=true
b4e70030
JB
20976echo "$as_me:$LINENO: checking for Tk private headers" >&5
20977echo $ECHO_N "checking for Tk private headers... $ECHO_C" >&6
bec39cab 20978
b4e70030 20979# Check whether --with-tkinclude or --without-tkinclude was given.
3fc11d3e 20980if test "${with_tkinclude+set}" = set; then
b4e70030
JB
20981 withval="$with_tkinclude"
20982 with_tkinclude=${withval}
20983fi;
bec39cab
AC
20984if test "${ac_cv_c_tkh+set}" = set; then
20985 echo $ECHO_N "(cached) $ECHO_C" >&6
3fc11d3e 20986else
bec39cab 20987
3fc11d3e
JM
20988# first check to see if --with-tkinclude was specified
20989if test x"${with_tkinclude}" != x ; then
20990 if test -f ${with_tkinclude}/tk.h ; then
20991 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
20992 elif test -f ${with_tkinclude}/generic/tk.h ; then
20993 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
20994 else
bec39cab
AC
20995 { { echo "$as_me:$LINENO: error: ${with_tkinclude} directory doesn't contain private headers" >&5
20996echo "$as_me: error: ${with_tkinclude} directory doesn't contain private headers" >&2;}
20997 { (exit 1); exit 1; }; }
3fc11d3e
JM
20998 fi
20999fi
21000
21001# next check if it came with Tk configuration file
21002if test x"${ac_cv_c_tkconfig}" = x ; then
21003 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
21004 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
21005 fi
21006fi
21007
21008# next check in private source directory
21009#
21010# since ls returns lowest version numbers first, reverse its output
21011if test x"${ac_cv_c_tkh}" = x ; then
21012 for i in \
21013 ${srcdir}/../tk \
21014 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
21015 ${srcdir}/../../tk \
21016 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
21017 ${srcdir}/../../../tk \
21018 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
21019 if test -f $i/generic/tk.h ; then
21020 ac_cv_c_tkh=`(cd $i/generic; pwd)`
21021 break
21022 fi
21023 done
21024fi
21025# finally check in a few common install locations
21026#
21027# since ls returns lowest version numbers first, reverse its output
21028if test x"${ac_cv_c_tkh}" = x ; then
21029 for i in \
21030 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
21031 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
21032 /usr/local/src/tk \
21033 /usr/local/lib/tk \
21034 ${prefix}/include ; do
21035 if test -f $i/generic/tk.h ; then
21036 ac_cv_c_tkh=`(cd $i/generic; pwd)`
21037 break
21038 fi
21039 done
21040fi
21041# see if one is installed
21042if test x"${ac_cv_c_tkh}" = x ; then
bec39cab 21043 if test "${ac_cv_header_tk_h+set}" = set; then
b4e70030
JB
21044 echo "$as_me:$LINENO: checking for tk.h" >&5
21045echo $ECHO_N "checking for tk.h... $ECHO_C" >&6
bec39cab
AC
21046if test "${ac_cv_header_tk_h+set}" = set; then
21047 echo $ECHO_N "(cached) $ECHO_C" >&6
21048fi
b4e70030
JB
21049echo "$as_me:$LINENO: result: $ac_cv_header_tk_h" >&5
21050echo "${ECHO_T}$ac_cv_header_tk_h" >&6
bec39cab
AC
21051else
21052 # Is the header compilable?
b4e70030
JB
21053echo "$as_me:$LINENO: checking tk.h usability" >&5
21054echo $ECHO_N "checking tk.h usability... $ECHO_C" >&6
bec39cab
AC
21055cat >conftest.$ac_ext <<_ACEOF
21056/* confdefs.h. */
21057_ACEOF
21058cat confdefs.h >>conftest.$ac_ext
21059cat >>conftest.$ac_ext <<_ACEOF
21060/* end confdefs.h. */
21061$ac_includes_default
3fc11d3e 21062#include <tk.h>
bec39cab
AC
21063_ACEOF
21064rm -f conftest.$ac_objext
21065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21066 (eval $ac_compile) 2>conftest.er1
21067 ac_status=$?
21068 grep -v '^ *+' conftest.er1 >conftest.err
21069 rm -f conftest.er1
21070 cat conftest.err >&5
21071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21072 (exit $ac_status); } &&
b4e70030
JB
21073 { ac_try='test -z "$ac_c_werror_flag"
21074 || test ! -s conftest.err'
bec39cab
AC
21075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21076 (eval $ac_try) 2>&5
21077 ac_status=$?
21078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21079 (exit $ac_status); }; } &&
21080 { ac_try='test -s conftest.$ac_objext'
21081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21082 (eval $ac_try) 2>&5
21083 ac_status=$?
21084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21085 (exit $ac_status); }; }; then
21086 ac_header_compiler=yes
21087else
21088 echo "$as_me: failed program was:" >&5
21089sed 's/^/| /' conftest.$ac_ext >&5
21090
b4e70030 21091ac_header_compiler=no
bec39cab
AC
21092fi
21093rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
21094echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21095echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
21096
21097# Is the header present?
b4e70030
JB
21098echo "$as_me:$LINENO: checking tk.h presence" >&5
21099echo $ECHO_N "checking tk.h presence... $ECHO_C" >&6
bec39cab
AC
21100cat >conftest.$ac_ext <<_ACEOF
21101/* confdefs.h. */
21102_ACEOF
21103cat confdefs.h >>conftest.$ac_ext
21104cat >>conftest.$ac_ext <<_ACEOF
21105/* end confdefs.h. */
21106#include <tk.h>
21107_ACEOF
21108if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21109 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21110 ac_status=$?
21111 grep -v '^ *+' conftest.er1 >conftest.err
21112 rm -f conftest.er1
21113 cat conftest.err >&5
21114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21115 (exit $ac_status); } >/dev/null; then
21116 if test -s conftest.err; then
21117 ac_cpp_err=$ac_c_preproc_warn_flag
21118 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21119 else
21120 ac_cpp_err=
21121 fi
21122else
21123 ac_cpp_err=yes
3fc11d3e 21124fi
bec39cab
AC
21125if test -z "$ac_cpp_err"; then
21126 ac_header_preproc=yes
21127else
21128 echo "$as_me: failed program was:" >&5
21129sed 's/^/| /' conftest.$ac_ext >&5
21130
21131 ac_header_preproc=no
21132fi
21133rm -f conftest.err conftest.$ac_ext
b4e70030
JB
21134echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21135echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
21136
21137# So? What about this header?
21138case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21139 yes:no: )
21140 { echo "$as_me:$LINENO: WARNING: tk.h: accepted by the compiler, rejected by the preprocessor!" >&5
21141echo "$as_me: WARNING: tk.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21142 { echo "$as_me:$LINENO: WARNING: tk.h: proceeding with the compiler's result" >&5
21143echo "$as_me: WARNING: tk.h: proceeding with the compiler's result" >&2;}
21144 ac_header_preproc=yes
21145 ;;
21146 no:yes:* )
21147 { echo "$as_me:$LINENO: WARNING: tk.h: present but cannot be compiled" >&5
21148echo "$as_me: WARNING: tk.h: present but cannot be compiled" >&2;}
21149 { echo "$as_me:$LINENO: WARNING: tk.h: check for missing prerequisite headers?" >&5
21150echo "$as_me: WARNING: tk.h: check for missing prerequisite headers?" >&2;}
21151 { echo "$as_me:$LINENO: WARNING: tk.h: see the Autoconf documentation" >&5
21152echo "$as_me: WARNING: tk.h: see the Autoconf documentation" >&2;}
21153 { echo "$as_me:$LINENO: WARNING: tk.h: section \"Present But Cannot Be Compiled\"" >&5
21154echo "$as_me: WARNING: tk.h: section \"Present But Cannot Be Compiled\"" >&2;}
21155 { echo "$as_me:$LINENO: WARNING: tk.h: proceeding with the preprocessor's result" >&5
21156echo "$as_me: WARNING: tk.h: proceeding with the preprocessor's result" >&2;}
21157 { echo "$as_me:$LINENO: WARNING: tk.h: in the future, the compiler will take precedence" >&5
21158echo "$as_me: WARNING: tk.h: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
21159 (
21160 cat <<\_ASBOX
21161## ------------------------------------------ ##
21162## Report this to the AC_PACKAGE_NAME lists. ##
21163## ------------------------------------------ ##
21164_ASBOX
21165 ) |
21166 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
21167 ;;
21168esac
b4e70030
JB
21169echo "$as_me:$LINENO: checking for tk.h" >&5
21170echo $ECHO_N "checking for tk.h... $ECHO_C" >&6
bec39cab
AC
21171if test "${ac_cv_header_tk_h+set}" = set; then
21172 echo $ECHO_N "(cached) $ECHO_C" >&6
21173else
21174 ac_cv_header_tk_h=$ac_header_preproc
21175fi
b4e70030
JB
21176echo "$as_me:$LINENO: result: $ac_cv_header_tk_h" >&5
21177echo "${ECHO_T}$ac_cv_header_tk_h" >&6
bec39cab 21178
3fc11d3e 21179fi
bec39cab 21180if test $ac_cv_header_tk_h = yes; then
3fc11d3e
JM
21181 ac_cv_c_tkh=installed
21182else
bec39cab 21183 ac_cv_c_tkh=""
3fc11d3e
JM
21184fi
21185
bec39cab 21186
3fc11d3e
JM
21187fi
21188
21189fi
21190
21191if test x"${ac_cv_c_tkh}" != x ; then
21192 no_tk=""
21193 if test x"${ac_cv_c_tkh}" = x"installed" ; then
b4e70030
JB
21194 echo "$as_me:$LINENO: result: is installed" >&5
21195echo "${ECHO_T}is installed" >&6
3fc11d3e
JM
21196 TKHDIR=""
21197 else
b4e70030
JB
21198 echo "$as_me:$LINENO: result: found in ${ac_cv_c_tkh}" >&5
21199echo "${ECHO_T}found in ${ac_cv_c_tkh}" >&6
3fc11d3e
JM
21200 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
21201 TKHDIR="-I${ac_cv_c_tkh}"
21202 fi
21203else
21204 TKHDIR="# no Tk directory found"
bec39cab
AC
21205 { echo "$as_me:$LINENO: WARNING: Can't find Tk private headers" >&5
21206echo "$as_me: WARNING: Can't find Tk private headers" >&2;}
3fc11d3e
JM
21207 no_tk=true
21208fi
21209
21210
21211
bec39cab 21212
b4e70030
JB
21213echo "$as_me:$LINENO: checking for Itcl private headers. srcdir=${srcdir}" >&5
21214echo $ECHO_N "checking for Itcl private headers. srcdir=${srcdir}... $ECHO_C" >&6
3fc11d3e
JM
21215if test x"${ac_cv_c_itclh}" = x ; then
21216 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
21217 if test -f $i/generic/itcl.h ; then
21218 ac_cv_c_itclh=`(cd $i/generic; pwd)`
21219 break
21220 fi
21221 done
21222fi
21223if test x"${ac_cv_c_itclh}" = x ; then
21224 ITCLHDIR="# no Itcl private headers found"
bec39cab
AC
21225 { { echo "$as_me:$LINENO: error: Can't find Itcl private headers" >&5
21226echo "$as_me: error: Can't find Itcl private headers" >&2;}
21227 { (exit 1); exit 1; }; }
3fc11d3e
JM
21228fi
21229if test x"${ac_cv_c_itclh}" != x ; then
21230 ITCLHDIR="-I${ac_cv_c_itclh}"
21231fi
21232# should always be here
21233# ITCLLIB="../itcl/itcl/unix/libitcl.a"
21234
21235#AC_SUBST(ITCLLIB)
21236
bec39cab 21237
b4e70030
JB
21238echo "$as_me:$LINENO: checking for Itk private headers. srcdir=${srcdir}" >&5
21239echo $ECHO_N "checking for Itk private headers. srcdir=${srcdir}... $ECHO_C" >&6
3fc11d3e
JM
21240if test x"${ac_cv_c_itkh}" = x ; then
21241 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
21242 if test -f $i/generic/itk.h ; then
21243 ac_cv_c_itkh=`(cd $i/generic; pwd)`
21244 break
21245 fi
21246 done
21247fi
21248if test x"${ac_cv_c_itkh}" = x ; then
21249 ITKHDIR="# no Itk private headers found"
bec39cab
AC
21250 { { echo "$as_me:$LINENO: error: Can't find Itk private headers" >&5
21251echo "$as_me: error: Can't find Itk private headers" >&2;}
21252 { (exit 1); exit 1; }; }
3fc11d3e
JM
21253fi
21254if test x"${ac_cv_c_itkh}" != x ; then
21255 ITKHDIR="-I${ac_cv_c_itkh}"
21256fi
21257# should always be here
21258# ITKLIB="../itcl/itk/unix/libitk.a"
21259
21260#AC_SUBST(ITKLIB)
21261
3fc11d3e 21262
dd2504ab
JM
21263
21264 # now look for Tk library stuff
21265
d91670b9 21266 tkdir="../tk/${configdir}/"
dd2504ab
JM
21267
21268 TK_DEPS="${tkdir}${TK_LIB_FILE}"
21269
3fc11d3e
JM
21270 # now look for Itcl library stuff
21271
bec39cab 21272
3fc11d3e
JM
21273#
21274# Ok, lets find the itcl configuration
bec39cab 21275# First, look for one uninstalled.
3fc11d3e
JM
21276# the alternative search directory is invoked by --with-itclconfig
21277#
21278
21279if test x"${no_itcl}" = x ; then
21280 # we reset no_itcl in case something fails here
21281 no_itcl=true
bec39cab 21282
b4e70030 21283# Check whether --with-itclconfig or --without-itclconfig was given.
3fc11d3e 21284if test "${with_itclconfig+set}" = set; then
b4e70030
JB
21285 withval="$with_itclconfig"
21286 with_itclconfig=${withval}
21287fi;
21288 echo "$as_me:$LINENO: checking for Itcl configuration" >&5
21289echo $ECHO_N "checking for Itcl configuration... $ECHO_C" >&6
bec39cab
AC
21290 if test "${ac_cv_c_itclconfig+set}" = set; then
21291 echo $ECHO_N "(cached) $ECHO_C" >&6
3fc11d3e 21292else
bec39cab 21293
3fc11d3e
JM
21294
21295 # First check to see if --with-itclconfig was specified.
21296 if test x"${with_itclconfig}" != x ; then
21297 if test -f "${with_itclconfig}/itclConfig.sh" ; then
21298 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
21299 else
bec39cab
AC
21300 { { echo "$as_me:$LINENO: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" >&5
21301echo "$as_me: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" >&2;}
21302 { (exit 1); exit 1; }; }
3fc11d3e
JM
21303 fi
21304 fi
21305
21306 # then check for a private Itcl library
21307 if test x"${ac_cv_c_itclconfig}" = x ; then
21308 for i in \
21309 ../itcl/itcl \
21310 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
21311 ../../itcl \
21312 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
21313 ../../../itcl \
21314 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
21315 if test -f "$i/itclConfig.sh" ; then
21316 ac_cv_c_itclconfig=`(cd $i; pwd)`
21317 break
21318 fi
21319 done
21320 fi
21321 # check in a few common install locations
21322 if test x"${ac_cv_c_itclconfig}" = x ; then
21323 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
21324 if test -f "$i/itclConfig.sh" ; then
21325 ac_cv_c_itclconfig=`(cd $i; pwd)`
21326 break
21327 fi
21328 done
21329 fi
21330 # check in a few other private locations
21331 if test x"${ac_cv_c_itclconfig}" = x ; then
21332 for i in \
21333 ${srcdir}/../itcl/itcl \
21334 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
21335 if test -f "$i/itclConfig.sh" ; then
21336 ac_cv_c_itclconfig=`(cd $i; pwd)`
21337 break
21338 fi
21339 done
21340 fi
bec39cab 21341
3fc11d3e
JM
21342fi
21343
21344 if test x"${ac_cv_c_itclconfig}" = x ; then
21345 ITCLCONFIG="# no Itcl configs found"
bec39cab
AC
21346 { echo "$as_me:$LINENO: WARNING: Can't find Itcl configuration definitions" >&5
21347echo "$as_me: WARNING: Can't find Itcl configuration definitions" >&2;}
3fc11d3e
JM
21348 else
21349 no_itcl=
21350 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
b4e70030
JB
21351 echo "$as_me:$LINENO: result: found $ITCLCONFIG" >&5
21352echo "${ECHO_T}found $ITCLCONFIG" >&6
3fc11d3e
JM
21353 fi
21354fi
21355
21356 if test -z "${no_itcl}"; then
bec39cab 21357
3fc11d3e
JM
21358 if test -f "$ITCLCONFIG" ; then
21359 . $ITCLCONFIG
21360 fi
21361
3fc11d3e 21362
3fc11d3e
JM
21363
21364
bec39cab
AC
21365
21366
21367
21368
21369
21370
21371
3fc11d3e
JM
21372
21373 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 21374 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
21375 fi
21376
bec39cab 21377
3fc11d3e 21378 # now look for Itk library stuff
bec39cab 21379
3fc11d3e
JM
21380#
21381# Ok, lets find the itk configuration
bec39cab 21382# First, look for one uninstalled.
3fc11d3e
JM
21383# the alternative search directory is invoked by --with-itkconfig
21384#
21385
21386if test x"${no_itk}" = x ; then
21387 # we reset no_itk in case something fails here
21388 no_itk=true
bec39cab 21389
b4e70030 21390# Check whether --with-itkconfig or --without-itkconfig was given.
3fc11d3e 21391if test "${with_itkconfig+set}" = set; then
b4e70030
JB
21392 withval="$with_itkconfig"
21393 with_itkconfig=${withval}
21394fi;
21395 echo "$as_me:$LINENO: checking for Itk configuration" >&5
21396echo $ECHO_N "checking for Itk configuration... $ECHO_C" >&6
bec39cab
AC
21397 if test "${ac_cv_c_itkconfig+set}" = set; then
21398 echo $ECHO_N "(cached) $ECHO_C" >&6
3fc11d3e 21399else
bec39cab 21400
3fc11d3e
JM
21401
21402 # First check to see if --with-itkconfig was specified.
21403 if test x"${with_itkconfig}" != x ; then
21404 if test -f "${with_itkconfig}/itkConfig.sh" ; then
21405 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
21406 else
bec39cab
AC
21407 { { echo "$as_me:$LINENO: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" >&5
21408echo "$as_me: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" >&2;}
21409 { (exit 1); exit 1; }; }
3fc11d3e
JM
21410 fi
21411 fi
21412
21413 # then check for a private Itk library
21414 if test x"${ac_cv_c_itkconfig}" = x ; then
21415 for i in \
21416 ../itcl/itk \
21417 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
21418 ../../itk \
21419 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
21420 ../../../itk \
21421 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
21422 if test -f "$i/itkConfig.sh" ; then
21423 ac_cv_c_itkconfig=`(cd $i; pwd)`
21424 break
21425 fi
21426 done
21427 fi
21428 # check in a few common install locations
21429 if test x"${ac_cv_c_itkconfig}" = x ; then
21430 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
21431 if test -f "$i/itkConfig.sh" ; then
21432 ac_cv_c_itkconfig=`(cd $i; pwd)`
21433 break
21434 fi
21435 done
21436 fi
21437 # check in a few other private locations
21438 if test x"${ac_cv_c_itkconfig}" = x ; then
21439 for i in \
21440 ${srcdir}/../itcl/itk \
21441 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
21442 if test -f "$i/itkConfig.sh" ; then
21443 ac_cv_c_itkconfig=`(cd $i; pwd)`
21444 break
21445 fi
21446 done
21447 fi
bec39cab 21448
3fc11d3e
JM
21449fi
21450
21451 if test x"${ac_cv_c_itkconfig}" = x ; then
21452 ITKCONFIG="# no Itk configs found"
bec39cab
AC
21453 { echo "$as_me:$LINENO: WARNING: Can't find Itk configuration definitions" >&5
21454echo "$as_me: WARNING: Can't find Itk configuration definitions" >&2;}
3fc11d3e
JM
21455 else
21456 no_itk=
21457 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
b4e70030
JB
21458 echo "$as_me:$LINENO: result: found $ITKCONFIG" >&5
21459echo "${ECHO_T}found $ITKCONFIG" >&6
3fc11d3e
JM
21460 fi
21461fi
21462
21463
bec39cab
AC
21464 if test -z "${no_itcl}"; then
21465
21466 if test -f "$ITKCONFIG" ; then
21467 . $ITKCONFIG
21468 fi
21469
21470
21471
21472
21473
21474
3fc11d3e 21475
3fc11d3e 21476
3fc11d3e
JM
21477
21478
3fc11d3e
JM
21479
21480
3fc11d3e 21481 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 21482 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
21483 fi
21484
4226a5a5 21485 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
21486
21487 # Include some libraries that Tcl and Tk want.
b2a1bd4f 21488 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
21489 # Yes, the ordering seems wrong here. But it isn't.
21490 # TK_LIBS is the list of libraries that need to be linked
21491 # after Tcl/Tk. Note that this isn't put into LIBS. If it
21492 # were in LIBS then any link tests after this point would
21493 # try to include things like `$(LIBGUI)', which wouldn't work.
21494 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
21495
21496 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
21497 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
21498 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
33f8ca73
AC
21499 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
21500 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
21501 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
21502 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e
JM
21503
21504 if test x$gdb_cv_os_cygwin = xyes; then
21505 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
21506 WIN32LDAPP="-Wl,--subsystem,console"
21507 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
21508 fi
21509 fi
21510 fi
ffc6a242 21511
b4e70030
JB
21512
21513
21514subdirs="$subdirs gdbtk"
3ace7edb 21515
3fc11d3e
JM
21516fi
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
dd2504ab 21530
b4e70030
JB
21531echo "$as_me:$LINENO: checking for X" >&5
21532echo $ECHO_N "checking for X... $ECHO_C" >&6
bec39cab 21533
c906108c 21534
b4e70030 21535# Check whether --with-x or --without-x was given.
c906108c 21536if test "${with_x+set}" = set; then
b4e70030 21537 withval="$with_x"
c906108c 21538
b4e70030 21539fi;
c906108c
SS
21540# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
21541if test "x$with_x" = xno; then
21542 # The user explicitly disabled X.
21543 have_x=disabled
21544else
21545 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
21546 # Both variables are already set.
21547 have_x=yes
21548 else
bec39cab
AC
21549 if test "${ac_cv_have_x+set}" = set; then
21550 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
21551else
21552 # One or both of the vars are not set, and there is no cached value.
bec39cab 21553ac_x_includes=no ac_x_libraries=no
b4e70030 21554rm -fr conftest.dir
bec39cab
AC
21555if mkdir conftest.dir; then
21556 cd conftest.dir
c906108c 21557 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
bec39cab 21558 cat >Imakefile <<'_ACEOF'
c906108c
SS
21559acfindx:
21560 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
bec39cab 21561_ACEOF
b4e70030 21562 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c
SS
21563 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
21564 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
21565 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
21566 for ac_extension in a so sl; do
21567 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
bec39cab
AC
21568 test -f $ac_im_libdir/libX11.$ac_extension; then
21569 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
21570 fi
21571 done
21572 # Screen out bogus values from the imake configuration. They are
21573 # bogus both because they are the default anyway, and because
21574 # using them would break gcc on systems where it needs fixed includes.
bec39cab 21575 case $ac_im_incroot in
b4e70030 21576 /usr/include) ;;
bec39cab 21577 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 21578 esac
bec39cab 21579 case $ac_im_usrlibdir in
c906108c 21580 /usr/lib | /lib) ;;
bec39cab 21581 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
21582 esac
21583 fi
21584 cd ..
b4e70030 21585 rm -fr conftest.dir
c906108c
SS
21586fi
21587
bec39cab
AC
21588# Standard set of common directories for X headers.
21589# Check X11 before X11Rn because it is often a symlink to the current release.
21590ac_x_header_dirs='
21591/usr/X11/include
21592/usr/X11R6/include
21593/usr/X11R5/include
21594/usr/X11R4/include
21595
21596/usr/include/X11
21597/usr/include/X11R6
21598/usr/include/X11R5
21599/usr/include/X11R4
21600
21601/usr/local/X11/include
21602/usr/local/X11R6/include
21603/usr/local/X11R5/include
21604/usr/local/X11R4/include
21605
21606/usr/local/include/X11
21607/usr/local/include/X11R6
21608/usr/local/include/X11R5
21609/usr/local/include/X11R4
21610
21611/usr/X386/include
21612/usr/x386/include
21613/usr/XFree86/include/X11
21614
21615/usr/include
21616/usr/local/include
21617/usr/unsupported/include
21618/usr/athena/include
21619/usr/local/x11r5/include
21620/usr/lpp/Xamples/include
21621
21622/usr/openwin/include
21623/usr/openwin/share/include'
21624
21625if test "$ac_x_includes" = no; then
b4e70030 21626 # Guess where to find include files, by looking for Intrinsic.h.
c906108c 21627 # First, try using that file with no special directory specified.
bec39cab
AC
21628 cat >conftest.$ac_ext <<_ACEOF
21629/* confdefs.h. */
21630_ACEOF
21631cat confdefs.h >>conftest.$ac_ext
21632cat >>conftest.$ac_ext <<_ACEOF
21633/* end confdefs.h. */
b4e70030 21634#include <X11/Intrinsic.h>
bec39cab
AC
21635_ACEOF
21636if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21637 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21638 ac_status=$?
21639 grep -v '^ *+' conftest.er1 >conftest.err
21640 rm -f conftest.er1
21641 cat conftest.err >&5
21642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21643 (exit $ac_status); } >/dev/null; then
21644 if test -s conftest.err; then
21645 ac_cpp_err=$ac_c_preproc_warn_flag
21646 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21647 else
21648 ac_cpp_err=
21649 fi
21650else
21651 ac_cpp_err=yes
21652fi
21653if test -z "$ac_cpp_err"; then
c906108c
SS
21654 # We can compile using X headers with no special include directory.
21655ac_x_includes=
21656else
bec39cab
AC
21657 echo "$as_me: failed program was:" >&5
21658sed 's/^/| /' conftest.$ac_ext >&5
21659
21660 for ac_dir in $ac_x_header_dirs; do
b4e70030 21661 if test -r "$ac_dir/X11/Intrinsic.h"; then
bec39cab
AC
21662 ac_x_includes=$ac_dir
21663 break
21664 fi
21665done
c906108c 21666fi
bec39cab
AC
21667rm -f conftest.err conftest.$ac_ext
21668fi # $ac_x_includes = no
c906108c 21669
bec39cab 21670if test "$ac_x_libraries" = no; then
c906108c 21671 # Check for the libraries.
c906108c
SS
21672 # See if we find them without any special options.
21673 # Don't add to $LIBS permanently.
bec39cab 21674 ac_save_LIBS=$LIBS
4e8d927d 21675 LIBS="-lXt $LIBS"
bec39cab
AC
21676 cat >conftest.$ac_ext <<_ACEOF
21677/* confdefs.h. */
21678_ACEOF
21679cat confdefs.h >>conftest.$ac_ext
21680cat >>conftest.$ac_ext <<_ACEOF
21681/* end confdefs.h. */
b4e70030 21682#include <X11/Intrinsic.h>
bec39cab
AC
21683int
21684main ()
21685{
b4e70030 21686XtMalloc (0)
bec39cab
AC
21687 ;
21688 return 0;
21689}
21690_ACEOF
21691rm -f conftest.$ac_objext conftest$ac_exeext
21692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21693 (eval $ac_link) 2>conftest.er1
21694 ac_status=$?
21695 grep -v '^ *+' conftest.er1 >conftest.err
21696 rm -f conftest.er1
21697 cat conftest.err >&5
21698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21699 (exit $ac_status); } &&
b4e70030
JB
21700 { ac_try='test -z "$ac_c_werror_flag"
21701 || test ! -s conftest.err'
bec39cab
AC
21702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21703 (eval $ac_try) 2>&5
21704 ac_status=$?
21705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21706 (exit $ac_status); }; } &&
21707 { ac_try='test -s conftest$ac_exeext'
21708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21709 (eval $ac_try) 2>&5
21710 ac_status=$?
21711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21712 (exit $ac_status); }; }; then
21713 LIBS=$ac_save_LIBS
c906108c
SS
21714# We can link X programs with no special library path.
21715ac_x_libraries=
21716else
bec39cab
AC
21717 echo "$as_me: failed program was:" >&5
21718sed 's/^/| /' conftest.$ac_ext >&5
21719
b4e70030 21720LIBS=$ac_save_LIBS
bec39cab 21721for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 21722do
bec39cab 21723 # Don't even attempt the hair of trying to link an X program!
c906108c 21724 for ac_extension in a so sl; do
b4e70030 21725 if test -r $ac_dir/libXt.$ac_extension; then
c906108c
SS
21726 ac_x_libraries=$ac_dir
21727 break 2
21728 fi
21729 done
21730done
21731fi
bec39cab
AC
21732rm -f conftest.err conftest.$ac_objext \
21733 conftest$ac_exeext conftest.$ac_ext
21734fi # $ac_x_libraries = no
c906108c 21735
bec39cab 21736if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
c906108c
SS
21737 # Didn't find X anywhere. Cache the known absence of X.
21738 ac_cv_have_x="have_x=no"
21739else
21740 # Record where we found X for the cache.
21741 ac_cv_have_x="have_x=yes \
bec39cab 21742 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
c906108c
SS
21743fi
21744fi
bec39cab 21745
c906108c
SS
21746 fi
21747 eval "$ac_cv_have_x"
21748fi # $with_x != no
21749
21750if test "$have_x" != yes; then
b4e70030
JB
21751 echo "$as_me:$LINENO: result: $have_x" >&5
21752echo "${ECHO_T}$have_x" >&6
c906108c
SS
21753 no_x=yes
21754else
21755 # If each of the values was on the command line, it overrides each guess.
21756 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
21757 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
21758 # Update the cache value to reflect the command line values.
21759 ac_cv_have_x="have_x=yes \
21760 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
b4e70030
JB
21761 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
21762echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
c906108c
SS
21763fi
21764
21765
9cc52bde
MK
21766# Check whether we should enable the TUI, but only do so if we really
21767# can.
21768if test x"$enable_tui" = xyes; then
21769 if test -d $srcdir/tui; then
21770 if test "$ac_cv_search_waddstr" != no; then
21771 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
21772 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
21773 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
21774 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
21775 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
21776 CONFIG_ALL="${CONFIG_ALL} all-tui"
21777 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
21778 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
21779 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
21780 else
bec39cab
AC
21781 { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
21782echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
9cc52bde
MK
21783 fi
21784 fi
21785fi
21786
bec39cab
AC
21787# Unlike the sim directory, whether a simulator is linked is controlled by
21788# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
7a292a7a
SS
21789# This code just checks for a few cases where we'd like to ignore those
21790# definitions, even when they're present in the '.mt' file. These cases
21791# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 21792# not part of the source tree.
7a292a7a 21793#
b4e70030 21794# Check whether --enable-sim or --disable-sim was given.
7a292a7a 21795if test "${enable_sim+set}" = set; then
b4e70030
JB
21796 enableval="$enable_sim"
21797 echo "enable_sim = $enable_sim";
7a292a7a
SS
21798 echo "enableval = ${enableval}";
21799 case "${enableval}" in
21800 yes) ignore_sim=false ;;
21801 no) ignore_sim=true ;;
21802 *) ignore_sim=false ;;
21803 esac
21804else
21805 ignore_sim=false
b4e70030 21806fi;
7a292a7a
SS
21807
21808if test ! -d "${srcdir}/../sim"; then
21809 ignore_sim=true
21810fi
21811
21812if test "${ignore_sim}" = "true"; then
21813 IGNORE_SIM="SIM="
21814 IGNORE_SIM_OBS="SIM_OBS="
21815else
21816 IGNORE_SIM=""
21817 IGNORE_SIM_OBS=""
60ca704f
SE
21818
21819cat >>confdefs.h <<\_ACEOF
7a292a7a 21820#define WITH_SIM 1
bec39cab 21821_ACEOF
7a292a7a
SS
21822
21823fi
21824
21825
21826
c906108c
SS
21827
21828
21829
21830
21831
21832
dfcd3bfb 21833
e56ac5c3
AC
21834
21835
b3a90332
AC
21836
21837
c35f4ffc 21838# List of host floatformats.
bec39cab
AC
21839
21840cat >>confdefs.h <<_ACEOF
c35f4ffc 21841#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 21842_ACEOF
c35f4ffc 21843
bec39cab
AC
21844
21845cat >>confdefs.h <<_ACEOF
c35f4ffc 21846#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
21847_ACEOF
21848
c35f4ffc 21849
bec39cab 21850cat >>confdefs.h <<_ACEOF
c35f4ffc 21851#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 21852_ACEOF
c35f4ffc
AC
21853
21854
c906108c
SS
21855# target_subdir is used by the testsuite to find the target libraries.
21856target_subdir=
21857if test "${host}" != "${target}"; then
21858 target_subdir="${target_alias}/"
21859fi
21860
21861
21862frags=
0dad8a66
MK
21863if test "${target}" = "${host}"; then
21864 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
21865 if test ! -f ${host_makefile_frag}; then
bec39cab
AC
21866 { { echo "$as_me:$LINENO: error: \"*** Gdb does not support native target ${host}\"" >&5
21867echo "$as_me: error: \"*** Gdb does not support native target ${host}\"" >&2;}
21868 { (exit 1); exit 1; }; }
0dad8a66
MK
21869 fi
21870 frags="$frags $host_makefile_frag"
21871else
21872 host_makefile_frag=/dev/null
c906108c 21873fi
c906108c
SS
21874
21875target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
21876if test ! -f ${target_makefile_frag}; then
bec39cab
AC
21877 { { echo "$as_me:$LINENO: error: \"*** Gdb does not support target ${target}\"" >&5
21878echo "$as_me: error: \"*** Gdb does not support target ${target}\"" >&2;}
21879 { (exit 1); exit 1; }; }
c906108c
SS
21880fi
21881frags="$frags $target_makefile_frag"
21882
21883
21884
21885
21886
21887hostfile=`sed -n '
21888s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
21889' ${host_makefile_frag}`
21890
21891targetfile=`sed -n '
2c0fc042 21892s/DEPRECATED_TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
c906108c
SS
21893' ${target_makefile_frag}`
21894
c906108c 21895if test "${target}" = "${host}"; then
a85f51e7
DJ
21896# We pick this up from the host configuration file (.mh) because we
21897# do not have a native configuration Makefile fragment.
c906108c
SS
21898nativefile=`sed -n '
21899s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
21900' ${host_makefile_frag}`
c906108c
SS
21901fi
21902
21903
b00a8037 21904if test x"${gdb_osabi}" != x ; then
bec39cab
AC
21905
21906cat >>confdefs.h <<_ACEOF
b00a8037 21907#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 21908_ACEOF
b00a8037
DJ
21909
21910fi
21911
8dcde887 21912# Enable multi-ice-gdb-server.
b4e70030 21913# Check whether --enable-multi-ice or --disable-multi-ice was given.
8dcde887 21914if test "${enable_multi_ice+set}" = set; then
b4e70030
JB
21915 enableval="$enable_multi_ice"
21916 case $enableval in
8dcde887
MK
21917 yes | no)
21918 ;;
bec39cab
AC
21919 *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-multi-ice" >&5
21920echo "$as_me: error: bad value $enableval for --enable-multi-ice" >&2;}
21921 { (exit 1); exit 1; }; } ;;
8dcde887 21922 esac
b4e70030 21923fi;
4e8d927d 21924if test "x$enable_multi_ice" = xyes; then
b4e70030
JB
21925
21926
21927subdirs="$subdirs multi-ice"
3ace7edb 21928
a85f51e7
DJ
21929fi
21930
8dcde887
MK
21931# We only build gdbserver automatically if host and target are the same.
21932if test "x$target" = "x$host"; then
b4e70030
JB
21933 echo "$as_me:$LINENO: checking whether gdbserver is supported on this host" >&5
21934echo $ECHO_N "checking whether gdbserver is supported on this host... $ECHO_C" >&6
8dcde887 21935 if test "x$build_gdbserver" = xyes; then
b4e70030
JB
21936 echo "$as_me:$LINENO: result: yes" >&5
21937echo "${ECHO_T}yes" >&6
21938
21939
21940subdirs="$subdirs gdbserver"
3ace7edb 21941
8dcde887 21942 else
b4e70030
JB
21943 echo "$as_me:$LINENO: result: no" >&5
21944echo "${ECHO_T}no" >&6
8dcde887
MK
21945 fi
21946fi
21947
2c0fc042
AC
21948# If hostfile (XM_FILE) and/or targetfile (DEPRECATED_TM_FILE) and/or
21949# nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
21950# to an empty version.
c906108c
SS
21951
21952files=
21953links=
5a2402b8 21954
c906108c 21955rm -f xm.h
5a2402b8 21956xm_h=""
c906108c 21957if test "${hostfile}" != ""; then
5a2402b8 21958 xm_h=xm.h
0f475e27
AC
21959 case "${hostfile}" in
21960 xm-*.h ) GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" ;;
21961 * ) GDB_XM_FILE="${hostfile}"
21962 esac
5a2402b8
AC
21963 files="${files} ${GDB_XM_FILE}"
21964 links="${links} xm.h"
60ca704f
SE
21965
21966cat >>confdefs.h <<_ACEOF
b78960be 21967#define GDB_XM_FILE "${GDB_XM_FILE}"
bec39cab 21968_ACEOF
5a2402b8 21969
c906108c 21970fi
5a2402b8
AC
21971
21972
c906108c 21973rm -f tm.h
5a2402b8 21974tm_h=""
c906108c 21975if test "${targetfile}" != ""; then
5a2402b8 21976 tm_h=tm.h
0f475e27 21977 case "${targetfile}" in
b8c4aece 21978 tm-*.h ) GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" ;;
0f475e27
AC
21979 * ) GDB_TM_FILE="${targetfile}"
21980 esac
5a2402b8
AC
21981 files="${files} ${GDB_TM_FILE}"
21982 links="${links} tm.h"
60ca704f
SE
21983
21984cat >>confdefs.h <<_ACEOF
b78960be 21985#define GDB_TM_FILE "${GDB_TM_FILE}"
bec39cab 21986_ACEOF
5a2402b8 21987
c906108c 21988fi
5a2402b8
AC
21989
21990
c906108c 21991rm -f nm.h
5a2402b8 21992nm_h=""
c906108c 21993if test "${nativefile}" != ""; then
5a2402b8 21994 nm_h=nm.h
0f475e27
AC
21995 case "${nativefile}" in
21996 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
21997 * ) GDB_NM_FILE="${nativefile}"
21998 esac
5a2402b8
AC
21999 files="${files} ${GDB_NM_FILE}"
22000 links="${links} nm.h"
60ca704f
SE
22001
22002cat >>confdefs.h <<_ACEOF
b78960be 22003#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 22004_ACEOF
5a2402b8 22005
c906108c 22006fi
5a2402b8
AC
22007
22008
bec39cab
AC
22009ac_sources="$files"
22010ac_dests="$links"
22011while test -n "$ac_sources"; do
22012 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
22013 set $ac_sources; ac_source=$1; shift; ac_sources=$*
22014 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
22015done
b4e70030 22016 ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
22017
22018
c906108c
SS
22019
22020
c906108c 22021
c906108c 22022
bec39cab
AC
22023cat >>confdefs.h <<\_ACEOF
22024#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
22025_ACEOF
c906108c 22026
234b45d4 22027
234b45d4
KB
22028
22029
22030
b4e70030 22031# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
234b45d4 22032if test "${with_libiconv_prefix+set}" = set; then
b4e70030
JB
22033 withval="$with_libiconv_prefix"
22034
234b45d4
KB
22035 for dir in `echo "$withval" | tr : ' '`; do
22036 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
22037 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
22038 done
234b45d4 22039
b4e70030 22040fi;
234b45d4 22041
b4e70030
JB
22042 echo "$as_me:$LINENO: checking for iconv" >&5
22043echo $ECHO_N "checking for iconv... $ECHO_C" >&6
bec39cab
AC
22044if test "${am_cv_func_iconv+set}" = set; then
22045 echo $ECHO_N "(cached) $ECHO_C" >&6
234b45d4 22046else
bec39cab 22047
234b45d4
KB
22048 am_cv_func_iconv="no, consider installing GNU libiconv"
22049 am_cv_lib_iconv=no
bec39cab
AC
22050 cat >conftest.$ac_ext <<_ACEOF
22051/* confdefs.h. */
22052_ACEOF
22053cat confdefs.h >>conftest.$ac_ext
22054cat >>conftest.$ac_ext <<_ACEOF
22055/* end confdefs.h. */
234b45d4
KB
22056#include <stdlib.h>
22057#include <iconv.h>
bec39cab
AC
22058int
22059main ()
22060{
234b45d4
KB
22061iconv_t cd = iconv_open("","");
22062 iconv(cd,NULL,NULL,NULL,NULL);
22063 iconv_close(cd);
bec39cab
AC
22064 ;
22065 return 0;
22066}
22067_ACEOF
22068rm -f conftest.$ac_objext conftest$ac_exeext
22069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22070 (eval $ac_link) 2>conftest.er1
22071 ac_status=$?
22072 grep -v '^ *+' conftest.er1 >conftest.err
22073 rm -f conftest.er1
22074 cat conftest.err >&5
22075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22076 (exit $ac_status); } &&
b4e70030
JB
22077 { ac_try='test -z "$ac_c_werror_flag"
22078 || test ! -s conftest.err'
bec39cab
AC
22079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22080 (eval $ac_try) 2>&5
22081 ac_status=$?
22082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22083 (exit $ac_status); }; } &&
22084 { ac_try='test -s conftest$ac_exeext'
22085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22086 (eval $ac_try) 2>&5
22087 ac_status=$?
22088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22089 (exit $ac_status); }; }; then
234b45d4
KB
22090 am_cv_func_iconv=yes
22091else
bec39cab
AC
22092 echo "$as_me: failed program was:" >&5
22093sed 's/^/| /' conftest.$ac_ext >&5
22094
234b45d4 22095fi
bec39cab
AC
22096rm -f conftest.err conftest.$ac_objext \
22097 conftest$ac_exeext conftest.$ac_ext
234b45d4
KB
22098 if test "$am_cv_func_iconv" != yes; then
22099 am_save_LIBS="$LIBS"
22100 LIBS="$LIBS -liconv"
bec39cab
AC
22101 cat >conftest.$ac_ext <<_ACEOF
22102/* confdefs.h. */
22103_ACEOF
22104cat confdefs.h >>conftest.$ac_ext
22105cat >>conftest.$ac_ext <<_ACEOF
22106/* end confdefs.h. */
234b45d4
KB
22107#include <stdlib.h>
22108#include <iconv.h>
bec39cab
AC
22109int
22110main ()
22111{
234b45d4
KB
22112iconv_t cd = iconv_open("","");
22113 iconv(cd,NULL,NULL,NULL,NULL);
22114 iconv_close(cd);
bec39cab
AC
22115 ;
22116 return 0;
22117}
22118_ACEOF
22119rm -f conftest.$ac_objext conftest$ac_exeext
22120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22121 (eval $ac_link) 2>conftest.er1
22122 ac_status=$?
22123 grep -v '^ *+' conftest.er1 >conftest.err
22124 rm -f conftest.er1
22125 cat conftest.err >&5
22126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22127 (exit $ac_status); } &&
b4e70030
JB
22128 { ac_try='test -z "$ac_c_werror_flag"
22129 || test ! -s conftest.err'
bec39cab
AC
22130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22131 (eval $ac_try) 2>&5
22132 ac_status=$?
22133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22134 (exit $ac_status); }; } &&
22135 { ac_try='test -s conftest$ac_exeext'
22136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22137 (eval $ac_try) 2>&5
22138 ac_status=$?
22139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22140 (exit $ac_status); }; }; then
234b45d4
KB
22141 am_cv_lib_iconv=yes
22142 am_cv_func_iconv=yes
22143else
bec39cab
AC
22144 echo "$as_me: failed program was:" >&5
22145sed 's/^/| /' conftest.$ac_ext >&5
22146
234b45d4 22147fi
bec39cab
AC
22148rm -f conftest.err conftest.$ac_objext \
22149 conftest$ac_exeext conftest.$ac_ext
234b45d4
KB
22150 LIBS="$am_save_LIBS"
22151 fi
bec39cab
AC
22152
22153fi
b4e70030
JB
22154echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
22155echo "${ECHO_T}$am_cv_func_iconv" >&6
bec39cab
AC
22156 if test "$am_cv_func_iconv" = yes; then
22157
22158cat >>confdefs.h <<\_ACEOF
22159#define HAVE_ICONV 1
22160_ACEOF
22161
b4e70030
JB
22162 echo "$as_me:$LINENO: checking for iconv declaration" >&5
22163echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
bec39cab
AC
22164 if test "${am_cv_proto_iconv+set}" = set; then
22165 echo $ECHO_N "(cached) $ECHO_C" >&6
22166else
22167
22168 cat >conftest.$ac_ext <<_ACEOF
22169/* confdefs.h. */
22170_ACEOF
22171cat confdefs.h >>conftest.$ac_ext
22172cat >>conftest.$ac_ext <<_ACEOF
22173/* end confdefs.h. */
22174
22175#include <stdlib.h>
22176#include <iconv.h>
22177extern
22178#ifdef __cplusplus
22179"C"
22180#endif
22181#if defined(__STDC__) || defined(__cplusplus)
22182size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
22183#else
22184size_t iconv();
22185#endif
22186
22187int
22188main ()
22189{
22190
22191 ;
22192 return 0;
22193}
22194_ACEOF
22195rm -f conftest.$ac_objext
22196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22197 (eval $ac_compile) 2>conftest.er1
22198 ac_status=$?
22199 grep -v '^ *+' conftest.er1 >conftest.err
22200 rm -f conftest.er1
22201 cat conftest.err >&5
22202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22203 (exit $ac_status); } &&
b4e70030
JB
22204 { ac_try='test -z "$ac_c_werror_flag"
22205 || test ! -s conftest.err'
bec39cab
AC
22206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22207 (eval $ac_try) 2>&5
22208 ac_status=$?
22209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22210 (exit $ac_status); }; } &&
22211 { ac_try='test -s conftest.$ac_objext'
22212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22213 (eval $ac_try) 2>&5
22214 ac_status=$?
22215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22216 (exit $ac_status); }; }; then
22217 am_cv_proto_iconv_arg1=""
22218else
22219 echo "$as_me: failed program was:" >&5
22220sed 's/^/| /' conftest.$ac_ext >&5
22221
b4e70030 22222am_cv_proto_iconv_arg1="const"
bec39cab
AC
22223fi
22224rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22225 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);"
22226fi
22227
22228 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
b4e70030 22229 echo "$as_me:$LINENO: result: ${ac_t:-
bec39cab
AC
22230 }$am_cv_proto_iconv" >&5
22231echo "${ECHO_T}${ac_t:-
b4e70030 22232 }$am_cv_proto_iconv" >&6
bec39cab
AC
22233
22234cat >>confdefs.h <<_ACEOF
22235#define ICONV_CONST $am_cv_proto_iconv_arg1
22236_ACEOF
22237
22238 fi
22239 LIBICONV=
22240 if test "$am_cv_lib_iconv" = yes; then
22241 LIBICONV="-liconv"
22242 fi
22243
22244
22245
b4e70030
JB
22246 ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in"
22247 ac_config_commands="$ac_config_commands default"
bec39cab
AC
22248cat >confcache <<\_ACEOF
22249# This file is a shell script that caches the results of configure
22250# tests run on this system so they can be shared between configure
22251# scripts and configure runs, see configure's option --config-cache.
22252# It is not useful on other systems. If it contains results you don't
22253# want to keep, you may remove or edit it.
22254#
22255# config.status only pays attention to the cache file if you give it
22256# the --recheck option to rerun configure.
22257#
22258# `ac_cv_env_foo' variables (set or unset) will be overridden when
22259# loading this file, other *unset* `ac_cv_foo' will be assigned the
22260# following values.
22261
22262_ACEOF
22263
22264# The following way of writing the cache mishandles newlines in values,
22265# but we know of no workaround that is simple, portable, and efficient.
b4e70030 22266# So, don't put newlines in cache variables' values.
bec39cab
AC
22267# Ultrix sh set writes to stderr and can't be redirected directly,
22268# and sets the high bit in the cache file unless we assign to the vars.
b4e70030 22269{
bec39cab 22270 (set) 2>&1 |
b4e70030
JB
22271 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22272 *ac_space=\ *)
bec39cab
AC
22273 # `set' does not quote correctly, so add quotes (double-quote
22274 # substitution turns \\\\ into \\, and sed turns \\ into \).
22275 sed -n \
22276 "s/'/'\\\\''/g;
22277 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b4e70030 22278 ;;
bec39cab
AC
22279 *)
22280 # `set' quotes correctly as required by POSIX, so do not add quotes.
b4e70030
JB
22281 sed -n \
22282 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 22283 ;;
b4e70030
JB
22284 esac;
22285} |
bec39cab
AC
22286 sed '
22287 t clear
b4e70030 22288 : clear
bec39cab
AC
22289 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22290 t end
b4e70030
JB
22291 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22292 : end' >>confcache
bec39cab
AC
22293if diff $cache_file confcache >/dev/null 2>&1; then :; else
22294 if test -w $cache_file; then
b4e70030 22295 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
bec39cab
AC
22296 cat confcache >$cache_file
22297 else
b4e70030 22298 echo "not updating unwritable cache $cache_file"
bec39cab
AC
22299 fi
22300fi
22301rm -f confcache
22302
22303test "x$prefix" = xNONE && prefix=$ac_default_prefix
22304# Let make expand exec_prefix.
22305test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22306
b4e70030
JB
22307# VPATH may cause trouble with some makes, so we remove $(srcdir),
22308# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22309# trailing colons and then remove the whole line if VPATH becomes empty
22310# (actually we leave an empty line to preserve line numbers).
22311if test "x$srcdir" = x.; then
22312 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22313s/:*\$(srcdir):*/:/;
22314s/:*\${srcdir}:*/:/;
22315s/:*@srcdir@:*/:/;
22316s/^\([^=]*=[ ]*\):*/\1/;
22317s/:*$//;
22318s/^[^=]*=[ ]*$//;
22319}'
22320fi
22321
bec39cab
AC
22322DEFS=-DHAVE_CONFIG_H
22323
22324ac_libobjs=
22325ac_ltlibobjs=
22326for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22327 # 1. Remove the extension, and $U if already installed.
b4e70030
JB
22328 ac_i=`echo "$ac_i" |
22329 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22330 # 2. Add them.
22331 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22332 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
bec39cab
AC
22333done
22334LIBOBJS=$ac_libobjs
22335
22336LTLIBOBJS=$ac_ltlibobjs
22337
22338
85981d60
AC
22339if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
22340 { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
22341Usually this means the macro was only invoked conditionally." >&5
22342echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
22343Usually this means the macro was only invoked conditionally." >&2;}
22344 { (exit 1); exit 1; }; }
22345fi
bec39cab
AC
22346
22347: ${CONFIG_STATUS=./config.status}
22348ac_clean_files_save=$ac_clean_files
22349ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22350{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22351echo "$as_me: creating $CONFIG_STATUS" >&6;}
22352cat >$CONFIG_STATUS <<_ACEOF
22353#! $SHELL
22354# Generated by $as_me.
22355# Run this file to recreate the current configuration.
22356# Compiler output produced by configure, useful for debugging
22357# configure, is in config.log if it exists.
22358
22359debug=false
22360ac_cs_recheck=false
22361ac_cs_silent=false
22362SHELL=\${CONFIG_SHELL-$SHELL}
22363_ACEOF
22364
22365cat >>$CONFIG_STATUS <<\_ACEOF
22366## --------------------- ##
22367## M4sh Initialization. ##
22368## --------------------- ##
22369
22370# Be Bourne compatible
22371if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22372 emulate sh
22373 NULLCMD=:
22374 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22375 # is contrary to our usage. Disable this feature.
22376 alias -g '${1+"$@"}'='"$@"'
b4e70030
JB
22377elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22378 set -o posix
bec39cab
AC
22379fi
22380DUALCASE=1; export DUALCASE # for MKS sh
22381
22382# Support unset when possible.
22383if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22384 as_unset=unset
22385else
22386 as_unset=false
22387fi
22388
22389
22390# Work around bugs in pre-3.0 UWIN ksh.
b4e70030 22391$as_unset ENV MAIL MAILPATH
bec39cab
AC
22392PS1='$ '
22393PS2='> '
22394PS4='+ '
22395
22396# NLS nuisances.
22397for as_var in \
22398 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22399 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22400 LC_TELEPHONE LC_TIME
22401do
22402 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22403 eval $as_var=C; export $as_var
22404 else
b4e70030 22405 $as_unset $as_var
bec39cab
AC
22406 fi
22407done
22408
22409# Required to use basename.
b4e70030 22410if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
22411 as_expr=expr
22412else
22413 as_expr=false
22414fi
22415
b4e70030 22416if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
bec39cab
AC
22417 as_basename=basename
22418else
22419 as_basename=false
22420fi
22421
22422
22423# Name of the executable.
b4e70030 22424as_me=`$as_basename "$0" ||
bec39cab
AC
22425$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22426 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
22427 X"$0" : 'X\(/\)$' \| \
22428 . : '\(.\)' 2>/dev/null ||
bec39cab 22429echo X/"$0" |
b4e70030
JB
22430 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22431 /^X\/\(\/\/\)$/{ s//\1/; q; }
22432 /^X\/\(\/\).*/{ s//\1/; q; }
22433 s/.*/./; q'`
bec39cab 22434
b4e70030
JB
22435
22436# PATH needs CR, and LINENO needs CR and PATH.
22437# Avoid depending upon Character Ranges.
22438as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22439as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22440as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22441as_cr_digits='0123456789'
22442as_cr_alnum=$as_cr_Letters$as_cr_digits
22443
22444# The user is always right.
22445if test "${PATH_SEPARATOR+set}" != set; then
22446 echo "#! /bin/sh" >conf$$.sh
22447 echo "exit 0" >>conf$$.sh
22448 chmod +x conf$$.sh
22449 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22450 PATH_SEPARATOR=';'
22451 else
22452 PATH_SEPARATOR=:
22453 fi
22454 rm -f conf$$.sh
22455fi
bec39cab
AC
22456
22457
b4e70030
JB
22458 as_lineno_1=$LINENO
22459 as_lineno_2=$LINENO
22460 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22461 test "x$as_lineno_1" != "x$as_lineno_2" &&
22462 test "x$as_lineno_3" = "x$as_lineno_2" || {
22463 # Find who we are. Look in the path if we contain no path at all
22464 # relative or not.
22465 case $0 in
22466 *[\\/]* ) as_myself=$0 ;;
22467 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22468for as_dir in $PATH
22469do
22470 IFS=$as_save_IFS
22471 test -z "$as_dir" && as_dir=.
22472 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22473done
bec39cab 22474
b4e70030
JB
22475 ;;
22476 esac
22477 # We did not find ourselves, most probably we were run as `sh COMMAND'
22478 # in which case we are not to be found in the path.
22479 if test "x$as_myself" = x; then
22480 as_myself=$0
22481 fi
22482 if test ! -f "$as_myself"; then
22483 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22484echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22485 { (exit 1); exit 1; }; }
22486 fi
22487 case $CONFIG_SHELL in
22488 '')
22489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22490for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22491do
22492 IFS=$as_save_IFS
22493 test -z "$as_dir" && as_dir=.
22494 for as_base in sh bash ksh sh5; do
22495 case $as_dir in
22496 /*)
22497 if ("$as_dir/$as_base" -c '
bec39cab
AC
22498 as_lineno_1=$LINENO
22499 as_lineno_2=$LINENO
b4e70030 22500 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
bec39cab 22501 test "x$as_lineno_1" != "x$as_lineno_2" &&
b4e70030
JB
22502 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
22503 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22504 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
22505 CONFIG_SHELL=$as_dir/$as_base
22506 export CONFIG_SHELL
22507 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22508 fi;;
22509 esac
22510 done
22511done
22512;;
22513 esac
bec39cab
AC
22514
22515 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22516 # uniformly replaced by the line number. The first 'sed' inserts a
b4e70030
JB
22517 # line-number line before each line; the second 'sed' does the real
22518 # work. The second script uses 'N' to pair each line-number line
22519 # with the numbered line, and appends trailing '-' during
22520 # substitution so that $LINENO is not a special case at line end.
bec39cab 22521 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b4e70030
JB
22522 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
22523 sed '=' <$as_myself |
bec39cab
AC
22524 sed '
22525 N
b4e70030
JB
22526 s,$,-,
22527 : loop
22528 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
bec39cab 22529 t loop
b4e70030
JB
22530 s,-$,,
22531 s,^['$as_cr_digits']*\n,,
bec39cab 22532 ' >$as_me.lineno &&
b4e70030
JB
22533 chmod +x $as_me.lineno ||
22534 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22535echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
bec39cab
AC
22536 { (exit 1); exit 1; }; }
22537
22538 # Don't try to exec as it changes $[0], causing all sort of problems
22539 # (the dirname of $[0] is not the place where we might find the
b4e70030
JB
22540 # original and so on. Autoconf is especially sensible to this).
22541 . ./$as_me.lineno
bec39cab
AC
22542 # Exit status is that of the last command.
22543 exit
22544}
22545
22546
b4e70030
JB
22547case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22548 *c*,-n*) ECHO_N= ECHO_C='
22549' ECHO_T=' ' ;;
22550 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22551 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
bec39cab
AC
22552esac
22553
b4e70030 22554if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
22555 as_expr=expr
22556else
22557 as_expr=false
22558fi
22559
22560rm -f conf$$ conf$$.exe conf$$.file
22561echo >conf$$.file
22562if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030
JB
22563 # We could just check for DJGPP; but this test a) works b) is more generic
22564 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22565 if test -f conf$$.exe; then
22566 # Don't use ln at all; we don't have any links
bec39cab 22567 as_ln_s='cp -p'
b4e70030
JB
22568 else
22569 as_ln_s='ln -s'
22570 fi
bec39cab
AC
22571elif ln conf$$.file conf$$ 2>/dev/null; then
22572 as_ln_s=ln
22573else
22574 as_ln_s='cp -p'
22575fi
b4e70030 22576rm -f conf$$ conf$$.exe conf$$.file
bec39cab
AC
22577
22578if mkdir -p . 2>/dev/null; then
22579 as_mkdir_p=:
22580else
22581 test -d ./-p && rmdir ./-p
22582 as_mkdir_p=false
22583fi
22584
b4e70030 22585as_executable_p="test -f"
bec39cab
AC
22586
22587# Sed expression to map a string onto a valid CPP name.
22588as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22589
22590# Sed expression to map a string onto a valid variable name.
22591as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22592
22593
b4e70030
JB
22594# IFS
22595# We need space, tab and new line, in precisely that order.
22596as_nl='
22597'
22598IFS=" $as_nl"
22599
22600# CDPATH.
22601$as_unset CDPATH
22602
bec39cab
AC
22603exec 6>&1
22604
b4e70030 22605# Open the log real soon, to keep \$[0] and so on meaningful, and to
bec39cab 22606# report actual input values of CONFIG_FILES etc. instead of their
b4e70030
JB
22607# values after options handling. Logging --version etc. is OK.
22608exec 5>>config.log
22609{
22610 echo
22611 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22612## Running $as_me. ##
22613_ASBOX
22614} >&5
22615cat >&5 <<_CSEOF
22616
bec39cab 22617This file was extended by $as_me, which was
b4e70030 22618generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
22619
22620 CONFIG_FILES = $CONFIG_FILES
22621 CONFIG_HEADERS = $CONFIG_HEADERS
22622 CONFIG_LINKS = $CONFIG_LINKS
22623 CONFIG_COMMANDS = $CONFIG_COMMANDS
22624 $ $0 $@
22625
b4e70030
JB
22626_CSEOF
22627echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22628echo >&5
bec39cab
AC
22629_ACEOF
22630
22631# Files that config.status was made for.
b4e70030
JB
22632if test -n "$ac_config_files"; then
22633 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22634fi
234b45d4 22635
b4e70030
JB
22636if test -n "$ac_config_headers"; then
22637 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22638fi
22639
22640if test -n "$ac_config_links"; then
22641 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22642fi
22643
22644if test -n "$ac_config_commands"; then
22645 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22646fi
234b45d4 22647
bec39cab 22648cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030 22649
bec39cab
AC
22650ac_cs_usage="\
22651\`$as_me' instantiates files from templates according to the
22652current configuration.
234b45d4 22653
bec39cab 22654Usage: $0 [OPTIONS] [FILE]...
234b45d4 22655
bec39cab
AC
22656 -h, --help print this help, then exit
22657 -V, --version print version number, then exit
22658 -q, --quiet do not print progress messages
22659 -d, --debug don't remove temporary files
22660 --recheck update $as_me by reconfiguring in the same conditions
22661 --file=FILE[:TEMPLATE]
22662 instantiate the configuration file FILE
22663 --header=FILE[:TEMPLATE]
22664 instantiate the configuration header FILE
234b45d4 22665
bec39cab
AC
22666Configuration files:
22667$config_files
234b45d4 22668
bec39cab
AC
22669Configuration headers:
22670$config_headers
234b45d4 22671
bec39cab
AC
22672Configuration links:
22673$config_links
234b45d4 22674
bec39cab
AC
22675Configuration commands:
22676$config_commands
22677
22678Report bugs to <bug-autoconf@gnu.org>."
4e8d927d 22679_ACEOF
b4e70030 22680
bec39cab
AC
22681cat >>$CONFIG_STATUS <<_ACEOF
22682ac_cs_version="\\
22683config.status
b4e70030 22684configured by $0, generated by GNU Autoconf 2.59,
bec39cab
AC
22685 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22686
b4e70030 22687Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
22688This config.status script is free software; the Free Software Foundation
22689gives unlimited permission to copy, distribute and modify it."
b4e70030
JB
22690srcdir=$srcdir
22691INSTALL="$INSTALL"
bec39cab
AC
22692_ACEOF
22693
22694cat >>$CONFIG_STATUS <<\_ACEOF
22695# If no file are specified by the user, then we need to provide default
22696# value. By we need to know if files were specified by the user.
22697ac_need_defaults=:
22698while test $# != 0
22699do
22700 case $1 in
22701 --*=*)
b4e70030
JB
22702 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22703 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
bec39cab 22704 ac_shift=:
c906108c 22705 ;;
b4e70030 22706 -*)
bec39cab
AC
22707 ac_option=$1
22708 ac_optarg=$2
22709 ac_shift=shift
c906108c 22710 ;;
b4e70030
JB
22711 *) # This is not an option, so the user has probably given explicit
22712 # arguments.
22713 ac_option=$1
22714 ac_need_defaults=false;;
bec39cab 22715 esac
c906108c 22716
bec39cab
AC
22717 case $ac_option in
22718 # Handling of the options.
b4e70030
JB
22719_ACEOF
22720cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
22721 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22722 ac_cs_recheck=: ;;
b4e70030
JB
22723 --version | --vers* | -V )
22724 echo "$ac_cs_version"; exit 0 ;;
22725 --he | --h)
22726 # Conflict between --help and --header
22727 { { echo "$as_me:$LINENO: error: ambiguous option: $1
22728Try \`$0 --help' for more information." >&5
22729echo "$as_me: error: ambiguous option: $1
22730Try \`$0 --help' for more information." >&2;}
22731 { (exit 1); exit 1; }; };;
22732 --help | --hel | -h )
22733 echo "$ac_cs_usage"; exit 0 ;;
22734 --debug | --d* | -d )
bec39cab
AC
22735 debug=: ;;
22736 --file | --fil | --fi | --f )
22737 $ac_shift
22738 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
22739 ac_need_defaults=false;;
22740 --header | --heade | --head | --hea )
22741 $ac_shift
22742 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
22743 ac_need_defaults=false;;
22744 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22745 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22746 ac_cs_silent=: ;;
c906108c 22747
bec39cab 22748 # This is an error.
b4e70030
JB
22749 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
22750Try \`$0 --help' for more information." >&5
22751echo "$as_me: error: unrecognized option: $1
22752Try \`$0 --help' for more information." >&2;}
bec39cab 22753 { (exit 1); exit 1; }; } ;;
c906108c 22754
b4e70030 22755 *) ac_config_targets="$ac_config_targets $1" ;;
c906108c 22756
bec39cab
AC
22757 esac
22758 shift
22759done
c906108c 22760
bec39cab 22761ac_configure_extra_args=
c906108c 22762
bec39cab
AC
22763if $ac_cs_silent; then
22764 exec 6>/dev/null
22765 ac_configure_extra_args="$ac_configure_extra_args --silent"
22766fi
c906108c 22767
bec39cab
AC
22768_ACEOF
22769cat >>$CONFIG_STATUS <<_ACEOF
22770if \$ac_cs_recheck; then
b4e70030
JB
22771 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22772 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
bec39cab
AC
22773fi
22774
22775_ACEOF
22776
22777cat >>$CONFIG_STATUS <<_ACEOF
c906108c 22778#
b4e70030 22779# INIT-COMMANDS section.
c906108c 22780#
c906108c 22781
b4e70030 22782
4e8d927d
DJ
22783GCC="$GCC"
22784CC="$CC"
22785acx_cv_header_stdint="$acx_cv_header_stdint"
22786acx_cv_type_int8_t="$acx_cv_type_int8_t"
22787acx_cv_type_int16_t="$acx_cv_type_int16_t"
22788acx_cv_type_int32_t="$acx_cv_type_int32_t"
22789acx_cv_type_int64_t="$acx_cv_type_int64_t"
22790acx_cv_type_intptr_t="$acx_cv_type_intptr_t"
22791ac_cv_type_uintmax_t="$ac_cv_type_uintmax_t"
22792ac_cv_type_uintptr_t="$ac_cv_type_uintptr_t"
22793ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
22794ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
22795ac_cv_type_u_int32_t="$ac_cv_type_u_int32_t"
22796ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
22797ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
22798ac_cv_sizeof_void_p="$ac_cv_sizeof_void_p"
22799
bec39cab
AC
22800
22801gdb_host_cpu=$gdb_host_cpu
22802gdb_target_cpu=$gdb_target_cpu
22803nativefile=$nativefile
22804
22805
22806_ACEOF
22807
4e8d927d 22808
b4e70030
JB
22809
22810cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab 22811for ac_config_target in $ac_config_targets
c906108c 22812do
b4e70030
JB
22813 case "$ac_config_target" in
22814 # Handling of arguments.
22815 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22816 ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
22817 "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
22818 "gdb_stdint.h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gdb_stdint.h" ;;
22819 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22820 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
bec39cab
AC
22821 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
22822echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22823 { (exit 1); exit 1; }; };;
c906108c
SS
22824 esac
22825done
22826
bec39cab
AC
22827# If the user did not use the arguments to specify the items to instantiate,
22828# then the envvar interface is used. Set only those that are not.
22829# We use the long form for the default assignment because of an extremely
22830# bizarre bug on SunOS 4.1.3.
22831if $ac_need_defaults; then
22832 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22833 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22834 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
22835 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22836fi
22837
b4e70030
JB
22838# Have a temporary directory for convenience. Make it in the build tree
22839# simply because there is no reason to put it here, and in addition,
22840# creating and moving files from /tmp can sometimes cause problems.
22841# Create a temporary directory, and hook for its removal unless debugging.
22842$debug ||
22843{
22844 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22845 trap '{ (exit 1); exit 1; }' 1 2 13 15
22846}
4e8d927d 22847
b4e70030 22848# Create a (secure) tmp directory for tmp files.
4e8d927d 22849
b4e70030
JB
22850{
22851 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
22852 test -n "$tmp" && test -d "$tmp"
22853} ||
22854{
22855 tmp=./confstat$$-$RANDOM
22856 (umask 077 && mkdir $tmp)
22857} ||
22858{
22859 echo "$me: cannot create a temporary directory in ." >&2
22860 { (exit 1); exit 1; }
22861}
4e8d927d 22862
b4e70030 22863_ACEOF
4e8d927d 22864
b4e70030 22865cat >>$CONFIG_STATUS <<_ACEOF
4e8d927d 22866
b4e70030
JB
22867#
22868# CONFIG_FILES section.
22869#
4e8d927d 22870
b4e70030
JB
22871# No need to generate the scripts if there are no CONFIG_FILES.
22872# This happens for instance when ./config.status config.h
22873if test -n "\$CONFIG_FILES"; then
22874 # Protect against being on the right side of a sed subst in config.status.
22875 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22876 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22877s,@SHELL@,$SHELL,;t t
22878s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22879s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22880s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22881s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22882s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22883s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22884s,@exec_prefix@,$exec_prefix,;t t
22885s,@prefix@,$prefix,;t t
22886s,@program_transform_name@,$program_transform_name,;t t
22887s,@bindir@,$bindir,;t t
22888s,@sbindir@,$sbindir,;t t
22889s,@libexecdir@,$libexecdir,;t t
22890s,@datadir@,$datadir,;t t
22891s,@sysconfdir@,$sysconfdir,;t t
22892s,@sharedstatedir@,$sharedstatedir,;t t
22893s,@localstatedir@,$localstatedir,;t t
22894s,@libdir@,$libdir,;t t
22895s,@includedir@,$includedir,;t t
22896s,@oldincludedir@,$oldincludedir,;t t
22897s,@infodir@,$infodir,;t t
22898s,@mandir@,$mandir,;t t
22899s,@build_alias@,$build_alias,;t t
22900s,@host_alias@,$host_alias,;t t
22901s,@target_alias@,$target_alias,;t t
22902s,@DEFS@,$DEFS,;t t
22903s,@ECHO_C@,$ECHO_C,;t t
22904s,@ECHO_N@,$ECHO_N,;t t
22905s,@ECHO_T@,$ECHO_T,;t t
22906s,@LIBS@,$LIBS,;t t
22907s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
22908s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
22909s,@MAINT@,$MAINT,;t t
22910s,@CC@,$CC,;t t
22911s,@CFLAGS@,$CFLAGS,;t t
22912s,@LDFLAGS@,$LDFLAGS,;t t
22913s,@CPPFLAGS@,$CPPFLAGS,;t t
22914s,@ac_ct_CC@,$ac_ct_CC,;t t
22915s,@EXEEXT@,$EXEEXT,;t t
22916s,@OBJEXT@,$OBJEXT,;t t
22917s,@CPP@,$CPP,;t t
22918s,@EGREP@,$EGREP,;t t
22919s,@build@,$build,;t t
22920s,@build_cpu@,$build_cpu,;t t
22921s,@build_vendor@,$build_vendor,;t t
22922s,@build_os@,$build_os,;t t
22923s,@host@,$host,;t t
22924s,@host_cpu@,$host_cpu,;t t
22925s,@host_vendor@,$host_vendor,;t t
22926s,@host_os@,$host_os,;t t
22927s,@target@,$target,;t t
22928s,@target_cpu@,$target_cpu,;t t
22929s,@target_vendor@,$target_vendor,;t t
22930s,@target_os@,$target_os,;t t
b4e70030 22931s,@USE_NLS@,$USE_NLS,;t t
20e95c23
DJ
22932s,@LIBINTL@,$LIBINTL,;t t
22933s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
22934s,@INCINTL@,$INCINTL,;t t
b4e70030 22935s,@XGETTEXT@,$XGETTEXT,;t t
20e95c23
DJ
22936s,@GMSGFMT@,$GMSGFMT,;t t
22937s,@POSUB@,$POSUB,;t t
b4e70030 22938s,@CATALOGS@,$CATALOGS,;t t
b4e70030 22939s,@DATADIRNAME@,$DATADIRNAME,;t t
b4e70030 22940s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20e95c23
DJ
22941s,@GENCAT@,$GENCAT,;t t
22942s,@CATOBJEXT@,$CATOBJEXT,;t t
b4e70030
JB
22943s,@localedir@,$localedir,;t t
22944s,@PACKAGE@,$PACKAGE,;t t
22945s,@subdirs@,$subdirs,;t t
22946s,@AWK@,$AWK,;t t
22947s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22948s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22949s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22950s,@LN_S@,$LN_S,;t t
20e95c23
DJ
22951s,@RANLIB@,$RANLIB,;t t
22952s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
b4e70030
JB
22953s,@YACC@,$YACC,;t t
22954s,@AR@,$AR,;t t
22955s,@ac_ct_AR@,$ac_ct_AR,;t t
22956s,@DLLTOOL@,$DLLTOOL,;t t
22957s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
22958s,@WINDRES@,$WINDRES,;t t
22959s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t
22960s,@MIG@,$MIG,;t t
22961s,@ac_ct_MIG@,$ac_ct_MIG,;t t
20e95c23 22962s,@ALLOCA@,$ALLOCA,;t t
b4e70030
JB
22963s,@CONFIG_LDFLAGS@,$CONFIG_LDFLAGS,;t t
22964s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
22965s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
22966s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
22967s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t
22968s,@SER_HARDWIRE@,$SER_HARDWIRE,;t t
22969s,@WIN32LIBS@,$WIN32LIBS,;t t
22970s,@LIBGUI@,$LIBGUI,;t t
22971s,@GUI_CFLAGS_X@,$GUI_CFLAGS_X,;t t
22972s,@WIN32LDAPP@,$WIN32LDAPP,;t t
22973s,@TCL_VERSION@,$TCL_VERSION,;t t
22974s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t
22975s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t
22976s,@TCL_CC@,$TCL_CC,;t t
22977s,@TCL_DEFS@,$TCL_DEFS,;t t
22978s,@TCL_SHLIB_CFLAGS@,$TCL_SHLIB_CFLAGS,;t t
22979s,@TCL_SHLIB_LD@,$TCL_SHLIB_LD,;t t
22980s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
22981s,@TCL_SHLIB_SUFFIX@,$TCL_SHLIB_SUFFIX,;t t
22982s,@TCL_DL_LIBS@,$TCL_DL_LIBS,;t t
22983s,@TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t
22984s,@TCL_LD_SEARCH_FLAGS@,$TCL_LD_SEARCH_FLAGS,;t t
22985s,@TCL_CC_SEARCH_FLAGS@,$TCL_CC_SEARCH_FLAGS,;t t
22986s,@TCL_COMPAT_OBJS@,$TCL_COMPAT_OBJS,;t t
22987s,@TCL_RANLIB@,$TCL_RANLIB,;t t
22988s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t
22989s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
22990s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t
22991s,@TK_VERSION@,$TK_VERSION,;t t
22992s,@TK_DEFS@,$TK_DEFS,;t t
22993s,@TK_BUILD_INCLUDES@,$TK_BUILD_INCLUDES,;t t
22994s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t
22995s,@TK_XLIBSW@,$TK_XLIBSW,;t t
22996s,@TK_BUILD_LIB_SPEC@,$TK_BUILD_LIB_SPEC,;t t
22997s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
22998s,@TCLHDIR@,$TCLHDIR,;t t
22999s,@TKHDIR@,$TKHDIR,;t t
23000s,@ITCLHDIR@,$ITCLHDIR,;t t
23001s,@ITKHDIR@,$ITKHDIR,;t t
23002s,@ITCL_VERSION@,$ITCL_VERSION,;t t
23003s,@ITCL_DEFS@,$ITCL_DEFS,;t t
23004s,@ITCL_BUILD_INCLUDES@,$ITCL_BUILD_INCLUDES,;t t
23005s,@ITCL_BUILD_LIB_SPEC@,$ITCL_BUILD_LIB_SPEC,;t t
23006s,@ITCL_LIB_SPEC@,$ITCL_LIB_SPEC,;t t
23007s,@ITK_VERSION@,$ITK_VERSION,;t t
23008s,@ITK_DEFS@,$ITK_DEFS,;t t
23009s,@ITK_BUILD_INCLUDES@,$ITK_BUILD_INCLUDES,;t t
23010s,@ITK_BUILD_LIB_SPEC@,$ITK_BUILD_LIB_SPEC,;t t
23011s,@ITK_LIB_SPEC@,$ITK_LIB_SPEC,;t t
23012s,@X_CFLAGS@,$X_CFLAGS,;t t
23013s,@X_LDFLAGS@,$X_LDFLAGS,;t t
23014s,@X_LIBS@,$X_LIBS,;t t
23015s,@TCL_DEPS@,$TCL_DEPS,;t t
23016s,@TK_DEPS@,$TK_DEPS,;t t
23017s,@ITCLLIB@,$ITCLLIB,;t t
23018s,@ITCL_DEPS@,$ITCL_DEPS,;t t
23019s,@ITKLIB@,$ITKLIB,;t t
23020s,@ITK_DEPS@,$ITK_DEPS,;t t
23021s,@GDBTKLIBS@,$GDBTKLIBS,;t t
23022s,@GDBTK_CFLAGS@,$GDBTK_CFLAGS,;t t
23023s,@GDBTK_SRC_DIR@,$GDBTK_SRC_DIR,;t t
23024s,@IGNORE_SIM@,$IGNORE_SIM,;t t
23025s,@IGNORE_SIM_OBS@,$IGNORE_SIM_OBS,;t t
23026s,@ENABLE_CFLAGS@,$ENABLE_CFLAGS,;t t
23027s,@PROFILE_CFLAGS@,$PROFILE_CFLAGS,;t t
23028s,@CONFIG_OBS@,$CONFIG_OBS,;t t
23029s,@CONFIG_DEPS@,$CONFIG_DEPS,;t t
23030s,@CONFIG_SRCS@,$CONFIG_SRCS,;t t
23031s,@CONFIG_ALL@,$CONFIG_ALL,;t t
23032s,@CONFIG_CLEAN@,$CONFIG_CLEAN,;t t
23033s,@CONFIG_INSTALL@,$CONFIG_INSTALL,;t t
23034s,@CONFIG_UNINSTALL@,$CONFIG_UNINSTALL,;t t
23035s,@target_subdir@,$target_subdir,;t t
23036s,@frags@,$frags,;t t
23037s,@xm_h@,$xm_h,;t t
23038s,@tm_h@,$tm_h,;t t
23039s,@nm_h@,$nm_h,;t t
23040s,@LIBICONV@,$LIBICONV,;t t
23041s,@LIBOBJS@,$LIBOBJS,;t t
23042s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23043/@host_makefile_frag@/r $host_makefile_frag
23044s,@host_makefile_frag@,,;t t
23045/@target_makefile_frag@/r $target_makefile_frag
23046s,@target_makefile_frag@,,;t t
23047CEOF
23048
23049_ACEOF
23050
23051 cat >>$CONFIG_STATUS <<\_ACEOF
23052 # Split the substitutions into bite-sized pieces for seds with
23053 # small command number limits, like on Digital OSF/1 and HP-UX.
23054 ac_max_sed_lines=48
23055 ac_sed_frag=1 # Number of current file.
23056 ac_beg=1 # First line for current file.
23057 ac_end=$ac_max_sed_lines # Line after last line for current file.
23058 ac_more_lines=:
23059 ac_sed_cmds=
23060 while $ac_more_lines; do
23061 if test $ac_beg -gt 1; then
23062 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23063 else
23064 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
4e8d927d 23065 fi
b4e70030
JB
23066 if test ! -s $tmp/subs.frag; then
23067 ac_more_lines=false
23068 else
23069 # The purpose of the label and of the branching condition is to
23070 # speed up the sed processing (if there are no `@' at all, there
23071 # is no need to browse any of the substitutions).
23072 # These are the two extra sed commands mentioned above.
23073 (echo ':t
23074 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23075 if test -z "$ac_sed_cmds"; then
23076 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23077 else
23078 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23079 fi
23080 ac_sed_frag=`expr $ac_sed_frag + 1`
23081 ac_beg=$ac_end
23082 ac_end=`expr $ac_end + $ac_max_sed_lines`
23083 fi
23084 done
23085 if test -z "$ac_sed_cmds"; then
23086 ac_sed_cmds=cat
23087 fi
23088fi # test -n "$CONFIG_FILES"
4e8d927d 23089
b4e70030
JB
23090_ACEOF
23091cat >>$CONFIG_STATUS <<\_ACEOF
23092for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23093 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23094 case $ac_file in
23095 - | *:- | *:-:* ) # input from stdin
23096 cat >$tmp/stdin
23097 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23098 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23099 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23100 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23101 * ) ac_file_in=$ac_file.in ;;
c906108c
SS
23102 esac
23103
b4e70030
JB
23104 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23105 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
bec39cab
AC
23106$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23107 X"$ac_file" : 'X\(//\)[^/]' \| \
23108 X"$ac_file" : 'X\(//\)$' \| \
b4e70030
JB
23109 X"$ac_file" : 'X\(/\)' \| \
23110 . : '\(.\)' 2>/dev/null ||
bec39cab 23111echo X"$ac_file" |
b4e70030
JB
23112 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23113 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23114 /^X\(\/\/\)$/{ s//\1/; q; }
23115 /^X\(\/\).*/{ s//\1/; q; }
23116 s/.*/./; q'`
23117 { if $as_mkdir_p; then
23118 mkdir -p "$ac_dir"
23119 else
23120 as_dir="$ac_dir"
bec39cab 23121 as_dirs=
b4e70030
JB
23122 while test ! -d "$as_dir"; do
23123 as_dirs="$as_dir $as_dirs"
23124 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
23125$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23126 X"$as_dir" : 'X\(//\)[^/]' \| \
23127 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
23128 X"$as_dir" : 'X\(/\)' \| \
23129 . : '\(.\)' 2>/dev/null ||
bec39cab 23130echo X"$as_dir" |
b4e70030
JB
23131 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23132 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23133 /^X\(\/\/\)$/{ s//\1/; q; }
23134 /^X\(\/\).*/{ s//\1/; q; }
23135 s/.*/./; q'`
bec39cab 23136 done
b4e70030
JB
23137 test ! -n "$as_dirs" || mkdir $as_dirs
23138 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23139echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 23140 { (exit 1); exit 1; }; }; }
b4e70030 23141
bec39cab
AC
23142 ac_builddir=.
23143
b4e70030 23144if test "$ac_dir" != .; then
bec39cab 23145 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
23146 # A "../" for each directory in $ac_dir_suffix.
23147 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23148else
23149 ac_dir_suffix= ac_top_builddir=
23150fi
bec39cab
AC
23151
23152case $srcdir in
b4e70030 23153 .) # No --srcdir option. We are building in place.
bec39cab 23154 ac_srcdir=.
b4e70030
JB
23155 if test -z "$ac_top_builddir"; then
23156 ac_top_srcdir=.
23157 else
23158 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23159 fi ;;
23160 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 23161 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
23162 ac_top_srcdir=$srcdir ;;
23163 *) # Relative path.
23164 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23165 ac_top_srcdir=$ac_top_builddir$srcdir ;;
bec39cab
AC
23166esac
23167
b4e70030
JB
23168# Do not use `cd foo && pwd` to compute absolute paths, because
23169# the directories may not exist.
23170case `pwd` in
23171.) ac_abs_builddir="$ac_dir";;
23172*)
23173 case "$ac_dir" in
23174 .) ac_abs_builddir=`pwd`;;
23175 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23176 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23177 esac;;
23178esac
23179case $ac_abs_builddir in
23180.) ac_abs_top_builddir=${ac_top_builddir}.;;
23181*)
23182 case ${ac_top_builddir}. in
23183 .) ac_abs_top_builddir=$ac_abs_builddir;;
23184 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23185 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23186 esac;;
23187esac
23188case $ac_abs_builddir in
23189.) ac_abs_srcdir=$ac_srcdir;;
23190*)
23191 case $ac_srcdir in
23192 .) ac_abs_srcdir=$ac_abs_builddir;;
23193 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23194 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23195 esac;;
23196esac
23197case $ac_abs_builddir in
23198.) ac_abs_top_srcdir=$ac_top_srcdir;;
23199*)
23200 case $ac_top_srcdir in
23201 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23202 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23203 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23204 esac;;
23205esac
c906108c 23206
c906108c 23207
bec39cab
AC
23208 case $INSTALL in
23209 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
b4e70030 23210 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
c906108c 23211 esac
121ce6e5 23212
b4e70030
JB
23213 if test x"$ac_file" != x-; then
23214 { echo "$as_me:$LINENO: creating $ac_file" >&5
23215echo "$as_me: creating $ac_file" >&6;}
23216 rm -f "$ac_file"
23217 fi
23218 # Let's still pretend it is `configure' which instantiates (i.e., don't
23219 # use $as_me), people would be surprised to read:
23220 # /* config.h. Generated by config.status. */
23221 if test x"$ac_file" = x-; then
23222 configure_input=
23223 else
23224 configure_input="$ac_file. "
23225 fi
23226 configure_input=$configure_input"Generated from `echo $ac_file_in |
23227 sed 's,.*/,,'` by configure."
23228
23229 # First look for the input files in the build tree, otherwise in the
23230 # src tree.
23231 ac_file_inputs=`IFS=:
23232 for f in $ac_file_in; do
23233 case $f in
23234 -) echo $tmp/stdin ;;
23235 [\\/$]*)
23236 # Absolute (can't be DOS-style, as IFS=:)
23237 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23238echo "$as_me: error: cannot find input file: $f" >&2;}
23239 { (exit 1); exit 1; }; }
23240 echo "$f";;
23241 *) # Relative
23242 if test -f "$f"; then
23243 # Build tree
23244 echo "$f"
23245 elif test -f "$srcdir/$f"; then
23246 # Source tree
23247 echo "$srcdir/$f"
23248 else
23249 # /dev/null tree
23250 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23251echo "$as_me: error: cannot find input file: $f" >&2;}
23252 { (exit 1); exit 1; }; }
23253 fi;;
23254 esac
23255 done` || { (exit 1); exit 1; }
4e8d927d 23256_ACEOF
bec39cab
AC
23257cat >>$CONFIG_STATUS <<_ACEOF
23258 sed "$ac_vpsub
23259$extrasub
23260_ACEOF
23261cat >>$CONFIG_STATUS <<\_ACEOF
23262:t
23263/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b4e70030
JB
23264s,@configure_input@,$configure_input,;t t
23265s,@srcdir@,$ac_srcdir,;t t
23266s,@abs_srcdir@,$ac_abs_srcdir,;t t
23267s,@top_srcdir@,$ac_top_srcdir,;t t
23268s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23269s,@builddir@,$ac_builddir,;t t
23270s,@abs_builddir@,$ac_abs_builddir,;t t
23271s,@top_builddir@,$ac_top_builddir,;t t
23272s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23273s,@INSTALL@,$ac_INSTALL,;t t
23274" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23275 rm -f $tmp/stdin
23276 if test x"$ac_file" != x-; then
23277 mv $tmp/out $ac_file
23278 else
23279 cat $tmp/out
23280 rm -f $tmp/out
23281 fi
23282
23283done
23284_ACEOF
23285cat >>$CONFIG_STATUS <<\_ACEOF
23286
23287#
23288# CONFIG_HEADER section.
23289#
23290
23291# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23292# NAME is the cpp macro being defined and VALUE is the value it is being given.
23293#
23294# ac_d sets the value in "#define NAME VALUE" lines.
23295ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23296ac_dB='[ ].*$,\1#\2'
23297ac_dC=' '
23298ac_dD=',;t'
23299# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23300ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23301ac_uB='$,\1#\2define\3'
23302ac_uC=' '
23303ac_uD=',;t'
23304
23305for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23306 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
bec39cab 23307 case $ac_file in
b4e70030
JB
23308 - | *:- | *:-:* ) # input from stdin
23309 cat >$tmp/stdin
23310 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23311 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23312 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23313 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23314 * ) ac_file_in=$ac_file.in ;;
c906108c 23315 esac
b4e70030
JB
23316
23317 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23318echo "$as_me: creating $ac_file" >&6;}
23319
23320 # First look for the input files in the build tree, otherwise in the
23321 # src tree.
23322 ac_file_inputs=`IFS=:
23323 for f in $ac_file_in; do
23324 case $f in
23325 -) echo $tmp/stdin ;;
23326 [\\/$]*)
23327 # Absolute (can't be DOS-style, as IFS=:)
23328 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23329echo "$as_me: error: cannot find input file: $f" >&2;}
23330 { (exit 1); exit 1; }; }
23331 # Do quote $f, to prevent DOS paths from being IFS'd.
23332 echo "$f";;
23333 *) # Relative
23334 if test -f "$f"; then
23335 # Build tree
23336 echo "$f"
23337 elif test -f "$srcdir/$f"; then
23338 # Source tree
23339 echo "$srcdir/$f"
23340 else
23341 # /dev/null tree
23342 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23343echo "$as_me: error: cannot find input file: $f" >&2;}
23344 { (exit 1); exit 1; }; }
23345 fi;;
23346 esac
23347 done` || { (exit 1); exit 1; }
23348 # Remove the trailing spaces.
23349 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
23350
23351_ACEOF
23352
23353# Transform confdefs.h into two sed scripts, `conftest.defines' and
23354# `conftest.undefs', that substitutes the proper values into
23355# config.h.in to produce config.h. The first handles `#define'
23356# templates, and the second `#undef' templates.
23357# And first: Protect against being on the right side of a sed subst in
23358# config.status. Protect against being in an unquoted here document
23359# in config.status.
23360rm -f conftest.defines conftest.undefs
23361# Using a here document instead of a string reduces the quoting nightmare.
23362# Putting comments in sed scripts is not portable.
23363#
23364# `end' is used to avoid that the second main sed command (meant for
23365# 0-ary CPP macros) applies to n-ary macro definitions.
23366# See the Autoconf documentation for `clear'.
23367cat >confdef2sed.sed <<\_ACEOF
23368s/[\\&,]/\\&/g
23369s,[\\$`],\\&,g
23370t clear
23371: clear
23372s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23373t end
23374s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23375: end
23376_ACEOF
23377# If some macros were called several times there might be several times
23378# the same #defines, which is useless. Nevertheless, we may not want to
23379# sort them, since we want the *last* AC-DEFINE to be honored.
23380uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23381sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23382rm -f confdef2sed.sed
23383
23384# This sed command replaces #undef with comments. This is necessary, for
c906108c
SS
23385# example, in the case of _POSIX_SOURCE, which is predefined and required
23386# on some systems where configure will not decide to define it.
b4e70030
JB
23387cat >>conftest.undefs <<\_ACEOF
23388s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
23389_ACEOF
23390
23391# Break up conftest.defines because some shells have a limit on the size
23392# of here documents, and old seds have small limits too (100 cmds).
23393echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23394echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23395echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23396echo ' :' >>$CONFIG_STATUS
23397rm -f conftest.tail
23398while grep . conftest.defines >/dev/null
bec39cab 23399do
b4e70030
JB
23400 # Write a limited-size here document to $tmp/defines.sed.
23401 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23402 # Speed up: don't consider the non `#define' lines.
23403 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
23404 # Work around the forget-to-reset-the-flag bug.
23405 echo 't clr' >>$CONFIG_STATUS
23406 echo ': clr' >>$CONFIG_STATUS
23407 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
bec39cab 23408 echo 'CEOF
b4e70030
JB
23409 sed -f $tmp/defines.sed $tmp/in >$tmp/out
23410 rm -f $tmp/in
23411 mv $tmp/out $tmp/in
23412' >>$CONFIG_STATUS
23413 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
bec39cab
AC
23414 rm -f conftest.defines
23415 mv conftest.tail conftest.defines
23416done
b4e70030
JB
23417rm -f conftest.defines
23418echo ' fi # grep' >>$CONFIG_STATUS
23419echo >>$CONFIG_STATUS
23420
23421# Break up conftest.undefs because some shells have a limit on the size
23422# of here documents, and old seds have small limits too (100 cmds).
23423echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
23424rm -f conftest.tail
23425while grep . conftest.undefs >/dev/null
23426do
23427 # Write a limited-size here document to $tmp/undefs.sed.
23428 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23429 # Speed up: don't consider the non `#undef'
23430 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
23431 # Work around the forget-to-reset-the-flag bug.
23432 echo 't clr' >>$CONFIG_STATUS
23433 echo ': clr' >>$CONFIG_STATUS
23434 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23435 echo 'CEOF
23436 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23437 rm -f $tmp/in
23438 mv $tmp/out $tmp/in
23439' >>$CONFIG_STATUS
23440 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23441 rm -f conftest.undefs
23442 mv conftest.tail conftest.undefs
23443done
23444rm -f conftest.undefs
bec39cab
AC
23445
23446cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030
JB
23447 # Let's still pretend it is `configure' which instantiates (i.e., don't
23448 # use $as_me), people would be surprised to read:
23449 # /* config.h. Generated by config.status. */
23450 if test x"$ac_file" = x-; then
23451 echo "/* Generated by configure. */" >$tmp/config.h
23452 else
23453 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
23454 fi
23455 cat $tmp/in >>$tmp/config.h
23456 rm -f $tmp/in
bec39cab 23457 if test x"$ac_file" != x-; then
b4e70030 23458 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
bec39cab
AC
23459 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23460echo "$as_me: $ac_file is unchanged" >&6;}
23461 else
b4e70030
JB
23462 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23463$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23464 X"$ac_file" : 'X\(//\)[^/]' \| \
23465 X"$ac_file" : 'X\(//\)$' \| \
23466 X"$ac_file" : 'X\(/\)' \| \
23467 . : '\(.\)' 2>/dev/null ||
23468echo X"$ac_file" |
23469 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23470 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23471 /^X\(\/\/\)$/{ s//\1/; q; }
23472 /^X\(\/\).*/{ s//\1/; q; }
23473 s/.*/./; q'`
23474 { if $as_mkdir_p; then
23475 mkdir -p "$ac_dir"
23476 else
23477 as_dir="$ac_dir"
23478 as_dirs=
23479 while test ! -d "$as_dir"; do
23480 as_dirs="$as_dir $as_dirs"
23481 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23482$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23483 X"$as_dir" : 'X\(//\)[^/]' \| \
23484 X"$as_dir" : 'X\(//\)$' \| \
23485 X"$as_dir" : 'X\(/\)' \| \
23486 . : '\(.\)' 2>/dev/null ||
23487echo X"$as_dir" |
23488 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23489 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23490 /^X\(\/\/\)$/{ s//\1/; q; }
23491 /^X\(\/\).*/{ s//\1/; q; }
23492 s/.*/./; q'`
23493 done
23494 test ! -n "$as_dirs" || mkdir $as_dirs
23495 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23496echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23497 { (exit 1); exit 1; }; }; }
23498
bec39cab 23499 rm -f $ac_file
b4e70030 23500 mv $tmp/config.h $ac_file
bec39cab
AC
23501 fi
23502 else
b4e70030
JB
23503 cat $tmp/config.h
23504 rm -f $tmp/config.h
bec39cab 23505 fi
b4e70030
JB
23506done
23507_ACEOF
23508cat >>$CONFIG_STATUS <<\_ACEOF
23509
23510#
23511# CONFIG_LINKS section.
23512#
23513
23514for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
23515 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23516 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c906108c 23517
b4e70030
JB
23518 { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
23519echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
c906108c
SS
23520
23521 if test ! -r $srcdir/$ac_source; then
bec39cab
AC
23522 { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
23523echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
23524 { (exit 1); exit 1; }; }
c906108c 23525 fi
b4e70030
JB
23526 rm -f $ac_dest
23527
23528 # Make relative symlinks.
23529 ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
23530$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23531 X"$ac_dest" : 'X\(//\)[^/]' \| \
23532 X"$ac_dest" : 'X\(//\)$' \| \
23533 X"$ac_dest" : 'X\(/\)' \| \
23534 . : '\(.\)' 2>/dev/null ||
23535echo X"$ac_dest" |
23536 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23537 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23538 /^X\(\/\/\)$/{ s//\1/; q; }
23539 /^X\(\/\).*/{ s//\1/; q; }
23540 s/.*/./; q'`
23541 { if $as_mkdir_p; then
23542 mkdir -p "$ac_dest_dir"
23543 else
23544 as_dir="$ac_dest_dir"
23545 as_dirs=
23546 while test ! -d "$as_dir"; do
23547 as_dirs="$as_dir $as_dirs"
23548 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23549$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23550 X"$as_dir" : 'X\(//\)[^/]' \| \
23551 X"$as_dir" : 'X\(//\)$' \| \
23552 X"$as_dir" : 'X\(/\)' \| \
23553 . : '\(.\)' 2>/dev/null ||
23554echo X"$as_dir" |
23555 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23556 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23557 /^X\(\/\/\)$/{ s//\1/; q; }
23558 /^X\(\/\).*/{ s//\1/; q; }
23559 s/.*/./; q'`
23560 done
23561 test ! -n "$as_dirs" || mkdir $as_dirs
23562 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
23563echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
23564 { (exit 1); exit 1; }; }; }
23565
23566 ac_builddir=.
23567
23568if test "$ac_dest_dir" != .; then
23569 ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
23570 # A "../" for each directory in $ac_dir_suffix.
23571 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23572else
23573 ac_dir_suffix= ac_top_builddir=
23574fi
23575
23576case $srcdir in
23577 .) # No --srcdir option. We are building in place.
23578 ac_srcdir=.
23579 if test -z "$ac_top_builddir"; then
23580 ac_top_srcdir=.
23581 else
23582 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23583 fi ;;
23584 [\\/]* | ?:[\\/]* ) # Absolute path.
23585 ac_srcdir=$srcdir$ac_dir_suffix;
23586 ac_top_srcdir=$srcdir ;;
23587 *) # Relative path.
23588 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23589 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23590esac
23591
23592# Do not use `cd foo && pwd` to compute absolute paths, because
23593# the directories may not exist.
23594case `pwd` in
23595.) ac_abs_builddir="$ac_dest_dir";;
23596*)
23597 case "$ac_dest_dir" in
23598 .) ac_abs_builddir=`pwd`;;
23599 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
23600 *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
23601 esac;;
23602esac
23603case $ac_abs_builddir in
23604.) ac_abs_top_builddir=${ac_top_builddir}.;;
23605*)
23606 case ${ac_top_builddir}. in
23607 .) ac_abs_top_builddir=$ac_abs_builddir;;
23608 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23609 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23610 esac;;
23611esac
23612case $ac_abs_builddir in
23613.) ac_abs_srcdir=$ac_srcdir;;
23614*)
23615 case $ac_srcdir in
23616 .) ac_abs_srcdir=$ac_abs_builddir;;
23617 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23618 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23619 esac;;
23620esac
23621case $ac_abs_builddir in
23622.) ac_abs_top_srcdir=$ac_top_srcdir;;
23623*)
23624 case $ac_top_srcdir in
23625 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23626 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23627 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23628 esac;;
23629esac
23630
bec39cab
AC
23631
23632 case $srcdir in
23633 [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
b4e70030 23634 *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
c906108c 23635 esac
b4e70030
JB
23636
23637 # Try a symlink, then a hard link, then a copy.
23638 ln -s $ac_rel_source $ac_dest 2>/dev/null ||
23639 ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
23640 cp -p $srcdir/$ac_source $ac_dest ||
23641 { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
23642echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
bec39cab 23643 { (exit 1); exit 1; }; }
b4e70030
JB
23644done
23645_ACEOF
23646cat >>$CONFIG_STATUS <<\_ACEOF
23647
23648#
23649# CONFIG_COMMANDS section.
23650#
23651for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23652 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23653 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23654 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23655$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23656 X"$ac_dest" : 'X\(//\)[^/]' \| \
23657 X"$ac_dest" : 'X\(//\)$' \| \
23658 X"$ac_dest" : 'X\(/\)' \| \
23659 . : '\(.\)' 2>/dev/null ||
23660echo X"$ac_dest" |
23661 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23662 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23663 /^X\(\/\/\)$/{ s//\1/; q; }
23664 /^X\(\/\).*/{ s//\1/; q; }
23665 s/.*/./; q'`
23666 { if $as_mkdir_p; then
23667 mkdir -p "$ac_dir"
23668 else
23669 as_dir="$ac_dir"
23670 as_dirs=
23671 while test ! -d "$as_dir"; do
23672 as_dirs="$as_dir $as_dirs"
23673 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23674$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23675 X"$as_dir" : 'X\(//\)[^/]' \| \
23676 X"$as_dir" : 'X\(//\)$' \| \
23677 X"$as_dir" : 'X\(/\)' \| \
23678 . : '\(.\)' 2>/dev/null ||
23679echo X"$as_dir" |
23680 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23681 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23682 /^X\(\/\/\)$/{ s//\1/; q; }
23683 /^X\(\/\).*/{ s//\1/; q; }
23684 s/.*/./; q'`
23685 done
23686 test ! -n "$as_dirs" || mkdir $as_dirs
23687 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23688echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23689 { (exit 1); exit 1; }; }; }
23690
23691 ac_builddir=.
23692
23693if test "$ac_dir" != .; then
23694 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23695 # A "../" for each directory in $ac_dir_suffix.
23696 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23697else
23698 ac_dir_suffix= ac_top_builddir=
23699fi
23700
23701case $srcdir in
23702 .) # No --srcdir option. We are building in place.
23703 ac_srcdir=.
23704 if test -z "$ac_top_builddir"; then
23705 ac_top_srcdir=.
23706 else
23707 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23708 fi ;;
23709 [\\/]* | ?:[\\/]* ) # Absolute path.
23710 ac_srcdir=$srcdir$ac_dir_suffix;
23711 ac_top_srcdir=$srcdir ;;
23712 *) # Relative path.
23713 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23714 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23715esac
23716
23717# Do not use `cd foo && pwd` to compute absolute paths, because
23718# the directories may not exist.
23719case `pwd` in
23720.) ac_abs_builddir="$ac_dir";;
23721*)
23722 case "$ac_dir" in
23723 .) ac_abs_builddir=`pwd`;;
23724 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23725 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23726 esac;;
23727esac
23728case $ac_abs_builddir in
23729.) ac_abs_top_builddir=${ac_top_builddir}.;;
23730*)
23731 case ${ac_top_builddir}. in
23732 .) ac_abs_top_builddir=$ac_abs_builddir;;
23733 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23734 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23735 esac;;
23736esac
23737case $ac_abs_builddir in
23738.) ac_abs_srcdir=$ac_srcdir;;
23739*)
23740 case $ac_srcdir in
23741 .) ac_abs_srcdir=$ac_abs_builddir;;
23742 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23743 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23744 esac;;
23745esac
23746case $ac_abs_builddir in
23747.) ac_abs_top_srcdir=$ac_top_srcdir;;
23748*)
23749 case $ac_top_srcdir in
23750 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23751 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23752 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23753 esac;;
23754esac
bec39cab 23755
bec39cab 23756
b4e70030
JB
23757 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
23758echo "$as_me: executing $ac_dest commands" >&6;}
23759 case $ac_dest in
23760 gdb_stdint.h )
4e8d927d
DJ
23761if test "$GCC" = yes; then
23762 echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h
23763else
23764 echo "/* generated for $CC */" > tmp-stdint.h
23765fi
23766
23767sed 's/^ *//' >> tmp-stdint.h <<EOF
23768
23769 #ifndef GCC_GENERATED_STDINT_H
23770 #define GCC_GENERATED_STDINT_H 1
23771
23772 #include <sys/types.h>
23773EOF
23774
23775if test "$acx_cv_header_stdint" != stdint.h; then
23776 echo "#include <stddef.h>" >> tmp-stdint.h
23777fi
23778if test "$acx_cv_header_stdint" != stddef.h; then
23779 echo "#include <$acx_cv_header_stdint>" >> tmp-stdint.h
23780fi
23781
23782sed 's/^ *//' >> tmp-stdint.h <<EOF
23783 /* glibc uses these symbols as guards to prevent redefinitions. */
23784 #ifdef __int8_t_defined
23785 #define _INT8_T
23786 #define _INT16_T
23787 #define _INT32_T
23788 #endif
23789 #ifdef __uint32_t_defined
23790 #define _UINT32_T
23791 #endif
23792
23793EOF
23794
23795# ----------------- done header, emit basic int types -------------
23796if test "$acx_cv_header_stdint" = stddef.h; then
23797 sed 's/^ *//' >> tmp-stdint.h <<EOF
23798
23799 #ifndef _UINT8_T
23800 #define _UINT8_T
23801 typedef unsigned $acx_cv_type_int8_t uint8_t;
23802 #endif
23803
23804 #ifndef _UINT16_T
23805 #define _UINT16_T
23806 typedef unsigned $acx_cv_type_int16_t uint16_t;
23807 #endif
23808
23809 #ifndef _UINT32_T
23810 #define _UINT32_T
23811 typedef unsigned $acx_cv_type_int32_t uint32_t;
23812 #endif
23813
23814 #ifndef _INT8_T
23815 #define _INT8_T
23816 typedef $acx_cv_type_int8_t int8_t;
23817 #endif
23818
23819 #ifndef _INT16_T
23820 #define _INT16_T
23821 typedef $acx_cv_type_int16_t int16_t;
23822 #endif
23823
23824 #ifndef _INT32_T
23825 #define _INT32_T
23826 typedef $acx_cv_type_int32_t int32_t;
23827 #endif
23828EOF
23829elif test "$ac_cv_type_u_int32_t" = yes; then
23830 sed 's/^ *//' >> tmp-stdint.h <<EOF
23831
23832 /* int8_t int16_t int32_t defined by inet code, we do the u_intXX types */
23833 #ifndef _INT8_T
23834 #define _INT8_T
23835 #endif
23836 #ifndef _INT16_T
23837 #define _INT16_T
23838 #endif
23839 #ifndef _INT32_T
23840 #define _INT32_T
23841 #endif
23842
23843 #ifndef _UINT8_T
23844 #define _UINT8_T
23845 typedef u_int8_t uint8_t;
23846 #endif
23847
23848 #ifndef _UINT16_T
23849 #define _UINT16_T
23850 typedef u_int16_t uint16_t;
23851 #endif
23852
23853 #ifndef _UINT32_T
23854 #define _UINT32_T
23855 typedef u_int32_t uint32_t;
23856 #endif
23857EOF
23858else
23859 sed 's/^ *//' >> tmp-stdint.h <<EOF
23860
23861 /* Some systems have guard macros to prevent redefinitions, define them. */
23862 #ifndef _INT8_T
23863 #define _INT8_T
23864 #endif
23865 #ifndef _INT16_T
23866 #define _INT16_T
23867 #endif
23868 #ifndef _INT32_T
23869 #define _INT32_T
23870 #endif
23871 #ifndef _UINT8_T
23872 #define _UINT8_T
23873 #endif
23874 #ifndef _UINT16_T
23875 #define _UINT16_T
23876 #endif
23877 #ifndef _UINT32_T
23878 #define _UINT32_T
23879 #endif
23880EOF
23881fi
23882
23883# ------------- done basic int types, emit int64_t types ------------
23884if test "$ac_cv_type_uint64_t" = yes; then
23885 sed 's/^ *//' >> tmp-stdint.h <<EOF
23886
23887 /* system headers have good uint64_t and int64_t */
23888 #ifndef _INT64_T
23889 #define _INT64_T
23890 #endif
23891 #ifndef _UINT64_T
23892 #define _UINT64_T
23893 #endif
23894EOF
23895elif test "$ac_cv_type_u_int64_t" = yes; then
23896 sed 's/^ *//' >> tmp-stdint.h <<EOF
23897
23898 /* system headers have an u_int64_t (and int64_t) */
23899 #ifndef _INT64_T
23900 #define _INT64_T
23901 #endif
23902 #ifndef _UINT64_T
23903 #define _UINT64_T
23904 typedef u_int64_t uint64_t;
23905 #endif
23906EOF
23907elif test -n "$acx_cv_type_int64_t"; then
23908 sed 's/^ *//' >> tmp-stdint.h <<EOF
23909
23910 /* architecture has a 64-bit type, $acx_cv_type_int64_t */
23911 #ifndef _INT64_T
23912 #define _INT64_T
23913 typedef $acx_cv_type_int64_t int64_t;
23914 #endif
23915 #ifndef _UINT64_T
23916 #define _UINT64_T
23917 typedef unsigned $acx_cv_type_int64_t uint64_t;
23918 #endif
23919EOF
23920else
23921 sed 's/^ *//' >> tmp-stdint.h <<EOF
23922
23923 /* some common heuristics for int64_t, using compiler-specific tests */
23924 #if defined __STDC_VERSION__ && (__STDC_VERSION__-0) >= 199901L
23925 #ifndef _INT64_T
23926 #define _INT64_T
23927 typedef long long int64_t;
23928 #endif
23929 #ifndef _UINT64_T
23930 #define _UINT64_T
23931 typedef unsigned long long uint64_t;
23932 #endif
23933
23934 #elif defined __GNUC__ && defined (__STDC__) && __STDC__-0
23935 /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
23936 does not implement __extension__. But that compiler doesn't define
23937 __GNUC_MINOR__. */
23938 # if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
23939 # define __extension__
23940 # endif
23941
23942 # ifndef _INT64_T
23943 # define _INT64_T
23944 __extension__ typedef long long int64_t;
23945 # endif
23946 # ifndef _UINT64_T
23947 # define _UINT64_T
23948 __extension__ typedef unsigned long long uint64_t;
23949 # endif
23950
23951 #elif !defined __STRICT_ANSI__
23952 # if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
23953
23954 # ifndef _INT64_T
23955 # define _INT64_T
23956 typedef __int64 int64_t;
23957 # endif
23958 # ifndef _UINT64_T
23959 # define _UINT64_T
23960 typedef unsigned __int64 uint64_t;
23961 # endif
23962 # endif /* compiler */
23963
23964 #endif /* ANSI version */
23965EOF
23966fi
23967
23968# ------------- done int64_t types, emit intptr types ------------
23969if test "$ac_cv_type_uintptr_t" != yes; then
23970 sed 's/^ *//' >> tmp-stdint.h <<EOF
23971
23972 /* Define intptr_t based on sizeof(void*) = $ac_cv_sizeof_void_p */
23973 typedef u$acx_cv_type_intptr_t uintptr_t;
23974 typedef $acx_cv_type_intptr_t intptr_t;
23975EOF
23976fi
23977
23978# ------------- done intptr types, emit int_least types ------------
23979if test "$ac_cv_type_int_least32_t" != yes; then
23980 sed 's/^ *//' >> tmp-stdint.h <<EOF
23981
23982 /* Define int_least types */
23983 typedef int8_t int_least8_t;
23984 typedef int16_t int_least16_t;
23985 typedef int32_t int_least32_t;
23986 #ifdef _INT64_T
23987 typedef int64_t int_least64_t;
23988 #endif
23989
23990 typedef uint8_t uint_least8_t;
23991 typedef uint16_t uint_least16_t;
23992 typedef uint32_t uint_least32_t;
23993 #ifdef _UINT64_T
23994 typedef uint64_t uint_least64_t;
23995 #endif
23996EOF
23997fi
23998
23999# ------------- done intptr types, emit int_fast types ------------
24000if test "$ac_cv_type_int_fast32_t" != yes; then
24001 sed 's/^ *//' >> tmp-stdint.h <<EOF
24002
24003 /* Define int_fast types. short is often slow */
24004 typedef int8_t int_fast8_t;
24005 typedef int int_fast16_t;
24006 typedef int32_t int_fast32_t;
24007 #ifdef _INT64_T
24008 typedef int64_t int_fast64_t;
24009 #endif
24010
24011 typedef uint8_t uint_fast8_t;
24012 typedef unsigned int uint_fast16_t;
24013 typedef uint32_t uint_fast32_t;
24014 #ifdef _UINT64_T
24015 typedef uint64_t uint_fast64_t;
24016 #endif
24017EOF
24018fi
24019
24020if test "$ac_cv_type_uintmax_t" != yes; then
24021 sed 's/^ *//' >> tmp-stdint.h <<EOF
24022
24023 /* Define intmax based on what we found */
24024 #ifdef _INT64_T
24025 typedef int64_t intmax_t;
24026 #else
24027 typedef long intmax_t;
24028 #endif
24029 #ifdef _UINT64_T
24030 typedef uint64_t uintmax_t;
24031 #else
24032 typedef unsigned long uintmax_t;
24033 #endif
24034EOF
24035fi
24036
24037sed 's/^ *//' >> tmp-stdint.h <<EOF
24038
24039 #endif /* GCC_GENERATED_STDINT_H */
24040EOF
24041
24042if test -r gdb_stdint.h && cmp -s tmp-stdint.h gdb_stdint.h; then
24043 rm -f tmp-stdint.h
24044else
24045 mv -f tmp-stdint.h gdb_stdint.h
bec39cab
AC
24046fi
24047
4e8d927d 24048 ;;
b4e70030 24049 default )
c906108c 24050
2c0fc042 24051sed -e '/^DEPRECATED_TM_FILE[ ]*=/s,^DEPRECATED_TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
c906108c
SS
24052/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
24053/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
24054mv -f Makefile.tmp Makefile
24055
2acceee2 24056
c906108c
SS
24057case x$CONFIG_HEADERS in
24058xconfig.h:config.in)
24059echo > stamp-h ;;
24060esac
bec39cab
AC
24061 ;;
24062 esac
b4e70030
JB
24063done
24064_ACEOF
c906108c 24065
b4e70030 24066cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
24067
24068{ (exit 0); exit 0; }
24069_ACEOF
c906108c 24070chmod +x $CONFIG_STATUS
bec39cab
AC
24071ac_clean_files=$ac_clean_files_save
24072
24073
24074# configure is writing to config.log, and then calls config.status.
24075# config.status does its own redirection, appending to config.log.
24076# Unfortunately, on DOS this fails, as config.log is still kept open
24077# by configure, so config.status won't be able to write to it; its
24078# output is simply discarded. So we exec the FD to /dev/null,
24079# effectively closing config.log, so it can be properly (re)opened and
24080# appended to by config.status. When coming back to configure, we
24081# need to make the FD available again.
24082if test "$no_create" != yes; then
24083 ac_cs_success=:
24084 ac_config_status_args=
24085 test "$silent" = yes &&
24086 ac_config_status_args="$ac_config_status_args --quiet"
24087 exec 5>/dev/null
24088 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24089 exec 5>>config.log
24090 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24091 # would make configure fail if this is the last instruction.
24092 $ac_cs_success || { (exit 1); exit 1; }
24093fi
c906108c 24094
bec39cab
AC
24095#
24096# CONFIG_SUBDIRS section.
24097#
c906108c
SS
24098if test "$no_recursion" != yes; then
24099
24100 # Remove --cache-file and --srcdir arguments so they do not pile up.
24101 ac_sub_configure_args=
24102 ac_prev=
b4e70030 24103 for ac_arg in $ac_configure_args; do
c906108c
SS
24104 if test -n "$ac_prev"; then
24105 ac_prev=
24106 continue
24107 fi
bec39cab 24108 case $ac_arg in
c906108c
SS
24109 -cache-file | --cache-file | --cache-fil | --cache-fi \
24110 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
24111 ac_prev=cache_file ;;
24112 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
24113 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
24114 | --c=*)
24115 ;;
24116 --config-cache | -C)
c906108c
SS
24117 ;;
24118 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
24119 ac_prev=srcdir ;;
24120 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
24121 ;;
bec39cab
AC
24122 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
24123 ac_prev=prefix ;;
24124 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
24125 ;;
b4e70030 24126 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
c906108c
SS
24127 esac
24128 done
24129
bec39cab
AC
24130 # Always prepend --prefix to ensure using the same prefix
24131 # in subdir configurations.
24132 ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"
24133
b4e70030 24134 ac_popdir=`pwd`
bec39cab 24135 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
24136
24137 # Do not complain, so a configure script can configure whichever
24138 # parts of a large source tree are present.
bec39cab 24139 test -d $srcdir/$ac_dir || continue
c906108c 24140
b4e70030
JB
24141 { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
24142echo "$as_me: configuring in $ac_dir" >&6;}
24143 { if $as_mkdir_p; then
24144 mkdir -p "$ac_dir"
24145 else
24146 as_dir="$ac_dir"
bec39cab 24147 as_dirs=
b4e70030
JB
24148 while test ! -d "$as_dir"; do
24149 as_dirs="$as_dir $as_dirs"
24150 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
24151$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24152 X"$as_dir" : 'X\(//\)[^/]' \| \
24153 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
24154 X"$as_dir" : 'X\(/\)' \| \
24155 . : '\(.\)' 2>/dev/null ||
bec39cab 24156echo X"$as_dir" |
b4e70030
JB
24157 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24158 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24159 /^X\(\/\/\)$/{ s//\1/; q; }
24160 /^X\(\/\).*/{ s//\1/; q; }
24161 s/.*/./; q'`
bec39cab 24162 done
b4e70030
JB
24163 test ! -n "$as_dirs" || mkdir $as_dirs
24164 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24165echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 24166 { (exit 1); exit 1; }; }; }
b4e70030 24167
bec39cab
AC
24168 ac_builddir=.
24169
b4e70030 24170if test "$ac_dir" != .; then
bec39cab 24171 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
24172 # A "../" for each directory in $ac_dir_suffix.
24173 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24174else
24175 ac_dir_suffix= ac_top_builddir=
24176fi
bec39cab
AC
24177
24178case $srcdir in
b4e70030 24179 .) # No --srcdir option. We are building in place.
bec39cab 24180 ac_srcdir=.
b4e70030
JB
24181 if test -z "$ac_top_builddir"; then
24182 ac_top_srcdir=.
24183 else
24184 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24185 fi ;;
24186 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 24187 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
24188 ac_top_srcdir=$srcdir ;;
24189 *) # Relative path.
24190 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24191 ac_top_srcdir=$ac_top_builddir$srcdir ;;
24192esac
24193
24194# Do not use `cd foo && pwd` to compute absolute paths, because
24195# the directories may not exist.
24196case `pwd` in
24197.) ac_abs_builddir="$ac_dir";;
24198*)
24199 case "$ac_dir" in
24200 .) ac_abs_builddir=`pwd`;;
24201 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24202 *) ac_abs_builddir=`pwd`/"$ac_dir";;
24203 esac;;
24204esac
24205case $ac_abs_builddir in
24206.) ac_abs_top_builddir=${ac_top_builddir}.;;
24207*)
24208 case ${ac_top_builddir}. in
24209 .) ac_abs_top_builddir=$ac_abs_builddir;;
24210 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24211 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24212 esac;;
24213esac
24214case $ac_abs_builddir in
24215.) ac_abs_srcdir=$ac_srcdir;;
24216*)
24217 case $ac_srcdir in
24218 .) ac_abs_srcdir=$ac_abs_builddir;;
24219 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24220 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24221 esac;;
24222esac
24223case $ac_abs_builddir in
24224.) ac_abs_top_srcdir=$ac_top_srcdir;;
24225*)
24226 case $ac_top_srcdir in
24227 .) ac_abs_top_srcdir=$ac_abs_builddir;;
24228 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24229 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24230 esac;;
bec39cab 24231esac
c906108c 24232
c906108c 24233
b4e70030 24234 cd $ac_dir
c906108c
SS
24235
24236 # Check for guested configure; otherwise get Cygnus style configure.
bec39cab
AC
24237 if test -f $ac_srcdir/configure.gnu; then
24238 ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'"
24239 elif test -f $ac_srcdir/configure; then
24240 ac_sub_configure="$SHELL '$ac_srcdir/configure'"
24241 elif test -f $ac_srcdir/configure.in; then
c906108c
SS
24242 ac_sub_configure=$ac_configure
24243 else
bec39cab
AC
24244 { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
24245echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
24246 ac_sub_configure=
24247 fi
24248
24249 # The recursion is here.
24250 if test -n "$ac_sub_configure"; then
c906108c 24251 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
24252 case $cache_file in
24253 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
b4e70030
JB
24254 *) # Relative path.
24255 ac_sub_cache_file=$ac_top_builddir$cache_file ;;
c906108c 24256 esac
c906108c 24257
bec39cab
AC
24258 { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
24259echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 24260 # The eval makes quoting arguments work.
b4e70030
JB
24261 eval $ac_sub_configure $ac_sub_configure_args \
24262 --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
bec39cab
AC
24263 { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
24264echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
24265 { (exit 1); exit 1; }; }
c906108c
SS
24266 fi
24267
b4e70030 24268 cd $ac_popdir
c906108c
SS
24269 done
24270fi
24271
24272
24273exit 0
This page took 2.586576 seconds and 4 git commands to generate.