2009-01-06 Sandra Loosemore <sandra@codesourcery.com>
[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"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
b4e70030
JB
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
bec39cab
AC
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
783e057b
DJ
312gl_header_list=
313ac_subdirs_all="$ac_subdirs_all doc testsuite"
b4e70030
JB
314ac_subdirs_all="$ac_subdirs_all gdbtk"
315ac_subdirs_all="$ac_subdirs_all multi-ice"
316ac_subdirs_all="$ac_subdirs_all gdbserver"
a417dc56 317ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP RANLIB ac_ct_RANLIB build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os am__leading_dot DEPDIR CCDEPMODE MAKE GMAKE_TRUE GMAKE_FALSE SET_MAKE USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT localedir GL_COND_LIBTOOL_TRUE GL_COND_LIBTOOL_FALSE GNULIB_MEMMEM GNULIB_MEMPCPY GNULIB_MEMRCHR GNULIB_STPCPY GNULIB_STPNCPY GNULIB_STRCHRNUL GNULIB_STRDUP GNULIB_STRNDUP GNULIB_STRNLEN GNULIB_STRPBRK GNULIB_STRSEP GNULIB_STRSTR GNULIB_STRCASESTR GNULIB_STRTOK_R GNULIB_MBSLEN GNULIB_MBSNLEN GNULIB_MBSCHR GNULIB_MBSRCHR GNULIB_MBSSTR GNULIB_MBSCASECMP GNULIB_MBSNCASECMP GNULIB_MBSPCASECMP GNULIB_MBSCASESTR GNULIB_MBSCSPN GNULIB_MBSPBRK GNULIB_MBSSPN GNULIB_MBSSEP GNULIB_MBSTOK_R GNULIB_STRERROR GNULIB_STRSIGNAL HAVE_DECL_MEMMEM HAVE_MEMPCPY HAVE_DECL_MEMRCHR HAVE_STPCPY HAVE_STPNCPY HAVE_STRCHRNUL HAVE_DECL_STRDUP HAVE_STRNDUP HAVE_DECL_STRNDUP HAVE_DECL_STRNLEN HAVE_STRPBRK HAVE_STRSEP HAVE_STRCASESTR HAVE_DECL_STRTOK_R HAVE_DECL_STRERROR HAVE_DECL_STRSIGNAL REPLACE_STRERROR REPLACE_STRSIGNAL REPLACE_MEMMEM REPLACE_STRCASESTR REPLACE_STRSTR HAVE_LONG_LONG_INT HAVE_UNSIGNED_LONG_LONG_INT HAVE_INTTYPES_H HAVE_SYS_TYPES_H INCLUDE_NEXT NEXT_STDINT_H HAVE_STDINT_H HAVE_SYS_INTTYPES_H HAVE_SYS_BITYPES_H BITSIZEOF_PTRDIFF_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_WCHAR_T BITSIZEOF_WINT_T HAVE_SIGNED_SIG_ATOMIC_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_WINT_T PTRDIFF_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX WCHAR_T_SUFFIX WINT_T_SUFFIX STDINT_H NEXT_STRING_H GNULIB_WCWIDTH HAVE_DECL_WCWIDTH REPLACE_WCWIDTH WCHAR_H HAVE_WCHAR_H NEXT_WCHAR_H LIBGNU_LIBDEPS LIBGNU_LTLIBDEPS GNULIB_STDINT_H PACKAGE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK AMTAR am__tar am__untar am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH am__fastdepCC_TRUE am__fastdepCC_FALSE subdirs TARGET_OBS PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI LN_S YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG READLINE READLINE_DEPS READLINE_CFLAGS HAVE_LIBEXPAT LIBEXPAT LTLIBEXPAT PYTHON_CFLAGS ALLOCA CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDE TCL_LIBRARY TCL_DEPS TK_VERSION TK_BIN_DIR TK_SRC_DIR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_INCLUDE TK_LIBRARY TK_DEPS TK_XINCLUDES X_CFLAGS X_LDFLAGS X_LIBS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR SIM SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags nm_h LIBICONV LIBOBJS LTLIBOBJS gl_LIBOBJS gl_LTLIBOBJS gltests_LIBOBJS gltests_LTLIBOBJS'
a4ce5b0d 318ac_subst_files='host_makefile_frag'
d5af19ba 319ac_pwd=`pwd`
c906108c
SS
320
321# Initialize some variables set by options.
bec39cab
AC
322ac_init_help=
323ac_init_version=false
c906108c
SS
324# The variables have the same names as the options, with
325# dashes changed to underlines.
bec39cab 326cache_file=/dev/null
c906108c 327exec_prefix=NONE
c906108c 328no_create=
c906108c
SS
329no_recursion=
330prefix=NONE
331program_prefix=NONE
332program_suffix=NONE
333program_transform_name=s,x,x,
334silent=
335site=
336srcdir=
c906108c
SS
337verbose=
338x_includes=NONE
339x_libraries=NONE
bec39cab
AC
340
341# Installation directory options.
342# These are left unexpanded so users can "make install exec_prefix=/foo"
343# and all the variables that are supposed to be based on exec_prefix
344# by default will actually change.
345# Use braces instead of parens because sh, perl, etc. also accept them.
c906108c
SS
346bindir='${exec_prefix}/bin'
347sbindir='${exec_prefix}/sbin'
348libexecdir='${exec_prefix}/libexec'
b4e70030 349datadir='${prefix}/share'
c906108c
SS
350sysconfdir='${prefix}/etc'
351sharedstatedir='${prefix}/com'
352localstatedir='${prefix}/var'
b4e70030 353libdir='${exec_prefix}/lib'
c906108c
SS
354includedir='${prefix}/include'
355oldincludedir='/usr/include'
b4e70030
JB
356infodir='${prefix}/info'
357mandir='${prefix}/man'
c906108c 358
c906108c
SS
359ac_prev=
360for ac_option
361do
c906108c
SS
362 # If the previous option needs an argument, assign it.
363 if test -n "$ac_prev"; then
b4e70030 364 eval "$ac_prev=\$ac_option"
c906108c
SS
365 ac_prev=
366 continue
367 fi
368
b4e70030 369 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
c906108c
SS
370
371 # Accept the important Cygnus configure options, so we can diagnose typos.
372
b4e70030 373 case $ac_option in
c906108c
SS
374
375 -bindir | --bindir | --bindi | --bind | --bin | --bi)
376 ac_prev=bindir ;;
377 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 378 bindir=$ac_optarg ;;
c906108c
SS
379
380 -build | --build | --buil | --bui | --bu)
bec39cab 381 ac_prev=build_alias ;;
c906108c 382 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 383 build_alias=$ac_optarg ;;
c906108c
SS
384
385 -cache-file | --cache-file | --cache-fil | --cache-fi \
386 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
387 ac_prev=cache_file ;;
388 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
389 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
390 cache_file=$ac_optarg ;;
391
392 --config-cache | -C)
393 cache_file=config.cache ;;
c906108c 394
b4e70030 395 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
c906108c 396 ac_prev=datadir ;;
b4e70030
JB
397 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
398 | --da=*)
bec39cab 399 datadir=$ac_optarg ;;
c906108c
SS
400
401 -disable-* | --disable-*)
bec39cab 402 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 403 # Reject names that are not valid shell variable names.
bec39cab
AC
404 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
406 { (exit 1); exit 1; }; }
407 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
b4e70030 408 eval "enable_$ac_feature=no" ;;
c906108c
SS
409
410 -enable-* | --enable-*)
bec39cab 411 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 412 # Reject names that are not valid shell variable names.
bec39cab
AC
413 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
414 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
415 { (exit 1); exit 1; }; }
416 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
b4e70030
JB
417 case $ac_option in
418 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
419 *) ac_optarg=yes ;;
420 esac
421 eval "enable_$ac_feature='$ac_optarg'" ;;
c906108c
SS
422
423 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
424 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
425 | --exec | --exe | --ex)
426 ac_prev=exec_prefix ;;
427 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
428 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
429 | --exec=* | --exe=* | --ex=*)
bec39cab 430 exec_prefix=$ac_optarg ;;
c906108c
SS
431
432 -gas | --gas | --ga | --g)
433 # Obsolete; use --with-gas.
434 with_gas=yes ;;
435
bec39cab
AC
436 -help | --help | --hel | --he | -h)
437 ac_init_help=long ;;
438 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
439 ac_init_help=recursive ;;
440 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
441 ac_init_help=short ;;
c906108c
SS
442
443 -host | --host | --hos | --ho)
bec39cab 444 ac_prev=host_alias ;;
c906108c 445 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 446 host_alias=$ac_optarg ;;
c906108c
SS
447
448 -includedir | --includedir | --includedi | --included | --include \
449 | --includ | --inclu | --incl | --inc)
450 ac_prev=includedir ;;
451 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
452 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 453 includedir=$ac_optarg ;;
c906108c
SS
454
455 -infodir | --infodir | --infodi | --infod | --info | --inf)
456 ac_prev=infodir ;;
457 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 458 infodir=$ac_optarg ;;
c906108c
SS
459
460 -libdir | --libdir | --libdi | --libd)
461 ac_prev=libdir ;;
462 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 463 libdir=$ac_optarg ;;
c906108c
SS
464
465 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
466 | --libexe | --libex | --libe)
467 ac_prev=libexecdir ;;
468 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
469 | --libexe=* | --libex=* | --libe=*)
bec39cab 470 libexecdir=$ac_optarg ;;
c906108c
SS
471
472 -localstatedir | --localstatedir | --localstatedi | --localstated \
b4e70030
JB
473 | --localstate | --localstat | --localsta | --localst \
474 | --locals | --local | --loca | --loc | --lo)
c906108c
SS
475 ac_prev=localstatedir ;;
476 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
b4e70030
JB
477 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
478 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
bec39cab 479 localstatedir=$ac_optarg ;;
c906108c
SS
480
481 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
482 ac_prev=mandir ;;
483 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 484 mandir=$ac_optarg ;;
c906108c
SS
485
486 -nfp | --nfp | --nf)
487 # Obsolete; use --without-fp.
488 with_fp=no ;;
489
490 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 491 | --no-cr | --no-c | -n)
c906108c
SS
492 no_create=yes ;;
493
494 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
495 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
496 no_recursion=yes ;;
497
498 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
499 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
500 | --oldin | --oldi | --old | --ol | --o)
501 ac_prev=oldincludedir ;;
502 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
503 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
504 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 505 oldincludedir=$ac_optarg ;;
c906108c
SS
506
507 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
508 ac_prev=prefix ;;
509 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 510 prefix=$ac_optarg ;;
c906108c
SS
511
512 -program-prefix | --program-prefix | --program-prefi | --program-pref \
513 | --program-pre | --program-pr | --program-p)
514 ac_prev=program_prefix ;;
515 -program-prefix=* | --program-prefix=* | --program-prefi=* \
516 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 517 program_prefix=$ac_optarg ;;
c906108c
SS
518
519 -program-suffix | --program-suffix | --program-suffi | --program-suff \
520 | --program-suf | --program-su | --program-s)
521 ac_prev=program_suffix ;;
522 -program-suffix=* | --program-suffix=* | --program-suffi=* \
523 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 524 program_suffix=$ac_optarg ;;
c906108c
SS
525
526 -program-transform-name | --program-transform-name \
527 | --program-transform-nam | --program-transform-na \
528 | --program-transform-n | --program-transform- \
529 | --program-transform | --program-transfor \
530 | --program-transfo | --program-transf \
531 | --program-trans | --program-tran \
532 | --progr-tra | --program-tr | --program-t)
533 ac_prev=program_transform_name ;;
534 -program-transform-name=* | --program-transform-name=* \
535 | --program-transform-nam=* | --program-transform-na=* \
536 | --program-transform-n=* | --program-transform-=* \
537 | --program-transform=* | --program-transfor=* \
538 | --program-transfo=* | --program-transf=* \
539 | --program-trans=* | --program-tran=* \
540 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 541 program_transform_name=$ac_optarg ;;
c906108c
SS
542
543 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
544 | -silent | --silent | --silen | --sile | --sil)
545 silent=yes ;;
546
547 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
548 ac_prev=sbindir ;;
549 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
550 | --sbi=* | --sb=*)
bec39cab 551 sbindir=$ac_optarg ;;
c906108c
SS
552
553 -sharedstatedir | --sharedstatedir | --sharedstatedi \
554 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
555 | --sharedst | --shareds | --shared | --share | --shar \
556 | --sha | --sh)
557 ac_prev=sharedstatedir ;;
558 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
559 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
560 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
561 | --sha=* | --sh=*)
bec39cab 562 sharedstatedir=$ac_optarg ;;
c906108c
SS
563
564 -site | --site | --sit)
565 ac_prev=site ;;
566 -site=* | --site=* | --sit=*)
bec39cab 567 site=$ac_optarg ;;
3ace7edb 568
c906108c
SS
569 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
570 ac_prev=srcdir ;;
571 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 572 srcdir=$ac_optarg ;;
c906108c
SS
573
574 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
575 | --syscon | --sysco | --sysc | --sys | --sy)
576 ac_prev=sysconfdir ;;
577 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
578 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 579 sysconfdir=$ac_optarg ;;
c906108c
SS
580
581 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 582 ac_prev=target_alias ;;
c906108c 583 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 584 target_alias=$ac_optarg ;;
c906108c
SS
585
586 -v | -verbose | --verbose | --verbos | --verbo | --verb)
587 verbose=yes ;;
588
bec39cab
AC
589 -version | --version | --versio | --versi | --vers | -V)
590 ac_init_version=: ;;
c906108c
SS
591
592 -with-* | --with-*)
bec39cab 593 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 594 # Reject names that are not valid shell variable names.
bec39cab
AC
595 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
596 { echo "$as_me: error: invalid package name: $ac_package" >&2
597 { (exit 1); exit 1; }; }
c906108c 598 ac_package=`echo $ac_package| sed 's/-/_/g'`
b4e70030
JB
599 case $ac_option in
600 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
601 *) ac_optarg=yes ;;
602 esac
603 eval "with_$ac_package='$ac_optarg'" ;;
c906108c
SS
604
605 -without-* | --without-*)
bec39cab 606 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 607 # Reject names that are not valid shell variable names.
bec39cab
AC
608 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
609 { echo "$as_me: error: invalid package name: $ac_package" >&2
610 { (exit 1); exit 1; }; }
611 ac_package=`echo $ac_package | sed 's/-/_/g'`
b4e70030 612 eval "with_$ac_package=no" ;;
c906108c
SS
613
614 --x)
615 # Obsolete; use --with-x.
616 with_x=yes ;;
617
618 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
619 | --x-incl | --x-inc | --x-in | --x-i)
620 ac_prev=x_includes ;;
621 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
622 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 623 x_includes=$ac_optarg ;;
c906108c
SS
624
625 -x-libraries | --x-libraries | --x-librarie | --x-librari \
626 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
627 ac_prev=x_libraries ;;
628 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
629 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 630 x_libraries=$ac_optarg ;;
c906108c 631
bec39cab
AC
632 -*) { echo "$as_me: error: unrecognized option: $ac_option
633Try \`$0 --help' for more information." >&2
634 { (exit 1); exit 1; }; }
c906108c
SS
635 ;;
636
bec39cab
AC
637 *=*)
638 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
639 # Reject names that are not valid shell variable names.
640 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
641 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
642 { (exit 1); exit 1; }; }
b4e70030
JB
643 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
644 eval "$ac_envvar='$ac_optarg'"
bec39cab
AC
645 export $ac_envvar ;;
646
c906108c 647 *)
bec39cab
AC
648 # FIXME: should be removed in autoconf 3.0.
649 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
650 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
651 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
652 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
653 ;;
654
655 esac
656done
657
658if test -n "$ac_prev"; then
bec39cab
AC
659 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
660 { echo "$as_me: error: missing argument to $ac_option" >&2
661 { (exit 1); exit 1; }; }
c906108c 662fi
c906108c 663
b4e70030
JB
664# Be sure to have absolute paths.
665for ac_var in exec_prefix prefix
c906108c 666do
b4e70030 667 eval ac_val=$`echo $ac_var`
bec39cab 668 case $ac_val in
b4e70030
JB
669 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
670 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
671 { (exit 1); exit 1; }; };;
672 esac
673done
674
675# Be sure to have absolute paths.
676for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
677 localstatedir libdir includedir oldincludedir infodir mandir
678do
679 eval ac_val=$`echo $ac_var`
680 case $ac_val in
681 [\\/$]* | ?:[\\/]* ) ;;
682 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
683 { (exit 1); exit 1; }; };;
c906108c
SS
684 esac
685done
686
bec39cab
AC
687# There might be people who depend on the old broken behavior: `$host'
688# used to hold the argument of --host etc.
689# FIXME: To remove some day.
690build=$build_alias
691host=$host_alias
692target=$target_alias
693
694# FIXME: To remove some day.
695if test "x$host_alias" != x; then
696 if test "x$build_alias" = x; then
697 cross_compiling=maybe
698 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
699 If a cross compiler is detected then cross compile mode will be used." >&2
700 elif test "x$build_alias" != "x$host_alias"; then
701 cross_compiling=yes
702 fi
703fi
c906108c 704
bec39cab
AC
705ac_tool_prefix=
706test -n "$host_alias" && ac_tool_prefix=$host_alias-
707
708test "$silent" = yes && exec 6>/dev/null
c906108c 709
c906108c
SS
710
711# Find the source files, if location was not specified.
712if test -z "$srcdir"; then
713 ac_srcdir_defaulted=yes
b4e70030
JB
714 # Try the directory containing this script, then its parent.
715 ac_confdir=`(dirname "$0") 2>/dev/null ||
bec39cab
AC
716$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
717 X"$0" : 'X\(//\)[^/]' \| \
718 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
719 X"$0" : 'X\(/\)' \| \
720 . : '\(.\)' 2>/dev/null ||
bec39cab 721echo X"$0" |
b4e70030
JB
722 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
723 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
724 /^X\(\/\/\)$/{ s//\1/; q; }
725 /^X\(\/\).*/{ s//\1/; q; }
726 s/.*/./; q'`
c906108c 727 srcdir=$ac_confdir
b4e70030 728 if test ! -r $srcdir/$ac_unique_file; then
c906108c
SS
729 srcdir=..
730 fi
731else
732 ac_srcdir_defaulted=no
733fi
b4e70030
JB
734if test ! -r $srcdir/$ac_unique_file; then
735 if test "$ac_srcdir_defaulted" = yes; then
736 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
737 { (exit 1); exit 1; }; }
738 else
739 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
bec39cab 740 { (exit 1); exit 1; }; }
b4e70030 741 fi
c906108c 742fi
b4e70030
JB
743(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
744 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
bec39cab 745 { (exit 1); exit 1; }; }
b4e70030
JB
746srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
747ac_env_build_alias_set=${build_alias+set}
748ac_env_build_alias_value=$build_alias
749ac_cv_env_build_alias_set=${build_alias+set}
750ac_cv_env_build_alias_value=$build_alias
751ac_env_host_alias_set=${host_alias+set}
752ac_env_host_alias_value=$host_alias
753ac_cv_env_host_alias_set=${host_alias+set}
754ac_cv_env_host_alias_value=$host_alias
755ac_env_target_alias_set=${target_alias+set}
756ac_env_target_alias_value=$target_alias
757ac_cv_env_target_alias_set=${target_alias+set}
758ac_cv_env_target_alias_value=$target_alias
759ac_env_CC_set=${CC+set}
760ac_env_CC_value=$CC
761ac_cv_env_CC_set=${CC+set}
762ac_cv_env_CC_value=$CC
763ac_env_CFLAGS_set=${CFLAGS+set}
764ac_env_CFLAGS_value=$CFLAGS
765ac_cv_env_CFLAGS_set=${CFLAGS+set}
766ac_cv_env_CFLAGS_value=$CFLAGS
767ac_env_LDFLAGS_set=${LDFLAGS+set}
768ac_env_LDFLAGS_value=$LDFLAGS
769ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
770ac_cv_env_LDFLAGS_value=$LDFLAGS
771ac_env_CPPFLAGS_set=${CPPFLAGS+set}
772ac_env_CPPFLAGS_value=$CPPFLAGS
773ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
774ac_cv_env_CPPFLAGS_value=$CPPFLAGS
775ac_env_CPP_set=${CPP+set}
776ac_env_CPP_value=$CPP
777ac_cv_env_CPP_set=${CPP+set}
778ac_cv_env_CPP_value=$CPP
c906108c 779
bec39cab
AC
780#
781# Report the --help message.
782#
783if test "$ac_init_help" = "long"; then
784 # Omit some internal or obsolete options to make the list less imposing.
785 # This message is too long to be a string in the A/UX 3.1 sh.
786 cat <<_ACEOF
787\`configure' configures this package to adapt to many kinds of systems.
788
789Usage: $0 [OPTION]... [VAR=VALUE]...
790
791To assign environment variables (e.g., CC, CFLAGS...), specify them as
792VAR=VALUE. See below for descriptions of some of the useful variables.
793
794Defaults for the options are specified in brackets.
795
796Configuration:
797 -h, --help display this help and exit
798 --help=short display options specific to this package
799 --help=recursive display the short help of all the included packages
800 -V, --version display version information and exit
801 -q, --quiet, --silent do not print \`checking...' messages
802 --cache-file=FILE cache test results in FILE [disabled]
803 -C, --config-cache alias for \`--cache-file=config.cache'
804 -n, --no-create do not create output files
805 --srcdir=DIR find the sources in DIR [configure dir or \`..']
806
b4e70030
JB
807_ACEOF
808
809 cat <<_ACEOF
bec39cab
AC
810Installation directories:
811 --prefix=PREFIX install architecture-independent files in PREFIX
812 [$ac_default_prefix]
813 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
814 [PREFIX]
815
816By default, \`make install' will install all the files in
817\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
818an installation prefix other than \`$ac_default_prefix' using \`--prefix',
819for instance \`--prefix=\$HOME'.
820
821For better control, use the options below.
822
823Fine tuning of the installation directories:
824 --bindir=DIR user executables [EPREFIX/bin]
825 --sbindir=DIR system admin executables [EPREFIX/sbin]
826 --libexecdir=DIR program executables [EPREFIX/libexec]
b4e70030 827 --datadir=DIR read-only architecture-independent data [PREFIX/share]
bec39cab
AC
828 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
829 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
830 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
831 --libdir=DIR object code libraries [EPREFIX/lib]
832 --includedir=DIR C header files [PREFIX/include]
833 --oldincludedir=DIR C header files for non-gcc [/usr/include]
b4e70030
JB
834 --infodir=DIR info documentation [PREFIX/info]
835 --mandir=DIR man documentation [PREFIX/man]
bec39cab
AC
836_ACEOF
837
838 cat <<\_ACEOF
839
840Program names:
841 --program-prefix=PREFIX prepend PREFIX to installed program names
842 --program-suffix=SUFFIX append SUFFIX to installed program names
843 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
844
845X features:
846 --x-includes=DIR X include files are in DIR
847 --x-libraries=DIR X library files are in DIR
848
849System types:
850 --build=BUILD configure for building on BUILD [guessed]
851 --host=HOST cross-compile to build programs to run on HOST [BUILD]
852 --target=TARGET configure for building compilers for TARGET [HOST]
853_ACEOF
854fi
855
856if test -n "$ac_init_help"; then
857
858 cat <<\_ACEOF
859
860Optional Features:
861 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
862 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
863 --enable-maintainer-mode enable make rules and dependencies not useful
864 (and sometimes confusing) to the casual installer
e28b3332
DJ
865 --disable-dependency-tracking speeds up one-time build
866 --enable-dependency-tracking do not reject slow dependency extractors
d0c678e6 867 --enable-targets alternative target configurations
c0993dbe 868 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
869 --disable-gdbcli disable command-line interface (CLI)
870 --disable-gdbmi disable machine-interface (MI)
871 --enable-tui enable full-screen terminal user interface (TUI)
872 --enable-gdbtk enable gdbtk graphical user interface (GUI)
873 --enable-profiling enable profiling of GDB
3841debe 874 --disable-rpath do not hardcode runtime library paths
094a342e 875 --enable-werror treat compile warnings as errors
bec39cab
AC
876 --enable-build-warnings Enable build-time compiler warnings if gcc is used
877 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used
878 --enable-sim Link gdb with simulator
879 --enable-multi-ice build the multi-ice-gdb-server
880
881Optional Packages:
882 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
883 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
bec39cab
AC
884 --with-separate-debug-dir=path Look for global separate debug info in this path LIBDIR/debug
885 --with-libunwind Use libunwind frame unwinding support
c16158bc
JM
886 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
887 --with-bugurl=URL Direct users to URL to report a bug
6a30b0a5 888 --with-system-readline use installed readline library
5c39566f 889 --with-expat include expat support (auto/yes/no)
3841debe
DJ
890 --with-gnu-ld assume the C compiler uses GNU ld default=no
891 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
892 --without-libexpat-prefix don't search for libexpat in includedir and libdir
d57a3c85 893 --with-python include python support (auto/yes/no/<path>)
bec39cab
AC
894 --without-included-regex don't use included regex; this is the default
895 on systems with version 2 of the GNU C library
896 (use with caution on other system)
897 --with-sysroot=DIR Search for usr/lib et al within DIR.
5062cc19
KS
898 --with-tcl directory containing tcl configuration (tclConfig.sh)
899 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab
AC
900 --with-x use the X Window System
901 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
902
903Some influential environment variables:
904 CC C compiler command
905 CFLAGS C compiler flags
906 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
907 nonstandard directory <lib dir>
b4e70030
JB
908 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
909 headers in a nonstandard directory <include dir>
bec39cab
AC
910 CPP C preprocessor
911
912Use these variables to override the choices made by `configure' or to help
913it to find libraries and programs with nonstandard names/locations.
914
915_ACEOF
916fi
917
918if test "$ac_init_help" = "recursive"; then
919 # If there are subdirs, report their specific --help.
b4e70030 920 ac_popdir=`pwd`
bec39cab
AC
921 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
922 test -d $ac_dir || continue
923 ac_builddir=.
924
b4e70030 925if test "$ac_dir" != .; then
bec39cab 926 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
927 # A "../" for each directory in $ac_dir_suffix.
928 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
929else
930 ac_dir_suffix= ac_top_builddir=
931fi
bec39cab
AC
932
933case $srcdir in
b4e70030 934 .) # No --srcdir option. We are building in place.
bec39cab 935 ac_srcdir=.
b4e70030
JB
936 if test -z "$ac_top_builddir"; then
937 ac_top_srcdir=.
938 else
939 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
940 fi ;;
941 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 942 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
943 ac_top_srcdir=$srcdir ;;
944 *) # Relative path.
945 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
946 ac_top_srcdir=$ac_top_builddir$srcdir ;;
947esac
948
949# Do not use `cd foo && pwd` to compute absolute paths, because
950# the directories may not exist.
951case `pwd` in
952.) ac_abs_builddir="$ac_dir";;
953*)
954 case "$ac_dir" in
955 .) ac_abs_builddir=`pwd`;;
956 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
957 *) ac_abs_builddir=`pwd`/"$ac_dir";;
958 esac;;
959esac
960case $ac_abs_builddir in
961.) ac_abs_top_builddir=${ac_top_builddir}.;;
962*)
963 case ${ac_top_builddir}. in
964 .) ac_abs_top_builddir=$ac_abs_builddir;;
965 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
966 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
967 esac;;
968esac
969case $ac_abs_builddir in
970.) ac_abs_srcdir=$ac_srcdir;;
971*)
972 case $ac_srcdir in
973 .) ac_abs_srcdir=$ac_abs_builddir;;
974 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
975 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
976 esac;;
977esac
978case $ac_abs_builddir in
979.) ac_abs_top_srcdir=$ac_top_srcdir;;
980*)
981 case $ac_top_srcdir in
982 .) ac_abs_top_srcdir=$ac_abs_builddir;;
983 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
984 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
985 esac;;
bec39cab
AC
986esac
987
b4e70030
JB
988 cd $ac_dir
989 # Check for guested configure; otherwise get Cygnus style configure.
bec39cab 990 if test -f $ac_srcdir/configure.gnu; then
b4e70030 991 echo
bec39cab
AC
992 $SHELL $ac_srcdir/configure.gnu --help=recursive
993 elif test -f $ac_srcdir/configure; then
b4e70030 994 echo
bec39cab 995 $SHELL $ac_srcdir/configure --help=recursive
b4e70030
JB
996 elif test -f $ac_srcdir/configure.ac ||
997 test -f $ac_srcdir/configure.in; then
998 echo
999 $ac_configure --help
3ace7edb 1000 else
bec39cab 1001 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b4e70030
JB
1002 fi
1003 cd $ac_popdir
bec39cab
AC
1004 done
1005fi
1006
b4e70030 1007test -n "$ac_init_help" && exit 0
bec39cab
AC
1008if $ac_init_version; then
1009 cat <<\_ACEOF
1010
b4e70030 1011Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
1012This configure script is free software; the Free Software Foundation
1013gives unlimited permission to copy, distribute and modify it.
1014_ACEOF
b4e70030 1015 exit 0
bec39cab 1016fi
b4e70030
JB
1017exec 5>config.log
1018cat >&5 <<_ACEOF
bec39cab
AC
1019This file contains any messages produced by compilers while
1020running configure, to aid debugging if configure makes a mistake.
1021
1022It was created by $as_me, which was
b4e70030 1023generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
1024
1025 $ $0 $@
1026
1027_ACEOF
1028{
1029cat <<_ASUNAME
1030## --------- ##
1031## Platform. ##
1032## --------- ##
1033
1034hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1035uname -m = `(uname -m) 2>/dev/null || echo unknown`
1036uname -r = `(uname -r) 2>/dev/null || echo unknown`
1037uname -s = `(uname -s) 2>/dev/null || echo unknown`
1038uname -v = `(uname -v) 2>/dev/null || echo unknown`
1039
1040/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1041/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1042
1043/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1044/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1045/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b4e70030 1046hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
bec39cab
AC
1047/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1048/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1049/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1050
1051_ASUNAME
1052
1053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1054for as_dir in $PATH
1055do
1056 IFS=$as_save_IFS
1057 test -z "$as_dir" && as_dir=.
1058 echo "PATH: $as_dir"
1059done
1060
1061} >&5
1062
1063cat >&5 <<_ACEOF
1064
1065
1066## ----------- ##
1067## Core tests. ##
1068## ----------- ##
1069
1070_ACEOF
1071
1072
1073# Keep a trace of the command line.
1074# Strip out --no-create and --no-recursion so they do not pile up.
1075# Strip out --silent because we don't want to record it for future runs.
1076# Also quote any args containing shell meta-characters.
1077# Make two passes to allow for proper duplicate-argument suppression.
1078ac_configure_args=
1079ac_configure_args0=
1080ac_configure_args1=
1081ac_sep=
1082ac_must_keep_next=false
1083for ac_pass in 1 2
1084do
1085 for ac_arg
1086 do
1087 case $ac_arg in
1088 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1089 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1090 | -silent | --silent | --silen | --sile | --sil)
1091 continue ;;
b4e70030 1092 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
bec39cab
AC
1093 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1094 esac
1095 case $ac_pass in
1096 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1097 2)
1098 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1099 if test $ac_must_keep_next = true; then
1100 ac_must_keep_next=false # Got value, back to normal.
1101 else
1102 case $ac_arg in
1103 *=* | --config-cache | -C | -disable-* | --disable-* \
1104 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1105 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1106 | -with-* | --with-* | -without-* | --without-* | --x)
1107 case "$ac_configure_args0 " in
1108 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1109 esac
1110 ;;
1111 -* ) ac_must_keep_next=true ;;
1112 esac
1113 fi
1114 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1115 # Get rid of the leading space.
1116 ac_sep=" "
1117 ;;
1118 esac
1119 done
1120done
1121$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1122$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1123
1124# When interrupted or exit'd, cleanup temporary files, and complete
1125# config.log. We remove comments because anyway the quotes in there
1126# would cause problems or look ugly.
b4e70030
JB
1127# WARNING: Be sure not to use single quotes in there, as some shells,
1128# such as our DU 5.0 friend, will then `close' the trap.
bec39cab
AC
1129trap 'exit_status=$?
1130 # Save into config.log some information that might help in debugging.
1131 {
1132 echo
1133
1134 cat <<\_ASBOX
1135## ---------------- ##
1136## Cache variables. ##
1137## ---------------- ##
1138_ASBOX
1139 echo
1140 # The following way of writing the cache mishandles newlines in values,
b4e70030 1141{
bec39cab 1142 (set) 2>&1 |
b4e70030
JB
1143 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1144 *ac_space=\ *)
bec39cab 1145 sed -n \
b4e70030
JB
1146 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1147 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1148 ;;
bec39cab 1149 *)
b4e70030
JB
1150 sed -n \
1151 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 1152 ;;
b4e70030
JB
1153 esac;
1154}
bec39cab
AC
1155 echo
1156
1157 cat <<\_ASBOX
1158## ----------------- ##
1159## Output variables. ##
1160## ----------------- ##
1161_ASBOX
1162 echo
1163 for ac_var in $ac_subst_vars
1164 do
b4e70030
JB
1165 eval ac_val=$`echo $ac_var`
1166 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1167 done | sort
1168 echo
1169
1170 if test -n "$ac_subst_files"; then
1171 cat <<\_ASBOX
b4e70030
JB
1172## ------------- ##
1173## Output files. ##
1174## ------------- ##
bec39cab
AC
1175_ASBOX
1176 echo
1177 for ac_var in $ac_subst_files
1178 do
b4e70030
JB
1179 eval ac_val=$`echo $ac_var`
1180 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1181 done | sort
1182 echo
1183 fi
1184
1185 if test -s confdefs.h; then
1186 cat <<\_ASBOX
1187## ----------- ##
1188## confdefs.h. ##
1189## ----------- ##
1190_ASBOX
1191 echo
b4e70030 1192 sed "/^$/d" confdefs.h | sort
bec39cab 1193 echo
3ace7edb 1194 fi
bec39cab
AC
1195 test "$ac_signal" != 0 &&
1196 echo "$as_me: caught signal $ac_signal"
1197 echo "$as_me: exit $exit_status"
1198 } >&5
b4e70030
JB
1199 rm -f core *.core &&
1200 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
bec39cab 1201 exit $exit_status
b4e70030 1202 ' 0
bec39cab
AC
1203for ac_signal in 1 2 13 15; do
1204 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1205done
1206ac_signal=0
1207
1208# confdefs.h avoids OS command line length limits that DEFS can exceed.
b4e70030
JB
1209rm -rf conftest* confdefs.h
1210# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1211echo >confdefs.h
bec39cab
AC
1212
1213# Predefined preprocessor variables.
1214
1215cat >>confdefs.h <<_ACEOF
1216#define PACKAGE_NAME "$PACKAGE_NAME"
1217_ACEOF
1218
1219
1220cat >>confdefs.h <<_ACEOF
1221#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1222_ACEOF
1223
1224
1225cat >>confdefs.h <<_ACEOF
1226#define PACKAGE_VERSION "$PACKAGE_VERSION"
1227_ACEOF
1228
1229
1230cat >>confdefs.h <<_ACEOF
1231#define PACKAGE_STRING "$PACKAGE_STRING"
1232_ACEOF
1233
1234
1235cat >>confdefs.h <<_ACEOF
1236#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1237_ACEOF
1238
1239
1240# Let the site file select an alternate cache file if it wants to.
1241# Prefer explicitly selected file to automatically selected ones.
b4e70030
JB
1242if test -z "$CONFIG_SITE"; then
1243 if test "x$prefix" != xNONE; then
1244 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1245 else
1246 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1247 fi
c906108c 1248fi
b4e70030 1249for ac_site_file in $CONFIG_SITE; do
c906108c 1250 if test -r "$ac_site_file"; then
bec39cab
AC
1251 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1252echo "$as_me: loading site script $ac_site_file" >&6;}
1253 sed 's/^/| /' "$ac_site_file" >&5
c906108c
SS
1254 . "$ac_site_file"
1255 fi
1256done
1257
1258if test -r "$cache_file"; then
bec39cab
AC
1259 # Some versions of bash will fail to source /dev/null (special
1260 # files actually), so we avoid doing that.
1261 if test -f "$cache_file"; then
1262 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1263echo "$as_me: loading cache $cache_file" >&6;}
1264 case $cache_file in
1265 [\\/]* | ?:[\\/]* ) . $cache_file;;
1266 *) . ./$cache_file;;
1267 esac
1268 fi
c906108c 1269else
bec39cab
AC
1270 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1271echo "$as_me: creating cache $cache_file" >&6;}
1272 >$cache_file
1273fi
1274
1275# Check that the precious variables saved in the cache have kept the same
1276# value.
1277ac_cache_corrupted=false
b4e70030
JB
1278for ac_var in `(set) 2>&1 |
1279 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
bec39cab
AC
1280 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1281 eval ac_new_set=\$ac_env_${ac_var}_set
b4e70030
JB
1282 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1283 eval ac_new_val="\$ac_env_${ac_var}_value"
bec39cab
AC
1284 case $ac_old_set,$ac_new_set in
1285 set,)
1286 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1287echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1288 ac_cache_corrupted=: ;;
1289 ,set)
1290 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1291echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1292 ac_cache_corrupted=: ;;
1293 ,);;
1294 *)
1295 if test "x$ac_old_val" != "x$ac_new_val"; then
fdc59709
PB
1296 # differences in whitespace do not lead to failure.
1297 ac_old_val_w=`echo x $ac_old_val`
1298 ac_new_val_w=`echo x $ac_new_val`
1299 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1300 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
bec39cab 1301echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
fdc59709
PB
1302 ac_cache_corrupted=:
1303 else
1304 { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1305echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1306 eval $ac_var=\$ac_old_val
1307 fi
1308 { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1309echo "$as_me: former value: \`$ac_old_val'" >&2;}
1310 { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1311echo "$as_me: current value: \`$ac_new_val'" >&2;}
bec39cab
AC
1312 fi;;
1313 esac
1314 # Pass precious variables to config.status.
1315 if test "$ac_new_set" = set; then
1316 case $ac_new_val in
b4e70030
JB
1317 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1318 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
1319 *) ac_arg=$ac_var=$ac_new_val ;;
1320 esac
1321 case " $ac_configure_args " in
1322 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1323 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1324 esac
1325 fi
1326done
1327if $ac_cache_corrupted; then
d5af19ba
DJ
1328 { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1329echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1330 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1331echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1332 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1333echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1334 { (exit 1); exit 1; }; }
c906108c
SS
1335fi
1336
b4e70030
JB
1337ac_ext=c
1338ac_cpp='$CPP $CPPFLAGS'
1339ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1340ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1341ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c
SS
1342
1343
783e057b
DJ
1344gl_header_list="$gl_header_list stdint.h"
1345gl_header_list="$gl_header_list wchar.h"
1346gl_header_list="$gl_header_list string.h"
bec39cab
AC
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
bec39cab 1363
d5af19ba
DJ
1364
1365
1366
b4e70030
JB
1367 ac_config_headers="$ac_config_headers config.h:config.in"
1368
1369echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1370echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
1371 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
413ccac7 1372if test "${enable_maintainer_mode+set}" = set; then
b4e70030
JB
1373 enableval="$enable_maintainer_mode"
1374 USE_MAINTAINER_MODE=$enableval
413ccac7
AC
1375else
1376 USE_MAINTAINER_MODE=no
b4e70030
JB
1377fi;
1378 echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
1379echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
413ccac7 1380
413ccac7
AC
1381
1382if test $USE_MAINTAINER_MODE = yes; then
1383 MAINTAINER_MODE_TRUE=
1384 MAINTAINER_MODE_FALSE='#'
1385else
1386 MAINTAINER_MODE_TRUE='#'
1387 MAINTAINER_MODE_FALSE=
1388fi
85981d60 1389
413ccac7 1390 MAINT=$MAINTAINER_MODE_TRUE
413ccac7 1391
c906108c 1392
bec39cab
AC
1393
1394ac_ext=c
1395ac_cpp='$CPP $CPPFLAGS'
1396ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1397ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1398ac_compiler_gnu=$ac_cv_c_compiler_gnu
1399if test -n "$ac_tool_prefix"; then
1400 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1401set dummy ${ac_tool_prefix}gcc; ac_word=$2
b4e70030
JB
1402echo "$as_me:$LINENO: checking for $ac_word" >&5
1403echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1404if test "${ac_cv_prog_CC+set}" = set; then
1405 echo $ECHO_N "(cached) $ECHO_C" >&6
1406else
1407 if test -n "$CC"; then
1408 ac_cv_prog_CC="$CC" # Let the user override the test.
1409else
1410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1411for as_dir in $PATH
1412do
1413 IFS=$as_save_IFS
1414 test -z "$as_dir" && as_dir=.
1415 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1416 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1417 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1418 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1419 break 2
1420 fi
1421done
1422done
1423
1424fi
1425fi
1426CC=$ac_cv_prog_CC
1427if test -n "$CC"; then
b4e70030
JB
1428 echo "$as_me:$LINENO: result: $CC" >&5
1429echo "${ECHO_T}$CC" >&6
bec39cab 1430else
b4e70030
JB
1431 echo "$as_me:$LINENO: result: no" >&5
1432echo "${ECHO_T}no" >&6
bec39cab
AC
1433fi
1434
1435fi
1436if test -z "$ac_cv_prog_CC"; then
1437 ac_ct_CC=$CC
1438 # Extract the first word of "gcc", so it can be a program name with args.
c906108c 1439set dummy gcc; ac_word=$2
b4e70030
JB
1440echo "$as_me:$LINENO: checking for $ac_word" >&5
1441echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1442if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1443 echo $ECHO_N "(cached) $ECHO_C" >&6
1444else
1445 if test -n "$ac_ct_CC"; then
1446 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1447else
1448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1449for as_dir in $PATH
1450do
1451 IFS=$as_save_IFS
1452 test -z "$as_dir" && as_dir=.
1453 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1454 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1455 ac_cv_prog_ac_ct_CC="gcc"
1456 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1457 break 2
1458 fi
1459done
1460done
1461
1462fi
1463fi
1464ac_ct_CC=$ac_cv_prog_ac_ct_CC
1465if test -n "$ac_ct_CC"; then
b4e70030
JB
1466 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1467echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1468else
b4e70030
JB
1469 echo "$as_me:$LINENO: result: no" >&5
1470echo "${ECHO_T}no" >&6
bec39cab
AC
1471fi
1472
b4e70030 1473 CC=$ac_ct_CC
bec39cab
AC
1474else
1475 CC="$ac_cv_prog_CC"
1476fi
1477
1478if test -z "$CC"; then
b4e70030
JB
1479 if test -n "$ac_tool_prefix"; then
1480 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
bec39cab 1481set dummy ${ac_tool_prefix}cc; ac_word=$2
b4e70030
JB
1482echo "$as_me:$LINENO: checking for $ac_word" >&5
1483echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1484if test "${ac_cv_prog_CC+set}" = set; then
1485 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1486else
1487 if test -n "$CC"; then
1488 ac_cv_prog_CC="$CC" # Let the user override the test.
1489else
bec39cab
AC
1490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1491for as_dir in $PATH
1492do
1493 IFS=$as_save_IFS
1494 test -z "$as_dir" && as_dir=.
1495 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1496 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1497 ac_cv_prog_CC="${ac_tool_prefix}cc"
1498 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1499 break 2
1500 fi
1501done
1502done
1503
c906108c
SS
1504fi
1505fi
bec39cab 1506CC=$ac_cv_prog_CC
c906108c 1507if test -n "$CC"; then
b4e70030
JB
1508 echo "$as_me:$LINENO: result: $CC" >&5
1509echo "${ECHO_T}$CC" >&6
c906108c 1510else
b4e70030
JB
1511 echo "$as_me:$LINENO: result: no" >&5
1512echo "${ECHO_T}no" >&6
c906108c
SS
1513fi
1514
b4e70030
JB
1515fi
1516if test -z "$ac_cv_prog_CC"; then
1517 ac_ct_CC=$CC
1518 # Extract the first word of "cc", so it can be a program name with args.
1519set dummy cc; ac_word=$2
1520echo "$as_me:$LINENO: checking for $ac_word" >&5
1521echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1522if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1523 echo $ECHO_N "(cached) $ECHO_C" >&6
1524else
1525 if test -n "$ac_ct_CC"; then
1526 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1527else
1528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1529for as_dir in $PATH
1530do
1531 IFS=$as_save_IFS
1532 test -z "$as_dir" && as_dir=.
1533 for ac_exec_ext in '' $ac_executable_extensions; do
1534 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1535 ac_cv_prog_ac_ct_CC="cc"
1536 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1537 break 2
4e8d927d 1538 fi
b4e70030
JB
1539done
1540done
1541
1542fi
1543fi
1544ac_ct_CC=$ac_cv_prog_ac_ct_CC
1545if test -n "$ac_ct_CC"; then
1546 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1547echo "${ECHO_T}$ac_ct_CC" >&6
1548else
1549 echo "$as_me:$LINENO: result: no" >&5
1550echo "${ECHO_T}no" >&6
1551fi
1552
1553 CC=$ac_ct_CC
1554else
1555 CC="$ac_cv_prog_CC"
1556fi
1557
bec39cab 1558fi
c906108c
SS
1559if test -z "$CC"; then
1560 # Extract the first word of "cc", so it can be a program name with args.
1561set dummy cc; ac_word=$2
b4e70030
JB
1562echo "$as_me:$LINENO: checking for $ac_word" >&5
1563echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1564if test "${ac_cv_prog_CC+set}" = set; then
1565 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1566else
1567 if test -n "$CC"; then
1568 ac_cv_prog_CC="$CC" # Let the user override the test.
1569else
c906108c 1570 ac_prog_rejected=no
bec39cab
AC
1571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1572for as_dir in $PATH
1573do
1574 IFS=$as_save_IFS
1575 test -z "$as_dir" && as_dir=.
1576 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1577 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1578 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1579 ac_prog_rejected=yes
1580 continue
1581 fi
1582 ac_cv_prog_CC="cc"
1583 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1584 break 2
1585 fi
1586done
1587done
1588
c906108c
SS
1589if test $ac_prog_rejected = yes; then
1590 # We found a bogon in the path, so make sure we never use it.
1591 set dummy $ac_cv_prog_CC
1592 shift
bec39cab 1593 if test $# != 0; then
c906108c
SS
1594 # We chose a different compiler from the bogus one.
1595 # However, it has the same basename, so the bogon will be chosen
1596 # first if we set CC to just the basename; use the full file name.
1597 shift
bec39cab 1598 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
1599 fi
1600fi
1601fi
1602fi
bec39cab 1603CC=$ac_cv_prog_CC
c906108c 1604if test -n "$CC"; then
b4e70030
JB
1605 echo "$as_me:$LINENO: result: $CC" >&5
1606echo "${ECHO_T}$CC" >&6
c906108c 1607else
b4e70030
JB
1608 echo "$as_me:$LINENO: result: no" >&5
1609echo "${ECHO_T}no" >&6
c906108c
SS
1610fi
1611
bec39cab
AC
1612fi
1613if test -z "$CC"; then
1614 if test -n "$ac_tool_prefix"; then
b4e70030 1615 for ac_prog in cl
bec39cab
AC
1616 do
1617 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1618set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b4e70030
JB
1619echo "$as_me:$LINENO: checking for $ac_word" >&5
1620echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1621if test "${ac_cv_prog_CC+set}" = set; then
1622 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1623else
1624 if test -n "$CC"; then
1625 ac_cv_prog_CC="$CC" # Let the user override the test.
1626else
bec39cab
AC
1627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1628for as_dir in $PATH
1629do
1630 IFS=$as_save_IFS
1631 test -z "$as_dir" && as_dir=.
1632 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1633 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1634 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1635 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1636 break 2
1637 fi
1638done
1639done
1640
c906108c
SS
1641fi
1642fi
bec39cab 1643CC=$ac_cv_prog_CC
c906108c 1644if test -n "$CC"; then
b4e70030
JB
1645 echo "$as_me:$LINENO: result: $CC" >&5
1646echo "${ECHO_T}$CC" >&6
c906108c 1647else
b4e70030
JB
1648 echo "$as_me:$LINENO: result: no" >&5
1649echo "${ECHO_T}no" >&6
c906108c 1650fi
bec39cab
AC
1651
1652 test -n "$CC" && break
1653 done
1654fi
1655if test -z "$CC"; then
1656 ac_ct_CC=$CC
b4e70030 1657 for ac_prog in cl
bec39cab
AC
1658do
1659 # Extract the first word of "$ac_prog", so it can be a program name with args.
1660set dummy $ac_prog; ac_word=$2
b4e70030
JB
1661echo "$as_me:$LINENO: checking for $ac_word" >&5
1662echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1663if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1664 echo $ECHO_N "(cached) $ECHO_C" >&6
1665else
1666 if test -n "$ac_ct_CC"; then
1667 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1668else
1669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1670for as_dir in $PATH
1671do
1672 IFS=$as_save_IFS
1673 test -z "$as_dir" && as_dir=.
1674 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1675 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1676 ac_cv_prog_ac_ct_CC="$ac_prog"
1677 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1678 break 2
c906108c 1679 fi
bec39cab
AC
1680done
1681done
1682
1683fi
1684fi
1685ac_ct_CC=$ac_cv_prog_ac_ct_CC
1686if test -n "$ac_ct_CC"; then
b4e70030
JB
1687 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1688echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1689else
b4e70030
JB
1690 echo "$as_me:$LINENO: result: no" >&5
1691echo "${ECHO_T}no" >&6
c906108c
SS
1692fi
1693
bec39cab
AC
1694 test -n "$ac_ct_CC" && break
1695done
c906108c 1696
b4e70030 1697 CC=$ac_ct_CC
bec39cab
AC
1698fi
1699
1700fi
1701
1702
d5af19ba
DJ
1703test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1704echo "$as_me: error: in \`$ac_pwd':" >&2;}
1705{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
bec39cab
AC
1706See \`config.log' for more details." >&5
1707echo "$as_me: error: no acceptable C compiler found in \$PATH
1708See \`config.log' for more details." >&2;}
d5af19ba 1709 { (exit 1); exit 1; }; }; }
bec39cab
AC
1710
1711# Provide some information about the compiler.
b4e70030
JB
1712echo "$as_me:$LINENO:" \
1713 "checking for C compiler version" >&5
bec39cab 1714ac_compiler=`set X $ac_compile; echo $2`
b4e70030
JB
1715{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1716 (eval $ac_compiler --version </dev/null >&5) 2>&5
bec39cab
AC
1717 ac_status=$?
1718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1719 (exit $ac_status); }
b4e70030
JB
1720{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1721 (eval $ac_compiler -v </dev/null >&5) 2>&5
bec39cab
AC
1722 ac_status=$?
1723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1724 (exit $ac_status); }
b4e70030
JB
1725{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1726 (eval $ac_compiler -V </dev/null >&5) 2>&5
bec39cab
AC
1727 ac_status=$?
1728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1729 (exit $ac_status); }
1730
1731cat >conftest.$ac_ext <<_ACEOF
1732/* confdefs.h. */
1733_ACEOF
1734cat confdefs.h >>conftest.$ac_ext
1735cat >>conftest.$ac_ext <<_ACEOF
1736/* end confdefs.h. */
1737
1738int
1739main ()
1740{
1741
1742 ;
1743 return 0;
1744}
1745_ACEOF
1746ac_clean_files_save=$ac_clean_files
b4e70030 1747ac_clean_files="$ac_clean_files a.out a.exe b.out"
bec39cab
AC
1748# Try to create an executable without -o first, disregard a.out.
1749# It will help us diagnose broken compilers, and finding out an intuition
1750# of exeext.
b4e70030
JB
1751echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1752echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
bec39cab
AC
1753ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1754if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1755 (eval $ac_link_default) 2>&5
1756 ac_status=$?
1757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1758 (exit $ac_status); }; then
b4e70030
JB
1759 # Find the output, starting from the most likely. This scheme is
1760# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1761# resort.
1762
1763# Be careful to initialize this variable, since it used to be cached.
1764# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1765ac_cv_exeext=
1766# b.out is created by i960 compilers.
1767for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
bec39cab
AC
1768do
1769 test -f "$ac_file" || continue
1770 case $ac_file in
b4e70030
JB
1771 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1772 ;;
1773 conftest.$ac_ext )
1774 # This is the source file.
1775 ;;
1776 [ab].out )
1777 # We found the default executable, but exeext='' is most
1778 # certainly right.
1779 break;;
1780 *.* )
1781 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1782 # FIXME: I believe we export ac_cv_exeext for Libtool,
1783 # but it would be cool to find out if it's true. Does anybody
1784 # maintain Libtool? --akim.
1785 export ac_cv_exeext
1786 break;;
1787 * )
1788 break;;
bec39cab
AC
1789 esac
1790done
1791else
1792 echo "$as_me: failed program was:" >&5
1793sed 's/^/| /' conftest.$ac_ext >&5
1794
d5af19ba
DJ
1795{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1796echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1797{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1798See \`config.log' for more details." >&5
1799echo "$as_me: error: C compiler cannot create executables
1800See \`config.log' for more details." >&2;}
d5af19ba 1801 { (exit 77); exit 77; }; }; }
bec39cab
AC
1802fi
1803
b4e70030
JB
1804ac_exeext=$ac_cv_exeext
1805echo "$as_me:$LINENO: result: $ac_file" >&5
1806echo "${ECHO_T}$ac_file" >&6
1807
1808# Check the compiler produces executables we can run. If not, either
bec39cab 1809# the compiler is broken, or we cross compile.
b4e70030
JB
1810echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1811echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
bec39cab
AC
1812# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1813# If not cross compiling, check that we can run a simple program.
1814if test "$cross_compiling" != yes; then
1815 if { ac_try='./$ac_file'
1816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1817 (eval $ac_try) 2>&5
1818 ac_status=$?
1819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1820 (exit $ac_status); }; }; then
1821 cross_compiling=no
c906108c 1822 else
bec39cab
AC
1823 if test "$cross_compiling" = maybe; then
1824 cross_compiling=yes
1825 else
d5af19ba
DJ
1826 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1827echo "$as_me: error: in \`$ac_pwd':" >&2;}
1828{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
bec39cab
AC
1829If you meant to cross compile, use \`--host'.
1830See \`config.log' for more details." >&5
1831echo "$as_me: error: cannot run C compiled programs.
1832If you meant to cross compile, use \`--host'.
1833See \`config.log' for more details." >&2;}
d5af19ba 1834 { (exit 1); exit 1; }; }; }
bec39cab 1835 fi
c906108c 1836 fi
bec39cab 1837fi
b4e70030
JB
1838echo "$as_me:$LINENO: result: yes" >&5
1839echo "${ECHO_T}yes" >&6
bec39cab 1840
b4e70030
JB
1841rm -f a.out a.exe conftest$ac_cv_exeext b.out
1842ac_clean_files=$ac_clean_files_save
1843# Check the compiler produces executables we can run. If not, either
1844# the compiler is broken, or we cross compile.
1845echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1846echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1847echo "$as_me:$LINENO: result: $cross_compiling" >&5
1848echo "${ECHO_T}$cross_compiling" >&6
4e8d927d 1849
b4e70030
JB
1850echo "$as_me:$LINENO: checking for suffix of executables" >&5
1851echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
bec39cab
AC
1853 (eval $ac_link) 2>&5
1854 ac_status=$?
1855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1856 (exit $ac_status); }; then
b4e70030
JB
1857 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1858# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1859# work properly (i.e., refer to `conftest.exe'), while it won't with
1860# `rm'.
1861for ac_file in conftest.exe conftest conftest.*; do
1862 test -f "$ac_file" || continue
1863 case $ac_file in
1864 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1865 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1866 export ac_cv_exeext
1867 break;;
1868 * ) break;;
1869 esac
1870done
c906108c 1871else
d5af19ba
DJ
1872 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1873echo "$as_me: error: in \`$ac_pwd':" >&2;}
1874{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
bec39cab
AC
1875See \`config.log' for more details." >&5
1876echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1877See \`config.log' for more details." >&2;}
d5af19ba 1878 { (exit 1); exit 1; }; }; }
c906108c 1879fi
c906108c 1880
b4e70030
JB
1881rm -f conftest$ac_cv_exeext
1882echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1883echo "${ECHO_T}$ac_cv_exeext" >&6
c906108c 1884
b4e70030 1885rm -f conftest.$ac_ext
bec39cab
AC
1886EXEEXT=$ac_cv_exeext
1887ac_exeext=$EXEEXT
b4e70030
JB
1888echo "$as_me:$LINENO: checking for suffix of object files" >&5
1889echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
bec39cab
AC
1890if test "${ac_cv_objext+set}" = set; then
1891 echo $ECHO_N "(cached) $ECHO_C" >&6
1892else
b4e70030
JB
1893 cat >conftest.$ac_ext <<_ACEOF
1894/* confdefs.h. */
1895_ACEOF
1896cat confdefs.h >>conftest.$ac_ext
1897cat >>conftest.$ac_ext <<_ACEOF
1898/* end confdefs.h. */
1899
1900int
1901main ()
1902{
1903
1904 ;
1905 return 0;
1906}
1907_ACEOF
1908rm -f conftest.o conftest.obj
bec39cab
AC
1909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1910 (eval $ac_compile) 2>&5
1911 ac_status=$?
1912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1913 (exit $ac_status); }; then
b4e70030 1914 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
bec39cab 1915 case $ac_file in
b4e70030 1916 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
bec39cab
AC
1917 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1918 break;;
1919 esac
1920done
c906108c 1921else
bec39cab
AC
1922 echo "$as_me: failed program was:" >&5
1923sed 's/^/| /' conftest.$ac_ext >&5
1924
d5af19ba
DJ
1925{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1926echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1927{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1928See \`config.log' for more details." >&5
1929echo "$as_me: error: cannot compute suffix of object files: cannot compile
1930See \`config.log' for more details." >&2;}
d5af19ba 1931 { (exit 1); exit 1; }; }; }
c906108c
SS
1932fi
1933
b4e70030 1934rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 1935fi
b4e70030
JB
1936echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1937echo "${ECHO_T}$ac_cv_objext" >&6
bec39cab
AC
1938OBJEXT=$ac_cv_objext
1939ac_objext=$OBJEXT
b4e70030
JB
1940echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1941echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
bec39cab
AC
1942if test "${ac_cv_c_compiler_gnu+set}" = set; then
1943 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 1944else
bec39cab
AC
1945 cat >conftest.$ac_ext <<_ACEOF
1946/* confdefs.h. */
1947_ACEOF
1948cat confdefs.h >>conftest.$ac_ext
1949cat >>conftest.$ac_ext <<_ACEOF
1950/* end confdefs.h. */
1951
1952int
1953main ()
1954{
1955#ifndef __GNUC__
1956 choke me
1957#endif
1958
1959 ;
1960 return 0;
1961}
1962_ACEOF
1963rm -f conftest.$ac_objext
1964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1965 (eval $ac_compile) 2>conftest.er1
1966 ac_status=$?
1967 grep -v '^ *+' conftest.er1 >conftest.err
1968 rm -f conftest.er1
1969 cat conftest.err >&5
1970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1971 (exit $ac_status); } &&
b4e70030
JB
1972 { ac_try='test -z "$ac_c_werror_flag"
1973 || test ! -s conftest.err'
bec39cab
AC
1974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1975 (eval $ac_try) 2>&5
1976 ac_status=$?
1977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1978 (exit $ac_status); }; } &&
1979 { ac_try='test -s conftest.$ac_objext'
1980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1981 (eval $ac_try) 2>&5
1982 ac_status=$?
1983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1984 (exit $ac_status); }; }; then
1985 ac_compiler_gnu=yes
1986else
1987 echo "$as_me: failed program was:" >&5
1988sed 's/^/| /' conftest.$ac_ext >&5
1989
b4e70030 1990ac_compiler_gnu=no
bec39cab
AC
1991fi
1992rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1993ac_cv_c_compiler_gnu=$ac_compiler_gnu
1994
1995fi
b4e70030
JB
1996echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
1997echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
bec39cab
AC
1998GCC=`test $ac_compiler_gnu = yes && echo yes`
1999ac_test_CFLAGS=${CFLAGS+set}
2000ac_save_CFLAGS=$CFLAGS
b4e70030
JB
2001CFLAGS="-g"
2002echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2003echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
bec39cab
AC
2004if test "${ac_cv_prog_cc_g+set}" = set; then
2005 echo $ECHO_N "(cached) $ECHO_C" >&6
2006else
b4e70030 2007 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
2008/* confdefs.h. */
2009_ACEOF
2010cat confdefs.h >>conftest.$ac_ext
2011cat >>conftest.$ac_ext <<_ACEOF
2012/* end confdefs.h. */
2013
2014int
2015main ()
2016{
2017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022rm -f conftest.$ac_objext
2023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2024 (eval $ac_compile) 2>conftest.er1
2025 ac_status=$?
2026 grep -v '^ *+' conftest.er1 >conftest.err
2027 rm -f conftest.er1
2028 cat conftest.err >&5
2029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2030 (exit $ac_status); } &&
b4e70030
JB
2031 { ac_try='test -z "$ac_c_werror_flag"
2032 || test ! -s conftest.err'
bec39cab
AC
2033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2034 (eval $ac_try) 2>&5
2035 ac_status=$?
2036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2037 (exit $ac_status); }; } &&
2038 { ac_try='test -s conftest.$ac_objext'
2039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2040 (eval $ac_try) 2>&5
2041 ac_status=$?
2042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2043 (exit $ac_status); }; }; then
c906108c
SS
2044 ac_cv_prog_cc_g=yes
2045else
bec39cab
AC
2046 echo "$as_me: failed program was:" >&5
2047sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2048
b4e70030 2049ac_cv_prog_cc_g=no
4e8d927d 2050fi
bec39cab
AC
2051rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2052fi
b4e70030
JB
2053echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2054echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c906108c 2055if test "$ac_test_CFLAGS" = set; then
bec39cab 2056 CFLAGS=$ac_save_CFLAGS
c906108c
SS
2057elif test $ac_cv_prog_cc_g = yes; then
2058 if test "$GCC" = yes; then
2059 CFLAGS="-g -O2"
2060 else
2061 CFLAGS="-g"
2062 fi
2063else
2064 if test "$GCC" = yes; then
2065 CFLAGS="-O2"
2066 else
2067 CFLAGS=
2068 fi
2069fi
b4e70030
JB
2070echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2071echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2072if test "${ac_cv_prog_cc_stdc+set}" = set; then
bec39cab
AC
2073 echo $ECHO_N "(cached) $ECHO_C" >&6
2074else
b4e70030 2075 ac_cv_prog_cc_stdc=no
bec39cab
AC
2076ac_save_CC=$CC
2077cat >conftest.$ac_ext <<_ACEOF
2078/* confdefs.h. */
2079_ACEOF
2080cat confdefs.h >>conftest.$ac_ext
2081cat >>conftest.$ac_ext <<_ACEOF
2082/* end confdefs.h. */
c906108c
SS
2083#include <stdarg.h>
2084#include <stdio.h>
2085#include <sys/types.h>
2086#include <sys/stat.h>
2087/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2088struct buf { int x; };
2089FILE * (*rcsopen) (struct buf *, struct stat *, int);
2090static char *e (p, i)
2091 char **p;
2092 int i;
2093{
2094 return p[i];
2095}
2096static char *f (char * (*g) (char **, int), char **p, ...)
2097{
2098 char *s;
2099 va_list v;
2100 va_start (v,p);
2101 s = g (p, va_arg (v,int));
2102 va_end (v);
2103 return s;
2104}
bec39cab
AC
2105
2106/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2107 function prototypes and stuff, but not '\xHH' hex character constants.
2108 These don't provoke an error unfortunately, instead are silently treated
b4e70030 2109 as 'x'. The following induces an error, until -std1 is added to get
bec39cab
AC
2110 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2111 array size at least. It's necessary to write '\x00'==0 to get something
b4e70030 2112 that's true only with -std1. */
bec39cab
AC
2113int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2114
c906108c
SS
2115int test (int i, double x);
2116struct s1 {int (*f) (int a);};
2117struct s2 {int (*f) (double a);};
2118int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2119int argc;
2120char **argv;
bec39cab
AC
2121int
2122main ()
2123{
c906108c 2124return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
2125 ;
2126 return 0;
2127}
2128_ACEOF
b4e70030
JB
2129# Don't try gcc -ansi; that turns off useful extensions and
2130# breaks some systems' header files.
2131# AIX -qlanglvl=ansi
2132# Ultrix and OSF/1 -std1
2133# HP-UX 10.20 and later -Ae
2134# HP-UX older versions -Aa -D_HPUX_SOURCE
2135# SVR4 -Xc -D__EXTENSIONS__
2136for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
2137do
2138 CC="$ac_save_CC $ac_arg"
2139 rm -f conftest.$ac_objext
2140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2141 (eval $ac_compile) 2>conftest.er1
2142 ac_status=$?
2143 grep -v '^ *+' conftest.er1 >conftest.err
2144 rm -f conftest.er1
2145 cat conftest.err >&5
2146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2147 (exit $ac_status); } &&
b4e70030
JB
2148 { ac_try='test -z "$ac_c_werror_flag"
2149 || test ! -s conftest.err'
bec39cab
AC
2150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2151 (eval $ac_try) 2>&5
2152 ac_status=$?
2153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2154 (exit $ac_status); }; } &&
2155 { ac_try='test -s conftest.$ac_objext'
2156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2157 (eval $ac_try) 2>&5
2158 ac_status=$?
2159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2160 (exit $ac_status); }; }; then
b4e70030
JB
2161 ac_cv_prog_cc_stdc=$ac_arg
2162break
c906108c 2163else
bec39cab
AC
2164 echo "$as_me: failed program was:" >&5
2165sed 's/^/| /' conftest.$ac_ext >&5
2166
c906108c 2167fi
bec39cab 2168rm -f conftest.err conftest.$ac_objext
c906108c 2169done
b4e70030 2170rm -f conftest.$ac_ext conftest.$ac_objext
bec39cab 2171CC=$ac_save_CC
c906108c
SS
2172
2173fi
b4e70030
JB
2174
2175case "x$ac_cv_prog_cc_stdc" in
2176 x|xno)
2177 echo "$as_me:$LINENO: result: none needed" >&5
2178echo "${ECHO_T}none needed" >&6 ;;
bec39cab 2179 *)
b4e70030
JB
2180 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2181echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2182 CC="$CC $ac_cv_prog_cc_stdc" ;;
c906108c
SS
2183esac
2184
b4e70030
JB
2185# Some people use a C++ compiler to compile C. Since we use `exit',
2186# in C++ we need to declare it. In case someone uses the same compiler
2187# for both compiling C and C++ we need to have the C++ compiler decide
2188# the declaration of exit, since it's the most demanding environment.
2189cat >conftest.$ac_ext <<_ACEOF
2190#ifndef __cplusplus
2191 choke me
2192#endif
2193_ACEOF
2194rm -f conftest.$ac_objext
2195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2196 (eval $ac_compile) 2>conftest.er1
2197 ac_status=$?
2198 grep -v '^ *+' conftest.er1 >conftest.err
2199 rm -f conftest.er1
2200 cat conftest.err >&5
2201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2202 (exit $ac_status); } &&
2203 { ac_try='test -z "$ac_c_werror_flag"
2204 || test ! -s conftest.err'
2205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2206 (eval $ac_try) 2>&5
2207 ac_status=$?
2208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2209 (exit $ac_status); }; } &&
2210 { ac_try='test -s conftest.$ac_objext'
2211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2212 (eval $ac_try) 2>&5
2213 ac_status=$?
2214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2215 (exit $ac_status); }; }; then
2216 for ac_declaration in \
2217 '' \
2218 'extern "C" void std::exit (int) throw (); using std::exit;' \
2219 'extern "C" void std::exit (int); using std::exit;' \
2220 'extern "C" void exit (int) throw ();' \
2221 'extern "C" void exit (int);' \
2222 'void exit (int);'
2223do
2224 cat >conftest.$ac_ext <<_ACEOF
2225/* confdefs.h. */
2226_ACEOF
2227cat confdefs.h >>conftest.$ac_ext
2228cat >>conftest.$ac_ext <<_ACEOF
2229/* end confdefs.h. */
2230$ac_declaration
2231#include <stdlib.h>
2232int
2233main ()
2234{
2235exit (42);
2236 ;
2237 return 0;
2238}
2239_ACEOF
2240rm -f conftest.$ac_objext
2241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2242 (eval $ac_compile) 2>conftest.er1
2243 ac_status=$?
2244 grep -v '^ *+' conftest.er1 >conftest.err
2245 rm -f conftest.er1
2246 cat conftest.err >&5
2247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2248 (exit $ac_status); } &&
2249 { ac_try='test -z "$ac_c_werror_flag"
2250 || test ! -s conftest.err'
2251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2252 (eval $ac_try) 2>&5
2253 ac_status=$?
2254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2255 (exit $ac_status); }; } &&
2256 { ac_try='test -s conftest.$ac_objext'
2257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2258 (eval $ac_try) 2>&5
2259 ac_status=$?
2260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2261 (exit $ac_status); }; }; then
2262 :
2263else
2264 echo "$as_me: failed program was:" >&5
2265sed 's/^/| /' conftest.$ac_ext >&5
2266
2267continue
2268fi
2269rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2270 cat >conftest.$ac_ext <<_ACEOF
2271/* confdefs.h. */
2272_ACEOF
2273cat confdefs.h >>conftest.$ac_ext
2274cat >>conftest.$ac_ext <<_ACEOF
2275/* end confdefs.h. */
2276$ac_declaration
2277int
2278main ()
2279{
2280exit (42);
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285rm -f conftest.$ac_objext
2286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2287 (eval $ac_compile) 2>conftest.er1
2288 ac_status=$?
2289 grep -v '^ *+' conftest.er1 >conftest.err
2290 rm -f conftest.er1
2291 cat conftest.err >&5
2292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2293 (exit $ac_status); } &&
2294 { ac_try='test -z "$ac_c_werror_flag"
2295 || test ! -s conftest.err'
2296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2297 (eval $ac_try) 2>&5
2298 ac_status=$?
2299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2300 (exit $ac_status); }; } &&
2301 { ac_try='test -s conftest.$ac_objext'
2302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2303 (eval $ac_try) 2>&5
2304 ac_status=$?
2305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2306 (exit $ac_status); }; }; then
2307 break
2308else
2309 echo "$as_me: failed program was:" >&5
2310sed 's/^/| /' conftest.$ac_ext >&5
2311
2312fi
2313rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2314done
2315rm -f conftest*
2316if test -n "$ac_declaration"; then
2317 echo '#ifdef __cplusplus' >>confdefs.h
2318 echo $ac_declaration >>confdefs.h
2319 echo '#endif' >>confdefs.h
2320fi
2321
2322else
2323 echo "$as_me: failed program was:" >&5
2324sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2325
b4e70030
JB
2326fi
2327rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
2328ac_ext=c
2329ac_cpp='$CPP $CPPFLAGS'
2330ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2331ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2332ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 2333
60ca704f 2334
bec39cab
AC
2335cat >>confdefs.h <<\_ACEOF
2336#define _GNU_SOURCE 1
2337_ACEOF
c906108c
SS
2338
2339
8bb2c122 2340
bec39cab
AC
2341ac_ext=c
2342ac_cpp='$CPP $CPPFLAGS'
2343ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2344ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2345ac_compiler_gnu=$ac_cv_c_compiler_gnu
b4e70030
JB
2346echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2347echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
bec39cab
AC
2348# On Suns, sometimes $CPP names a directory.
2349if test -n "$CPP" && test -d "$CPP"; then
2350 CPP=
8bb2c122 2351fi
bec39cab
AC
2352if test -z "$CPP"; then
2353 if test "${ac_cv_prog_CPP+set}" = set; then
2354 echo $ECHO_N "(cached) $ECHO_C" >&6
2355else
2356 # Double quotes because CPP needs to be expanded
2357 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2358 do
2359 ac_preproc_ok=false
2360for ac_c_preproc_warn_flag in '' yes
2361do
2362 # Use a header file that comes with gcc, so configuring glibc
2363 # with a fresh cross-compiler works.
2364 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2365 # <limits.h> exists even on freestanding compilers.
2366 # On the NeXT, cc -E runs the code through the compiler's parser,
2367 # not just through cpp. "Syntax error" is here to catch this case.
2368 cat >conftest.$ac_ext <<_ACEOF
2369/* confdefs.h. */
2370_ACEOF
2371cat confdefs.h >>conftest.$ac_ext
2372cat >>conftest.$ac_ext <<_ACEOF
2373/* end confdefs.h. */
2374#ifdef __STDC__
2375# include <limits.h>
2376#else
2377# include <assert.h>
2378#endif
2379 Syntax error
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 :
8bb2c122 2400else
bec39cab
AC
2401 echo "$as_me: failed program was:" >&5
2402sed 's/^/| /' conftest.$ac_ext >&5
2403
2404 # Broken: fails on valid input.
2405continue
2406fi
2407rm -f conftest.err conftest.$ac_ext
2408
b4e70030 2409 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2410 # can be detected and how.
2411 cat >conftest.$ac_ext <<_ACEOF
2412/* confdefs.h. */
2413_ACEOF
2414cat confdefs.h >>conftest.$ac_ext
2415cat >>conftest.$ac_ext <<_ACEOF
2416/* end confdefs.h. */
2417#include <ac_nonexistent.h>
2418_ACEOF
2419if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2420 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2421 ac_status=$?
2422 grep -v '^ *+' conftest.er1 >conftest.err
2423 rm -f conftest.er1
2424 cat conftest.err >&5
2425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2426 (exit $ac_status); } >/dev/null; then
2427 if test -s conftest.err; then
2428 ac_cpp_err=$ac_c_preproc_warn_flag
2429 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2430 else
2431 ac_cpp_err=
2432 fi
8bb2c122 2433else
bec39cab 2434 ac_cpp_err=yes
8bb2c122 2435fi
bec39cab
AC
2436if test -z "$ac_cpp_err"; then
2437 # Broken: success on invalid input.
2438continue
8bb2c122 2439else
bec39cab
AC
2440 echo "$as_me: failed program was:" >&5
2441sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 2442
bec39cab
AC
2443 # Passes both tests.
2444ac_preproc_ok=:
2445break
8bb2c122 2446fi
bec39cab 2447rm -f conftest.err conftest.$ac_ext
8bb2c122 2448
bec39cab
AC
2449done
2450# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2451rm -f conftest.err conftest.$ac_ext
2452if $ac_preproc_ok; then
2453 break
2454fi
8bb2c122 2455
bec39cab
AC
2456 done
2457 ac_cv_prog_CPP=$CPP
ddc9cd0f 2458
c906108c 2459fi
bec39cab
AC
2460 CPP=$ac_cv_prog_CPP
2461else
2462 ac_cv_prog_CPP=$CPP
c906108c 2463fi
b4e70030
JB
2464echo "$as_me:$LINENO: result: $CPP" >&5
2465echo "${ECHO_T}$CPP" >&6
bec39cab
AC
2466ac_preproc_ok=false
2467for ac_c_preproc_warn_flag in '' yes
2468do
2469 # Use a header file that comes with gcc, so configuring glibc
2470 # with a fresh cross-compiler works.
2471 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2472 # <limits.h> exists even on freestanding compilers.
2473 # On the NeXT, cc -E runs the code through the compiler's parser,
2474 # not just through cpp. "Syntax error" is here to catch this case.
2475 cat >conftest.$ac_ext <<_ACEOF
2476/* confdefs.h. */
2477_ACEOF
2478cat confdefs.h >>conftest.$ac_ext
2479cat >>conftest.$ac_ext <<_ACEOF
2480/* end confdefs.h. */
2481#ifdef __STDC__
2482# include <limits.h>
2483#else
2484# include <assert.h>
2485#endif
2486 Syntax error
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 :
c906108c 2507else
bec39cab
AC
2508 echo "$as_me: failed program was:" >&5
2509sed 's/^/| /' conftest.$ac_ext >&5
2510
2511 # Broken: fails on valid input.
2512continue
2513fi
2514rm -f conftest.err conftest.$ac_ext
2515
b4e70030 2516 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2517 # can be detected and how.
2518 cat >conftest.$ac_ext <<_ACEOF
2519/* confdefs.h. */
2520_ACEOF
2521cat confdefs.h >>conftest.$ac_ext
2522cat >>conftest.$ac_ext <<_ACEOF
2523/* end confdefs.h. */
2524#include <ac_nonexistent.h>
2525_ACEOF
2526if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2527 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2528 ac_status=$?
2529 grep -v '^ *+' conftest.er1 >conftest.err
2530 rm -f conftest.er1
2531 cat conftest.err >&5
2532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2533 (exit $ac_status); } >/dev/null; then
2534 if test -s conftest.err; then
2535 ac_cpp_err=$ac_c_preproc_warn_flag
2536 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2537 else
2538 ac_cpp_err=
2539 fi
c906108c 2540else
bec39cab 2541 ac_cpp_err=yes
c906108c 2542fi
bec39cab
AC
2543if test -z "$ac_cpp_err"; then
2544 # Broken: success on invalid input.
2545continue
c906108c 2546else
bec39cab
AC
2547 echo "$as_me: failed program was:" >&5
2548sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2549
bec39cab
AC
2550 # Passes both tests.
2551ac_preproc_ok=:
2552break
c906108c 2553fi
bec39cab 2554rm -f conftest.err conftest.$ac_ext
c906108c 2555
bec39cab
AC
2556done
2557# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2558rm -f conftest.err conftest.$ac_ext
2559if $ac_preproc_ok; then
c906108c
SS
2560 :
2561else
d5af19ba
DJ
2562 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2563echo "$as_me: error: in \`$ac_pwd':" >&2;}
2564{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
bec39cab
AC
2565See \`config.log' for more details." >&5
2566echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2567See \`config.log' for more details." >&2;}
d5af19ba 2568 { (exit 1); exit 1; }; }; }
c906108c 2569fi
c906108c 2570
bec39cab
AC
2571ac_ext=c
2572ac_cpp='$CPP $CPPFLAGS'
2573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2575ac_compiler_gnu=$ac_cv_c_compiler_gnu
2576
2577
b4e70030
JB
2578echo "$as_me:$LINENO: checking for egrep" >&5
2579echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2580if test "${ac_cv_prog_egrep+set}" = set; then
4e8d927d
DJ
2581 echo $ECHO_N "(cached) $ECHO_C" >&6
2582else
b4e70030
JB
2583 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2584 then ac_cv_prog_egrep='grep -E'
2585 else ac_cv_prog_egrep='egrep'
bec39cab 2586 fi
4e8d927d 2587fi
b4e70030
JB
2588echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2589echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2590 EGREP=$ac_cv_prog_egrep
c906108c 2591
bec39cab
AC
2592
2593
b4e70030
JB
2594echo "$as_me:$LINENO: checking for AIX" >&5
2595echo $ECHO_N "checking for AIX... $ECHO_C" >&6
bec39cab
AC
2596cat >conftest.$ac_ext <<_ACEOF
2597/* confdefs.h. */
2598_ACEOF
2599cat confdefs.h >>conftest.$ac_ext
2600cat >>conftest.$ac_ext <<_ACEOF
2601/* end confdefs.h. */
2602#ifdef _AIX
2603 yes
2604#endif
2605
2606_ACEOF
c906108c 2607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 2608 $EGREP "yes" >/dev/null 2>&1; then
b4e70030
JB
2609 echo "$as_me:$LINENO: result: yes" >&5
2610echo "${ECHO_T}yes" >&6
bec39cab
AC
2611cat >>confdefs.h <<\_ACEOF
2612#define _ALL_SOURCE 1
2613_ACEOF
2614
c906108c 2615else
b4e70030
JB
2616 echo "$as_me:$LINENO: result: no" >&5
2617echo "${ECHO_T}no" >&6
c906108c
SS
2618fi
2619rm -f conftest*
2620
c906108c 2621
b4e70030
JB
2622echo "$as_me:$LINENO: checking for library containing strerror" >&5
2623echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
bec39cab
AC
2624if test "${ac_cv_search_strerror+set}" = set; then
2625 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2626else
bec39cab 2627 ac_func_search_save_LIBS=$LIBS
b4e70030 2628ac_cv_search_strerror=no
bec39cab
AC
2629cat >conftest.$ac_ext <<_ACEOF
2630/* confdefs.h. */
2631_ACEOF
2632cat confdefs.h >>conftest.$ac_ext
2633cat >>conftest.$ac_ext <<_ACEOF
2634/* end confdefs.h. */
c906108c 2635
b4e70030 2636/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
2637#ifdef __cplusplus
2638extern "C"
2639#endif
b4e70030
JB
2640/* We use char because int might match the return type of a gcc2
2641 builtin and then its argument prototype would still apply. */
bec39cab
AC
2642char strerror ();
2643int
2644main ()
2645{
b4e70030 2646strerror ();
bec39cab
AC
2647 ;
2648 return 0;
2649}
2650_ACEOF
b4e70030 2651rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
2652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2653 (eval $ac_link) 2>conftest.er1
2654 ac_status=$?
2655 grep -v '^ *+' conftest.er1 >conftest.err
2656 rm -f conftest.er1
2657 cat conftest.err >&5
2658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2659 (exit $ac_status); } &&
b4e70030
JB
2660 { ac_try='test -z "$ac_c_werror_flag"
2661 || test ! -s conftest.err'
bec39cab
AC
2662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2663 (eval $ac_try) 2>&5
2664 ac_status=$?
2665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2666 (exit $ac_status); }; } &&
2667 { ac_try='test -s conftest$ac_exeext'
2668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2669 (eval $ac_try) 2>&5
2670 ac_status=$?
2671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2672 (exit $ac_status); }; }; then
b4e70030 2673 ac_cv_search_strerror="none required"
c906108c 2674else
bec39cab
AC
2675 echo "$as_me: failed program was:" >&5
2676sed 's/^/| /' conftest.$ac_ext >&5
c906108c
SS
2677
2678fi
bec39cab 2679rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
2680 conftest$ac_exeext conftest.$ac_ext
2681if test "$ac_cv_search_strerror" = no; then
2682 for ac_lib in cposix; do
2683 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
2684 cat >conftest.$ac_ext <<_ACEOF
2685/* confdefs.h. */
2686_ACEOF
2687cat confdefs.h >>conftest.$ac_ext
2688cat >>conftest.$ac_ext <<_ACEOF
2689/* end confdefs.h. */
2690
2691/* Override any gcc2 internal prototype to avoid an error. */
2692#ifdef __cplusplus
2693extern "C"
2694#endif
2695/* We use char because int might match the return type of a gcc2
2696 builtin and then its argument prototype would still apply. */
2697char strerror ();
2698int
2699main ()
2700{
2701strerror ();
2702 ;
2703 return 0;
2704}
2705_ACEOF
2706rm -f conftest.$ac_objext conftest$ac_exeext
2707if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2708 (eval $ac_link) 2>conftest.er1
2709 ac_status=$?
2710 grep -v '^ *+' conftest.er1 >conftest.err
2711 rm -f conftest.er1
2712 cat conftest.err >&5
2713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2714 (exit $ac_status); } &&
2715 { ac_try='test -z "$ac_c_werror_flag"
2716 || test ! -s conftest.err'
2717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2718 (eval $ac_try) 2>&5
2719 ac_status=$?
2720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2721 (exit $ac_status); }; } &&
2722 { ac_try='test -s conftest$ac_exeext'
2723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2724 (eval $ac_try) 2>&5
2725 ac_status=$?
2726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2727 (exit $ac_status); }; }; then
2728 ac_cv_search_strerror="-l$ac_lib"
2729break
4e8d927d 2730else
b4e70030
JB
2731 echo "$as_me: failed program was:" >&5
2732sed 's/^/| /' conftest.$ac_ext >&5
2733
2734fi
2735rm -f conftest.err conftest.$ac_objext \
2736 conftest$ac_exeext conftest.$ac_ext
2737 done
c906108c 2738fi
bec39cab 2739LIBS=$ac_func_search_save_LIBS
c906108c 2740fi
b4e70030
JB
2741echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
2742echo "${ECHO_T}$ac_cv_search_strerror" >&6
2743if test "$ac_cv_search_strerror" != no; then
2744 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
bec39cab 2745
c906108c
SS
2746fi
2747
783e057b
DJ
2748if test -n "$ac_tool_prefix"; then
2749 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2750set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2751echo "$as_me:$LINENO: checking for $ac_word" >&5
2752echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2753if test "${ac_cv_prog_RANLIB+set}" = set; then
2754 echo $ECHO_N "(cached) $ECHO_C" >&6
2755else
2756 if test -n "$RANLIB"; then
2757 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2758else
2759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2760for as_dir in $PATH
2761do
2762 IFS=$as_save_IFS
2763 test -z "$as_dir" && as_dir=.
2764 for ac_exec_ext in '' $ac_executable_extensions; do
2765 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2766 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2767 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2768 break 2
2769 fi
2770done
2771done
c906108c 2772
783e057b
DJ
2773fi
2774fi
2775RANLIB=$ac_cv_prog_RANLIB
2776if test -n "$RANLIB"; then
2777 echo "$as_me:$LINENO: result: $RANLIB" >&5
2778echo "${ECHO_T}$RANLIB" >&6
2779else
2780 echo "$as_me:$LINENO: result: no" >&5
2781echo "${ECHO_T}no" >&6
2782fi
bec39cab 2783
783e057b
DJ
2784fi
2785if test -z "$ac_cv_prog_RANLIB"; then
2786 ac_ct_RANLIB=$RANLIB
2787 # Extract the first word of "ranlib", so it can be a program name with args.
2788set dummy ranlib; ac_word=$2
2789echo "$as_me:$LINENO: checking for $ac_word" >&5
2790echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2791if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
bec39cab 2792 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2793else
783e057b
DJ
2794 if test -n "$ac_ct_RANLIB"; then
2795 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2796else
2797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2798for as_dir in $PATH
bec39cab 2799do
783e057b
DJ
2800 IFS=$as_save_IFS
2801 test -z "$as_dir" && as_dir=.
2802 for ac_exec_ext in '' $ac_executable_extensions; do
2803 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2804 ac_cv_prog_ac_ct_RANLIB="ranlib"
2805 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2806 break 2
2807 fi
2808done
2809done
2810
2811 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2812fi
2813fi
2814ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2815if test -n "$ac_ct_RANLIB"; then
2816 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2817echo "${ECHO_T}$ac_ct_RANLIB" >&6
2818else
2819 echo "$as_me:$LINENO: result: no" >&5
2820echo "${ECHO_T}no" >&6
2821fi
2822
2823 RANLIB=$ac_ct_RANLIB
2824else
2825 RANLIB="$ac_cv_prog_RANLIB"
2826fi
2827
2828echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2829echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2830if test "${ac_cv_header_stdc+set}" = set; then
2831 echo $ECHO_N "(cached) $ECHO_C" >&6
2832else
bec39cab
AC
2833 cat >conftest.$ac_ext <<_ACEOF
2834/* confdefs.h. */
2835_ACEOF
2836cat confdefs.h >>conftest.$ac_ext
2837cat >>conftest.$ac_ext <<_ACEOF
2838/* end confdefs.h. */
783e057b 2839#include <stdlib.h>
bec39cab 2840#include <stdarg.h>
783e057b
DJ
2841#include <string.h>
2842#include <float.h>
c906108c 2843
bec39cab
AC
2844int
2845main ()
2846{
c906108c 2847
bec39cab
AC
2848 ;
2849 return 0;
2850}
2851_ACEOF
2852rm -f conftest.$ac_objext
2853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2854 (eval $ac_compile) 2>conftest.er1
2855 ac_status=$?
2856 grep -v '^ *+' conftest.er1 >conftest.err
2857 rm -f conftest.er1
2858 cat conftest.err >&5
2859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2860 (exit $ac_status); } &&
b4e70030
JB
2861 { ac_try='test -z "$ac_c_werror_flag"
2862 || test ! -s conftest.err'
bec39cab
AC
2863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2864 (eval $ac_try) 2>&5
2865 ac_status=$?
2866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2867 (exit $ac_status); }; } &&
2868 { ac_try='test -s conftest.$ac_objext'
2869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2870 (eval $ac_try) 2>&5
2871 ac_status=$?
2872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2873 (exit $ac_status); }; }; then
783e057b 2874 ac_cv_header_stdc=yes
c906108c 2875else
bec39cab
AC
2876 echo "$as_me: failed program was:" >&5
2877sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2878
783e057b 2879ac_cv_header_stdc=no
c906108c 2880fi
bec39cab 2881rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 2882
783e057b
DJ
2883if test $ac_cv_header_stdc = yes; then
2884 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2885 cat >conftest.$ac_ext <<_ACEOF
2886/* confdefs.h. */
2887_ACEOF
2888cat confdefs.h >>conftest.$ac_ext
2889cat >>conftest.$ac_ext <<_ACEOF
2890/* end confdefs.h. */
2891#include <string.h>
c906108c 2892
783e057b
DJ
2893_ACEOF
2894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2895 $EGREP "memchr" >/dev/null 2>&1; then
2896 :
c906108c 2897else
783e057b 2898 ac_cv_header_stdc=no
c906108c 2899fi
783e057b 2900rm -f conftest*
c906108c
SS
2901
2902fi
2903
783e057b
DJ
2904if test $ac_cv_header_stdc = yes; then
2905 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2906 cat >conftest.$ac_ext <<_ACEOF
2907/* confdefs.h. */
2908_ACEOF
2909cat confdefs.h >>conftest.$ac_ext
2910cat >>conftest.$ac_ext <<_ACEOF
2911/* end confdefs.h. */
2912#include <stdlib.h>
bec39cab 2913
783e057b
DJ
2914_ACEOF
2915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2916 $EGREP "free" >/dev/null 2>&1; then
2917 :
bec39cab 2918else
783e057b 2919 ac_cv_header_stdc=no
bec39cab 2920fi
783e057b 2921rm -f conftest*
bec39cab
AC
2922
2923fi
bec39cab 2924
783e057b
DJ
2925if test $ac_cv_header_stdc = yes; then
2926 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2927 if test "$cross_compiling" = yes; then
2928 :
bec39cab 2929else
783e057b
DJ
2930 cat >conftest.$ac_ext <<_ACEOF
2931/* confdefs.h. */
2932_ACEOF
2933cat confdefs.h >>conftest.$ac_ext
2934cat >>conftest.$ac_ext <<_ACEOF
2935/* end confdefs.h. */
2936#include <ctype.h>
2937#if ((' ' & 0x0FF) == 0x020)
2938# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2939# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2940#else
2941# define ISLOWER(c) \
2942 (('a' <= (c) && (c) <= 'i') \
2943 || ('j' <= (c) && (c) <= 'r') \
2944 || ('s' <= (c) && (c) <= 'z'))
2945# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2946#endif
2947
2948#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2949int
2950main ()
2951{
2952 int i;
2953 for (i = 0; i < 256; i++)
2954 if (XOR (islower (i), ISLOWER (i))
2955 || toupper (i) != TOUPPER (i))
2956 exit(2);
2957 exit (0);
2958}
2959_ACEOF
2960rm -f conftest$ac_exeext
2961if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2962 (eval $ac_link) 2>&5
2963 ac_status=$?
2964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2965 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2967 (eval $ac_try) 2>&5
2968 ac_status=$?
2969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2970 (exit $ac_status); }; }; then
2971 :
2972else
2973 echo "$as_me: program exited with status $ac_status" >&5
2974echo "$as_me: failed program was:" >&5
2975sed 's/^/| /' conftest.$ac_ext >&5
2976
2977( exit $ac_status )
2978ac_cv_header_stdc=no
2979fi
2980rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2981fi
2982fi
2983fi
2984echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2985echo "${ECHO_T}$ac_cv_header_stdc" >&6
2986if test $ac_cv_header_stdc = yes; then
2987
2988cat >>confdefs.h <<\_ACEOF
2989#define STDC_HEADERS 1
2990_ACEOF
2991
2992fi
2993
2994# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3005 inttypes.h stdint.h unistd.h
3006do
3007as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3008echo "$as_me:$LINENO: checking for $ac_header" >&5
3009echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3010if eval "test \"\${$as_ac_Header+set}\" = set"; then
3011 echo $ECHO_N "(cached) $ECHO_C" >&6
3012else
3013 cat >conftest.$ac_ext <<_ACEOF
3014/* confdefs.h. */
3015_ACEOF
3016cat confdefs.h >>conftest.$ac_ext
3017cat >>conftest.$ac_ext <<_ACEOF
3018/* end confdefs.h. */
3019$ac_includes_default
3020
3021#include <$ac_header>
3022_ACEOF
3023rm -f conftest.$ac_objext
3024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3025 (eval $ac_compile) 2>conftest.er1
3026 ac_status=$?
3027 grep -v '^ *+' conftest.er1 >conftest.err
3028 rm -f conftest.er1
3029 cat conftest.err >&5
3030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3031 (exit $ac_status); } &&
3032 { ac_try='test -z "$ac_c_werror_flag"
3033 || test ! -s conftest.err'
3034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3035 (eval $ac_try) 2>&5
3036 ac_status=$?
3037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3038 (exit $ac_status); }; } &&
3039 { ac_try='test -s conftest.$ac_objext'
3040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3041 (eval $ac_try) 2>&5
3042 ac_status=$?
3043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3044 (exit $ac_status); }; }; then
3045 eval "$as_ac_Header=yes"
3046else
3047 echo "$as_me: failed program was:" >&5
3048sed 's/^/| /' conftest.$ac_ext >&5
3049
3050eval "$as_ac_Header=no"
3051fi
3052rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3053fi
3054echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3055echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3056if test `eval echo '${'$as_ac_Header'}'` = yes; then
3057 cat >>confdefs.h <<_ACEOF
3058#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3059_ACEOF
3060
3061fi
3062
3063done
3064
3065
3066
3067 if test "${ac_cv_header_minix_config_h+set}" = set; then
3068 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3069echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3070if test "${ac_cv_header_minix_config_h+set}" = set; then
3071 echo $ECHO_N "(cached) $ECHO_C" >&6
3072fi
3073echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3074echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3075else
3076 # Is the header compilable?
3077echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3078echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3079cat >conftest.$ac_ext <<_ACEOF
3080/* confdefs.h. */
3081_ACEOF
3082cat confdefs.h >>conftest.$ac_ext
3083cat >>conftest.$ac_ext <<_ACEOF
3084/* end confdefs.h. */
3085$ac_includes_default
3086#include <minix/config.h>
3087_ACEOF
3088rm -f conftest.$ac_objext
3089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3090 (eval $ac_compile) 2>conftest.er1
3091 ac_status=$?
3092 grep -v '^ *+' conftest.er1 >conftest.err
3093 rm -f conftest.er1
3094 cat conftest.err >&5
3095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3096 (exit $ac_status); } &&
3097 { ac_try='test -z "$ac_c_werror_flag"
3098 || test ! -s conftest.err'
3099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3100 (eval $ac_try) 2>&5
3101 ac_status=$?
3102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3103 (exit $ac_status); }; } &&
3104 { ac_try='test -s conftest.$ac_objext'
3105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3106 (eval $ac_try) 2>&5
3107 ac_status=$?
3108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3109 (exit $ac_status); }; }; then
3110 ac_header_compiler=yes
3111else
3112 echo "$as_me: failed program was:" >&5
3113sed 's/^/| /' conftest.$ac_ext >&5
3114
3115ac_header_compiler=no
3116fi
3117rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3118echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3119echo "${ECHO_T}$ac_header_compiler" >&6
3120
3121# Is the header present?
3122echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3123echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3124cat >conftest.$ac_ext <<_ACEOF
3125/* confdefs.h. */
3126_ACEOF
3127cat confdefs.h >>conftest.$ac_ext
3128cat >>conftest.$ac_ext <<_ACEOF
3129/* end confdefs.h. */
3130#include <minix/config.h>
3131_ACEOF
3132if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3133 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3134 ac_status=$?
3135 grep -v '^ *+' conftest.er1 >conftest.err
3136 rm -f conftest.er1
3137 cat conftest.err >&5
3138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3139 (exit $ac_status); } >/dev/null; then
3140 if test -s conftest.err; then
3141 ac_cpp_err=$ac_c_preproc_warn_flag
3142 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3143 else
3144 ac_cpp_err=
3145 fi
3146else
3147 ac_cpp_err=yes
3148fi
3149if test -z "$ac_cpp_err"; then
3150 ac_header_preproc=yes
3151else
3152 echo "$as_me: failed program was:" >&5
3153sed 's/^/| /' conftest.$ac_ext >&5
3154
3155 ac_header_preproc=no
3156fi
3157rm -f conftest.err conftest.$ac_ext
3158echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3159echo "${ECHO_T}$ac_header_preproc" >&6
3160
3161# So? What about this header?
3162case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3163 yes:no: )
3164 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3165echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3166 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
3167echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
3168 ac_header_preproc=yes
3169 ;;
3170 no:yes:* )
3171 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3172echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3173 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3174echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3175 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
3176echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
3177 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
3178echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
3179 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3180echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3181 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
3182echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
3183 (
3184 cat <<\_ASBOX
3185## ------------------------------------------ ##
3186## Report this to the AC_PACKAGE_NAME lists. ##
3187## ------------------------------------------ ##
3188_ASBOX
3189 ) |
3190 sed "s/^/$as_me: WARNING: /" >&2
3191 ;;
3192esac
3193echo "$as_me:$LINENO: checking for minix/config.h" >&5
3194echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3195if test "${ac_cv_header_minix_config_h+set}" = set; then
3196 echo $ECHO_N "(cached) $ECHO_C" >&6
3197else
3198 ac_cv_header_minix_config_h=$ac_header_preproc
3199fi
3200echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3201echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3202
3203fi
3204if test $ac_cv_header_minix_config_h = yes; then
3205 MINIX=yes
3206else
3207 MINIX=
3208fi
3209
3210
3211 if test "$MINIX" = yes; then
3212
3213cat >>confdefs.h <<\_ACEOF
3214#define _POSIX_SOURCE 1
3215_ACEOF
3216
3217
3218cat >>confdefs.h <<\_ACEOF
3219#define _POSIX_1_SOURCE 2
3220_ACEOF
3221
3222
3223cat >>confdefs.h <<\_ACEOF
3224#define _MINIX 1
3225_ACEOF
3226
3227 fi
3228
3229
3230
3231 echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
3232echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
3233if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
3234 echo $ECHO_N "(cached) $ECHO_C" >&6
3235else
3236 cat >conftest.$ac_ext <<_ACEOF
3237/* confdefs.h. */
3238_ACEOF
3239cat confdefs.h >>conftest.$ac_ext
3240cat >>conftest.$ac_ext <<_ACEOF
3241/* end confdefs.h. */
3242
3243# define __EXTENSIONS__ 1
3244 $ac_includes_default
3245int
3246main ()
3247{
3248
3249 ;
3250 return 0;
3251}
3252_ACEOF
3253rm -f conftest.$ac_objext
3254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3255 (eval $ac_compile) 2>conftest.er1
3256 ac_status=$?
3257 grep -v '^ *+' conftest.er1 >conftest.err
3258 rm -f conftest.er1
3259 cat conftest.err >&5
3260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3261 (exit $ac_status); } &&
3262 { ac_try='test -z "$ac_c_werror_flag"
3263 || test ! -s conftest.err'
3264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3265 (eval $ac_try) 2>&5
3266 ac_status=$?
3267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3268 (exit $ac_status); }; } &&
3269 { ac_try='test -s conftest.$ac_objext'
3270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3271 (eval $ac_try) 2>&5
3272 ac_status=$?
3273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3274 (exit $ac_status); }; }; then
3275 ac_cv_safe_to_define___extensions__=yes
3276else
3277 echo "$as_me: failed program was:" >&5
3278sed 's/^/| /' conftest.$ac_ext >&5
3279
3280ac_cv_safe_to_define___extensions__=no
3281fi
3282rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3283fi
3284echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
3285echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
3286 test $ac_cv_safe_to_define___extensions__ = yes &&
3287 cat >>confdefs.h <<\_ACEOF
3288#define __EXTENSIONS__ 1
3289_ACEOF
3290
3291 cat >>confdefs.h <<\_ACEOF
3292#define _ALL_SOURCE 1
3293_ACEOF
3294
3295 cat >>confdefs.h <<\_ACEOF
3296#define _GNU_SOURCE 1
3297_ACEOF
3298
3299 cat >>confdefs.h <<\_ACEOF
3300#define _POSIX_PTHREAD_SEMANTICS 1
3301_ACEOF
3302
3303 cat >>confdefs.h <<\_ACEOF
3304#define _TANDEM_SOURCE 1
3305_ACEOF
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5
3317echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
3318if test "${am_cv_prog_cc_stdc+set}" = set; then
3319 echo $ECHO_N "(cached) $ECHO_C" >&6
3320else
3321 am_cv_prog_cc_stdc=no
3322ac_save_CC="$CC"
3323# Don't try gcc -ansi; that turns off useful extensions and
3324# breaks some systems' header files.
3325# AIX -qlanglvl=ansi
3326# Ultrix and OSF/1 -std1
3327# HP-UX 10.20 and later -Ae
3328# HP-UX older versions -Aa -D_HPUX_SOURCE
3329# SVR4 -Xc -D__EXTENSIONS__
3330for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3331do
3332 CC="$ac_save_CC $ac_arg"
3333 cat >conftest.$ac_ext <<_ACEOF
3334/* confdefs.h. */
3335_ACEOF
3336cat confdefs.h >>conftest.$ac_ext
3337cat >>conftest.$ac_ext <<_ACEOF
3338/* end confdefs.h. */
3339#include <stdarg.h>
3340#include <stdio.h>
3341#include <sys/types.h>
3342#include <sys/stat.h>
3343/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3344struct buf { int x; };
3345FILE * (*rcsopen) (struct buf *, struct stat *, int);
3346static char *e (p, i)
3347 char **p;
3348 int i;
3349{
3350 return p[i];
3351}
3352static char *f (char * (*g) (char **, int), char **p, ...)
3353{
3354 char *s;
3355 va_list v;
3356 va_start (v,p);
3357 s = g (p, va_arg (v,int));
3358 va_end (v);
3359 return s;
3360}
3361int test (int i, double x);
3362struct s1 {int (*f) (int a);};
3363struct s2 {int (*f) (double a);};
3364int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3365int argc;
3366char **argv;
3367
3368int
3369main ()
3370{
3371
3372return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3373
3374 ;
3375 return 0;
3376}
3377_ACEOF
3378rm -f conftest.$ac_objext
3379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3380 (eval $ac_compile) 2>conftest.er1
3381 ac_status=$?
3382 grep -v '^ *+' conftest.er1 >conftest.err
3383 rm -f conftest.er1
3384 cat conftest.err >&5
3385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3386 (exit $ac_status); } &&
3387 { ac_try='test -z "$ac_c_werror_flag"
3388 || test ! -s conftest.err'
3389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3390 (eval $ac_try) 2>&5
3391 ac_status=$?
3392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3393 (exit $ac_status); }; } &&
3394 { ac_try='test -s conftest.$ac_objext'
3395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3396 (eval $ac_try) 2>&5
3397 ac_status=$?
3398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3399 (exit $ac_status); }; }; then
3400 am_cv_prog_cc_stdc="$ac_arg"; break
3401else
3402 echo "$as_me: failed program was:" >&5
3403sed 's/^/| /' conftest.$ac_ext >&5
3404
3405fi
3406rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3407done
3408CC="$ac_save_CC"
3409
3410fi
3411
3412if test -z "$am_cv_prog_cc_stdc"; then
3413 echo "$as_me:$LINENO: result: none needed" >&5
3414echo "${ECHO_T}none needed" >&6
3415else
3416 echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5
3417echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6
3418fi
3419case "x$am_cv_prog_cc_stdc" in
3420 x|xno) ;;
3421 *) CC="$CC $am_cv_prog_cc_stdc" ;;
3422esac
3423
3424
3425ac_aux_dir=
3426for ac_dir in .. $srcdir/..; do
3427 if test -f $ac_dir/install-sh; then
3428 ac_aux_dir=$ac_dir
3429 ac_install_sh="$ac_aux_dir/install-sh -c"
3430 break
3431 elif test -f $ac_dir/install.sh; then
3432 ac_aux_dir=$ac_dir
3433 ac_install_sh="$ac_aux_dir/install.sh -c"
3434 break
3435 elif test -f $ac_dir/shtool; then
3436 ac_aux_dir=$ac_dir
3437 ac_install_sh="$ac_aux_dir/shtool install -c"
3438 break
3439 fi
3440done
3441if test -z "$ac_aux_dir"; then
3442 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5
3443echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;}
3444 { (exit 1); exit 1; }; }
3445fi
3446ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3447ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3448ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
3449
3450# Make sure we can run config.sub.
3451$ac_config_sub sun4 >/dev/null 2>&1 ||
3452 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
3453echo "$as_me: error: cannot run $ac_config_sub" >&2;}
3454 { (exit 1); exit 1; }; }
3455
3456echo "$as_me:$LINENO: checking build system type" >&5
3457echo $ECHO_N "checking build system type... $ECHO_C" >&6
3458if test "${ac_cv_build+set}" = set; then
3459 echo $ECHO_N "(cached) $ECHO_C" >&6
3460else
3461 ac_cv_build_alias=$build_alias
3462test -z "$ac_cv_build_alias" &&
3463 ac_cv_build_alias=`$ac_config_guess`
3464test -z "$ac_cv_build_alias" &&
3465 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
3466echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
3467 { (exit 1); exit 1; }; }
3468ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
3469 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
3470echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
3471 { (exit 1); exit 1; }; }
3472
3473fi
3474echo "$as_me:$LINENO: result: $ac_cv_build" >&5
3475echo "${ECHO_T}$ac_cv_build" >&6
3476build=$ac_cv_build
3477build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3478build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3479build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3480
3481
3482echo "$as_me:$LINENO: checking host system type" >&5
3483echo $ECHO_N "checking host system type... $ECHO_C" >&6
3484if test "${ac_cv_host+set}" = set; then
3485 echo $ECHO_N "(cached) $ECHO_C" >&6
3486else
3487 ac_cv_host_alias=$host_alias
3488test -z "$ac_cv_host_alias" &&
3489 ac_cv_host_alias=$ac_cv_build_alias
3490ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
3491 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
3492echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
3493 { (exit 1); exit 1; }; }
3494
3495fi
3496echo "$as_me:$LINENO: result: $ac_cv_host" >&5
3497echo "${ECHO_T}$ac_cv_host" >&6
3498host=$ac_cv_host
3499host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3500host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3501host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3502
3503
3504echo "$as_me:$LINENO: checking target system type" >&5
3505echo $ECHO_N "checking target system type... $ECHO_C" >&6
3506if test "${ac_cv_target+set}" = set; then
3507 echo $ECHO_N "(cached) $ECHO_C" >&6
3508else
3509 ac_cv_target_alias=$target_alias
3510test "x$ac_cv_target_alias" = "x" &&
b4e70030
JB
3511 ac_cv_target_alias=$ac_cv_host_alias
3512ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
3513 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
3514echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
bec39cab
AC
3515 { (exit 1); exit 1; }; }
3516
3517fi
783e057b
DJ
3518echo "$as_me:$LINENO: result: $ac_cv_target" >&5
3519echo "${ECHO_T}$ac_cv_target" >&6
3520target=$ac_cv_target
3521target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3522target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3523target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3524
3525
3526# The aliases save the names the user supplied, while $host etc.
3527# will get canonicalized.
3528test -n "$target_alias" &&
3529 test "$program_prefix$program_suffix$program_transform_name" = \
3530 NONENONEs,x,x, &&
3531 program_prefix=${target_alias}-
3532
a417dc56
RW
3533# Dependency checking.
3534rm -rf .tst 2>/dev/null
3535mkdir .tst 2>/dev/null
3536if test -d .tst; then
3537 am__leading_dot=.
3538else
3539 am__leading_dot=_
3540fi
3541rmdir .tst 2>/dev/null
3542
3543DEPDIR="${am__leading_dot}deps"
3544
3545 ac_config_commands="$ac_config_commands depdir"
3546
3547
3548depcc="$CC" am_compiler_list=
3549
3550am_depcomp=$ac_aux_dir/depcomp
3551echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
3552echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
3553if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
3554 echo $ECHO_N "(cached) $ECHO_C" >&6
3555else
3556 if test -f "$am_depcomp"; then
3557 # We make a subdir and do the tests there. Otherwise we can end up
3558 # making bogus files that we don't know about and never remove. For
3559 # instance it was reported that on HP-UX the gcc test will end up
3560 # making a dummy file named `D' -- because `-MD' means `put the output
3561 # in D'.
3562 mkdir conftest.dir
3563 # Copy depcomp to subdir because otherwise we won't find it if we're
3564 # using a relative directory.
3565 cp "$am_depcomp" conftest.dir
3566 cd conftest.dir
3567 # We will build objects and dependencies in a subdirectory because
3568 # it helps to detect inapplicable dependency modes. For instance
3569 # both Tru64's cc and ICC support -MD to output dependencies as a
3570 # side effect of compilation, but ICC will put the dependencies in
3571 # the current directory while Tru64 will put them in the object
3572 # directory.
3573 mkdir sub
3574
3575 am_cv_CC_dependencies_compiler_type=none
3576 if test "$am_compiler_list" = ""; then
3577 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3578 fi
3579 for depmode in $am_compiler_list; do
3580 if test $depmode = none; then break; fi
3581
3582 echo "$as_me:$LINENO: trying $depmode" >&5
3583 # Setup a source with many dependencies, because some compilers
3584 # like to wrap large dependency lists on column 80 (with \), and
3585 # we should not choose a depcomp mode which is confused by this.
3586 #
3587 # We need to recreate these files for each test, as the compiler may
3588 # overwrite some of them when testing with obscure command lines.
3589 # This happens at least with the AIX C compiler.
3590 : > sub/conftest.c
3591 for i in 1 2 3 4 5 6; do
3592 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3593 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3594 # Solaris 8's {/usr,}/bin/sh.
3595 touch sub/conftst$i.h
3596 done
3597 echo "include sub/conftest.Po" > confmf
3598
3599 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3600 # mode. It turns out that the SunPro C++ compiler does not properly
3601 # handle `-M -o', and we need to detect this.
3602 depcmd="depmode=$depmode \
3603 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
3604 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3605 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
3606 echo "| $depcmd" | sed -e 's/ */ /g' >&5
3607 if env $depcmd > conftest.err 2>&1 &&
3608 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
3609 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
3610 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
3611 # icc doesn't choke on unknown options, it will just issue warnings
3612 # or remarks (even with -Werror). So we grep stderr for any message
3613 # that says an option was ignored or not supported.
3614 # When given -MP, icc 7.0 and 7.1 complain thusly:
3615 # icc: Command line warning: ignoring option '-M'; no argument required
3616 # The diagnosis changed in icc 8.0:
3617 # icc: Command line remark: option '-MP' not supported
3618 if (grep 'ignoring option' conftest.err ||
3619 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3620 am_cv_CC_dependencies_compiler_type=$depmode
3621 echo "$as_me:$LINENO: success" >&5
3622 break
3623 fi
3624 fi
3625 echo "$as_me:$LINENO: failure, diagnostics are:" >&5
3626 sed -e 's/^/| /' < conftest.err >&5
3627 done
3628
3629 cd ..
3630 rm -rf conftest.dir
3631else
3632 am_cv_CC_dependencies_compiler_type=none
3633fi
3634
3635fi
3636echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3637echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
3638if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
3639then { { echo "$as_me:$LINENO: error: no usable dependency style found" >&5
3640echo "$as_me: error: no usable dependency style found" >&2;}
3641 { (exit 1); exit 1; }; }
3642else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3643
3644fi
3645
3646
3647# Check for the 'make' the user wants to use.
3648for ac_prog in make
3649do
3650 # Extract the first word of "$ac_prog", so it can be a program name with args.
3651set dummy $ac_prog; ac_word=$2
3652echo "$as_me:$LINENO: checking for $ac_word" >&5
3653echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3654if test "${ac_cv_prog_MAKE+set}" = set; then
3655 echo $ECHO_N "(cached) $ECHO_C" >&6
3656else
3657 if test -n "$MAKE"; then
3658 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
3659else
3660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3661for as_dir in $PATH
3662do
3663 IFS=$as_save_IFS
3664 test -z "$as_dir" && as_dir=.
3665 for ac_exec_ext in '' $ac_executable_extensions; do
3666 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3667 ac_cv_prog_MAKE="$ac_prog"
3668 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3669 break 2
3670 fi
3671done
3672done
3673
3674fi
3675fi
3676MAKE=$ac_cv_prog_MAKE
3677if test -n "$MAKE"; then
3678 echo "$as_me:$LINENO: result: $MAKE" >&5
3679echo "${ECHO_T}$MAKE" >&6
3680else
3681 echo "$as_me:$LINENO: result: no" >&5
3682echo "${ECHO_T}no" >&6
3683fi
3684
3685 test -n "$MAKE" && break
3686done
3687
3688MAKE_IS_GNU=
3689case "`$MAKE --version 2>&1 | sed 1q`" in
3690 *GNU*)
3691 MAKE_IS_GNU=yes
3692 ;;
3693esac
3694
3695
3696if test "$MAKE_IS_GNU" = yes; then
3697 GMAKE_TRUE=
3698 GMAKE_FALSE='#'
3699else
3700 GMAKE_TRUE='#'
3701 GMAKE_FALSE=
3702fi
3703
3704echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3705echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3706set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3707if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3708 echo $ECHO_N "(cached) $ECHO_C" >&6
3709else
3710 cat >conftest.make <<\_ACEOF
3711all:
3712 @echo 'ac_maketemp="$(MAKE)"'
3713_ACEOF
3714# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3715eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3716if test -n "$ac_maketemp"; then
3717 eval ac_cv_prog_make_${ac_make}_set=yes
3718else
3719 eval ac_cv_prog_make_${ac_make}_set=no
3720fi
3721rm -f conftest.make
3722fi
3723if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3724 echo "$as_me:$LINENO: result: yes" >&5
3725echo "${ECHO_T}yes" >&6
3726 SET_MAKE=
3727else
3728 echo "$as_me:$LINENO: result: no" >&5
3729echo "${ECHO_T}no" >&6
3730 SET_MAKE="MAKE=${MAKE-make}"
3731fi
3732
3733
783e057b
DJ
3734
3735CONFIG_OBS=
3736CONFIG_DEPS=
3737CONFIG_SRCS=
3738ENABLE_CFLAGS=
3739
3740CONFIG_ALL=
3741CONFIG_CLEAN=
3742CONFIG_INSTALL=
3743CONFIG_UNINSTALL=
3744
3745# If we haven't got the data from the intl directory,
3746# assume NLS is disabled.
3747USE_NLS=no
3748LIBINTL=
3749LIBINTL_DEP=
3750INCINTL=
3751XGETTEXT=
3752GMSGFMT=
3753POSUB=
3754
3755if test -f ../intl/config.intl; then
3756 . ../intl/config.intl
3757fi
3758echo "$as_me:$LINENO: checking whether NLS is requested" >&5
3759echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
3760if test x"$USE_NLS" != xyes; then
3761 echo "$as_me:$LINENO: result: no" >&5
3762echo "${ECHO_T}no" >&6
3763else
3764 echo "$as_me:$LINENO: result: yes" >&5
3765echo "${ECHO_T}yes" >&6
3766
3767cat >>confdefs.h <<\_ACEOF
3768#define ENABLE_NLS 1
3769_ACEOF
3770
3771
3772 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
3773echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
3774 # Look for .po and .gmo files in the source directory.
3775 CATALOGS=
3776 XLINGUAS=
3777 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
3778 # If there aren't any .gmo files the shell will give us the
3779 # literal string "../path/to/srcdir/po/*.gmo" which has to be
3780 # weeded out.
3781 case "$cat" in *\**)
3782 continue;;
3783 esac
3784 # The quadruple backslash is collapsed to a double backslash
3785 # by the backticks, then collapsed again by the double quotes,
3786 # leaving us with one backslash in the sed expression (right
3787 # before the dot that mustn't act as a wildcard).
3788 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
3789 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
3790 # The user is allowed to set LINGUAS to a list of languages to
3791 # install catalogs for. If it's empty that means "all of them."
3792 if test "x$LINGUAS" = x; then
3793 CATALOGS="$CATALOGS $cat"
3794 XLINGUAS="$XLINGUAS $lang"
3795 else
3796 case "$LINGUAS" in *$lang*)
3797 CATALOGS="$CATALOGS $cat"
3798 XLINGUAS="$XLINGUAS $lang"
3799 ;;
3800 esac
3801 fi
3802 done
3803 LINGUAS="$XLINGUAS"
3804 echo "$as_me:$LINENO: result: $LINGUAS" >&5
3805echo "${ECHO_T}$LINGUAS" >&6
3806
3807
3808 DATADIRNAME=share
3809
3810 INSTOBJEXT=.mo
3811
3812 GENCAT=gencat
3813
3814 CATOBJEXT=.gmo
3815
3816fi
3817
3818localedir='${datadir}/locale'
3819
3820
3821if test x"$USE_NLS" = xyes; then
3822 CONFIG_ALL="$CONFIG_ALL all-po"
3823 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
3824 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
3825 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
3826fi
3827
3828
3829 GNULIB_MEMMEM=0;
3830 GNULIB_MEMPCPY=0;
3831 GNULIB_MEMRCHR=0;
3832 GNULIB_STPCPY=0;
3833 GNULIB_STPNCPY=0;
3834 GNULIB_STRCHRNUL=0;
3835 GNULIB_STRDUP=0;
3836 GNULIB_STRNDUP=0;
3837 GNULIB_STRNLEN=0;
3838 GNULIB_STRPBRK=0;
3839 GNULIB_STRSEP=0;
3840 GNULIB_STRSTR=0;
3841 GNULIB_STRCASESTR=0;
3842 GNULIB_STRTOK_R=0;
3843 GNULIB_MBSLEN=0;
3844 GNULIB_MBSNLEN=0;
3845 GNULIB_MBSCHR=0;
3846 GNULIB_MBSRCHR=0;
3847 GNULIB_MBSSTR=0;
3848 GNULIB_MBSCASECMP=0;
3849 GNULIB_MBSNCASECMP=0;
3850 GNULIB_MBSPCASECMP=0;
3851 GNULIB_MBSCASESTR=0;
3852 GNULIB_MBSCSPN=0;
3853 GNULIB_MBSPBRK=0;
3854 GNULIB_MBSSPN=0;
3855 GNULIB_MBSSEP=0;
3856 GNULIB_MBSTOK_R=0;
3857 GNULIB_STRERROR=0;
3858 GNULIB_STRSIGNAL=0;
3859 HAVE_DECL_MEMMEM=1;
3860 HAVE_MEMPCPY=1;
3861 HAVE_DECL_MEMRCHR=1;
3862 HAVE_STPCPY=1;
3863 HAVE_STPNCPY=1;
3864 HAVE_STRCHRNUL=1;
3865 HAVE_DECL_STRDUP=1;
3866 HAVE_STRNDUP=1;
3867 HAVE_DECL_STRNDUP=1;
3868 HAVE_DECL_STRNLEN=1;
3869 HAVE_STRPBRK=1;
3870 HAVE_STRSEP=1;
3871 HAVE_STRCASESTR=1;
3872 HAVE_DECL_STRTOK_R=1;
3873 HAVE_DECL_STRERROR=1;
3874 HAVE_DECL_STRSIGNAL=1;
3875 REPLACE_STRERROR=0;
3876 REPLACE_STRSIGNAL=0;
3877 REPLACE_MEMMEM=0;
3878 REPLACE_STRCASESTR=0;
3879 REPLACE_STRSTR=0;
3880
3881
3882 echo "$as_me:$LINENO: checking whether memmem is declared" >&5
3883echo $ECHO_N "checking whether memmem is declared... $ECHO_C" >&6
3884if test "${ac_cv_have_decl_memmem+set}" = set; then
3885 echo $ECHO_N "(cached) $ECHO_C" >&6
3886else
3887 cat >conftest.$ac_ext <<_ACEOF
3888/* confdefs.h. */
3889_ACEOF
3890cat confdefs.h >>conftest.$ac_ext
3891cat >>conftest.$ac_ext <<_ACEOF
3892/* end confdefs.h. */
3893$ac_includes_default
3894int
3895main ()
3896{
3897#ifndef memmem
3898 char *p = (char *) memmem;
3899#endif
3900
3901 ;
3902 return 0;
3903}
3904_ACEOF
3905rm -f conftest.$ac_objext
3906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3907 (eval $ac_compile) 2>conftest.er1
3908 ac_status=$?
3909 grep -v '^ *+' conftest.er1 >conftest.err
3910 rm -f conftest.er1
3911 cat conftest.err >&5
3912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3913 (exit $ac_status); } &&
3914 { ac_try='test -z "$ac_c_werror_flag"
3915 || test ! -s conftest.err'
3916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3917 (eval $ac_try) 2>&5
3918 ac_status=$?
3919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3920 (exit $ac_status); }; } &&
3921 { ac_try='test -s conftest.$ac_objext'
3922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3923 (eval $ac_try) 2>&5
3924 ac_status=$?
3925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3926 (exit $ac_status); }; }; then
3927 ac_cv_have_decl_memmem=yes
3928else
3929 echo "$as_me: failed program was:" >&5
3930sed 's/^/| /' conftest.$ac_ext >&5
3931
3932ac_cv_have_decl_memmem=no
3933fi
3934rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3935fi
3936echo "$as_me:$LINENO: result: $ac_cv_have_decl_memmem" >&5
3937echo "${ECHO_T}$ac_cv_have_decl_memmem" >&6
3938if test $ac_cv_have_decl_memmem = yes; then
3939
3940cat >>confdefs.h <<_ACEOF
3941#define HAVE_DECL_MEMMEM 1
3942_ACEOF
3943
3944
3945else
3946 cat >>confdefs.h <<_ACEOF
3947#define HAVE_DECL_MEMMEM 0
3948_ACEOF
3949
3950
3951fi
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967for ac_func in memmem
3968do
3969as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3970echo "$as_me:$LINENO: checking for $ac_func" >&5
3971echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3972if eval "test \"\${$as_ac_var+set}\" = set"; then
3973 echo $ECHO_N "(cached) $ECHO_C" >&6
3974else
3975 cat >conftest.$ac_ext <<_ACEOF
3976/* confdefs.h. */
3977_ACEOF
3978cat confdefs.h >>conftest.$ac_ext
3979cat >>conftest.$ac_ext <<_ACEOF
3980/* end confdefs.h. */
3981/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
3982 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3983#define $ac_func innocuous_$ac_func
3984
3985/* System header to define __stub macros and hopefully few prototypes,
3986 which can conflict with char $ac_func (); below.
3987 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3988 <limits.h> exists even on freestanding compilers. */
3989
3990#ifdef __STDC__
3991# include <limits.h>
3992#else
3993# include <assert.h>
3994#endif
3995
3996#undef $ac_func
3997
3998/* Override any gcc2 internal prototype to avoid an error. */
3999#ifdef __cplusplus
4000extern "C"
4001{
4002#endif
4003/* We use char because int might match the return type of a gcc2
4004 builtin and then its argument prototype would still apply. */
4005char $ac_func ();
4006/* The GNU C library defines this for functions which it implements
4007 to always fail with ENOSYS. Some functions are actually named
4008 something starting with __ and the normal name is an alias. */
4009#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4010choke me
4011#else
4012char (*f) () = $ac_func;
4013#endif
4014#ifdef __cplusplus
4015}
4016#endif
4017
4018int
4019main ()
4020{
4021return f != $ac_func;
4022 ;
4023 return 0;
4024}
4025_ACEOF
4026rm -f conftest.$ac_objext conftest$ac_exeext
4027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4028 (eval $ac_link) 2>conftest.er1
4029 ac_status=$?
4030 grep -v '^ *+' conftest.er1 >conftest.err
4031 rm -f conftest.er1
4032 cat conftest.err >&5
4033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4034 (exit $ac_status); } &&
4035 { ac_try='test -z "$ac_c_werror_flag"
4036 || test ! -s conftest.err'
4037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4038 (eval $ac_try) 2>&5
4039 ac_status=$?
4040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4041 (exit $ac_status); }; } &&
4042 { ac_try='test -s conftest$ac_exeext'
4043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4044 (eval $ac_try) 2>&5
4045 ac_status=$?
4046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4047 (exit $ac_status); }; }; then
4048 eval "$as_ac_var=yes"
4049else
4050 echo "$as_me: failed program was:" >&5
4051sed 's/^/| /' conftest.$ac_ext >&5
4052
4053eval "$as_ac_var=no"
4054fi
4055rm -f conftest.err conftest.$ac_objext \
4056 conftest$ac_exeext conftest.$ac_ext
4057fi
4058echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4059echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4060if test `eval echo '${'$as_ac_var'}'` = yes; then
4061 cat >>confdefs.h <<_ACEOF
4062#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4063_ACEOF
4064
4065else
4066
4067 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4068
4069fi
4070done
4071
4072
4073
4074 :
4075
4076
4077
4078
4079
4080 if test $ac_cv_have_decl_memmem = no; then
4081 HAVE_DECL_MEMMEM=0
4082 fi
4083 :
4084
4085
4086 echo "$as_me:$LINENO: checking for long long int" >&5
4087echo $ECHO_N "checking for long long int... $ECHO_C" >&6
4088if test "${ac_cv_type_long_long_int+set}" = set; then
4089 echo $ECHO_N "(cached) $ECHO_C" >&6
4090else
4091 cat >conftest.$ac_ext <<_ACEOF
4092
4093 /* confdefs.h. */
4094_ACEOF
4095cat confdefs.h >>conftest.$ac_ext
4096cat >>conftest.$ac_ext <<_ACEOF
4097/* end confdefs.h. */
4098/* For now, do not test the preprocessor; as of 2007 there are too many
4099 implementations with broken preprocessors. Perhaps this can
4100 be revisited in 2012. In the meantime, code should not expect
4101 #if to work with literals wider than 32 bits. */
4102 /* Test literals. */
4103 long long int ll = 9223372036854775807ll;
4104 long long int nll = -9223372036854775807LL;
4105 unsigned long long int ull = 18446744073709551615ULL;
4106 /* Test constant expressions. */
4107 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4108 ? 1 : -1)];
4109 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4110 ? 1 : -1)];
4111 int i = 63;
4112int
4113main ()
4114{
4115/* Test availability of runtime routines for shift and division. */
4116 long long int llmax = 9223372036854775807ll;
4117 unsigned long long int ullmax = 18446744073709551615ull;
4118 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4119 | (llmax / ll) | (llmax % ll)
4120 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4121 | (ullmax / ull) | (ullmax % ull));
4122 ;
4123 return 0;
4124}
4125
4126_ACEOF
4127rm -f conftest.$ac_objext conftest$ac_exeext
4128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4129 (eval $ac_link) 2>conftest.er1
4130 ac_status=$?
4131 grep -v '^ *+' conftest.er1 >conftest.err
4132 rm -f conftest.er1
4133 cat conftest.err >&5
4134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4135 (exit $ac_status); } &&
4136 { ac_try='test -z "$ac_c_werror_flag"
4137 || test ! -s conftest.err'
4138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4139 (eval $ac_try) 2>&5
4140 ac_status=$?
4141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4142 (exit $ac_status); }; } &&
4143 { ac_try='test -s conftest$ac_exeext'
4144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4145 (eval $ac_try) 2>&5
4146 ac_status=$?
4147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4148 (exit $ac_status); }; }; then
4149 if test "$cross_compiling" = yes; then
4150 ac_cv_type_long_long_int=yes
4151else
4152 cat >conftest.$ac_ext <<_ACEOF
4153/* confdefs.h. */
4154_ACEOF
4155cat confdefs.h >>conftest.$ac_ext
4156cat >>conftest.$ac_ext <<_ACEOF
4157/* end confdefs.h. */
4158#include <limits.h>
4159 #ifndef LLONG_MAX
4160 # define HALF \
4161 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4162 # define LLONG_MAX (HALF - 1 + HALF)
4163 #endif
4164int
4165main ()
4166{
4167long long int n = 1;
4168 int i;
4169 for (i = 0; ; i++)
4170 {
4171 long long int m = n << i;
4172 if (m >> i != n)
4173 return 1;
4174 if (LLONG_MAX / 2 < m)
4175 break;
4176 }
4177 return 0;
4178 ;
4179 return 0;
4180}
4181_ACEOF
4182rm -f conftest$ac_exeext
4183if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4184 (eval $ac_link) 2>&5
4185 ac_status=$?
4186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4187 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4189 (eval $ac_try) 2>&5
4190 ac_status=$?
4191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4192 (exit $ac_status); }; }; then
4193 ac_cv_type_long_long_int=yes
4194else
4195 echo "$as_me: program exited with status $ac_status" >&5
4196echo "$as_me: failed program was:" >&5
4197sed 's/^/| /' conftest.$ac_ext >&5
4198
4199( exit $ac_status )
4200ac_cv_type_long_long_int=no
4201fi
4202rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4203fi
4204else
4205 echo "$as_me: failed program was:" >&5
4206sed 's/^/| /' conftest.$ac_ext >&5
4207
4208ac_cv_type_long_long_int=no
4209fi
4210rm -f conftest.err conftest.$ac_objext \
4211 conftest$ac_exeext conftest.$ac_ext
4212fi
4213echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
4214echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
4215 if test $ac_cv_type_long_long_int = yes; then
4216
4217cat >>confdefs.h <<\_ACEOF
4218#define HAVE_LONG_LONG_INT 1
4219_ACEOF
4220
4221 fi
4222
4223
4224 echo "$as_me:$LINENO: checking for unsigned long long int" >&5
4225echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6
4226if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
4227 echo $ECHO_N "(cached) $ECHO_C" >&6
4228else
4229 cat >conftest.$ac_ext <<_ACEOF
4230
4231 /* confdefs.h. */
4232_ACEOF
4233cat confdefs.h >>conftest.$ac_ext
4234cat >>conftest.$ac_ext <<_ACEOF
4235/* end confdefs.h. */
4236/* For now, do not test the preprocessor; as of 2007 there are too many
4237 implementations with broken preprocessors. Perhaps this can
4238 be revisited in 2012. In the meantime, code should not expect
4239 #if to work with literals wider than 32 bits. */
4240 /* Test literals. */
4241 long long int ll = 9223372036854775807ll;
4242 long long int nll = -9223372036854775807LL;
4243 unsigned long long int ull = 18446744073709551615ULL;
4244 /* Test constant expressions. */
4245 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4246 ? 1 : -1)];
4247 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4248 ? 1 : -1)];
4249 int i = 63;
4250int
4251main ()
4252{
4253/* Test availability of runtime routines for shift and division. */
4254 long long int llmax = 9223372036854775807ll;
4255 unsigned long long int ullmax = 18446744073709551615ull;
4256 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4257 | (llmax / ll) | (llmax % ll)
4258 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4259 | (ullmax / ull) | (ullmax % ull));
4260 ;
4261 return 0;
4262}
4263
4264_ACEOF
4265rm -f conftest.$ac_objext conftest$ac_exeext
4266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4267 (eval $ac_link) 2>conftest.er1
4268 ac_status=$?
4269 grep -v '^ *+' conftest.er1 >conftest.err
4270 rm -f conftest.er1
4271 cat conftest.err >&5
4272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4273 (exit $ac_status); } &&
4274 { ac_try='test -z "$ac_c_werror_flag"
4275 || test ! -s conftest.err'
4276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4277 (eval $ac_try) 2>&5
4278 ac_status=$?
4279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4280 (exit $ac_status); }; } &&
4281 { ac_try='test -s conftest$ac_exeext'
4282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4283 (eval $ac_try) 2>&5
4284 ac_status=$?
4285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4286 (exit $ac_status); }; }; then
4287 ac_cv_type_unsigned_long_long_int=yes
4288else
4289 echo "$as_me: failed program was:" >&5
4290sed 's/^/| /' conftest.$ac_ext >&5
4291
4292ac_cv_type_unsigned_long_long_int=no
4293fi
4294rm -f conftest.err conftest.$ac_objext \
4295 conftest$ac_exeext conftest.$ac_ext
4296fi
4297echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
4298echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6
4299 if test $ac_cv_type_unsigned_long_long_int = yes; then
4300
4301cat >>confdefs.h <<\_ACEOF
4302#define HAVE_UNSIGNED_LONG_LONG_INT 1
4303_ACEOF
4304
4305 fi
4306
4307
4308
4309 echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5
4310echo $ECHO_N "checking whether the preprocessor supports include_next... $ECHO_C" >&6
4311if test "${gl_cv_have_include_next+set}" = set; then
4312 echo $ECHO_N "(cached) $ECHO_C" >&6
4313else
4314 rm -rf conftestd1 conftestd2
4315 mkdir conftestd1 conftestd2
4316 cat <<EOF > conftestd1/conftest.h
4317#define DEFINED_IN_CONFTESTD1
4318#include_next <conftest.h>
4319#ifdef DEFINED_IN_CONFTESTD2
4320int foo;
4321#else
4322#error "include_next doesn't work"
4323#endif
4324EOF
4325 cat <<EOF > conftestd2/conftest.h
4326#ifndef DEFINED_IN_CONFTESTD1
4327#error "include_next test doesn't work"
4328#endif
4329#define DEFINED_IN_CONFTESTD2
4330EOF
4331 save_CPPFLAGS="$CPPFLAGS"
4332 CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
4333 cat >conftest.$ac_ext <<_ACEOF
4334#include <conftest.h>
4335_ACEOF
4336rm -f conftest.$ac_objext
4337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4338 (eval $ac_compile) 2>conftest.er1
4339 ac_status=$?
4340 grep -v '^ *+' conftest.er1 >conftest.err
4341 rm -f conftest.er1
4342 cat conftest.err >&5
4343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4344 (exit $ac_status); } &&
4345 { ac_try='test -z "$ac_c_werror_flag"
4346 || test ! -s conftest.err'
4347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4348 (eval $ac_try) 2>&5
4349 ac_status=$?
4350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4351 (exit $ac_status); }; } &&
4352 { ac_try='test -s conftest.$ac_objext'
4353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4354 (eval $ac_try) 2>&5
4355 ac_status=$?
4356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4357 (exit $ac_status); }; }; then
4358 gl_cv_have_include_next=yes
4359else
4360 echo "$as_me: failed program was:" >&5
4361sed 's/^/| /' conftest.$ac_ext >&5
4362
4363gl_cv_have_include_next=no
4364fi
4365rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4366 CPPFLAGS="$save_CPPFLAGS"
4367 rm -rf conftestd1 conftestd2
4368
4369fi
4370echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5
4371echo "${ECHO_T}$gl_cv_have_include_next" >&6
4372 if test $gl_cv_have_include_next = yes; then
4373
4374
4375cat >>confdefs.h <<\_ACEOF
4376#define HAVE_INCLUDE_NEXT 1
4377_ACEOF
4378
4379
4380 INCLUDE_NEXT=include_next
4381 else
4382 INCLUDE_NEXT=include
4383 fi
4384
4385
4386
4387
4388
4389
4390
4391for ac_header in $gl_header_list
4392do
4393as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4394if eval "test \"\${$as_ac_Header+set}\" = set"; then
4395 echo "$as_me:$LINENO: checking for $ac_header" >&5
4396echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4397if eval "test \"\${$as_ac_Header+set}\" = set"; then
4398 echo $ECHO_N "(cached) $ECHO_C" >&6
4399fi
4400echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4401echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4402else
4403 # Is the header compilable?
4404echo "$as_me:$LINENO: checking $ac_header usability" >&5
4405echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4406cat >conftest.$ac_ext <<_ACEOF
4407/* confdefs.h. */
4408_ACEOF
4409cat confdefs.h >>conftest.$ac_ext
4410cat >>conftest.$ac_ext <<_ACEOF
4411/* end confdefs.h. */
4412$ac_includes_default
4413#include <$ac_header>
4414_ACEOF
4415rm -f conftest.$ac_objext
4416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4417 (eval $ac_compile) 2>conftest.er1
4418 ac_status=$?
4419 grep -v '^ *+' conftest.er1 >conftest.err
4420 rm -f conftest.er1
4421 cat conftest.err >&5
4422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4423 (exit $ac_status); } &&
4424 { ac_try='test -z "$ac_c_werror_flag"
4425 || test ! -s conftest.err'
4426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4427 (eval $ac_try) 2>&5
4428 ac_status=$?
4429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4430 (exit $ac_status); }; } &&
4431 { ac_try='test -s conftest.$ac_objext'
4432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4433 (eval $ac_try) 2>&5
4434 ac_status=$?
4435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4436 (exit $ac_status); }; }; then
4437 ac_header_compiler=yes
4438else
4439 echo "$as_me: failed program was:" >&5
4440sed 's/^/| /' conftest.$ac_ext >&5
4441
4442ac_header_compiler=no
4443fi
4444rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4445echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4446echo "${ECHO_T}$ac_header_compiler" >&6
4447
4448# Is the header present?
4449echo "$as_me:$LINENO: checking $ac_header presence" >&5
4450echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4451cat >conftest.$ac_ext <<_ACEOF
4452/* confdefs.h. */
4453_ACEOF
4454cat confdefs.h >>conftest.$ac_ext
4455cat >>conftest.$ac_ext <<_ACEOF
4456/* end confdefs.h. */
4457#include <$ac_header>
4458_ACEOF
4459if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4460 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4461 ac_status=$?
4462 grep -v '^ *+' conftest.er1 >conftest.err
4463 rm -f conftest.er1
4464 cat conftest.err >&5
4465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4466 (exit $ac_status); } >/dev/null; then
4467 if test -s conftest.err; then
4468 ac_cpp_err=$ac_c_preproc_warn_flag
4469 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4470 else
4471 ac_cpp_err=
4472 fi
4473else
4474 ac_cpp_err=yes
4475fi
4476if test -z "$ac_cpp_err"; then
4477 ac_header_preproc=yes
4478else
4479 echo "$as_me: failed program was:" >&5
4480sed 's/^/| /' conftest.$ac_ext >&5
4481
4482 ac_header_preproc=no
4483fi
4484rm -f conftest.err conftest.$ac_ext
4485echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4486echo "${ECHO_T}$ac_header_preproc" >&6
4487
4488# So? What about this header?
4489case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4490 yes:no: )
4491 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4492echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4493 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4494echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4495 ac_header_preproc=yes
4496 ;;
4497 no:yes:* )
4498 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4499echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4500 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4501echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4502 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4503echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4504 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4505echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4506 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4507echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4508 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4509echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4510 (
4511 cat <<\_ASBOX
4512## ------------------------------------------ ##
4513## Report this to the AC_PACKAGE_NAME lists. ##
4514## ------------------------------------------ ##
4515_ASBOX
4516 ) |
4517 sed "s/^/$as_me: WARNING: /" >&2
4518 ;;
4519esac
4520echo "$as_me:$LINENO: checking for $ac_header" >&5
4521echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4522if eval "test \"\${$as_ac_Header+set}\" = set"; then
4523 echo $ECHO_N "(cached) $ECHO_C" >&6
4524else
4525 eval "$as_ac_Header=\$ac_header_preproc"
4526fi
4527echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4528echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4529
4530fi
4531if test `eval echo '${'$as_ac_Header'}'` = yes; then
4532 cat >>confdefs.h <<_ACEOF
4533#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4534_ACEOF
4535
4536fi
4537
4538done
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
4552echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6
4553if test "${ac_cv_c_restrict+set}" = set; then
4554 echo $ECHO_N "(cached) $ECHO_C" >&6
4555else
4556 ac_cv_c_restrict=no
4557 # The order here caters to the fact that C++ does not require restrict.
4558 for ac_kw in __restrict __restrict__ _Restrict restrict; do
4559 cat >conftest.$ac_ext <<_ACEOF
4560/* confdefs.h. */
4561_ACEOF
4562cat confdefs.h >>conftest.$ac_ext
4563cat >>conftest.$ac_ext <<_ACEOF
4564/* end confdefs.h. */
4565typedef int * int_ptr;
4566 int foo (int_ptr $ac_kw ip) {
4567 return ip[0];
4568 }
4569int
4570main ()
4571{
4572int s[1];
4573 int * $ac_kw t = s;
4574 t[0] = 0;
4575 return foo(t)
4576 ;
4577 return 0;
4578}
4579_ACEOF
4580rm -f conftest.$ac_objext
4581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4582 (eval $ac_compile) 2>conftest.er1
4583 ac_status=$?
4584 grep -v '^ *+' conftest.er1 >conftest.err
4585 rm -f conftest.er1
4586 cat conftest.err >&5
4587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4588 (exit $ac_status); } &&
4589 { ac_try='test -z "$ac_c_werror_flag"
4590 || test ! -s conftest.err'
4591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4592 (eval $ac_try) 2>&5
4593 ac_status=$?
4594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4595 (exit $ac_status); }; } &&
4596 { ac_try='test -s conftest.$ac_objext'
4597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4598 (eval $ac_try) 2>&5
4599 ac_status=$?
4600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4601 (exit $ac_status); }; }; then
4602 ac_cv_c_restrict=$ac_kw
4603else
4604 echo "$as_me: failed program was:" >&5
4605sed 's/^/| /' conftest.$ac_ext >&5
4606
4607fi
4608rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4609 test "$ac_cv_c_restrict" != no && break
4610 done
4611
4612fi
4613echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5
4614echo "${ECHO_T}$ac_cv_c_restrict" >&6
4615
4616
4617 case $ac_cv_c_restrict in
4618 restrict) ;;
4619 no) cat >>confdefs.h <<\_ACEOF
4620#define restrict
4621_ACEOF
4622 ;;
4623 *) cat >>confdefs.h <<_ACEOF
4624#define restrict $ac_cv_c_restrict
4625_ACEOF
4626 ;;
4627 esac
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641 :
4642
4643
4644
4645
4646
4647
4648
4649 if test $gl_cv_have_include_next = yes; then
4650 gl_cv_next_string_h='<'string.h'>'
4651 else
4652 echo "$as_me:$LINENO: checking absolute name of <string.h>" >&5
4653echo $ECHO_N "checking absolute name of <string.h>... $ECHO_C" >&6
4654if test "${gl_cv_next_string_h+set}" = set; then
4655 echo $ECHO_N "(cached) $ECHO_C" >&6
4656else
4657
4658 if test $ac_cv_header_string_h = yes; then
4659 cat >conftest.$ac_ext <<_ACEOF
4660/* confdefs.h. */
4661_ACEOF
4662cat confdefs.h >>conftest.$ac_ext
4663cat >>conftest.$ac_ext <<_ACEOF
4664/* end confdefs.h. */
4665#include <string.h>
4666
4667_ACEOF
4668 gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4669 sed -n '\#/string.h#{
4670 s#.*"\(.*/string.h\)".*#\1#
4671 s#^/[^/]#//&#
4672 p
4673 q
4674 }'`'"'
4675 else
4676 gl_cv_next_string_h='<'string.h'>'
4677 fi
4678
4679fi
4680echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5
4681echo "${ECHO_T}$gl_cv_next_string_h" >&6
4682 fi
4683 NEXT_STRING_H=$gl_cv_next_string_h
4684
4685
4686
4687
4688
4689 GNULIB_WCWIDTH=0;
4690 HAVE_DECL_WCWIDTH=1;
4691 REPLACE_WCWIDTH=0;
4692 WCHAR_H=
4693
4694
4695
4696
4697
4698if false; then
4699 GL_COND_LIBTOOL_TRUE=
4700 GL_COND_LIBTOOL_FALSE='#'
4701else
4702 GL_COND_LIBTOOL_TRUE='#'
4703 GL_COND_LIBTOOL_FALSE=
4704fi
4705
4706 gl_cond_libtool=false
4707 gl_libdeps=
4708 gl_ltlibdeps=
4709
4710
4711
4712 gl_source_base='gnulib'
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722for ac_func in memchr
4723do
4724as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4725echo "$as_me:$LINENO: checking for $ac_func" >&5
4726echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4727if eval "test \"\${$as_ac_var+set}\" = set"; then
4728 echo $ECHO_N "(cached) $ECHO_C" >&6
4729else
4730 cat >conftest.$ac_ext <<_ACEOF
4731/* confdefs.h. */
4732_ACEOF
4733cat confdefs.h >>conftest.$ac_ext
4734cat >>conftest.$ac_ext <<_ACEOF
4735/* end confdefs.h. */
4736/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4737 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4738#define $ac_func innocuous_$ac_func
4739
4740/* System header to define __stub macros and hopefully few prototypes,
4741 which can conflict with char $ac_func (); below.
4742 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4743 <limits.h> exists even on freestanding compilers. */
4744
4745#ifdef __STDC__
4746# include <limits.h>
4747#else
4748# include <assert.h>
4749#endif
4750
4751#undef $ac_func
4752
4753/* Override any gcc2 internal prototype to avoid an error. */
4754#ifdef __cplusplus
4755extern "C"
4756{
4757#endif
4758/* We use char because int might match the return type of a gcc2
4759 builtin and then its argument prototype would still apply. */
4760char $ac_func ();
4761/* The GNU C library defines this for functions which it implements
4762 to always fail with ENOSYS. Some functions are actually named
4763 something starting with __ and the normal name is an alias. */
4764#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4765choke me
4766#else
4767char (*f) () = $ac_func;
4768#endif
4769#ifdef __cplusplus
4770}
4771#endif
4772
4773int
4774main ()
4775{
4776return f != $ac_func;
4777 ;
4778 return 0;
4779}
4780_ACEOF
4781rm -f conftest.$ac_objext conftest$ac_exeext
4782if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4783 (eval $ac_link) 2>conftest.er1
4784 ac_status=$?
4785 grep -v '^ *+' conftest.er1 >conftest.err
4786 rm -f conftest.er1
4787 cat conftest.err >&5
4788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4789 (exit $ac_status); } &&
4790 { ac_try='test -z "$ac_c_werror_flag"
4791 || test ! -s conftest.err'
4792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4793 (eval $ac_try) 2>&5
4794 ac_status=$?
4795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4796 (exit $ac_status); }; } &&
4797 { ac_try='test -s conftest$ac_exeext'
4798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4799 (eval $ac_try) 2>&5
4800 ac_status=$?
4801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4802 (exit $ac_status); }; }; then
4803 eval "$as_ac_var=yes"
4804else
4805 echo "$as_me: failed program was:" >&5
4806sed 's/^/| /' conftest.$ac_ext >&5
4807
4808eval "$as_ac_var=no"
4809fi
4810rm -f conftest.err conftest.$ac_objext \
4811 conftest$ac_exeext conftest.$ac_ext
4812fi
4813echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4814echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4815if test `eval echo '${'$as_ac_var'}'` = yes; then
4816 cat >>confdefs.h <<_ACEOF
4817#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4818_ACEOF
4819
4820else
4821
4822 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4823
4824fi
4825done
4826
4827
4828 if test $ac_cv_func_memchr = no; then
4829
4830
4831for ac_header in bp-sym.h
4832do
4833as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4834if eval "test \"\${$as_ac_Header+set}\" = set"; then
4835 echo "$as_me:$LINENO: checking for $ac_header" >&5
4836echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4837if eval "test \"\${$as_ac_Header+set}\" = set"; then
4838 echo $ECHO_N "(cached) $ECHO_C" >&6
4839fi
4840echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4841echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4842else
4843 # Is the header compilable?
4844echo "$as_me:$LINENO: checking $ac_header usability" >&5
4845echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4846cat >conftest.$ac_ext <<_ACEOF
4847/* confdefs.h. */
4848_ACEOF
4849cat confdefs.h >>conftest.$ac_ext
4850cat >>conftest.$ac_ext <<_ACEOF
4851/* end confdefs.h. */
4852$ac_includes_default
4853#include <$ac_header>
4854_ACEOF
4855rm -f conftest.$ac_objext
4856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4857 (eval $ac_compile) 2>conftest.er1
4858 ac_status=$?
4859 grep -v '^ *+' conftest.er1 >conftest.err
4860 rm -f conftest.er1
4861 cat conftest.err >&5
4862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4863 (exit $ac_status); } &&
4864 { ac_try='test -z "$ac_c_werror_flag"
4865 || test ! -s conftest.err'
4866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4867 (eval $ac_try) 2>&5
4868 ac_status=$?
4869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4870 (exit $ac_status); }; } &&
4871 { ac_try='test -s conftest.$ac_objext'
4872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4873 (eval $ac_try) 2>&5
4874 ac_status=$?
4875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4876 (exit $ac_status); }; }; then
4877 ac_header_compiler=yes
4878else
4879 echo "$as_me: failed program was:" >&5
4880sed 's/^/| /' conftest.$ac_ext >&5
4881
4882ac_header_compiler=no
4883fi
4884rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4885echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4886echo "${ECHO_T}$ac_header_compiler" >&6
4887
4888# Is the header present?
4889echo "$as_me:$LINENO: checking $ac_header presence" >&5
4890echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4891cat >conftest.$ac_ext <<_ACEOF
4892/* confdefs.h. */
4893_ACEOF
4894cat confdefs.h >>conftest.$ac_ext
4895cat >>conftest.$ac_ext <<_ACEOF
4896/* end confdefs.h. */
4897#include <$ac_header>
4898_ACEOF
4899if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4900 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4901 ac_status=$?
4902 grep -v '^ *+' conftest.er1 >conftest.err
4903 rm -f conftest.er1
4904 cat conftest.err >&5
4905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4906 (exit $ac_status); } >/dev/null; then
4907 if test -s conftest.err; then
4908 ac_cpp_err=$ac_c_preproc_warn_flag
4909 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4910 else
4911 ac_cpp_err=
4912 fi
4913else
4914 ac_cpp_err=yes
4915fi
4916if test -z "$ac_cpp_err"; then
4917 ac_header_preproc=yes
4918else
4919 echo "$as_me: failed program was:" >&5
4920sed 's/^/| /' conftest.$ac_ext >&5
4921
4922 ac_header_preproc=no
4923fi
4924rm -f conftest.err conftest.$ac_ext
4925echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4926echo "${ECHO_T}$ac_header_preproc" >&6
4927
4928# So? What about this header?
4929case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4930 yes:no: )
4931 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4932echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4933 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4934echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4935 ac_header_preproc=yes
4936 ;;
4937 no:yes:* )
4938 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4939echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4940 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4941echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4942 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4943echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4944 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4945echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4946 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4947echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4948 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4949echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4950 (
4951 cat <<\_ASBOX
4952## ------------------------------------------ ##
4953## Report this to the AC_PACKAGE_NAME lists. ##
4954## ------------------------------------------ ##
4955_ASBOX
4956 ) |
4957 sed "s/^/$as_me: WARNING: /" >&2
4958 ;;
4959esac
4960echo "$as_me:$LINENO: checking for $ac_header" >&5
4961echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4962if eval "test \"\${$as_ac_Header+set}\" = set"; then
4963 echo $ECHO_N "(cached) $ECHO_C" >&6
4964else
4965 eval "$as_ac_Header=\$ac_header_preproc"
4966fi
4967echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4968echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4969
4970fi
4971if test `eval echo '${'$as_ac_Header'}'` = yes; then
4972 cat >>confdefs.h <<_ACEOF
4973#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4974_ACEOF
4975
4976fi
4977
4978done
4979
4980
4981 fi
4982
4983
4984 echo "$as_me:$LINENO: checking for working memcmp" >&5
4985echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
4986if test "${ac_cv_func_memcmp_working+set}" = set; then
4987 echo $ECHO_N "(cached) $ECHO_C" >&6
4988else
4989 if test "$cross_compiling" = yes; then
4990 ac_cv_func_memcmp_working=no
4991else
4992 cat >conftest.$ac_ext <<_ACEOF
4993/* confdefs.h. */
4994_ACEOF
4995cat confdefs.h >>conftest.$ac_ext
4996cat >>conftest.$ac_ext <<_ACEOF
4997/* end confdefs.h. */
4998$ac_includes_default
4999int
5000main ()
5001{
5002
5003 /* Some versions of memcmp are not 8-bit clean. */
5004 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
5005 if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
5006 exit (1);
5007
5008 /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
5009 or more and with at least one buffer not starting on a 4-byte boundary.
5010 William Lewis provided this test program. */
5011 {
5012 char foo[21];
5013 char bar[21];
5014 int i;
5015 for (i = 0; i < 4; i++)
5016 {
5017 char *a = foo + i;
5018 char *b = bar + i;
5019 strcpy (a, "--------01111111");
5020 strcpy (b, "--------10000000");
5021 if (memcmp (a, b, 16) >= 0)
5022 exit (1);
5023 }
5024 exit (0);
5025 }
5026
5027 ;
5028 return 0;
5029}
5030_ACEOF
5031rm -f conftest$ac_exeext
5032if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5033 (eval $ac_link) 2>&5
5034 ac_status=$?
5035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5036 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5038 (eval $ac_try) 2>&5
5039 ac_status=$?
5040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5041 (exit $ac_status); }; }; then
5042 ac_cv_func_memcmp_working=yes
5043else
5044 echo "$as_me: program exited with status $ac_status" >&5
5045echo "$as_me: failed program was:" >&5
5046sed 's/^/| /' conftest.$ac_ext >&5
5047
5048( exit $ac_status )
5049ac_cv_func_memcmp_working=no
5050fi
5051rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5052fi
5053fi
5054echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
5055echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
5056test $ac_cv_func_memcmp_working = no &&
5057
5058
5059
5060
5061
5062
5063 gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext"
5064
5065
5066 if test $ac_cv_func_memcmp_working = no; then
5067
5068cat >>confdefs.h <<\_ACEOF
5069#define memcmp rpl_memcmp
5070_ACEOF
5071
5072 :
5073 fi
5074
5075
5076
5077 if test $ac_cv_have_decl_memmem = yes; then
5078 echo "$as_me:$LINENO: checking whether memmem works in linear time" >&5
5079echo $ECHO_N "checking whether memmem works in linear time... $ECHO_C" >&6
5080if test "${gl_cv_func_memmem_works+set}" = set; then
5081 echo $ECHO_N "(cached) $ECHO_C" >&6
5082else
5083 if test "$cross_compiling" = yes; then
5084 gl_cv_func_memmem_works="guessing no"
5085else
5086 cat >conftest.$ac_ext <<_ACEOF
5087/* confdefs.h. */
5088_ACEOF
5089cat confdefs.h >>conftest.$ac_ext
5090cat >>conftest.$ac_ext <<_ACEOF
5091/* end confdefs.h. */
5092
5093#include <string.h> /* for memmem */
5094#include <stdlib.h> /* for malloc */
5095#include <unistd.h> /* for alarm */
5096
5097int
5098main ()
5099{
5100size_t m = 1000000;
5101 char *haystack = (char *) malloc (2 * m + 1);
5102 char *needle = (char *) malloc (m + 1);
5103 void *result = 0;
5104 /* Failure to compile this test due to missing alarm is okay,
5105 since all such platforms (mingw) also lack memmem. */
5106 alarm (5);
5107 /* Check for quadratic performance. */
5108 if (haystack && needle)
5109 {
5110 memset (haystack, 'A', 2 * m);
5111 haystack[2 * m] = 'B';
5112 memset (needle, 'A', m);
5113 needle[m] = 'B';
5114 result = memmem (haystack, 2 * m + 1, needle, m + 1);
5115 }
5116 /* Check for empty needle behavior. */
5117 return !result || !memmem ("a", 1, 0, 0);
5118 ;
5119 return 0;
5120}
5121_ACEOF
5122rm -f conftest$ac_exeext
5123if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5124 (eval $ac_link) 2>&5
5125 ac_status=$?
5126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5127 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5129 (eval $ac_try) 2>&5
5130 ac_status=$?
5131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132 (exit $ac_status); }; }; then
5133 gl_cv_func_memmem_works=yes
5134else
5135 echo "$as_me: program exited with status $ac_status" >&5
5136echo "$as_me: failed program was:" >&5
5137sed 's/^/| /' conftest.$ac_ext >&5
5138
5139( exit $ac_status )
5140gl_cv_func_memmem_works=no
5141fi
5142rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5143fi
5144fi
5145echo "$as_me:$LINENO: result: $gl_cv_func_memmem_works" >&5
5146echo "${ECHO_T}$gl_cv_func_memmem_works" >&6
5147 if test "$gl_cv_func_memmem_works" != yes; then
5148 REPLACE_MEMMEM=1
5149
5150
5151
5152
5153
5154
5155
5156 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
5157
5158 fi
5159 fi
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173for ac_func in memmem
5174do
5175as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5176echo "$as_me:$LINENO: checking for $ac_func" >&5
5177echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5178if eval "test \"\${$as_ac_var+set}\" = set"; then
5179 echo $ECHO_N "(cached) $ECHO_C" >&6
5180else
5181 cat >conftest.$ac_ext <<_ACEOF
5182/* confdefs.h. */
5183_ACEOF
5184cat confdefs.h >>conftest.$ac_ext
5185cat >>conftest.$ac_ext <<_ACEOF
5186/* end confdefs.h. */
5187/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5188 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5189#define $ac_func innocuous_$ac_func
5190
5191/* System header to define __stub macros and hopefully few prototypes,
5192 which can conflict with char $ac_func (); below.
5193 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5194 <limits.h> exists even on freestanding compilers. */
5195
5196#ifdef __STDC__
5197# include <limits.h>
5198#else
5199# include <assert.h>
5200#endif
5201
5202#undef $ac_func
5203
5204/* Override any gcc2 internal prototype to avoid an error. */
5205#ifdef __cplusplus
5206extern "C"
5207{
5208#endif
5209/* We use char because int might match the return type of a gcc2
5210 builtin and then its argument prototype would still apply. */
5211char $ac_func ();
5212/* The GNU C library defines this for functions which it implements
5213 to always fail with ENOSYS. Some functions are actually named
5214 something starting with __ and the normal name is an alias. */
5215#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5216choke me
5217#else
5218char (*f) () = $ac_func;
5219#endif
5220#ifdef __cplusplus
5221}
5222#endif
5223
5224int
5225main ()
5226{
5227return f != $ac_func;
5228 ;
5229 return 0;
5230}
5231_ACEOF
5232rm -f conftest.$ac_objext conftest$ac_exeext
5233if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5234 (eval $ac_link) 2>conftest.er1
5235 ac_status=$?
5236 grep -v '^ *+' conftest.er1 >conftest.err
5237 rm -f conftest.er1
5238 cat conftest.err >&5
5239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5240 (exit $ac_status); } &&
5241 { ac_try='test -z "$ac_c_werror_flag"
5242 || test ! -s conftest.err'
5243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5244 (eval $ac_try) 2>&5
5245 ac_status=$?
5246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5247 (exit $ac_status); }; } &&
5248 { ac_try='test -s conftest$ac_exeext'
5249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5250 (eval $ac_try) 2>&5
5251 ac_status=$?
5252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5253 (exit $ac_status); }; }; then
5254 eval "$as_ac_var=yes"
5255else
5256 echo "$as_me: failed program was:" >&5
5257sed 's/^/| /' conftest.$ac_ext >&5
5258
5259eval "$as_ac_var=no"
5260fi
5261rm -f conftest.err conftest.$ac_objext \
5262 conftest$ac_exeext conftest.$ac_ext
5263fi
5264echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5265echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5266if test `eval echo '${'$as_ac_var'}'` = yes; then
5267 cat >>confdefs.h <<_ACEOF
5268#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5269_ACEOF
5270
5271else
5272
5273 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5274
5275fi
5276done
5277
5278
5279
5280 :
5281
5282
5283
5284
5285
5286 if test $ac_cv_have_decl_memmem = no; then
5287 HAVE_DECL_MEMMEM=0
5288 fi
5289 :
5290
5291
5292
5293 GNULIB_MEMMEM=1
5294
5295
5296
5297
5298 if test $ac_cv_type_long_long_int = yes; then
5299 HAVE_LONG_LONG_INT=1
5300 else
5301 HAVE_LONG_LONG_INT=0
5302 fi
5303
5304
5305 if test $ac_cv_type_unsigned_long_long_int = yes; then
5306 HAVE_UNSIGNED_LONG_LONG_INT=1
5307 else
5308 HAVE_UNSIGNED_LONG_LONG_INT=0
5309 fi
5310
5311
5312 if test $ac_cv_header_inttypes_h = yes; then
5313 HAVE_INTTYPES_H=1
5314 else
5315 HAVE_INTTYPES_H=0
5316 fi
5317
5318
5319 if test $ac_cv_header_sys_types_h = yes; then
5320 HAVE_SYS_TYPES_H=1
5321 else
5322 HAVE_SYS_TYPES_H=0
5323 fi
5324
5325
5326
5327
5328
5329 :
5330
5331
5332
5333
5334
5335
5336
5337 if test $gl_cv_have_include_next = yes; then
5338 gl_cv_next_stdint_h='<'stdint.h'>'
5339 else
5340 echo "$as_me:$LINENO: checking absolute name of <stdint.h>" >&5
5341echo $ECHO_N "checking absolute name of <stdint.h>... $ECHO_C" >&6
5342if test "${gl_cv_next_stdint_h+set}" = set; then
5343 echo $ECHO_N "(cached) $ECHO_C" >&6
5344else
5345
5346 if test $ac_cv_header_stdint_h = yes; then
5347 cat >conftest.$ac_ext <<_ACEOF
5348/* confdefs.h. */
5349_ACEOF
5350cat confdefs.h >>conftest.$ac_ext
5351cat >>conftest.$ac_ext <<_ACEOF
5352/* end confdefs.h. */
5353#include <stdint.h>
5354
5355_ACEOF
5356 gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5357 sed -n '\#/stdint.h#{
5358 s#.*"\(.*/stdint.h\)".*#\1#
5359 s#^/[^/]#//&#
5360 p
5361 q
5362 }'`'"'
5363 else
5364 gl_cv_next_stdint_h='<'stdint.h'>'
5365 fi
5366
5367fi
5368echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5
5369echo "${ECHO_T}$gl_cv_next_stdint_h" >&6
5370 fi
5371 NEXT_STDINT_H=$gl_cv_next_stdint_h
5372
5373
5374
5375 if test $ac_cv_header_stdint_h = yes; then
5376 HAVE_STDINT_H=1
5377 else
5378 HAVE_STDINT_H=0
5379 fi
5380
5381
5382 if test $ac_cv_header_stdint_h = yes; then
5383 echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5
5384echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6
5385if test "${gl_cv_header_working_stdint_h+set}" = set; then
5386 echo $ECHO_N "(cached) $ECHO_C" >&6
5387else
5388 gl_cv_header_working_stdint_h=no
5389 cat >conftest.$ac_ext <<_ACEOF
5390
5391 /* confdefs.h. */
5392_ACEOF
5393cat confdefs.h >>conftest.$ac_ext
5394cat >>conftest.$ac_ext <<_ACEOF
5395/* end confdefs.h. */
5396
5397#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
5398#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
5399#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5400#include <stdint.h>
5401/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
5402#if !(defined WCHAR_MIN && defined WCHAR_MAX)
5403#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
5404#endif
5405
5406
5407 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5408 included before <wchar.h>. */
5409 #include <stddef.h>
5410 #include <signal.h>
5411 #if HAVE_WCHAR_H
5412 # include <stdio.h>
5413 # include <time.h>
5414 # include <wchar.h>
5415 #endif
5416
5417
5418#ifdef INT8_MAX
5419int8_t a1 = INT8_MAX;
5420int8_t a1min = INT8_MIN;
5421#endif
5422#ifdef INT16_MAX
5423int16_t a2 = INT16_MAX;
5424int16_t a2min = INT16_MIN;
5425#endif
5426#ifdef INT32_MAX
5427int32_t a3 = INT32_MAX;
5428int32_t a3min = INT32_MIN;
5429#endif
5430#ifdef INT64_MAX
5431int64_t a4 = INT64_MAX;
5432int64_t a4min = INT64_MIN;
5433#endif
5434#ifdef UINT8_MAX
5435uint8_t b1 = UINT8_MAX;
5436#else
5437typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
5438#endif
5439#ifdef UINT16_MAX
5440uint16_t b2 = UINT16_MAX;
5441#endif
5442#ifdef UINT32_MAX
5443uint32_t b3 = UINT32_MAX;
5444#endif
5445#ifdef UINT64_MAX
5446uint64_t b4 = UINT64_MAX;
5447#endif
5448int_least8_t c1 = INT8_C (0x7f);
5449int_least8_t c1max = INT_LEAST8_MAX;
5450int_least8_t c1min = INT_LEAST8_MIN;
5451int_least16_t c2 = INT16_C (0x7fff);
5452int_least16_t c2max = INT_LEAST16_MAX;
5453int_least16_t c2min = INT_LEAST16_MIN;
5454int_least32_t c3 = INT32_C (0x7fffffff);
5455int_least32_t c3max = INT_LEAST32_MAX;
5456int_least32_t c3min = INT_LEAST32_MIN;
5457int_least64_t c4 = INT64_C (0x7fffffffffffffff);
5458int_least64_t c4max = INT_LEAST64_MAX;
5459int_least64_t c4min = INT_LEAST64_MIN;
5460uint_least8_t d1 = UINT8_C (0xff);
5461uint_least8_t d1max = UINT_LEAST8_MAX;
5462uint_least16_t d2 = UINT16_C (0xffff);
5463uint_least16_t d2max = UINT_LEAST16_MAX;
5464uint_least32_t d3 = UINT32_C (0xffffffff);
5465uint_least32_t d3max = UINT_LEAST32_MAX;
5466uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
5467uint_least64_t d4max = UINT_LEAST64_MAX;
5468int_fast8_t e1 = INT_FAST8_MAX;
5469int_fast8_t e1min = INT_FAST8_MIN;
5470int_fast16_t e2 = INT_FAST16_MAX;
5471int_fast16_t e2min = INT_FAST16_MIN;
5472int_fast32_t e3 = INT_FAST32_MAX;
5473int_fast32_t e3min = INT_FAST32_MIN;
5474int_fast64_t e4 = INT_FAST64_MAX;
5475int_fast64_t e4min = INT_FAST64_MIN;
5476uint_fast8_t f1 = UINT_FAST8_MAX;
5477uint_fast16_t f2 = UINT_FAST16_MAX;
5478uint_fast32_t f3 = UINT_FAST32_MAX;
5479uint_fast64_t f4 = UINT_FAST64_MAX;
5480#ifdef INTPTR_MAX
5481intptr_t g = INTPTR_MAX;
5482intptr_t gmin = INTPTR_MIN;
5483#endif
5484#ifdef UINTPTR_MAX
5485uintptr_t h = UINTPTR_MAX;
5486#endif
5487intmax_t i = INTMAX_MAX;
5488uintmax_t j = UINTMAX_MAX;
5489
5490#include <limits.h> /* for CHAR_BIT */
5491#define TYPE_MINIMUM(t) \
5492 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
5493#define TYPE_MAXIMUM(t) \
5494 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
5495struct s {
5496 int check_PTRDIFF:
5497 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
5498 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
5499 ? 1 : -1;
5500 /* Detect bug in FreeBSD 6.0 / ia64. */
5501 int check_SIG_ATOMIC:
5502 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
5503 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
5504 ? 1 : -1;
5505 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
5506 int check_WCHAR:
5507 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
5508 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
5509 ? 1 : -1;
5510 /* Detect bug in mingw. */
5511 int check_WINT:
5512 WINT_MIN == TYPE_MINIMUM (wint_t)
5513 && WINT_MAX == TYPE_MAXIMUM (wint_t)
5514 ? 1 : -1;
5515
5516 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
5517 int check_UINT8_C:
5518 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
5519 int check_UINT16_C:
5520 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
5521
5522 /* Detect bugs in OpenBSD 3.9 stdint.h. */
5523#ifdef UINT8_MAX
5524 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
5525#endif
5526#ifdef UINT16_MAX
5527 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
5528#endif
5529#ifdef UINT32_MAX
5530 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
5531#endif
5532#ifdef UINT64_MAX
5533 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
5534#endif
5535 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
5536 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
5537 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
5538 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
5539 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
5540 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
5541 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
5542 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
5543 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
5544 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
5545 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
5546};
5547
5548int
5549main ()
5550{
5551
5552 ;
5553 return 0;
5554}
5555_ACEOF
5556rm -f conftest.$ac_objext
5557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5558 (eval $ac_compile) 2>conftest.er1
5559 ac_status=$?
5560 grep -v '^ *+' conftest.er1 >conftest.err
5561 rm -f conftest.er1
5562 cat conftest.err >&5
5563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5564 (exit $ac_status); } &&
5565 { ac_try='test -z "$ac_c_werror_flag"
5566 || test ! -s conftest.err'
5567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5568 (eval $ac_try) 2>&5
5569 ac_status=$?
5570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5571 (exit $ac_status); }; } &&
5572 { ac_try='test -s conftest.$ac_objext'
5573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5574 (eval $ac_try) 2>&5
5575 ac_status=$?
5576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5577 (exit $ac_status); }; }; then
5578 gl_cv_header_working_stdint_h=yes
5579else
5580 echo "$as_me: failed program was:" >&5
5581sed 's/^/| /' conftest.$ac_ext >&5
5582
5583fi
5584rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5585fi
5586echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5
5587echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6
5588 fi
5589 if test "$gl_cv_header_working_stdint_h" = yes; then
5590 STDINT_H=
5591 else
5592
5593
5594for ac_header in sys/inttypes.h sys/bitypes.h
5595do
5596as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5597if eval "test \"\${$as_ac_Header+set}\" = set"; then
5598 echo "$as_me:$LINENO: checking for $ac_header" >&5
5599echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5600if eval "test \"\${$as_ac_Header+set}\" = set"; then
5601 echo $ECHO_N "(cached) $ECHO_C" >&6
5602fi
5603echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5604echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5605else
5606 # Is the header compilable?
5607echo "$as_me:$LINENO: checking $ac_header usability" >&5
5608echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5609cat >conftest.$ac_ext <<_ACEOF
5610/* confdefs.h. */
5611_ACEOF
5612cat confdefs.h >>conftest.$ac_ext
5613cat >>conftest.$ac_ext <<_ACEOF
5614/* end confdefs.h. */
5615$ac_includes_default
5616#include <$ac_header>
5617_ACEOF
5618rm -f conftest.$ac_objext
5619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5620 (eval $ac_compile) 2>conftest.er1
5621 ac_status=$?
5622 grep -v '^ *+' conftest.er1 >conftest.err
5623 rm -f conftest.er1
5624 cat conftest.err >&5
5625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5626 (exit $ac_status); } &&
5627 { ac_try='test -z "$ac_c_werror_flag"
5628 || test ! -s conftest.err'
5629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5630 (eval $ac_try) 2>&5
5631 ac_status=$?
5632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5633 (exit $ac_status); }; } &&
5634 { ac_try='test -s conftest.$ac_objext'
5635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5636 (eval $ac_try) 2>&5
5637 ac_status=$?
5638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5639 (exit $ac_status); }; }; then
5640 ac_header_compiler=yes
5641else
5642 echo "$as_me: failed program was:" >&5
5643sed 's/^/| /' conftest.$ac_ext >&5
5644
5645ac_header_compiler=no
5646fi
5647rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5648echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5649echo "${ECHO_T}$ac_header_compiler" >&6
5650
5651# Is the header present?
5652echo "$as_me:$LINENO: checking $ac_header presence" >&5
5653echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5654cat >conftest.$ac_ext <<_ACEOF
5655/* confdefs.h. */
5656_ACEOF
5657cat confdefs.h >>conftest.$ac_ext
5658cat >>conftest.$ac_ext <<_ACEOF
5659/* end confdefs.h. */
5660#include <$ac_header>
5661_ACEOF
5662if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5663 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5664 ac_status=$?
5665 grep -v '^ *+' conftest.er1 >conftest.err
5666 rm -f conftest.er1
5667 cat conftest.err >&5
5668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5669 (exit $ac_status); } >/dev/null; then
5670 if test -s conftest.err; then
5671 ac_cpp_err=$ac_c_preproc_warn_flag
5672 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5673 else
5674 ac_cpp_err=
5675 fi
5676else
5677 ac_cpp_err=yes
5678fi
5679if test -z "$ac_cpp_err"; then
5680 ac_header_preproc=yes
5681else
5682 echo "$as_me: failed program was:" >&5
5683sed 's/^/| /' conftest.$ac_ext >&5
5684
5685 ac_header_preproc=no
5686fi
5687rm -f conftest.err conftest.$ac_ext
5688echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5689echo "${ECHO_T}$ac_header_preproc" >&6
5690
5691# So? What about this header?
5692case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5693 yes:no: )
5694 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5695echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5696 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5697echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5698 ac_header_preproc=yes
5699 ;;
5700 no:yes:* )
5701 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5702echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5703 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5704echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5705 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5706echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5707 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5708echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5709 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5710echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5711 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5712echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5713 (
5714 cat <<\_ASBOX
5715## ------------------------------------------ ##
5716## Report this to the AC_PACKAGE_NAME lists. ##
5717## ------------------------------------------ ##
5718_ASBOX
5719 ) |
5720 sed "s/^/$as_me: WARNING: /" >&2
5721 ;;
5722esac
5723echo "$as_me:$LINENO: checking for $ac_header" >&5
5724echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5725if eval "test \"\${$as_ac_Header+set}\" = set"; then
5726 echo $ECHO_N "(cached) $ECHO_C" >&6
5727else
5728 eval "$as_ac_Header=\$ac_header_preproc"
5729fi
5730echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5731echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5732
5733fi
5734if test `eval echo '${'$as_ac_Header'}'` = yes; then
5735 cat >>confdefs.h <<_ACEOF
5736#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5737_ACEOF
5738
5739fi
5740
5741done
5742
5743 if test $ac_cv_header_sys_inttypes_h = yes; then
5744 HAVE_SYS_INTTYPES_H=1
5745 else
5746 HAVE_SYS_INTTYPES_H=0
5747 fi
5748
5749 if test $ac_cv_header_sys_bitypes_h = yes; then
5750 HAVE_SYS_BITYPES_H=1
5751 else
5752 HAVE_SYS_BITYPES_H=0
5753 fi
5754
5755
5756
5757 :
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
5773 echo "$as_me:$LINENO: checking for bit size of $gltype" >&5
5774echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6
5775if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\" = set"; then
5776 echo $ECHO_N "(cached) $ECHO_C" >&6
5777else
5778 if test "$cross_compiling" = yes; then
5779 # Depending upon the size, compute the lo and hi bounds.
5780cat >conftest.$ac_ext <<_ACEOF
5781/* confdefs.h. */
5782_ACEOF
5783cat confdefs.h >>conftest.$ac_ext
5784cat >>conftest.$ac_ext <<_ACEOF
5785/* end confdefs.h. */
5786
5787 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5788 included before <wchar.h>. */
5789 #include <stddef.h>
5790 #include <signal.h>
5791 #if HAVE_WCHAR_H
5792 # include <stdio.h>
5793 # include <time.h>
5794 # include <wchar.h>
5795 #endif
5796
5797#include <limits.h>
5798int
5799main ()
5800{
5801static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)];
5802test_array [0] = 0
5803
5804 ;
5805 return 0;
5806}
5807_ACEOF
5808rm -f conftest.$ac_objext
5809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5810 (eval $ac_compile) 2>conftest.er1
5811 ac_status=$?
5812 grep -v '^ *+' conftest.er1 >conftest.err
5813 rm -f conftest.er1
5814 cat conftest.err >&5
5815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5816 (exit $ac_status); } &&
5817 { ac_try='test -z "$ac_c_werror_flag"
5818 || test ! -s conftest.err'
5819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5820 (eval $ac_try) 2>&5
5821 ac_status=$?
5822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823 (exit $ac_status); }; } &&
5824 { ac_try='test -s conftest.$ac_objext'
5825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5826 (eval $ac_try) 2>&5
5827 ac_status=$?
5828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5829 (exit $ac_status); }; }; then
5830 ac_lo=0 ac_mid=0
5831 while :; do
5832 cat >conftest.$ac_ext <<_ACEOF
5833/* confdefs.h. */
5834_ACEOF
5835cat confdefs.h >>conftest.$ac_ext
5836cat >>conftest.$ac_ext <<_ACEOF
5837/* end confdefs.h. */
5838
5839 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5840 included before <wchar.h>. */
5841 #include <stddef.h>
5842 #include <signal.h>
5843 #if HAVE_WCHAR_H
5844 # include <stdio.h>
5845 # include <time.h>
5846 # include <wchar.h>
5847 #endif
5848
5849#include <limits.h>
5850int
5851main ()
5852{
5853static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
5854test_array [0] = 0
5855
5856 ;
5857 return 0;
5858}
5859_ACEOF
5860rm -f conftest.$ac_objext
5861if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5862 (eval $ac_compile) 2>conftest.er1
5863 ac_status=$?
5864 grep -v '^ *+' conftest.er1 >conftest.err
5865 rm -f conftest.er1
5866 cat conftest.err >&5
5867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5868 (exit $ac_status); } &&
5869 { ac_try='test -z "$ac_c_werror_flag"
5870 || test ! -s conftest.err'
5871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5872 (eval $ac_try) 2>&5
5873 ac_status=$?
5874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5875 (exit $ac_status); }; } &&
5876 { ac_try='test -s conftest.$ac_objext'
5877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5878 (eval $ac_try) 2>&5
5879 ac_status=$?
5880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5881 (exit $ac_status); }; }; then
5882 ac_hi=$ac_mid; break
5883else
5884 echo "$as_me: failed program was:" >&5
5885sed 's/^/| /' conftest.$ac_ext >&5
5886
5887ac_lo=`expr $ac_mid + 1`
5888 if test $ac_lo -le $ac_mid; then
5889 ac_lo= ac_hi=
5890 break
5891 fi
5892 ac_mid=`expr 2 '*' $ac_mid + 1`
5893fi
5894rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5895 done
5896else
5897 echo "$as_me: failed program was:" >&5
5898sed 's/^/| /' conftest.$ac_ext >&5
5899
5900cat >conftest.$ac_ext <<_ACEOF
5901/* confdefs.h. */
5902_ACEOF
5903cat confdefs.h >>conftest.$ac_ext
5904cat >>conftest.$ac_ext <<_ACEOF
5905/* end confdefs.h. */
5906
5907 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5908 included before <wchar.h>. */
5909 #include <stddef.h>
5910 #include <signal.h>
5911 #if HAVE_WCHAR_H
5912 # include <stdio.h>
5913 # include <time.h>
5914 # include <wchar.h>
5915 #endif
5916
5917#include <limits.h>
5918int
5919main ()
5920{
5921static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)];
5922test_array [0] = 0
5923
5924 ;
5925 return 0;
5926}
5927_ACEOF
5928rm -f conftest.$ac_objext
5929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5930 (eval $ac_compile) 2>conftest.er1
5931 ac_status=$?
5932 grep -v '^ *+' conftest.er1 >conftest.err
5933 rm -f conftest.er1
5934 cat conftest.err >&5
5935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5936 (exit $ac_status); } &&
5937 { ac_try='test -z "$ac_c_werror_flag"
5938 || test ! -s conftest.err'
5939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5940 (eval $ac_try) 2>&5
5941 ac_status=$?
5942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5943 (exit $ac_status); }; } &&
5944 { ac_try='test -s conftest.$ac_objext'
5945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5946 (eval $ac_try) 2>&5
5947 ac_status=$?
5948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949 (exit $ac_status); }; }; then
5950 ac_hi=-1 ac_mid=-1
5951 while :; do
5952 cat >conftest.$ac_ext <<_ACEOF
5953/* confdefs.h. */
5954_ACEOF
5955cat confdefs.h >>conftest.$ac_ext
5956cat >>conftest.$ac_ext <<_ACEOF
5957/* end confdefs.h. */
5958
5959 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5960 included before <wchar.h>. */
5961 #include <stddef.h>
5962 #include <signal.h>
5963 #if HAVE_WCHAR_H
5964 # include <stdio.h>
5965 # include <time.h>
5966 # include <wchar.h>
5967 #endif
5968
5969#include <limits.h>
5970int
5971main ()
5972{
5973static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)];
5974test_array [0] = 0
5975
5976 ;
5977 return 0;
5978}
5979_ACEOF
5980rm -f conftest.$ac_objext
5981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5982 (eval $ac_compile) 2>conftest.er1
5983 ac_status=$?
5984 grep -v '^ *+' conftest.er1 >conftest.err
5985 rm -f conftest.er1
5986 cat conftest.err >&5
5987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5988 (exit $ac_status); } &&
5989 { ac_try='test -z "$ac_c_werror_flag"
5990 || test ! -s conftest.err'
5991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5992 (eval $ac_try) 2>&5
5993 ac_status=$?
5994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5995 (exit $ac_status); }; } &&
5996 { ac_try='test -s conftest.$ac_objext'
5997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5998 (eval $ac_try) 2>&5
5999 ac_status=$?
6000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6001 (exit $ac_status); }; }; then
6002 ac_lo=$ac_mid; break
6003else
6004 echo "$as_me: failed program was:" >&5
6005sed 's/^/| /' conftest.$ac_ext >&5
6006
6007ac_hi=`expr '(' $ac_mid ')' - 1`
6008 if test $ac_mid -le $ac_hi; then
6009 ac_lo= ac_hi=
6010 break
6011 fi
6012 ac_mid=`expr 2 '*' $ac_mid`
6013fi
6014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6015 done
6016else
6017 echo "$as_me: failed program was:" >&5
6018sed 's/^/| /' conftest.$ac_ext >&5
6019
6020ac_lo= ac_hi=
6021fi
6022rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6023fi
6024rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6025# Binary search between lo and hi bounds.
6026while test "x$ac_lo" != "x$ac_hi"; do
6027 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
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
6035 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6036 included before <wchar.h>. */
6037 #include <stddef.h>
6038 #include <signal.h>
6039 #if HAVE_WCHAR_H
6040 # include <stdio.h>
6041 # include <time.h>
6042 # include <wchar.h>
6043 #endif
6044
6045#include <limits.h>
6046int
6047main ()
6048{
6049static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
6050test_array [0] = 0
6051
6052 ;
6053 return 0;
6054}
6055_ACEOF
6056rm -f conftest.$ac_objext
6057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6058 (eval $ac_compile) 2>conftest.er1
6059 ac_status=$?
6060 grep -v '^ *+' conftest.er1 >conftest.err
6061 rm -f conftest.er1
6062 cat conftest.err >&5
6063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6064 (exit $ac_status); } &&
6065 { ac_try='test -z "$ac_c_werror_flag"
6066 || test ! -s conftest.err'
6067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6068 (eval $ac_try) 2>&5
6069 ac_status=$?
6070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6071 (exit $ac_status); }; } &&
6072 { ac_try='test -s conftest.$ac_objext'
6073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6074 (eval $ac_try) 2>&5
6075 ac_status=$?
6076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6077 (exit $ac_status); }; }; then
6078 ac_hi=$ac_mid
6079else
6080 echo "$as_me: failed program was:" >&5
6081sed 's/^/| /' conftest.$ac_ext >&5
6082
6083ac_lo=`expr '(' $ac_mid ')' + 1`
6084fi
6085rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6086done
6087case $ac_lo in
6088?*) result=$ac_lo;;
6089'') result=unknown ;;
6090esac
6091else
6092 if test "$cross_compiling" = yes; then
d5af19ba
DJ
6093 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6094echo "$as_me: error: in \`$ac_pwd':" >&2;}
6095{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
783e057b
DJ
6096See \`config.log' for more details." >&5
6097echo "$as_me: error: cannot run test program while cross compiling
6098See \`config.log' for more details." >&2;}
d5af19ba 6099 { (exit 1); exit 1; }; }; }
783e057b
DJ
6100else
6101 cat >conftest.$ac_ext <<_ACEOF
6102/* confdefs.h. */
6103_ACEOF
6104cat confdefs.h >>conftest.$ac_ext
6105cat >>conftest.$ac_ext <<_ACEOF
6106/* end confdefs.h. */
6107
6108 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6109 included before <wchar.h>. */
6110 #include <stddef.h>
6111 #include <signal.h>
6112 #if HAVE_WCHAR_H
6113 # include <stdio.h>
6114 # include <time.h>
6115 # include <wchar.h>
6116 #endif
6117
6118#include <limits.h>
6119long longval () { return sizeof ($gltype) * CHAR_BIT; }
6120unsigned long ulongval () { return sizeof ($gltype) * CHAR_BIT; }
6121#include <stdio.h>
6122#include <stdlib.h>
6123int
6124main ()
6125{
6126
6127 FILE *f = fopen ("conftest.val", "w");
6128 if (! f)
6129 exit (1);
6130 if ((sizeof ($gltype) * CHAR_BIT) < 0)
6131 {
6132 long i = longval ();
6133 if (i != (sizeof ($gltype) * CHAR_BIT))
6134 exit (1);
6135 fprintf (f, "%ld\n", i);
6136 }
6137 else
6138 {
6139 unsigned long i = ulongval ();
6140 if (i != (sizeof ($gltype) * CHAR_BIT))
6141 exit (1);
6142 fprintf (f, "%lu\n", i);
6143 }
6144 exit (ferror (f) || fclose (f) != 0);
6145
6146 ;
6147 return 0;
6148}
6149_ACEOF
6150rm -f conftest$ac_exeext
6151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6152 (eval $ac_link) 2>&5
6153 ac_status=$?
6154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6155 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6157 (eval $ac_try) 2>&5
6158 ac_status=$?
6159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6160 (exit $ac_status); }; }; then
6161 result=`cat conftest.val`
6162else
6163 echo "$as_me: program exited with status $ac_status" >&5
6164echo "$as_me: failed program was:" >&5
6165sed 's/^/| /' conftest.$ac_ext >&5
6166
6167( exit $ac_status )
6168result=unknown
6169fi
6170rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6171fi
6172fi
6173rm -f conftest.val
6174 eval gl_cv_bitsizeof_${gltype}=\$result
c906108c 6175
783e057b
DJ
6176fi
6177echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&5
6178echo "${ECHO_T}`eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&6
6179 eval result=\$gl_cv_bitsizeof_${gltype}
6180 if test $result = unknown; then
6181 result=0
6182 fi
6183 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6184 cat >>confdefs.h <<_ACEOF
6185#define BITSIZEOF_${GLTYPE} $result
6186_ACEOF
c906108c 6187
783e057b
DJ
6188 eval BITSIZEOF_${GLTYPE}=\$result
6189 done
c906108c 6190
c906108c 6191
c906108c 6192
bec39cab 6193
3841debe 6194
783e057b
DJ
6195
6196
6197 for gltype in sig_atomic_t wchar_t wint_t ; do
6198 echo "$as_me:$LINENO: checking whether $gltype is signed" >&5
6199echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6
6200if eval "test \"\${gl_cv_type_${gltype}_signed+set}\" = set"; then
6201 echo $ECHO_N "(cached) $ECHO_C" >&6
6202else
6203 cat >conftest.$ac_ext <<_ACEOF
6204/* confdefs.h. */
6205_ACEOF
6206cat confdefs.h >>conftest.$ac_ext
6207cat >>conftest.$ac_ext <<_ACEOF
6208/* end confdefs.h. */
6209
6210 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6211 included before <wchar.h>. */
6212 #include <stddef.h>
6213 #include <signal.h>
6214 #if HAVE_WCHAR_H
6215 # include <stdio.h>
6216 # include <time.h>
6217 # include <wchar.h>
6218 #endif
6219
6220 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6221int
6222main ()
6223{
6224
6225 ;
6226 return 0;
6227}
6228_ACEOF
6229rm -f conftest.$ac_objext
6230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6231 (eval $ac_compile) 2>conftest.er1
6232 ac_status=$?
6233 grep -v '^ *+' conftest.er1 >conftest.err
6234 rm -f conftest.er1
6235 cat conftest.err >&5
6236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6237 (exit $ac_status); } &&
6238 { ac_try='test -z "$ac_c_werror_flag"
6239 || test ! -s conftest.err'
6240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6241 (eval $ac_try) 2>&5
6242 ac_status=$?
6243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6244 (exit $ac_status); }; } &&
6245 { ac_try='test -s conftest.$ac_objext'
6246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6247 (eval $ac_try) 2>&5
6248 ac_status=$?
6249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6250 (exit $ac_status); }; }; then
6251 result=yes
6252else
6253 echo "$as_me: failed program was:" >&5
6254sed 's/^/| /' conftest.$ac_ext >&5
6255
6256result=no
20e95c23 6257fi
783e057b
DJ
6258rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6259 eval gl_cv_type_${gltype}_signed=\$result
6260
6261fi
6262echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&5
6263echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&6
6264 eval result=\$gl_cv_type_${gltype}_signed
6265 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6266 if test "$result" = yes; then
6267 cat >>confdefs.h <<_ACEOF
6268#define HAVE_SIGNED_${GLTYPE} 1
6269_ACEOF
6270
6271 eval HAVE_SIGNED_${GLTYPE}=1
6272 else
6273 eval HAVE_SIGNED_${GLTYPE}=0
6274 fi
6275 done
6276
6277
6278 gl_cv_type_ptrdiff_t_signed=yes
6279 gl_cv_type_size_t_signed=no
6280
6281
6282
6283
6284
6285
6286
6287 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
6288 echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5
6289echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6
6290if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\" = set"; then
6291 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 6292else
783e057b
DJ
6293 eval gl_cv_type_${gltype}_suffix=no
6294 eval result=\$gl_cv_type_${gltype}_signed
6295 if test "$result" = yes; then
6296 glsufu=
6297 else
6298 glsufu=u
6299 fi
6300 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6301 case $glsuf in
6302 '') gltype1='int';;
6303 l) gltype1='long int';;
6304 ll) gltype1='long long int';;
6305 i64) gltype1='__int64';;
6306 u) gltype1='unsigned int';;
6307 ul) gltype1='unsigned long int';;
6308 ull) gltype1='unsigned long long int';;
6309 ui64)gltype1='unsigned __int64';;
6310 esac
6311 cat >conftest.$ac_ext <<_ACEOF
6312/* confdefs.h. */
6313_ACEOF
6314cat confdefs.h >>conftest.$ac_ext
6315cat >>conftest.$ac_ext <<_ACEOF
6316/* end confdefs.h. */
6317
6318 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6319 included before <wchar.h>. */
6320 #include <stddef.h>
6321 #include <signal.h>
6322 #if HAVE_WCHAR_H
6323 # include <stdio.h>
6324 # include <time.h>
6325 # include <wchar.h>
6326 #endif
6327
6328 extern $gltype foo;
6329 extern $gltype1 foo;
6330int
6331main ()
6332{
6333
6334 ;
6335 return 0;
6336}
6337_ACEOF
6338rm -f conftest.$ac_objext
6339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6340 (eval $ac_compile) 2>conftest.er1
6341 ac_status=$?
6342 grep -v '^ *+' conftest.er1 >conftest.err
6343 rm -f conftest.er1
6344 cat conftest.err >&5
6345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6346 (exit $ac_status); } &&
6347 { ac_try='test -z "$ac_c_werror_flag"
6348 || test ! -s conftest.err'
6349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6350 (eval $ac_try) 2>&5
6351 ac_status=$?
6352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6353 (exit $ac_status); }; } &&
6354 { ac_try='test -s conftest.$ac_objext'
6355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6356 (eval $ac_try) 2>&5
6357 ac_status=$?
6358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6359 (exit $ac_status); }; }; then
6360 eval gl_cv_type_${gltype}_suffix=\$glsuf
6361else
6362 echo "$as_me: failed program was:" >&5
6363sed 's/^/| /' conftest.$ac_ext >&5
6364
6365fi
6366rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6367 eval result=\$gl_cv_type_${gltype}_suffix
6368 test "$result" != no && break
6369 done
6370fi
6371echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&5
6372echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&6
6373 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6374 eval result=\$gl_cv_type_${gltype}_suffix
6375 test "$result" = no && result=
6376 eval ${GLTYPE}_SUFFIX=\$result
6377 cat >>confdefs.h <<_ACEOF
6378#define ${GLTYPE}_SUFFIX $result
6379_ACEOF
6380
6381 done
6382
6383
6384
6385 STDINT_H=stdint.h
6386 fi
6387
6388
6389
6390
6391
6392
6393
6394 echo "$as_me:$LINENO: checking whether <wchar.h> is standalone" >&5
6395echo $ECHO_N "checking whether <wchar.h> is standalone... $ECHO_C" >&6
6396if test "${gl_cv_header_wchar_h_standalone+set}" = set; then
6397 echo $ECHO_N "(cached) $ECHO_C" >&6
6398else
6399 cat >conftest.$ac_ext <<_ACEOF
6400#include <wchar.h>
6401wchar_t w;
6402_ACEOF
6403rm -f conftest.$ac_objext
6404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6405 (eval $ac_compile) 2>conftest.er1
6406 ac_status=$?
6407 grep -v '^ *+' conftest.er1 >conftest.err
6408 rm -f conftest.er1
6409 cat conftest.err >&5
6410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6411 (exit $ac_status); } &&
6412 { ac_try='test -z "$ac_c_werror_flag"
6413 || test ! -s conftest.err'
6414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6415 (eval $ac_try) 2>&5
6416 ac_status=$?
6417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6418 (exit $ac_status); }; } &&
6419 { ac_try='test -s conftest.$ac_objext'
6420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6421 (eval $ac_try) 2>&5
6422 ac_status=$?
6423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6424 (exit $ac_status); }; }; then
6425 gl_cv_header_wchar_h_standalone=yes
6426else
6427 echo "$as_me: failed program was:" >&5
6428sed 's/^/| /' conftest.$ac_ext >&5
6429
6430gl_cv_header_wchar_h_standalone=no
6431fi
6432rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6433fi
6434echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5
6435echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6
6436 if test $gl_cv_header_wchar_h_standalone != yes; then
6437 WCHAR_H=wchar.h
6438 fi
6439
6440
6441 :
6442
6443
6444
6445
6446
6447 if test $ac_cv_header_wchar_h = yes; then
6448 HAVE_WCHAR_H=1
6449 else
6450 HAVE_WCHAR_H=0
6451 fi
6452
6453
6454
6455
6456 :
6457
6458
6459
6460
6461
6462
6463
6464 if test $gl_cv_have_include_next = yes; then
6465 gl_cv_next_wchar_h='<'wchar.h'>'
6466 else
6467 echo "$as_me:$LINENO: checking absolute name of <wchar.h>" >&5
6468echo $ECHO_N "checking absolute name of <wchar.h>... $ECHO_C" >&6
6469if test "${gl_cv_next_wchar_h+set}" = set; then
6470 echo $ECHO_N "(cached) $ECHO_C" >&6
6471else
6472
6473 if test $ac_cv_header_wchar_h = yes; then
6474 cat >conftest.$ac_ext <<_ACEOF
6475/* confdefs.h. */
6476_ACEOF
6477cat confdefs.h >>conftest.$ac_ext
6478cat >>conftest.$ac_ext <<_ACEOF
6479/* end confdefs.h. */
6480#include <wchar.h>
6481
6482_ACEOF
6483 gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6484 sed -n '\#/wchar.h#{
6485 s#.*"\(.*/wchar.h\)".*#\1#
6486 s#^/[^/]#//&#
6487 p
6488 q
6489 }'`'"'
6490 else
6491 gl_cv_next_wchar_h='<'wchar.h'>'
6492 fi
6493
6494fi
6495echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5
6496echo "${ECHO_T}$gl_cv_next_wchar_h" >&6
6497 fi
6498 NEXT_WCHAR_H=$gl_cv_next_wchar_h
6499
c906108c 6500
c906108c 6501
c906108c 6502
c906108c 6503
c906108c 6504
c906108c 6505
c906108c 6506
783e057b
DJ
6507 gltests_libdeps=
6508 gltests_ltlibdeps=
20e95c23 6509
20e95c23 6510
20e95c23 6511
783e057b 6512 gl_source_base='tests'
c906108c 6513
bec39cab 6514
bec39cab 6515
783e057b
DJ
6516
6517 LIBGNU_LIBDEPS="$gl_libdeps"
6518
6519 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
6520
6521
e28b3332 6522
d5af19ba
DJ
6523# For Makefile dependencies.
6524GNULIB_STDINT_H=
6525if test x"$STDINT_H" != x; then
6526 GNULIB_STDINT_H=gnulib/$STDINT_H
6527fi
6528
6529
bec39cab
AC
6530PACKAGE=gdb
6531
6532cat >>confdefs.h <<_ACEOF
6533#define PACKAGE "$PACKAGE"
6534_ACEOF
6535
6536
6537
e28b3332
DJ
6538# GDB does not use automake, but gnulib does. This line lets us
6539# generate its Makefile.in.
6540am__api_version="1.9"
6541# Find a good install program. We prefer a C program (faster),
6542# so one script is as good as another. But avoid the broken or
6543# incompatible versions:
6544# SysV /etc/install, /usr/sbin/install
6545# SunOS /usr/etc/install
6546# IRIX /sbin/install
6547# AIX /bin/install
6548# AmigaOS /C/install, which installs bootblocks on floppy discs
6549# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6550# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6551# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6552# OS/2's system install, which has a completely different semantic
6553# ./install, which can be erroneously created by make from ./install.sh.
6554echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
6555echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
6556if test -z "$INSTALL"; then
6557if test "${ac_cv_path_install+set}" = set; then
6558 echo $ECHO_N "(cached) $ECHO_C" >&6
6559else
6560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6561for as_dir in $PATH
6562do
6563 IFS=$as_save_IFS
6564 test -z "$as_dir" && as_dir=.
6565 # Account for people who put trailing slashes in PATH elements.
6566case $as_dir/ in
6567 ./ | .// | /cC/* | \
6568 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6569 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
6570 /usr/ucb/* ) ;;
6571 *)
6572 # OSF1 and SCO ODT 3.0 have their own names for install.
6573 # Don't use installbsd from OSF since it installs stuff as root
6574 # by default.
6575 for ac_prog in ginstall scoinst install; do
6576 for ac_exec_ext in '' $ac_executable_extensions; do
6577 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6578 if test $ac_prog = install &&
6579 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6580 # AIX install. It has an incompatible calling convention.
6581 :
6582 elif test $ac_prog = install &&
6583 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6584 # program-specific install script used by HP pwplus--don't use.
6585 :
6586 else
6587 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6588 break 3
6589 fi
6590 fi
6591 done
6592 done
6593 ;;
6594esac
6595done
6596
6597
6598fi
6599 if test "${ac_cv_path_install+set}" = set; then
6600 INSTALL=$ac_cv_path_install
6601 else
6602 # As a last resort, use the slow shell script. We don't cache a
6603 # path for INSTALL within a source directory, because that will
6604 # break other packages using the cache if that directory is
6605 # removed, or if the path is relative.
6606 INSTALL=$ac_install_sh
6607 fi
6608fi
6609echo "$as_me:$LINENO: result: $INSTALL" >&5
6610echo "${ECHO_T}$INSTALL" >&6
6611
6612# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6613# It thinks the first close brace ends the variable substitution.
6614test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6615
6616test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6617
6618test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6619
6620echo "$as_me:$LINENO: checking whether build environment is sane" >&5
6621echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
6622# Just in case
6623sleep 1
6624echo timestamp > conftest.file
6625# Do `set' in a subshell so we don't clobber the current shell's
6626# arguments. Must try -L first in case configure is actually a
6627# symlink; some systems play weird games with the mod time of symlinks
6628# (eg FreeBSD returns the mod time of the symlink's containing
6629# directory).
6630if (
6631 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6632 if test "$*" = "X"; then
6633 # -L didn't work.
6634 set X `ls -t $srcdir/configure conftest.file`
6635 fi
6636 rm -f conftest.file
6637 if test "$*" != "X $srcdir/configure conftest.file" \
6638 && test "$*" != "X conftest.file $srcdir/configure"; then
6639
6640 # If neither matched, then we have a broken ls. This can happen
6641 # if, for instance, CONFIG_SHELL is bash and it inherits a
6642 # broken ls alias from the environment. This has actually
6643 # happened. Such a system could not be considered "sane".
6644 { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
6645alias in your environment" >&5
6646echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
6647alias in your environment" >&2;}
6648 { (exit 1); exit 1; }; }
6649 fi
6650
6651 test "$2" = conftest.file
6652 )
6653then
6654 # Ok.
6655 :
6656else
6657 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
6658Check your system clock" >&5
6659echo "$as_me: error: newly created file is older than distributed files!
6660Check your system clock" >&2;}
6661 { (exit 1); exit 1; }; }
6662fi
6663echo "$as_me:$LINENO: result: yes" >&5
6664echo "${ECHO_T}yes" >&6
6665test "$program_prefix" != NONE &&
6666 program_transform_name="s,^,$program_prefix,;$program_transform_name"
6667# Use a double $ so make ignores it.
6668test "$program_suffix" != NONE &&
6669 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
6670# Double any \ or $. echo might interpret backslashes.
6671# By default was `s,x,x', remove it if useless.
6672cat <<\_ACEOF >conftest.sed
6673s/[\\$]/&&/g;s/;s,x,x,$//
6674_ACEOF
6675program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
6676rm conftest.sed
6677
6678# expand $ac_aux_dir to an absolute path
6679am_aux_dir=`cd $ac_aux_dir && pwd`
6680
6681test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6682# Use eval to expand $SHELL
6683if eval "$MISSING --run true"; then
6684 am_missing_run="$MISSING --run "
6685else
6686 am_missing_run=
6687 { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
6688echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
6689fi
6690
6691if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6692 # We used to keeping the `.' as first argument, in order to
6693 # allow $(mkdir_p) to be used without argument. As in
6694 # $(mkdir_p) $(somedir)
6695 # where $(somedir) is conditionally defined. However this is wrong
6696 # for two reasons:
6697 # 1. if the package is installed by a user who cannot write `.'
6698 # make install will fail,
6699 # 2. the above comment should most certainly read
6700 # $(mkdir_p) $(DESTDIR)$(somedir)
6701 # so it does not work when $(somedir) is undefined and
6702 # $(DESTDIR) is not.
6703 # To support the latter case, we have to write
6704 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6705 # so the `.' trick is pointless.
6706 mkdir_p='mkdir -p --'
6707else
6708 # On NextStep and OpenStep, the `mkdir' command does not
6709 # recognize any option. It will interpret all options as
6710 # directories to create, and then abort because `.' already
6711 # exists.
6712 for d in ./-p ./--version;
6713 do
6714 test -d $d && rmdir $d
6715 done
6716 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6717 if test -f "$ac_aux_dir/mkinstalldirs"; then
6718 mkdir_p='$(mkinstalldirs)'
6719 else
6720 mkdir_p='$(install_sh) -d'
6721 fi
6722fi
6723
6724for ac_prog in gawk mawk nawk awk
6725do
6726 # Extract the first word of "$ac_prog", so it can be a program name with args.
6727set dummy $ac_prog; ac_word=$2
6728echo "$as_me:$LINENO: checking for $ac_word" >&5
6729echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6730if test "${ac_cv_prog_AWK+set}" = set; then
6731 echo $ECHO_N "(cached) $ECHO_C" >&6
6732else
6733 if test -n "$AWK"; then
6734 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6735else
6736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6737for as_dir in $PATH
6738do
6739 IFS=$as_save_IFS
6740 test -z "$as_dir" && as_dir=.
6741 for ac_exec_ext in '' $ac_executable_extensions; do
6742 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6743 ac_cv_prog_AWK="$ac_prog"
6744 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6745 break 2
6746 fi
6747done
6748done
6749
6750fi
6751fi
6752AWK=$ac_cv_prog_AWK
6753if test -n "$AWK"; then
6754 echo "$as_me:$LINENO: result: $AWK" >&5
6755echo "${ECHO_T}$AWK" >&6
6756else
6757 echo "$as_me:$LINENO: result: no" >&5
6758echo "${ECHO_T}no" >&6
6759fi
6760
6761 test -n "$AWK" && break
6762done
6763
e28b3332
DJ
6764 ac_config_commands="$ac_config_commands depfiles"
6765
6766
6767am_make=${MAKE-make}
6768cat > confinc << 'END'
6769am__doit:
6770 @echo done
6771.PHONY: am__doit
6772END
6773# If we don't find an include directive, just comment out the code.
6774echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
6775echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
6776am__include="#"
6777am__quote=
6778_am_result=none
6779# First try GNU make style include.
6780echo "include confinc" > confmf
6781# We grep out `Entering directory' and `Leaving directory'
6782# messages which can occur if `w' ends up in MAKEFLAGS.
6783# In particular we don't look at `^make:' because GNU make might
6784# be invoked under some other name (usually "gmake"), in which
6785# case it prints its new name instead of `make'.
6786if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6787 am__include=include
6788 am__quote=
6789 _am_result=GNU
6790fi
6791# Now try BSD make style include.
6792if test "$am__include" = "#"; then
6793 echo '.include "confinc"' > confmf
6794 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6795 am__include=.include
6796 am__quote="\""
6797 _am_result=BSD
6798 fi
6799fi
6800
6801
6802echo "$as_me:$LINENO: result: $_am_result" >&5
6803echo "${ECHO_T}$_am_result" >&6
6804rm -f confinc confmf
6805
6806# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
6807if test "${enable_dependency_tracking+set}" = set; then
6808 enableval="$enable_dependency_tracking"
6809
6810fi;
6811if test "x$enable_dependency_tracking" != xno; then
6812 am_depcomp="$ac_aux_dir/depcomp"
6813 AMDEPBACKSLASH='\'
6814fi
6815
6816
6817if test "x$enable_dependency_tracking" != xno; then
6818 AMDEP_TRUE=
6819 AMDEP_FALSE='#'
6820else
6821 AMDEP_TRUE='#'
6822 AMDEP_FALSE=
6823fi
6824
6825
6826
6827# test to see if srcdir already configured
6828if test "`cd $srcdir && pwd`" != "`pwd`" &&
6829 test -f $srcdir/config.status; then
6830 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
6831echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
6832 { (exit 1); exit 1; }; }
6833fi
6834
6835# test whether we have cygpath
6836if test -z "$CYGPATH_W"; then
6837 if (cygpath --version) >/dev/null 2>/dev/null; then
6838 CYGPATH_W='cygpath -w'
6839 else
6840 CYGPATH_W=echo
6841 fi
6842fi
6843
6844
6845# Define the identity of the package.
6846 PACKAGE=gdb
6847 VERSION=UNUSED-VERSION
6848
6849
6850# Some tools Automake needs.
6851
6852ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6853
6854
6855AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6856
6857
6858AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6859
6860
6861AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6862
6863
6864MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6865
6866install_sh=${install_sh-"$am_aux_dir/install-sh"}
6867
6868# Installed binaries are usually stripped using `strip' when the user
6869# run `make install-strip'. However `strip' might not be the right
6870# tool to use in cross-compilation environments, therefore Automake
6871# will honor the `STRIP' environment variable to overrule this program.
6872if test "$cross_compiling" != no; then
6873 if test -n "$ac_tool_prefix"; then
6874 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6875set dummy ${ac_tool_prefix}strip; ac_word=$2
6876echo "$as_me:$LINENO: checking for $ac_word" >&5
6877echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6878if test "${ac_cv_prog_STRIP+set}" = set; then
6879 echo $ECHO_N "(cached) $ECHO_C" >&6
6880else
6881 if test -n "$STRIP"; then
6882 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6883else
6884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6885for as_dir in $PATH
6886do
6887 IFS=$as_save_IFS
6888 test -z "$as_dir" && as_dir=.
6889 for ac_exec_ext in '' $ac_executable_extensions; do
6890 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6891 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6892 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6893 break 2
6894 fi
6895done
6896done
6897
6898fi
6899fi
6900STRIP=$ac_cv_prog_STRIP
6901if test -n "$STRIP"; then
6902 echo "$as_me:$LINENO: result: $STRIP" >&5
6903echo "${ECHO_T}$STRIP" >&6
6904else
6905 echo "$as_me:$LINENO: result: no" >&5
6906echo "${ECHO_T}no" >&6
6907fi
6908
6909fi
6910if test -z "$ac_cv_prog_STRIP"; then
6911 ac_ct_STRIP=$STRIP
6912 # Extract the first word of "strip", so it can be a program name with args.
6913set dummy strip; ac_word=$2
6914echo "$as_me:$LINENO: checking for $ac_word" >&5
6915echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6916if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6917 echo $ECHO_N "(cached) $ECHO_C" >&6
6918else
6919 if test -n "$ac_ct_STRIP"; then
6920 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6921else
6922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6923for as_dir in $PATH
6924do
6925 IFS=$as_save_IFS
6926 test -z "$as_dir" && as_dir=.
6927 for ac_exec_ext in '' $ac_executable_extensions; do
6928 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6929 ac_cv_prog_ac_ct_STRIP="strip"
6930 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6931 break 2
6932 fi
6933done
6934done
6935
6936 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
6937fi
6938fi
6939ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6940if test -n "$ac_ct_STRIP"; then
6941 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6942echo "${ECHO_T}$ac_ct_STRIP" >&6
6943else
6944 echo "$as_me:$LINENO: result: no" >&5
6945echo "${ECHO_T}no" >&6
6946fi
6947
6948 STRIP=$ac_ct_STRIP
6949else
6950 STRIP="$ac_cv_prog_STRIP"
6951fi
6952
6953fi
6954INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
6955
6956# We need awk for the "check" target. The system "awk" is bad on
6957# some platforms.
6958# Always define AMTAR for backward compatibility.
6959
6960AMTAR=${AMTAR-"${am_missing_run}tar"}
6961
6962am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
6963
6964
6965
6966
6967depcc="$CC" am_compiler_list=
6968
6969echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
6970echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
6971if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
6972 echo $ECHO_N "(cached) $ECHO_C" >&6
6973else
6974 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6975 # We make a subdir and do the tests there. Otherwise we can end up
6976 # making bogus files that we don't know about and never remove. For
6977 # instance it was reported that on HP-UX the gcc test will end up
6978 # making a dummy file named `D' -- because `-MD' means `put the output
6979 # in D'.
6980 mkdir conftest.dir
6981 # Copy depcomp to subdir because otherwise we won't find it if we're
6982 # using a relative directory.
6983 cp "$am_depcomp" conftest.dir
6984 cd conftest.dir
6985 # We will build objects and dependencies in a subdirectory because
6986 # it helps to detect inapplicable dependency modes. For instance
6987 # both Tru64's cc and ICC support -MD to output dependencies as a
6988 # side effect of compilation, but ICC will put the dependencies in
6989 # the current directory while Tru64 will put them in the object
6990 # directory.
6991 mkdir sub
6992
6993 am_cv_CC_dependencies_compiler_type=none
6994 if test "$am_compiler_list" = ""; then
6995 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6996 fi
6997 for depmode in $am_compiler_list; do
6998 # Setup a source with many dependencies, because some compilers
6999 # like to wrap large dependency lists on column 80 (with \), and
7000 # we should not choose a depcomp mode which is confused by this.
7001 #
7002 # We need to recreate these files for each test, as the compiler may
7003 # overwrite some of them when testing with obscure command lines.
7004 # This happens at least with the AIX C compiler.
7005 : > sub/conftest.c
7006 for i in 1 2 3 4 5 6; do
7007 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7008 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7009 # Solaris 8's {/usr,}/bin/sh.
7010 touch sub/conftst$i.h
7011 done
7012 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7013
7014 case $depmode in
7015 nosideeffect)
7016 # after this tag, mechanisms are not by side-effect, so they'll
7017 # only be used when explicitly requested
7018 if test "x$enable_dependency_tracking" = xyes; then
7019 continue
7020 else
7021 break
7022 fi
7023 ;;
7024 none) break ;;
7025 esac
7026 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7027 # mode. It turns out that the SunPro C++ compiler does not properly
7028 # handle `-M -o', and we need to detect this.
7029 if depmode=$depmode \
7030 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7031 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7032 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7033 >/dev/null 2>conftest.err &&
7034 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7035 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7036 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7037 # icc doesn't choke on unknown options, it will just issue warnings
7038 # or remarks (even with -Werror). So we grep stderr for any message
7039 # that says an option was ignored or not supported.
7040 # When given -MP, icc 7.0 and 7.1 complain thusly:
7041 # icc: Command line warning: ignoring option '-M'; no argument required
7042 # The diagnosis changed in icc 8.0:
7043 # icc: Command line remark: option '-MP' not supported
7044 if (grep 'ignoring option' conftest.err ||
7045 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7046 am_cv_CC_dependencies_compiler_type=$depmode
7047 break
7048 fi
7049 fi
7050 done
7051
7052 cd ..
7053 rm -rf conftest.dir
7054else
7055 am_cv_CC_dependencies_compiler_type=none
7056fi
7057
7058fi
7059echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
7060echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
7061CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7062
7063
7064
7065if
7066 test "x$enable_dependency_tracking" != xno \
7067 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7068 am__fastdepCC_TRUE=
7069 am__fastdepCC_FALSE='#'
7070else
7071 am__fastdepCC_TRUE='#'
7072 am__fastdepCC_FALSE=
7073fi
7074
7075
7076
7077
bec39cab
AC
7078debugdir=${libdir}/debug
7079
7080
b4e70030 7081# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
bec39cab 7082if test "${with_separate_debug_dir+set}" = set; then
783e057b
DJ
7083 withval="$with_separate_debug_dir"
7084 debugdir="${withval}"
7085fi;
20e95c23 7086
20e95c23 7087
783e057b
DJ
7088 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7089 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7090 ac_define_dir=`eval echo $debugdir`
7091 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7092
783e057b
DJ
7093cat >>confdefs.h <<_ACEOF
7094#define DEBUGDIR "$ac_define_dir"
20e95c23 7095_ACEOF
20e95c23 7096
20e95c23 7097
783e057b 7098#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
20e95c23 7099
783e057b
DJ
7100if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7101 if test "x$prefix" = xNONE; then
7102 test_prefix=/usr/local
7103 else
7104 test_prefix=$prefix
7105 fi
20e95c23 7106else
783e057b 7107 test_prefix=$exec_prefix
20e95c23 7108fi
783e057b
DJ
7109case ${debugdir} in
7110"${test_prefix}"|"${test_prefix}/"*|\
7111'${exec_prefix}'|'${exec_prefix}/'*)
20e95c23
DJ
7112
7113cat >>confdefs.h <<\_ACEOF
783e057b 7114#define DEBUGDIR_RELOCATABLE 1
20e95c23
DJ
7115_ACEOF
7116
783e057b
DJ
7117 ;;
7118esac
7119
20e95c23 7120
20e95c23 7121
783e057b 7122subdirs="$subdirs doc testsuite"
20e95c23
DJ
7123
7124
783e057b
DJ
7125# Check whether to support alternative target configurations
7126# Check whether --enable-targets or --disable-targets was given.
7127if test "${enable_targets+set}" = set; then
7128 enableval="$enable_targets"
7129 case "${enableval}" in
7130 yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
7131echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
7132 { (exit 1); exit 1; }; }
7133 ;;
7134 no) enable_targets= ;;
7135 *) enable_targets=$enableval ;;
7136esac
7137fi;
20e95c23 7138
783e057b
DJ
7139# Check whether to enable 64-bit support on 32-bit hosts
7140# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
7141if test "${enable_64_bit_bfd+set}" = set; then
7142 enableval="$enable_64_bit_bfd"
7143 case "${enableval}" in
7144 yes) want64=true ;;
7145 no) want64=false ;;
7146 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
7147echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
7148 { (exit 1); exit 1; }; } ;;
7149esac
7150else
7151 want64=false
7152fi;
7153# Provide defaults for some variables set by the per-host and per-target
7154# configuration.
7155gdb_host_obs=posix-hdep.o
20e95c23 7156
783e057b
DJ
7157if test "${target}" = "${host}"; then
7158 gdb_native=yes
7159else
7160 gdb_native=no
7161fi
20e95c23 7162
783e057b 7163. $srcdir/configure.host
20e95c23 7164
783e057b 7165# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 7166
783e057b
DJ
7167TARGET_OBS=
7168all_targets=
20e95c23 7169
783e057b 7170for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 7171do
783e057b
DJ
7172 if test "$targ_alias" = "all"; then
7173 all_targets=true
7174 else
7175 # Canonicalize the secondary target names.
7176 result=`$ac_config_sub $targ_alias 2>/dev/null`
7177 if test -n "$result"; then
7178 targ=$result
7179 else
7180 targ=$targ_alias
7181 fi
20e95c23 7182
783e057b 7183 . ${srcdir}/configure.tgt
20e95c23 7184
783e057b
DJ
7185 # Target-specific object files
7186 for i in ${gdb_target_obs}; do
7187 case " $TARGET_OBS " in
7188 *" ${i} "*) ;;
7189 *)
7190 TARGET_OBS="$TARGET_OBS ${i}"
7191 ;;
7192 esac
7193 done
20e95c23 7194
783e057b
DJ
7195 # Check whether this target needs 64-bit CORE_ADDR
7196 if test x${want64} = xfalse; then
7197 . ${srcdir}/../bfd/config.bfd
7198 fi
7199 fi
20e95c23
DJ
7200done
7201
783e057b
DJ
7202if test x${all_targets} = xtrue; then
7203
7204 # We want all 64-bit targets if we either:
7205 # - run on a 64-bit host or
7206 # - already require 64-bit support for some other target or
7207 # - the --enable-64-bit-bfd option was supplied
7208 # Otherwise we only support all 32-bit targets.
7209 #
7210 # NOTE: This test must be in sync with the corresponding
7211 # tests in BFD!
20e95c23 7212
783e057b
DJ
7213 if test x${want64} = xfalse; then
7214 echo "$as_me:$LINENO: checking for long" >&5
c0993dbe
UW
7215echo $ECHO_N "checking for long... $ECHO_C" >&6
7216if test "${ac_cv_type_long+set}" = set; then
7217 echo $ECHO_N "(cached) $ECHO_C" >&6
7218else
7219 cat >conftest.$ac_ext <<_ACEOF
7220/* confdefs.h. */
7221_ACEOF
7222cat confdefs.h >>conftest.$ac_ext
7223cat >>conftest.$ac_ext <<_ACEOF
7224/* end confdefs.h. */
7225$ac_includes_default
7226int
7227main ()
7228{
7229if ((long *) 0)
7230 return 0;
7231if (sizeof (long))
7232 return 0;
7233 ;
7234 return 0;
7235}
7236_ACEOF
7237rm -f conftest.$ac_objext
7238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7239 (eval $ac_compile) 2>conftest.er1
7240 ac_status=$?
7241 grep -v '^ *+' conftest.er1 >conftest.err
7242 rm -f conftest.er1
7243 cat conftest.err >&5
7244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7245 (exit $ac_status); } &&
7246 { ac_try='test -z "$ac_c_werror_flag"
7247 || test ! -s conftest.err'
7248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7249 (eval $ac_try) 2>&5
7250 ac_status=$?
7251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7252 (exit $ac_status); }; } &&
7253 { ac_try='test -s conftest.$ac_objext'
7254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7255 (eval $ac_try) 2>&5
7256 ac_status=$?
7257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7258 (exit $ac_status); }; }; then
7259 ac_cv_type_long=yes
7260else
7261 echo "$as_me: failed program was:" >&5
7262sed 's/^/| /' conftest.$ac_ext >&5
7263
7264ac_cv_type_long=no
7265fi
7266rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7267fi
7268echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7269echo "${ECHO_T}$ac_cv_type_long" >&6
7270
7271echo "$as_me:$LINENO: checking size of long" >&5
7272echo $ECHO_N "checking size of long... $ECHO_C" >&6
7273if test "${ac_cv_sizeof_long+set}" = set; then
7274 echo $ECHO_N "(cached) $ECHO_C" >&6
7275else
7276 if test "$ac_cv_type_long" = yes; then
7277 # The cast to unsigned long works around a bug in the HP C Compiler
7278 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7279 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7280 # This bug is HP SR number 8606223364.
7281 if test "$cross_compiling" = yes; then
7282 # Depending upon the size, compute the lo and hi bounds.
7283cat >conftest.$ac_ext <<_ACEOF
7284/* confdefs.h. */
7285_ACEOF
7286cat confdefs.h >>conftest.$ac_ext
7287cat >>conftest.$ac_ext <<_ACEOF
7288/* end confdefs.h. */
7289$ac_includes_default
7290int
7291main ()
7292{
7293static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
7294test_array [0] = 0
7295
7296 ;
7297 return 0;
7298}
7299_ACEOF
7300rm -f conftest.$ac_objext
7301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7302 (eval $ac_compile) 2>conftest.er1
7303 ac_status=$?
7304 grep -v '^ *+' conftest.er1 >conftest.err
7305 rm -f conftest.er1
7306 cat conftest.err >&5
7307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7308 (exit $ac_status); } &&
7309 { ac_try='test -z "$ac_c_werror_flag"
7310 || test ! -s conftest.err'
7311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7312 (eval $ac_try) 2>&5
7313 ac_status=$?
7314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7315 (exit $ac_status); }; } &&
7316 { ac_try='test -s conftest.$ac_objext'
7317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7318 (eval $ac_try) 2>&5
7319 ac_status=$?
7320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7321 (exit $ac_status); }; }; then
7322 ac_lo=0 ac_mid=0
7323 while :; do
7324 cat >conftest.$ac_ext <<_ACEOF
7325/* confdefs.h. */
7326_ACEOF
7327cat confdefs.h >>conftest.$ac_ext
7328cat >>conftest.$ac_ext <<_ACEOF
7329/* end confdefs.h. */
7330$ac_includes_default
7331int
7332main ()
7333{
7334static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7335test_array [0] = 0
7336
7337 ;
7338 return 0;
7339}
7340_ACEOF
7341rm -f conftest.$ac_objext
7342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7343 (eval $ac_compile) 2>conftest.er1
7344 ac_status=$?
7345 grep -v '^ *+' conftest.er1 >conftest.err
7346 rm -f conftest.er1
7347 cat conftest.err >&5
7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7349 (exit $ac_status); } &&
7350 { ac_try='test -z "$ac_c_werror_flag"
7351 || test ! -s conftest.err'
7352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7353 (eval $ac_try) 2>&5
7354 ac_status=$?
7355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7356 (exit $ac_status); }; } &&
7357 { ac_try='test -s conftest.$ac_objext'
7358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7359 (eval $ac_try) 2>&5
7360 ac_status=$?
7361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7362 (exit $ac_status); }; }; then
7363 ac_hi=$ac_mid; break
7364else
7365 echo "$as_me: failed program was:" >&5
7366sed 's/^/| /' conftest.$ac_ext >&5
7367
7368ac_lo=`expr $ac_mid + 1`
7369 if test $ac_lo -le $ac_mid; then
7370 ac_lo= ac_hi=
7371 break
7372 fi
7373 ac_mid=`expr 2 '*' $ac_mid + 1`
7374fi
7375rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7376 done
7377else
7378 echo "$as_me: failed program was:" >&5
7379sed 's/^/| /' conftest.$ac_ext >&5
7380
7381cat >conftest.$ac_ext <<_ACEOF
7382/* confdefs.h. */
7383_ACEOF
7384cat confdefs.h >>conftest.$ac_ext
7385cat >>conftest.$ac_ext <<_ACEOF
7386/* end confdefs.h. */
7387$ac_includes_default
7388int
7389main ()
7390{
7391static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
7392test_array [0] = 0
7393
7394 ;
7395 return 0;
7396}
7397_ACEOF
7398rm -f conftest.$ac_objext
7399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7400 (eval $ac_compile) 2>conftest.er1
7401 ac_status=$?
7402 grep -v '^ *+' conftest.er1 >conftest.err
7403 rm -f conftest.er1
7404 cat conftest.err >&5
7405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7406 (exit $ac_status); } &&
7407 { ac_try='test -z "$ac_c_werror_flag"
7408 || test ! -s conftest.err'
7409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7410 (eval $ac_try) 2>&5
7411 ac_status=$?
7412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7413 (exit $ac_status); }; } &&
7414 { ac_try='test -s conftest.$ac_objext'
7415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7416 (eval $ac_try) 2>&5
7417 ac_status=$?
7418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7419 (exit $ac_status); }; }; then
7420 ac_hi=-1 ac_mid=-1
7421 while :; do
7422 cat >conftest.$ac_ext <<_ACEOF
7423/* confdefs.h. */
7424_ACEOF
7425cat confdefs.h >>conftest.$ac_ext
7426cat >>conftest.$ac_ext <<_ACEOF
7427/* end confdefs.h. */
7428$ac_includes_default
7429int
7430main ()
7431{
7432static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
7433test_array [0] = 0
7434
7435 ;
7436 return 0;
7437}
7438_ACEOF
7439rm -f conftest.$ac_objext
7440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7441 (eval $ac_compile) 2>conftest.er1
7442 ac_status=$?
7443 grep -v '^ *+' conftest.er1 >conftest.err
7444 rm -f conftest.er1
7445 cat conftest.err >&5
7446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7447 (exit $ac_status); } &&
7448 { ac_try='test -z "$ac_c_werror_flag"
7449 || test ! -s conftest.err'
7450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7451 (eval $ac_try) 2>&5
7452 ac_status=$?
7453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7454 (exit $ac_status); }; } &&
7455 { ac_try='test -s conftest.$ac_objext'
7456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7457 (eval $ac_try) 2>&5
7458 ac_status=$?
7459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7460 (exit $ac_status); }; }; then
7461 ac_lo=$ac_mid; break
7462else
7463 echo "$as_me: failed program was:" >&5
7464sed 's/^/| /' conftest.$ac_ext >&5
7465
7466ac_hi=`expr '(' $ac_mid ')' - 1`
7467 if test $ac_mid -le $ac_hi; then
7468 ac_lo= ac_hi=
7469 break
7470 fi
7471 ac_mid=`expr 2 '*' $ac_mid`
7472fi
7473rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7474 done
7475else
7476 echo "$as_me: failed program was:" >&5
7477sed 's/^/| /' conftest.$ac_ext >&5
7478
7479ac_lo= ac_hi=
7480fi
7481rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7482fi
7483rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7484# Binary search between lo and hi bounds.
7485while test "x$ac_lo" != "x$ac_hi"; do
7486 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7487 cat >conftest.$ac_ext <<_ACEOF
7488/* confdefs.h. */
7489_ACEOF
7490cat confdefs.h >>conftest.$ac_ext
7491cat >>conftest.$ac_ext <<_ACEOF
7492/* end confdefs.h. */
7493$ac_includes_default
7494int
7495main ()
7496{
7497static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7498test_array [0] = 0
7499
7500 ;
7501 return 0;
7502}
7503_ACEOF
7504rm -f conftest.$ac_objext
7505if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7506 (eval $ac_compile) 2>conftest.er1
7507 ac_status=$?
7508 grep -v '^ *+' conftest.er1 >conftest.err
7509 rm -f conftest.er1
7510 cat conftest.err >&5
7511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7512 (exit $ac_status); } &&
7513 { ac_try='test -z "$ac_c_werror_flag"
7514 || test ! -s conftest.err'
7515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7516 (eval $ac_try) 2>&5
7517 ac_status=$?
7518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7519 (exit $ac_status); }; } &&
7520 { ac_try='test -s conftest.$ac_objext'
7521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7522 (eval $ac_try) 2>&5
7523 ac_status=$?
7524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7525 (exit $ac_status); }; }; then
7526 ac_hi=$ac_mid
7527else
7528 echo "$as_me: failed program was:" >&5
7529sed 's/^/| /' conftest.$ac_ext >&5
7530
7531ac_lo=`expr '(' $ac_mid ')' + 1`
7532fi
7533rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7534done
7535case $ac_lo in
7536?*) ac_cv_sizeof_long=$ac_lo;;
d5af19ba
DJ
7537'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7538echo "$as_me: error: in \`$ac_pwd':" >&2;}
7539{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
c0993dbe
UW
7540See \`config.log' for more details." >&5
7541echo "$as_me: error: cannot compute sizeof (long), 77
7542See \`config.log' for more details." >&2;}
d5af19ba 7543 { (exit 1); exit 1; }; }; } ;;
c0993dbe
UW
7544esac
7545else
7546 if test "$cross_compiling" = yes; then
d5af19ba
DJ
7547 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7548echo "$as_me: error: in \`$ac_pwd':" >&2;}
7549{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
c0993dbe
UW
7550See \`config.log' for more details." >&5
7551echo "$as_me: error: cannot run test program while cross compiling
7552See \`config.log' for more details." >&2;}
d5af19ba 7553 { (exit 1); exit 1; }; }; }
c0993dbe
UW
7554else
7555 cat >conftest.$ac_ext <<_ACEOF
7556/* confdefs.h. */
7557_ACEOF
7558cat confdefs.h >>conftest.$ac_ext
7559cat >>conftest.$ac_ext <<_ACEOF
7560/* end confdefs.h. */
7561$ac_includes_default
7562long longval () { return (long) (sizeof (long)); }
7563unsigned long ulongval () { return (long) (sizeof (long)); }
7564#include <stdio.h>
7565#include <stdlib.h>
7566int
7567main ()
7568{
7569
7570 FILE *f = fopen ("conftest.val", "w");
7571 if (! f)
7572 exit (1);
7573 if (((long) (sizeof (long))) < 0)
7574 {
7575 long i = longval ();
7576 if (i != ((long) (sizeof (long))))
7577 exit (1);
7578 fprintf (f, "%ld\n", i);
7579 }
7580 else
7581 {
7582 unsigned long i = ulongval ();
7583 if (i != ((long) (sizeof (long))))
7584 exit (1);
7585 fprintf (f, "%lu\n", i);
7586 }
7587 exit (ferror (f) || fclose (f) != 0);
7588
7589 ;
7590 return 0;
7591}
7592_ACEOF
7593rm -f conftest$ac_exeext
7594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7595 (eval $ac_link) 2>&5
7596 ac_status=$?
7597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7598 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7600 (eval $ac_try) 2>&5
7601 ac_status=$?
7602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7603 (exit $ac_status); }; }; then
7604 ac_cv_sizeof_long=`cat conftest.val`
7605else
7606 echo "$as_me: program exited with status $ac_status" >&5
7607echo "$as_me: failed program was:" >&5
7608sed 's/^/| /' conftest.$ac_ext >&5
7609
7610( exit $ac_status )
d5af19ba
DJ
7611{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7612echo "$as_me: error: in \`$ac_pwd':" >&2;}
c0993dbe
UW
7613{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7614See \`config.log' for more details." >&5
7615echo "$as_me: error: cannot compute sizeof (long), 77
7616See \`config.log' for more details." >&2;}
d5af19ba 7617 { (exit 1); exit 1; }; }; }
c0993dbe
UW
7618fi
7619rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7620fi
7621fi
7622rm -f conftest.val
7623else
7624 ac_cv_sizeof_long=0
7625fi
7626fi
7627echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7628echo "${ECHO_T}$ac_cv_sizeof_long" >&6
7629cat >>confdefs.h <<_ACEOF
7630#define SIZEOF_LONG $ac_cv_sizeof_long
7631_ACEOF
7632
7633
7634 if test "x${ac_cv_sizeof_long}" = "x8"; then
7635 want64=true
7636 fi
7637 fi
7638 if test x${want64} = xtrue; then
7639 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
7640 else
7641 TARGET_OBS='$(ALL_TARGET_OBS)'
7642 fi
7643fi
7644
7645
7646
7647# For other settings, only the main target counts.
7648gdb_sim=
7649gdb_osabi=
7650build_gdbserver=
7651targ=$target; . ${srcdir}/configure.tgt
7652
7653# Fetch the default architecture and default target vector from BFD.
7654targ=$target; . $srcdir/../bfd/config.bfd
7655
7656# We only want the first architecture, so strip off the others if
7657# there is more than one.
7658targ_archs=`echo $targ_archs | sed 's/ .*//'`
7659
7660if test "x$targ_archs" != x; then
7661
7662cat >>confdefs.h <<_ACEOF
7663#define DEFAULT_BFD_ARCH $targ_archs
7664_ACEOF
7665
7666fi
7667if test "x$targ_defvec" != x; then
7668
7669cat >>confdefs.h <<_ACEOF
7670#define DEFAULT_BFD_VEC $targ_defvec
7671_ACEOF
7672
7673fi
7674
c0993dbe
UW
7675# The CLI cannot be disabled yet, but may be in the future.
7676
7677# Enable CLI.
7678# Check whether --enable-gdbcli or --disable-gdbcli was given.
7679if test "${enable_gdbcli+set}" = set; then
7680 enableval="$enable_gdbcli"
7681 case $enableval in
7682 yes)
7683 ;;
7684 no)
7685 { { echo "$as_me:$LINENO: error: the command-line interface cannot be disabled yet" >&5
7686echo "$as_me: error: the command-line interface cannot be disabled yet" >&2;}
7687 { (exit 1); exit 1; }; } ;;
7688 *)
7689 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbcli" >&5
7690echo "$as_me: error: bad value $enableval for --enable-gdbcli" >&2;}
7691 { (exit 1); exit 1; }; } ;;
7692 esac
7693else
7694 enable_gdbcli=yes
7695fi;
7696if test x"$enable_gdbcli" = xyes; then
7697 if test -d $srcdir/cli; then
7698 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
7699 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
7700 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
7701 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
7702 fi
7703fi
7704
7705# Enable MI.
7706# Check whether --enable-gdbmi or --disable-gdbmi was given.
7707if test "${enable_gdbmi+set}" = set; then
7708 enableval="$enable_gdbmi"
7709 case $enableval in
7710 yes | no)
7711 ;;
7712 *)
7713 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbmi" >&5
7714echo "$as_me: error: bad value $enableval for --enable-gdbmi" >&2;}
7715 { (exit 1); exit 1; }; } ;;
7716 esac
7717else
7718 enable_gdbmi=yes
7719fi;
7720if test x"$enable_gdbmi" = xyes; then
7721 if test -d $srcdir/mi; then
7722 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
7723 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
7724 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
7725 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
7726 fi
7727fi
7728
7729# Enable TUI.
7730# Check whether --enable-tui or --disable-tui was given.
7731if test "${enable_tui+set}" = set; then
7732 enableval="$enable_tui"
7733 case $enableval in
3ca64bd3 7734 yes | no | auto)
c0993dbe
UW
7735 ;;
7736 *)
7737 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tui" >&5
7738echo "$as_me: error: bad value $enableval for --enable-tui" >&2;}
7739 { (exit 1); exit 1; }; } ;;
7740 esac
7741else
3ca64bd3 7742 enable_tui=auto
c0993dbe
UW
7743fi;
7744
7745# Enable gdbtk.
7746# Check whether --enable-gdbtk or --disable-gdbtk was given.
7747if test "${enable_gdbtk+set}" = set; then
7748 enableval="$enable_gdbtk"
7749 case $enableval in
7750 yes | no)
7751 ;;
7752 *)
7753 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbtk" >&5
7754echo "$as_me: error: bad value $enableval for --enable-gdbtk" >&2;}
7755 { (exit 1); exit 1; }; } ;;
7756 esac
7757else
5062cc19 7758 if test -d $srcdir/gdbtk; then
c0993dbe
UW
7759 enable_gdbtk=yes
7760 else
7761 enable_gdbtk=no
7762 fi
7763fi;
7764# We unconditionally disable gdbtk tests on selected platforms.
7765case $host_os in
7766 go32* | windows*)
7767 { echo "$as_me:$LINENO: WARNING: gdbtk isn't supported on $host; disabling" >&5
7768echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
7769 enable_gdbtk=no ;;
7770esac
7771
7772# Libunwind support.
bec39cab 7773
b4e70030 7774# Check whether --with-libunwind or --without-libunwind was given.
bec39cab 7775if test "${with_libunwind+set}" = set; then
b4e70030
JB
7776 withval="$with_libunwind"
7777 case "${withval}" in
bec39cab
AC
7778 yes) enable_libunwind=yes ;;
7779 no) enable_libunwind=no ;;
7780 *) { { echo "$as_me:$LINENO: error: bad value ${withval} for GDB with-libunwind option" >&5
7781echo "$as_me: error: bad value ${withval} for GDB with-libunwind option" >&2;}
7782 { (exit 1); exit 1; }; } ;;
7783esac
7784else
7785
7786
a9322a30
TT
7787
7788for ac_header in libunwind.h libunwind-ia64.h
bec39cab
AC
7789do
7790as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7791if eval "test \"\${$as_ac_Header+set}\" = set"; then
7792 echo "$as_me:$LINENO: checking for $ac_header" >&5
7793echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7794if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7795 echo $ECHO_N "(cached) $ECHO_C" >&6
7796fi
b4e70030
JB
7797echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7798echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7799else
7800 # Is the header compilable?
b4e70030
JB
7801echo "$as_me:$LINENO: checking $ac_header usability" >&5
7802echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7803cat >conftest.$ac_ext <<_ACEOF
7804/* confdefs.h. */
7805_ACEOF
7806cat confdefs.h >>conftest.$ac_ext
7807cat >>conftest.$ac_ext <<_ACEOF
7808/* end confdefs.h. */
7809$ac_includes_default
7810#include <$ac_header>
7811_ACEOF
7812rm -f conftest.$ac_objext
7813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7814 (eval $ac_compile) 2>conftest.er1
7815 ac_status=$?
7816 grep -v '^ *+' conftest.er1 >conftest.err
7817 rm -f conftest.er1
7818 cat conftest.err >&5
7819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7820 (exit $ac_status); } &&
b4e70030
JB
7821 { ac_try='test -z "$ac_c_werror_flag"
7822 || test ! -s conftest.err'
bec39cab
AC
7823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7824 (eval $ac_try) 2>&5
7825 ac_status=$?
7826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7827 (exit $ac_status); }; } &&
7828 { ac_try='test -s conftest.$ac_objext'
7829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7830 (eval $ac_try) 2>&5
7831 ac_status=$?
7832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7833 (exit $ac_status); }; }; then
7834 ac_header_compiler=yes
7835else
7836 echo "$as_me: failed program was:" >&5
7837sed 's/^/| /' conftest.$ac_ext >&5
7838
b4e70030 7839ac_header_compiler=no
bec39cab
AC
7840fi
7841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
7842echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7843echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
7844
7845# Is the header present?
b4e70030
JB
7846echo "$as_me:$LINENO: checking $ac_header presence" >&5
7847echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
7848cat >conftest.$ac_ext <<_ACEOF
7849/* confdefs.h. */
7850_ACEOF
7851cat confdefs.h >>conftest.$ac_ext
7852cat >>conftest.$ac_ext <<_ACEOF
7853/* end confdefs.h. */
7854#include <$ac_header>
7855_ACEOF
7856if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7857 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7858 ac_status=$?
7859 grep -v '^ *+' conftest.er1 >conftest.err
7860 rm -f conftest.er1
7861 cat conftest.err >&5
7862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7863 (exit $ac_status); } >/dev/null; then
7864 if test -s conftest.err; then
7865 ac_cpp_err=$ac_c_preproc_warn_flag
7866 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7867 else
7868 ac_cpp_err=
7869 fi
7870else
7871 ac_cpp_err=yes
7872fi
7873if test -z "$ac_cpp_err"; then
7874 ac_header_preproc=yes
7875else
7876 echo "$as_me: failed program was:" >&5
7877sed 's/^/| /' conftest.$ac_ext >&5
7878
7879 ac_header_preproc=no
7880fi
7881rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7882echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7883echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
7884
7885# So? What about this header?
7886case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7887 yes:no: )
7888 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7889echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7890 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7891echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7892 ac_header_preproc=yes
7893 ;;
7894 no:yes:* )
7895 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7896echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7897 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7898echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7899 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7900echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7901 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7902echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7903 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7904echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7905 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7906echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
7907 (
7908 cat <<\_ASBOX
7909## ------------------------------------------ ##
7910## Report this to the AC_PACKAGE_NAME lists. ##
7911## ------------------------------------------ ##
7912_ASBOX
7913 ) |
7914 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
7915 ;;
7916esac
b4e70030
JB
7917echo "$as_me:$LINENO: checking for $ac_header" >&5
7918echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7919if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7920 echo $ECHO_N "(cached) $ECHO_C" >&6
7921else
7922 eval "$as_ac_Header=\$ac_header_preproc"
7923fi
b4e70030
JB
7924echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7925echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7926
7927fi
7928if test `eval echo '${'$as_ac_Header'}'` = yes; then
7929 cat >>confdefs.h <<_ACEOF
7930#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7931_ACEOF
7932
7933fi
7934
7935done
7936
a9322a30
TT
7937 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
7938 enable_libunwind=yes;
7939 fi
7940
7941fi;
7942
7943if test x"$enable_libunwind" = xyes; then
7944
bec39cab 7945
a9322a30 7946for ac_header in libunwind.h libunwind-ia64.h
bec39cab
AC
7947do
7948as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7949if eval "test \"\${$as_ac_Header+set}\" = set"; then
7950 echo "$as_me:$LINENO: checking for $ac_header" >&5
7951echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7952if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7953 echo $ECHO_N "(cached) $ECHO_C" >&6
7954fi
b4e70030
JB
7955echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7956echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7957else
7958 # Is the header compilable?
b4e70030
JB
7959echo "$as_me:$LINENO: checking $ac_header usability" >&5
7960echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7961cat >conftest.$ac_ext <<_ACEOF
7962/* confdefs.h. */
7963_ACEOF
7964cat confdefs.h >>conftest.$ac_ext
7965cat >>conftest.$ac_ext <<_ACEOF
7966/* end confdefs.h. */
7967$ac_includes_default
7968#include <$ac_header>
7969_ACEOF
7970rm -f conftest.$ac_objext
7971if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7972 (eval $ac_compile) 2>conftest.er1
7973 ac_status=$?
7974 grep -v '^ *+' conftest.er1 >conftest.err
7975 rm -f conftest.er1
7976 cat conftest.err >&5
7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978 (exit $ac_status); } &&
b4e70030
JB
7979 { ac_try='test -z "$ac_c_werror_flag"
7980 || test ! -s conftest.err'
bec39cab
AC
7981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7982 (eval $ac_try) 2>&5
7983 ac_status=$?
7984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7985 (exit $ac_status); }; } &&
7986 { ac_try='test -s conftest.$ac_objext'
7987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7988 (eval $ac_try) 2>&5
7989 ac_status=$?
7990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991 (exit $ac_status); }; }; then
7992 ac_header_compiler=yes
7993else
7994 echo "$as_me: failed program was:" >&5
7995sed 's/^/| /' conftest.$ac_ext >&5
7996
b4e70030 7997ac_header_compiler=no
bec39cab
AC
7998fi
7999rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8000echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8001echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8002
8003# Is the header present?
b4e70030
JB
8004echo "$as_me:$LINENO: checking $ac_header presence" >&5
8005echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8006cat >conftest.$ac_ext <<_ACEOF
8007/* confdefs.h. */
8008_ACEOF
8009cat confdefs.h >>conftest.$ac_ext
8010cat >>conftest.$ac_ext <<_ACEOF
8011/* end confdefs.h. */
8012#include <$ac_header>
8013_ACEOF
8014if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8015 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8016 ac_status=$?
8017 grep -v '^ *+' conftest.er1 >conftest.err
8018 rm -f conftest.er1
8019 cat conftest.err >&5
8020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8021 (exit $ac_status); } >/dev/null; then
8022 if test -s conftest.err; then
8023 ac_cpp_err=$ac_c_preproc_warn_flag
8024 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8025 else
8026 ac_cpp_err=
8027 fi
8028else
8029 ac_cpp_err=yes
8030fi
8031if test -z "$ac_cpp_err"; then
8032 ac_header_preproc=yes
8033else
8034 echo "$as_me: failed program was:" >&5
8035sed 's/^/| /' conftest.$ac_ext >&5
8036
8037 ac_header_preproc=no
8038fi
8039rm -f conftest.err conftest.$ac_ext
b4e70030
JB
8040echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8041echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
8042
8043# So? What about this header?
8044case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8045 yes:no: )
8046 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8047echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8048 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8049echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8050 ac_header_preproc=yes
8051 ;;
8052 no:yes:* )
8053 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8054echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8055 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8056echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8057 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8058echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8059 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8060echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8061 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8062echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8063 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8064echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8065 (
8066 cat <<\_ASBOX
8067## ------------------------------------------ ##
8068## Report this to the AC_PACKAGE_NAME lists. ##
8069## ------------------------------------------ ##
8070_ASBOX
8071 ) |
8072 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8073 ;;
8074esac
b4e70030
JB
8075echo "$as_me:$LINENO: checking for $ac_header" >&5
8076echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8077if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8078 echo $ECHO_N "(cached) $ECHO_C" >&6
8079else
8080 eval "$as_ac_Header=\$ac_header_preproc"
8081fi
b4e70030
JB
8082echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8083echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8084
8085fi
8086if test `eval echo '${'$as_ac_Header'}'` = yes; then
8087 cat >>confdefs.h <<_ACEOF
8088#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8089_ACEOF
8090
8091fi
8092
8093done
8094
bec39cab 8095
a9322a30
TT
8096cat >>confdefs.h <<\_ACEOF
8097#define HAVE_LIBUNWIND 1
8098_ACEOF
8099
8100 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8101 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8102 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8103fi
8104
8105# Profiling support.
8106# Check whether --enable-profiling or --disable-profiling was given.
8107if test "${enable_profiling+set}" = set; then
8108 enableval="$enable_profiling"
8109 case $enableval in
8110 yes | no)
8111 ;;
8112 *)
8113 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-profile" >&5
8114echo "$as_me: error: bad value $enableval for --enable-profile" >&2;}
8115 { (exit 1); exit 1; }; } ;;
8116 esac
8117else
8118 enable_profiling=no
b4e70030 8119fi;
bec39cab 8120
bec39cab 8121
a9322a30
TT
8122
8123for ac_func in monstartup _mcleanup
bec39cab 8124do
a9322a30
TT
8125as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8126echo "$as_me:$LINENO: checking for $ac_func" >&5
8127echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8128if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 8129 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8130else
a9322a30 8131 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8132/* confdefs.h. */
8133_ACEOF
8134cat confdefs.h >>conftest.$ac_ext
8135cat >>conftest.$ac_ext <<_ACEOF
8136/* end confdefs.h. */
a9322a30
TT
8137/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8138 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8139#define $ac_func innocuous_$ac_func
8140
8141/* System header to define __stub macros and hopefully few prototypes,
8142 which can conflict with char $ac_func (); below.
8143 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8144 <limits.h> exists even on freestanding compilers. */
8145
8146#ifdef __STDC__
8147# include <limits.h>
8148#else
8149# include <assert.h>
8150#endif
8151
8152#undef $ac_func
8153
8154/* Override any gcc2 internal prototype to avoid an error. */
8155#ifdef __cplusplus
8156extern "C"
8157{
8158#endif
8159/* We use char because int might match the return type of a gcc2
8160 builtin and then its argument prototype would still apply. */
8161char $ac_func ();
8162/* The GNU C library defines this for functions which it implements
8163 to always fail with ENOSYS. Some functions are actually named
8164 something starting with __ and the normal name is an alias. */
8165#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8166choke me
8167#else
8168char (*f) () = $ac_func;
8169#endif
8170#ifdef __cplusplus
8171}
8172#endif
8173
8174int
8175main ()
8176{
8177return f != $ac_func;
8178 ;
8179 return 0;
8180}
bec39cab 8181_ACEOF
a9322a30
TT
8182rm -f conftest.$ac_objext conftest$ac_exeext
8183if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8184 (eval $ac_link) 2>conftest.er1
bec39cab
AC
8185 ac_status=$?
8186 grep -v '^ *+' conftest.er1 >conftest.err
8187 rm -f conftest.er1
8188 cat conftest.err >&5
8189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8190 (exit $ac_status); } &&
b4e70030
JB
8191 { ac_try='test -z "$ac_c_werror_flag"
8192 || test ! -s conftest.err'
bec39cab
AC
8193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8194 (eval $ac_try) 2>&5
8195 ac_status=$?
8196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8197 (exit $ac_status); }; } &&
a9322a30 8198 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
8199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8200 (eval $ac_try) 2>&5
8201 ac_status=$?
8202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8203 (exit $ac_status); }; }; then
a9322a30 8204 eval "$as_ac_var=yes"
bec39cab
AC
8205else
8206 echo "$as_me: failed program was:" >&5
8207sed 's/^/| /' conftest.$ac_ext >&5
8208
a9322a30 8209eval "$as_ac_var=no"
bec39cab 8210fi
a9322a30
TT
8211rm -f conftest.err conftest.$ac_objext \
8212 conftest$ac_exeext conftest.$ac_ext
bec39cab 8213fi
a9322a30
TT
8214echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8215echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8216if test `eval echo '${'$as_ac_var'}'` = yes; then
bec39cab 8217 cat >>confdefs.h <<_ACEOF
a9322a30 8218#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab
AC
8219_ACEOF
8220
8221fi
bec39cab
AC
8222done
8223
a9322a30
TT
8224echo "$as_me:$LINENO: checking for _etext" >&5
8225echo $ECHO_N "checking for _etext... $ECHO_C" >&6
8226if test "${ac_cv_var__etext+set}" = set; then
bec39cab 8227 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8228else
a9322a30 8229 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8230/* confdefs.h. */
8231_ACEOF
8232cat confdefs.h >>conftest.$ac_ext
8233cat >>conftest.$ac_ext <<_ACEOF
8234/* end confdefs.h. */
a9322a30
TT
8235#include <stdlib.h>
8236extern char _etext;
8237
8238int
8239main ()
8240{
8241free (&_etext);
8242 ;
8243 return 0;
8244}
bec39cab 8245_ACEOF
a9322a30
TT
8246rm -f conftest.$ac_objext conftest$ac_exeext
8247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8248 (eval $ac_link) 2>conftest.er1
bec39cab
AC
8249 ac_status=$?
8250 grep -v '^ *+' conftest.er1 >conftest.err
8251 rm -f conftest.er1
8252 cat conftest.err >&5
8253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8254 (exit $ac_status); } &&
b4e70030
JB
8255 { ac_try='test -z "$ac_c_werror_flag"
8256 || test ! -s conftest.err'
bec39cab
AC
8257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8258 (eval $ac_try) 2>&5
8259 ac_status=$?
8260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8261 (exit $ac_status); }; } &&
a9322a30 8262 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
8263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8264 (eval $ac_try) 2>&5
8265 ac_status=$?
8266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8267 (exit $ac_status); }; }; then
a9322a30 8268 ac_cv_var__etext=yes
bec39cab
AC
8269else
8270 echo "$as_me: failed program was:" >&5
8271sed 's/^/| /' conftest.$ac_ext >&5
8272
a9322a30 8273ac_cv_var__etext=no
bec39cab 8274fi
a9322a30
TT
8275rm -f conftest.err conftest.$ac_objext \
8276 conftest$ac_exeext conftest.$ac_ext
bec39cab 8277fi
a9322a30
TT
8278echo "$as_me:$LINENO: result: $ac_cv_var__etext" >&5
8279echo "${ECHO_T}$ac_cv_var__etext" >&6
8280if test $ac_cv_var__etext = yes; then
60ca704f
SE
8281
8282cat >>confdefs.h <<\_ACEOF
a9322a30 8283#define HAVE__ETEXT 1
bec39cab
AC
8284_ACEOF
8285
bec39cab 8286fi
a9322a30
TT
8287echo "$as_me:$LINENO: checking for etext" >&5
8288echo $ECHO_N "checking for etext... $ECHO_C" >&6
8289if test "${ac_cv_var_etext+set}" = set; then
bec39cab
AC
8290 echo $ECHO_N "(cached) $ECHO_C" >&6
8291else
8292 cat >conftest.$ac_ext <<_ACEOF
8293/* confdefs.h. */
8294_ACEOF
8295cat confdefs.h >>conftest.$ac_ext
8296cat >>conftest.$ac_ext <<_ACEOF
8297/* end confdefs.h. */
a9322a30
TT
8298#include <stdlib.h>
8299extern char etext;
bec39cab
AC
8300
8301int
8302main ()
8303{
a9322a30 8304free (&etext);
bec39cab
AC
8305 ;
8306 return 0;
8307}
8308_ACEOF
8309rm -f conftest.$ac_objext conftest$ac_exeext
8310if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8311 (eval $ac_link) 2>conftest.er1
8312 ac_status=$?
8313 grep -v '^ *+' conftest.er1 >conftest.err
8314 rm -f conftest.er1
8315 cat conftest.err >&5
8316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8317 (exit $ac_status); } &&
b4e70030
JB
8318 { ac_try='test -z "$ac_c_werror_flag"
8319 || test ! -s conftest.err'
bec39cab
AC
8320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8321 (eval $ac_try) 2>&5
8322 ac_status=$?
8323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8324 (exit $ac_status); }; } &&
8325 { ac_try='test -s conftest$ac_exeext'
8326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8327 (eval $ac_try) 2>&5
8328 ac_status=$?
8329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8330 (exit $ac_status); }; }; then
a9322a30 8331 ac_cv_var_etext=yes
bec39cab
AC
8332else
8333 echo "$as_me: failed program was:" >&5
8334sed 's/^/| /' conftest.$ac_ext >&5
8335
a9322a30 8336ac_cv_var_etext=no
bec39cab
AC
8337fi
8338rm -f conftest.err conftest.$ac_objext \
8339 conftest$ac_exeext conftest.$ac_ext
8340fi
a9322a30
TT
8341echo "$as_me:$LINENO: result: $ac_cv_var_etext" >&5
8342echo "${ECHO_T}$ac_cv_var_etext" >&6
8343if test $ac_cv_var_etext = yes; then
8344
8345cat >>confdefs.h <<\_ACEOF
8346#define HAVE_ETEXT 1
bec39cab
AC
8347_ACEOF
8348
8349fi
a9322a30
TT
8350if test "$enable_profiling" = yes ; then
8351 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
8352 { { echo "$as_me:$LINENO: error: --enable-profiling requires monstartup and _mcleanup" >&5
8353echo "$as_me: error: --enable-profiling requires monstartup and _mcleanup" >&2;}
8354 { (exit 1); exit 1; }; }
8355 fi
8356 PROFILE_CFLAGS=-pg
8357 OLD_CFLAGS="$CFLAGS"
8358 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8359
a9322a30
TT
8360 echo "$as_me:$LINENO: checking whether $CC supports -pg" >&5
8361echo $ECHO_N "checking whether $CC supports -pg... $ECHO_C" >&6
8362if test "${ac_cv_cc_supports_pg+set}" = set; then
bec39cab
AC
8363 echo $ECHO_N "(cached) $ECHO_C" >&6
8364else
8365 cat >conftest.$ac_ext <<_ACEOF
8366/* confdefs.h. */
8367_ACEOF
8368cat confdefs.h >>conftest.$ac_ext
8369cat >>conftest.$ac_ext <<_ACEOF
8370/* end confdefs.h. */
bec39cab
AC
8371
8372int
8373main ()
8374{
a9322a30 8375int x;
bec39cab
AC
8376 ;
8377 return 0;
8378}
8379_ACEOF
a9322a30
TT
8380rm -f conftest.$ac_objext
8381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8382 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
8383 ac_status=$?
8384 grep -v '^ *+' conftest.er1 >conftest.err
8385 rm -f conftest.er1
8386 cat conftest.err >&5
8387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388 (exit $ac_status); } &&
b4e70030
JB
8389 { ac_try='test -z "$ac_c_werror_flag"
8390 || test ! -s conftest.err'
bec39cab
AC
8391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8392 (eval $ac_try) 2>&5
8393 ac_status=$?
8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395 (exit $ac_status); }; } &&
a9322a30 8396 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
8397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8398 (eval $ac_try) 2>&5
8399 ac_status=$?
8400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8401 (exit $ac_status); }; }; then
a9322a30 8402 ac_cv_cc_supports_pg=yes
bec39cab
AC
8403else
8404 echo "$as_me: failed program was:" >&5
8405sed 's/^/| /' conftest.$ac_ext >&5
8406
a9322a30 8407ac_cv_cc_supports_pg=no
bec39cab 8408fi
a9322a30 8409rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8410fi
a9322a30
TT
8411echo "$as_me:$LINENO: result: $ac_cv_cc_supports_pg" >&5
8412echo "${ECHO_T}$ac_cv_cc_supports_pg" >&6
bec39cab 8413
a9322a30
TT
8414 if test $ac_cv_cc_supports_pg = no; then
8415 { { echo "$as_me:$LINENO: error: --enable-profiling requires a compiler which supports -pg" >&5
8416echo "$as_me: error: --enable-profiling requires a compiler which supports -pg" >&2;}
8417 { (exit 1); exit 1; }; }
8418 fi
bec39cab 8419
a9322a30 8420 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8421fi
8422
c16158bc
JM
8423
8424
8425# Check whether --with-pkgversion or --without-pkgversion was given.
8426if test "${with_pkgversion+set}" = set; then
8427 withval="$with_pkgversion"
8428 case "$withval" in
8429 yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
8430echo "$as_me: error: package version not specified" >&2;}
8431 { (exit 1); exit 1; }; } ;;
8432 no) PKGVERSION= ;;
8433 *) PKGVERSION="($withval) " ;;
8434 esac
8435else
8436 PKGVERSION="(GDB) "
8437
8438fi;
8439
8440
8441
8442
8443# Check whether --with-bugurl or --without-bugurl was given.
8444if test "${with_bugurl+set}" = set; then
8445 withval="$with_bugurl"
8446 case "$withval" in
8447 yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
8448echo "$as_me: error: bug URL not specified" >&2;}
8449 { (exit 1); exit 1; }; } ;;
8450 no) BUGURL=
8451 ;;
8452 *) BUGURL="$withval"
8453 ;;
8454 esac
8455else
8456 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8457
8458fi;
8459 case ${BUGURL} in
8460 "")
8461 REPORT_BUGS_TO=
8462 REPORT_BUGS_TEXI=
8463 ;;
8464 *)
8465 REPORT_BUGS_TO="<$BUGURL>"
8466 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8467 ;;
8468 esac;
8469
8470
8471
8472
8473cat >>confdefs.h <<_ACEOF
8474#define PKGVERSION "$PKGVERSION"
8475_ACEOF
8476
8477
8478cat >>confdefs.h <<_ACEOF
8479#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8480_ACEOF
8481
8482
bec39cab
AC
8483# --------------------- #
8484# Checks for programs. #
8485# --------------------- #
8486
8487for ac_prog in gawk mawk nawk awk
8488do
8489 # Extract the first word of "$ac_prog", so it can be a program name with args.
8490set dummy $ac_prog; ac_word=$2
b4e70030
JB
8491echo "$as_me:$LINENO: checking for $ac_word" >&5
8492echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8493if test "${ac_cv_prog_AWK+set}" = set; then
8494 echo $ECHO_N "(cached) $ECHO_C" >&6
8495else
8496 if test -n "$AWK"; then
8497 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8498else
8499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8500for as_dir in $PATH
8501do
8502 IFS=$as_save_IFS
8503 test -z "$as_dir" && as_dir=.
8504 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8505 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8506 ac_cv_prog_AWK="$ac_prog"
8507 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8508 break 2
8509 fi
8510done
8511done
8512
8513fi
8514fi
8515AWK=$ac_cv_prog_AWK
8516if test -n "$AWK"; then
b4e70030
JB
8517 echo "$as_me:$LINENO: result: $AWK" >&5
8518echo "${ECHO_T}$AWK" >&6
bec39cab 8519else
b4e70030
JB
8520 echo "$as_me:$LINENO: result: no" >&5
8521echo "${ECHO_T}no" >&6
bec39cab
AC
8522fi
8523
8524 test -n "$AWK" && break
8525done
8526
8527# Find a good install program. We prefer a C program (faster),
8528# so one script is as good as another. But avoid the broken or
8529# incompatible versions:
8530# SysV /etc/install, /usr/sbin/install
8531# SunOS /usr/etc/install
8532# IRIX /sbin/install
8533# AIX /bin/install
8534# AmigaOS /C/install, which installs bootblocks on floppy discs
8535# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8536# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8537# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8538# OS/2's system install, which has a completely different semantic
8539# ./install, which can be erroneously created by make from ./install.sh.
b4e70030
JB
8540echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
8541echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
bec39cab
AC
8542if test -z "$INSTALL"; then
8543if test "${ac_cv_path_install+set}" = set; then
8544 echo $ECHO_N "(cached) $ECHO_C" >&6
8545else
8546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8547for as_dir in $PATH
8548do
8549 IFS=$as_save_IFS
8550 test -z "$as_dir" && as_dir=.
8551 # Account for people who put trailing slashes in PATH elements.
8552case $as_dir/ in
8553 ./ | .// | /cC/* | \
8554 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8555 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
8556 /usr/ucb/* ) ;;
c906108c 8557 *)
bec39cab
AC
8558 # OSF1 and SCO ODT 3.0 have their own names for install.
8559 # Don't use installbsd from OSF since it installs stuff as root
8560 # by default.
8561 for ac_prog in ginstall scoinst install; do
8562 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8563 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
bec39cab
AC
8564 if test $ac_prog = install &&
8565 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8566 # AIX install. It has an incompatible calling convention.
8567 :
8568 elif test $ac_prog = install &&
8569 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8570 # program-specific install script used by HP pwplus--don't use.
8571 :
8572 else
8573 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8574 break 3
8575 fi
8576 fi
8577 done
8578 done
8579 ;;
c906108c 8580esac
bec39cab
AC
8581done
8582
8583
8584fi
8585 if test "${ac_cv_path_install+set}" = set; then
8586 INSTALL=$ac_cv_path_install
8587 else
b4e70030
JB
8588 # As a last resort, use the slow shell script. We don't cache a
8589 # path for INSTALL within a source directory, because that will
bec39cab 8590 # break other packages using the cache if that directory is
b4e70030 8591 # removed, or if the path is relative.
bec39cab
AC
8592 INSTALL=$ac_install_sh
8593 fi
8594fi
b4e70030
JB
8595echo "$as_me:$LINENO: result: $INSTALL" >&5
8596echo "${ECHO_T}$INSTALL" >&6
bec39cab
AC
8597
8598# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8599# It thinks the first close brace ends the variable substitution.
8600test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8601
8602test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8603
8604test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8605
b4e70030
JB
8606echo "$as_me:$LINENO: checking whether ln -s works" >&5
8607echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
bec39cab
AC
8608LN_S=$as_ln_s
8609if test "$LN_S" = "ln -s"; then
b4e70030
JB
8610 echo "$as_me:$LINENO: result: yes" >&5
8611echo "${ECHO_T}yes" >&6
bec39cab 8612else
b4e70030
JB
8613 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
8614echo "${ECHO_T}no, using $LN_S" >&6
bec39cab
AC
8615fi
8616
8617if test -n "$ac_tool_prefix"; then
8618 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8619set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b4e70030
JB
8620echo "$as_me:$LINENO: checking for $ac_word" >&5
8621echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8622if test "${ac_cv_prog_RANLIB+set}" = set; then
8623 echo $ECHO_N "(cached) $ECHO_C" >&6
8624else
8625 if test -n "$RANLIB"; then
8626 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8627else
8628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8629for as_dir in $PATH
8630do
8631 IFS=$as_save_IFS
8632 test -z "$as_dir" && as_dir=.
8633 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8634 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8635 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8636 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8637 break 2
8638 fi
8639done
8640done
8641
8642fi
8643fi
8644RANLIB=$ac_cv_prog_RANLIB
8645if test -n "$RANLIB"; then
b4e70030
JB
8646 echo "$as_me:$LINENO: result: $RANLIB" >&5
8647echo "${ECHO_T}$RANLIB" >&6
bec39cab 8648else
b4e70030
JB
8649 echo "$as_me:$LINENO: result: no" >&5
8650echo "${ECHO_T}no" >&6
bec39cab
AC
8651fi
8652
8653fi
8654if test -z "$ac_cv_prog_RANLIB"; then
8655 ac_ct_RANLIB=$RANLIB
8656 # Extract the first word of "ranlib", so it can be a program name with args.
8657set dummy ranlib; ac_word=$2
b4e70030
JB
8658echo "$as_me:$LINENO: checking for $ac_word" >&5
8659echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8660if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8661 echo $ECHO_N "(cached) $ECHO_C" >&6
8662else
8663 if test -n "$ac_ct_RANLIB"; then
8664 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8665else
8666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8667for as_dir in $PATH
8668do
8669 IFS=$as_save_IFS
8670 test -z "$as_dir" && as_dir=.
8671 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8672 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8673 ac_cv_prog_ac_ct_RANLIB="ranlib"
8674 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8675 break 2
8676 fi
8677done
8678done
8679
b4e70030 8680 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
bec39cab
AC
8681fi
8682fi
8683ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8684if test -n "$ac_ct_RANLIB"; then
b4e70030
JB
8685 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8686echo "${ECHO_T}$ac_ct_RANLIB" >&6
bec39cab 8687else
b4e70030
JB
8688 echo "$as_me:$LINENO: result: no" >&5
8689echo "${ECHO_T}no" >&6
bec39cab
AC
8690fi
8691
b4e70030 8692 RANLIB=$ac_ct_RANLIB
bec39cab
AC
8693else
8694 RANLIB="$ac_cv_prog_RANLIB"
8695fi
8696
8697for ac_prog in 'bison -y' byacc
8698do
8699 # Extract the first word of "$ac_prog", so it can be a program name with args.
8700set dummy $ac_prog; ac_word=$2
b4e70030
JB
8701echo "$as_me:$LINENO: checking for $ac_word" >&5
8702echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8703if test "${ac_cv_prog_YACC+set}" = set; then
8704 echo $ECHO_N "(cached) $ECHO_C" >&6
8705else
8706 if test -n "$YACC"; then
8707 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8708else
8709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8710for as_dir in $PATH
8711do
8712 IFS=$as_save_IFS
8713 test -z "$as_dir" && as_dir=.
8714 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8715 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8716 ac_cv_prog_YACC="$ac_prog"
8717 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8718 break 2
8719 fi
8720done
8721done
8722
8723fi
8724fi
8725YACC=$ac_cv_prog_YACC
8726if test -n "$YACC"; then
b4e70030
JB
8727 echo "$as_me:$LINENO: result: $YACC" >&5
8728echo "${ECHO_T}$YACC" >&6
bec39cab 8729else
b4e70030
JB
8730 echo "$as_me:$LINENO: result: no" >&5
8731echo "${ECHO_T}no" >&6
bec39cab
AC
8732fi
8733
8734 test -n "$YACC" && break
8735done
8736test -n "$YACC" || YACC="yacc"
8737
8738
8739if test -n "$ac_tool_prefix"; then
8740 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8741set dummy ${ac_tool_prefix}ar; ac_word=$2
b4e70030
JB
8742echo "$as_me:$LINENO: checking for $ac_word" >&5
8743echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8744if test "${ac_cv_prog_AR+set}" = set; then
8745 echo $ECHO_N "(cached) $ECHO_C" >&6
8746else
8747 if test -n "$AR"; then
8748 ac_cv_prog_AR="$AR" # Let the user override the test.
8749else
8750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8751for as_dir in $PATH
8752do
8753 IFS=$as_save_IFS
8754 test -z "$as_dir" && as_dir=.
8755 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8756 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8757 ac_cv_prog_AR="${ac_tool_prefix}ar"
8758 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8759 break 2
8760 fi
8761done
8762done
8763
8764fi
8765fi
8766AR=$ac_cv_prog_AR
8767if test -n "$AR"; then
b4e70030
JB
8768 echo "$as_me:$LINENO: result: $AR" >&5
8769echo "${ECHO_T}$AR" >&6
bec39cab 8770else
b4e70030
JB
8771 echo "$as_me:$LINENO: result: no" >&5
8772echo "${ECHO_T}no" >&6
bec39cab
AC
8773fi
8774
8775fi
8776if test -z "$ac_cv_prog_AR"; then
8777 ac_ct_AR=$AR
8778 # Extract the first word of "ar", so it can be a program name with args.
8779set dummy ar; ac_word=$2
b4e70030
JB
8780echo "$as_me:$LINENO: checking for $ac_word" >&5
8781echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8782if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
8783 echo $ECHO_N "(cached) $ECHO_C" >&6
8784else
8785 if test -n "$ac_ct_AR"; then
8786 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8787else
8788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8789for as_dir in $PATH
8790do
8791 IFS=$as_save_IFS
8792 test -z "$as_dir" && as_dir=.
8793 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8794 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8795 ac_cv_prog_ac_ct_AR="ar"
8796 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8797 break 2
8798 fi
8799done
8800done
8801
8802fi
8803fi
8804ac_ct_AR=$ac_cv_prog_ac_ct_AR
8805if test -n "$ac_ct_AR"; then
b4e70030
JB
8806 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
8807echo "${ECHO_T}$ac_ct_AR" >&6
bec39cab 8808else
b4e70030
JB
8809 echo "$as_me:$LINENO: result: no" >&5
8810echo "${ECHO_T}no" >&6
bec39cab
AC
8811fi
8812
b4e70030 8813 AR=$ac_ct_AR
bec39cab
AC
8814else
8815 AR="$ac_cv_prog_AR"
8816fi
8817
8818if test -n "$ac_tool_prefix"; then
8819 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8820set dummy ${ac_tool_prefix}dlltool; ac_word=$2
b4e70030
JB
8821echo "$as_me:$LINENO: checking for $ac_word" >&5
8822echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8823if test "${ac_cv_prog_DLLTOOL+set}" = set; then
8824 echo $ECHO_N "(cached) $ECHO_C" >&6
8825else
8826 if test -n "$DLLTOOL"; then
8827 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8828else
8829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8830for as_dir in $PATH
8831do
8832 IFS=$as_save_IFS
8833 test -z "$as_dir" && as_dir=.
8834 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8835 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8836 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8837 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8838 break 2
8839 fi
8840done
8841done
8842
8843fi
8844fi
8845DLLTOOL=$ac_cv_prog_DLLTOOL
8846if test -n "$DLLTOOL"; then
b4e70030
JB
8847 echo "$as_me:$LINENO: result: $DLLTOOL" >&5
8848echo "${ECHO_T}$DLLTOOL" >&6
bec39cab 8849else
b4e70030
JB
8850 echo "$as_me:$LINENO: result: no" >&5
8851echo "${ECHO_T}no" >&6
bec39cab
AC
8852fi
8853
8854fi
8855if test -z "$ac_cv_prog_DLLTOOL"; then
8856 ac_ct_DLLTOOL=$DLLTOOL
8857 # Extract the first word of "dlltool", so it can be a program name with args.
8858set dummy dlltool; ac_word=$2
b4e70030
JB
8859echo "$as_me:$LINENO: checking for $ac_word" >&5
8860echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8861if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
8862 echo $ECHO_N "(cached) $ECHO_C" >&6
8863else
8864 if test -n "$ac_ct_DLLTOOL"; then
8865 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8866else
8867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8868for as_dir in $PATH
8869do
8870 IFS=$as_save_IFS
8871 test -z "$as_dir" && as_dir=.
8872 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8873 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8874 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8875 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8876 break 2
8877 fi
8878done
8879done
8880
8881fi
8882fi
8883ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8884if test -n "$ac_ct_DLLTOOL"; then
b4e70030
JB
8885 echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
8886echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
bec39cab 8887else
b4e70030
JB
8888 echo "$as_me:$LINENO: result: no" >&5
8889echo "${ECHO_T}no" >&6
bec39cab
AC
8890fi
8891
b4e70030 8892 DLLTOOL=$ac_ct_DLLTOOL
bec39cab
AC
8893else
8894 DLLTOOL="$ac_cv_prog_DLLTOOL"
8895fi
8896
8897if test -n "$ac_tool_prefix"; then
8898 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8899set dummy ${ac_tool_prefix}windres; ac_word=$2
b4e70030
JB
8900echo "$as_me:$LINENO: checking for $ac_word" >&5
8901echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8902if test "${ac_cv_prog_WINDRES+set}" = set; then
8903 echo $ECHO_N "(cached) $ECHO_C" >&6
8904else
8905 if test -n "$WINDRES"; then
8906 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8907else
8908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8909for as_dir in $PATH
8910do
8911 IFS=$as_save_IFS
8912 test -z "$as_dir" && as_dir=.
8913 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8914 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8915 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
8916 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8917 break 2
8918 fi
8919done
8920done
8921
8922fi
8923fi
8924WINDRES=$ac_cv_prog_WINDRES
8925if test -n "$WINDRES"; then
b4e70030
JB
8926 echo "$as_me:$LINENO: result: $WINDRES" >&5
8927echo "${ECHO_T}$WINDRES" >&6
bec39cab 8928else
b4e70030
JB
8929 echo "$as_me:$LINENO: result: no" >&5
8930echo "${ECHO_T}no" >&6
bec39cab
AC
8931fi
8932
8933fi
8934if test -z "$ac_cv_prog_WINDRES"; then
8935 ac_ct_WINDRES=$WINDRES
8936 # Extract the first word of "windres", so it can be a program name with args.
8937set dummy windres; ac_word=$2
b4e70030
JB
8938echo "$as_me:$LINENO: checking for $ac_word" >&5
8939echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8940if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
8941 echo $ECHO_N "(cached) $ECHO_C" >&6
8942else
8943 if test -n "$ac_ct_WINDRES"; then
8944 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8945else
8946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8947for as_dir in $PATH
8948do
8949 IFS=$as_save_IFS
8950 test -z "$as_dir" && as_dir=.
8951 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8952 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8953 ac_cv_prog_ac_ct_WINDRES="windres"
8954 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8955 break 2
8956 fi
8957done
8958done
8959
8960fi
8961fi
8962ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8963if test -n "$ac_ct_WINDRES"; then
b4e70030
JB
8964 echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
8965echo "${ECHO_T}$ac_ct_WINDRES" >&6
bec39cab 8966else
b4e70030
JB
8967 echo "$as_me:$LINENO: result: no" >&5
8968echo "${ECHO_T}no" >&6
c906108c 8969fi
bec39cab 8970
b4e70030 8971 WINDRES=$ac_ct_WINDRES
c906108c 8972else
bec39cab 8973 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
8974fi
8975
bec39cab
AC
8976
8977# Needed for GNU/Hurd.
8978if test -n "$ac_tool_prefix"; then
8979 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
8980set dummy ${ac_tool_prefix}mig; ac_word=$2
b4e70030
JB
8981echo "$as_me:$LINENO: checking for $ac_word" >&5
8982echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8983if test "${ac_cv_prog_MIG+set}" = set; then
8984 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 8985else
bec39cab
AC
8986 if test -n "$MIG"; then
8987 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8988else
8989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8990for as_dir in $PATH
8991do
8992 IFS=$as_save_IFS
8993 test -z "$as_dir" && as_dir=.
8994 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8995 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8996 ac_cv_prog_MIG="${ac_tool_prefix}mig"
8997 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8998 break 2
8999 fi
9000done
9001done
9002
c906108c 9003fi
bec39cab
AC
9004fi
9005MIG=$ac_cv_prog_MIG
9006if test -n "$MIG"; then
b4e70030
JB
9007 echo "$as_me:$LINENO: result: $MIG" >&5
9008echo "${ECHO_T}$MIG" >&6
c906108c 9009else
b4e70030
JB
9010 echo "$as_me:$LINENO: result: no" >&5
9011echo "${ECHO_T}no" >&6
c906108c
SS
9012fi
9013
bec39cab
AC
9014fi
9015if test -z "$ac_cv_prog_MIG"; then
9016 ac_ct_MIG=$MIG
9017 # Extract the first word of "mig", so it can be a program name with args.
9018set dummy mig; ac_word=$2
b4e70030
JB
9019echo "$as_me:$LINENO: checking for $ac_word" >&5
9020echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9021if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then
9022 echo $ECHO_N "(cached) $ECHO_C" >&6
9023else
9024 if test -n "$ac_ct_MIG"; then
9025 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
9026else
9027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9028for as_dir in $PATH
9029do
9030 IFS=$as_save_IFS
9031 test -z "$as_dir" && as_dir=.
9032 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9033 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9034 ac_cv_prog_ac_ct_MIG="mig"
9035 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9036 break 2
9037 fi
9038done
9039done
c906108c 9040
bec39cab
AC
9041fi
9042fi
9043ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9044if test -n "$ac_ct_MIG"; then
b4e70030
JB
9045 echo "$as_me:$LINENO: result: $ac_ct_MIG" >&5
9046echo "${ECHO_T}$ac_ct_MIG" >&6
bec39cab 9047else
b4e70030
JB
9048 echo "$as_me:$LINENO: result: no" >&5
9049echo "${ECHO_T}no" >&6
bec39cab 9050fi
c906108c 9051
b4e70030 9052 MIG=$ac_ct_MIG
bec39cab
AC
9053else
9054 MIG="$ac_cv_prog_MIG"
9055fi
c906108c 9056
c906108c 9057
bec39cab
AC
9058# ---------------------- #
9059# Checks for libraries. #
9060# ---------------------- #
c906108c 9061
bec39cab 9062# We might need to link with -lm; most simulators need it.
c906108c 9063
b4e70030
JB
9064echo "$as_me:$LINENO: checking for main in -lm" >&5
9065echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
bec39cab
AC
9066if test "${ac_cv_lib_m_main+set}" = set; then
9067 echo $ECHO_N "(cached) $ECHO_C" >&6
9068else
9069 ac_check_lib_save_LIBS=$LIBS
9070LIBS="-lm $LIBS"
9071cat >conftest.$ac_ext <<_ACEOF
9072/* confdefs.h. */
9073_ACEOF
9074cat confdefs.h >>conftest.$ac_ext
9075cat >>conftest.$ac_ext <<_ACEOF
9076/* end confdefs.h. */
c906108c 9077
c906108c 9078
bec39cab
AC
9079int
9080main ()
9081{
b4e70030 9082main ();
bec39cab
AC
9083 ;
9084 return 0;
9085}
9086_ACEOF
9087rm -f conftest.$ac_objext conftest$ac_exeext
9088if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9089 (eval $ac_link) 2>conftest.er1
9090 ac_status=$?
9091 grep -v '^ *+' conftest.er1 >conftest.err
9092 rm -f conftest.er1
9093 cat conftest.err >&5
9094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9095 (exit $ac_status); } &&
b4e70030
JB
9096 { ac_try='test -z "$ac_c_werror_flag"
9097 || test ! -s conftest.err'
bec39cab
AC
9098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9099 (eval $ac_try) 2>&5
9100 ac_status=$?
9101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9102 (exit $ac_status); }; } &&
9103 { ac_try='test -s conftest$ac_exeext'
9104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9105 (eval $ac_try) 2>&5
9106 ac_status=$?
9107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9108 (exit $ac_status); }; }; then
9109 ac_cv_lib_m_main=yes
9110else
9111 echo "$as_me: failed program was:" >&5
9112sed 's/^/| /' conftest.$ac_ext >&5
9113
b4e70030 9114ac_cv_lib_m_main=no
bec39cab
AC
9115fi
9116rm -f conftest.err conftest.$ac_objext \
9117 conftest$ac_exeext conftest.$ac_ext
9118LIBS=$ac_check_lib_save_LIBS
9119fi
b4e70030
JB
9120echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
9121echo "${ECHO_T}$ac_cv_lib_m_main" >&6
bec39cab
AC
9122if test $ac_cv_lib_m_main = yes; then
9123 cat >>confdefs.h <<_ACEOF
9124#define HAVE_LIBM 1
9125_ACEOF
9126
9127 LIBS="-lm $LIBS"
c906108c 9128
c906108c 9129fi
bec39cab
AC
9130
9131
9132# We need to link with -lw to get `wctype' on Solaris before Solaris
9133# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9134# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9135# is known to have this problem). Therefore we avoid libw if we can.
b4e70030
JB
9136echo "$as_me:$LINENO: checking for wctype" >&5
9137echo $ECHO_N "checking for wctype... $ECHO_C" >&6
bec39cab
AC
9138if test "${ac_cv_func_wctype+set}" = set; then
9139 echo $ECHO_N "(cached) $ECHO_C" >&6
9140else
9141 cat >conftest.$ac_ext <<_ACEOF
9142/* confdefs.h. */
9143_ACEOF
9144cat confdefs.h >>conftest.$ac_ext
9145cat >>conftest.$ac_ext <<_ACEOF
9146/* end confdefs.h. */
9147/* Define wctype to an innocuous variant, in case <limits.h> declares wctype.
9148 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9149#define wctype innocuous_wctype
9150
9151/* System header to define __stub macros and hopefully few prototypes,
9152 which can conflict with char wctype (); below.
9153 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9154 <limits.h> exists even on freestanding compilers. */
9155
9156#ifdef __STDC__
9157# include <limits.h>
9158#else
9159# include <assert.h>
9160#endif
9161
9162#undef wctype
9163
b4e70030 9164/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9165#ifdef __cplusplus
9166extern "C"
b4e70030 9167{
bec39cab 9168#endif
b4e70030
JB
9169/* We use char because int might match the return type of a gcc2
9170 builtin and then its argument prototype would still apply. */
bec39cab
AC
9171char wctype ();
9172/* The GNU C library defines this for functions which it implements
9173 to always fail with ENOSYS. Some functions are actually named
9174 something starting with __ and the normal name is an alias. */
b4e70030 9175#if defined (__stub_wctype) || defined (__stub___wctype)
bec39cab 9176choke me
b4e70030
JB
9177#else
9178char (*f) () = wctype;
9179#endif
9180#ifdef __cplusplus
9181}
bec39cab
AC
9182#endif
9183
9184int
9185main ()
9186{
b4e70030 9187return f != wctype;
bec39cab
AC
9188 ;
9189 return 0;
9190}
9191_ACEOF
9192rm -f conftest.$ac_objext conftest$ac_exeext
9193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9194 (eval $ac_link) 2>conftest.er1
9195 ac_status=$?
9196 grep -v '^ *+' conftest.er1 >conftest.err
9197 rm -f conftest.er1
9198 cat conftest.err >&5
9199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9200 (exit $ac_status); } &&
b4e70030
JB
9201 { ac_try='test -z "$ac_c_werror_flag"
9202 || test ! -s conftest.err'
bec39cab
AC
9203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9204 (eval $ac_try) 2>&5
9205 ac_status=$?
9206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9207 (exit $ac_status); }; } &&
9208 { ac_try='test -s conftest$ac_exeext'
9209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9210 (eval $ac_try) 2>&5
9211 ac_status=$?
9212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9213 (exit $ac_status); }; }; then
9214 ac_cv_func_wctype=yes
9215else
9216 echo "$as_me: failed program was:" >&5
9217sed 's/^/| /' conftest.$ac_ext >&5
9218
b4e70030 9219ac_cv_func_wctype=no
bec39cab
AC
9220fi
9221rm -f conftest.err conftest.$ac_objext \
9222 conftest$ac_exeext conftest.$ac_ext
9223fi
b4e70030
JB
9224echo "$as_me:$LINENO: result: $ac_cv_func_wctype" >&5
9225echo "${ECHO_T}$ac_cv_func_wctype" >&6
bec39cab
AC
9226if test $ac_cv_func_wctype = yes; then
9227 :
c906108c 9228else
c906108c 9229
b4e70030
JB
9230echo "$as_me:$LINENO: checking for wctype in -lw" >&5
9231echo $ECHO_N "checking for wctype in -lw... $ECHO_C" >&6
bec39cab
AC
9232if test "${ac_cv_lib_w_wctype+set}" = set; then
9233 echo $ECHO_N "(cached) $ECHO_C" >&6
9234else
9235 ac_check_lib_save_LIBS=$LIBS
9236LIBS="-lw $LIBS"
9237cat >conftest.$ac_ext <<_ACEOF
9238/* confdefs.h. */
9239_ACEOF
9240cat confdefs.h >>conftest.$ac_ext
9241cat >>conftest.$ac_ext <<_ACEOF
9242/* end confdefs.h. */
c906108c 9243
b4e70030 9244/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9245#ifdef __cplusplus
9246extern "C"
9247#endif
b4e70030
JB
9248/* We use char because int might match the return type of a gcc2
9249 builtin and then its argument prototype would still apply. */
bec39cab
AC
9250char wctype ();
9251int
9252main ()
9253{
b4e70030 9254wctype ();
bec39cab
AC
9255 ;
9256 return 0;
9257}
9258_ACEOF
9259rm -f conftest.$ac_objext conftest$ac_exeext
9260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9261 (eval $ac_link) 2>conftest.er1
9262 ac_status=$?
9263 grep -v '^ *+' conftest.er1 >conftest.err
9264 rm -f conftest.er1
9265 cat conftest.err >&5
9266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9267 (exit $ac_status); } &&
b4e70030
JB
9268 { ac_try='test -z "$ac_c_werror_flag"
9269 || test ! -s conftest.err'
bec39cab
AC
9270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9271 (eval $ac_try) 2>&5
9272 ac_status=$?
9273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9274 (exit $ac_status); }; } &&
9275 { ac_try='test -s conftest$ac_exeext'
9276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9277 (eval $ac_try) 2>&5
9278 ac_status=$?
9279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9280 (exit $ac_status); }; }; then
9281 ac_cv_lib_w_wctype=yes
9282else
9283 echo "$as_me: failed program was:" >&5
9284sed 's/^/| /' conftest.$ac_ext >&5
9285
b4e70030 9286ac_cv_lib_w_wctype=no
bec39cab
AC
9287fi
9288rm -f conftest.err conftest.$ac_objext \
9289 conftest$ac_exeext conftest.$ac_ext
9290LIBS=$ac_check_lib_save_LIBS
9291fi
b4e70030
JB
9292echo "$as_me:$LINENO: result: $ac_cv_lib_w_wctype" >&5
9293echo "${ECHO_T}$ac_cv_lib_w_wctype" >&6
bec39cab
AC
9294if test $ac_cv_lib_w_wctype = yes; then
9295 cat >>confdefs.h <<_ACEOF
9296#define HAVE_LIBW 1
9297_ACEOF
c906108c 9298
bec39cab 9299 LIBS="-lw $LIBS"
c906108c 9300
bec39cab 9301fi
c906108c 9302
bec39cab 9303fi
c906108c 9304
ddc9cd0f 9305
bec39cab 9306# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
b4e70030
JB
9307echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
9308echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
bec39cab
AC
9309if test "${ac_cv_search_gethostbyname+set}" = set; then
9310 echo $ECHO_N "(cached) $ECHO_C" >&6
9311else
9312 ac_func_search_save_LIBS=$LIBS
b4e70030 9313ac_cv_search_gethostbyname=no
bec39cab
AC
9314cat >conftest.$ac_ext <<_ACEOF
9315/* confdefs.h. */
9316_ACEOF
9317cat confdefs.h >>conftest.$ac_ext
9318cat >>conftest.$ac_ext <<_ACEOF
9319/* end confdefs.h. */
ddc9cd0f 9320
b4e70030 9321/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9322#ifdef __cplusplus
9323extern "C"
9324#endif
b4e70030
JB
9325/* We use char because int might match the return type of a gcc2
9326 builtin and then its argument prototype would still apply. */
bec39cab
AC
9327char gethostbyname ();
9328int
9329main ()
9330{
b4e70030 9331gethostbyname ();
bec39cab
AC
9332 ;
9333 return 0;
9334}
9335_ACEOF
b4e70030 9336rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9337if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9338 (eval $ac_link) 2>conftest.er1
9339 ac_status=$?
9340 grep -v '^ *+' conftest.er1 >conftest.err
9341 rm -f conftest.er1
9342 cat conftest.err >&5
9343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9344 (exit $ac_status); } &&
b4e70030
JB
9345 { ac_try='test -z "$ac_c_werror_flag"
9346 || test ! -s conftest.err'
bec39cab
AC
9347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9348 (eval $ac_try) 2>&5
9349 ac_status=$?
9350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9351 (exit $ac_status); }; } &&
9352 { ac_try='test -s conftest$ac_exeext'
9353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9354 (eval $ac_try) 2>&5
9355 ac_status=$?
9356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9357 (exit $ac_status); }; }; then
b4e70030 9358 ac_cv_search_gethostbyname="none required"
bec39cab
AC
9359else
9360 echo "$as_me: failed program was:" >&5
9361sed 's/^/| /' conftest.$ac_ext >&5
ddc9cd0f 9362
bec39cab
AC
9363fi
9364rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
9365 conftest$ac_exeext conftest.$ac_ext
9366if test "$ac_cv_search_gethostbyname" = no; then
9367 for ac_lib in nsl; do
9368 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9369 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
9370/* confdefs.h. */
9371_ACEOF
9372cat confdefs.h >>conftest.$ac_ext
9373cat >>conftest.$ac_ext <<_ACEOF
9374/* end confdefs.h. */
ddc9cd0f 9375
b4e70030 9376/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9377#ifdef __cplusplus
9378extern "C"
9379#endif
b4e70030
JB
9380/* We use char because int might match the return type of a gcc2
9381 builtin and then its argument prototype would still apply. */
9382char gethostbyname ();
bec39cab
AC
9383int
9384main ()
9385{
b4e70030 9386gethostbyname ();
bec39cab
AC
9387 ;
9388 return 0;
9389}
9390_ACEOF
b4e70030 9391rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9392if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9393 (eval $ac_link) 2>conftest.er1
9394 ac_status=$?
9395 grep -v '^ *+' conftest.er1 >conftest.err
9396 rm -f conftest.er1
9397 cat conftest.err >&5
9398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9399 (exit $ac_status); } &&
b4e70030
JB
9400 { ac_try='test -z "$ac_c_werror_flag"
9401 || test ! -s conftest.err'
bec39cab
AC
9402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9403 (eval $ac_try) 2>&5
9404 ac_status=$?
9405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9406 (exit $ac_status); }; } &&
9407 { ac_try='test -s conftest$ac_exeext'
9408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9409 (eval $ac_try) 2>&5
9410 ac_status=$?
9411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9412 (exit $ac_status); }; }; then
b4e70030
JB
9413 ac_cv_search_gethostbyname="-l$ac_lib"
9414break
bec39cab
AC
9415else
9416 echo "$as_me: failed program was:" >&5
9417sed 's/^/| /' conftest.$ac_ext >&5
9418
9419fi
9420rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
9421 conftest$ac_exeext conftest.$ac_ext
9422 done
bec39cab
AC
9423fi
9424LIBS=$ac_func_search_save_LIBS
9425fi
b4e70030
JB
9426echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
9427echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
9428if test "$ac_cv_search_gethostbyname" != no; then
9429 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
96baa820 9430
bec39cab 9431fi
96baa820 9432
c906108c 9433
b4e70030
JB
9434# Some systems (e.g. Solaris) have `socketpair' in libsocket.
9435echo "$as_me:$LINENO: checking for library containing socketpair" >&5
9436echo $ECHO_N "checking for library containing socketpair... $ECHO_C" >&6
9437if test "${ac_cv_search_socketpair+set}" = set; then
9438 echo $ECHO_N "(cached) $ECHO_C" >&6
9439else
9440 ac_func_search_save_LIBS=$LIBS
9441ac_cv_search_socketpair=no
9442cat >conftest.$ac_ext <<_ACEOF
9443/* confdefs.h. */
9444_ACEOF
9445cat confdefs.h >>conftest.$ac_ext
9446cat >>conftest.$ac_ext <<_ACEOF
9447/* end confdefs.h. */
9448
9449/* Override any gcc2 internal prototype to avoid an error. */
9450#ifdef __cplusplus
9451extern "C"
9452#endif
9453/* We use char because int might match the return type of a gcc2
9454 builtin and then its argument prototype would still apply. */
9455char socketpair ();
9456int
9457main ()
9458{
9459socketpair ();
9460 ;
9461 return 0;
9462}
9463_ACEOF
9464rm -f conftest.$ac_objext conftest$ac_exeext
9465if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9466 (eval $ac_link) 2>conftest.er1
9467 ac_status=$?
9468 grep -v '^ *+' conftest.er1 >conftest.err
9469 rm -f conftest.er1
9470 cat conftest.err >&5
9471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9472 (exit $ac_status); } &&
9473 { ac_try='test -z "$ac_c_werror_flag"
9474 || test ! -s conftest.err'
9475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9476 (eval $ac_try) 2>&5
9477 ac_status=$?
9478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9479 (exit $ac_status); }; } &&
9480 { ac_try='test -s conftest$ac_exeext'
9481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9482 (eval $ac_try) 2>&5
9483 ac_status=$?
9484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9485 (exit $ac_status); }; }; then
9486 ac_cv_search_socketpair="none required"
9487else
9488 echo "$as_me: failed program was:" >&5
9489sed 's/^/| /' conftest.$ac_ext >&5
9490
9491fi
9492rm -f conftest.err conftest.$ac_objext \
9493 conftest$ac_exeext conftest.$ac_ext
9494if test "$ac_cv_search_socketpair" = no; then
9495 for ac_lib in socket; do
9496 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9497 cat >conftest.$ac_ext <<_ACEOF
9498/* confdefs.h. */
9499_ACEOF
9500cat confdefs.h >>conftest.$ac_ext
9501cat >>conftest.$ac_ext <<_ACEOF
9502/* end confdefs.h. */
9503
9504/* Override any gcc2 internal prototype to avoid an error. */
9505#ifdef __cplusplus
9506extern "C"
9507#endif
9508/* We use char because int might match the return type of a gcc2
9509 builtin and then its argument prototype would still apply. */
9510char socketpair ();
9511int
9512main ()
9513{
9514socketpair ();
9515 ;
9516 return 0;
9517}
9518_ACEOF
9519rm -f conftest.$ac_objext conftest$ac_exeext
9520if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9521 (eval $ac_link) 2>conftest.er1
9522 ac_status=$?
9523 grep -v '^ *+' conftest.er1 >conftest.err
9524 rm -f conftest.er1
9525 cat conftest.err >&5
9526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9527 (exit $ac_status); } &&
9528 { ac_try='test -z "$ac_c_werror_flag"
9529 || test ! -s conftest.err'
9530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9531 (eval $ac_try) 2>&5
9532 ac_status=$?
9533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9534 (exit $ac_status); }; } &&
9535 { ac_try='test -s conftest$ac_exeext'
9536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9537 (eval $ac_try) 2>&5
9538 ac_status=$?
9539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9540 (exit $ac_status); }; }; then
9541 ac_cv_search_socketpair="-l$ac_lib"
9542break
9543else
9544 echo "$as_me: failed program was:" >&5
9545sed 's/^/| /' conftest.$ac_ext >&5
9546
9547fi
9548rm -f conftest.err conftest.$ac_objext \
9549 conftest$ac_exeext conftest.$ac_ext
9550 done
9551fi
9552LIBS=$ac_func_search_save_LIBS
9553fi
9554echo "$as_me:$LINENO: result: $ac_cv_search_socketpair" >&5
9555echo "${ECHO_T}$ac_cv_search_socketpair" >&6
9556if test "$ac_cv_search_socketpair" != no; then
9557 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
9558
9559fi
9560
9561
233a11ab
CS
9562# Link in zlib if we can. This allows us to read compressed debug sections.
9563echo "$as_me:$LINENO: checking for library containing zlibVersion" >&5
9564echo $ECHO_N "checking for library containing zlibVersion... $ECHO_C" >&6
9565if test "${ac_cv_search_zlibVersion+set}" = set; then
9566 echo $ECHO_N "(cached) $ECHO_C" >&6
9567else
9568 ac_func_search_save_LIBS=$LIBS
9569ac_cv_search_zlibVersion=no
9570cat >conftest.$ac_ext <<_ACEOF
9571/* confdefs.h. */
9572_ACEOF
9573cat confdefs.h >>conftest.$ac_ext
9574cat >>conftest.$ac_ext <<_ACEOF
9575/* end confdefs.h. */
9576
9577/* Override any gcc2 internal prototype to avoid an error. */
9578#ifdef __cplusplus
9579extern "C"
9580#endif
9581/* We use char because int might match the return type of a gcc2
9582 builtin and then its argument prototype would still apply. */
9583char zlibVersion ();
9584int
9585main ()
9586{
9587zlibVersion ();
9588 ;
9589 return 0;
9590}
9591_ACEOF
9592rm -f conftest.$ac_objext conftest$ac_exeext
9593if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9594 (eval $ac_link) 2>conftest.er1
9595 ac_status=$?
9596 grep -v '^ *+' conftest.er1 >conftest.err
9597 rm -f conftest.er1
9598 cat conftest.err >&5
9599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9600 (exit $ac_status); } &&
9601 { ac_try='test -z "$ac_c_werror_flag"
9602 || test ! -s conftest.err'
9603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9604 (eval $ac_try) 2>&5
9605 ac_status=$?
9606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9607 (exit $ac_status); }; } &&
9608 { ac_try='test -s conftest$ac_exeext'
9609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9610 (eval $ac_try) 2>&5
9611 ac_status=$?
9612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9613 (exit $ac_status); }; }; then
9614 ac_cv_search_zlibVersion="none required"
9615else
9616 echo "$as_me: failed program was:" >&5
9617sed 's/^/| /' conftest.$ac_ext >&5
9618
9619fi
9620rm -f conftest.err conftest.$ac_objext \
9621 conftest$ac_exeext conftest.$ac_ext
9622if test "$ac_cv_search_zlibVersion" = no; then
9623 for ac_lib in z; do
9624 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9625 cat >conftest.$ac_ext <<_ACEOF
9626/* confdefs.h. */
9627_ACEOF
9628cat confdefs.h >>conftest.$ac_ext
9629cat >>conftest.$ac_ext <<_ACEOF
9630/* end confdefs.h. */
9631
9632/* Override any gcc2 internal prototype to avoid an error. */
9633#ifdef __cplusplus
9634extern "C"
9635#endif
9636/* We use char because int might match the return type of a gcc2
9637 builtin and then its argument prototype would still apply. */
9638char zlibVersion ();
9639int
9640main ()
9641{
9642zlibVersion ();
9643 ;
9644 return 0;
9645}
9646_ACEOF
9647rm -f conftest.$ac_objext conftest$ac_exeext
9648if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9649 (eval $ac_link) 2>conftest.er1
9650 ac_status=$?
9651 grep -v '^ *+' conftest.er1 >conftest.err
9652 rm -f conftest.er1
9653 cat conftest.err >&5
9654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9655 (exit $ac_status); } &&
9656 { ac_try='test -z "$ac_c_werror_flag"
9657 || test ! -s conftest.err'
9658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9659 (eval $ac_try) 2>&5
9660 ac_status=$?
9661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9662 (exit $ac_status); }; } &&
9663 { ac_try='test -s conftest$ac_exeext'
9664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9665 (eval $ac_try) 2>&5
9666 ac_status=$?
9667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9668 (exit $ac_status); }; }; then
9669 ac_cv_search_zlibVersion="-l$ac_lib"
9670break
9671else
9672 echo "$as_me: failed program was:" >&5
9673sed 's/^/| /' conftest.$ac_ext >&5
9674
9675fi
9676rm -f conftest.err conftest.$ac_objext \
9677 conftest$ac_exeext conftest.$ac_ext
9678 done
9679fi
9680LIBS=$ac_func_search_save_LIBS
9681fi
9682echo "$as_me:$LINENO: result: $ac_cv_search_zlibVersion" >&5
9683echo "${ECHO_T}$ac_cv_search_zlibVersion" >&6
9684if test "$ac_cv_search_zlibVersion" != no; then
9685 test "$ac_cv_search_zlibVersion" = "none required" || LIBS="$ac_cv_search_zlibVersion $LIBS"
9686
9687for ac_header in zlib.h
9688do
9689as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9690if eval "test \"\${$as_ac_Header+set}\" = set"; then
9691 echo "$as_me:$LINENO: checking for $ac_header" >&5
9692echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9693if eval "test \"\${$as_ac_Header+set}\" = set"; then
9694 echo $ECHO_N "(cached) $ECHO_C" >&6
9695fi
9696echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9697echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9698else
9699 # Is the header compilable?
9700echo "$as_me:$LINENO: checking $ac_header usability" >&5
9701echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9702cat >conftest.$ac_ext <<_ACEOF
9703/* confdefs.h. */
9704_ACEOF
9705cat confdefs.h >>conftest.$ac_ext
9706cat >>conftest.$ac_ext <<_ACEOF
9707/* end confdefs.h. */
9708$ac_includes_default
9709#include <$ac_header>
9710_ACEOF
9711rm -f conftest.$ac_objext
9712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9713 (eval $ac_compile) 2>conftest.er1
9714 ac_status=$?
9715 grep -v '^ *+' conftest.er1 >conftest.err
9716 rm -f conftest.er1
9717 cat conftest.err >&5
9718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9719 (exit $ac_status); } &&
9720 { ac_try='test -z "$ac_c_werror_flag"
9721 || test ! -s conftest.err'
9722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9723 (eval $ac_try) 2>&5
9724 ac_status=$?
9725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9726 (exit $ac_status); }; } &&
9727 { ac_try='test -s conftest.$ac_objext'
9728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9729 (eval $ac_try) 2>&5
9730 ac_status=$?
9731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9732 (exit $ac_status); }; }; then
9733 ac_header_compiler=yes
9734else
9735 echo "$as_me: failed program was:" >&5
9736sed 's/^/| /' conftest.$ac_ext >&5
9737
9738ac_header_compiler=no
9739fi
9740rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9741echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9742echo "${ECHO_T}$ac_header_compiler" >&6
9743
9744# Is the header present?
9745echo "$as_me:$LINENO: checking $ac_header presence" >&5
9746echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9747cat >conftest.$ac_ext <<_ACEOF
9748/* confdefs.h. */
9749_ACEOF
9750cat confdefs.h >>conftest.$ac_ext
9751cat >>conftest.$ac_ext <<_ACEOF
9752/* end confdefs.h. */
9753#include <$ac_header>
9754_ACEOF
9755if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9756 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9757 ac_status=$?
9758 grep -v '^ *+' conftest.er1 >conftest.err
9759 rm -f conftest.er1
9760 cat conftest.err >&5
9761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9762 (exit $ac_status); } >/dev/null; then
9763 if test -s conftest.err; then
9764 ac_cpp_err=$ac_c_preproc_warn_flag
9765 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9766 else
9767 ac_cpp_err=
9768 fi
9769else
9770 ac_cpp_err=yes
9771fi
9772if test -z "$ac_cpp_err"; then
9773 ac_header_preproc=yes
9774else
9775 echo "$as_me: failed program was:" >&5
9776sed 's/^/| /' conftest.$ac_ext >&5
9777
9778 ac_header_preproc=no
9779fi
9780rm -f conftest.err conftest.$ac_ext
9781echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9782echo "${ECHO_T}$ac_header_preproc" >&6
9783
9784# So? What about this header?
9785case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9786 yes:no: )
9787 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9788echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9789 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9790echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9791 ac_header_preproc=yes
9792 ;;
9793 no:yes:* )
9794 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9795echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9796 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9797echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9798 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9799echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9800 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9801echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9802 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9803echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9804 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9805echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9806 (
9807 cat <<\_ASBOX
9808## ------------------------------------------ ##
9809## Report this to the AC_PACKAGE_NAME lists. ##
9810## ------------------------------------------ ##
9811_ASBOX
9812 ) |
9813 sed "s/^/$as_me: WARNING: /" >&2
9814 ;;
9815esac
9816echo "$as_me:$LINENO: checking for $ac_header" >&5
9817echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9818if eval "test \"\${$as_ac_Header+set}\" = set"; then
9819 echo $ECHO_N "(cached) $ECHO_C" >&6
9820else
9821 eval "$as_ac_Header=\$ac_header_preproc"
9822fi
9823echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9824echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9825
9826fi
9827if test `eval echo '${'$as_ac_Header'}'` = yes; then
9828 cat >>confdefs.h <<_ACEOF
9829#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9830_ACEOF
9831
9832fi
9833
9834done
9835
9836fi
9837
9838
77f120bf
JB
9839# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
9840echo "$as_me:$LINENO: checking for library containing dlgetmodinfo" >&5
9841echo $ECHO_N "checking for library containing dlgetmodinfo... $ECHO_C" >&6
9842if test "${ac_cv_search_dlgetmodinfo+set}" = set; then
bec39cab
AC
9843 echo $ECHO_N "(cached) $ECHO_C" >&6
9844else
9845 ac_func_search_save_LIBS=$LIBS
77f120bf 9846ac_cv_search_dlgetmodinfo=no
bec39cab
AC
9847cat >conftest.$ac_ext <<_ACEOF
9848/* confdefs.h. */
9849_ACEOF
9850cat confdefs.h >>conftest.$ac_ext
9851cat >>conftest.$ac_ext <<_ACEOF
9852/* end confdefs.h. */
c906108c 9853
b4e70030 9854/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9855#ifdef __cplusplus
9856extern "C"
9857#endif
b4e70030
JB
9858/* We use char because int might match the return type of a gcc2
9859 builtin and then its argument prototype would still apply. */
77f120bf 9860char dlgetmodinfo ();
bec39cab
AC
9861int
9862main ()
9863{
77f120bf 9864dlgetmodinfo ();
bec39cab
AC
9865 ;
9866 return 0;
9867}
9868_ACEOF
b4e70030 9869rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9870if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9871 (eval $ac_link) 2>conftest.er1
9872 ac_status=$?
9873 grep -v '^ *+' conftest.er1 >conftest.err
9874 rm -f conftest.er1
9875 cat conftest.err >&5
9876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9877 (exit $ac_status); } &&
b4e70030
JB
9878 { ac_try='test -z "$ac_c_werror_flag"
9879 || test ! -s conftest.err'
bec39cab
AC
9880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9881 (eval $ac_try) 2>&5
9882 ac_status=$?
9883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9884 (exit $ac_status); }; } &&
9885 { ac_try='test -s conftest$ac_exeext'
9886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9887 (eval $ac_try) 2>&5
9888 ac_status=$?
9889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9890 (exit $ac_status); }; }; then
77f120bf 9891 ac_cv_search_dlgetmodinfo="none required"
bec39cab
AC
9892else
9893 echo "$as_me: failed program was:" >&5
9894sed 's/^/| /' conftest.$ac_ext >&5
1ba607ad
AC
9895
9896fi
bec39cab 9897rm -f conftest.err conftest.$ac_objext \
b4e70030 9898 conftest$ac_exeext conftest.$ac_ext
77f120bf
JB
9899if test "$ac_cv_search_dlgetmodinfo" = no; then
9900 for ac_lib in dl xpdl; do
b4e70030
JB
9901 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9902 cat >conftest.$ac_ext <<_ACEOF
9903/* confdefs.h. */
9904_ACEOF
9905cat confdefs.h >>conftest.$ac_ext
9906cat >>conftest.$ac_ext <<_ACEOF
9907/* end confdefs.h. */
9908
9909/* Override any gcc2 internal prototype to avoid an error. */
9910#ifdef __cplusplus
9911extern "C"
9912#endif
9913/* We use char because int might match the return type of a gcc2
9914 builtin and then its argument prototype would still apply. */
77f120bf 9915char dlgetmodinfo ();
b4e70030
JB
9916int
9917main ()
9918{
77f120bf 9919dlgetmodinfo ();
b4e70030
JB
9920 ;
9921 return 0;
9922}
9923_ACEOF
9924rm -f conftest.$ac_objext conftest$ac_exeext
9925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9926 (eval $ac_link) 2>conftest.er1
9927 ac_status=$?
9928 grep -v '^ *+' conftest.er1 >conftest.err
9929 rm -f conftest.er1
9930 cat conftest.err >&5
9931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9932 (exit $ac_status); } &&
9933 { ac_try='test -z "$ac_c_werror_flag"
9934 || test ! -s conftest.err'
9935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9936 (eval $ac_try) 2>&5
9937 ac_status=$?
9938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9939 (exit $ac_status); }; } &&
9940 { ac_try='test -s conftest$ac_exeext'
9941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9942 (eval $ac_try) 2>&5
9943 ac_status=$?
9944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9945 (exit $ac_status); }; }; then
77f120bf 9946 ac_cv_search_dlgetmodinfo="-l$ac_lib"
b4e70030 9947break
4e8d927d 9948else
b4e70030
JB
9949 echo "$as_me: failed program was:" >&5
9950sed 's/^/| /' conftest.$ac_ext >&5
9951
9952fi
9953rm -f conftest.err conftest.$ac_objext \
9954 conftest$ac_exeext conftest.$ac_ext
9955 done
1ba607ad 9956fi
bec39cab
AC
9957LIBS=$ac_func_search_save_LIBS
9958fi
77f120bf
JB
9959echo "$as_me:$LINENO: result: $ac_cv_search_dlgetmodinfo" >&5
9960echo "${ECHO_T}$ac_cv_search_dlgetmodinfo" >&6
9961if test "$ac_cv_search_dlgetmodinfo" != no; then
9962 test "$ac_cv_search_dlgetmodinfo" = "none required" || LIBS="$ac_cv_search_dlgetmodinfo $LIBS"
c906108c 9963
8bb2c122 9964fi
8bb2c122 9965
8bb2c122 9966
77f120bf
JB
9967# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
9968# There is a very specific comment in /usr/include/curses.h explaining that
9969# termcap routines built into libcurses must not be used.
9970#
9971# The symptoms we observed so far is GDB unexpectedly changing
9972# the terminal settings when tgetent is called - this is particularly
9973# visible as the output is missing carriage returns, and so rapidly
9974# becomes very hard to read.
9975#
9976# The readline configure script has already decided that libtermcap
9977# was enough for its purposes, and so decided to build readline using
9978# libtermcap. Since the TUI mode requires curses, building GDB with
9979# TUI enabled results in both libraries to be used at the same time,
9980# which is not allowed. This basically means that GDB with TUI is
9981# broken on alpha-osf.
9982
9983case $host_os in
9984 alpha*-*-osf* )
9985 if "$enable_tui" = "yes"; then
9986 { { echo "$as_me:$LINENO: error: Building GDB with TUI mode is not supported on this host" >&5
9987echo "$as_me: error: Building GDB with TUI mode is not supported on this host" >&2;}
9988 { (exit 1); exit 1; }; }
9989 fi
9990 if "$enable_tui" = "auto"; then
9991 enable_tui=no
9992 fi
9993 ;;
9994esac
9995
9996# Check whether we should enable the TUI, but only do so if we really
9997# can.
9998if test x"$enable_tui" != xno; then
9999 if test -d $srcdir/tui; then
10000 # For the TUI, we need enhanced curses functionality.
10001 #
10002 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
10003 # curses library because the latter might not provide all the
10004 # functionality we need. However, this leads to problems on systems
10005 # where the linker searches /usr/local/lib, but the compiler doesn't
10006 # search /usr/local/include, if ncurses is installed in /usr/local. A
10007 # default installation of ncurses on alpha*-dec-osf* will lead to such
10008 # a situation.
10009 echo "$as_me:$LINENO: checking for library containing waddstr" >&5
10010echo $ECHO_N "checking for library containing waddstr... $ECHO_C" >&6
10011if test "${ac_cv_search_waddstr+set}" = set; then
d542061a
UW
10012 echo $ECHO_N "(cached) $ECHO_C" >&6
10013else
10014 ac_func_search_save_LIBS=$LIBS
77f120bf 10015ac_cv_search_waddstr=no
d542061a
UW
10016cat >conftest.$ac_ext <<_ACEOF
10017/* confdefs.h. */
10018_ACEOF
10019cat confdefs.h >>conftest.$ac_ext
10020cat >>conftest.$ac_ext <<_ACEOF
10021/* end confdefs.h. */
10022
10023/* Override any gcc2 internal prototype to avoid an error. */
10024#ifdef __cplusplus
10025extern "C"
10026#endif
10027/* We use char because int might match the return type of a gcc2
10028 builtin and then its argument prototype would still apply. */
77f120bf 10029char waddstr ();
d542061a
UW
10030int
10031main ()
10032{
77f120bf 10033waddstr ();
d542061a
UW
10034 ;
10035 return 0;
10036}
10037_ACEOF
10038rm -f conftest.$ac_objext conftest$ac_exeext
10039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10040 (eval $ac_link) 2>conftest.er1
10041 ac_status=$?
10042 grep -v '^ *+' conftest.er1 >conftest.err
10043 rm -f conftest.er1
10044 cat conftest.err >&5
10045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10046 (exit $ac_status); } &&
10047 { ac_try='test -z "$ac_c_werror_flag"
10048 || test ! -s conftest.err'
10049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10050 (eval $ac_try) 2>&5
10051 ac_status=$?
10052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10053 (exit $ac_status); }; } &&
10054 { ac_try='test -s conftest$ac_exeext'
10055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10056 (eval $ac_try) 2>&5
10057 ac_status=$?
10058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10059 (exit $ac_status); }; }; then
77f120bf 10060 ac_cv_search_waddstr="none required"
d542061a
UW
10061else
10062 echo "$as_me: failed program was:" >&5
10063sed 's/^/| /' conftest.$ac_ext >&5
10064
10065fi
10066rm -f conftest.err conftest.$ac_objext \
10067 conftest$ac_exeext conftest.$ac_ext
77f120bf
JB
10068if test "$ac_cv_search_waddstr" = no; then
10069 for ac_lib in ncurses cursesX curses; do
d542061a
UW
10070 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10071 cat >conftest.$ac_ext <<_ACEOF
10072/* confdefs.h. */
10073_ACEOF
10074cat confdefs.h >>conftest.$ac_ext
10075cat >>conftest.$ac_ext <<_ACEOF
10076/* end confdefs.h. */
10077
10078/* Override any gcc2 internal prototype to avoid an error. */
10079#ifdef __cplusplus
10080extern "C"
10081#endif
10082/* We use char because int might match the return type of a gcc2
10083 builtin and then its argument prototype would still apply. */
77f120bf 10084char waddstr ();
d542061a
UW
10085int
10086main ()
10087{
77f120bf 10088waddstr ();
d542061a
UW
10089 ;
10090 return 0;
10091}
10092_ACEOF
10093rm -f conftest.$ac_objext conftest$ac_exeext
10094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10095 (eval $ac_link) 2>conftest.er1
10096 ac_status=$?
10097 grep -v '^ *+' conftest.er1 >conftest.err
10098 rm -f conftest.er1
10099 cat conftest.err >&5
10100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10101 (exit $ac_status); } &&
10102 { ac_try='test -z "$ac_c_werror_flag"
10103 || test ! -s conftest.err'
10104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10105 (eval $ac_try) 2>&5
10106 ac_status=$?
10107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10108 (exit $ac_status); }; } &&
10109 { ac_try='test -s conftest$ac_exeext'
10110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10111 (eval $ac_try) 2>&5
10112 ac_status=$?
10113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10114 (exit $ac_status); }; }; then
77f120bf 10115 ac_cv_search_waddstr="-l$ac_lib"
d542061a
UW
10116break
10117else
10118 echo "$as_me: failed program was:" >&5
10119sed 's/^/| /' conftest.$ac_ext >&5
10120
10121fi
10122rm -f conftest.err conftest.$ac_objext \
10123 conftest$ac_exeext conftest.$ac_ext
10124 done
10125fi
10126LIBS=$ac_func_search_save_LIBS
10127fi
77f120bf
JB
10128echo "$as_me:$LINENO: result: $ac_cv_search_waddstr" >&5
10129echo "${ECHO_T}$ac_cv_search_waddstr" >&6
10130if test "$ac_cv_search_waddstr" != no; then
10131 test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
d542061a
UW
10132
10133fi
10134
10135
77f120bf
JB
10136 if test "$ac_cv_search_waddstr" != no; then
10137 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
10138 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
10139 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
10140 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
10141 CONFIG_ALL="${CONFIG_ALL} all-tui"
10142 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
10143 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
10144 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
10145 else
10146 if test x"$enable_tui" = xyes; then
10147 { { echo "$as_me:$LINENO: error: no enhanced curses library found; disable TUI" >&5
10148echo "$as_me: error: no enhanced curses library found; disable TUI" >&2;}
10149 { (exit 1); exit 1; }; }
10150 else
10151 { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
10152echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
10153 fi
10154 fi
10155 fi
10156fi
10157
bec39cab
AC
10158# Since GDB uses Readline, we need termcap functionality. In many
10159# cases this will be provided by the curses library, but some systems
10160# have a seperate termcap library, or no curses library at all.
8bb2c122 10161
bec39cab
AC
10162case $host_os in
10163 cygwin*)
10164 if test -d $srcdir/libtermcap; then
10165 LIBS="../libtermcap/libtermcap.a $LIBS"
10166 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
10167 fi ;;
10168 go32* | *djgpp*)
10169 ac_cv_search_tgetent="none required"
10170 ;;
7ef34f2c
MM
10171 *mingw32*)
10172 ac_cv_search_tgetent="none required"
10173 CONFIG_OBS="$CONFIG_OBS win32-termcap.o"
10174 ;;
bec39cab 10175esac
627af7ea 10176
bec39cab 10177# These are the libraries checked by Readline.
b4e70030
JB
10178echo "$as_me:$LINENO: checking for library containing tgetent" >&5
10179echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6
bec39cab
AC
10180if test "${ac_cv_search_tgetent+set}" = set; then
10181 echo $ECHO_N "(cached) $ECHO_C" >&6
10182else
10183 ac_func_search_save_LIBS=$LIBS
b4e70030 10184ac_cv_search_tgetent=no
bec39cab
AC
10185cat >conftest.$ac_ext <<_ACEOF
10186/* confdefs.h. */
10187_ACEOF
10188cat confdefs.h >>conftest.$ac_ext
10189cat >>conftest.$ac_ext <<_ACEOF
10190/* end confdefs.h. */
10191
b4e70030 10192/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
10193#ifdef __cplusplus
10194extern "C"
10195#endif
b4e70030
JB
10196/* We use char because int might match the return type of a gcc2
10197 builtin and then its argument prototype would still apply. */
bec39cab
AC
10198char tgetent ();
10199int
10200main ()
10201{
b4e70030 10202tgetent ();
bec39cab
AC
10203 ;
10204 return 0;
10205}
10206_ACEOF
b4e70030 10207rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
10208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10209 (eval $ac_link) 2>conftest.er1
10210 ac_status=$?
10211 grep -v '^ *+' conftest.er1 >conftest.err
10212 rm -f conftest.er1
10213 cat conftest.err >&5
10214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10215 (exit $ac_status); } &&
b4e70030
JB
10216 { ac_try='test -z "$ac_c_werror_flag"
10217 || test ! -s conftest.err'
bec39cab
AC
10218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10219 (eval $ac_try) 2>&5
10220 ac_status=$?
10221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10222 (exit $ac_status); }; } &&
10223 { ac_try='test -s conftest$ac_exeext'
10224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10225 (eval $ac_try) 2>&5
10226 ac_status=$?
10227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10228 (exit $ac_status); }; }; then
b4e70030 10229 ac_cv_search_tgetent="none required"
627af7ea 10230else
bec39cab
AC
10231 echo "$as_me: failed program was:" >&5
10232sed 's/^/| /' conftest.$ac_ext >&5
627af7ea 10233
627af7ea 10234fi
bec39cab 10235rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
10236 conftest$ac_exeext conftest.$ac_ext
10237if test "$ac_cv_search_tgetent" = no; then
10238 for ac_lib in termcap tinfo curses ncurses; do
10239 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10240 cat >conftest.$ac_ext <<_ACEOF
10241/* confdefs.h. */
10242_ACEOF
10243cat confdefs.h >>conftest.$ac_ext
10244cat >>conftest.$ac_ext <<_ACEOF
10245/* end confdefs.h. */
10246
10247/* Override any gcc2 internal prototype to avoid an error. */
10248#ifdef __cplusplus
10249extern "C"
10250#endif
10251/* We use char because int might match the return type of a gcc2
10252 builtin and then its argument prototype would still apply. */
10253char tgetent ();
10254int
10255main ()
10256{
10257tgetent ();
10258 ;
10259 return 0;
10260}
10261_ACEOF
10262rm -f conftest.$ac_objext conftest$ac_exeext
10263if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10264 (eval $ac_link) 2>conftest.er1
10265 ac_status=$?
10266 grep -v '^ *+' conftest.er1 >conftest.err
10267 rm -f conftest.er1
10268 cat conftest.err >&5
10269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10270 (exit $ac_status); } &&
10271 { ac_try='test -z "$ac_c_werror_flag"
10272 || test ! -s conftest.err'
10273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10274 (eval $ac_try) 2>&5
10275 ac_status=$?
10276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10277 (exit $ac_status); }; } &&
10278 { ac_try='test -s conftest$ac_exeext'
10279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10280 (eval $ac_try) 2>&5
10281 ac_status=$?
10282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10283 (exit $ac_status); }; }; then
10284 ac_cv_search_tgetent="-l$ac_lib"
10285break
4e8d927d 10286else
b4e70030
JB
10287 echo "$as_me: failed program was:" >&5
10288sed 's/^/| /' conftest.$ac_ext >&5
10289
10290fi
10291rm -f conftest.err conftest.$ac_objext \
10292 conftest$ac_exeext conftest.$ac_ext
10293 done
bec39cab
AC
10294fi
10295LIBS=$ac_func_search_save_LIBS
10296fi
b4e70030
JB
10297echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5
10298echo "${ECHO_T}$ac_cv_search_tgetent" >&6
10299if test "$ac_cv_search_tgetent" != no; then
10300 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
627af7ea 10301
06825bd1
MK
10302fi
10303
06825bd1 10304
bec39cab
AC
10305if test "$ac_cv_search_tgetent" = no; then
10306 { { echo "$as_me:$LINENO: error: no termcap library found" >&5
10307echo "$as_me: error: no termcap library found" >&2;}
10308 { (exit 1); exit 1; }; }
8ee53726
MK
10309fi
10310
3841debe 10311
6a30b0a5
AS
10312# Check whether --with-system-readline or --without-system-readline was given.
10313if test "${with_system_readline+set}" = set; then
10314 withval="$with_system_readline"
10315
10316fi;
10317
10318if test "$with_system_readline" = yes; then
10319 READLINE=-lreadline
10320 READLINE_DEPS=
10321 READLINE_CFLAGS=
10322else
10323 READLINE='$(READLINE_DIR)/libreadline.a'
10324 READLINE_DEPS='$(READLINE)'
10325 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
10326fi
10327
10328
10329
10330
10331
5c39566f
DJ
10332# Check whether --with-expat or --without-expat was given.
10333if test "${with_expat+set}" = set; then
10334 withval="$with_expat"
10335
10336else
10337 with_expat=auto
10338fi;
10339echo "$as_me:$LINENO: checking whether to use expat" >&5
10340echo $ECHO_N "checking whether to use expat... $ECHO_C" >&6
10341echo "$as_me:$LINENO: result: $with_expat" >&5
10342echo "${ECHO_T}$with_expat" >&6
10343
10344if test "${with_expat}" = no; then
10345 { echo "$as_me:$LINENO: WARNING: expat support disabled; some features may be unavailable." >&5
10346echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
10347 HAVE_LIBEXPAT=no
10348else
10349
3841debe
DJ
10350 if test "X$prefix" = "XNONE"; then
10351 acl_final_prefix="$ac_default_prefix"
10352 else
10353 acl_final_prefix="$prefix"
10354 fi
10355 if test "X$exec_prefix" = "XNONE"; then
10356 acl_final_exec_prefix='${prefix}'
10357 else
10358 acl_final_exec_prefix="$exec_prefix"
10359 fi
10360 acl_save_prefix="$prefix"
10361 prefix="$acl_final_prefix"
10362 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10363 prefix="$acl_save_prefix"
10364
10365
10366# Check whether --with-gnu-ld or --without-gnu-ld was given.
10367if test "${with_gnu_ld+set}" = set; then
10368 withval="$with_gnu_ld"
10369 test "$withval" = no || with_gnu_ld=yes
10370else
10371 with_gnu_ld=no
10372fi;
10373# Prepare PATH_SEPARATOR.
10374# The user is always right.
10375if test "${PATH_SEPARATOR+set}" != set; then
10376 echo "#! /bin/sh" >conf$$.sh
10377 echo "exit 0" >>conf$$.sh
10378 chmod +x conf$$.sh
10379 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10380 PATH_SEPARATOR=';'
10381 else
10382 PATH_SEPARATOR=:
10383 fi
10384 rm -f conf$$.sh
10385fi
10386ac_prog=ld
10387if test "$GCC" = yes; then
10388 # Check if gcc -print-prog-name=ld gives a path.
10389 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10390echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10391 case $host in
10392 *-*-mingw*)
10393 # gcc leaves a trailing carriage return which upsets mingw
10394 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10395 *)
10396 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10397 esac
10398 case $ac_prog in
10399 # Accept absolute paths.
10400 [\\/]* | [A-Za-z]:[\\/]*)
10401 re_direlt='/[^/][^/]*/\.\./'
10402 # Canonicalize the path of ld
10403 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10404 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10405 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10406 done
10407 test -z "$LD" && LD="$ac_prog"
10408 ;;
10409 "")
10410 # If it fails, then pretend we aren't using GCC.
10411 ac_prog=ld
10412 ;;
10413 *)
10414 # If it is relative, then search for the first ld in PATH.
10415 with_gnu_ld=unknown
10416 ;;
10417 esac
10418elif test "$with_gnu_ld" = yes; then
10419 echo "$as_me:$LINENO: checking for GNU ld" >&5
10420echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
10421else
10422 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10423echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
10424fi
10425if test "${acl_cv_path_LD+set}" = set; then
10426 echo $ECHO_N "(cached) $ECHO_C" >&6
10427else
10428 if test -z "$LD"; then
10429 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10430 for ac_dir in $PATH; do
10431 test -z "$ac_dir" && ac_dir=.
10432 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10433 acl_cv_path_LD="$ac_dir/$ac_prog"
10434 # Check to see if the program is GNU ld. I'd rather use --version,
10435 # but apparently some GNU ld's only accept -v.
10436 # Break only if it was the GNU/non-GNU ld that we prefer.
10437 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10438 test "$with_gnu_ld" != no && break
10439 else
10440 test "$with_gnu_ld" != yes && break
10441 fi
10442 fi
10443 done
10444 IFS="$ac_save_ifs"
10445else
10446 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10447fi
10448fi
10449
10450LD="$acl_cv_path_LD"
10451if test -n "$LD"; then
10452 echo "$as_me:$LINENO: result: $LD" >&5
10453echo "${ECHO_T}$LD" >&6
10454else
10455 echo "$as_me:$LINENO: result: no" >&5
10456echo "${ECHO_T}no" >&6
10457fi
10458test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10459echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10460 { (exit 1); exit 1; }; }
10461echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10462echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10463if test "${acl_cv_prog_gnu_ld+set}" = set; then
10464 echo $ECHO_N "(cached) $ECHO_C" >&6
10465else
10466 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10467if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10468 acl_cv_prog_gnu_ld=yes
10469else
10470 acl_cv_prog_gnu_ld=no
10471fi
10472fi
10473echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10474echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10475with_gnu_ld=$acl_cv_prog_gnu_ld
10476
10477
10478
10479 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10480echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10481if test "${acl_cv_rpath+set}" = set; then
10482 echo $ECHO_N "(cached) $ECHO_C" >&6
10483else
10484
10485 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10486 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10487 . ./conftest.sh
10488 rm -f ./conftest.sh
10489 acl_cv_rpath=done
10490
10491fi
10492echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10493echo "${ECHO_T}$acl_cv_rpath" >&6
10494 wl="$acl_cv_wl"
10495 libext="$acl_cv_libext"
10496 shlibext="$acl_cv_shlibext"
10497 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10498 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10499 hardcode_direct="$acl_cv_hardcode_direct"
10500 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10501 # Check whether --enable-rpath or --disable-rpath was given.
10502if test "${enable_rpath+set}" = set; then
10503 enableval="$enable_rpath"
10504 :
10505else
10506 enable_rpath=yes
10507fi;
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517 use_additional=yes
10518
10519 acl_save_prefix="$prefix"
10520 prefix="$acl_final_prefix"
10521 acl_save_exec_prefix="$exec_prefix"
10522 exec_prefix="$acl_final_exec_prefix"
10523
10524 eval additional_includedir=\"$includedir\"
10525 eval additional_libdir=\"$libdir\"
10526
10527 exec_prefix="$acl_save_exec_prefix"
10528 prefix="$acl_save_prefix"
10529
10530
10531# Check whether --with-libexpat-prefix or --without-libexpat-prefix was given.
10532if test "${with_libexpat_prefix+set}" = set; then
10533 withval="$with_libexpat_prefix"
10534
10535 if test "X$withval" = "Xno"; then
10536 use_additional=no
10537 else
10538 if test "X$withval" = "X"; then
10539
10540 acl_save_prefix="$prefix"
10541 prefix="$acl_final_prefix"
10542 acl_save_exec_prefix="$exec_prefix"
10543 exec_prefix="$acl_final_exec_prefix"
10544
10545 eval additional_includedir=\"$includedir\"
10546 eval additional_libdir=\"$libdir\"
10547
10548 exec_prefix="$acl_save_exec_prefix"
10549 prefix="$acl_save_prefix"
10550
10551 else
10552 additional_includedir="$withval/include"
10553 additional_libdir="$withval/lib"
10554 fi
10555 fi
10556
10557fi;
10558 LIBEXPAT=
10559 LTLIBEXPAT=
10560 INCEXPAT=
10561 rpathdirs=
10562 ltrpathdirs=
10563 names_already_handled=
10564 names_next_round='expat '
10565 while test -n "$names_next_round"; do
10566 names_this_round="$names_next_round"
10567 names_next_round=
10568 for name in $names_this_round; do
10569 already_handled=
10570 for n in $names_already_handled; do
10571 if test "$n" = "$name"; then
10572 already_handled=yes
10573 break
10574 fi
10575 done
10576 if test -z "$already_handled"; then
10577 names_already_handled="$names_already_handled $name"
10578 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10579 eval value=\"\$HAVE_LIB$uppername\"
10580 if test -n "$value"; then
10581 if test "$value" = yes; then
10582 eval value=\"\$LIB$uppername\"
10583 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10584 eval value=\"\$LTLIB$uppername\"
10585 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10586 else
10587 :
10588 fi
10589 else
10590 found_dir=
10591 found_la=
10592 found_so=
10593 found_a=
10594 if test $use_additional = yes; then
10595 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10596 found_dir="$additional_libdir"
10597 found_so="$additional_libdir/lib$name.$shlibext"
10598 if test -f "$additional_libdir/lib$name.la"; then
10599 found_la="$additional_libdir/lib$name.la"
10600 fi
10601 else
10602 if test -f "$additional_libdir/lib$name.$libext"; then
10603 found_dir="$additional_libdir"
10604 found_a="$additional_libdir/lib$name.$libext"
10605 if test -f "$additional_libdir/lib$name.la"; then
10606 found_la="$additional_libdir/lib$name.la"
10607 fi
10608 fi
10609 fi
10610 fi
10611 if test "X$found_dir" = "X"; then
10612 for x in $LDFLAGS $LTLIBEXPAT; do
10613
10614 acl_save_prefix="$prefix"
10615 prefix="$acl_final_prefix"
10616 acl_save_exec_prefix="$exec_prefix"
10617 exec_prefix="$acl_final_exec_prefix"
10618 eval x=\"$x\"
10619 exec_prefix="$acl_save_exec_prefix"
10620 prefix="$acl_save_prefix"
10621
10622 case "$x" in
10623 -L*)
10624 dir=`echo "X$x" | sed -e 's/^X-L//'`
10625 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10626 found_dir="$dir"
10627 found_so="$dir/lib$name.$shlibext"
10628 if test -f "$dir/lib$name.la"; then
10629 found_la="$dir/lib$name.la"
10630 fi
10631 else
10632 if test -f "$dir/lib$name.$libext"; then
10633 found_dir="$dir"
10634 found_a="$dir/lib$name.$libext"
10635 if test -f "$dir/lib$name.la"; then
10636 found_la="$dir/lib$name.la"
10637 fi
10638 fi
10639 fi
10640 ;;
10641 esac
10642 if test "X$found_dir" != "X"; then
10643 break
10644 fi
10645 done
10646 fi
10647 if test "X$found_dir" != "X"; then
10648 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10649 if test "X$found_so" != "X"; then
10650 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10651 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10652 else
10653 haveit=
10654 for x in $ltrpathdirs; do
10655 if test "X$x" = "X$found_dir"; then
10656 haveit=yes
10657 break
10658 fi
10659 done
10660 if test -z "$haveit"; then
10661 ltrpathdirs="$ltrpathdirs $found_dir"
10662 fi
10663 if test "$hardcode_direct" = yes; then
10664 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10665 else
10666 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10667 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10668 haveit=
10669 for x in $rpathdirs; do
10670 if test "X$x" = "X$found_dir"; then
10671 haveit=yes
10672 break
10673 fi
10674 done
10675 if test -z "$haveit"; then
10676 rpathdirs="$rpathdirs $found_dir"
10677 fi
10678 else
10679 haveit=
10680 for x in $LDFLAGS $LIBEXPAT; do
10681
10682 acl_save_prefix="$prefix"
10683 prefix="$acl_final_prefix"
10684 acl_save_exec_prefix="$exec_prefix"
10685 exec_prefix="$acl_final_exec_prefix"
10686 eval x=\"$x\"
10687 exec_prefix="$acl_save_exec_prefix"
10688 prefix="$acl_save_prefix"
10689
10690 if test "X$x" = "X-L$found_dir"; then
10691 haveit=yes
10692 break
10693 fi
10694 done
10695 if test -z "$haveit"; then
10696 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
10697 fi
10698 if test "$hardcode_minus_L" != no; then
10699 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10700 else
10701 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10702 fi
10703 fi
10704 fi
10705 fi
10706 else
10707 if test "X$found_a" != "X"; then
10708 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
10709 else
10710 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
10711 fi
10712 fi
10713 additional_includedir=
10714 case "$found_dir" in
10715 */lib | */lib/)
10716 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10717 additional_includedir="$basedir/include"
10718 ;;
10719 esac
10720 if test "X$additional_includedir" != "X"; then
10721 if test "X$additional_includedir" != "X/usr/include"; then
10722 haveit=
10723 if test "X$additional_includedir" = "X/usr/local/include"; then
10724 if test -n "$GCC"; then
10725 case $host_os in
10726 linux*) haveit=yes;;
10727 esac
10728 fi
10729 fi
10730 if test -z "$haveit"; then
10731 for x in $CPPFLAGS $INCEXPAT; do
10732
10733 acl_save_prefix="$prefix"
10734 prefix="$acl_final_prefix"
10735 acl_save_exec_prefix="$exec_prefix"
10736 exec_prefix="$acl_final_exec_prefix"
10737 eval x=\"$x\"
10738 exec_prefix="$acl_save_exec_prefix"
10739 prefix="$acl_save_prefix"
10740
10741 if test "X$x" = "X-I$additional_includedir"; then
10742 haveit=yes
10743 break
10744 fi
10745 done
10746 if test -z "$haveit"; then
10747 if test -d "$additional_includedir"; then
10748 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
10749 fi
10750 fi
10751 fi
10752 fi
10753 fi
10754 if test -n "$found_la"; then
10755 save_libdir="$libdir"
10756 case "$found_la" in
10757 */* | *\\*) . "$found_la" ;;
10758 *) . "./$found_la" ;;
10759 esac
10760 libdir="$save_libdir"
10761 for dep in $dependency_libs; do
10762 case "$dep" in
10763 -L*)
10764 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10765 if test "X$additional_libdir" != "X/usr/lib"; then
10766 haveit=
10767 if test "X$additional_libdir" = "X/usr/local/lib"; then
10768 if test -n "$GCC"; then
10769 case $host_os in
10770 linux*) haveit=yes;;
10771 esac
10772 fi
10773 fi
10774 if test -z "$haveit"; then
10775 haveit=
10776 for x in $LDFLAGS $LIBEXPAT; do
10777
10778 acl_save_prefix="$prefix"
10779 prefix="$acl_final_prefix"
10780 acl_save_exec_prefix="$exec_prefix"
10781 exec_prefix="$acl_final_exec_prefix"
10782 eval x=\"$x\"
10783 exec_prefix="$acl_save_exec_prefix"
10784 prefix="$acl_save_prefix"
10785
10786 if test "X$x" = "X-L$additional_libdir"; then
10787 haveit=yes
10788 break
10789 fi
10790 done
10791 if test -z "$haveit"; then
10792 if test -d "$additional_libdir"; then
10793 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
10794 fi
10795 fi
10796 haveit=
10797 for x in $LDFLAGS $LTLIBEXPAT; do
10798
10799 acl_save_prefix="$prefix"
10800 prefix="$acl_final_prefix"
10801 acl_save_exec_prefix="$exec_prefix"
10802 exec_prefix="$acl_final_exec_prefix"
10803 eval x=\"$x\"
10804 exec_prefix="$acl_save_exec_prefix"
10805 prefix="$acl_save_prefix"
10806
10807 if test "X$x" = "X-L$additional_libdir"; then
10808 haveit=yes
10809 break
10810 fi
10811 done
10812 if test -z "$haveit"; then
10813 if test -d "$additional_libdir"; then
10814 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10815 fi
10816 fi
10817 fi
10818 fi
10819 ;;
10820 -R*)
10821 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10822 if test "$enable_rpath" != no; then
10823 haveit=
10824 for x in $rpathdirs; do
10825 if test "X$x" = "X$dir"; then
10826 haveit=yes
10827 break
10828 fi
10829 done
10830 if test -z "$haveit"; then
10831 rpathdirs="$rpathdirs $dir"
10832 fi
10833 haveit=
10834 for x in $ltrpathdirs; do
10835 if test "X$x" = "X$dir"; then
10836 haveit=yes
10837 break
10838 fi
10839 done
10840 if test -z "$haveit"; then
10841 ltrpathdirs="$ltrpathdirs $dir"
10842 fi
10843 fi
10844 ;;
10845 -l*)
10846 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10847 ;;
10848 *.la)
10849 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10850 ;;
10851 *)
10852 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10853 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10854 ;;
10855 esac
10856 done
10857 fi
10858 else
10859 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10860 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10861 fi
10862 fi
10863 fi
10864 done
10865 done
10866 if test "X$rpathdirs" != "X"; then
10867 if test -n "$hardcode_libdir_separator"; then
10868 alldirs=
10869 for found_dir in $rpathdirs; do
10870 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10871 done
10872 acl_save_libdir="$libdir"
10873 libdir="$alldirs"
10874 eval flag=\"$hardcode_libdir_flag_spec\"
10875 libdir="$acl_save_libdir"
10876 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10877 else
10878 for found_dir in $rpathdirs; do
10879 acl_save_libdir="$libdir"
10880 libdir="$found_dir"
10881 eval flag=\"$hardcode_libdir_flag_spec\"
10882 libdir="$acl_save_libdir"
10883 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10884 done
10885 fi
10886 fi
10887 if test "X$ltrpathdirs" != "X"; then
10888 for found_dir in $ltrpathdirs; do
10889 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10890 done
10891 fi
10892
10893
10894 ac_save_CPPFLAGS="$CPPFLAGS"
10895
10896 for element in $INCEXPAT; do
10897 haveit=
10898 for x in $CPPFLAGS; do
10899
10900 acl_save_prefix="$prefix"
10901 prefix="$acl_final_prefix"
10902 acl_save_exec_prefix="$exec_prefix"
10903 exec_prefix="$acl_final_exec_prefix"
10904 eval x=\"$x\"
10905 exec_prefix="$acl_save_exec_prefix"
10906 prefix="$acl_save_prefix"
10907
10908 if test "X$x" = "X$element"; then
10909 haveit=yes
10910 break
10911 fi
10912 done
10913 if test -z "$haveit"; then
10914 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10915 fi
10916 done
10917
10918
10919 echo "$as_me:$LINENO: checking for libexpat" >&5
10920echo $ECHO_N "checking for libexpat... $ECHO_C" >&6
10921if test "${ac_cv_libexpat+set}" = set; then
10922 echo $ECHO_N "(cached) $ECHO_C" >&6
10923else
10924
10925 ac_save_LIBS="$LIBS"
10926 LIBS="$LIBS $LIBEXPAT"
10927 cat >conftest.$ac_ext <<_ACEOF
10928/* confdefs.h. */
10929_ACEOF
10930cat confdefs.h >>conftest.$ac_ext
10931cat >>conftest.$ac_ext <<_ACEOF
10932/* end confdefs.h. */
10933#include "expat.h"
10934int
10935main ()
10936{
10937XML_Parser p = XML_ParserCreate (0);
10938 ;
10939 return 0;
10940}
10941_ACEOF
10942rm -f conftest.$ac_objext conftest$ac_exeext
10943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10944 (eval $ac_link) 2>conftest.er1
10945 ac_status=$?
10946 grep -v '^ *+' conftest.er1 >conftest.err
10947 rm -f conftest.er1
10948 cat conftest.err >&5
10949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10950 (exit $ac_status); } &&
10951 { ac_try='test -z "$ac_c_werror_flag"
10952 || test ! -s conftest.err'
10953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10954 (eval $ac_try) 2>&5
10955 ac_status=$?
10956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10957 (exit $ac_status); }; } &&
10958 { ac_try='test -s conftest$ac_exeext'
10959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10960 (eval $ac_try) 2>&5
10961 ac_status=$?
10962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10963 (exit $ac_status); }; }; then
10964 ac_cv_libexpat=yes
10965else
10966 echo "$as_me: failed program was:" >&5
10967sed 's/^/| /' conftest.$ac_ext >&5
10968
10969ac_cv_libexpat=no
10970fi
10971rm -f conftest.err conftest.$ac_objext \
10972 conftest$ac_exeext conftest.$ac_ext
10973 LIBS="$ac_save_LIBS"
10974
10975fi
10976echo "$as_me:$LINENO: result: $ac_cv_libexpat" >&5
10977echo "${ECHO_T}$ac_cv_libexpat" >&6
10978 if test "$ac_cv_libexpat" = yes; then
10979 HAVE_LIBEXPAT=yes
10980
10981cat >>confdefs.h <<\_ACEOF
10982#define HAVE_LIBEXPAT 1
10983_ACEOF
10984
10985 echo "$as_me:$LINENO: checking how to link with libexpat" >&5
10986echo $ECHO_N "checking how to link with libexpat... $ECHO_C" >&6
10987 echo "$as_me:$LINENO: result: $LIBEXPAT" >&5
10988echo "${ECHO_T}$LIBEXPAT" >&6
10989 else
10990 HAVE_LIBEXPAT=no
10991 CPPFLAGS="$ac_save_CPPFLAGS"
10992 LIBEXPAT=
10993 LTLIBEXPAT=
10994 fi
10995
10996
10997
10998
10999
11000
5c39566f
DJ
11001 if test "$HAVE_LIBEXPAT" != yes; then
11002 if test "$with_expat" = yes; then
11003 { { echo "$as_me:$LINENO: error: expat is missing or unusable" >&5
11004echo "$as_me: error: expat is missing or unusable" >&2;}
11005 { (exit 1); exit 1; }; }
11006 else
11007 { echo "$as_me:$LINENO: WARNING: expat is missing or unusable; some features may be unavailable." >&5
11008echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
11009 fi
11010 else
11011 save_LIBS=$LIBS
11012 LIBS="$LIBS $LIBEXPAT"
ca4ca11e
DJ
11013
11014for ac_func in XML_StopParser
11015do
11016as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11017echo "$as_me:$LINENO: checking for $ac_func" >&5
11018echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11019if eval "test \"\${$as_ac_var+set}\" = set"; then
11020 echo $ECHO_N "(cached) $ECHO_C" >&6
11021else
11022 cat >conftest.$ac_ext <<_ACEOF
11023/* confdefs.h. */
11024_ACEOF
11025cat confdefs.h >>conftest.$ac_ext
11026cat >>conftest.$ac_ext <<_ACEOF
11027/* end confdefs.h. */
11028/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11029 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11030#define $ac_func innocuous_$ac_func
11031
11032/* System header to define __stub macros and hopefully few prototypes,
11033 which can conflict with char $ac_func (); below.
11034 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11035 <limits.h> exists even on freestanding compilers. */
11036
11037#ifdef __STDC__
11038# include <limits.h>
11039#else
11040# include <assert.h>
11041#endif
11042
11043#undef $ac_func
11044
11045/* Override any gcc2 internal prototype to avoid an error. */
11046#ifdef __cplusplus
11047extern "C"
11048{
11049#endif
11050/* We use char because int might match the return type of a gcc2
11051 builtin and then its argument prototype would still apply. */
11052char $ac_func ();
11053/* The GNU C library defines this for functions which it implements
11054 to always fail with ENOSYS. Some functions are actually named
11055 something starting with __ and the normal name is an alias. */
11056#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11057choke me
11058#else
11059char (*f) () = $ac_func;
11060#endif
11061#ifdef __cplusplus
11062}
11063#endif
11064
11065int
11066main ()
11067{
11068return f != $ac_func;
11069 ;
11070 return 0;
11071}
11072_ACEOF
11073rm -f conftest.$ac_objext conftest$ac_exeext
11074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11075 (eval $ac_link) 2>conftest.er1
11076 ac_status=$?
11077 grep -v '^ *+' conftest.er1 >conftest.err
11078 rm -f conftest.er1
11079 cat conftest.err >&5
11080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11081 (exit $ac_status); } &&
11082 { ac_try='test -z "$ac_c_werror_flag"
11083 || test ! -s conftest.err'
11084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11085 (eval $ac_try) 2>&5
11086 ac_status=$?
11087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11088 (exit $ac_status); }; } &&
11089 { ac_try='test -s conftest$ac_exeext'
11090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11091 (eval $ac_try) 2>&5
11092 ac_status=$?
11093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11094 (exit $ac_status); }; }; then
11095 eval "$as_ac_var=yes"
11096else
11097 echo "$as_me: failed program was:" >&5
11098sed 's/^/| /' conftest.$ac_ext >&5
11099
11100eval "$as_ac_var=no"
11101fi
11102rm -f conftest.err conftest.$ac_objext \
11103 conftest$ac_exeext conftest.$ac_ext
11104fi
11105echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11106echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11107if test `eval echo '${'$as_ac_var'}'` = yes; then
11108 cat >>confdefs.h <<_ACEOF
11109#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11110_ACEOF
11111
11112fi
11113done
11114
5c39566f
DJ
11115 LIBS=$save_LIBS
11116 fi
3841debe
DJ
11117fi
11118
d57a3c85
TJB
11119
11120
11121
11122# Check whether --with-python or --without-python was given.
11123if test "${with_python+set}" = set; then
11124 withval="$with_python"
11125
11126else
11127 with_python=auto
11128fi;
11129echo "$as_me:$LINENO: checking whether to use python" >&5
11130echo $ECHO_N "checking whether to use python... $ECHO_C" >&6
11131echo "$as_me:$LINENO: result: $with_python" >&5
11132echo "${ECHO_T}$with_python" >&6
11133
11134if test "${with_python}" = no; then
11135 { echo "$as_me:$LINENO: WARNING: python support disabled; some features may be unavailable." >&5
11136echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11137 have_libpython=no
11138else
11139 case "${with_python}" in
11140 yes | auto)
11141 # Leave as empty, use defaults.
11142 python_includes=
11143 python_libs=
11144 ;;
11145 /*)
11146 python_includes="-I${with_python}/include"
11147 python_libs="-L${with_python}/lib"
11148 ;;
11149 *)
11150 { { echo "$as_me:$LINENO: error: invalid value for --with-python" >&5
11151echo "$as_me: error: invalid value for --with-python" >&2;}
11152 { (exit 1); exit 1; }; }
11153 ;;
11154 esac
11155
11156 save_CPPFLAGS=$CPPFLAGS
11157 CPPFLAGS="$CPPFLAGS ${python_includes}"
11158 save_LIBS=$LIBS
11159 LIBS="$LIBS ${python_libs}"
11160 have_libpython=no
11161 if test "${have_libpython}" = no; then
11162
11163 version=python2.6
11164
11165
11166 HAVE_LIBPYTHON2_6=no
11167 echo "$as_me:$LINENO: checking for ${version}" >&5
11168echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11169 save_LIBS=$LIBS
11170 LIBS="$LIBS -l${version}"
11171 cat >conftest.$ac_ext <<_ACEOF
11172/* confdefs.h. */
11173_ACEOF
11174cat confdefs.h >>conftest.$ac_ext
11175cat >>conftest.$ac_ext <<_ACEOF
11176/* end confdefs.h. */
11177#include "${version}/Python.h"
11178int
11179main ()
11180{
11181Py_Initialize ();
11182 ;
11183 return 0;
11184}
11185_ACEOF
11186rm -f conftest.$ac_objext conftest$ac_exeext
11187if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11188 (eval $ac_link) 2>conftest.er1
11189 ac_status=$?
11190 grep -v '^ *+' conftest.er1 >conftest.err
11191 rm -f conftest.er1
11192 cat conftest.err >&5
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); } &&
11195 { ac_try='test -z "$ac_c_werror_flag"
11196 || test ! -s conftest.err'
11197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11198 (eval $ac_try) 2>&5
11199 ac_status=$?
11200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11201 (exit $ac_status); }; } &&
11202 { ac_try='test -s conftest$ac_exeext'
11203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11204 (eval $ac_try) 2>&5
11205 ac_status=$?
11206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11207 (exit $ac_status); }; }; then
11208 HAVE_LIBPYTHON2_6=yes
11209 have_libpython=yes
11210else
11211 echo "$as_me: failed program was:" >&5
11212sed 's/^/| /' conftest.$ac_ext >&5
11213
11214LIBS=$save_LIBS
11215fi
11216rm -f conftest.err conftest.$ac_objext \
11217 conftest$ac_exeext conftest.$ac_ext
11218 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_6" >&5
11219echo "${ECHO_T}$HAVE_LIBPYTHON2_6" >&6
11220
11221 if test "${HAVE_LIBPYTHON2_6}" = yes; then
11222
11223cat >>confdefs.h <<\_ACEOF
11224#define HAVE_LIBPYTHON2_6 1
11225_ACEOF
11226
11227 fi
11228 fi
11229 if test ${have_libpython} = no; then
11230
11231 version=python2.5
11232
11233
11234 HAVE_LIBPYTHON2_5=no
11235 echo "$as_me:$LINENO: checking for ${version}" >&5
11236echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11237 save_LIBS=$LIBS
11238 LIBS="$LIBS -l${version}"
11239 cat >conftest.$ac_ext <<_ACEOF
11240/* confdefs.h. */
11241_ACEOF
11242cat confdefs.h >>conftest.$ac_ext
11243cat >>conftest.$ac_ext <<_ACEOF
11244/* end confdefs.h. */
11245#include "${version}/Python.h"
11246int
11247main ()
11248{
11249Py_Initialize ();
11250 ;
11251 return 0;
11252}
11253_ACEOF
11254rm -f conftest.$ac_objext conftest$ac_exeext
11255if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11256 (eval $ac_link) 2>conftest.er1
11257 ac_status=$?
11258 grep -v '^ *+' conftest.er1 >conftest.err
11259 rm -f conftest.er1
11260 cat conftest.err >&5
11261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11262 (exit $ac_status); } &&
11263 { ac_try='test -z "$ac_c_werror_flag"
11264 || test ! -s conftest.err'
11265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11266 (eval $ac_try) 2>&5
11267 ac_status=$?
11268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11269 (exit $ac_status); }; } &&
11270 { ac_try='test -s conftest$ac_exeext'
11271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11272 (eval $ac_try) 2>&5
11273 ac_status=$?
11274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11275 (exit $ac_status); }; }; then
11276 HAVE_LIBPYTHON2_5=yes
11277 have_libpython=yes
11278else
11279 echo "$as_me: failed program was:" >&5
11280sed 's/^/| /' conftest.$ac_ext >&5
11281
11282LIBS=$save_LIBS
11283fi
11284rm -f conftest.err conftest.$ac_objext \
11285 conftest$ac_exeext conftest.$ac_ext
11286 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_5" >&5
11287echo "${ECHO_T}$HAVE_LIBPYTHON2_5" >&6
11288
11289 if test "${HAVE_LIBPYTHON2_5}" = yes; then
11290
11291cat >>confdefs.h <<\_ACEOF
11292#define HAVE_LIBPYTHON2_5 1
11293_ACEOF
11294
11295 fi
11296 fi
11297 if test ${have_libpython} = no; then
11298
11299 version=python2.4
11300
11301
11302 HAVE_LIBPYTHON2_4=no
11303 echo "$as_me:$LINENO: checking for ${version}" >&5
11304echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11305 save_LIBS=$LIBS
11306 LIBS="$LIBS -l${version}"
11307 cat >conftest.$ac_ext <<_ACEOF
11308/* confdefs.h. */
11309_ACEOF
11310cat confdefs.h >>conftest.$ac_ext
11311cat >>conftest.$ac_ext <<_ACEOF
11312/* end confdefs.h. */
11313#include "${version}/Python.h"
11314int
11315main ()
11316{
11317Py_Initialize ();
11318 ;
11319 return 0;
11320}
11321_ACEOF
11322rm -f conftest.$ac_objext conftest$ac_exeext
11323if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11324 (eval $ac_link) 2>conftest.er1
11325 ac_status=$?
11326 grep -v '^ *+' conftest.er1 >conftest.err
11327 rm -f conftest.er1
11328 cat conftest.err >&5
11329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11330 (exit $ac_status); } &&
11331 { ac_try='test -z "$ac_c_werror_flag"
11332 || test ! -s conftest.err'
11333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11334 (eval $ac_try) 2>&5
11335 ac_status=$?
11336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11337 (exit $ac_status); }; } &&
11338 { ac_try='test -s conftest$ac_exeext'
11339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11340 (eval $ac_try) 2>&5
11341 ac_status=$?
11342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11343 (exit $ac_status); }; }; then
11344 HAVE_LIBPYTHON2_4=yes
11345 have_libpython=yes
11346else
11347 echo "$as_me: failed program was:" >&5
11348sed 's/^/| /' conftest.$ac_ext >&5
11349
11350LIBS=$save_LIBS
11351fi
11352rm -f conftest.err conftest.$ac_objext \
11353 conftest$ac_exeext conftest.$ac_ext
11354 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_4" >&5
11355echo "${ECHO_T}$HAVE_LIBPYTHON2_4" >&6
11356
11357 if test "${HAVE_LIBPYTHON2_4}" = yes; then
11358
11359cat >>confdefs.h <<\_ACEOF
11360#define HAVE_LIBPYTHON2_4 1
11361_ACEOF
11362
11363 fi
11364 fi
11365 if test ${have_libpython} = no; then
11366 case "${with_python}" in
11367 yes)
11368 { { echo "$as_me:$LINENO: error: python is missing or unusable" >&5
11369echo "$as_me: error: python is missing or unusable" >&2;}
11370 { (exit 1); exit 1; }; }
11371 ;;
11372 auto)
11373 { echo "$as_me:$LINENO: WARNING: python is missing or unusable; some features may be unavailable." >&5
11374echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11375 ;;
11376 *)
11377 { { echo "$as_me:$LINENO: error: no usable python found at ${with_python}" >&5
11378echo "$as_me: error: no usable python found at ${with_python}" >&2;}
11379 { (exit 1); exit 1; }; }
11380 ;;
11381 esac
11382 CPPFLAGS=$save_CPPFLAGS
11383 LIBS=$save_LIBS
11384 fi
11385fi
11386
11387if test "${have_libpython}" = yes; then
11388
11389cat >>confdefs.h <<\_ACEOF
11390#define HAVE_PYTHON 1
11391_ACEOF
11392
11393 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11394 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11395 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11396 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11397
11398 # Flags needed to compile Python code (taken from python-config --cflags).
11399 # We cannot call python-config directly because it will output whatever was
11400 # used when compiling the Python interpreter itself, including flags which
11401 # would make the python-related objects be compiled differently from the
11402 # rest of GDB (e.g., -O2 and -fPIC).
11403 if test "${GCC}" = yes; then
11404 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11405 fi
11406
11407 if test "x${tentative_python_cflags}" != x; then
11408 echo "$as_me:$LINENO: checking compiler flags for python code" >&5
11409echo $ECHO_N "checking compiler flags for python code... $ECHO_C" >&6
11410 for flag in ${tentative_python_cflags}; do
11411 # Check that the compiler accepts it
11412 saved_CFLAGS="$CFLAGS"
11413 CFLAGS="$CFLAGS $flag"
11414 cat >conftest.$ac_ext <<_ACEOF
11415/* confdefs.h. */
11416_ACEOF
11417cat confdefs.h >>conftest.$ac_ext
11418cat >>conftest.$ac_ext <<_ACEOF
11419/* end confdefs.h. */
11420
11421int
11422main ()
11423{
11424
11425 ;
11426 return 0;
11427}
11428_ACEOF
11429rm -f conftest.$ac_objext
11430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11431 (eval $ac_compile) 2>conftest.er1
11432 ac_status=$?
11433 grep -v '^ *+' conftest.er1 >conftest.err
11434 rm -f conftest.er1
11435 cat conftest.err >&5
11436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11437 (exit $ac_status); } &&
11438 { ac_try='test -z "$ac_c_werror_flag"
11439 || test ! -s conftest.err'
11440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11441 (eval $ac_try) 2>&5
11442 ac_status=$?
11443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11444 (exit $ac_status); }; } &&
11445 { ac_try='test -s conftest.$ac_objext'
11446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11447 (eval $ac_try) 2>&5
11448 ac_status=$?
11449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11450 (exit $ac_status); }; }; then
11451 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11452else
11453 echo "$as_me: failed program was:" >&5
11454sed 's/^/| /' conftest.$ac_ext >&5
11455
11456fi
11457rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11458 CFLAGS="$saved_CFLAGS"
11459 done
11460 echo "$as_me:$LINENO: result: ${PYTHON_CFLAGS}" >&5
11461echo "${ECHO_T}${PYTHON_CFLAGS}" >&6
11462 fi
11463else
a08702d6 11464 # Even if Python support is not compiled in, we need to have these files
d57a3c85 11465 # included in order to recognize the GDB command "python".
a08702d6
TJB
11466 CONFIG_OBS="$CONFIG_OBS python.o python-value.o"
11467 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c"
d57a3c85
TJB
11468fi
11469
11470
bec39cab
AC
11471# ------------------------- #
11472# Checks for header files. #
11473# ------------------------- #
8ee53726 11474
0e5d83e3 11475
bec39cab
AC
11476
11477
11478
11479
11480ac_header_dirent=no
11481for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11482 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
b4e70030
JB
11483echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
11484echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11485if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
11486 echo $ECHO_N "(cached) $ECHO_C" >&6
11487else
11488 cat >conftest.$ac_ext <<_ACEOF
11489/* confdefs.h. */
11490_ACEOF
11491cat confdefs.h >>conftest.$ac_ext
11492cat >>conftest.$ac_ext <<_ACEOF
11493/* end confdefs.h. */
11494#include <sys/types.h>
0e5d83e3 11495#include <$ac_hdr>
bec39cab
AC
11496
11497int
11498main ()
11499{
11500if ((DIR *) 0)
11501return 0;
11502 ;
11503 return 0;
11504}
11505_ACEOF
11506rm -f conftest.$ac_objext
11507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11508 (eval $ac_compile) 2>conftest.er1
11509 ac_status=$?
11510 grep -v '^ *+' conftest.er1 >conftest.err
11511 rm -f conftest.er1
11512 cat conftest.err >&5
11513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11514 (exit $ac_status); } &&
b4e70030
JB
11515 { ac_try='test -z "$ac_c_werror_flag"
11516 || test ! -s conftest.err'
bec39cab
AC
11517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11518 (eval $ac_try) 2>&5
11519 ac_status=$?
11520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11521 (exit $ac_status); }; } &&
11522 { ac_try='test -s conftest.$ac_objext'
11523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11524 (eval $ac_try) 2>&5
11525 ac_status=$?
11526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11527 (exit $ac_status); }; }; then
11528 eval "$as_ac_Header=yes"
11529else
11530 echo "$as_me: failed program was:" >&5
11531sed 's/^/| /' conftest.$ac_ext >&5
11532
b4e70030 11533eval "$as_ac_Header=no"
bec39cab
AC
11534fi
11535rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11536fi
b4e70030
JB
11537echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11538echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
11539if test `eval echo '${'$as_ac_Header'}'` = yes; then
11540 cat >>confdefs.h <<_ACEOF
11541#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11542_ACEOF
11543
11544ac_header_dirent=$ac_hdr; break
0e5d83e3 11545fi
0e5d83e3 11546
bec39cab
AC
11547done
11548# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11549if test $ac_header_dirent = dirent.h; then
b4e70030
JB
11550 echo "$as_me:$LINENO: checking for library containing opendir" >&5
11551echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
11552if test "${ac_cv_search_opendir+set}" = set; then
11553 echo $ECHO_N "(cached) $ECHO_C" >&6
11554else
11555 ac_func_search_save_LIBS=$LIBS
b4e70030 11556ac_cv_search_opendir=no
bec39cab
AC
11557cat >conftest.$ac_ext <<_ACEOF
11558/* confdefs.h. */
11559_ACEOF
11560cat confdefs.h >>conftest.$ac_ext
11561cat >>conftest.$ac_ext <<_ACEOF
11562/* end confdefs.h. */
0e5d83e3 11563
b4e70030 11564/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
11565#ifdef __cplusplus
11566extern "C"
11567#endif
b4e70030
JB
11568/* We use char because int might match the return type of a gcc2
11569 builtin and then its argument prototype would still apply. */
bec39cab
AC
11570char opendir ();
11571int
11572main ()
11573{
b4e70030 11574opendir ();
bec39cab
AC
11575 ;
11576 return 0;
11577}
11578_ACEOF
b4e70030 11579rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
11580if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11581 (eval $ac_link) 2>conftest.er1
11582 ac_status=$?
11583 grep -v '^ *+' conftest.er1 >conftest.err
11584 rm -f conftest.er1
11585 cat conftest.err >&5
11586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11587 (exit $ac_status); } &&
b4e70030
JB
11588 { ac_try='test -z "$ac_c_werror_flag"
11589 || test ! -s conftest.err'
bec39cab
AC
11590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11591 (eval $ac_try) 2>&5
11592 ac_status=$?
11593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11594 (exit $ac_status); }; } &&
11595 { ac_try='test -s conftest$ac_exeext'
11596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11597 (eval $ac_try) 2>&5
11598 ac_status=$?
11599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11600 (exit $ac_status); }; }; then
b4e70030 11601 ac_cv_search_opendir="none required"
bec39cab
AC
11602else
11603 echo "$as_me: failed program was:" >&5
11604sed 's/^/| /' conftest.$ac_ext >&5
11605
11606fi
bec39cab 11607rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
11608 conftest$ac_exeext conftest.$ac_ext
11609if test "$ac_cv_search_opendir" = no; then
11610 for ac_lib in dir; do
11611 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11612 cat >conftest.$ac_ext <<_ACEOF
11613/* confdefs.h. */
11614_ACEOF
11615cat confdefs.h >>conftest.$ac_ext
11616cat >>conftest.$ac_ext <<_ACEOF
11617/* end confdefs.h. */
11618
11619/* Override any gcc2 internal prototype to avoid an error. */
11620#ifdef __cplusplus
11621extern "C"
11622#endif
11623/* We use char because int might match the return type of a gcc2
11624 builtin and then its argument prototype would still apply. */
11625char opendir ();
11626int
11627main ()
11628{
11629opendir ();
11630 ;
11631 return 0;
11632}
11633_ACEOF
11634rm -f conftest.$ac_objext conftest$ac_exeext
11635if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11636 (eval $ac_link) 2>conftest.er1
11637 ac_status=$?
11638 grep -v '^ *+' conftest.er1 >conftest.err
11639 rm -f conftest.er1
11640 cat conftest.err >&5
11641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11642 (exit $ac_status); } &&
11643 { ac_try='test -z "$ac_c_werror_flag"
11644 || test ! -s conftest.err'
11645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11646 (eval $ac_try) 2>&5
11647 ac_status=$?
11648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11649 (exit $ac_status); }; } &&
11650 { ac_try='test -s conftest$ac_exeext'
11651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11652 (eval $ac_try) 2>&5
11653 ac_status=$?
11654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11655 (exit $ac_status); }; }; then
11656 ac_cv_search_opendir="-l$ac_lib"
11657break
4e8d927d 11658else
b4e70030
JB
11659 echo "$as_me: failed program was:" >&5
11660sed 's/^/| /' conftest.$ac_ext >&5
11661
11662fi
11663rm -f conftest.err conftest.$ac_objext \
11664 conftest$ac_exeext conftest.$ac_ext
11665 done
0e5d83e3 11666fi
bec39cab 11667LIBS=$ac_func_search_save_LIBS
0e5d83e3 11668fi
b4e70030
JB
11669echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
11670echo "${ECHO_T}$ac_cv_search_opendir" >&6
11671if test "$ac_cv_search_opendir" != no; then
11672 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
0e5d83e3 11673
0e5d83e3
JJ
11674fi
11675
d28f9cdf 11676else
b4e70030
JB
11677 echo "$as_me:$LINENO: checking for library containing opendir" >&5
11678echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
11679if test "${ac_cv_search_opendir+set}" = set; then
11680 echo $ECHO_N "(cached) $ECHO_C" >&6
11681else
11682 ac_func_search_save_LIBS=$LIBS
b4e70030 11683ac_cv_search_opendir=no
bec39cab
AC
11684cat >conftest.$ac_ext <<_ACEOF
11685/* confdefs.h. */
11686_ACEOF
11687cat confdefs.h >>conftest.$ac_ext
11688cat >>conftest.$ac_ext <<_ACEOF
11689/* end confdefs.h. */
d28f9cdf 11690
b4e70030 11691/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
11692#ifdef __cplusplus
11693extern "C"
d28f9cdf 11694#endif
b4e70030
JB
11695/* We use char because int might match the return type of a gcc2
11696 builtin and then its argument prototype would still apply. */
bec39cab
AC
11697char opendir ();
11698int
11699main ()
11700{
b4e70030 11701opendir ();
bec39cab
AC
11702 ;
11703 return 0;
11704}
11705_ACEOF
b4e70030 11706rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
11707if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11708 (eval $ac_link) 2>conftest.er1
11709 ac_status=$?
11710 grep -v '^ *+' conftest.er1 >conftest.err
11711 rm -f conftest.er1
11712 cat conftest.err >&5
11713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11714 (exit $ac_status); } &&
b4e70030
JB
11715 { ac_try='test -z "$ac_c_werror_flag"
11716 || test ! -s conftest.err'
bec39cab
AC
11717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11718 (eval $ac_try) 2>&5
11719 ac_status=$?
11720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11721 (exit $ac_status); }; } &&
11722 { ac_try='test -s conftest$ac_exeext'
11723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11724 (eval $ac_try) 2>&5
11725 ac_status=$?
11726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11727 (exit $ac_status); }; }; then
b4e70030 11728 ac_cv_search_opendir="none required"
d28f9cdf 11729else
bec39cab
AC
11730 echo "$as_me: failed program was:" >&5
11731sed 's/^/| /' conftest.$ac_ext >&5
11732
d28f9cdf 11733fi
bec39cab 11734rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
11735 conftest$ac_exeext conftest.$ac_ext
11736if test "$ac_cv_search_opendir" = no; then
11737 for ac_lib in x; do
11738 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11739 cat >conftest.$ac_ext <<_ACEOF
11740/* confdefs.h. */
11741_ACEOF
11742cat confdefs.h >>conftest.$ac_ext
11743cat >>conftest.$ac_ext <<_ACEOF
11744/* end confdefs.h. */
11745
11746/* Override any gcc2 internal prototype to avoid an error. */
11747#ifdef __cplusplus
11748extern "C"
11749#endif
11750/* We use char because int might match the return type of a gcc2
11751 builtin and then its argument prototype would still apply. */
11752char opendir ();
11753int
11754main ()
11755{
11756opendir ();
11757 ;
11758 return 0;
11759}
11760_ACEOF
11761rm -f conftest.$ac_objext conftest$ac_exeext
11762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11763 (eval $ac_link) 2>conftest.er1
11764 ac_status=$?
11765 grep -v '^ *+' conftest.er1 >conftest.err
11766 rm -f conftest.er1
11767 cat conftest.err >&5
11768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11769 (exit $ac_status); } &&
11770 { ac_try='test -z "$ac_c_werror_flag"
11771 || test ! -s conftest.err'
11772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11773 (eval $ac_try) 2>&5
11774 ac_status=$?
11775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11776 (exit $ac_status); }; } &&
11777 { ac_try='test -s conftest$ac_exeext'
11778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11779 (eval $ac_try) 2>&5
11780 ac_status=$?
11781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11782 (exit $ac_status); }; }; then
11783 ac_cv_search_opendir="-l$ac_lib"
11784break
4e8d927d 11785else
b4e70030
JB
11786 echo "$as_me: failed program was:" >&5
11787sed 's/^/| /' conftest.$ac_ext >&5
11788
11789fi
11790rm -f conftest.err conftest.$ac_objext \
11791 conftest$ac_exeext conftest.$ac_ext
11792 done
bec39cab
AC
11793fi
11794LIBS=$ac_func_search_save_LIBS
d28f9cdf 11795fi
b4e70030
JB
11796echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
11797echo "${ECHO_T}$ac_cv_search_opendir" >&6
11798if test "$ac_cv_search_opendir" != no; then
11799 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
d28f9cdf 11800
d28f9cdf
DJ
11801fi
11802
bec39cab 11803fi
b0b1c2c0 11804
b4e70030
JB
11805echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
11806echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
bec39cab
AC
11807if test "${ac_cv_header_stat_broken+set}" = set; then
11808 echo $ECHO_N "(cached) $ECHO_C" >&6
b0b1c2c0 11809else
bec39cab
AC
11810 cat >conftest.$ac_ext <<_ACEOF
11811/* confdefs.h. */
11812_ACEOF
11813cat confdefs.h >>conftest.$ac_ext
11814cat >>conftest.$ac_ext <<_ACEOF
11815/* end confdefs.h. */
11816#include <sys/types.h>
11817#include <sys/stat.h>
b0b1c2c0 11818
b4e70030 11819#if defined(S_ISBLK) && defined(S_IFDIR)
bec39cab
AC
11820# if S_ISBLK (S_IFDIR)
11821You lose.
11822# endif
11823#endif
b0b1c2c0 11824
b4e70030 11825#if defined(S_ISBLK) && defined(S_IFCHR)
bec39cab
AC
11826# if S_ISBLK (S_IFCHR)
11827You lose.
11828# endif
11829#endif
d28f9cdf 11830
b4e70030 11831#if defined(S_ISLNK) && defined(S_IFREG)
bec39cab
AC
11832# if S_ISLNK (S_IFREG)
11833You lose.
11834# endif
11835#endif
d28f9cdf 11836
b4e70030 11837#if defined(S_ISSOCK) && defined(S_IFREG)
bec39cab
AC
11838# if S_ISSOCK (S_IFREG)
11839You lose.
11840# endif
11841#endif
11842
11843_ACEOF
11844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11845 $EGREP "You lose" >/dev/null 2>&1; then
11846 ac_cv_header_stat_broken=yes
d28f9cdf 11847else
bec39cab 11848 ac_cv_header_stat_broken=no
d28f9cdf
DJ
11849fi
11850rm -f conftest*
d28f9cdf 11851
d28f9cdf 11852fi
b4e70030
JB
11853echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
11854echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
bec39cab 11855if test $ac_cv_header_stat_broken = yes; then
d28f9cdf 11856
bec39cab
AC
11857cat >>confdefs.h <<\_ACEOF
11858#define STAT_MACROS_BROKEN 1
11859_ACEOF
8bb2c122 11860
7a292a7a 11861fi
bec39cab 11862
b4e70030
JB
11863echo "$as_me:$LINENO: checking for ANSI C header files" >&5
11864echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
bec39cab
AC
11865if test "${ac_cv_header_stdc+set}" = set; then
11866 echo $ECHO_N "(cached) $ECHO_C" >&6
7a292a7a 11867else
bec39cab
AC
11868 cat >conftest.$ac_ext <<_ACEOF
11869/* confdefs.h. */
11870_ACEOF
11871cat confdefs.h >>conftest.$ac_ext
11872cat >>conftest.$ac_ext <<_ACEOF
11873/* end confdefs.h. */
11874#include <stdlib.h>
11875#include <stdarg.h>
11876#include <string.h>
11877#include <float.h>
7a292a7a 11878
bec39cab
AC
11879int
11880main ()
11881{
7a292a7a 11882
bec39cab
AC
11883 ;
11884 return 0;
11885}
11886_ACEOF
11887rm -f conftest.$ac_objext
11888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11889 (eval $ac_compile) 2>conftest.er1
11890 ac_status=$?
11891 grep -v '^ *+' conftest.er1 >conftest.err
11892 rm -f conftest.er1
11893 cat conftest.err >&5
11894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11895 (exit $ac_status); } &&
b4e70030
JB
11896 { ac_try='test -z "$ac_c_werror_flag"
11897 || test ! -s conftest.err'
bec39cab
AC
11898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11899 (eval $ac_try) 2>&5
11900 ac_status=$?
11901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11902 (exit $ac_status); }; } &&
11903 { ac_try='test -s conftest.$ac_objext'
11904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11905 (eval $ac_try) 2>&5
11906 ac_status=$?
11907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11908 (exit $ac_status); }; }; then
11909 ac_cv_header_stdc=yes
c906108c 11910else
bec39cab
AC
11911 echo "$as_me: failed program was:" >&5
11912sed 's/^/| /' conftest.$ac_ext >&5
c906108c 11913
b4e70030 11914ac_cv_header_stdc=no
c906108c 11915fi
bec39cab 11916rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11917
bec39cab
AC
11918if test $ac_cv_header_stdc = yes; then
11919 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11920 cat >conftest.$ac_ext <<_ACEOF
11921/* confdefs.h. */
11922_ACEOF
11923cat confdefs.h >>conftest.$ac_ext
11924cat >>conftest.$ac_ext <<_ACEOF
11925/* end confdefs.h. */
11926#include <string.h>
c906108c 11927
bec39cab
AC
11928_ACEOF
11929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11930 $EGREP "memchr" >/dev/null 2>&1; then
11931 :
8bb2c122 11932else
bec39cab 11933 ac_cv_header_stdc=no
8bb2c122 11934fi
bec39cab
AC
11935rm -f conftest*
11936
c906108c
SS
11937fi
11938
bec39cab
AC
11939if test $ac_cv_header_stdc = yes; then
11940 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11941 cat >conftest.$ac_ext <<_ACEOF
11942/* confdefs.h. */
11943_ACEOF
11944cat confdefs.h >>conftest.$ac_ext
11945cat >>conftest.$ac_ext <<_ACEOF
11946/* end confdefs.h. */
11947#include <stdlib.h>
11948
11949_ACEOF
11950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11951 $EGREP "free" >/dev/null 2>&1; then
11952 :
c906108c 11953else
bec39cab 11954 ac_cv_header_stdc=no
c906108c 11955fi
bec39cab
AC
11956rm -f conftest*
11957
c906108c
SS
11958fi
11959
bec39cab
AC
11960if test $ac_cv_header_stdc = yes; then
11961 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11962 if test "$cross_compiling" = yes; then
11963 :
c906108c 11964else
bec39cab
AC
11965 cat >conftest.$ac_ext <<_ACEOF
11966/* confdefs.h. */
11967_ACEOF
11968cat confdefs.h >>conftest.$ac_ext
11969cat >>conftest.$ac_ext <<_ACEOF
11970/* end confdefs.h. */
11971#include <ctype.h>
11972#if ((' ' & 0x0FF) == 0x020)
11973# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11974# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11975#else
11976# define ISLOWER(c) \
11977 (('a' <= (c) && (c) <= 'i') \
11978 || ('j' <= (c) && (c) <= 'r') \
11979 || ('s' <= (c) && (c) <= 'z'))
11980# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11981#endif
11982
11983#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11984int
11985main ()
11986{
11987 int i;
11988 for (i = 0; i < 256; i++)
11989 if (XOR (islower (i), ISLOWER (i))
11990 || toupper (i) != TOUPPER (i))
b4e70030
JB
11991 exit(2);
11992 exit (0);
bec39cab
AC
11993}
11994_ACEOF
11995rm -f conftest$ac_exeext
11996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11997 (eval $ac_link) 2>&5
11998 ac_status=$?
11999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12002 (eval $ac_try) 2>&5
12003 ac_status=$?
12004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12005 (exit $ac_status); }; }; then
12006 :
12007else
12008 echo "$as_me: program exited with status $ac_status" >&5
12009echo "$as_me: failed program was:" >&5
12010sed 's/^/| /' conftest.$ac_ext >&5
12011
12012( exit $ac_status )
12013ac_cv_header_stdc=no
c906108c 12014fi
b4e70030 12015rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 12016fi
c906108c 12017fi
bec39cab 12018fi
b4e70030
JB
12019echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
12020echo "${ECHO_T}$ac_cv_header_stdc" >&6
bec39cab 12021if test $ac_cv_header_stdc = yes; then
c906108c 12022
bec39cab
AC
12023cat >>confdefs.h <<\_ACEOF
12024#define STDC_HEADERS 1
12025_ACEOF
c906108c 12026
bec39cab 12027fi
8bb2c122 12028
a9322a30
TT
12029# elf_hp.h is for HP/UX 64-bit shared library support.
12030# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
12031# unconditionally, so what's the point in checking these?
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
bec39cab 12049
a9322a30
TT
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
a8111142 12066
a9322a30
TT
12067
12068
12069for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12070 thread_db.h gnu/libc-version.h signal.h stddef.h \
12071 stdlib.h string.h memory.h strings.h sys/fault.h \
12072 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12073 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12074 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
12075 sys/types.h sys/wait.h wait.h termios.h termio.h \
a8111142 12076 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
bec39cab
AC
12077do
12078as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12079if eval "test \"\${$as_ac_Header+set}\" = set"; then
12080 echo "$as_me:$LINENO: checking for $ac_header" >&5
12081echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12082if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
12083 echo $ECHO_N "(cached) $ECHO_C" >&6
12084fi
b4e70030
JB
12085echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12086echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12087else
12088 # Is the header compilable?
b4e70030
JB
12089echo "$as_me:$LINENO: checking $ac_header usability" >&5
12090echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
12091cat >conftest.$ac_ext <<_ACEOF
12092/* confdefs.h. */
12093_ACEOF
12094cat confdefs.h >>conftest.$ac_ext
12095cat >>conftest.$ac_ext <<_ACEOF
12096/* end confdefs.h. */
12097$ac_includes_default
12098#include <$ac_header>
12099_ACEOF
12100rm -f conftest.$ac_objext
12101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12102 (eval $ac_compile) 2>conftest.er1
12103 ac_status=$?
12104 grep -v '^ *+' conftest.er1 >conftest.err
12105 rm -f conftest.er1
12106 cat conftest.err >&5
12107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12108 (exit $ac_status); } &&
b4e70030
JB
12109 { ac_try='test -z "$ac_c_werror_flag"
12110 || test ! -s conftest.err'
bec39cab
AC
12111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12112 (eval $ac_try) 2>&5
12113 ac_status=$?
12114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115 (exit $ac_status); }; } &&
12116 { ac_try='test -s conftest.$ac_objext'
12117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12118 (eval $ac_try) 2>&5
12119 ac_status=$?
12120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12121 (exit $ac_status); }; }; then
12122 ac_header_compiler=yes
12123else
12124 echo "$as_me: failed program was:" >&5
12125sed 's/^/| /' conftest.$ac_ext >&5
12126
b4e70030 12127ac_header_compiler=no
bec39cab
AC
12128fi
12129rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
12130echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12131echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
12132
12133# Is the header present?
b4e70030
JB
12134echo "$as_me:$LINENO: checking $ac_header presence" >&5
12135echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
12136cat >conftest.$ac_ext <<_ACEOF
12137/* confdefs.h. */
12138_ACEOF
12139cat confdefs.h >>conftest.$ac_ext
12140cat >>conftest.$ac_ext <<_ACEOF
12141/* end confdefs.h. */
12142#include <$ac_header>
12143_ACEOF
12144if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12145 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12146 ac_status=$?
12147 grep -v '^ *+' conftest.er1 >conftest.err
12148 rm -f conftest.er1
12149 cat conftest.err >&5
12150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12151 (exit $ac_status); } >/dev/null; then
12152 if test -s conftest.err; then
12153 ac_cpp_err=$ac_c_preproc_warn_flag
12154 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12155 else
12156 ac_cpp_err=
12157 fi
c906108c 12158else
bec39cab 12159 ac_cpp_err=yes
c906108c 12160fi
bec39cab
AC
12161if test -z "$ac_cpp_err"; then
12162 ac_header_preproc=yes
c906108c 12163else
bec39cab
AC
12164 echo "$as_me: failed program was:" >&5
12165sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 12166
bec39cab
AC
12167 ac_header_preproc=no
12168fi
12169rm -f conftest.err conftest.$ac_ext
b4e70030
JB
12170echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12171echo "${ECHO_T}$ac_header_preproc" >&6
c906108c 12172
bec39cab
AC
12173# So? What about this header?
12174case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12175 yes:no: )
12176 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12177echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12178 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12179echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12180 ac_header_preproc=yes
12181 ;;
12182 no:yes:* )
12183 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12184echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12185 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12186echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12187 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12188echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12189 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12190echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12191 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12192echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12193 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12194echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
12195 (
12196 cat <<\_ASBOX
12197## ------------------------------------------ ##
12198## Report this to the AC_PACKAGE_NAME lists. ##
12199## ------------------------------------------ ##
12200_ASBOX
12201 ) |
12202 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
12203 ;;
12204esac
b4e70030
JB
12205echo "$as_me:$LINENO: checking for $ac_header" >&5
12206echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12207if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12208 echo $ECHO_N "(cached) $ECHO_C" >&6
95ca63c4 12209else
bec39cab 12210 eval "$as_ac_Header=\$ac_header_preproc"
95ca63c4 12211fi
b4e70030
JB
12212echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12213echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 12214
95ca63c4 12215fi
bec39cab
AC
12216if test `eval echo '${'$as_ac_Header'}'` = yes; then
12217 cat >>confdefs.h <<_ACEOF
12218#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12219_ACEOF
12220
95ca63c4
CF
12221fi
12222
bec39cab 12223done
95ca63c4
CF
12224
12225
7cb9022a 12226for ac_header in link.h
bec39cab
AC
12227do
12228as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12229echo "$as_me:$LINENO: checking for $ac_header" >&5
12230echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12231if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12232 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12233else
7cb9022a 12234 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12235/* confdefs.h. */
12236_ACEOF
12237cat confdefs.h >>conftest.$ac_ext
12238cat >>conftest.$ac_ext <<_ACEOF
12239/* end confdefs.h. */
7cb9022a
MK
12240#if HAVE_SYS_TYPES_H
12241# include <sys/types.h>
12242#endif
12243#if HAVE_NLIST_H
12244# include <nlist.h>
12245#endif
12246
12247
bec39cab
AC
12248#include <$ac_header>
12249_ACEOF
12250rm -f conftest.$ac_objext
12251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12252 (eval $ac_compile) 2>conftest.er1
12253 ac_status=$?
12254 grep -v '^ *+' conftest.er1 >conftest.err
12255 rm -f conftest.er1
12256 cat conftest.err >&5
12257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12258 (exit $ac_status); } &&
b4e70030
JB
12259 { ac_try='test -z "$ac_c_werror_flag"
12260 || test ! -s conftest.err'
bec39cab
AC
12261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12262 (eval $ac_try) 2>&5
12263 ac_status=$?
12264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12265 (exit $ac_status); }; } &&
12266 { ac_try='test -s conftest.$ac_objext'
12267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12268 (eval $ac_try) 2>&5
12269 ac_status=$?
12270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12271 (exit $ac_status); }; }; then
7cb9022a 12272 eval "$as_ac_Header=yes"
bec39cab
AC
12273else
12274 echo "$as_me: failed program was:" >&5
12275sed 's/^/| /' conftest.$ac_ext >&5
12276
b4e70030 12277eval "$as_ac_Header=no"
bec39cab
AC
12278fi
12279rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12280fi
b4e70030
JB
12281echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12282echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12283if test `eval echo '${'$as_ac_Header'}'` = yes; then
12284 cat >>confdefs.h <<_ACEOF
12285#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12286_ACEOF
95ca63c4 12287
bec39cab 12288fi
95ca63c4 12289
bec39cab 12290done
95ca63c4 12291
c906108c 12292
a9322a30 12293for ac_header in sys/proc.h
bec39cab
AC
12294do
12295as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a9322a30 12296echo "$as_me:$LINENO: checking for $ac_header" >&5
b4e70030
JB
12297echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12298if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12299 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12300else
a9322a30 12301 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12302/* confdefs.h. */
12303_ACEOF
12304cat confdefs.h >>conftest.$ac_ext
12305cat >>conftest.$ac_ext <<_ACEOF
12306/* end confdefs.h. */
a9322a30
TT
12307#if HAVE_SYS_PARAM_H
12308# include <sys/param.h>
12309#endif
12310
12311
bec39cab
AC
12312#include <$ac_header>
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'
bec39cab
AC
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
a9322a30 12336 eval "$as_ac_Header=yes"
bec39cab
AC
12337else
12338 echo "$as_me: failed program was:" >&5
12339sed 's/^/| /' conftest.$ac_ext >&5
12340
a9322a30 12341eval "$as_ac_Header=no"
bec39cab
AC
12342fi
12343rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12344fi
12345echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12346echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12347if test `eval echo '${'$as_ac_Header'}'` = yes; then
12348 cat >>confdefs.h <<_ACEOF
12349#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12350_ACEOF
bec39cab 12351
a9322a30
TT
12352fi
12353
12354done
12355
12356
12357for ac_header in sys/user.h
12358do
12359as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12360echo "$as_me:$LINENO: checking for $ac_header" >&5
12361echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12362if eval "test \"\${$as_ac_Header+set}\" = set"; then
12363 echo $ECHO_N "(cached) $ECHO_C" >&6
12364else
12365 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12366/* confdefs.h. */
12367_ACEOF
12368cat confdefs.h >>conftest.$ac_ext
12369cat >>conftest.$ac_ext <<_ACEOF
12370/* end confdefs.h. */
a9322a30
TT
12371#if HAVE_SYS_PARAM_H
12372# include <sys/param.h>
12373#endif
12374
12375
bec39cab
AC
12376#include <$ac_header>
12377_ACEOF
a9322a30
TT
12378rm -f conftest.$ac_objext
12379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12380 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
12381 ac_status=$?
12382 grep -v '^ *+' conftest.er1 >conftest.err
12383 rm -f conftest.er1
12384 cat conftest.err >&5
12385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
12386 (exit $ac_status); } &&
12387 { ac_try='test -z "$ac_c_werror_flag"
12388 || test ! -s conftest.err'
12389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12390 (eval $ac_try) 2>&5
12391 ac_status=$?
12392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12393 (exit $ac_status); }; } &&
12394 { ac_try='test -s conftest.$ac_objext'
12395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12396 (eval $ac_try) 2>&5
12397 ac_status=$?
12398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12399 (exit $ac_status); }; }; then
12400 eval "$as_ac_Header=yes"
bec39cab
AC
12401else
12402 echo "$as_me: failed program was:" >&5
12403sed 's/^/| /' conftest.$ac_ext >&5
12404
a9322a30 12405eval "$as_ac_Header=no"
75c6e08a 12406fi
a9322a30
TT
12407rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12408fi
12409echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12410echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12411if test `eval echo '${'$as_ac_Header'}'` = yes; then
12412 cat >>confdefs.h <<_ACEOF
12413#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12414_ACEOF
bec39cab 12415
bec39cab 12416fi
bec39cab 12417
a9322a30
TT
12418done
12419
12420
12421# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
12422# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
12423# think that we don't have <curses.h> if we're using GCC.
12424case $host_os in
12425 solaris2.[789])
12426 if test "$GCC" = yes; then
12427
12428cat >>confdefs.h <<\_ACEOF
12429#define _MSE_INT_H 1
bec39cab 12430_ACEOF
75c6e08a 12431
a9322a30
TT
12432 fi ;;
12433esac
12434
75c6e08a
MK
12435
12436
12437
9a156167 12438
a9322a30 12439for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
bec39cab
AC
12440do
12441as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12442if eval "test \"\${$as_ac_Header+set}\" = set"; then
12443 echo "$as_me:$LINENO: checking for $ac_header" >&5
12444echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12445if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
12446 echo $ECHO_N "(cached) $ECHO_C" >&6
12447fi
b4e70030
JB
12448echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12449echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12450else
12451 # Is the header compilable?
b4e70030
JB
12452echo "$as_me:$LINENO: checking $ac_header usability" >&5
12453echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
12454cat >conftest.$ac_ext <<_ACEOF
12455/* confdefs.h. */
12456_ACEOF
12457cat confdefs.h >>conftest.$ac_ext
12458cat >>conftest.$ac_ext <<_ACEOF
12459/* end confdefs.h. */
12460$ac_includes_default
12461#include <$ac_header>
12462_ACEOF
12463rm -f conftest.$ac_objext
12464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12465 (eval $ac_compile) 2>conftest.er1
12466 ac_status=$?
12467 grep -v '^ *+' conftest.er1 >conftest.err
12468 rm -f conftest.er1
12469 cat conftest.err >&5
12470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12471 (exit $ac_status); } &&
b4e70030
JB
12472 { ac_try='test -z "$ac_c_werror_flag"
12473 || test ! -s conftest.err'
bec39cab
AC
12474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12475 (eval $ac_try) 2>&5
12476 ac_status=$?
12477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12478 (exit $ac_status); }; } &&
12479 { ac_try='test -s conftest.$ac_objext'
12480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12481 (eval $ac_try) 2>&5
12482 ac_status=$?
12483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12484 (exit $ac_status); }; }; then
12485 ac_header_compiler=yes
12486else
12487 echo "$as_me: failed program was:" >&5
12488sed 's/^/| /' conftest.$ac_ext >&5
12489
b4e70030 12490ac_header_compiler=no
bec39cab
AC
12491fi
12492rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
12493echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12494echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
12495
12496# Is the header present?
b4e70030
JB
12497echo "$as_me:$LINENO: checking $ac_header presence" >&5
12498echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
12499cat >conftest.$ac_ext <<_ACEOF
12500/* confdefs.h. */
12501_ACEOF
12502cat confdefs.h >>conftest.$ac_ext
12503cat >>conftest.$ac_ext <<_ACEOF
12504/* end confdefs.h. */
12505#include <$ac_header>
12506_ACEOF
12507if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12508 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12509 ac_status=$?
12510 grep -v '^ *+' conftest.er1 >conftest.err
12511 rm -f conftest.er1
12512 cat conftest.err >&5
12513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12514 (exit $ac_status); } >/dev/null; then
12515 if test -s conftest.err; then
12516 ac_cpp_err=$ac_c_preproc_warn_flag
12517 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12518 else
12519 ac_cpp_err=
12520 fi
9a156167 12521else
bec39cab 12522 ac_cpp_err=yes
9a156167 12523fi
bec39cab
AC
12524if test -z "$ac_cpp_err"; then
12525 ac_header_preproc=yes
12526else
12527 echo "$as_me: failed program was:" >&5
12528sed 's/^/| /' conftest.$ac_ext >&5
9a156167 12529
bec39cab 12530 ac_header_preproc=no
9a156167 12531fi
bec39cab 12532rm -f conftest.err conftest.$ac_ext
b4e70030
JB
12533echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12534echo "${ECHO_T}$ac_header_preproc" >&6
9a156167 12535
bec39cab
AC
12536# So? What about this header?
12537case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12538 yes:no: )
12539 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12540echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12541 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12542echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12543 ac_header_preproc=yes
12544 ;;
12545 no:yes:* )
12546 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12547echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12548 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12549echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12550 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12551echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12552 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12553echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12554 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12555echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12556 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12557echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
12558 (
12559 cat <<\_ASBOX
12560## ------------------------------------------ ##
12561## Report this to the AC_PACKAGE_NAME lists. ##
12562## ------------------------------------------ ##
12563_ASBOX
12564 ) |
12565 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
12566 ;;
12567esac
b4e70030
JB
12568echo "$as_me:$LINENO: checking for $ac_header" >&5
12569echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12570if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12571 echo $ECHO_N "(cached) $ECHO_C" >&6
9a156167 12572else
bec39cab 12573 eval "$as_ac_Header=\$ac_header_preproc"
9a156167 12574fi
b4e70030
JB
12575echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12576echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9a156167 12577
bec39cab
AC
12578fi
12579if test `eval echo '${'$as_ac_Header'}'` = yes; then
12580 cat >>confdefs.h <<_ACEOF
12581#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12582_ACEOF
9a156167 12583
bec39cab 12584fi
9a156167 12585
bec39cab 12586done
9a156167 12587
9a156167 12588
a9322a30 12589for ac_header in term.h
bec39cab
AC
12590do
12591as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a9322a30 12592echo "$as_me:$LINENO: checking for $ac_header" >&5
b4e70030
JB
12593echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12594if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12595 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12596else
a9322a30 12597 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12598/* confdefs.h. */
12599_ACEOF
12600cat confdefs.h >>conftest.$ac_ext
12601cat >>conftest.$ac_ext <<_ACEOF
436868fb 12602/* end confdefs.h. */
a9322a30
TT
12603#if HAVE_CURSES_H
12604# include <curses.h>
12605#endif
12606
12607
436868fb
DP
12608#include <$ac_header>
12609_ACEOF
12610rm -f conftest.$ac_objext
12611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12612 (eval $ac_compile) 2>conftest.er1
12613 ac_status=$?
12614 grep -v '^ *+' conftest.er1 >conftest.err
12615 rm -f conftest.er1
12616 cat conftest.err >&5
12617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12618 (exit $ac_status); } &&
12619 { ac_try='test -z "$ac_c_werror_flag"
12620 || test ! -s conftest.err'
12621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12622 (eval $ac_try) 2>&5
12623 ac_status=$?
12624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12625 (exit $ac_status); }; } &&
12626 { ac_try='test -s conftest.$ac_objext'
12627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12628 (eval $ac_try) 2>&5
12629 ac_status=$?
12630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12631 (exit $ac_status); }; }; then
a9322a30 12632 eval "$as_ac_Header=yes"
436868fb
DP
12633else
12634 echo "$as_me: failed program was:" >&5
12635sed 's/^/| /' conftest.$ac_ext >&5
12636
a9322a30 12637eval "$as_ac_Header=no"
436868fb
DP
12638fi
12639rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12640fi
12641echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12642echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12643if test `eval echo '${'$as_ac_Header'}'` = yes; then
12644 cat >>confdefs.h <<_ACEOF
12645#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12646_ACEOF
436868fb 12647
a9322a30
TT
12648fi
12649
12650done
12651
12652
12653# ------------------------- #
12654# Checks for declarations. #
12655# ------------------------- #
12656
12657echo "$as_me:$LINENO: checking whether free is declared" >&5
12658echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
12659if test "${ac_cv_have_decl_free+set}" = set; then
12660 echo $ECHO_N "(cached) $ECHO_C" >&6
12661else
12662 cat >conftest.$ac_ext <<_ACEOF
436868fb
DP
12663/* confdefs.h. */
12664_ACEOF
12665cat confdefs.h >>conftest.$ac_ext
12666cat >>conftest.$ac_ext <<_ACEOF
12667/* end confdefs.h. */
a9322a30
TT
12668$ac_includes_default
12669int
12670main ()
12671{
12672#ifndef free
12673 char *p = (char *) free;
12674#endif
12675
12676 ;
12677 return 0;
12678}
436868fb 12679_ACEOF
a9322a30
TT
12680rm -f conftest.$ac_objext
12681if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12682 (eval $ac_compile) 2>conftest.er1
436868fb
DP
12683 ac_status=$?
12684 grep -v '^ *+' conftest.er1 >conftest.err
12685 rm -f conftest.er1
12686 cat conftest.err >&5
12687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
12688 (exit $ac_status); } &&
12689 { ac_try='test -z "$ac_c_werror_flag"
12690 || test ! -s conftest.err'
12691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12692 (eval $ac_try) 2>&5
12693 ac_status=$?
12694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12695 (exit $ac_status); }; } &&
12696 { ac_try='test -s conftest.$ac_objext'
12697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12698 (eval $ac_try) 2>&5
12699 ac_status=$?
12700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12701 (exit $ac_status); }; }; then
12702 ac_cv_have_decl_free=yes
436868fb
DP
12703else
12704 echo "$as_me: failed program was:" >&5
12705sed 's/^/| /' conftest.$ac_ext >&5
12706
a9322a30 12707ac_cv_have_decl_free=no
436868fb 12708fi
a9322a30 12709rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
436868fb 12710fi
a9322a30
TT
12711echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
12712echo "${ECHO_T}$ac_cv_have_decl_free" >&6
12713if test $ac_cv_have_decl_free = yes; then
436868fb 12714
a9322a30
TT
12715cat >>confdefs.h <<_ACEOF
12716#define HAVE_DECL_FREE 1
436868fb
DP
12717_ACEOF
12718
436868fb 12719
a9322a30
TT
12720else
12721 cat >>confdefs.h <<_ACEOF
12722#define HAVE_DECL_FREE 0
12723_ACEOF
436868fb
DP
12724
12725
436868fb 12726fi
a9322a30
TT
12727echo "$as_me:$LINENO: checking whether malloc is declared" >&5
12728echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
12729if test "${ac_cv_have_decl_malloc+set}" = set; then
12730 echo $ECHO_N "(cached) $ECHO_C" >&6
436868fb 12731else
a9322a30 12732 cat >conftest.$ac_ext <<_ACEOF
436868fb
DP
12733/* confdefs.h. */
12734_ACEOF
12735cat confdefs.h >>conftest.$ac_ext
12736cat >>conftest.$ac_ext <<_ACEOF
bec39cab
AC
12737/* end confdefs.h. */
12738$ac_includes_default
a9322a30
TT
12739int
12740main ()
12741{
12742#ifndef malloc
12743 char *p = (char *) malloc;
12744#endif
12745
12746 ;
12747 return 0;
12748}
bec39cab
AC
12749_ACEOF
12750rm -f conftest.$ac_objext
12751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12752 (eval $ac_compile) 2>conftest.er1
12753 ac_status=$?
12754 grep -v '^ *+' conftest.er1 >conftest.err
12755 rm -f conftest.er1
12756 cat conftest.err >&5
12757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12758 (exit $ac_status); } &&
b4e70030
JB
12759 { ac_try='test -z "$ac_c_werror_flag"
12760 || test ! -s conftest.err'
bec39cab
AC
12761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12762 (eval $ac_try) 2>&5
12763 ac_status=$?
12764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12765 (exit $ac_status); }; } &&
12766 { ac_try='test -s conftest.$ac_objext'
12767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12768 (eval $ac_try) 2>&5
12769 ac_status=$?
12770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12771 (exit $ac_status); }; }; then
a9322a30 12772 ac_cv_have_decl_malloc=yes
bec39cab
AC
12773else
12774 echo "$as_me: failed program was:" >&5
12775sed 's/^/| /' conftest.$ac_ext >&5
12776
a9322a30 12777ac_cv_have_decl_malloc=no
bec39cab
AC
12778fi
12779rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12780fi
12781echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
12782echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
12783if test $ac_cv_have_decl_malloc = yes; then
bec39cab 12784
a9322a30
TT
12785cat >>confdefs.h <<_ACEOF
12786#define HAVE_DECL_MALLOC 1
bec39cab 12787_ACEOF
9a156167 12788
9a156167
MK
12789
12790else
bec39cab 12791 cat >>confdefs.h <<_ACEOF
a9322a30 12792#define HAVE_DECL_MALLOC 0
bec39cab 12793_ACEOF
9a156167 12794
c890192f 12795
bec39cab 12796fi
a9322a30
TT
12797echo "$as_me:$LINENO: checking whether realloc is declared" >&5
12798echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
12799if test "${ac_cv_have_decl_realloc+set}" = set; then
12800 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12801else
a9322a30 12802 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12803/* confdefs.h. */
12804_ACEOF
12805cat confdefs.h >>conftest.$ac_ext
12806cat >>conftest.$ac_ext <<_ACEOF
12807/* end confdefs.h. */
12808$ac_includes_default
a9322a30
TT
12809int
12810main ()
12811{
12812#ifndef realloc
12813 char *p = (char *) realloc;
12814#endif
12815
12816 ;
12817 return 0;
12818}
bec39cab
AC
12819_ACEOF
12820rm -f conftest.$ac_objext
12821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12822 (eval $ac_compile) 2>conftest.er1
12823 ac_status=$?
12824 grep -v '^ *+' conftest.er1 >conftest.err
12825 rm -f conftest.er1
12826 cat conftest.err >&5
12827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12828 (exit $ac_status); } &&
b4e70030
JB
12829 { ac_try='test -z "$ac_c_werror_flag"
12830 || test ! -s conftest.err'
bec39cab
AC
12831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12832 (eval $ac_try) 2>&5
12833 ac_status=$?
12834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12835 (exit $ac_status); }; } &&
12836 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
a9322a30 12842 ac_cv_have_decl_realloc=yes
bec39cab
AC
12843else
12844 echo "$as_me: failed program was:" >&5
12845sed 's/^/| /' conftest.$ac_ext >&5
12846
a9322a30 12847ac_cv_have_decl_realloc=no
bec39cab
AC
12848fi
12849rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12850fi
12851echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
12852echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
12853if test $ac_cv_have_decl_realloc = yes; then
bec39cab 12854
a9322a30
TT
12855cat >>confdefs.h <<_ACEOF
12856#define HAVE_DECL_REALLOC 1
bec39cab 12857_ACEOF
bec39cab 12858
bec39cab 12859
c890192f 12860else
bec39cab 12861 cat >>confdefs.h <<_ACEOF
a9322a30 12862#define HAVE_DECL_REALLOC 0
bec39cab 12863_ACEOF
c890192f 12864
bec39cab 12865
bec39cab 12866fi
a9322a30
TT
12867echo "$as_me:$LINENO: checking whether strerror is declared" >&5
12868echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
12869if test "${ac_cv_have_decl_strerror+set}" = set; then
12870 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12871else
a9322a30 12872 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12873/* confdefs.h. */
12874_ACEOF
12875cat confdefs.h >>conftest.$ac_ext
12876cat >>conftest.$ac_ext <<_ACEOF
12877/* end confdefs.h. */
12878$ac_includes_default
a9322a30
TT
12879int
12880main ()
12881{
12882#ifndef strerror
12883 char *p = (char *) strerror;
12884#endif
12885
12886 ;
12887 return 0;
12888}
bec39cab
AC
12889_ACEOF
12890rm -f conftest.$ac_objext
12891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12892 (eval $ac_compile) 2>conftest.er1
12893 ac_status=$?
12894 grep -v '^ *+' conftest.er1 >conftest.err
12895 rm -f conftest.er1
12896 cat conftest.err >&5
12897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12898 (exit $ac_status); } &&
b4e70030
JB
12899 { ac_try='test -z "$ac_c_werror_flag"
12900 || test ! -s conftest.err'
bec39cab
AC
12901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12902 (eval $ac_try) 2>&5
12903 ac_status=$?
12904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12905 (exit $ac_status); }; } &&
12906 { ac_try='test -s conftest.$ac_objext'
12907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12908 (eval $ac_try) 2>&5
12909 ac_status=$?
12910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12911 (exit $ac_status); }; }; then
a9322a30 12912 ac_cv_have_decl_strerror=yes
bec39cab
AC
12913else
12914 echo "$as_me: failed program was:" >&5
12915sed 's/^/| /' conftest.$ac_ext >&5
12916
a9322a30 12917ac_cv_have_decl_strerror=no
bec39cab
AC
12918fi
12919rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12920fi
12921echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
12922echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
12923if test $ac_cv_have_decl_strerror = yes; then
bec39cab 12924
a9322a30
TT
12925cat >>confdefs.h <<_ACEOF
12926#define HAVE_DECL_STRERROR 1
bec39cab 12927_ACEOF
bec39cab 12928
bec39cab 12929
9a156167 12930else
bec39cab 12931 cat >>confdefs.h <<_ACEOF
a9322a30 12932#define HAVE_DECL_STRERROR 0
bec39cab 12933_ACEOF
9a156167 12934
06825bd1 12935
bec39cab 12936fi
a9322a30
TT
12937echo "$as_me:$LINENO: checking whether strstr is declared" >&5
12938echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
12939if test "${ac_cv_have_decl_strstr+set}" = set; then
12940 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12941else
a9322a30 12942 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12943/* confdefs.h. */
12944_ACEOF
12945cat confdefs.h >>conftest.$ac_ext
12946cat >>conftest.$ac_ext <<_ACEOF
12947/* end confdefs.h. */
12948$ac_includes_default
a9322a30
TT
12949int
12950main ()
12951{
12952#ifndef strstr
12953 char *p = (char *) strstr;
12954#endif
12955
12956 ;
12957 return 0;
12958}
bec39cab
AC
12959_ACEOF
12960rm -f conftest.$ac_objext
12961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12962 (eval $ac_compile) 2>conftest.er1
12963 ac_status=$?
12964 grep -v '^ *+' conftest.er1 >conftest.err
12965 rm -f conftest.er1
12966 cat conftest.err >&5
12967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12968 (exit $ac_status); } &&
b4e70030
JB
12969 { ac_try='test -z "$ac_c_werror_flag"
12970 || test ! -s conftest.err'
bec39cab
AC
12971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12972 (eval $ac_try) 2>&5
12973 ac_status=$?
12974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12975 (exit $ac_status); }; } &&
12976 { ac_try='test -s conftest.$ac_objext'
12977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12978 (eval $ac_try) 2>&5
12979 ac_status=$?
12980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12981 (exit $ac_status); }; }; then
a9322a30 12982 ac_cv_have_decl_strstr=yes
bec39cab
AC
12983else
12984 echo "$as_me: failed program was:" >&5
12985sed 's/^/| /' conftest.$ac_ext >&5
12986
a9322a30 12987ac_cv_have_decl_strstr=no
bec39cab
AC
12988fi
12989rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12990fi
12991echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
12992echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
12993if test $ac_cv_have_decl_strstr = yes; then
bec39cab 12994
a9322a30
TT
12995cat >>confdefs.h <<_ACEOF
12996#define HAVE_DECL_STRSTR 1
bec39cab 12997_ACEOF
bec39cab 12998
bec39cab 12999
bec39cab 13000else
bec39cab 13001 cat >>confdefs.h <<_ACEOF
a9322a30 13002#define HAVE_DECL_STRSTR 0
bec39cab 13003_ACEOF
06825bd1 13004
bec39cab 13005
bec39cab 13006fi
a9322a30
TT
13007echo "$as_me:$LINENO: checking whether getopt is declared" >&5
13008echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
13009if test "${ac_cv_have_decl_getopt+set}" = set; then
13010 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13011else
a9322a30 13012 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13013/* confdefs.h. */
13014_ACEOF
13015cat confdefs.h >>conftest.$ac_ext
13016cat >>conftest.$ac_ext <<_ACEOF
13017/* end confdefs.h. */
13018$ac_includes_default
a9322a30
TT
13019int
13020main ()
13021{
13022#ifndef getopt
13023 char *p = (char *) getopt;
13024#endif
13025
13026 ;
13027 return 0;
13028}
bec39cab
AC
13029_ACEOF
13030rm -f conftest.$ac_objext
13031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13032 (eval $ac_compile) 2>conftest.er1
13033 ac_status=$?
13034 grep -v '^ *+' conftest.er1 >conftest.err
13035 rm -f conftest.er1
13036 cat conftest.err >&5
13037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13038 (exit $ac_status); } &&
b4e70030
JB
13039 { ac_try='test -z "$ac_c_werror_flag"
13040 || test ! -s conftest.err'
bec39cab
AC
13041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13042 (eval $ac_try) 2>&5
13043 ac_status=$?
13044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13045 (exit $ac_status); }; } &&
13046 { ac_try='test -s conftest.$ac_objext'
13047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13048 (eval $ac_try) 2>&5
13049 ac_status=$?
13050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13051 (exit $ac_status); }; }; then
a9322a30 13052 ac_cv_have_decl_getopt=yes
bec39cab
AC
13053else
13054 echo "$as_me: failed program was:" >&5
13055sed 's/^/| /' conftest.$ac_ext >&5
13056
a9322a30 13057ac_cv_have_decl_getopt=no
bec39cab
AC
13058fi
13059rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13060fi
13061echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
13062echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
13063if test $ac_cv_have_decl_getopt = yes; then
bec39cab 13064
a9322a30
TT
13065cat >>confdefs.h <<_ACEOF
13066#define HAVE_DECL_GETOPT 1
bec39cab 13067_ACEOF
5ee754fc 13068
bec39cab 13069
5ee754fc 13070else
bec39cab 13071 cat >>confdefs.h <<_ACEOF
a9322a30 13072#define HAVE_DECL_GETOPT 0
bec39cab 13073_ACEOF
c906108c 13074
bec39cab 13075
bec39cab 13076fi
a9322a30
TT
13077echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
13078echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
13079if test "${ac_cv_have_decl_snprintf+set}" = set; then
13080 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13081else
a9322a30 13082 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13083/* confdefs.h. */
13084_ACEOF
13085cat confdefs.h >>conftest.$ac_ext
13086cat >>conftest.$ac_ext <<_ACEOF
13087/* end confdefs.h. */
13088$ac_includes_default
a9322a30
TT
13089int
13090main ()
13091{
13092#ifndef snprintf
13093 char *p = (char *) snprintf;
13094#endif
13095
13096 ;
13097 return 0;
13098}
bec39cab
AC
13099_ACEOF
13100rm -f conftest.$ac_objext
13101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13102 (eval $ac_compile) 2>conftest.er1
13103 ac_status=$?
13104 grep -v '^ *+' conftest.er1 >conftest.err
13105 rm -f conftest.er1
13106 cat conftest.err >&5
13107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13108 (exit $ac_status); } &&
b4e70030
JB
13109 { ac_try='test -z "$ac_c_werror_flag"
13110 || test ! -s conftest.err'
bec39cab
AC
13111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13112 (eval $ac_try) 2>&5
13113 ac_status=$?
13114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13115 (exit $ac_status); }; } &&
13116 { ac_try='test -s conftest.$ac_objext'
13117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13118 (eval $ac_try) 2>&5
13119 ac_status=$?
13120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13121 (exit $ac_status); }; }; then
a9322a30 13122 ac_cv_have_decl_snprintf=yes
bec39cab
AC
13123else
13124 echo "$as_me: failed program was:" >&5
13125sed 's/^/| /' conftest.$ac_ext >&5
13126
a9322a30 13127ac_cv_have_decl_snprintf=no
bec39cab
AC
13128fi
13129rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13130fi
13131echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
13132echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
13133if test $ac_cv_have_decl_snprintf = yes; then
bec39cab 13134
a9322a30
TT
13135cat >>confdefs.h <<_ACEOF
13136#define HAVE_DECL_SNPRINTF 1
bec39cab 13137_ACEOF
c906108c
SS
13138
13139
9608ab8b 13140else
bec39cab 13141 cat >>confdefs.h <<_ACEOF
a9322a30 13142#define HAVE_DECL_SNPRINTF 0
bec39cab 13143_ACEOF
5ee754fc 13144
5ee754fc 13145
bec39cab 13146fi
a9322a30
TT
13147echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
13148echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
13149if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
13150 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13151else
a9322a30 13152 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13153/* confdefs.h. */
13154_ACEOF
13155cat confdefs.h >>conftest.$ac_ext
13156cat >>conftest.$ac_ext <<_ACEOF
13157/* end confdefs.h. */
13158$ac_includes_default
a9322a30
TT
13159int
13160main ()
13161{
13162#ifndef vsnprintf
13163 char *p = (char *) vsnprintf;
13164#endif
13165
13166 ;
13167 return 0;
13168}
bec39cab
AC
13169_ACEOF
13170rm -f conftest.$ac_objext
13171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13172 (eval $ac_compile) 2>conftest.er1
13173 ac_status=$?
13174 grep -v '^ *+' conftest.er1 >conftest.err
13175 rm -f conftest.er1
13176 cat conftest.err >&5
13177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13178 (exit $ac_status); } &&
b4e70030
JB
13179 { ac_try='test -z "$ac_c_werror_flag"
13180 || test ! -s conftest.err'
bec39cab
AC
13181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13182 (eval $ac_try) 2>&5
13183 ac_status=$?
13184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13185 (exit $ac_status); }; } &&
13186 { ac_try='test -s conftest.$ac_objext'
13187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13188 (eval $ac_try) 2>&5
13189 ac_status=$?
13190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13191 (exit $ac_status); }; }; then
a9322a30 13192 ac_cv_have_decl_vsnprintf=yes
bec39cab
AC
13193else
13194 echo "$as_me: failed program was:" >&5
13195sed 's/^/| /' conftest.$ac_ext >&5
13196
a9322a30 13197ac_cv_have_decl_vsnprintf=no
bec39cab
AC
13198fi
13199rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13200fi
13201echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
13202echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
13203if test $ac_cv_have_decl_vsnprintf = yes; then
bec39cab 13204
a9322a30
TT
13205cat >>confdefs.h <<_ACEOF
13206#define HAVE_DECL_VSNPRINTF 1
bec39cab 13207_ACEOF
5ee754fc 13208
5ee754fc 13209
5ee754fc 13210else
bec39cab 13211 cat >>confdefs.h <<_ACEOF
a9322a30 13212#define HAVE_DECL_VSNPRINTF 0
bec39cab 13213_ACEOF
5ee754fc 13214
a9322a30 13215
5ee754fc
MK
13216fi
13217
bec39cab
AC
13218
13219
a8111142
TT
13220 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
13221echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
13222if test "${am_cv_val_LC_MESSAGES+set}" = set; then
13223 echo $ECHO_N "(cached) $ECHO_C" >&6
13224else
13225 cat >conftest.$ac_ext <<_ACEOF
13226/* confdefs.h. */
13227_ACEOF
13228cat confdefs.h >>conftest.$ac_ext
13229cat >>conftest.$ac_ext <<_ACEOF
13230/* end confdefs.h. */
13231#include <locale.h>
13232int
13233main ()
13234{
13235return LC_MESSAGES
13236 ;
13237 return 0;
13238}
13239_ACEOF
13240rm -f conftest.$ac_objext conftest$ac_exeext
13241if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13242 (eval $ac_link) 2>conftest.er1
13243 ac_status=$?
13244 grep -v '^ *+' conftest.er1 >conftest.err
13245 rm -f conftest.er1
13246 cat conftest.err >&5
13247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13248 (exit $ac_status); } &&
13249 { ac_try='test -z "$ac_c_werror_flag"
13250 || test ! -s conftest.err'
13251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13252 (eval $ac_try) 2>&5
13253 ac_status=$?
13254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13255 (exit $ac_status); }; } &&
13256 { ac_try='test -s conftest$ac_exeext'
13257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13258 (eval $ac_try) 2>&5
13259 ac_status=$?
13260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13261 (exit $ac_status); }; }; then
13262 am_cv_val_LC_MESSAGES=yes
13263else
13264 echo "$as_me: failed program was:" >&5
13265sed 's/^/| /' conftest.$ac_ext >&5
13266
13267am_cv_val_LC_MESSAGES=no
13268fi
13269rm -f conftest.err conftest.$ac_objext \
13270 conftest$ac_exeext conftest.$ac_ext
13271fi
13272echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
13273echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
13274 if test $am_cv_val_LC_MESSAGES = yes; then
13275
13276cat >>confdefs.h <<\_ACEOF
13277#define HAVE_LC_MESSAGES 1
13278_ACEOF
13279
13280 fi
13281
13282
a9322a30
TT
13283# ----------------------- #
13284# Checks for structures. #
13285# ----------------------- #
13286
13287echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13288echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13289if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
bec39cab 13290 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13291else
a9322a30 13292 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13293/* confdefs.h. */
13294_ACEOF
13295cat confdefs.h >>conftest.$ac_ext
13296cat >>conftest.$ac_ext <<_ACEOF
13297/* end confdefs.h. */
13298$ac_includes_default
a9322a30
TT
13299int
13300main ()
13301{
13302static struct stat ac_aggr;
13303if (ac_aggr.st_blocks)
13304return 0;
13305 ;
13306 return 0;
13307}
bec39cab
AC
13308_ACEOF
13309rm -f conftest.$ac_objext
13310if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13311 (eval $ac_compile) 2>conftest.er1
13312 ac_status=$?
13313 grep -v '^ *+' conftest.er1 >conftest.err
13314 rm -f conftest.er1
13315 cat conftest.err >&5
13316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13317 (exit $ac_status); } &&
b4e70030
JB
13318 { ac_try='test -z "$ac_c_werror_flag"
13319 || test ! -s conftest.err'
bec39cab
AC
13320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13321 (eval $ac_try) 2>&5
13322 ac_status=$?
13323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13324 (exit $ac_status); }; } &&
13325 { ac_try='test -s conftest.$ac_objext'
13326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13327 (eval $ac_try) 2>&5
13328 ac_status=$?
13329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13330 (exit $ac_status); }; }; then
a9322a30 13331 ac_cv_member_struct_stat_st_blocks=yes
bec39cab
AC
13332else
13333 echo "$as_me: failed program was:" >&5
13334sed 's/^/| /' conftest.$ac_ext >&5
13335
bec39cab
AC
13336cat >conftest.$ac_ext <<_ACEOF
13337/* confdefs.h. */
13338_ACEOF
13339cat confdefs.h >>conftest.$ac_ext
13340cat >>conftest.$ac_ext <<_ACEOF
13341/* end confdefs.h. */
a9322a30
TT
13342$ac_includes_default
13343int
13344main ()
13345{
13346static struct stat ac_aggr;
13347if (sizeof ac_aggr.st_blocks)
13348return 0;
13349 ;
13350 return 0;
13351}
bec39cab 13352_ACEOF
a9322a30
TT
13353rm -f conftest.$ac_objext
13354if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13355 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
13356 ac_status=$?
13357 grep -v '^ *+' conftest.er1 >conftest.err
13358 rm -f conftest.er1
13359 cat conftest.err >&5
13360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13361 (exit $ac_status); } &&
13362 { ac_try='test -z "$ac_c_werror_flag"
13363 || test ! -s conftest.err'
13364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13365 (eval $ac_try) 2>&5
13366 ac_status=$?
13367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13368 (exit $ac_status); }; } &&
13369 { ac_try='test -s conftest.$ac_objext'
13370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13371 (eval $ac_try) 2>&5
13372 ac_status=$?
13373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13374 (exit $ac_status); }; }; then
13375 ac_cv_member_struct_stat_st_blocks=yes
bec39cab
AC
13376else
13377 echo "$as_me: failed program was:" >&5
13378sed 's/^/| /' conftest.$ac_ext >&5
5ee754fc 13379
a9322a30 13380ac_cv_member_struct_stat_st_blocks=no
5ee754fc 13381fi
a9322a30 13382rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13383fi
a9322a30 13384rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13385fi
a9322a30
TT
13386echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13387echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13388if test $ac_cv_member_struct_stat_st_blocks = yes; then
5ee754fc 13389
a9322a30
TT
13390cat >>confdefs.h <<_ACEOF
13391#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13392_ACEOF
5ee754fc 13393
5ee754fc 13394
bec39cab 13395fi
a9322a30
TT
13396echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13397echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13398if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13399 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13400else
a9322a30 13401 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13402/* confdefs.h. */
13403_ACEOF
13404cat confdefs.h >>conftest.$ac_ext
13405cat >>conftest.$ac_ext <<_ACEOF
13406/* end confdefs.h. */
13407$ac_includes_default
a9322a30
TT
13408int
13409main ()
13410{
13411static struct stat ac_aggr;
13412if (ac_aggr.st_blksize)
13413return 0;
13414 ;
13415 return 0;
13416}
bec39cab
AC
13417_ACEOF
13418rm -f conftest.$ac_objext
13419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13420 (eval $ac_compile) 2>conftest.er1
13421 ac_status=$?
13422 grep -v '^ *+' conftest.er1 >conftest.err
13423 rm -f conftest.er1
13424 cat conftest.err >&5
13425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13426 (exit $ac_status); } &&
b4e70030
JB
13427 { ac_try='test -z "$ac_c_werror_flag"
13428 || test ! -s conftest.err'
bec39cab
AC
13429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13430 (eval $ac_try) 2>&5
13431 ac_status=$?
13432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13433 (exit $ac_status); }; } &&
13434 { ac_try='test -s conftest.$ac_objext'
13435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13436 (eval $ac_try) 2>&5
13437 ac_status=$?
13438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13439 (exit $ac_status); }; }; then
a9322a30 13440 ac_cv_member_struct_stat_st_blksize=yes
bec39cab
AC
13441else
13442 echo "$as_me: failed program was:" >&5
13443sed 's/^/| /' conftest.$ac_ext >&5
13444
7eb368b3
NR
13445cat >conftest.$ac_ext <<_ACEOF
13446/* confdefs.h. */
13447_ACEOF
13448cat confdefs.h >>conftest.$ac_ext
13449cat >>conftest.$ac_ext <<_ACEOF
13450/* end confdefs.h. */
13451$ac_includes_default
a9322a30
TT
13452int
13453main ()
13454{
13455static struct stat ac_aggr;
13456if (sizeof ac_aggr.st_blksize)
13457return 0;
13458 ;
13459 return 0;
13460}
7eb368b3
NR
13461_ACEOF
13462rm -f conftest.$ac_objext
13463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13464 (eval $ac_compile) 2>conftest.er1
13465 ac_status=$?
13466 grep -v '^ *+' conftest.er1 >conftest.err
13467 rm -f conftest.er1
13468 cat conftest.err >&5
13469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13470 (exit $ac_status); } &&
13471 { ac_try='test -z "$ac_c_werror_flag"
13472 || test ! -s conftest.err'
13473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13474 (eval $ac_try) 2>&5
13475 ac_status=$?
13476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13477 (exit $ac_status); }; } &&
13478 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
a9322a30 13484 ac_cv_member_struct_stat_st_blksize=yes
7eb368b3
NR
13485else
13486 echo "$as_me: failed program was:" >&5
13487sed 's/^/| /' conftest.$ac_ext >&5
13488
a9322a30 13489ac_cv_member_struct_stat_st_blksize=no
7eb368b3
NR
13490fi
13491rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7eb368b3 13492fi
a9322a30 13493rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7eb368b3 13494fi
a9322a30
TT
13495echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13496echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13497if test $ac_cv_member_struct_stat_st_blksize = yes; then
7eb368b3 13498
a9322a30
TT
13499cat >>confdefs.h <<_ACEOF
13500#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
13501_ACEOF
13502
a9322a30 13503
7eb368b3
NR
13504fi
13505
7eb368b3 13506
a9322a30
TT
13507# ------------------ #
13508# Checks for types. #
13509# ------------------ #
7eb368b3 13510
a9322a30
TT
13511echo "$as_me:$LINENO: checking return type of signal handlers" >&5
13512echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13513if test "${ac_cv_type_signal+set}" = set; then
bec39cab 13514 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13515else
7cb9022a 13516 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13517/* confdefs.h. */
13518_ACEOF
13519cat confdefs.h >>conftest.$ac_ext
13520cat >>conftest.$ac_ext <<_ACEOF
13521/* end confdefs.h. */
a9322a30
TT
13522#include <sys/types.h>
13523#include <signal.h>
13524#ifdef signal
13525# undef signal
13526#endif
13527#ifdef __cplusplus
13528extern "C" void (*signal (int, void (*)(int)))(int);
13529#else
13530void (*signal ()) ();
7cb9022a
MK
13531#endif
13532
a9322a30
TT
13533int
13534main ()
13535{
13536int i;
13537 ;
13538 return 0;
13539}
bec39cab
AC
13540_ACEOF
13541rm -f conftest.$ac_objext
13542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13543 (eval $ac_compile) 2>conftest.er1
13544 ac_status=$?
13545 grep -v '^ *+' conftest.er1 >conftest.err
13546 rm -f conftest.er1
13547 cat conftest.err >&5
13548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13549 (exit $ac_status); } &&
b4e70030
JB
13550 { ac_try='test -z "$ac_c_werror_flag"
13551 || test ! -s conftest.err'
bec39cab
AC
13552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13553 (eval $ac_try) 2>&5
13554 ac_status=$?
13555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13556 (exit $ac_status); }; } &&
13557 { ac_try='test -s conftest.$ac_objext'
13558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13559 (eval $ac_try) 2>&5
13560 ac_status=$?
13561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13562 (exit $ac_status); }; }; then
a9322a30 13563 ac_cv_type_signal=void
bec39cab
AC
13564else
13565 echo "$as_me: failed program was:" >&5
13566sed 's/^/| /' conftest.$ac_ext >&5
13567
a9322a30 13568ac_cv_type_signal=int
bec39cab
AC
13569fi
13570rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13571fi
a9322a30
TT
13572echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
13573echo "${ECHO_T}$ac_cv_type_signal" >&6
bec39cab 13574
a9322a30
TT
13575cat >>confdefs.h <<_ACEOF
13576#define RETSIGTYPE $ac_cv_type_signal
13577_ACEOF
5ee754fc 13578
bec39cab 13579
a9322a30
TT
13580echo "$as_me:$LINENO: checking for socklen_t" >&5
13581echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
13582if test "${ac_cv_type_socklen_t+set}" = set; then
bec39cab 13583 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13584else
a9322a30 13585 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13586/* confdefs.h. */
13587_ACEOF
13588cat confdefs.h >>conftest.$ac_ext
13589cat >>conftest.$ac_ext <<_ACEOF
13590/* end confdefs.h. */
a9322a30
TT
13591#include <sys/types.h>
13592#include <sys/socket.h>
13593
13594
13595int
13596main ()
13597{
13598if ((socklen_t *) 0)
13599 return 0;
13600if (sizeof (socklen_t))
13601 return 0;
13602 ;
13603 return 0;
13604}
bec39cab
AC
13605_ACEOF
13606rm -f conftest.$ac_objext
13607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13608 (eval $ac_compile) 2>conftest.er1
13609 ac_status=$?
13610 grep -v '^ *+' conftest.er1 >conftest.err
13611 rm -f conftest.er1
13612 cat conftest.err >&5
13613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13614 (exit $ac_status); } &&
b4e70030
JB
13615 { ac_try='test -z "$ac_c_werror_flag"
13616 || test ! -s conftest.err'
bec39cab
AC
13617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13618 (eval $ac_try) 2>&5
13619 ac_status=$?
13620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13621 (exit $ac_status); }; } &&
13622 { ac_try='test -s conftest.$ac_objext'
13623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13624 (eval $ac_try) 2>&5
13625 ac_status=$?
13626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13627 (exit $ac_status); }; }; then
a9322a30 13628 ac_cv_type_socklen_t=yes
bec39cab
AC
13629else
13630 echo "$as_me: failed program was:" >&5
13631sed 's/^/| /' conftest.$ac_ext >&5
13632
a9322a30 13633ac_cv_type_socklen_t=no
bec39cab
AC
13634fi
13635rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13636fi
13637echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
13638echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
13639if test $ac_cv_type_socklen_t = yes; then
bec39cab 13640
a9322a30
TT
13641cat >>confdefs.h <<_ACEOF
13642#define HAVE_SOCKLEN_T 1
13643_ACEOF
13644
13645
13646fi
13647
13648
13649# ------------------------------------- #
13650# Checks for compiler characteristics. #
13651# ------------------------------------- #
13652
13653echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13654echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13655if test "${ac_cv_c_const+set}" = set; then
13656 echo $ECHO_N "(cached) $ECHO_C" >&6
13657else
13658 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13659/* confdefs.h. */
13660_ACEOF
13661cat confdefs.h >>conftest.$ac_ext
13662cat >>conftest.$ac_ext <<_ACEOF
13663/* end confdefs.h. */
a9322a30
TT
13664
13665int
13666main ()
13667{
13668/* FIXME: Include the comments suggested by Paul. */
13669#ifndef __cplusplus
13670 /* Ultrix mips cc rejects this. */
13671 typedef int charset[2];
13672 const charset x;
13673 /* SunOS 4.1.1 cc rejects this. */
13674 char const *const *ccp;
13675 char **p;
13676 /* NEC SVR4.0.2 mips cc rejects this. */
13677 struct point {int x, y;};
13678 static struct point const zero = {0,0};
13679 /* AIX XL C 1.02.0.0 rejects this.
13680 It does not let you subtract one const X* pointer from another in
13681 an arm of an if-expression whose if-part is not a constant
13682 expression */
13683 const char *g = "string";
13684 ccp = &g + (g ? g-g : 0);
13685 /* HPUX 7.0 cc rejects these. */
13686 ++ccp;
13687 p = (char**) ccp;
13688 ccp = (char const *const *) p;
13689 { /* SCO 3.2v4 cc rejects this. */
13690 char *t;
13691 char const *s = 0 ? (char *) 0 : (char const *) 0;
13692
13693 *t++ = 0;
13694 }
13695 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13696 int x[] = {25, 17};
13697 const int *foo = &x[0];
13698 ++foo;
13699 }
13700 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13701 typedef const int *iptr;
13702 iptr p = 0;
13703 ++p;
13704 }
13705 { /* AIX XL C 1.02.0.0 rejects this saying
13706 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13707 struct s { int j; const int *ap[3]; };
13708 struct s *b; b->j = 5;
13709 }
13710 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13711 const int foo = 10;
13712 }
13713#endif
13714
13715 ;
13716 return 0;
13717}
bec39cab 13718_ACEOF
a9322a30
TT
13719rm -f conftest.$ac_objext
13720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13721 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
13722 ac_status=$?
13723 grep -v '^ *+' conftest.er1 >conftest.err
13724 rm -f conftest.er1
13725 cat conftest.err >&5
13726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13727 (exit $ac_status); } &&
13728 { ac_try='test -z "$ac_c_werror_flag"
13729 || test ! -s conftest.err'
13730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13731 (eval $ac_try) 2>&5
13732 ac_status=$?
13733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13734 (exit $ac_status); }; } &&
13735 { ac_try='test -s conftest.$ac_objext'
13736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13737 (eval $ac_try) 2>&5
13738 ac_status=$?
13739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13740 (exit $ac_status); }; }; then
13741 ac_cv_c_const=yes
5ee754fc 13742else
bec39cab
AC
13743 echo "$as_me: failed program was:" >&5
13744sed 's/^/| /' conftest.$ac_ext >&5
13745
a9322a30 13746ac_cv_c_const=no
5ee754fc 13747fi
a9322a30 13748rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13749fi
a9322a30
TT
13750echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13751echo "${ECHO_T}$ac_cv_c_const" >&6
13752if test $ac_cv_c_const = no; then
bec39cab 13753
a9322a30
TT
13754cat >>confdefs.h <<\_ACEOF
13755#define const
bec39cab
AC
13756_ACEOF
13757
5ee754fc 13758fi
bec39cab 13759
a9322a30
TT
13760echo "$as_me:$LINENO: checking for inline" >&5
13761echo $ECHO_N "checking for inline... $ECHO_C" >&6
13762if test "${ac_cv_c_inline+set}" = set; then
bec39cab 13763 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13764else
a9322a30
TT
13765 ac_cv_c_inline=no
13766for ac_kw in inline __inline__ __inline; do
13767 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13768/* confdefs.h. */
13769_ACEOF
13770cat confdefs.h >>conftest.$ac_ext
13771cat >>conftest.$ac_ext <<_ACEOF
13772/* end confdefs.h. */
a9322a30
TT
13773#ifndef __cplusplus
13774typedef int foo_t;
13775static $ac_kw foo_t static_foo () {return 0; }
13776$ac_kw foo_t foo () {return 0; }
13777#endif
13778
bec39cab
AC
13779_ACEOF
13780rm -f conftest.$ac_objext
13781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13782 (eval $ac_compile) 2>conftest.er1
13783 ac_status=$?
13784 grep -v '^ *+' conftest.er1 >conftest.err
13785 rm -f conftest.er1
13786 cat conftest.err >&5
13787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13788 (exit $ac_status); } &&
b4e70030
JB
13789 { ac_try='test -z "$ac_c_werror_flag"
13790 || test ! -s conftest.err'
bec39cab
AC
13791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13792 (eval $ac_try) 2>&5
13793 ac_status=$?
13794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13795 (exit $ac_status); }; } &&
13796 { ac_try='test -s conftest.$ac_objext'
13797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13798 (eval $ac_try) 2>&5
13799 ac_status=$?
13800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13801 (exit $ac_status); }; }; then
a9322a30 13802 ac_cv_c_inline=$ac_kw; break
bec39cab
AC
13803else
13804 echo "$as_me: failed program was:" >&5
13805sed 's/^/| /' conftest.$ac_ext >&5
13806
bec39cab
AC
13807fi
13808rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 13809done
bec39cab 13810
5ee754fc 13811fi
a9322a30
TT
13812echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
13813echo "${ECHO_T}$ac_cv_c_inline" >&6
bec39cab 13814
5ee754fc 13815
a9322a30
TT
13816case $ac_cv_c_inline in
13817 inline | yes) ;;
13818 *)
13819 case $ac_cv_c_inline in
13820 no) ac_val=;;
13821 *) ac_val=$ac_cv_c_inline;;
13822 esac
13823 cat >>confdefs.h <<_ACEOF
13824#ifndef __cplusplus
13825#define inline $ac_val
13826#endif
13827_ACEOF
bec39cab
AC
13828 ;;
13829esac
bec39cab 13830
a9322a30
TT
13831echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
13832echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
13833if test "${ac_cv_c_bigendian+set}" = set; then
bec39cab 13834 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13835else
a9322a30 13836 # See if sys/param.h defines the BYTE_ORDER macro.
bec39cab
AC
13837cat >conftest.$ac_ext <<_ACEOF
13838/* confdefs.h. */
13839_ACEOF
13840cat confdefs.h >>conftest.$ac_ext
13841cat >>conftest.$ac_ext <<_ACEOF
13842/* end confdefs.h. */
a9322a30
TT
13843#include <sys/types.h>
13844#include <sys/param.h>
13845
13846int
13847main ()
13848{
13849#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13850 bogus endian macros
13851#endif
13852
13853 ;
13854 return 0;
13855}
bec39cab
AC
13856_ACEOF
13857rm -f conftest.$ac_objext
13858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13859 (eval $ac_compile) 2>conftest.er1
13860 ac_status=$?
13861 grep -v '^ *+' conftest.er1 >conftest.err
13862 rm -f conftest.er1
13863 cat conftest.err >&5
13864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13865 (exit $ac_status); } &&
b4e70030
JB
13866 { ac_try='test -z "$ac_c_werror_flag"
13867 || test ! -s conftest.err'
bec39cab
AC
13868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13869 (eval $ac_try) 2>&5
13870 ac_status=$?
13871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13872 (exit $ac_status); }; } &&
13873 { ac_try='test -s conftest.$ac_objext'
13874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13875 (eval $ac_try) 2>&5
13876 ac_status=$?
13877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13878 (exit $ac_status); }; }; then
a9322a30 13879 # It does; now see whether it defined to BIG_ENDIAN or not.
bec39cab
AC
13880cat >conftest.$ac_ext <<_ACEOF
13881/* confdefs.h. */
13882_ACEOF
13883cat confdefs.h >>conftest.$ac_ext
13884cat >>conftest.$ac_ext <<_ACEOF
13885/* end confdefs.h. */
a9322a30
TT
13886#include <sys/types.h>
13887#include <sys/param.h>
13888
13889int
13890main ()
13891{
13892#if BYTE_ORDER != BIG_ENDIAN
13893 not big endian
13894#endif
13895
13896 ;
13897 return 0;
13898}
bec39cab 13899_ACEOF
a9322a30
TT
13900rm -f conftest.$ac_objext
13901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13902 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
13903 ac_status=$?
13904 grep -v '^ *+' conftest.er1 >conftest.err
13905 rm -f conftest.er1
13906 cat conftest.err >&5
13907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13908 (exit $ac_status); } &&
13909 { ac_try='test -z "$ac_c_werror_flag"
13910 || test ! -s conftest.err'
13911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13912 (eval $ac_try) 2>&5
13913 ac_status=$?
13914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13915 (exit $ac_status); }; } &&
13916 { ac_try='test -s conftest.$ac_objext'
13917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13918 (eval $ac_try) 2>&5
13919 ac_status=$?
13920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13921 (exit $ac_status); }; }; then
13922 ac_cv_c_bigendian=yes
5ee754fc 13923else
bec39cab
AC
13924 echo "$as_me: failed program was:" >&5
13925sed 's/^/| /' conftest.$ac_ext >&5
13926
a9322a30 13927ac_cv_c_bigendian=no
5ee754fc 13928fi
a9322a30 13929rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13930else
a9322a30
TT
13931 echo "$as_me: failed program was:" >&5
13932sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 13933
a9322a30
TT
13934# It does not; compile a test program.
13935if test "$cross_compiling" = yes; then
13936 # try to guess the endianness by grepping values into an object file
13937 ac_cv_c_bigendian=unknown
13938 cat >conftest.$ac_ext <<_ACEOF
13939/* confdefs.h. */
7eb368b3
NR
13940_ACEOF
13941cat confdefs.h >>conftest.$ac_ext
13942cat >>conftest.$ac_ext <<_ACEOF
13943/* end confdefs.h. */
a9322a30
TT
13944short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13945short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13946void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
13947short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13948short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13949void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
7eb368b3
NR
13950int
13951main ()
13952{
a9322a30 13953 _ascii (); _ebcdic ();
7eb368b3
NR
13954 ;
13955 return 0;
13956}
13957_ACEOF
a9322a30
TT
13958rm -f conftest.$ac_objext
13959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13960 (eval $ac_compile) 2>conftest.er1
7eb368b3
NR
13961 ac_status=$?
13962 grep -v '^ *+' conftest.er1 >conftest.err
13963 rm -f conftest.er1
13964 cat conftest.err >&5
13965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13966 (exit $ac_status); } &&
13967 { ac_try='test -z "$ac_c_werror_flag"
13968 || test ! -s conftest.err'
13969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13970 (eval $ac_try) 2>&5
13971 ac_status=$?
13972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13973 (exit $ac_status); }; } &&
a9322a30 13974 { ac_try='test -s conftest.$ac_objext'
7eb368b3
NR
13975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13976 (eval $ac_try) 2>&5
13977 ac_status=$?
13978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13979 (exit $ac_status); }; }; then
a9322a30
TT
13980 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
13981 ac_cv_c_bigendian=yes
13982fi
13983if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13984 if test "$ac_cv_c_bigendian" = unknown; then
13985 ac_cv_c_bigendian=no
13986 else
13987 # finding both strings is unlikely to happen, but who knows?
13988 ac_cv_c_bigendian=unknown
13989 fi
13990fi
7eb368b3
NR
13991else
13992 echo "$as_me: failed program was:" >&5
13993sed 's/^/| /' conftest.$ac_ext >&5
13994
7eb368b3 13995fi
a9322a30 13996rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
13997else
13998 cat >conftest.$ac_ext <<_ACEOF
13999/* confdefs.h. */
14000_ACEOF
14001cat confdefs.h >>conftest.$ac_ext
14002cat >>conftest.$ac_ext <<_ACEOF
14003/* end confdefs.h. */
d3ea6809
MM
14004int
14005main ()
14006{
a9322a30
TT
14007 /* Are we little or big endian? From Harbison&Steele. */
14008 union
14009 {
14010 long l;
14011 char c[sizeof (long)];
14012 } u;
14013 u.l = 1;
14014 exit (u.c[sizeof (long) - 1] == 1);
d3ea6809
MM
14015}
14016_ACEOF
a9322a30 14017rm -f conftest$ac_exeext
d3ea6809 14018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30 14019 (eval $ac_link) 2>&5
d3ea6809
MM
14020 ac_status=$?
14021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30 14022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3ea6809
MM
14023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14024 (eval $ac_try) 2>&5
14025 ac_status=$?
14026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14027 (exit $ac_status); }; }; then
a9322a30 14028 ac_cv_c_bigendian=no
d3ea6809 14029else
a9322a30
TT
14030 echo "$as_me: program exited with status $ac_status" >&5
14031echo "$as_me: failed program was:" >&5
d3ea6809
MM
14032sed 's/^/| /' conftest.$ac_ext >&5
14033
a9322a30
TT
14034( exit $ac_status )
14035ac_cv_c_bigendian=yes
d3ea6809 14036fi
a9322a30 14037rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d3ea6809 14038fi
d3ea6809 14039fi
a9322a30
TT
14040rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14041fi
14042echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
14043echo "${ECHO_T}$ac_cv_c_bigendian" >&6
14044case $ac_cv_c_bigendian in
14045 yes)
14046
14047cat >>confdefs.h <<\_ACEOF
14048#define WORDS_BIGENDIAN 1
14049_ACEOF
14050 ;;
14051 no)
14052 ;;
14053 *)
14054 { { echo "$as_me:$LINENO: error: unknown endianness
14055presetting ac_cv_c_bigendian=no (or yes) will help" >&5
14056echo "$as_me: error: unknown endianness
14057presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
14058 { (exit 1); exit 1; }; } ;;
14059esac
d3ea6809
MM
14060
14061
a9322a30
TT
14062# ------------------------------ #
14063# Checks for library functions. #
14064# ------------------------------ #
d3ea6809 14065
a9322a30
TT
14066# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14067# for constant arguments. Useless!
14068echo "$as_me:$LINENO: checking for working alloca.h" >&5
14069echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
14070if test "${ac_cv_working_alloca_h+set}" = set; then
d3ea6809
MM
14071 echo $ECHO_N "(cached) $ECHO_C" >&6
14072else
14073 cat >conftest.$ac_ext <<_ACEOF
14074/* confdefs.h. */
14075_ACEOF
14076cat confdefs.h >>conftest.$ac_ext
14077cat >>conftest.$ac_ext <<_ACEOF
14078/* end confdefs.h. */
a9322a30 14079#include <alloca.h>
bec39cab
AC
14080int
14081main ()
14082{
a9322a30 14083char *p = (char *) alloca (2 * sizeof (int));
bec39cab
AC
14084 ;
14085 return 0;
14086}
14087_ACEOF
14088rm -f conftest.$ac_objext conftest$ac_exeext
14089if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14090 (eval $ac_link) 2>conftest.er1
14091 ac_status=$?
14092 grep -v '^ *+' conftest.er1 >conftest.err
14093 rm -f conftest.er1
14094 cat conftest.err >&5
14095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14096 (exit $ac_status); } &&
b4e70030
JB
14097 { ac_try='test -z "$ac_c_werror_flag"
14098 || test ! -s conftest.err'
bec39cab
AC
14099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14100 (eval $ac_try) 2>&5
14101 ac_status=$?
14102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14103 (exit $ac_status); }; } &&
14104 { ac_try='test -s conftest$ac_exeext'
14105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14106 (eval $ac_try) 2>&5
14107 ac_status=$?
14108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14109 (exit $ac_status); }; }; then
a9322a30 14110 ac_cv_working_alloca_h=yes
bec39cab
AC
14111else
14112 echo "$as_me: failed program was:" >&5
14113sed 's/^/| /' conftest.$ac_ext >&5
14114
a9322a30 14115ac_cv_working_alloca_h=no
bec39cab
AC
14116fi
14117rm -f conftest.err conftest.$ac_objext \
14118 conftest$ac_exeext conftest.$ac_ext
14119fi
a9322a30
TT
14120echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14121echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
14122if test $ac_cv_working_alloca_h = yes; then
14123
14124cat >>confdefs.h <<\_ACEOF
14125#define HAVE_ALLOCA_H 1
bec39cab 14126_ACEOF
c906108c 14127
c906108c 14128fi
bec39cab 14129
a9322a30
TT
14130echo "$as_me:$LINENO: checking for alloca" >&5
14131echo $ECHO_N "checking for alloca... $ECHO_C" >&6
14132if test "${ac_cv_func_alloca_works+set}" = set; then
bec39cab
AC
14133 echo $ECHO_N "(cached) $ECHO_C" >&6
14134else
14135 cat >conftest.$ac_ext <<_ACEOF
14136/* confdefs.h. */
14137_ACEOF
14138cat confdefs.h >>conftest.$ac_ext
14139cat >>conftest.$ac_ext <<_ACEOF
14140/* end confdefs.h. */
a9322a30
TT
14141#ifdef __GNUC__
14142# define alloca __builtin_alloca
b4e70030 14143#else
a9322a30
TT
14144# ifdef _MSC_VER
14145# include <malloc.h>
14146# define alloca _alloca
14147# else
14148# if HAVE_ALLOCA_H
14149# include <alloca.h>
14150# else
14151# ifdef _AIX
14152 #pragma alloca
14153# else
14154# ifndef alloca /* predefined by HP cc +Olibcalls */
14155char *alloca ();
14156# endif
14157# endif
14158# endif
14159# endif
c906108c 14160#endif
97bf5e38 14161
bec39cab
AC
14162int
14163main ()
14164{
a9322a30 14165char *p = (char *) alloca (1);
bec39cab
AC
14166 ;
14167 return 0;
14168}
14169_ACEOF
14170rm -f conftest.$ac_objext conftest$ac_exeext
14171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14172 (eval $ac_link) 2>conftest.er1
14173 ac_status=$?
14174 grep -v '^ *+' conftest.er1 >conftest.err
14175 rm -f conftest.er1
14176 cat conftest.err >&5
14177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14178 (exit $ac_status); } &&
b4e70030
JB
14179 { ac_try='test -z "$ac_c_werror_flag"
14180 || test ! -s conftest.err'
bec39cab
AC
14181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14182 (eval $ac_try) 2>&5
14183 ac_status=$?
14184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14185 (exit $ac_status); }; } &&
14186 { ac_try='test -s conftest$ac_exeext'
14187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14188 (eval $ac_try) 2>&5
14189 ac_status=$?
14190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14191 (exit $ac_status); }; }; then
a9322a30 14192 ac_cv_func_alloca_works=yes
bec39cab
AC
14193else
14194 echo "$as_me: failed program was:" >&5
14195sed 's/^/| /' conftest.$ac_ext >&5
14196
a9322a30 14197ac_cv_func_alloca_works=no
bec39cab
AC
14198fi
14199rm -f conftest.err conftest.$ac_objext \
14200 conftest$ac_exeext conftest.$ac_ext
14201fi
a9322a30
TT
14202echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14203echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
14204
14205if test $ac_cv_func_alloca_works = yes; then
14206
14207cat >>confdefs.h <<\_ACEOF
14208#define HAVE_ALLOCA 1
bec39cab 14209_ACEOF
c906108c 14210
a9322a30
TT
14211else
14212 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14213# that cause trouble. Some versions do not even contain alloca or
14214# contain a buggy version. If you still want to use their alloca,
14215# use ar to extract alloca.o from them instead of compiling alloca.c.
14216
14217ALLOCA=alloca.$ac_objext
14218
14219cat >>confdefs.h <<\_ACEOF
14220#define C_ALLOCA 1
14221_ACEOF
c906108c 14222
bec39cab 14223
a9322a30
TT
14224echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14225echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
14226if test "${ac_cv_os_cray+set}" = set; then
14227 echo $ECHO_N "(cached) $ECHO_C" >&6
14228else
14229 cat >conftest.$ac_ext <<_ACEOF
14230/* confdefs.h. */
14231_ACEOF
14232cat confdefs.h >>conftest.$ac_ext
14233cat >>conftest.$ac_ext <<_ACEOF
14234/* end confdefs.h. */
14235#if defined(CRAY) && ! defined(CRAY2)
14236webecray
14237#else
14238wenotbecray
14239#endif
14240
14241_ACEOF
14242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14243 $EGREP "webecray" >/dev/null 2>&1; then
14244 ac_cv_os_cray=yes
14245else
14246 ac_cv_os_cray=no
14247fi
14248rm -f conftest*
14249
14250fi
14251echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14252echo "${ECHO_T}$ac_cv_os_cray" >&6
14253if test $ac_cv_os_cray = yes; then
14254 for ac_func in _getb67 GETB67 getb67; do
14255 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14256echo "$as_me:$LINENO: checking for $ac_func" >&5
14257echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14258if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
14259 echo $ECHO_N "(cached) $ECHO_C" >&6
14260else
14261 cat >conftest.$ac_ext <<_ACEOF
14262/* confdefs.h. */
14263_ACEOF
14264cat confdefs.h >>conftest.$ac_ext
14265cat >>conftest.$ac_ext <<_ACEOF
14266/* end confdefs.h. */
14267/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14268 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14269#define $ac_func innocuous_$ac_func
14270
97bf5e38 14271/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
14272 which can conflict with char $ac_func (); below.
14273 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14274 <limits.h> exists even on freestanding compilers. */
14275
14276#ifdef __STDC__
14277# include <limits.h>
14278#else
14279# include <assert.h>
14280#endif
c906108c 14281
bec39cab 14282#undef $ac_func
97bf5e38 14283
b4e70030 14284/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
14285#ifdef __cplusplus
14286extern "C"
b4e70030 14287{
bec39cab 14288#endif
b4e70030
JB
14289/* We use char because int might match the return type of a gcc2
14290 builtin and then its argument prototype would still apply. */
bec39cab 14291char $ac_func ();
97bf5e38
MK
14292/* The GNU C library defines this for functions which it implements
14293 to always fail with ENOSYS. Some functions are actually named
14294 something starting with __ and the normal name is an alias. */
b4e70030 14295#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
97bf5e38 14296choke me
b4e70030
JB
14297#else
14298char (*f) () = $ac_func;
14299#endif
14300#ifdef __cplusplus
14301}
c906108c 14302#endif
97bf5e38 14303
bec39cab
AC
14304int
14305main ()
14306{
b4e70030 14307return f != $ac_func;
bec39cab
AC
14308 ;
14309 return 0;
14310}
14311_ACEOF
14312rm -f conftest.$ac_objext conftest$ac_exeext
14313if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14314 (eval $ac_link) 2>conftest.er1
14315 ac_status=$?
14316 grep -v '^ *+' conftest.er1 >conftest.err
14317 rm -f conftest.er1
14318 cat conftest.err >&5
14319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14320 (exit $ac_status); } &&
b4e70030
JB
14321 { ac_try='test -z "$ac_c_werror_flag"
14322 || test ! -s conftest.err'
bec39cab
AC
14323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14324 (eval $ac_try) 2>&5
14325 ac_status=$?
14326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14327 (exit $ac_status); }; } &&
14328 { ac_try='test -s conftest$ac_exeext'
14329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14330 (eval $ac_try) 2>&5
14331 ac_status=$?
14332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14333 (exit $ac_status); }; }; then
14334 eval "$as_ac_var=yes"
14335else
14336 echo "$as_me: failed program was:" >&5
14337sed 's/^/| /' conftest.$ac_ext >&5
14338
b4e70030 14339eval "$as_ac_var=no"
bec39cab
AC
14340fi
14341rm -f conftest.err conftest.$ac_objext \
14342 conftest$ac_exeext conftest.$ac_ext
14343fi
b4e70030
JB
14344echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14345echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab 14346if test `eval echo '${'$as_ac_var'}'` = yes; then
a9322a30
TT
14347
14348cat >>confdefs.h <<_ACEOF
14349#define CRAY_STACKSEG_END $ac_func
bec39cab 14350_ACEOF
c906108c 14351
a9322a30 14352 break
c906108c
SS
14353fi
14354
a9322a30
TT
14355 done
14356fi
bec39cab 14357
a9322a30
TT
14358echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14359echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
14360if test "${ac_cv_c_stack_direction+set}" = set; then
bec39cab 14361 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
14362else
14363 if test "$cross_compiling" = yes; then
14364 ac_cv_c_stack_direction=0
bec39cab
AC
14365else
14366 cat >conftest.$ac_ext <<_ACEOF
14367/* confdefs.h. */
14368_ACEOF
14369cat confdefs.h >>conftest.$ac_ext
14370cat >>conftest.$ac_ext <<_ACEOF
14371/* end confdefs.h. */
a9322a30
TT
14372int
14373find_stack_direction ()
b4e70030 14374{
a9322a30
TT
14375 static char *addr = 0;
14376 auto char dummy;
14377 if (addr == 0)
14378 {
14379 addr = &dummy;
14380 return find_stack_direction ();
14381 }
14382 else
14383 return (&dummy > addr) ? 1 : -1;
b4e70030 14384}
b757528f 14385
bec39cab
AC
14386int
14387main ()
14388{
a9322a30 14389 exit (find_stack_direction () < 0);
bec39cab
AC
14390}
14391_ACEOF
a9322a30 14392rm -f conftest$ac_exeext
bec39cab 14393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30
TT
14394 (eval $ac_link) 2>&5
14395 ac_status=$?
14396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14397 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14399 (eval $ac_try) 2>&5
14400 ac_status=$?
14401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14402 (exit $ac_status); }; }; then
14403 ac_cv_c_stack_direction=1
14404else
14405 echo "$as_me: program exited with status $ac_status" >&5
14406echo "$as_me: failed program was:" >&5
14407sed 's/^/| /' conftest.$ac_ext >&5
14408
14409( exit $ac_status )
14410ac_cv_c_stack_direction=-1
14411fi
14412rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14413fi
14414fi
14415echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14416echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
14417
14418cat >>confdefs.h <<_ACEOF
14419#define STACK_DIRECTION $ac_cv_c_stack_direction
14420_ACEOF
14421
14422
14423fi
14424
14425
14426
14427for ac_header in stdlib.h unistd.h
14428do
14429as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14430if eval "test \"\${$as_ac_Header+set}\" = set"; then
14431 echo "$as_me:$LINENO: checking for $ac_header" >&5
14432echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14433if eval "test \"\${$as_ac_Header+set}\" = set"; then
14434 echo $ECHO_N "(cached) $ECHO_C" >&6
14435fi
14436echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14437echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14438else
14439 # Is the header compilable?
14440echo "$as_me:$LINENO: checking $ac_header usability" >&5
14441echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14442cat >conftest.$ac_ext <<_ACEOF
14443/* confdefs.h. */
14444_ACEOF
14445cat confdefs.h >>conftest.$ac_ext
14446cat >>conftest.$ac_ext <<_ACEOF
14447/* end confdefs.h. */
14448$ac_includes_default
14449#include <$ac_header>
14450_ACEOF
14451rm -f conftest.$ac_objext
14452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14453 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14454 ac_status=$?
14455 grep -v '^ *+' conftest.er1 >conftest.err
14456 rm -f conftest.er1
14457 cat conftest.err >&5
14458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14459 (exit $ac_status); } &&
b4e70030
JB
14460 { ac_try='test -z "$ac_c_werror_flag"
14461 || test ! -s conftest.err'
bec39cab
AC
14462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14463 (eval $ac_try) 2>&5
14464 ac_status=$?
14465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14466 (exit $ac_status); }; } &&
a9322a30 14467 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
14468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14469 (eval $ac_try) 2>&5
14470 ac_status=$?
14471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14472 (exit $ac_status); }; }; then
a9322a30
TT
14473 ac_header_compiler=yes
14474else
14475 echo "$as_me: failed program was:" >&5
14476sed 's/^/| /' conftest.$ac_ext >&5
14477
14478ac_header_compiler=no
14479fi
14480rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14481echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14482echo "${ECHO_T}$ac_header_compiler" >&6
14483
14484# Is the header present?
14485echo "$as_me:$LINENO: checking $ac_header presence" >&5
14486echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14487cat >conftest.$ac_ext <<_ACEOF
14488/* confdefs.h. */
14489_ACEOF
14490cat confdefs.h >>conftest.$ac_ext
14491cat >>conftest.$ac_ext <<_ACEOF
14492/* end confdefs.h. */
14493#include <$ac_header>
14494_ACEOF
14495if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14496 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14497 ac_status=$?
14498 grep -v '^ *+' conftest.er1 >conftest.err
14499 rm -f conftest.er1
14500 cat conftest.err >&5
14501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14502 (exit $ac_status); } >/dev/null; then
14503 if test -s conftest.err; then
14504 ac_cpp_err=$ac_c_preproc_warn_flag
14505 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14506 else
14507 ac_cpp_err=
14508 fi
14509else
14510 ac_cpp_err=yes
14511fi
14512if test -z "$ac_cpp_err"; then
14513 ac_header_preproc=yes
bec39cab
AC
14514else
14515 echo "$as_me: failed program was:" >&5
14516sed 's/^/| /' conftest.$ac_ext >&5
14517
a9322a30
TT
14518 ac_header_preproc=no
14519fi
14520rm -f conftest.err conftest.$ac_ext
14521echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14522echo "${ECHO_T}$ac_header_preproc" >&6
14523
14524# So? What about this header?
14525case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14526 yes:no: )
14527 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14528echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14529 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14530echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14531 ac_header_preproc=yes
14532 ;;
14533 no:yes:* )
14534 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14535echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14536 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14537echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14538 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14539echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14540 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14541echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
14542 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14543echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14544 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14545echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14546 (
14547 cat <<\_ASBOX
14548## ------------------------------------------ ##
14549## Report this to the AC_PACKAGE_NAME lists. ##
14550## ------------------------------------------ ##
14551_ASBOX
14552 ) |
14553 sed "s/^/$as_me: WARNING: /" >&2
14554 ;;
14555esac
14556echo "$as_me:$LINENO: checking for $ac_header" >&5
14557echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14558if eval "test \"\${$as_ac_Header+set}\" = set"; then
14559 echo $ECHO_N "(cached) $ECHO_C" >&6
14560else
14561 eval "$as_ac_Header=\$ac_header_preproc"
bec39cab 14562fi
a9322a30
TT
14563echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14564echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14565
bec39cab 14566fi
a9322a30 14567if test `eval echo '${'$as_ac_Header'}'` = yes; then
bec39cab 14568 cat >>confdefs.h <<_ACEOF
a9322a30 14569#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 14570_ACEOF
b757528f 14571
b757528f 14572fi
bec39cab 14573
a9322a30 14574done
a3828db0 14575
83116857 14576
a9322a30 14577for ac_func in getpagesize
bcb3dc3d 14578do
bec39cab 14579as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14580echo "$as_me:$LINENO: checking for $ac_func" >&5
14581echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14582if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
14583 echo $ECHO_N "(cached) $ECHO_C" >&6
14584else
14585 cat >conftest.$ac_ext <<_ACEOF
14586/* confdefs.h. */
14587_ACEOF
14588cat confdefs.h >>conftest.$ac_ext
14589cat >>conftest.$ac_ext <<_ACEOF
14590/* end confdefs.h. */
14591/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14592 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14593#define $ac_func innocuous_$ac_func
14594
bcb3dc3d 14595/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
14596 which can conflict with char $ac_func (); below.
14597 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14598 <limits.h> exists even on freestanding compilers. */
14599
14600#ifdef __STDC__
14601# include <limits.h>
14602#else
14603# include <assert.h>
14604#endif
bcb3dc3d 14605
bec39cab 14606#undef $ac_func
bcb3dc3d 14607
b4e70030 14608/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
14609#ifdef __cplusplus
14610extern "C"
b4e70030 14611{
bec39cab 14612#endif
b4e70030
JB
14613/* We use char because int might match the return type of a gcc2
14614 builtin and then its argument prototype would still apply. */
bec39cab 14615char $ac_func ();
bcb3dc3d
MK
14616/* The GNU C library defines this for functions which it implements
14617 to always fail with ENOSYS. Some functions are actually named
14618 something starting with __ and the normal name is an alias. */
b4e70030 14619#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
bcb3dc3d 14620choke me
b4e70030
JB
14621#else
14622char (*f) () = $ac_func;
14623#endif
14624#ifdef __cplusplus
14625}
bcb3dc3d
MK
14626#endif
14627
bec39cab
AC
14628int
14629main ()
14630{
b4e70030 14631return f != $ac_func;
bec39cab
AC
14632 ;
14633 return 0;
14634}
14635_ACEOF
14636rm -f conftest.$ac_objext conftest$ac_exeext
14637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14638 (eval $ac_link) 2>conftest.er1
14639 ac_status=$?
14640 grep -v '^ *+' conftest.er1 >conftest.err
14641 rm -f conftest.er1
14642 cat conftest.err >&5
14643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14644 (exit $ac_status); } &&
b4e70030
JB
14645 { ac_try='test -z "$ac_c_werror_flag"
14646 || test ! -s conftest.err'
bec39cab
AC
14647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14648 (eval $ac_try) 2>&5
14649 ac_status=$?
14650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14651 (exit $ac_status); }; } &&
14652 { ac_try='test -s conftest$ac_exeext'
14653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14654 (eval $ac_try) 2>&5
14655 ac_status=$?
14656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14657 (exit $ac_status); }; }; then
14658 eval "$as_ac_var=yes"
14659else
14660 echo "$as_me: failed program was:" >&5
14661sed 's/^/| /' conftest.$ac_ext >&5
14662
b4e70030 14663eval "$as_ac_var=no"
bec39cab
AC
14664fi
14665rm -f conftest.err conftest.$ac_objext \
14666 conftest$ac_exeext conftest.$ac_ext
14667fi
b4e70030
JB
14668echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14669echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
14670if test `eval echo '${'$as_ac_var'}'` = yes; then
14671 cat >>confdefs.h <<_ACEOF
14672#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14673_ACEOF
bcb3dc3d 14674
bcb3dc3d
MK
14675fi
14676done
14677
a9322a30
TT
14678echo "$as_me:$LINENO: checking for working mmap" >&5
14679echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
14680if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
bec39cab 14681 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
14682else
14683 if test "$cross_compiling" = yes; then
14684 ac_cv_func_mmap_fixed_mapped=no
bec39cab
AC
14685else
14686 cat >conftest.$ac_ext <<_ACEOF
14687/* confdefs.h. */
14688_ACEOF
14689cat confdefs.h >>conftest.$ac_ext
14690cat >>conftest.$ac_ext <<_ACEOF
14691/* end confdefs.h. */
a9322a30
TT
14692$ac_includes_default
14693/* malloc might have been renamed as rpl_malloc. */
14694#undef malloc
bec39cab 14695
a9322a30
TT
14696/* Thanks to Mike Haertel and Jim Avera for this test.
14697 Here is a matrix of mmap possibilities:
14698 mmap private not fixed
14699 mmap private fixed at somewhere currently unmapped
14700 mmap private fixed at somewhere already mapped
14701 mmap shared not fixed
14702 mmap shared fixed at somewhere currently unmapped
14703 mmap shared fixed at somewhere already mapped
14704 For private mappings, we should verify that changes cannot be read()
14705 back from the file, nor mmap's back from the file at a different
14706 address. (There have been systems where private was not correctly
14707 implemented like the infamous i386 svr4.0, and systems where the
14708 VM page cache was not coherent with the file system buffer cache
14709 like early versions of FreeBSD and possibly contemporary NetBSD.)
14710 For shared mappings, we should conversely verify that changes get
14711 propagated back to all the places they're supposed to be.
bec39cab 14712
a9322a30
TT
14713 Grep wants private fixed already mapped.
14714 The main things grep needs to know about mmap are:
14715 * does it exist and is it safe to write into the mmap'd area
14716 * how to use it (BSD variants) */
8b9cf735 14717
a9322a30
TT
14718#include <fcntl.h>
14719#include <sys/mman.h>
8b9cf735 14720
a9322a30
TT
14721#if !STDC_HEADERS && !HAVE_STDLIB_H
14722char *malloc ();
a3828db0
MK
14723#endif
14724
a9322a30
TT
14725/* This mess was copied from the GNU getpagesize.h. */
14726#if !HAVE_GETPAGESIZE
14727/* Assume that all systems that can run configure have sys/param.h. */
14728# if !HAVE_SYS_PARAM_H
14729# define HAVE_SYS_PARAM_H 1
14730# endif
14731
14732# ifdef _SC_PAGESIZE
14733# define getpagesize() sysconf(_SC_PAGESIZE)
14734# else /* no _SC_PAGESIZE */
14735# if HAVE_SYS_PARAM_H
14736# include <sys/param.h>
14737# ifdef EXEC_PAGESIZE
14738# define getpagesize() EXEC_PAGESIZE
14739# else /* no EXEC_PAGESIZE */
14740# ifdef NBPG
14741# define getpagesize() NBPG * CLSIZE
14742# ifndef CLSIZE
14743# define CLSIZE 1
14744# endif /* no CLSIZE */
14745# else /* no NBPG */
14746# ifdef NBPC
14747# define getpagesize() NBPC
14748# else /* no NBPC */
14749# ifdef PAGESIZE
14750# define getpagesize() PAGESIZE
14751# endif /* PAGESIZE */
14752# endif /* no NBPC */
14753# endif /* no NBPG */
14754# endif /* no EXEC_PAGESIZE */
14755# else /* no HAVE_SYS_PARAM_H */
14756# define getpagesize() 8192 /* punt totally */
14757# endif /* no HAVE_SYS_PARAM_H */
14758# endif /* no _SC_PAGESIZE */
14759
14760#endif /* no HAVE_GETPAGESIZE */
14761
bec39cab
AC
14762int
14763main ()
14764{
a9322a30
TT
14765 char *data, *data2, *data3;
14766 int i, pagesize;
14767 int fd;
14768
14769 pagesize = getpagesize ();
14770
14771 /* First, make a file with some known garbage in it. */
14772 data = (char *) malloc (pagesize);
14773 if (!data)
14774 exit (1);
14775 for (i = 0; i < pagesize; ++i)
14776 *(data + i) = rand ();
14777 umask (0);
14778 fd = creat ("conftest.mmap", 0600);
14779 if (fd < 0)
14780 exit (1);
14781 if (write (fd, data, pagesize) != pagesize)
14782 exit (1);
14783 close (fd);
14784
14785 /* Next, try to mmap the file at a fixed address which already has
14786 something else allocated at it. If we can, also make sure that
14787 we see the same garbage. */
14788 fd = open ("conftest.mmap", O_RDWR);
14789 if (fd < 0)
14790 exit (1);
14791 data2 = (char *) malloc (2 * pagesize);
14792 if (!data2)
14793 exit (1);
14794 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
14795 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
14796 MAP_PRIVATE | MAP_FIXED, fd, 0L))
14797 exit (1);
14798 for (i = 0; i < pagesize; ++i)
14799 if (*(data + i) != *(data2 + i))
14800 exit (1);
14801
14802 /* Finally, make sure that changes to the mapped area do not
14803 percolate back to the file as seen by read(). (This is a bug on
14804 some variants of i386 svr4.0.) */
14805 for (i = 0; i < pagesize; ++i)
14806 *(data2 + i) = *(data2 + i) + 1;
14807 data3 = (char *) malloc (pagesize);
14808 if (!data3)
14809 exit (1);
14810 if (read (fd, data3, pagesize) != pagesize)
14811 exit (1);
14812 for (i = 0; i < pagesize; ++i)
14813 if (*(data + i) != *(data3 + i))
14814 exit (1);
14815 close (fd);
14816 exit (0);
bec39cab
AC
14817}
14818_ACEOF
a9322a30 14819rm -f conftest$ac_exeext
a3828db0 14820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30 14821 (eval $ac_link) 2>&5
bec39cab
AC
14822 ac_status=$?
14823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30 14824 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
14825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14826 (eval $ac_try) 2>&5
14827 ac_status=$?
14828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14829 (exit $ac_status); }; }; then
a9322a30 14830 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 14831else
a9322a30
TT
14832 echo "$as_me: program exited with status $ac_status" >&5
14833echo "$as_me: failed program was:" >&5
bec39cab
AC
14834sed 's/^/| /' conftest.$ac_ext >&5
14835
a9322a30
TT
14836( exit $ac_status )
14837ac_cv_func_mmap_fixed_mapped=no
a3828db0 14838fi
a9322a30 14839rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a3828db0 14840fi
a9322a30
TT
14841fi
14842echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
14843echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
14844if test $ac_cv_func_mmap_fixed_mapped = yes; then
14845
14846cat >>confdefs.h <<\_ACEOF
14847#define HAVE_MMAP 1
a3828db0
MK
14848_ACEOF
14849
086ec9eb 14850fi
a9322a30 14851rm -f conftest.mmap
a3828db0 14852
a9322a30
TT
14853echo "$as_me:$LINENO: checking for pid_t" >&5
14854echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
14855if test "${ac_cv_type_pid_t+set}" = set; then
a3828db0
MK
14856 echo $ECHO_N "(cached) $ECHO_C" >&6
14857else
14858 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14859/* confdefs.h. */
14860_ACEOF
14861cat confdefs.h >>conftest.$ac_ext
14862cat >>conftest.$ac_ext <<_ACEOF
14863/* end confdefs.h. */
a9322a30 14864$ac_includes_default
bec39cab
AC
14865int
14866main ()
14867{
a9322a30
TT
14868if ((pid_t *) 0)
14869 return 0;
14870if (sizeof (pid_t))
14871 return 0;
bec39cab
AC
14872 ;
14873 return 0;
14874}
14875_ACEOF
a9322a30
TT
14876rm -f conftest.$ac_objext
14877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14878 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14879 ac_status=$?
14880 grep -v '^ *+' conftest.er1 >conftest.err
14881 rm -f conftest.er1
14882 cat conftest.err >&5
14883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14884 (exit $ac_status); } &&
b4e70030
JB
14885 { ac_try='test -z "$ac_c_werror_flag"
14886 || test ! -s conftest.err'
bec39cab
AC
14887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14888 (eval $ac_try) 2>&5
14889 ac_status=$?
14890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14891 (exit $ac_status); }; } &&
a9322a30 14892 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
14893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14894 (eval $ac_try) 2>&5
14895 ac_status=$?
14896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14897 (exit $ac_status); }; }; then
a9322a30 14898 ac_cv_type_pid_t=yes
086ec9eb 14899else
bec39cab
AC
14900 echo "$as_me: failed program was:" >&5
14901sed 's/^/| /' conftest.$ac_ext >&5
14902
a9322a30 14903ac_cv_type_pid_t=no
086ec9eb 14904fi
a9322a30 14905rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
086ec9eb 14906fi
a9322a30
TT
14907echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
14908echo "${ECHO_T}$ac_cv_type_pid_t" >&6
14909if test $ac_cv_type_pid_t = yes; then
14910 :
14911else
14912
14913cat >>confdefs.h <<_ACEOF
14914#define pid_t int
bec39cab 14915_ACEOF
086ec9eb
MK
14916
14917fi
14918
a3828db0 14919
a9322a30
TT
14920
14921for ac_header in unistd.h vfork.h
a3828db0 14922do
a9322a30
TT
14923as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14924if eval "test \"\${$as_ac_Header+set}\" = set"; then
14925 echo "$as_me:$LINENO: checking for $ac_header" >&5
14926echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14927if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 14928 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
14929fi
14930echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14931echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 14932else
a9322a30
TT
14933 # Is the header compilable?
14934echo "$as_me:$LINENO: checking $ac_header usability" >&5
14935echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14936cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14937/* confdefs.h. */
14938_ACEOF
14939cat confdefs.h >>conftest.$ac_ext
14940cat >>conftest.$ac_ext <<_ACEOF
14941/* end confdefs.h. */
a9322a30
TT
14942$ac_includes_default
14943#include <$ac_header>
bec39cab 14944_ACEOF
a9322a30
TT
14945rm -f conftest.$ac_objext
14946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14947 (eval $ac_compile) 2>conftest.er1
bec39cab 14948 ac_status=$?
a3828db0
MK
14949 grep -v '^ *+' conftest.er1 >conftest.err
14950 rm -f conftest.er1
14951 cat conftest.err >&5
bec39cab 14952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 14953 (exit $ac_status); } &&
b4e70030
JB
14954 { ac_try='test -z "$ac_c_werror_flag"
14955 || test ! -s conftest.err'
a3828db0
MK
14956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14957 (eval $ac_try) 2>&5
14958 ac_status=$?
14959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14960 (exit $ac_status); }; } &&
a9322a30 14961 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
14962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14963 (eval $ac_try) 2>&5
14964 ac_status=$?
14965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14966 (exit $ac_status); }; }; then
a9322a30 14967 ac_header_compiler=yes
c906108c 14968else
a3828db0 14969 echo "$as_me: failed program was:" >&5
bec39cab
AC
14970sed 's/^/| /' conftest.$ac_ext >&5
14971
a9322a30 14972ac_header_compiler=no
97bf5e38 14973fi
a9322a30
TT
14974rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14975echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14976echo "${ECHO_T}$ac_header_compiler" >&6
14977
14978# Is the header present?
14979echo "$as_me:$LINENO: checking $ac_header presence" >&5
14980echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14981cat >conftest.$ac_ext <<_ACEOF
14982/* confdefs.h. */
14983_ACEOF
14984cat confdefs.h >>conftest.$ac_ext
14985cat >>conftest.$ac_ext <<_ACEOF
14986/* end confdefs.h. */
14987#include <$ac_header>
14988_ACEOF
14989if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14990 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14991 ac_status=$?
14992 grep -v '^ *+' conftest.er1 >conftest.err
14993 rm -f conftest.er1
14994 cat conftest.err >&5
14995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14996 (exit $ac_status); } >/dev/null; then
14997 if test -s conftest.err; then
14998 ac_cpp_err=$ac_c_preproc_warn_flag
14999 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15000 else
15001 ac_cpp_err=
15002 fi
15003else
15004 ac_cpp_err=yes
a3828db0 15005fi
a9322a30
TT
15006if test -z "$ac_cpp_err"; then
15007 ac_header_preproc=yes
15008else
15009 echo "$as_me: failed program was:" >&5
15010sed 's/^/| /' conftest.$ac_ext >&5
15011
15012 ac_header_preproc=no
15013fi
15014rm -f conftest.err conftest.$ac_ext
15015echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15016echo "${ECHO_T}$ac_header_preproc" >&6
15017
15018# So? What about this header?
15019case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15020 yes:no: )
15021 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15022echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15023 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15024echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15025 ac_header_preproc=yes
15026 ;;
15027 no:yes:* )
15028 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15029echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15030 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15031echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15032 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15033echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15034 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15035echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
15036 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15037echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15038 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15039echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15040 (
15041 cat <<\_ASBOX
15042## ------------------------------------------ ##
15043## Report this to the AC_PACKAGE_NAME lists. ##
15044## ------------------------------------------ ##
15045_ASBOX
15046 ) |
15047 sed "s/^/$as_me: WARNING: /" >&2
15048 ;;
15049esac
15050echo "$as_me:$LINENO: checking for $ac_header" >&5
15051echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15052if eval "test \"\${$as_ac_Header+set}\" = set"; then
15053 echo $ECHO_N "(cached) $ECHO_C" >&6
15054else
15055 eval "$as_ac_Header=\$ac_header_preproc"
15056fi
15057echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15058echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15059
15060fi
15061if test `eval echo '${'$as_ac_Header'}'` = yes; then
a3828db0 15062 cat >>confdefs.h <<_ACEOF
a9322a30 15063#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 15064_ACEOF
c906108c
SS
15065
15066fi
a9322a30 15067
a3828db0 15068done
c906108c 15069
a3828db0 15070
a9322a30
TT
15071
15072for ac_func in fork vfork
a3828db0
MK
15073do
15074as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15075echo "$as_me:$LINENO: checking for $ac_func" >&5
15076echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15077if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 15078 echo $ECHO_N "(cached) $ECHO_C" >&6
b83266a0 15079else
bec39cab
AC
15080 cat >conftest.$ac_ext <<_ACEOF
15081/* confdefs.h. */
15082_ACEOF
15083cat confdefs.h >>conftest.$ac_ext
15084cat >>conftest.$ac_ext <<_ACEOF
15085/* end confdefs.h. */
a3828db0
MK
15086/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15087 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15088#define $ac_func innocuous_$ac_func
b83266a0 15089
a3828db0
MK
15090/* System header to define __stub macros and hopefully few prototypes,
15091 which can conflict with char $ac_func (); below.
15092 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15093 <limits.h> exists even on freestanding compilers. */
15094
15095#ifdef __STDC__
15096# include <limits.h>
15097#else
15098# include <assert.h>
15099#endif
15100
15101#undef $ac_func
15102
b4e70030 15103/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
15104#ifdef __cplusplus
15105extern "C"
b4e70030 15106{
a3828db0 15107#endif
b4e70030
JB
15108/* We use char because int might match the return type of a gcc2
15109 builtin and then its argument prototype would still apply. */
a3828db0
MK
15110char $ac_func ();
15111/* The GNU C library defines this for functions which it implements
15112 to always fail with ENOSYS. Some functions are actually named
15113 something starting with __ and the normal name is an alias. */
b4e70030 15114#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 15115choke me
b4e70030
JB
15116#else
15117char (*f) () = $ac_func;
15118#endif
15119#ifdef __cplusplus
15120}
a3828db0 15121#endif
97bf5e38 15122
bec39cab
AC
15123int
15124main ()
15125{
b4e70030 15126return f != $ac_func;
bec39cab
AC
15127 ;
15128 return 0;
15129}
15130_ACEOF
a3828db0
MK
15131rm -f conftest.$ac_objext conftest$ac_exeext
15132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15133 (eval $ac_link) 2>conftest.er1
bec39cab
AC
15134 ac_status=$?
15135 grep -v '^ *+' conftest.er1 >conftest.err
15136 rm -f conftest.er1
15137 cat conftest.err >&5
15138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15139 (exit $ac_status); } &&
b4e70030
JB
15140 { ac_try='test -z "$ac_c_werror_flag"
15141 || test ! -s conftest.err'
bec39cab
AC
15142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15143 (eval $ac_try) 2>&5
15144 ac_status=$?
15145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15146 (exit $ac_status); }; } &&
a3828db0 15147 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
15148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15149 (eval $ac_try) 2>&5
15150 ac_status=$?
15151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15152 (exit $ac_status); }; }; then
a3828db0 15153 eval "$as_ac_var=yes"
b83266a0 15154else
bec39cab
AC
15155 echo "$as_me: failed program was:" >&5
15156sed 's/^/| /' conftest.$ac_ext >&5
15157
b4e70030 15158eval "$as_ac_var=no"
b83266a0 15159fi
a3828db0
MK
15160rm -f conftest.err conftest.$ac_objext \
15161 conftest$ac_exeext conftest.$ac_ext
b83266a0 15162fi
b4e70030
JB
15163echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15164echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
15165if test `eval echo '${'$as_ac_var'}'` = yes; then
15166 cat >>confdefs.h <<_ACEOF
15167#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 15168_ACEOF
b83266a0 15169
97bf5e38 15170fi
a3828db0 15171done
b83266a0 15172
a9322a30
TT
15173if test "x$ac_cv_func_fork" = xyes; then
15174 echo "$as_me:$LINENO: checking for working fork" >&5
15175echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15176if test "${ac_cv_func_fork_works+set}" = set; then
15177 echo $ECHO_N "(cached) $ECHO_C" >&6
15178else
15179 if test "$cross_compiling" = yes; then
15180 ac_cv_func_fork_works=cross
15181else
15182 cat >conftest.$ac_ext <<_ACEOF
15183/* By Ruediger Kuhlmann. */
15184 #include <sys/types.h>
15185 #if HAVE_UNISTD_H
15186 # include <unistd.h>
15187 #endif
15188 /* Some systems only have a dummy stub for fork() */
15189 int main ()
15190 {
15191 if (fork() < 0)
15192 exit (1);
15193 exit (0);
15194 }
15195_ACEOF
15196rm -f conftest$ac_exeext
15197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15198 (eval $ac_link) 2>&5
15199 ac_status=$?
15200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15201 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15203 (eval $ac_try) 2>&5
15204 ac_status=$?
15205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15206 (exit $ac_status); }; }; then
15207 ac_cv_func_fork_works=yes
15208else
15209 echo "$as_me: program exited with status $ac_status" >&5
15210echo "$as_me: failed program was:" >&5
15211sed 's/^/| /' conftest.$ac_ext >&5
15212
15213( exit $ac_status )
15214ac_cv_func_fork_works=no
15215fi
15216rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15217fi
15218fi
15219echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
15220echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15221
15222else
15223 ac_cv_func_fork_works=$ac_cv_func_fork
15224fi
15225if test "x$ac_cv_func_fork_works" = xcross; then
15226 case $host in
15227 *-*-amigaos* | *-*-msdosdjgpp*)
15228 # Override, as these systems have only a dummy fork() stub
15229 ac_cv_func_fork_works=no
15230 ;;
15231 *)
15232 ac_cv_func_fork_works=yes
15233 ;;
15234 esac
15235 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15236echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15237fi
15238ac_cv_func_vfork_works=$ac_cv_func_vfork
15239if test "x$ac_cv_func_vfork" = xyes; then
15240 echo "$as_me:$LINENO: checking for working vfork" >&5
15241echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15242if test "${ac_cv_func_vfork_works+set}" = set; then
15243 echo $ECHO_N "(cached) $ECHO_C" >&6
15244else
15245 if test "$cross_compiling" = yes; then
15246 ac_cv_func_vfork_works=cross
15247else
15248 cat >conftest.$ac_ext <<_ACEOF
15249/* confdefs.h. */
15250_ACEOF
15251cat confdefs.h >>conftest.$ac_ext
15252cat >>conftest.$ac_ext <<_ACEOF
15253/* end confdefs.h. */
15254/* Thanks to Paul Eggert for this test. */
15255#include <stdio.h>
15256#include <stdlib.h>
15257#include <sys/types.h>
15258#include <sys/stat.h>
15259#include <sys/wait.h>
15260#if HAVE_UNISTD_H
15261# include <unistd.h>
15262#endif
15263#if HAVE_VFORK_H
15264# include <vfork.h>
15265#endif
15266/* On some sparc systems, changes by the child to local and incoming
15267 argument registers are propagated back to the parent. The compiler
15268 is told about this with #include <vfork.h>, but some compilers
15269 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15270 static variable whose address is put into a register that is
15271 clobbered by the vfork. */
15272static void
15273#ifdef __cplusplus
15274sparc_address_test (int arg)
15275# else
15276sparc_address_test (arg) int arg;
15277#endif
15278{
15279 static pid_t child;
15280 if (!child) {
15281 child = vfork ();
15282 if (child < 0) {
15283 perror ("vfork");
15284 _exit(2);
15285 }
15286 if (!child) {
15287 arg = getpid();
15288 write(-1, "", 0);
15289 _exit (arg);
15290 }
15291 }
15292}
15293
15294int
15295main ()
15296{
15297 pid_t parent = getpid ();
15298 pid_t child;
15299
15300 sparc_address_test (0);
15301
15302 child = vfork ();
15303
15304 if (child == 0) {
15305 /* Here is another test for sparc vfork register problems. This
15306 test uses lots of local variables, at least as many local
15307 variables as main has allocated so far including compiler
15308 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15309 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15310 reuse the register of parent for one of the local variables,
15311 since it will think that parent can't possibly be used any more
15312 in this routine. Assigning to the local variable will thus
15313 munge parent in the parent process. */
15314 pid_t
15315 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15316 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15317 /* Convince the compiler that p..p7 are live; otherwise, it might
15318 use the same hardware register for all 8 local variables. */
15319 if (p != p1 || p != p2 || p != p3 || p != p4
15320 || p != p5 || p != p6 || p != p7)
15321 _exit(1);
15322
15323 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15324 from child file descriptors. If the child closes a descriptor
15325 before it execs or exits, this munges the parent's descriptor
15326 as well. Test for this by closing stdout in the child. */
15327 _exit(close(fileno(stdout)) != 0);
15328 } else {
15329 int status;
15330 struct stat st;
15331
15332 while (wait(&status) != child)
15333 ;
15334 exit(
15335 /* Was there some problem with vforking? */
15336 child < 0
15337
15338 /* Did the child fail? (This shouldn't happen.) */
15339 || status
15340
15341 /* Did the vfork/compiler bug occur? */
15342 || parent != getpid()
15343
15344 /* Did the file descriptor bug occur? */
15345 || fstat(fileno(stdout), &st) != 0
15346 );
15347 }
15348}
15349_ACEOF
15350rm -f conftest$ac_exeext
15351if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15352 (eval $ac_link) 2>&5
15353 ac_status=$?
15354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15355 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15357 (eval $ac_try) 2>&5
15358 ac_status=$?
15359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15360 (exit $ac_status); }; }; then
15361 ac_cv_func_vfork_works=yes
15362else
15363 echo "$as_me: program exited with status $ac_status" >&5
15364echo "$as_me: failed program was:" >&5
15365sed 's/^/| /' conftest.$ac_ext >&5
15366
15367( exit $ac_status )
15368ac_cv_func_vfork_works=no
15369fi
15370rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15371fi
15372fi
15373echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
15374echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15375
15376fi;
15377if test "x$ac_cv_func_fork_works" = xcross; then
15378 ac_cv_func_vfork_works=$ac_cv_func_vfork
15379 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15380echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15381fi
15382
15383if test "x$ac_cv_func_vfork_works" = xyes; then
15384
15385cat >>confdefs.h <<\_ACEOF
15386#define HAVE_WORKING_VFORK 1
15387_ACEOF
15388
15389else
15390
15391cat >>confdefs.h <<\_ACEOF
15392#define vfork fork
15393_ACEOF
15394
15395fi
15396if test "x$ac_cv_func_fork_works" = xyes; then
15397
15398cat >>confdefs.h <<\_ACEOF
15399#define HAVE_WORKING_FORK 1
15400_ACEOF
15401
15402fi
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
a3828db0 15421
a8111142 15422
a9322a30
TT
15423for ac_func in canonicalize_file_name realpath getrusage getuid \
15424 getgid poll pread64 sbrk setpgid setpgrp setsid \
15425 sigaction sigprocmask sigsetmask socketpair syscall \
a8111142 15426 ttrace wborder setlocale
a3828db0
MK
15427do
15428as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15429echo "$as_me:$LINENO: checking for $ac_func" >&5
15430echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15431if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
15432 echo $ECHO_N "(cached) $ECHO_C" >&6
15433else
15434 cat >conftest.$ac_ext <<_ACEOF
15435/* confdefs.h. */
15436_ACEOF
15437cat confdefs.h >>conftest.$ac_ext
15438cat >>conftest.$ac_ext <<_ACEOF
15439/* end confdefs.h. */
a3828db0
MK
15440/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15441 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15442#define $ac_func innocuous_$ac_func
a4db0f07 15443
a3828db0
MK
15444/* System header to define __stub macros and hopefully few prototypes,
15445 which can conflict with char $ac_func (); below.
15446 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15447 <limits.h> exists even on freestanding compilers. */
15448
15449#ifdef __STDC__
15450# include <limits.h>
15451#else
15452# include <assert.h>
15453#endif
15454
15455#undef $ac_func
15456
b4e70030 15457/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
15458#ifdef __cplusplus
15459extern "C"
b4e70030 15460{
a3828db0 15461#endif
b4e70030
JB
15462/* We use char because int might match the return type of a gcc2
15463 builtin and then its argument prototype would still apply. */
a3828db0
MK
15464char $ac_func ();
15465/* The GNU C library defines this for functions which it implements
15466 to always fail with ENOSYS. Some functions are actually named
15467 something starting with __ and the normal name is an alias. */
b4e70030 15468#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 15469choke me
b4e70030
JB
15470#else
15471char (*f) () = $ac_func;
15472#endif
15473#ifdef __cplusplus
15474}
a3828db0 15475#endif
97bf5e38 15476
bec39cab
AC
15477int
15478main ()
15479{
b4e70030 15480return f != $ac_func;
bec39cab
AC
15481 ;
15482 return 0;
15483}
15484_ACEOF
a3828db0
MK
15485rm -f conftest.$ac_objext conftest$ac_exeext
15486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15487 (eval $ac_link) 2>conftest.er1
bec39cab
AC
15488 ac_status=$?
15489 grep -v '^ *+' conftest.er1 >conftest.err
15490 rm -f conftest.er1
15491 cat conftest.err >&5
15492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15493 (exit $ac_status); } &&
b4e70030
JB
15494 { ac_try='test -z "$ac_c_werror_flag"
15495 || test ! -s conftest.err'
bec39cab
AC
15496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15497 (eval $ac_try) 2>&5
15498 ac_status=$?
15499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15500 (exit $ac_status); }; } &&
a3828db0 15501 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
15502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15503 (eval $ac_try) 2>&5
15504 ac_status=$?
15505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15506 (exit $ac_status); }; }; then
a3828db0 15507 eval "$as_ac_var=yes"
a4db0f07 15508else
bec39cab
AC
15509 echo "$as_me: failed program was:" >&5
15510sed 's/^/| /' conftest.$ac_ext >&5
15511
b4e70030 15512eval "$as_ac_var=no"
a4db0f07 15513fi
a3828db0
MK
15514rm -f conftest.err conftest.$ac_objext \
15515 conftest$ac_exeext conftest.$ac_ext
a4db0f07 15516fi
b4e70030
JB
15517echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15518echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
15519if test `eval echo '${'$as_ac_var'}'` = yes; then
15520 cat >>confdefs.h <<_ACEOF
15521#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 15522_ACEOF
a4db0f07
RH
15523
15524fi
a3828db0 15525done
c906108c 15526
06825bd1 15527
a3828db0
MK
15528# Check the return and argument types of ptrace. No canned test for
15529# this, so roll our own.
15530gdb_ptrace_headers='
15531#if HAVE_SYS_TYPES_H
15532# include <sys/types.h>
15533#endif
15534#if HAVE_SYS_PTRACE_H
15535# include <sys/ptrace.h>
15536#endif
15537#if HAVE_UNISTD_H
15538# include <unistd.h>
15539#endif
15540'
15541# There is no point in checking if we don't have a prototype.
b4e70030
JB
15542echo "$as_me:$LINENO: checking whether ptrace is declared" >&5
15543echo $ECHO_N "checking whether ptrace is declared... $ECHO_C" >&6
a3828db0 15544if test "${ac_cv_have_decl_ptrace+set}" = set; then
bec39cab
AC
15545 echo $ECHO_N "(cached) $ECHO_C" >&6
15546else
15547 cat >conftest.$ac_ext <<_ACEOF
15548/* confdefs.h. */
15549_ACEOF
15550cat confdefs.h >>conftest.$ac_ext
15551cat >>conftest.$ac_ext <<_ACEOF
15552/* end confdefs.h. */
a3828db0
MK
15553$gdb_ptrace_headers
15554
bec39cab
AC
15555int
15556main ()
15557{
a3828db0
MK
15558#ifndef ptrace
15559 char *p = (char *) ptrace;
06825bd1 15560#endif
a3828db0 15561
bec39cab
AC
15562 ;
15563 return 0;
15564}
15565_ACEOF
15566rm -f conftest.$ac_objext
15567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15568 (eval $ac_compile) 2>conftest.er1
15569 ac_status=$?
15570 grep -v '^ *+' conftest.er1 >conftest.err
15571 rm -f conftest.er1
15572 cat conftest.err >&5
15573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15574 (exit $ac_status); } &&
b4e70030
JB
15575 { ac_try='test -z "$ac_c_werror_flag"
15576 || test ! -s conftest.err'
bec39cab
AC
15577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15578 (eval $ac_try) 2>&5
15579 ac_status=$?
15580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15581 (exit $ac_status); }; } &&
15582 { ac_try='test -s conftest.$ac_objext'
15583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15584 (eval $ac_try) 2>&5
15585 ac_status=$?
15586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15587 (exit $ac_status); }; }; then
a3828db0 15588 ac_cv_have_decl_ptrace=yes
06825bd1 15589else
bec39cab
AC
15590 echo "$as_me: failed program was:" >&5
15591sed 's/^/| /' conftest.$ac_ext >&5
15592
b4e70030 15593ac_cv_have_decl_ptrace=no
06825bd1 15594fi
bec39cab 15595rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 15596fi
b4e70030
JB
15597echo "$as_me:$LINENO: result: $ac_cv_have_decl_ptrace" >&5
15598echo "${ECHO_T}$ac_cv_have_decl_ptrace" >&6
a3828db0 15599if test $ac_cv_have_decl_ptrace = yes; then
06825bd1 15600
a3828db0
MK
15601cat >>confdefs.h <<_ACEOF
15602#define HAVE_DECL_PTRACE 1
15603_ACEOF
bec39cab 15604
bec39cab 15605
a3828db0
MK
15606else
15607 cat >>confdefs.h <<_ACEOF
15608#define HAVE_DECL_PTRACE 0
bec39cab 15609_ACEOF
06825bd1 15610
a3828db0
MK
15611
15612 : ${gdb_cv_func_ptrace_ret='int'}
15613 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15614
06825bd1
MK
15615fi
15616
a3828db0 15617
064ef605
DJ
15618# Check return type. Varargs (used on GNU/Linux) conflict with the
15619# empty argument list, so check for that explicitly.
b4e70030
JB
15620echo "$as_me:$LINENO: checking return type of ptrace" >&5
15621echo $ECHO_N "checking return type of ptrace... $ECHO_C" >&6
a3828db0 15622if test "${gdb_cv_func_ptrace_ret+set}" = set; then
bec39cab
AC
15623 echo $ECHO_N "(cached) $ECHO_C" >&6
15624else
15625 cat >conftest.$ac_ext <<_ACEOF
15626/* confdefs.h. */
15627_ACEOF
15628cat confdefs.h >>conftest.$ac_ext
15629cat >>conftest.$ac_ext <<_ACEOF
15630/* end confdefs.h. */
a3828db0 15631$gdb_ptrace_headers
bec39cab
AC
15632int
15633main ()
15634{
064ef605
DJ
15635extern long ptrace (enum __ptrace_request, ...);
15636 ;
15637 return 0;
15638}
15639_ACEOF
15640rm -f conftest.$ac_objext
15641if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15642 (eval $ac_compile) 2>conftest.er1
15643 ac_status=$?
15644 grep -v '^ *+' conftest.er1 >conftest.err
15645 rm -f conftest.er1
15646 cat conftest.err >&5
15647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15648 (exit $ac_status); } &&
15649 { ac_try='test -z "$ac_c_werror_flag"
15650 || test ! -s conftest.err'
15651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15652 (eval $ac_try) 2>&5
15653 ac_status=$?
15654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15655 (exit $ac_status); }; } &&
15656 { ac_try='test -s conftest.$ac_objext'
15657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15658 (eval $ac_try) 2>&5
15659 ac_status=$?
15660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15661 (exit $ac_status); }; }; then
15662 gdb_cv_func_ptrace_ret='long'
15663else
15664 echo "$as_me: failed program was:" >&5
15665sed 's/^/| /' conftest.$ac_ext >&5
15666
15667cat >conftest.$ac_ext <<_ACEOF
15668/* confdefs.h. */
15669_ACEOF
15670cat confdefs.h >>conftest.$ac_ext
15671cat >>conftest.$ac_ext <<_ACEOF
15672/* end confdefs.h. */
15673$gdb_ptrace_headers
15674int
15675main ()
15676{
a3828db0 15677extern int ptrace ();
bec39cab
AC
15678 ;
15679 return 0;
15680}
15681_ACEOF
15682rm -f conftest.$ac_objext
15683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15684 (eval $ac_compile) 2>conftest.er1
15685 ac_status=$?
15686 grep -v '^ *+' conftest.er1 >conftest.err
15687 rm -f conftest.er1
15688 cat conftest.err >&5
15689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15690 (exit $ac_status); } &&
b4e70030
JB
15691 { ac_try='test -z "$ac_c_werror_flag"
15692 || test ! -s conftest.err'
bec39cab
AC
15693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15694 (eval $ac_try) 2>&5
15695 ac_status=$?
15696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697 (exit $ac_status); }; } &&
15698 { ac_try='test -s conftest.$ac_objext'
15699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15700 (eval $ac_try) 2>&5
15701 ac_status=$?
15702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15703 (exit $ac_status); }; }; then
a3828db0 15704 gdb_cv_func_ptrace_ret='int'
70f9f479 15705else
bec39cab
AC
15706 echo "$as_me: failed program was:" >&5
15707sed 's/^/| /' conftest.$ac_ext >&5
15708
b4e70030 15709gdb_cv_func_ptrace_ret='long'
70f9f479 15710fi
bec39cab 15711rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 15712fi
064ef605
DJ
15713rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15714fi
b4e70030
JB
15715echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_ret" >&5
15716echo "${ECHO_T}$gdb_cv_func_ptrace_ret" >&6
bec39cab 15717
a3828db0
MK
15718cat >>confdefs.h <<_ACEOF
15719#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 15720_ACEOF
70f9f479 15721
a3828db0 15722# Check argument types.
b4e70030
JB
15723echo "$as_me:$LINENO: checking types of arguments for ptrace" >&5
15724echo $ECHO_N "checking types of arguments for ptrace... $ECHO_C" >&6
a3828db0 15725if test "${gdb_cv_func_ptrace_args+set}" = set; then
bec39cab
AC
15726 echo $ECHO_N "(cached) $ECHO_C" >&6
15727else
a3828db0 15728
064ef605
DJ
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$gdb_ptrace_headers
15736int
15737main ()
15738{
15739extern long ptrace (enum __ptrace_request, ...);
15740 ;
15741 return 0;
15742}
15743_ACEOF
15744rm -f conftest.$ac_objext
15745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15746 (eval $ac_compile) 2>conftest.er1
15747 ac_status=$?
15748 grep -v '^ *+' conftest.er1 >conftest.err
15749 rm -f conftest.er1
15750 cat conftest.err >&5
15751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15752 (exit $ac_status); } &&
15753 { ac_try='test -z "$ac_c_werror_flag"
15754 || test ! -s conftest.err'
15755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15756 (eval $ac_try) 2>&5
15757 ac_status=$?
15758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15759 (exit $ac_status); }; } &&
15760 { ac_try='test -s conftest.$ac_objext'
15761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15762 (eval $ac_try) 2>&5
15763 ac_status=$?
15764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15765 (exit $ac_status); }; }; then
15766 gdb_cv_func_ptrace_args='int,int,long,long'
15767else
15768 echo "$as_me: failed program was:" >&5
15769sed 's/^/| /' conftest.$ac_ext >&5
15770
15771
a3828db0
MK
15772for gdb_arg1 in 'int' 'long'; do
15773 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 15774 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0
MK
15775 for gdb_arg4 in 'int' 'long'; do
15776 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15777/* confdefs.h. */
15778_ACEOF
15779cat confdefs.h >>conftest.$ac_ext
15780cat >>conftest.$ac_ext <<_ACEOF
15781/* end confdefs.h. */
a3828db0 15782$gdb_ptrace_headers
bec39cab
AC
15783int
15784main ()
15785{
a3828db0
MK
15786
15787extern $gdb_cv_func_ptrace_ret
15788 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15789
bec39cab
AC
15790 ;
15791 return 0;
15792}
15793_ACEOF
15794rm -f conftest.$ac_objext
15795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15796 (eval $ac_compile) 2>conftest.er1
15797 ac_status=$?
15798 grep -v '^ *+' conftest.er1 >conftest.err
15799 rm -f conftest.er1
15800 cat conftest.err >&5
15801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15802 (exit $ac_status); } &&
b4e70030
JB
15803 { ac_try='test -z "$ac_c_werror_flag"
15804 || test ! -s conftest.err'
bec39cab
AC
15805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15806 (eval $ac_try) 2>&5
15807 ac_status=$?
15808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15809 (exit $ac_status); }; } &&
15810 { ac_try='test -s conftest.$ac_objext'
15811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15812 (eval $ac_try) 2>&5
15813 ac_status=$?
15814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15815 (exit $ac_status); }; }; then
a3828db0
MK
15816 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15817 break 4;
5c7f2947 15818else
bec39cab
AC
15819 echo "$as_me: failed program was:" >&5
15820sed 's/^/| /' conftest.$ac_ext >&5
15821
5c7f2947 15822fi
bec39cab 15823rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
15824 for gdb_arg5 in 'int *' 'int' 'long'; do
15825 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15826/* confdefs.h. */
15827_ACEOF
15828cat confdefs.h >>conftest.$ac_ext
15829cat >>conftest.$ac_ext <<_ACEOF
15830/* end confdefs.h. */
a3828db0 15831$gdb_ptrace_headers
bec39cab
AC
15832int
15833main ()
15834{
a3828db0
MK
15835
15836extern $gdb_cv_func_ptrace_ret
15837 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15838
bec39cab
AC
15839 ;
15840 return 0;
15841}
15842_ACEOF
15843rm -f conftest.$ac_objext
15844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15845 (eval $ac_compile) 2>conftest.er1
15846 ac_status=$?
15847 grep -v '^ *+' conftest.er1 >conftest.err
15848 rm -f conftest.er1
15849 cat conftest.err >&5
15850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15851 (exit $ac_status); } &&
b4e70030
JB
15852 { ac_try='test -z "$ac_c_werror_flag"
15853 || test ! -s conftest.err'
bec39cab
AC
15854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15855 (eval $ac_try) 2>&5
15856 ac_status=$?
15857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15858 (exit $ac_status); }; } &&
15859 { ac_try='test -s conftest.$ac_objext'
15860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15861 (eval $ac_try) 2>&5
15862 ac_status=$?
15863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15864 (exit $ac_status); }; }; then
a3828db0
MK
15865
15866gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15867 break 5;
78434e59 15868else
bec39cab
AC
15869 echo "$as_me: failed program was:" >&5
15870sed 's/^/| /' conftest.$ac_ext >&5
15871
78434e59 15872fi
bec39cab 15873rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
15874 done
15875 done
15876 done
15877 done
15878done
15879# Provide a safe default value.
15880: ${gdb_cv_func_ptrace_args='int,int,long,long'}
15881
064ef605
DJ
15882fi
15883rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 15884fi
b4e70030
JB
15885echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_args" >&5
15886echo "${ECHO_T}$gdb_cv_func_ptrace_args" >&6
a3828db0
MK
15887ac_save_IFS=$IFS; IFS=','
15888set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15889IFS=$ac_save_IFS
15890shift
bec39cab 15891
a3828db0
MK
15892cat >>confdefs.h <<_ACEOF
15893#define PTRACE_TYPE_ARG3 $3
15894_ACEOF
15895
15896if test -n "$5"; then
15897
15898cat >>confdefs.h <<_ACEOF
15899#define PTRACE_TYPE_ARG5 $5
bec39cab 15900_ACEOF
78434e59
MK
15901
15902fi
15903
a3828db0 15904if test "$cross_compiling" = no; then
b4e70030
JB
15905 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
15906echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 15907if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 15908 echo $ECHO_N "(cached) $ECHO_C" >&6
a3828db0
MK
15909else
15910 if test "$cross_compiling" = yes; then
15911 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
15912echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
15913 { (exit 1); exit 1; }; }
bec39cab
AC
15914else
15915 cat >conftest.$ac_ext <<_ACEOF
15916/* confdefs.h. */
15917_ACEOF
15918cat confdefs.h >>conftest.$ac_ext
15919cat >>conftest.$ac_ext <<_ACEOF
15920/* end confdefs.h. */
b4e70030
JB
15921#if HAVE_UNISTD_H
15922# include <unistd.h>
15923#endif
15924
bec39cab
AC
15925int
15926main ()
15927{
a3828db0
MK
15928/* If this system has a BSD-style setpgrp which takes arguments,
15929 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15930 exit successfully. */
b4e70030 15931 exit (setpgrp (1,1) == -1 ? 0 : 1);
bec39cab
AC
15932 ;
15933 return 0;
15934}
15935_ACEOF
a3828db0
MK
15936rm -f conftest$ac_exeext
15937if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15938 (eval $ac_link) 2>&5
bec39cab
AC
15939 ac_status=$?
15940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 15941 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
15942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15943 (eval $ac_try) 2>&5
15944 ac_status=$?
15945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15946 (exit $ac_status); }; }; then
a3828db0 15947 ac_cv_func_setpgrp_void=no
c906108c 15948else
a3828db0
MK
15949 echo "$as_me: program exited with status $ac_status" >&5
15950echo "$as_me: failed program was:" >&5
bec39cab
AC
15951sed 's/^/| /' conftest.$ac_ext >&5
15952
a3828db0
MK
15953( exit $ac_status )
15954ac_cv_func_setpgrp_void=yes
c906108c 15955fi
b4e70030 15956rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 15957fi
a3828db0 15958fi
b4e70030
JB
15959echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
15960echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0
MK
15961if test $ac_cv_func_setpgrp_void = yes; then
15962
15963cat >>confdefs.h <<\_ACEOF
15964#define SETPGRP_VOID 1
bec39cab 15965_ACEOF
97bf5e38
MK
15966
15967fi
a3828db0
MK
15968
15969else
b4e70030
JB
15970 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
15971echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 15972if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 15973 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 15974else
bec39cab
AC
15975 cat >conftest.$ac_ext <<_ACEOF
15976/* confdefs.h. */
15977_ACEOF
15978cat confdefs.h >>conftest.$ac_ext
15979cat >>conftest.$ac_ext <<_ACEOF
15980/* end confdefs.h. */
a3828db0
MK
15981
15982#include <unistd.h>
15983
bec39cab
AC
15984int
15985main ()
15986{
a3828db0
MK
15987
15988 if (setpgrp(1,1) == -1)
15989 exit (0);
15990 else
15991 exit (1);
15992
bec39cab
AC
15993 ;
15994 return 0;
15995}
15996_ACEOF
15997rm -f conftest.$ac_objext
15998if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15999 (eval $ac_compile) 2>conftest.er1
16000 ac_status=$?
16001 grep -v '^ *+' conftest.er1 >conftest.err
16002 rm -f conftest.er1
16003 cat conftest.err >&5
16004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16005 (exit $ac_status); } &&
b4e70030
JB
16006 { ac_try='test -z "$ac_c_werror_flag"
16007 || test ! -s conftest.err'
bec39cab
AC
16008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16009 (eval $ac_try) 2>&5
16010 ac_status=$?
16011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16012 (exit $ac_status); }; } &&
16013 { ac_try='test -s conftest.$ac_objext'
16014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16015 (eval $ac_try) 2>&5
16016 ac_status=$?
16017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16018 (exit $ac_status); }; }; then
a3828db0 16019 ac_cv_func_setpgrp_void=no
c906108c 16020else
bec39cab
AC
16021 echo "$as_me: failed program was:" >&5
16022sed 's/^/| /' conftest.$ac_ext >&5
16023
b4e70030 16024ac_cv_func_setpgrp_void=yes
c906108c 16025fi
bec39cab 16026rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16027fi
b4e70030
JB
16028echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
16029echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0 16030if test $ac_cv_func_setpgrp_void = yes; then
bec39cab 16031 cat >>confdefs.h <<\_ACEOF
a3828db0 16032#define SETPGRP_VOID 1
bec39cab 16033_ACEOF
c3f6f71d 16034
a3828db0 16035fi
c906108c
SS
16036fi
16037
a3828db0
MK
16038# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
16039# since sigsetjmp might only be defined as a macro.
b4e70030
JB
16040echo "$as_me:$LINENO: checking for sigsetjmp" >&5
16041echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
a3828db0 16042if test "${gdb_cv_func_sigsetjmp+set}" = set; then
bec39cab
AC
16043 echo $ECHO_N "(cached) $ECHO_C" >&6
16044else
16045 cat >conftest.$ac_ext <<_ACEOF
16046/* confdefs.h. */
16047_ACEOF
16048cat confdefs.h >>conftest.$ac_ext
16049cat >>conftest.$ac_ext <<_ACEOF
16050/* end confdefs.h. */
a3828db0
MK
16051
16052#include <setjmp.h>
16053
bec39cab
AC
16054int
16055main ()
16056{
a3828db0 16057sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
16058 ;
16059 return 0;
16060}
16061_ACEOF
16062rm -f conftest.$ac_objext
16063if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16064 (eval $ac_compile) 2>conftest.er1
16065 ac_status=$?
16066 grep -v '^ *+' conftest.er1 >conftest.err
16067 rm -f conftest.er1
16068 cat conftest.err >&5
16069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16070 (exit $ac_status); } &&
b4e70030
JB
16071 { ac_try='test -z "$ac_c_werror_flag"
16072 || test ! -s conftest.err'
bec39cab
AC
16073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16074 (eval $ac_try) 2>&5
16075 ac_status=$?
16076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16077 (exit $ac_status); }; } &&
16078 { ac_try='test -s conftest.$ac_objext'
16079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16080 (eval $ac_try) 2>&5
16081 ac_status=$?
16082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16083 (exit $ac_status); }; }; then
a3828db0 16084 gdb_cv_func_sigsetjmp=yes
c906108c 16085else
bec39cab
AC
16086 echo "$as_me: failed program was:" >&5
16087sed 's/^/| /' conftest.$ac_ext >&5
16088
b4e70030 16089gdb_cv_func_sigsetjmp=no
c906108c 16090fi
bec39cab 16091rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16092fi
b4e70030
JB
16093echo "$as_me:$LINENO: result: $gdb_cv_func_sigsetjmp" >&5
16094echo "${ECHO_T}$gdb_cv_func_sigsetjmp" >&6
a3828db0 16095if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 16096
a3828db0
MK
16097cat >>confdefs.h <<\_ACEOF
16098#define HAVE_SIGSETJMP 1
bec39cab 16099_ACEOF
c906108c 16100
97bf5e38 16101fi
c906108c 16102
a3828db0
MK
16103# Assume we'll default to using the included libiberty regex.
16104gdb_use_included_regex=yes
16105
16106# However, if the system regex is GNU regex, then default to *not*
16107# using the included regex.
b4e70030
JB
16108echo "$as_me:$LINENO: checking for GNU regex" >&5
16109echo $ECHO_N "checking for GNU regex... $ECHO_C" >&6
a3828db0 16110if test "${gdb_cv_have_gnu_regex+set}" = set; then
bec39cab
AC
16111 echo $ECHO_N "(cached) $ECHO_C" >&6
16112else
16113 cat >conftest.$ac_ext <<_ACEOF
16114/* confdefs.h. */
16115_ACEOF
16116cat confdefs.h >>conftest.$ac_ext
16117cat >>conftest.$ac_ext <<_ACEOF
16118/* end confdefs.h. */
a3828db0 16119#include <gnu-versions.h>
bec39cab
AC
16120int
16121main ()
16122{
a3828db0
MK
16123#define REGEX_INTERFACE_VERSION 1
16124#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
16125# error "Version mismatch"
16126#endif
bec39cab
AC
16127 ;
16128 return 0;
16129}
16130_ACEOF
16131rm -f conftest.$ac_objext
16132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16133 (eval $ac_compile) 2>conftest.er1
16134 ac_status=$?
16135 grep -v '^ *+' conftest.er1 >conftest.err
16136 rm -f conftest.er1
16137 cat conftest.err >&5
16138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16139 (exit $ac_status); } &&
b4e70030
JB
16140 { ac_try='test -z "$ac_c_werror_flag"
16141 || test ! -s conftest.err'
bec39cab
AC
16142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16143 (eval $ac_try) 2>&5
16144 ac_status=$?
16145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16146 (exit $ac_status); }; } &&
16147 { ac_try='test -s conftest.$ac_objext'
16148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16149 (eval $ac_try) 2>&5
16150 ac_status=$?
16151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16152 (exit $ac_status); }; }; then
a3828db0 16153 gdb_cv_have_gnu_regex=yes
c906108c 16154else
bec39cab
AC
16155 echo "$as_me: failed program was:" >&5
16156sed 's/^/| /' conftest.$ac_ext >&5
16157
b4e70030 16158gdb_cv_have_gnu_regex=no
c906108c 16159fi
bec39cab 16160rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16161fi
b4e70030
JB
16162echo "$as_me:$LINENO: result: $gdb_cv_have_gnu_regex" >&5
16163echo "${ECHO_T}$gdb_cv_have_gnu_regex" >&6
a3828db0
MK
16164if test $gdb_cv_have_gnu_regex = yes; then
16165 gdb_use_included_regex=no
16166fi
c906108c 16167
a3828db0 16168
b4e70030 16169# Check whether --with-included-regex or --without-included-regex was given.
a3828db0 16170if test "${with_included_regex+set}" = set; then
b4e70030
JB
16171 withval="$with_included_regex"
16172 gdb_with_regex=$withval
a3828db0
MK
16173else
16174 gdb_with_regex=$gdb_use_included_regex
b4e70030 16175fi;
a3828db0
MK
16176if test "$gdb_with_regex" = yes; then
16177
16178cat >>confdefs.h <<\_ACEOF
16179#define USE_INCLUDED_REGEX 1
bec39cab 16180_ACEOF
c906108c 16181
97bf5e38 16182fi
c906108c 16183
5c45e068 16184# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
b4e70030
JB
16185echo "$as_me:$LINENO: checking for struct thread.td_pcb" >&5
16186echo $ECHO_N "checking for struct thread.td_pcb... $ECHO_C" >&6
5c45e068 16187if test "${ac_cv_member_struct_thread_td_pcb+set}" = set; then
bec39cab
AC
16188 echo $ECHO_N "(cached) $ECHO_C" >&6
16189else
16190 cat >conftest.$ac_ext <<_ACEOF
16191/* confdefs.h. */
16192_ACEOF
16193cat confdefs.h >>conftest.$ac_ext
16194cat >>conftest.$ac_ext <<_ACEOF
16195/* end confdefs.h. */
a3828db0
MK
16196#include <sys/param.h>
16197#include <sys/proc.h>
5c45e068
MK
16198
16199
bec39cab
AC
16200int
16201main ()
16202{
5c45e068
MK
16203static struct thread ac_aggr;
16204if (ac_aggr.td_pcb)
16205return 0;
bec39cab
AC
16206 ;
16207 return 0;
16208}
16209_ACEOF
16210rm -f conftest.$ac_objext
16211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16212 (eval $ac_compile) 2>conftest.er1
16213 ac_status=$?
16214 grep -v '^ *+' conftest.er1 >conftest.err
16215 rm -f conftest.er1
16216 cat conftest.err >&5
16217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16218 (exit $ac_status); } &&
b4e70030
JB
16219 { ac_try='test -z "$ac_c_werror_flag"
16220 || test ! -s conftest.err'
bec39cab
AC
16221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16222 (eval $ac_try) 2>&5
16223 ac_status=$?
16224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16225 (exit $ac_status); }; } &&
16226 { ac_try='test -s conftest.$ac_objext'
16227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16228 (eval $ac_try) 2>&5
16229 ac_status=$?
16230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16231 (exit $ac_status); }; }; then
5c45e068 16232 ac_cv_member_struct_thread_td_pcb=yes
c906108c 16233else
bec39cab
AC
16234 echo "$as_me: failed program was:" >&5
16235sed 's/^/| /' conftest.$ac_ext >&5
16236
b4e70030 16237cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16238/* confdefs.h. */
16239_ACEOF
16240cat confdefs.h >>conftest.$ac_ext
16241cat >>conftest.$ac_ext <<_ACEOF
16242/* end confdefs.h. */
16243#include <sys/param.h>
16244#include <sys/proc.h>
16245
16246
16247int
16248main ()
16249{
16250static struct thread ac_aggr;
16251if (sizeof ac_aggr.td_pcb)
16252return 0;
16253 ;
16254 return 0;
16255}
16256_ACEOF
16257rm -f conftest.$ac_objext
16258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16259 (eval $ac_compile) 2>conftest.er1
16260 ac_status=$?
16261 grep -v '^ *+' conftest.er1 >conftest.err
16262 rm -f conftest.er1
16263 cat conftest.err >&5
16264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16265 (exit $ac_status); } &&
b4e70030
JB
16266 { ac_try='test -z "$ac_c_werror_flag"
16267 || test ! -s conftest.err'
5c45e068
MK
16268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16269 (eval $ac_try) 2>&5
16270 ac_status=$?
16271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16272 (exit $ac_status); }; } &&
16273 { ac_try='test -s conftest.$ac_objext'
16274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16275 (eval $ac_try) 2>&5
16276 ac_status=$?
16277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16278 (exit $ac_status); }; }; then
16279 ac_cv_member_struct_thread_td_pcb=yes
16280else
16281 echo "$as_me: failed program was:" >&5
16282sed 's/^/| /' conftest.$ac_ext >&5
16283
b4e70030 16284ac_cv_member_struct_thread_td_pcb=no
5c45e068
MK
16285fi
16286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16287fi
bec39cab 16288rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16289fi
b4e70030
JB
16290echo "$as_me:$LINENO: result: $ac_cv_member_struct_thread_td_pcb" >&5
16291echo "${ECHO_T}$ac_cv_member_struct_thread_td_pcb" >&6
5c45e068 16292if test $ac_cv_member_struct_thread_td_pcb = yes; then
c906108c 16293
5c45e068 16294cat >>confdefs.h <<_ACEOF
a3828db0 16295#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 16296_ACEOF
c906108c 16297
5c45e068 16298
97bf5e38 16299fi
c906108c 16300
5c45e068 16301
a3828db0 16302# See if <sys/lwp.h> defines `struct lwp`.
b4e70030
JB
16303echo "$as_me:$LINENO: checking for struct lwp" >&5
16304echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
a3828db0 16305if test "${gdb_cv_struct_lwp+set}" = set; then
bec39cab
AC
16306 echo $ECHO_N "(cached) $ECHO_C" >&6
16307else
16308 cat >conftest.$ac_ext <<_ACEOF
16309/* confdefs.h. */
16310_ACEOF
16311cat confdefs.h >>conftest.$ac_ext
16312cat >>conftest.$ac_ext <<_ACEOF
16313/* end confdefs.h. */
a3828db0
MK
16314#include <sys/param.h>
16315#include <sys/lwp.h>
bec39cab
AC
16316int
16317main ()
16318{
a3828db0 16319struct lwp l;
bec39cab
AC
16320 ;
16321 return 0;
16322}
16323_ACEOF
16324rm -f conftest.$ac_objext
16325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16326 (eval $ac_compile) 2>conftest.er1
16327 ac_status=$?
16328 grep -v '^ *+' conftest.er1 >conftest.err
16329 rm -f conftest.er1
16330 cat conftest.err >&5
16331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16332 (exit $ac_status); } &&
b4e70030
JB
16333 { ac_try='test -z "$ac_c_werror_flag"
16334 || test ! -s conftest.err'
bec39cab
AC
16335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16336 (eval $ac_try) 2>&5
16337 ac_status=$?
16338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16339 (exit $ac_status); }; } &&
16340 { ac_try='test -s conftest.$ac_objext'
16341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16342 (eval $ac_try) 2>&5
16343 ac_status=$?
16344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16345 (exit $ac_status); }; }; then
a3828db0 16346 gdb_cv_struct_lwp=yes
c906108c 16347else
bec39cab
AC
16348 echo "$as_me: failed program was:" >&5
16349sed 's/^/| /' conftest.$ac_ext >&5
16350
b4e70030 16351gdb_cv_struct_lwp=no
c906108c 16352fi
bec39cab 16353rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16354fi
b4e70030
JB
16355echo "$as_me:$LINENO: result: $gdb_cv_struct_lwp" >&5
16356echo "${ECHO_T}$gdb_cv_struct_lwp" >&6
a3828db0 16357if test $gdb_cv_struct_lwp = yes; then
c906108c 16358
a3828db0
MK
16359cat >>confdefs.h <<\_ACEOF
16360#define HAVE_STRUCT_LWP 1
bec39cab 16361_ACEOF
c906108c 16362
97bf5e38 16363fi
c906108c 16364
a3828db0 16365# See if <machine/reg.h> degines `struct reg'.
b4e70030
JB
16366echo "$as_me:$LINENO: checking for struct reg in machine/reg.h" >&5
16367echo $ECHO_N "checking for struct reg in machine/reg.h... $ECHO_C" >&6
a3828db0 16368if test "${gdb_cv_struct_reg+set}" = set; then
bec39cab
AC
16369 echo $ECHO_N "(cached) $ECHO_C" >&6
16370else
16371 cat >conftest.$ac_ext <<_ACEOF
16372/* confdefs.h. */
16373_ACEOF
16374cat confdefs.h >>conftest.$ac_ext
16375cat >>conftest.$ac_ext <<_ACEOF
16376/* end confdefs.h. */
a3828db0
MK
16377#include <sys/types.h>
16378#include <machine/reg.h>
bec39cab
AC
16379int
16380main ()
16381{
a3828db0 16382struct reg r;
bec39cab
AC
16383 ;
16384 return 0;
16385}
16386_ACEOF
16387rm -f conftest.$ac_objext
16388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16389 (eval $ac_compile) 2>conftest.er1
16390 ac_status=$?
16391 grep -v '^ *+' conftest.er1 >conftest.err
16392 rm -f conftest.er1
16393 cat conftest.err >&5
16394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16395 (exit $ac_status); } &&
b4e70030
JB
16396 { ac_try='test -z "$ac_c_werror_flag"
16397 || test ! -s conftest.err'
bec39cab
AC
16398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16399 (eval $ac_try) 2>&5
16400 ac_status=$?
16401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16402 (exit $ac_status); }; } &&
16403 { ac_try='test -s conftest.$ac_objext'
16404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16405 (eval $ac_try) 2>&5
16406 ac_status=$?
16407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16408 (exit $ac_status); }; }; then
a3828db0 16409 gdb_cv_struct_reg=yes
27ca5dad 16410else
bec39cab
AC
16411 echo "$as_me: failed program was:" >&5
16412sed 's/^/| /' conftest.$ac_ext >&5
16413
b4e70030 16414gdb_cv_struct_reg=no
27ca5dad 16415fi
bec39cab 16416rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 16417fi
b4e70030
JB
16418echo "$as_me:$LINENO: result: $gdb_cv_struct_reg" >&5
16419echo "${ECHO_T}$gdb_cv_struct_reg" >&6
a3828db0 16420if test $gdb_cv_struct_reg = yes; then
bec39cab
AC
16421
16422cat >>confdefs.h <<\_ACEOF
a3828db0 16423#define HAVE_STRUCT_REG 1
bec39cab 16424_ACEOF
27ca5dad
MC
16425
16426fi
97bf5e38 16427
a3828db0
MK
16428# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
16429# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
b4e70030
JB
16430echo "$as_me:$LINENO: checking for struct reg.r_fs" >&5
16431echo $ECHO_N "checking for struct reg.r_fs... $ECHO_C" >&6
5c45e068 16432if test "${ac_cv_member_struct_reg_r_fs+set}" = set; then
bec39cab 16433 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16434else
bec39cab
AC
16435 cat >conftest.$ac_ext <<_ACEOF
16436/* confdefs.h. */
16437_ACEOF
16438cat confdefs.h >>conftest.$ac_ext
16439cat >>conftest.$ac_ext <<_ACEOF
16440/* end confdefs.h. */
a3828db0 16441#include <machine/reg.h>
5c45e068
MK
16442
16443int
16444main ()
16445{
16446static struct reg ac_aggr;
16447if (ac_aggr.r_fs)
16448return 0;
16449 ;
16450 return 0;
16451}
16452_ACEOF
16453rm -f conftest.$ac_objext
16454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16455 (eval $ac_compile) 2>conftest.er1
16456 ac_status=$?
16457 grep -v '^ *+' conftest.er1 >conftest.err
16458 rm -f conftest.er1
16459 cat conftest.err >&5
16460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16461 (exit $ac_status); } &&
b4e70030
JB
16462 { ac_try='test -z "$ac_c_werror_flag"
16463 || test ! -s conftest.err'
5c45e068
MK
16464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16465 (eval $ac_try) 2>&5
16466 ac_status=$?
16467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16468 (exit $ac_status); }; } &&
16469 { ac_try='test -s conftest.$ac_objext'
16470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16471 (eval $ac_try) 2>&5
16472 ac_status=$?
16473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16474 (exit $ac_status); }; }; then
16475 ac_cv_member_struct_reg_r_fs=yes
16476else
16477 echo "$as_me: failed program was:" >&5
16478sed 's/^/| /' conftest.$ac_ext >&5
16479
b4e70030 16480cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16481/* confdefs.h. */
16482_ACEOF
16483cat confdefs.h >>conftest.$ac_ext
16484cat >>conftest.$ac_ext <<_ACEOF
16485/* end confdefs.h. */
16486#include <machine/reg.h>
16487
bec39cab
AC
16488int
16489main ()
16490{
5c45e068
MK
16491static struct reg ac_aggr;
16492if (sizeof ac_aggr.r_fs)
16493return 0;
bec39cab
AC
16494 ;
16495 return 0;
16496}
16497_ACEOF
16498rm -f conftest.$ac_objext
16499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16500 (eval $ac_compile) 2>conftest.er1
16501 ac_status=$?
16502 grep -v '^ *+' conftest.er1 >conftest.err
16503 rm -f conftest.er1
16504 cat conftest.err >&5
16505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16506 (exit $ac_status); } &&
b4e70030
JB
16507 { ac_try='test -z "$ac_c_werror_flag"
16508 || test ! -s conftest.err'
bec39cab
AC
16509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16510 (eval $ac_try) 2>&5
16511 ac_status=$?
16512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16513 (exit $ac_status); }; } &&
16514 { ac_try='test -s conftest.$ac_objext'
16515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16516 (eval $ac_try) 2>&5
16517 ac_status=$?
16518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16519 (exit $ac_status); }; }; then
5c45e068 16520 ac_cv_member_struct_reg_r_fs=yes
3862412b 16521else
bec39cab
AC
16522 echo "$as_me: failed program was:" >&5
16523sed 's/^/| /' conftest.$ac_ext >&5
16524
b4e70030 16525ac_cv_member_struct_reg_r_fs=no
3862412b 16526fi
bec39cab 16527rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 16528fi
5c45e068
MK
16529rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16530fi
b4e70030
JB
16531echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_fs" >&5
16532echo "${ECHO_T}$ac_cv_member_struct_reg_r_fs" >&6
5c45e068
MK
16533if test $ac_cv_member_struct_reg_r_fs = yes; then
16534
16535cat >>confdefs.h <<_ACEOF
a3828db0 16536#define HAVE_STRUCT_REG_R_FS 1
bec39cab 16537_ACEOF
3862412b 16538
5c45e068 16539
97bf5e38 16540fi
b4e70030
JB
16541echo "$as_me:$LINENO: checking for struct reg.r_gs" >&5
16542echo $ECHO_N "checking for struct reg.r_gs... $ECHO_C" >&6
5c45e068 16543if test "${ac_cv_member_struct_reg_r_gs+set}" = set; then
bec39cab 16544 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16545else
bec39cab
AC
16546 cat >conftest.$ac_ext <<_ACEOF
16547/* confdefs.h. */
16548_ACEOF
16549cat confdefs.h >>conftest.$ac_ext
16550cat >>conftest.$ac_ext <<_ACEOF
16551/* end confdefs.h. */
a3828db0 16552#include <machine/reg.h>
5c45e068 16553
bec39cab
AC
16554int
16555main ()
16556{
5c45e068
MK
16557static struct reg ac_aggr;
16558if (ac_aggr.r_gs)
16559return 0;
bec39cab
AC
16560 ;
16561 return 0;
16562}
16563_ACEOF
16564rm -f conftest.$ac_objext
16565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16566 (eval $ac_compile) 2>conftest.er1
16567 ac_status=$?
16568 grep -v '^ *+' conftest.er1 >conftest.err
16569 rm -f conftest.er1
16570 cat conftest.err >&5
16571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16572 (exit $ac_status); } &&
b4e70030
JB
16573 { ac_try='test -z "$ac_c_werror_flag"
16574 || test ! -s conftest.err'
bec39cab
AC
16575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16576 (eval $ac_try) 2>&5
16577 ac_status=$?
16578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16579 (exit $ac_status); }; } &&
16580 { ac_try='test -s conftest.$ac_objext'
16581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16582 (eval $ac_try) 2>&5
16583 ac_status=$?
16584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16585 (exit $ac_status); }; }; then
5c45e068 16586 ac_cv_member_struct_reg_r_gs=yes
3862412b 16587else
bec39cab
AC
16588 echo "$as_me: failed program was:" >&5
16589sed 's/^/| /' conftest.$ac_ext >&5
16590
b4e70030 16591cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16592/* confdefs.h. */
16593_ACEOF
16594cat confdefs.h >>conftest.$ac_ext
16595cat >>conftest.$ac_ext <<_ACEOF
16596/* end confdefs.h. */
16597#include <machine/reg.h>
16598
16599int
16600main ()
16601{
16602static struct reg ac_aggr;
16603if (sizeof ac_aggr.r_gs)
16604return 0;
16605 ;
16606 return 0;
16607}
16608_ACEOF
16609rm -f conftest.$ac_objext
16610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16611 (eval $ac_compile) 2>conftest.er1
16612 ac_status=$?
16613 grep -v '^ *+' conftest.er1 >conftest.err
16614 rm -f conftest.er1
16615 cat conftest.err >&5
16616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16617 (exit $ac_status); } &&
b4e70030
JB
16618 { ac_try='test -z "$ac_c_werror_flag"
16619 || test ! -s conftest.err'
5c45e068
MK
16620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16621 (eval $ac_try) 2>&5
16622 ac_status=$?
16623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16624 (exit $ac_status); }; } &&
16625 { ac_try='test -s conftest.$ac_objext'
16626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16627 (eval $ac_try) 2>&5
16628 ac_status=$?
16629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16630 (exit $ac_status); }; }; then
16631 ac_cv_member_struct_reg_r_gs=yes
16632else
16633 echo "$as_me: failed program was:" >&5
16634sed 's/^/| /' conftest.$ac_ext >&5
16635
b4e70030 16636ac_cv_member_struct_reg_r_gs=no
3862412b 16637fi
bec39cab 16638rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 16639fi
5c45e068
MK
16640rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16641fi
b4e70030
JB
16642echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_gs" >&5
16643echo "${ECHO_T}$ac_cv_member_struct_reg_r_gs" >&6
5c45e068
MK
16644if test $ac_cv_member_struct_reg_r_gs = yes; then
16645
16646cat >>confdefs.h <<_ACEOF
a3828db0 16647#define HAVE_STRUCT_REG_R_GS 1
bec39cab 16648_ACEOF
3862412b 16649
5c45e068 16650
97bf5e38 16651fi
3862412b 16652
5c45e068 16653
a3828db0 16654# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
b4e70030
JB
16655echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
16656echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
a3828db0 16657if test "${gdb_cv_have_ptrace_getregs+set}" = set; then
bec39cab 16658 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 16659else
bec39cab
AC
16660 cat >conftest.$ac_ext <<_ACEOF
16661/* confdefs.h. */
16662_ACEOF
16663cat confdefs.h >>conftest.$ac_ext
16664cat >>conftest.$ac_ext <<_ACEOF
16665/* end confdefs.h. */
a3828db0 16666#include <sys/ptrace.h>
bec39cab
AC
16667int
16668main ()
16669{
a3828db0 16670PTRACE_GETREGS;
bec39cab
AC
16671 ;
16672 return 0;
16673}
16674_ACEOF
16675rm -f conftest.$ac_objext
16676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16677 (eval $ac_compile) 2>conftest.er1
16678 ac_status=$?
16679 grep -v '^ *+' conftest.er1 >conftest.err
16680 rm -f conftest.er1
16681 cat conftest.err >&5
16682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16683 (exit $ac_status); } &&
b4e70030
JB
16684 { ac_try='test -z "$ac_c_werror_flag"
16685 || test ! -s conftest.err'
bec39cab
AC
16686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16687 (eval $ac_try) 2>&5
16688 ac_status=$?
16689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16690 (exit $ac_status); }; } &&
16691 { ac_try='test -s conftest.$ac_objext'
16692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16693 (eval $ac_try) 2>&5
16694 ac_status=$?
16695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16696 (exit $ac_status); }; }; then
a3828db0 16697 gdb_cv_have_ptrace_getregs=yes
451928c5 16698else
bec39cab
AC
16699 echo "$as_me: failed program was:" >&5
16700sed 's/^/| /' conftest.$ac_ext >&5
16701
b4e70030 16702gdb_cv_have_ptrace_getregs=no
451928c5 16703fi
bec39cab 16704rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
16705fi
16706
b4e70030
JB
16707echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getregs" >&5
16708echo "${ECHO_T}$gdb_cv_have_ptrace_getregs" >&6
a3828db0 16709if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f
SE
16710
16711cat >>confdefs.h <<\_ACEOF
a3828db0 16712#define HAVE_PTRACE_GETREGS 1
bec39cab 16713_ACEOF
451928c5 16714
97bf5e38 16715fi
451928c5 16716
a3828db0 16717# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
b4e70030
JB
16718echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5
16719echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6
a3828db0 16720if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then
bec39cab 16721 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 16722else
bec39cab
AC
16723 cat >conftest.$ac_ext <<_ACEOF
16724/* confdefs.h. */
16725_ACEOF
16726cat confdefs.h >>conftest.$ac_ext
16727cat >>conftest.$ac_ext <<_ACEOF
16728/* end confdefs.h. */
a3828db0 16729#include <sys/ptrace.h>
bec39cab
AC
16730int
16731main ()
16732{
a3828db0 16733PTRACE_GETFPXREGS;
bec39cab
AC
16734 ;
16735 return 0;
16736}
16737_ACEOF
16738rm -f conftest.$ac_objext
16739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16740 (eval $ac_compile) 2>conftest.er1
16741 ac_status=$?
16742 grep -v '^ *+' conftest.er1 >conftest.err
16743 rm -f conftest.er1
16744 cat conftest.err >&5
16745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16746 (exit $ac_status); } &&
b4e70030
JB
16747 { ac_try='test -z "$ac_c_werror_flag"
16748 || test ! -s conftest.err'
bec39cab
AC
16749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16750 (eval $ac_try) 2>&5
16751 ac_status=$?
16752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16753 (exit $ac_status); }; } &&
16754 { ac_try='test -s conftest.$ac_objext'
16755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16756 (eval $ac_try) 2>&5
16757 ac_status=$?
16758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16759 (exit $ac_status); }; }; then
a3828db0 16760 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 16761else
bec39cab
AC
16762 echo "$as_me: failed program was:" >&5
16763sed 's/^/| /' conftest.$ac_ext >&5
16764
b4e70030 16765gdb_cv_have_ptrace_getfpxregs=no
451928c5 16766fi
bec39cab 16767rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
16768fi
16769
b4e70030
JB
16770echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getfpxregs" >&5
16771echo "${ECHO_T}$gdb_cv_have_ptrace_getfpxregs" >&6
a3828db0 16772if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f
SE
16773
16774cat >>confdefs.h <<\_ACEOF
a3828db0 16775#define HAVE_PTRACE_GETFPXREGS 1
bec39cab 16776_ACEOF
451928c5 16777
97bf5e38 16778fi
451928c5 16779
a3828db0 16780# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
b4e70030
JB
16781echo "$as_me:$LINENO: checking for PT_GETDBREGS" >&5
16782echo $ECHO_N "checking for PT_GETDBREGS... $ECHO_C" >&6
a3828db0 16783if test "${gdb_cv_have_pt_getdbregs+set}" = set; then
bec39cab 16784 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16785else
bec39cab
AC
16786 cat >conftest.$ac_ext <<_ACEOF
16787/* confdefs.h. */
16788_ACEOF
16789cat confdefs.h >>conftest.$ac_ext
16790cat >>conftest.$ac_ext <<_ACEOF
16791/* end confdefs.h. */
a3828db0
MK
16792#include <sys/types.h>
16793#include <sys/ptrace.h>
bec39cab
AC
16794int
16795main ()
16796{
a3828db0 16797PT_GETDBREGS;
bec39cab
AC
16798 ;
16799 return 0;
16800}
16801_ACEOF
16802rm -f conftest.$ac_objext
16803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16804 (eval $ac_compile) 2>conftest.er1
16805 ac_status=$?
16806 grep -v '^ *+' conftest.er1 >conftest.err
16807 rm -f conftest.er1
16808 cat conftest.err >&5
16809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16810 (exit $ac_status); } &&
b4e70030
JB
16811 { ac_try='test -z "$ac_c_werror_flag"
16812 || test ! -s conftest.err'
bec39cab
AC
16813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16814 (eval $ac_try) 2>&5
16815 ac_status=$?
16816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16817 (exit $ac_status); }; } &&
16818 { ac_try='test -s conftest.$ac_objext'
16819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16820 (eval $ac_try) 2>&5
16821 ac_status=$?
16822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16823 (exit $ac_status); }; }; then
a3828db0 16824 gdb_cv_have_pt_getdbregs=yes
3862412b 16825else
bec39cab
AC
16826 echo "$as_me: failed program was:" >&5
16827sed 's/^/| /' conftest.$ac_ext >&5
16828
b4e70030 16829gdb_cv_have_pt_getdbregs=no
3862412b 16830fi
bec39cab 16831rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
16832fi
16833
b4e70030
JB
16834echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getdbregs" >&5
16835echo "${ECHO_T}$gdb_cv_have_pt_getdbregs" >&6
a3828db0 16836if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f
SE
16837
16838cat >>confdefs.h <<\_ACEOF
a3828db0 16839#define HAVE_PT_GETDBREGS 1
bec39cab 16840_ACEOF
3862412b 16841
97bf5e38 16842fi
3862412b 16843
a3828db0 16844# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
b4e70030
JB
16845echo "$as_me:$LINENO: checking for PT_GETXMMREGS" >&5
16846echo $ECHO_N "checking for PT_GETXMMREGS... $ECHO_C" >&6
a3828db0 16847if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then
bec39cab 16848 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16849else
bec39cab
AC
16850 cat >conftest.$ac_ext <<_ACEOF
16851/* confdefs.h. */
16852_ACEOF
16853cat confdefs.h >>conftest.$ac_ext
16854cat >>conftest.$ac_ext <<_ACEOF
16855/* end confdefs.h. */
a3828db0
MK
16856#include <sys/types.h>
16857#include <sys/ptrace.h>
bec39cab
AC
16858int
16859main ()
16860{
a3828db0 16861PT_GETXMMREGS;
bec39cab
AC
16862 ;
16863 return 0;
16864}
16865_ACEOF
16866rm -f conftest.$ac_objext
16867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16868 (eval $ac_compile) 2>conftest.er1
16869 ac_status=$?
16870 grep -v '^ *+' conftest.er1 >conftest.err
16871 rm -f conftest.er1
16872 cat conftest.err >&5
16873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16874 (exit $ac_status); } &&
b4e70030
JB
16875 { ac_try='test -z "$ac_c_werror_flag"
16876 || test ! -s conftest.err'
bec39cab
AC
16877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16878 (eval $ac_try) 2>&5
16879 ac_status=$?
16880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16881 (exit $ac_status); }; } &&
16882 { ac_try='test -s conftest.$ac_objext'
16883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16884 (eval $ac_try) 2>&5
16885 ac_status=$?
16886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16887 (exit $ac_status); }; }; then
a3828db0 16888 gdb_cv_have_pt_getxmmregs=yes
3862412b 16889else
bec39cab
AC
16890 echo "$as_me: failed program was:" >&5
16891sed 's/^/| /' conftest.$ac_ext >&5
16892
b4e70030 16893gdb_cv_have_pt_getxmmregs=no
3862412b 16894fi
bec39cab 16895rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
16896fi
16897
b4e70030
JB
16898echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getxmmregs" >&5
16899echo "${ECHO_T}$gdb_cv_have_pt_getxmmregs" >&6
a3828db0 16900if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f
SE
16901
16902cat >>confdefs.h <<\_ACEOF
a3828db0 16903#define HAVE_PT_GETXMMREGS 1
bec39cab 16904_ACEOF
3862412b 16905
97bf5e38 16906fi
3862412b 16907
eb368090 16908# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
16909
16910if test "${target}" = "${host}"; then
16911 case "${host}" in
97bf5e38 16912 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f
SE
16913
16914cat >>confdefs.h <<\_ACEOF
97bf5e38 16915#define NEW_PROC_API 1
bec39cab 16916_ACEOF
97bf5e38
MK
16917
16918 ;;
c162e8c9 16919 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f
SE
16920
16921cat >>confdefs.h <<\_ACEOF
97bf5e38 16922#define NEW_PROC_API 1
bec39cab 16923_ACEOF
c960c18f
AC
16924
16925 ;;
16926 mips-sgi-irix5*)
16927 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f
SE
16928
16929cat >>confdefs.h <<\_ACEOF
c960c18f 16930#define _KMEMUSER 1
bec39cab 16931_ACEOF
97bf5e38
MK
16932
16933 ;;
16934 esac
16935fi
16936
16937if test "$ac_cv_header_sys_procfs_h" = yes; then
b4e70030
JB
16938 echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5
16939echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
16940 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then
16941 echo $ECHO_N "(cached) $ECHO_C" >&6
16942else
16943 cat >conftest.$ac_ext <<_ACEOF
16944/* confdefs.h. */
16945_ACEOF
16946cat confdefs.h >>conftest.$ac_ext
16947cat >>conftest.$ac_ext <<_ACEOF
16948/* end confdefs.h. */
596c9d4b
KB
16949
16950#define _SYSCALL32
16951#include <sys/procfs.h>
bec39cab
AC
16952int
16953main ()
16954{
97bf5e38 16955pstatus_t avar
bec39cab
AC
16956 ;
16957 return 0;
16958}
16959_ACEOF
16960rm -f conftest.$ac_objext
16961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16962 (eval $ac_compile) 2>conftest.er1
16963 ac_status=$?
16964 grep -v '^ *+' conftest.er1 >conftest.err
16965 rm -f conftest.er1
16966 cat conftest.err >&5
16967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16968 (exit $ac_status); } &&
b4e70030
JB
16969 { ac_try='test -z "$ac_c_werror_flag"
16970 || test ! -s conftest.err'
bec39cab
AC
16971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16972 (eval $ac_try) 2>&5
16973 ac_status=$?
16974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16975 (exit $ac_status); }; } &&
16976 { ac_try='test -s conftest.$ac_objext'
16977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16978 (eval $ac_try) 2>&5
16979 ac_status=$?
16980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16981 (exit $ac_status); }; }; then
97bf5e38 16982 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 16983else
bec39cab
AC
16984 echo "$as_me: failed program was:" >&5
16985sed 's/^/| /' conftest.$ac_ext >&5
16986
b4e70030 16987bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 16988
596c9d4b 16989fi
bec39cab 16990rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
16991fi
16992
97bf5e38 16993 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab
AC
16994
16995cat >>confdefs.h <<\_ACEOF
97bf5e38 16996#define HAVE_PSTATUS_T 1
bec39cab 16997_ACEOF
596c9d4b
KB
16998
16999 fi
b4e70030
JB
17000 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
17001echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6
596c9d4b 17002
b4e70030
JB
17003 echo "$as_me:$LINENO: checking for prrun_t in sys/procfs.h" >&5
17004echo $ECHO_N "checking for prrun_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17005 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then
17006 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 17007else
bec39cab
AC
17008 cat >conftest.$ac_ext <<_ACEOF
17009/* confdefs.h. */
17010_ACEOF
17011cat confdefs.h >>conftest.$ac_ext
17012cat >>conftest.$ac_ext <<_ACEOF
17013/* end confdefs.h. */
596c9d4b
KB
17014
17015#define _SYSCALL32
17016#include <sys/procfs.h>
bec39cab
AC
17017int
17018main ()
17019{
97bf5e38 17020prrun_t avar
bec39cab
AC
17021 ;
17022 return 0;
17023}
17024_ACEOF
17025rm -f conftest.$ac_objext
17026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17027 (eval $ac_compile) 2>conftest.er1
17028 ac_status=$?
17029 grep -v '^ *+' conftest.er1 >conftest.err
17030 rm -f conftest.er1
17031 cat conftest.err >&5
17032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17033 (exit $ac_status); } &&
b4e70030
JB
17034 { ac_try='test -z "$ac_c_werror_flag"
17035 || test ! -s conftest.err'
bec39cab
AC
17036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17037 (eval $ac_try) 2>&5
17038 ac_status=$?
17039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17040 (exit $ac_status); }; } &&
17041 { ac_try='test -s conftest.$ac_objext'
17042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17043 (eval $ac_try) 2>&5
17044 ac_status=$?
17045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17046 (exit $ac_status); }; }; then
97bf5e38 17047 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 17048else
bec39cab
AC
17049 echo "$as_me: failed program was:" >&5
17050sed 's/^/| /' conftest.$ac_ext >&5
17051
b4e70030 17052bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 17053
596c9d4b 17054fi
bec39cab 17055rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17056fi
17057
97bf5e38 17058 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab
AC
17059
17060cat >>confdefs.h <<\_ACEOF
97bf5e38 17061#define HAVE_PRRUN_T 1
bec39cab 17062_ACEOF
596c9d4b
KB
17063
17064 fi
b4e70030
JB
17065 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
17066echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prrun_t" >&6
596c9d4b 17067
b4e70030
JB
17068 echo "$as_me:$LINENO: checking for gregset_t in sys/procfs.h" >&5
17069echo $ECHO_N "checking for gregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17070 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then
17071 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 17072else
bec39cab
AC
17073 cat >conftest.$ac_ext <<_ACEOF
17074/* confdefs.h. */
17075_ACEOF
17076cat confdefs.h >>conftest.$ac_ext
17077cat >>conftest.$ac_ext <<_ACEOF
17078/* end confdefs.h. */
596c9d4b
KB
17079
17080#define _SYSCALL32
17081#include <sys/procfs.h>
bec39cab
AC
17082int
17083main ()
17084{
97bf5e38 17085gregset_t avar
bec39cab
AC
17086 ;
17087 return 0;
17088}
17089_ACEOF
17090rm -f conftest.$ac_objext
17091if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17092 (eval $ac_compile) 2>conftest.er1
17093 ac_status=$?
17094 grep -v '^ *+' conftest.er1 >conftest.err
17095 rm -f conftest.er1
17096 cat conftest.err >&5
17097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17098 (exit $ac_status); } &&
b4e70030
JB
17099 { ac_try='test -z "$ac_c_werror_flag"
17100 || test ! -s conftest.err'
bec39cab
AC
17101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17102 (eval $ac_try) 2>&5
17103 ac_status=$?
17104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17105 (exit $ac_status); }; } &&
17106 { ac_try='test -s conftest.$ac_objext'
17107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17108 (eval $ac_try) 2>&5
17109 ac_status=$?
17110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17111 (exit $ac_status); }; }; then
97bf5e38 17112 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 17113else
bec39cab
AC
17114 echo "$as_me: failed program was:" >&5
17115sed 's/^/| /' conftest.$ac_ext >&5
17116
b4e70030 17117bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 17118
596c9d4b 17119fi
bec39cab 17120rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17121fi
17122
97bf5e38 17123 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab
AC
17124
17125cat >>confdefs.h <<\_ACEOF
97bf5e38 17126#define HAVE_GREGSET_T 1
bec39cab 17127_ACEOF
596c9d4b
KB
17128
17129 fi
b4e70030
JB
17130 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
17131echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_gregset_t" >&6
451928c5 17132
b4e70030
JB
17133 echo "$as_me:$LINENO: checking for fpregset_t in sys/procfs.h" >&5
17134echo $ECHO_N "checking for fpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17135 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then
17136 echo $ECHO_N "(cached) $ECHO_C" >&6
d84dd0c5 17137else
bec39cab
AC
17138 cat >conftest.$ac_ext <<_ACEOF
17139/* confdefs.h. */
17140_ACEOF
17141cat confdefs.h >>conftest.$ac_ext
17142cat >>conftest.$ac_ext <<_ACEOF
17143/* end confdefs.h. */
97bf5e38
MK
17144
17145#define _SYSCALL32
d84dd0c5 17146#include <sys/procfs.h>
bec39cab
AC
17147int
17148main ()
17149{
97bf5e38 17150fpregset_t avar
bec39cab
AC
17151 ;
17152 return 0;
17153}
17154_ACEOF
17155rm -f conftest.$ac_objext
17156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17157 (eval $ac_compile) 2>conftest.er1
17158 ac_status=$?
17159 grep -v '^ *+' conftest.er1 >conftest.err
17160 rm -f conftest.er1
17161 cat conftest.err >&5
17162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17163 (exit $ac_status); } &&
b4e70030
JB
17164 { ac_try='test -z "$ac_c_werror_flag"
17165 || test ! -s conftest.err'
bec39cab
AC
17166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17167 (eval $ac_try) 2>&5
17168 ac_status=$?
17169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17170 (exit $ac_status); }; } &&
17171 { ac_try='test -s conftest.$ac_objext'
17172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17173 (eval $ac_try) 2>&5
17174 ac_status=$?
17175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17176 (exit $ac_status); }; }; then
97bf5e38 17177 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 17178else
bec39cab
AC
17179 echo "$as_me: failed program was:" >&5
17180sed 's/^/| /' conftest.$ac_ext >&5
17181
b4e70030 17182bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 17183
d84dd0c5 17184fi
bec39cab 17185rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
17186fi
17187
97bf5e38 17188 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab
AC
17189
17190cat >>confdefs.h <<\_ACEOF
97bf5e38 17191#define HAVE_FPREGSET_T 1
bec39cab 17192_ACEOF
d84dd0c5 17193
97bf5e38 17194 fi
b4e70030
JB
17195 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
17196echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_fpregset_t" >&6
d84dd0c5 17197
b4e70030
JB
17198 echo "$as_me:$LINENO: checking for prgregset_t in sys/procfs.h" >&5
17199echo $ECHO_N "checking for prgregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17200 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then
17201 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17202else
bec39cab
AC
17203 cat >conftest.$ac_ext <<_ACEOF
17204/* confdefs.h. */
17205_ACEOF
17206cat confdefs.h >>conftest.$ac_ext
17207cat >>conftest.$ac_ext <<_ACEOF
17208/* end confdefs.h. */
c906108c 17209
97bf5e38
MK
17210#define _SYSCALL32
17211#include <sys/procfs.h>
bec39cab
AC
17212int
17213main ()
17214{
97bf5e38 17215prgregset_t avar
bec39cab
AC
17216 ;
17217 return 0;
17218}
17219_ACEOF
17220rm -f conftest.$ac_objext
17221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17222 (eval $ac_compile) 2>conftest.er1
17223 ac_status=$?
17224 grep -v '^ *+' conftest.er1 >conftest.err
17225 rm -f conftest.er1
17226 cat conftest.err >&5
17227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17228 (exit $ac_status); } &&
b4e70030
JB
17229 { ac_try='test -z "$ac_c_werror_flag"
17230 || test ! -s conftest.err'
bec39cab
AC
17231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17232 (eval $ac_try) 2>&5
17233 ac_status=$?
17234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17235 (exit $ac_status); }; } &&
17236 { ac_try='test -s conftest.$ac_objext'
17237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17238 (eval $ac_try) 2>&5
17239 ac_status=$?
17240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17241 (exit $ac_status); }; }; then
97bf5e38 17242 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 17243else
bec39cab
AC
17244 echo "$as_me: failed program was:" >&5
17245sed 's/^/| /' conftest.$ac_ext >&5
17246
b4e70030 17247bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 17248
c906108c 17249fi
bec39cab 17250rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17251fi
17252
97bf5e38 17253 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab
AC
17254
17255cat >>confdefs.h <<\_ACEOF
97bf5e38 17256#define HAVE_PRGREGSET_T 1
bec39cab 17257_ACEOF
c906108c 17258
97bf5e38 17259 fi
b4e70030
JB
17260 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
17261echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset_t" >&6
c906108c 17262
b4e70030
JB
17263 echo "$as_me:$LINENO: checking for prfpregset_t in sys/procfs.h" >&5
17264echo $ECHO_N "checking for prfpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17265 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then
17266 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17267else
bec39cab
AC
17268 cat >conftest.$ac_ext <<_ACEOF
17269/* confdefs.h. */
17270_ACEOF
17271cat confdefs.h >>conftest.$ac_ext
17272cat >>conftest.$ac_ext <<_ACEOF
17273/* end confdefs.h. */
97bf5e38
MK
17274
17275#define _SYSCALL32
17276#include <sys/procfs.h>
bec39cab
AC
17277int
17278main ()
17279{
97bf5e38 17280prfpregset_t avar
bec39cab
AC
17281 ;
17282 return 0;
17283}
17284_ACEOF
17285rm -f conftest.$ac_objext
17286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17287 (eval $ac_compile) 2>conftest.er1
17288 ac_status=$?
17289 grep -v '^ *+' conftest.er1 >conftest.err
17290 rm -f conftest.er1
17291 cat conftest.err >&5
17292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17293 (exit $ac_status); } &&
b4e70030
JB
17294 { ac_try='test -z "$ac_c_werror_flag"
17295 || test ! -s conftest.err'
bec39cab
AC
17296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17297 (eval $ac_try) 2>&5
17298 ac_status=$?
17299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17300 (exit $ac_status); }; } &&
17301 { ac_try='test -s conftest.$ac_objext'
17302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17303 (eval $ac_try) 2>&5
17304 ac_status=$?
17305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17306 (exit $ac_status); }; }; then
97bf5e38 17307 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 17308else
bec39cab
AC
17309 echo "$as_me: failed program was:" >&5
17310sed 's/^/| /' conftest.$ac_ext >&5
17311
b4e70030 17312bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 17313
d45fe813 17314fi
bec39cab 17315rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17316fi
17317
97bf5e38 17318 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab
AC
17319
17320cat >>confdefs.h <<\_ACEOF
97bf5e38 17321#define HAVE_PRFPREGSET_T 1
bec39cab 17322_ACEOF
d45fe813 17323
97bf5e38 17324 fi
b4e70030
JB
17325 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
17326echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6
d45fe813 17327
b4e70030
JB
17328 echo "$as_me:$LINENO: checking for prgregset32_t in sys/procfs.h" >&5
17329echo $ECHO_N "checking for prgregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17330 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then
17331 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17332else
bec39cab
AC
17333 cat >conftest.$ac_ext <<_ACEOF
17334/* confdefs.h. */
17335_ACEOF
17336cat confdefs.h >>conftest.$ac_ext
17337cat >>conftest.$ac_ext <<_ACEOF
17338/* end confdefs.h. */
97bf5e38
MK
17339
17340#define _SYSCALL32
17341#include <sys/procfs.h>
bec39cab
AC
17342int
17343main ()
17344{
97bf5e38 17345prgregset32_t avar
bec39cab
AC
17346 ;
17347 return 0;
17348}
17349_ACEOF
17350rm -f conftest.$ac_objext
17351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17352 (eval $ac_compile) 2>conftest.er1
17353 ac_status=$?
17354 grep -v '^ *+' conftest.er1 >conftest.err
17355 rm -f conftest.er1
17356 cat conftest.err >&5
17357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17358 (exit $ac_status); } &&
b4e70030
JB
17359 { ac_try='test -z "$ac_c_werror_flag"
17360 || test ! -s conftest.err'
bec39cab
AC
17361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17362 (eval $ac_try) 2>&5
17363 ac_status=$?
17364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17365 (exit $ac_status); }; } &&
17366 { ac_try='test -s conftest.$ac_objext'
17367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17368 (eval $ac_try) 2>&5
17369 ac_status=$?
17370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17371 (exit $ac_status); }; }; then
97bf5e38 17372 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 17373else
bec39cab
AC
17374 echo "$as_me: failed program was:" >&5
17375sed 's/^/| /' conftest.$ac_ext >&5
17376
b4e70030 17377bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 17378
d45fe813 17379fi
bec39cab 17380rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17381fi
17382
97bf5e38 17383 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab
AC
17384
17385cat >>confdefs.h <<\_ACEOF
97bf5e38 17386#define HAVE_PRGREGSET32_T 1
bec39cab 17387_ACEOF
d45fe813 17388
97bf5e38 17389 fi
b4e70030
JB
17390 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
17391echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6
d45fe813 17392
b4e70030
JB
17393 echo "$as_me:$LINENO: checking for prfpregset32_t in sys/procfs.h" >&5
17394echo $ECHO_N "checking for prfpregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17395 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then
17396 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17397else
bec39cab
AC
17398 cat >conftest.$ac_ext <<_ACEOF
17399/* confdefs.h. */
17400_ACEOF
17401cat confdefs.h >>conftest.$ac_ext
17402cat >>conftest.$ac_ext <<_ACEOF
17403/* end confdefs.h. */
97bf5e38
MK
17404
17405#define _SYSCALL32
17406#include <sys/procfs.h>
bec39cab
AC
17407int
17408main ()
17409{
97bf5e38 17410prfpregset32_t avar
bec39cab
AC
17411 ;
17412 return 0;
17413}
17414_ACEOF
17415rm -f conftest.$ac_objext
17416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17417 (eval $ac_compile) 2>conftest.er1
17418 ac_status=$?
17419 grep -v '^ *+' conftest.er1 >conftest.err
17420 rm -f conftest.er1
17421 cat conftest.err >&5
17422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17423 (exit $ac_status); } &&
b4e70030
JB
17424 { ac_try='test -z "$ac_c_werror_flag"
17425 || test ! -s conftest.err'
bec39cab
AC
17426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17427 (eval $ac_try) 2>&5
17428 ac_status=$?
17429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17430 (exit $ac_status); }; } &&
17431 { ac_try='test -s conftest.$ac_objext'
17432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17433 (eval $ac_try) 2>&5
17434 ac_status=$?
17435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17436 (exit $ac_status); }; }; then
97bf5e38 17437 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 17438else
bec39cab
AC
17439 echo "$as_me: failed program was:" >&5
17440sed 's/^/| /' conftest.$ac_ext >&5
17441
b4e70030 17442bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 17443
d45fe813 17444fi
bec39cab 17445rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17446fi
17447
97bf5e38 17448 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab
AC
17449
17450cat >>confdefs.h <<\_ACEOF
97bf5e38 17451#define HAVE_PRFPREGSET32_T 1
bec39cab 17452_ACEOF
d45fe813 17453
97bf5e38 17454 fi
b4e70030
JB
17455 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
17456echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6
d45fe813 17457
b4e70030
JB
17458 echo "$as_me:$LINENO: checking for lwpid_t in sys/procfs.h" >&5
17459echo $ECHO_N "checking for lwpid_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17460 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then
17461 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17462else
bec39cab
AC
17463 cat >conftest.$ac_ext <<_ACEOF
17464/* confdefs.h. */
17465_ACEOF
17466cat confdefs.h >>conftest.$ac_ext
17467cat >>conftest.$ac_ext <<_ACEOF
17468/* end confdefs.h. */
97bf5e38 17469
d45fe813 17470#define _SYSCALL32
97bf5e38 17471#include <sys/procfs.h>
bec39cab
AC
17472int
17473main ()
17474{
97bf5e38 17475lwpid_t avar
bec39cab
AC
17476 ;
17477 return 0;
17478}
17479_ACEOF
17480rm -f conftest.$ac_objext
17481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17482 (eval $ac_compile) 2>conftest.er1
17483 ac_status=$?
17484 grep -v '^ *+' conftest.er1 >conftest.err
17485 rm -f conftest.er1
17486 cat conftest.err >&5
17487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17488 (exit $ac_status); } &&
b4e70030
JB
17489 { ac_try='test -z "$ac_c_werror_flag"
17490 || test ! -s conftest.err'
bec39cab
AC
17491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17492 (eval $ac_try) 2>&5
17493 ac_status=$?
17494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17495 (exit $ac_status); }; } &&
17496 { ac_try='test -s conftest.$ac_objext'
17497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17498 (eval $ac_try) 2>&5
17499 ac_status=$?
17500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17501 (exit $ac_status); }; }; then
97bf5e38 17502 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 17503else
bec39cab
AC
17504 echo "$as_me: failed program was:" >&5
17505sed 's/^/| /' conftest.$ac_ext >&5
17506
b4e70030 17507bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 17508
d45fe813 17509fi
bec39cab 17510rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17511fi
17512
97bf5e38 17513 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab
AC
17514
17515cat >>confdefs.h <<\_ACEOF
97bf5e38 17516#define HAVE_LWPID_T 1
bec39cab 17517_ACEOF
d45fe813 17518
97bf5e38 17519 fi
b4e70030
JB
17520 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
17521echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpid_t" >&6
c906108c 17522
b4e70030
JB
17523 echo "$as_me:$LINENO: checking for psaddr_t in sys/procfs.h" >&5
17524echo $ECHO_N "checking for psaddr_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17525 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then
17526 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17527else
bec39cab
AC
17528 cat >conftest.$ac_ext <<_ACEOF
17529/* confdefs.h. */
17530_ACEOF
17531cat confdefs.h >>conftest.$ac_ext
17532cat >>conftest.$ac_ext <<_ACEOF
17533/* end confdefs.h. */
c906108c 17534
97bf5e38
MK
17535#define _SYSCALL32
17536#include <sys/procfs.h>
bec39cab
AC
17537int
17538main ()
17539{
97bf5e38 17540psaddr_t avar
bec39cab
AC
17541 ;
17542 return 0;
17543}
17544_ACEOF
17545rm -f conftest.$ac_objext
17546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17547 (eval $ac_compile) 2>conftest.er1
17548 ac_status=$?
17549 grep -v '^ *+' conftest.er1 >conftest.err
17550 rm -f conftest.er1
17551 cat conftest.err >&5
17552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17553 (exit $ac_status); } &&
b4e70030
JB
17554 { ac_try='test -z "$ac_c_werror_flag"
17555 || test ! -s conftest.err'
bec39cab
AC
17556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17557 (eval $ac_try) 2>&5
17558 ac_status=$?
17559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17560 (exit $ac_status); }; } &&
17561 { ac_try='test -s conftest.$ac_objext'
17562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17563 (eval $ac_try) 2>&5
17564 ac_status=$?
17565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17566 (exit $ac_status); }; }; then
97bf5e38 17567 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 17568else
bec39cab
AC
17569 echo "$as_me: failed program was:" >&5
17570sed 's/^/| /' conftest.$ac_ext >&5
17571
b4e70030 17572bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 17573
c906108c 17574fi
bec39cab 17575rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17576fi
17577
97bf5e38 17578 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab
AC
17579
17580cat >>confdefs.h <<\_ACEOF
97bf5e38 17581#define HAVE_PSADDR_T 1
bec39cab 17582_ACEOF
c906108c 17583
97bf5e38 17584 fi
b4e70030
JB
17585 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
17586echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psaddr_t" >&6
c906108c 17587
b4e70030
JB
17588 echo "$as_me:$LINENO: checking for prsysent_t in sys/procfs.h" >&5
17589echo $ECHO_N "checking for prsysent_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17590 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then
17591 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17592else
bec39cab
AC
17593 cat >conftest.$ac_ext <<_ACEOF
17594/* confdefs.h. */
17595_ACEOF
17596cat confdefs.h >>conftest.$ac_ext
17597cat >>conftest.$ac_ext <<_ACEOF
17598/* end confdefs.h. */
c906108c 17599
97bf5e38
MK
17600#define _SYSCALL32
17601#include <sys/procfs.h>
bec39cab
AC
17602int
17603main ()
17604{
97bf5e38 17605prsysent_t avar
bec39cab
AC
17606 ;
17607 return 0;
17608}
17609_ACEOF
17610rm -f conftest.$ac_objext
17611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17612 (eval $ac_compile) 2>conftest.er1
17613 ac_status=$?
17614 grep -v '^ *+' conftest.er1 >conftest.err
17615 rm -f conftest.er1
17616 cat conftest.err >&5
17617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17618 (exit $ac_status); } &&
b4e70030
JB
17619 { ac_try='test -z "$ac_c_werror_flag"
17620 || test ! -s conftest.err'
bec39cab
AC
17621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17622 (eval $ac_try) 2>&5
17623 ac_status=$?
17624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17625 (exit $ac_status); }; } &&
17626 { ac_try='test -s conftest.$ac_objext'
17627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17628 (eval $ac_try) 2>&5
17629 ac_status=$?
17630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17631 (exit $ac_status); }; }; then
97bf5e38 17632 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 17633else
bec39cab
AC
17634 echo "$as_me: failed program was:" >&5
17635sed 's/^/| /' conftest.$ac_ext >&5
17636
b4e70030 17637bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 17638
c906108c 17639fi
bec39cab 17640rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17641fi
17642
97bf5e38 17643 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab
AC
17644
17645cat >>confdefs.h <<\_ACEOF
97bf5e38 17646#define HAVE_PRSYSENT_T 1
bec39cab 17647_ACEOF
c906108c 17648
97bf5e38 17649 fi
b4e70030
JB
17650 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
17651echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prsysent_t" >&6
c906108c 17652
b4e70030
JB
17653 echo "$as_me:$LINENO: checking for pr_sigset_t in sys/procfs.h" >&5
17654echo $ECHO_N "checking for pr_sigset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17655 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then
17656 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17657else
bec39cab
AC
17658 cat >conftest.$ac_ext <<_ACEOF
17659/* confdefs.h. */
17660_ACEOF
17661cat confdefs.h >>conftest.$ac_ext
17662cat >>conftest.$ac_ext <<_ACEOF
17663/* end confdefs.h. */
c906108c 17664
97bf5e38
MK
17665#define _SYSCALL32
17666#include <sys/procfs.h>
bec39cab
AC
17667int
17668main ()
17669{
97bf5e38 17670pr_sigset_t avar
bec39cab
AC
17671 ;
17672 return 0;
17673}
17674_ACEOF
17675rm -f conftest.$ac_objext
17676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17677 (eval $ac_compile) 2>conftest.er1
17678 ac_status=$?
17679 grep -v '^ *+' conftest.er1 >conftest.err
17680 rm -f conftest.er1
17681 cat conftest.err >&5
17682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17683 (exit $ac_status); } &&
b4e70030
JB
17684 { ac_try='test -z "$ac_c_werror_flag"
17685 || test ! -s conftest.err'
bec39cab
AC
17686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17687 (eval $ac_try) 2>&5
17688 ac_status=$?
17689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17690 (exit $ac_status); }; } &&
17691 { ac_try='test -s conftest.$ac_objext'
17692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17693 (eval $ac_try) 2>&5
17694 ac_status=$?
17695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17696 (exit $ac_status); }; }; then
97bf5e38 17697 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 17698else
bec39cab
AC
17699 echo "$as_me: failed program was:" >&5
17700sed 's/^/| /' conftest.$ac_ext >&5
17701
b4e70030 17702bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 17703
c906108c 17704fi
bec39cab 17705rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17706fi
17707
97bf5e38 17708 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab
AC
17709
17710cat >>confdefs.h <<\_ACEOF
97bf5e38 17711#define HAVE_PR_SIGSET_T 1
bec39cab 17712_ACEOF
c906108c 17713
97bf5e38 17714 fi
b4e70030
JB
17715 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
17716echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6
c906108c 17717
b4e70030
JB
17718 echo "$as_me:$LINENO: checking for pr_sigaction64_t in sys/procfs.h" >&5
17719echo $ECHO_N "checking for pr_sigaction64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17720 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then
17721 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17722else
bec39cab
AC
17723 cat >conftest.$ac_ext <<_ACEOF
17724/* confdefs.h. */
17725_ACEOF
17726cat confdefs.h >>conftest.$ac_ext
17727cat >>conftest.$ac_ext <<_ACEOF
17728/* end confdefs.h. */
c906108c 17729
97bf5e38
MK
17730#define _SYSCALL32
17731#include <sys/procfs.h>
bec39cab
AC
17732int
17733main ()
17734{
97bf5e38 17735pr_sigaction64_t avar
bec39cab
AC
17736 ;
17737 return 0;
17738}
17739_ACEOF
17740rm -f conftest.$ac_objext
17741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17742 (eval $ac_compile) 2>conftest.er1
17743 ac_status=$?
17744 grep -v '^ *+' conftest.er1 >conftest.err
17745 rm -f conftest.er1
17746 cat conftest.err >&5
17747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17748 (exit $ac_status); } &&
b4e70030
JB
17749 { ac_try='test -z "$ac_c_werror_flag"
17750 || test ! -s conftest.err'
bec39cab
AC
17751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17752 (eval $ac_try) 2>&5
17753 ac_status=$?
17754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17755 (exit $ac_status); }; } &&
17756 { ac_try='test -s conftest.$ac_objext'
17757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17758 (eval $ac_try) 2>&5
17759 ac_status=$?
17760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17761 (exit $ac_status); }; }; then
97bf5e38 17762 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 17763else
bec39cab
AC
17764 echo "$as_me: failed program was:" >&5
17765sed 's/^/| /' conftest.$ac_ext >&5
17766
b4e70030 17767bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 17768
c906108c 17769fi
bec39cab 17770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17771fi
17772
97bf5e38 17773 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab
AC
17774
17775cat >>confdefs.h <<\_ACEOF
97bf5e38 17776#define HAVE_PR_SIGACTION64_T 1
bec39cab 17777_ACEOF
c906108c 17778
97bf5e38 17779 fi
b4e70030
JB
17780 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
17781echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6
97bf5e38 17782
b4e70030
JB
17783 echo "$as_me:$LINENO: checking for pr_siginfo64_t in sys/procfs.h" >&5
17784echo $ECHO_N "checking for pr_siginfo64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17785 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then
17786 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 17787else
bec39cab
AC
17788 cat >conftest.$ac_ext <<_ACEOF
17789/* confdefs.h. */
17790_ACEOF
17791cat confdefs.h >>conftest.$ac_ext
17792cat >>conftest.$ac_ext <<_ACEOF
17793/* end confdefs.h. */
97bf5e38
MK
17794
17795#define _SYSCALL32
17796#include <sys/procfs.h>
bec39cab
AC
17797int
17798main ()
17799{
97bf5e38 17800pr_siginfo64_t avar
bec39cab
AC
17801 ;
17802 return 0;
17803}
17804_ACEOF
17805rm -f conftest.$ac_objext
17806if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17807 (eval $ac_compile) 2>conftest.er1
17808 ac_status=$?
17809 grep -v '^ *+' conftest.er1 >conftest.err
17810 rm -f conftest.er1
17811 cat conftest.err >&5
17812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17813 (exit $ac_status); } &&
b4e70030
JB
17814 { ac_try='test -z "$ac_c_werror_flag"
17815 || test ! -s conftest.err'
bec39cab
AC
17816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17817 (eval $ac_try) 2>&5
17818 ac_status=$?
17819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17820 (exit $ac_status); }; } &&
17821 { ac_try='test -s conftest.$ac_objext'
17822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17823 (eval $ac_try) 2>&5
17824 ac_status=$?
17825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17826 (exit $ac_status); }; }; then
97bf5e38
MK
17827 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
17828else
bec39cab
AC
17829 echo "$as_me: failed program was:" >&5
17830sed 's/^/| /' conftest.$ac_ext >&5
17831
b4e70030 17832bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 17833
97bf5e38 17834fi
bec39cab 17835rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 17836fi
c906108c 17837
97bf5e38 17838 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab
AC
17839
17840cat >>confdefs.h <<\_ACEOF
97bf5e38 17841#define HAVE_PR_SIGINFO64_T 1
bec39cab 17842_ACEOF
c906108c 17843
97bf5e38 17844 fi
b4e70030
JB
17845 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
17846echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6
bec39cab
AC
17847
17848
97bf5e38
MK
17849
17850
17851
97bf5e38 17852 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
b4e70030
JB
17853 echo "$as_me:$LINENO: checking whether prfpregset_t type is broken" >&5
17854echo $ECHO_N "checking whether prfpregset_t type is broken... $ECHO_C" >&6
bec39cab
AC
17855 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then
17856 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
17857else
17858 if test "$cross_compiling" = yes; then
97bf5e38 17859 gdb_cv_prfpregset_t_broken=yes
c906108c 17860else
bec39cab
AC
17861 cat >conftest.$ac_ext <<_ACEOF
17862/* confdefs.h. */
17863_ACEOF
17864cat confdefs.h >>conftest.$ac_ext
17865cat >>conftest.$ac_ext <<_ACEOF
17866/* end confdefs.h. */
97bf5e38
MK
17867#include <sys/procfs.h>
17868 int main ()
17869 {
17870 if (sizeof (prfpregset_t) == sizeof (void *))
17871 return 1;
17872 return 0;
17873 }
bec39cab
AC
17874_ACEOF
17875rm -f conftest$ac_exeext
17876if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17877 (eval $ac_link) 2>&5
17878 ac_status=$?
17879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17880 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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
97bf5e38 17886 gdb_cv_prfpregset_t_broken=no
c906108c 17887else
bec39cab
AC
17888 echo "$as_me: program exited with status $ac_status" >&5
17889echo "$as_me: failed program was:" >&5
17890sed 's/^/| /' conftest.$ac_ext >&5
17891
17892( exit $ac_status )
17893gdb_cv_prfpregset_t_broken=yes
c906108c 17894fi
b4e70030 17895rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 17896fi
c906108c
SS
17897fi
17898
b4e70030
JB
17899 echo "$as_me:$LINENO: result: $gdb_cv_prfpregset_t_broken" >&5
17900echo "${ECHO_T}$gdb_cv_prfpregset_t_broken" >&6
97bf5e38 17901 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f
SE
17902
17903cat >>confdefs.h <<\_ACEOF
97bf5e38 17904#define PRFPREGSET_T_BROKEN 1
bec39cab 17905_ACEOF
c906108c 17906
97bf5e38
MK
17907 fi
17908 fi
c906108c 17909
bec39cab 17910
b4e70030
JB
17911 echo "$as_me:$LINENO: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
17912echo $ECHO_N "checking for PIOCSET ioctl entry in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17913 if test "${gdb_cv_have_procfs_piocset+set}" = set; then
17914 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17915else
bec39cab
AC
17916 cat >conftest.$ac_ext <<_ACEOF
17917/* confdefs.h. */
17918_ACEOF
17919cat confdefs.h >>conftest.$ac_ext
17920cat >>conftest.$ac_ext <<_ACEOF
17921/* end confdefs.h. */
97bf5e38
MK
17922#include <unistd.h>
17923#include <sys/types.h>
17924#include <sys/procfs.h>
17925
bec39cab
AC
17926int
17927main ()
17928{
97bf5e38
MK
17929
17930 int dummy;;
17931 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
17932
17933 ;
17934 return 0;
17935}
17936_ACEOF
17937rm -f conftest.$ac_objext
17938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17939 (eval $ac_compile) 2>conftest.er1
17940 ac_status=$?
17941 grep -v '^ *+' conftest.er1 >conftest.err
17942 rm -f conftest.er1
17943 cat conftest.err >&5
17944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17945 (exit $ac_status); } &&
b4e70030
JB
17946 { ac_try='test -z "$ac_c_werror_flag"
17947 || test ! -s conftest.err'
bec39cab
AC
17948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17949 (eval $ac_try) 2>&5
17950 ac_status=$?
17951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17952 (exit $ac_status); }; } &&
17953 { ac_try='test -s conftest.$ac_objext'
17954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17955 (eval $ac_try) 2>&5
17956 ac_status=$?
17957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17958 (exit $ac_status); }; }; then
97bf5e38 17959 gdb_cv_have_procfs_piocset=yes
c906108c 17960else
bec39cab
AC
17961 echo "$as_me: failed program was:" >&5
17962sed 's/^/| /' conftest.$ac_ext >&5
17963
b4e70030 17964gdb_cv_have_procfs_piocset=no
c906108c 17965fi
bec39cab 17966rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 17967fi
97bf5e38 17968
b4e70030
JB
17969 echo "$as_me:$LINENO: result: $gdb_cv_have_procfs_piocset" >&5
17970echo "${ECHO_T}$gdb_cv_have_procfs_piocset" >&6
97bf5e38 17971 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f
SE
17972
17973cat >>confdefs.h <<\_ACEOF
97bf5e38 17974#define HAVE_PROCFS_PIOCSET 1
bec39cab 17975_ACEOF
97bf5e38
MK
17976
17977 fi
c906108c 17978fi
c906108c 17979
97bf5e38 17980if test ${host} = ${target} ; then
bec39cab 17981
b4e70030
JB
17982 echo "$as_me:$LINENO: checking for member l_addr in struct link_map" >&5
17983echo $ECHO_N "checking for member l_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
17984 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then
17985 echo $ECHO_N "(cached) $ECHO_C" >&6
17986else
17987 cat >conftest.$ac_ext <<_ACEOF
17988/* confdefs.h. */
17989_ACEOF
17990cat confdefs.h >>conftest.$ac_ext
17991cat >>conftest.$ac_ext <<_ACEOF
17992/* end confdefs.h. */
97bf5e38 17993#include <link.h>
bec39cab
AC
17994int
17995main ()
17996{
97bf5e38 17997struct link_map lm; (void) lm.l_addr;
bec39cab
AC
17998 ;
17999 return 0;
18000}
18001_ACEOF
18002rm -f conftest.$ac_objext
18003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18004 (eval $ac_compile) 2>conftest.er1
18005 ac_status=$?
18006 grep -v '^ *+' conftest.er1 >conftest.err
18007 rm -f conftest.er1
18008 cat conftest.err >&5
18009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18010 (exit $ac_status); } &&
b4e70030
JB
18011 { ac_try='test -z "$ac_c_werror_flag"
18012 || test ! -s conftest.err'
bec39cab
AC
18013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18014 (eval $ac_try) 2>&5
18015 ac_status=$?
18016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18017 (exit $ac_status); }; } &&
18018 { ac_try='test -s conftest.$ac_objext'
18019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18020 (eval $ac_try) 2>&5
18021 ac_status=$?
18022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18023 (exit $ac_status); }; }; then
97bf5e38 18024 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 18025else
bec39cab
AC
18026 echo "$as_me: failed program was:" >&5
18027sed 's/^/| /' conftest.$ac_ext >&5
18028
b4e70030 18029gdb_cv_have_struct_link_map_with_l_members=no
c906108c 18030fi
bec39cab 18031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18032fi
18033
b4e70030
JB
18034 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
18035echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_l_members" >&6
97bf5e38 18036 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f
SE
18037
18038cat >>confdefs.h <<\_ACEOF
97bf5e38 18039#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
bec39cab 18040_ACEOF
97bf5e38
MK
18041
18042 fi
18043
bec39cab 18044
b4e70030
JB
18045 echo "$as_me:$LINENO: checking for member lm_addr in struct link_map" >&5
18046echo $ECHO_N "checking for member lm_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
18047 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then
18048 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18049else
bec39cab
AC
18050 cat >conftest.$ac_ext <<_ACEOF
18051/* confdefs.h. */
18052_ACEOF
18053cat confdefs.h >>conftest.$ac_ext
18054cat >>conftest.$ac_ext <<_ACEOF
18055/* end confdefs.h. */
97bf5e38
MK
18056#include <sys/types.h>
18057#include <link.h>
bec39cab
AC
18058int
18059main ()
18060{
97bf5e38 18061struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
18062 ;
18063 return 0;
18064}
18065_ACEOF
18066rm -f conftest.$ac_objext
18067if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18068 (eval $ac_compile) 2>conftest.er1
18069 ac_status=$?
18070 grep -v '^ *+' conftest.er1 >conftest.err
18071 rm -f conftest.er1
18072 cat conftest.err >&5
18073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18074 (exit $ac_status); } &&
b4e70030
JB
18075 { ac_try='test -z "$ac_c_werror_flag"
18076 || test ! -s conftest.err'
bec39cab
AC
18077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18078 (eval $ac_try) 2>&5
18079 ac_status=$?
18080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18081 (exit $ac_status); }; } &&
18082 { ac_try='test -s conftest.$ac_objext'
18083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18084 (eval $ac_try) 2>&5
18085 ac_status=$?
18086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18087 (exit $ac_status); }; }; then
97bf5e38
MK
18088 gdb_cv_have_struct_link_map_with_lm_members=yes
18089else
bec39cab
AC
18090 echo "$as_me: failed program was:" >&5
18091sed 's/^/| /' conftest.$ac_ext >&5
18092
b4e70030 18093gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 18094fi
bec39cab 18095rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18096fi
c906108c 18097
b4e70030
JB
18098 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
18099echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_lm_members" >&6
97bf5e38 18100 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f
SE
18101
18102cat >>confdefs.h <<\_ACEOF
97bf5e38 18103#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
bec39cab 18104_ACEOF
97bf5e38
MK
18105
18106 fi
18107
bec39cab 18108
b4e70030
JB
18109 echo "$as_me:$LINENO: checking for member som_addr in struct so_map" >&5
18110echo $ECHO_N "checking for member som_addr in struct so_map... $ECHO_C" >&6
bec39cab
AC
18111 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then
18112 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18113else
bec39cab
AC
18114 cat >conftest.$ac_ext <<_ACEOF
18115/* confdefs.h. */
18116_ACEOF
18117cat confdefs.h >>conftest.$ac_ext
18118cat >>conftest.$ac_ext <<_ACEOF
18119/* end confdefs.h. */
97bf5e38
MK
18120#include <sys/types.h>
18121#ifdef HAVE_NLIST_H
18122#include <nlist.h>
18123#endif
18124#include <link.h>
bec39cab
AC
18125int
18126main ()
18127{
97bf5e38 18128struct so_map lm; (void) lm.som_addr;
bec39cab
AC
18129 ;
18130 return 0;
18131}
18132_ACEOF
18133rm -f conftest.$ac_objext
18134if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18135 (eval $ac_compile) 2>conftest.er1
18136 ac_status=$?
18137 grep -v '^ *+' conftest.er1 >conftest.err
18138 rm -f conftest.er1
18139 cat conftest.err >&5
18140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18141 (exit $ac_status); } &&
b4e70030
JB
18142 { ac_try='test -z "$ac_c_werror_flag"
18143 || test ! -s conftest.err'
bec39cab
AC
18144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18145 (eval $ac_try) 2>&5
18146 ac_status=$?
18147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18148 (exit $ac_status); }; } &&
18149 { ac_try='test -s conftest.$ac_objext'
18150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18151 (eval $ac_try) 2>&5
18152 ac_status=$?
18153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18154 (exit $ac_status); }; }; then
97bf5e38
MK
18155 gdb_cv_have_struct_so_map_with_som_members=yes
18156else
bec39cab
AC
18157 echo "$as_me: failed program was:" >&5
18158sed 's/^/| /' conftest.$ac_ext >&5
18159
b4e70030 18160gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 18161fi
bec39cab 18162rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18163fi
c906108c 18164
b4e70030
JB
18165 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
18166echo "${ECHO_T}$gdb_cv_have_struct_so_map_with_som_members" >&6
97bf5e38 18167 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f
SE
18168
18169cat >>confdefs.h <<\_ACEOF
97bf5e38 18170#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
bec39cab 18171_ACEOF
c906108c 18172
97bf5e38 18173 fi
c906108c 18174
bec39cab 18175
b4e70030
JB
18176 echo "$as_me:$LINENO: checking for struct link_map32 in sys/link.h" >&5
18177echo $ECHO_N "checking for struct link_map32 in sys/link.h... $ECHO_C" >&6
bec39cab
AC
18178 if test "${gdb_cv_have_struct_link_map32+set}" = set; then
18179 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18180else
bec39cab
AC
18181 cat >conftest.$ac_ext <<_ACEOF
18182/* confdefs.h. */
18183_ACEOF
18184cat confdefs.h >>conftest.$ac_ext
18185cat >>conftest.$ac_ext <<_ACEOF
18186/* end confdefs.h. */
97bf5e38
MK
18187#define _SYSCALL32
18188#include <sys/link.h>
bec39cab
AC
18189int
18190main ()
18191{
97bf5e38 18192struct link_map32 l;
bec39cab
AC
18193 ;
18194 return 0;
18195}
18196_ACEOF
18197rm -f conftest.$ac_objext
18198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18199 (eval $ac_compile) 2>conftest.er1
18200 ac_status=$?
18201 grep -v '^ *+' conftest.er1 >conftest.err
18202 rm -f conftest.er1
18203 cat conftest.err >&5
18204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18205 (exit $ac_status); } &&
b4e70030
JB
18206 { ac_try='test -z "$ac_c_werror_flag"
18207 || test ! -s conftest.err'
bec39cab
AC
18208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18209 (eval $ac_try) 2>&5
18210 ac_status=$?
18211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18212 (exit $ac_status); }; } &&
18213 { ac_try='test -s conftest.$ac_objext'
18214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18215 (eval $ac_try) 2>&5
18216 ac_status=$?
18217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18218 (exit $ac_status); }; }; then
97bf5e38
MK
18219 gdb_cv_have_struct_link_map32=yes
18220else
bec39cab
AC
18221 echo "$as_me: failed program was:" >&5
18222sed 's/^/| /' conftest.$ac_ext >&5
18223
b4e70030 18224gdb_cv_have_struct_link_map32=no
97bf5e38 18225fi
bec39cab 18226rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18227fi
c906108c 18228
b4e70030
JB
18229 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map32" >&5
18230echo "${ECHO_T}$gdb_cv_have_struct_link_map32" >&6
97bf5e38 18231 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f
SE
18232
18233cat >>confdefs.h <<\_ACEOF
97bf5e38 18234#define HAVE_STRUCT_LINK_MAP32 1
bec39cab 18235_ACEOF
c906108c 18236
60ca704f
SE
18237
18238cat >>confdefs.h <<\_ACEOF
97bf5e38 18239#define _SYSCALL32 1
bec39cab 18240_ACEOF
c906108c 18241
97bf5e38
MK
18242 fi
18243fi
c906108c 18244
bc8bcb4b 18245# Check if the compiler supports the `long long' type.
c906108c 18246
b4e70030
JB
18247echo "$as_me:$LINENO: checking for long long support in compiler" >&5
18248echo $ECHO_N "checking for long long support in compiler... $ECHO_C" >&6
bec39cab
AC
18249if test "${gdb_cv_c_long_long+set}" = set; then
18250 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18251else
bec39cab
AC
18252 cat >conftest.$ac_ext <<_ACEOF
18253/* confdefs.h. */
18254_ACEOF
18255cat confdefs.h >>conftest.$ac_ext
18256cat >>conftest.$ac_ext <<_ACEOF
18257/* end confdefs.h. */
bc8bcb4b 18258extern long long foo;
bec39cab
AC
18259int
18260main ()
18261{
bc8bcb4b 18262switch (foo & 2) { case 0: return 1; }
bec39cab
AC
18263 ;
18264 return 0;
18265}
18266_ACEOF
18267rm -f conftest.$ac_objext
18268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18269 (eval $ac_compile) 2>conftest.er1
18270 ac_status=$?
18271 grep -v '^ *+' conftest.er1 >conftest.err
18272 rm -f conftest.er1
18273 cat conftest.err >&5
18274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18275 (exit $ac_status); } &&
b4e70030
JB
18276 { ac_try='test -z "$ac_c_werror_flag"
18277 || test ! -s conftest.err'
bec39cab
AC
18278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18279 (eval $ac_try) 2>&5
18280 ac_status=$?
18281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18282 (exit $ac_status); }; } &&
18283 { ac_try='test -s conftest.$ac_objext'
18284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18285 (eval $ac_try) 2>&5
18286 ac_status=$?
18287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18288 (exit $ac_status); }; }; then
97bf5e38
MK
18289 gdb_cv_c_long_long=yes
18290else
bec39cab
AC
18291 echo "$as_me: failed program was:" >&5
18292sed 's/^/| /' conftest.$ac_ext >&5
18293
b4e70030 18294gdb_cv_c_long_long=no
97bf5e38 18295fi
bec39cab 18296rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18297fi
b4e70030
JB
18298echo "$as_me:$LINENO: result: $gdb_cv_c_long_long" >&5
18299echo "${ECHO_T}$gdb_cv_c_long_long" >&6
97bf5e38 18300if test $gdb_cv_c_long_long = yes; then
bc8bcb4b
MK
18301
18302cat >>confdefs.h <<\_ACEOF
97bf5e38 18303#define CC_HAS_LONG_LONG 1
bec39cab 18304_ACEOF
97bf5e38
MK
18305
18306fi
18307
bc8bcb4b 18308# Check if the compiler and runtime support printing long longs.
97bf5e38 18309
b4e70030
JB
18310echo "$as_me:$LINENO: checking for long long support in printf" >&5
18311echo $ECHO_N "checking for long long support in printf... $ECHO_C" >&6
bec39cab
AC
18312if test "${gdb_cv_printf_has_long_long+set}" = set; then
18313 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18314else
18315 if test "$cross_compiling" = yes; then
18316 gdb_cv_printf_has_long_long=no
18317else
bec39cab
AC
18318 cat >conftest.$ac_ext <<_ACEOF
18319/* confdefs.h. */
18320_ACEOF
18321cat confdefs.h >>conftest.$ac_ext
18322cat >>conftest.$ac_ext <<_ACEOF
18323/* end confdefs.h. */
bc8bcb4b
MK
18324$ac_includes_default
18325int
18326main ()
18327{
18328char buf[32];
97bf5e38
MK
18329 long long l = 0;
18330 l = (l << 16) + 0x0123;
18331 l = (l << 16) + 0x4567;
18332 l = (l << 16) + 0x89ab;
18333 l = (l << 16) + 0xcdef;
18334 sprintf (buf, "0x%016llx", l);
18335 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
18336 ;
18337 return 0;
c906108c 18338}
bec39cab
AC
18339_ACEOF
18340rm -f conftest$ac_exeext
18341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18342 (eval $ac_link) 2>&5
18343 ac_status=$?
18344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18347 (eval $ac_try) 2>&5
18348 ac_status=$?
18349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18350 (exit $ac_status); }; }; then
97bf5e38
MK
18351 gdb_cv_printf_has_long_long=yes
18352else
bec39cab
AC
18353 echo "$as_me: program exited with status $ac_status" >&5
18354echo "$as_me: failed program was:" >&5
18355sed 's/^/| /' conftest.$ac_ext >&5
18356
18357( exit $ac_status )
18358gdb_cv_printf_has_long_long=no
97bf5e38 18359fi
b4e70030 18360rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 18361fi
97bf5e38 18362fi
b4e70030
JB
18363echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_long" >&5
18364echo "${ECHO_T}$gdb_cv_printf_has_long_long" >&6
97bf5e38 18365if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b
MK
18366
18367cat >>confdefs.h <<\_ACEOF
97bf5e38 18368#define PRINTF_HAS_LONG_LONG 1
bec39cab 18369_ACEOF
97bf5e38
MK
18370
18371fi
97bf5e38 18372
1a619819
LM
18373# Check if the compiler and runtime support printing decfloats.
18374
18375echo "$as_me:$LINENO: checking for decfloat support in printf" >&5
18376echo $ECHO_N "checking for decfloat support in printf... $ECHO_C" >&6
18377if test "${gdb_cv_printf_has_decfloat+set}" = set; then
18378 echo $ECHO_N "(cached) $ECHO_C" >&6
18379else
18380 if test "$cross_compiling" = yes; then
18381 gdb_cv_printf_has_decfloat=no
18382else
18383 cat >conftest.$ac_ext <<_ACEOF
18384/* confdefs.h. */
18385_ACEOF
18386cat confdefs.h >>conftest.$ac_ext
18387cat >>conftest.$ac_ext <<_ACEOF
18388/* end confdefs.h. */
18389$ac_includes_default
18390int
18391main ()
18392{
18393char buf[64];
18394 _Decimal32 d32 = 1.2345df;
18395 _Decimal64 d64 = 1.2345dd;
18396 _Decimal128 d128 = 1.2345dl;
18397 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
18398 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
18399 ;
18400 return 0;
18401}
18402_ACEOF
18403rm -f conftest$ac_exeext
18404if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18405 (eval $ac_link) 2>&5
18406 ac_status=$?
18407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18408 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18410 (eval $ac_try) 2>&5
18411 ac_status=$?
18412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18413 (exit $ac_status); }; }; then
18414 gdb_cv_printf_has_decfloat=yes
18415else
18416 echo "$as_me: program exited with status $ac_status" >&5
18417echo "$as_me: failed program was:" >&5
18418sed 's/^/| /' conftest.$ac_ext >&5
18419
18420( exit $ac_status )
18421gdb_cv_printf_has_decfloat=no
18422fi
18423rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18424fi
18425fi
18426echo "$as_me:$LINENO: result: $gdb_cv_printf_has_decfloat" >&5
18427echo "${ECHO_T}$gdb_cv_printf_has_decfloat" >&6
18428if test $gdb_cv_printf_has_decfloat = yes; then
18429
18430cat >>confdefs.h <<\_ACEOF
18431#define PRINTF_HAS_DECFLOAT 1
18432_ACEOF
18433
18434fi
18435
bc8bcb4b
MK
18436# Check if the compiler supports the `long double' type. We can't use
18437# AC_C_LONG_DOUBLE because that one does additional checks on the
18438# constants defined in <float.h> that fail on some systems,
18439# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 18440
b4e70030
JB
18441echo "$as_me:$LINENO: checking for long double support in compiler" >&5
18442echo $ECHO_N "checking for long double support in compiler... $ECHO_C" >&6
bc8bcb4b 18443if test "${gdb_cv_c_long_double+set}" = set; then
bec39cab 18444 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18445else
bec39cab
AC
18446 cat >conftest.$ac_ext <<_ACEOF
18447/* confdefs.h. */
18448_ACEOF
18449cat confdefs.h >>conftest.$ac_ext
18450cat >>conftest.$ac_ext <<_ACEOF
18451/* end confdefs.h. */
97bf5e38 18452long double foo;
bec39cab
AC
18453_ACEOF
18454rm -f conftest.$ac_objext
18455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18456 (eval $ac_compile) 2>conftest.er1
18457 ac_status=$?
18458 grep -v '^ *+' conftest.er1 >conftest.err
18459 rm -f conftest.er1
18460 cat conftest.err >&5
18461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18462 (exit $ac_status); } &&
b4e70030
JB
18463 { ac_try='test -z "$ac_c_werror_flag"
18464 || test ! -s conftest.err'
bec39cab
AC
18465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18466 (eval $ac_try) 2>&5
18467 ac_status=$?
18468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18469 (exit $ac_status); }; } &&
18470 { ac_try='test -s conftest.$ac_objext'
18471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18472 (eval $ac_try) 2>&5
18473 ac_status=$?
18474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18475 (exit $ac_status); }; }; then
bc8bcb4b 18476 gdb_cv_c_long_double=yes
97bf5e38 18477else
bec39cab
AC
18478 echo "$as_me: failed program was:" >&5
18479sed 's/^/| /' conftest.$ac_ext >&5
18480
b4e70030 18481gdb_cv_c_long_double=no
97bf5e38 18482fi
bec39cab 18483rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18484fi
b4e70030
JB
18485echo "$as_me:$LINENO: result: $gdb_cv_c_long_double" >&5
18486echo "${ECHO_T}$gdb_cv_c_long_double" >&6
bc8bcb4b 18487if test $gdb_cv_c_long_double = yes; then
c906108c 18488
bc8bcb4b 18489cat >>confdefs.h <<\_ACEOF
97bf5e38 18490#define HAVE_LONG_DOUBLE 1
bec39cab 18491_ACEOF
97bf5e38
MK
18492
18493fi
18494
bc8bcb4b 18495# Check if the compiler and runtime support printing long doubles.
97bf5e38 18496
b4e70030
JB
18497echo "$as_me:$LINENO: checking for long double support in printf" >&5
18498echo $ECHO_N "checking for long double support in printf... $ECHO_C" >&6
bec39cab
AC
18499if test "${gdb_cv_printf_has_long_double+set}" = set; then
18500 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18501else
18502 if test "$cross_compiling" = yes; then
18503 gdb_cv_printf_has_long_double=no
18504else
bec39cab
AC
18505 cat >conftest.$ac_ext <<_ACEOF
18506/* confdefs.h. */
18507_ACEOF
18508cat confdefs.h >>conftest.$ac_ext
18509cat >>conftest.$ac_ext <<_ACEOF
18510/* end confdefs.h. */
bc8bcb4b
MK
18511$ac_includes_default
18512int
18513main ()
18514{
18515char buf[16];
97bf5e38
MK
18516 long double f = 3.141592653;
18517 sprintf (buf, "%Lg", f);
18518 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
18519 ;
18520 return 0;
97bf5e38 18521}
bec39cab
AC
18522_ACEOF
18523rm -f conftest$ac_exeext
18524if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18525 (eval $ac_link) 2>&5
18526 ac_status=$?
18527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18528 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18530 (eval $ac_try) 2>&5
18531 ac_status=$?
18532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18533 (exit $ac_status); }; }; then
97bf5e38 18534 gdb_cv_printf_has_long_double=yes
c906108c 18535else
bec39cab
AC
18536 echo "$as_me: program exited with status $ac_status" >&5
18537echo "$as_me: failed program was:" >&5
18538sed 's/^/| /' conftest.$ac_ext >&5
18539
18540( exit $ac_status )
18541gdb_cv_printf_has_long_double=no
c906108c 18542fi
b4e70030 18543rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 18544fi
c906108c 18545fi
b4e70030
JB
18546echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_double" >&5
18547echo "${ECHO_T}$gdb_cv_printf_has_long_double" >&6
97bf5e38 18548if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b
MK
18549
18550cat >>confdefs.h <<\_ACEOF
97bf5e38 18551#define PRINTF_HAS_LONG_DOUBLE 1
bec39cab 18552_ACEOF
97bf5e38
MK
18553
18554fi
97bf5e38 18555
bc8bcb4b 18556# Check if the compiler and runtime support scanning long doubles.
97bf5e38 18557
b4e70030
JB
18558echo "$as_me:$LINENO: checking for long double support in scanf" >&5
18559echo $ECHO_N "checking for long double support in scanf... $ECHO_C" >&6
bec39cab
AC
18560if test "${gdb_cv_scanf_has_long_double+set}" = set; then
18561 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18562else
18563 if test "$cross_compiling" = yes; then
18564 gdb_cv_scanf_has_long_double=no
18565else
bec39cab
AC
18566 cat >conftest.$ac_ext <<_ACEOF
18567/* confdefs.h. */
18568_ACEOF
18569cat confdefs.h >>conftest.$ac_ext
18570cat >>conftest.$ac_ext <<_ACEOF
18571/* end confdefs.h. */
bc8bcb4b
MK
18572#include <stdio.h>
18573int
18574main ()
18575{
18576char *buf = "3.141592653";
97bf5e38
MK
18577 long double f = 0;
18578 sscanf (buf, "%Lg", &f);
18579 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
18580 ;
18581 return 0;
97bf5e38 18582}
bec39cab
AC
18583_ACEOF
18584rm -f conftest$ac_exeext
18585if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18586 (eval $ac_link) 2>&5
18587 ac_status=$?
18588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18589 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18591 (eval $ac_try) 2>&5
18592 ac_status=$?
18593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18594 (exit $ac_status); }; }; then
97bf5e38
MK
18595 gdb_cv_scanf_has_long_double=yes
18596else
bec39cab
AC
18597 echo "$as_me: program exited with status $ac_status" >&5
18598echo "$as_me: failed program was:" >&5
18599sed 's/^/| /' conftest.$ac_ext >&5
18600
18601( exit $ac_status )
18602gdb_cv_scanf_has_long_double=no
97bf5e38 18603fi
b4e70030 18604rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 18605fi
c906108c 18606fi
b4e70030
JB
18607echo "$as_me:$LINENO: result: $gdb_cv_scanf_has_long_double" >&5
18608echo "${ECHO_T}$gdb_cv_scanf_has_long_double" >&6
97bf5e38 18609if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b
MK
18610
18611cat >>confdefs.h <<\_ACEOF
97bf5e38 18612#define SCANF_HAS_LONG_DOUBLE 1
bec39cab 18613_ACEOF
97bf5e38
MK
18614
18615fi
c906108c 18616
438013df
AO
18617case ${host_os} in
18618aix*)
b4e70030
JB
18619 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
18620echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
bec39cab
AC
18621if test "${gdb_cv_bigtoc+set}" = set; then
18622 echo $ECHO_N "(cached) $ECHO_C" >&6
438013df 18623else
bec39cab 18624
438013df
AO
18625 SAVE_LDFLAGS=$LDFLAGS
18626
18627 case $GCC in
18628 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
18629 *) gdb_cv_bigtoc=-bbigtoc ;;
18630 esac
18631
18632 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
bec39cab
AC
18633 cat >conftest.$ac_ext <<_ACEOF
18634/* confdefs.h. */
18635_ACEOF
18636cat confdefs.h >>conftest.$ac_ext
18637cat >>conftest.$ac_ext <<_ACEOF
18638/* end confdefs.h. */
438013df 18639
bec39cab
AC
18640int
18641main ()
18642{
438013df 18643int i;
bec39cab
AC
18644 ;
18645 return 0;
18646}
18647_ACEOF
18648rm -f conftest.$ac_objext conftest$ac_exeext
18649if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18650 (eval $ac_link) 2>conftest.er1
18651 ac_status=$?
18652 grep -v '^ *+' conftest.er1 >conftest.err
18653 rm -f conftest.er1
18654 cat conftest.err >&5
18655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18656 (exit $ac_status); } &&
b4e70030
JB
18657 { ac_try='test -z "$ac_c_werror_flag"
18658 || test ! -s conftest.err'
bec39cab
AC
18659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18660 (eval $ac_try) 2>&5
18661 ac_status=$?
18662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18663 (exit $ac_status); }; } &&
18664 { ac_try='test -s conftest$ac_exeext'
18665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18666 (eval $ac_try) 2>&5
18667 ac_status=$?
18668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18669 (exit $ac_status); }; }; then
438013df
AO
18670 :
18671else
bec39cab
AC
18672 echo "$as_me: failed program was:" >&5
18673sed 's/^/| /' conftest.$ac_ext >&5
18674
b4e70030 18675gdb_cv_bigtoc=
438013df 18676fi
bec39cab
AC
18677rm -f conftest.err conftest.$ac_objext \
18678 conftest$ac_exeext conftest.$ac_ext
ec76baa5 18679 LDFLAGS="${SAVE_LDFLAGS}"
438013df 18680
bec39cab 18681fi
b4e70030
JB
18682echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
18683echo "${ECHO_T}$gdb_cv_bigtoc" >&6
438013df
AO
18684 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
18685 ;;
18686esac
18687
c906108c
SS
18688
18689
18690if test ${build} = ${host} -a ${host} = ${target} ; then
18691 case ${host_os} in
18692 hpux*)
b4e70030
JB
18693 echo "$as_me:$LINENO: checking for HPUX/OSF thread support" >&5
18694echo $ECHO_N "checking for HPUX/OSF thread support... $ECHO_C" >&6
c906108c
SS
18695 if test -f /usr/include/dce/cma_config.h ; then
18696 if test "$GCC" = "yes" ; then
b4e70030
JB
18697 echo "$as_me:$LINENO: result: yes" >&5
18698echo "${ECHO_T}yes" >&6
60ca704f
SE
18699
18700cat >>confdefs.h <<\_ACEOF
c906108c 18701#define HAVE_HPUX_THREAD_SUPPORT 1
bec39cab 18702_ACEOF
c906108c 18703
3483b318 18704 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
18705 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
18706 else
b4e70030
JB
18707 echo "$as_me:$LINENO: result: no (suppressed because you are not using GCC)" >&5
18708echo "${ECHO_T}no (suppressed because you are not using GCC)" >&6
c906108c
SS
18709 fi
18710 else
b4e70030
JB
18711 echo "$as_me:$LINENO: result: no" >&5
18712echo "${ECHO_T}no" >&6
c906108c
SS
18713 fi
18714 ;;
18715 solaris*)
d92419e5
JB
18716 # See if thread_db library is around for Solaris thread debugging.
18717 # Note that we must explicitly test for version 1 of the library
18718 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
18719 # the same API.
b4e70030
JB
18720 echo "$as_me:$LINENO: checking for Solaris thread debugging library" >&5
18721echo $ECHO_N "checking for Solaris thread debugging library... $ECHO_C" >&6
c906108c 18722 if test -f /usr/lib/libthread_db.so.1 ; then
b4e70030
JB
18723 echo "$as_me:$LINENO: result: yes" >&5
18724echo "${ECHO_T}yes" >&6
60ca704f
SE
18725
18726cat >>confdefs.h <<\_ACEOF
c906108c 18727#define HAVE_THREAD_DB_LIB 1
bec39cab 18728_ACEOF
c906108c 18729
3483b318 18730 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 18731 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
bec39cab 18732
b4e70030
JB
18733echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
18734echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
bec39cab
AC
18735if test "${ac_cv_lib_dl_dlopen+set}" = set; then
18736 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18737else
bec39cab 18738 ac_check_lib_save_LIBS=$LIBS
c906108c 18739LIBS="-ldl $LIBS"
bec39cab
AC
18740cat >conftest.$ac_ext <<_ACEOF
18741/* confdefs.h. */
18742_ACEOF
18743cat confdefs.h >>conftest.$ac_ext
18744cat >>conftest.$ac_ext <<_ACEOF
18745/* end confdefs.h. */
18746
b4e70030 18747/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
18748#ifdef __cplusplus
18749extern "C"
18750#endif
b4e70030
JB
18751/* We use char because int might match the return type of a gcc2
18752 builtin and then its argument prototype would still apply. */
bec39cab
AC
18753char dlopen ();
18754int
18755main ()
18756{
b4e70030 18757dlopen ();
bec39cab
AC
18758 ;
18759 return 0;
18760}
18761_ACEOF
18762rm -f conftest.$ac_objext conftest$ac_exeext
18763if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18764 (eval $ac_link) 2>conftest.er1
18765 ac_status=$?
18766 grep -v '^ *+' conftest.er1 >conftest.err
18767 rm -f conftest.er1
18768 cat conftest.err >&5
18769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18770 (exit $ac_status); } &&
b4e70030
JB
18771 { ac_try='test -z "$ac_c_werror_flag"
18772 || test ! -s conftest.err'
bec39cab
AC
18773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18774 (eval $ac_try) 2>&5
18775 ac_status=$?
18776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18777 (exit $ac_status); }; } &&
18778 { ac_try='test -s conftest$ac_exeext'
18779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18780 (eval $ac_try) 2>&5
18781 ac_status=$?
18782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18783 (exit $ac_status); }; }; then
18784 ac_cv_lib_dl_dlopen=yes
18785else
18786 echo "$as_me: failed program was:" >&5
18787sed 's/^/| /' conftest.$ac_ext >&5
18788
b4e70030 18789ac_cv_lib_dl_dlopen=no
bec39cab
AC
18790fi
18791rm -f conftest.err conftest.$ac_objext \
18792 conftest$ac_exeext conftest.$ac_ext
18793LIBS=$ac_check_lib_save_LIBS
18794fi
b4e70030
JB
18795echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
18796echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
bec39cab
AC
18797if test $ac_cv_lib_dl_dlopen = yes; then
18798 cat >>confdefs.h <<_ACEOF
18799#define HAVE_LIBDL 1
18800_ACEOF
c906108c
SS
18801
18802 LIBS="-ldl $LIBS"
18803
c906108c
SS
18804fi
18805
18806 if test "$GCC" = "yes" ; then
18807 # The GNU linker requires the -export-dynamic option to make
18808 # all symbols visible in the dynamic symbol table.
18809 hold_ldflags=$LDFLAGS
b4e70030
JB
18810 echo "$as_me:$LINENO: checking for the ld -export-dynamic flag" >&5
18811echo $ECHO_N "checking for the ld -export-dynamic flag... $ECHO_C" >&6
c906108c 18812 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
bec39cab
AC
18813 cat >conftest.$ac_ext <<_ACEOF
18814/* confdefs.h. */
18815_ACEOF
18816cat confdefs.h >>conftest.$ac_ext
18817cat >>conftest.$ac_ext <<_ACEOF
18818/* end confdefs.h. */
c906108c 18819
bec39cab
AC
18820int
18821main ()
18822{
c906108c 18823int i;
bec39cab
AC
18824 ;
18825 return 0;
18826}
18827_ACEOF
18828rm -f conftest.$ac_objext conftest$ac_exeext
18829if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18830 (eval $ac_link) 2>conftest.er1
18831 ac_status=$?
18832 grep -v '^ *+' conftest.er1 >conftest.err
18833 rm -f conftest.er1
18834 cat conftest.err >&5
18835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18836 (exit $ac_status); } &&
b4e70030
JB
18837 { ac_try='test -z "$ac_c_werror_flag"
18838 || test ! -s conftest.err'
bec39cab
AC
18839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18840 (eval $ac_try) 2>&5
18841 ac_status=$?
18842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18843 (exit $ac_status); }; } &&
18844 { ac_try='test -s conftest$ac_exeext'
18845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18846 (eval $ac_try) 2>&5
18847 ac_status=$?
18848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18849 (exit $ac_status); }; }; then
c906108c
SS
18850 found=yes
18851else
bec39cab
AC
18852 echo "$as_me: failed program was:" >&5
18853sed 's/^/| /' conftest.$ac_ext >&5
18854
b4e70030 18855found=no
c906108c 18856fi
bec39cab
AC
18857rm -f conftest.err conftest.$ac_objext \
18858 conftest$ac_exeext conftest.$ac_ext
c906108c 18859 LDFLAGS=$hold_ldflags
b4e70030
JB
18860 echo "$as_me:$LINENO: result: $found" >&5
18861echo "${ECHO_T}$found" >&6
c906108c
SS
18862 if test $found = yes; then
18863 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
18864 fi
18865 fi
18866 # Sun randomly tweaked the prototypes in <proc_service.h>
18867 # at one point.
b4e70030
JB
18868 echo "$as_me:$LINENO: checking if <proc_service.h> is old" >&5
18869echo $ECHO_N "checking if <proc_service.h> is old... $ECHO_C" >&6
bec39cab
AC
18870 if test "${gdb_cv_proc_service_is_old+set}" = set; then
18871 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18872else
bec39cab
AC
18873
18874 cat >conftest.$ac_ext <<_ACEOF
18875/* confdefs.h. */
18876_ACEOF
18877cat confdefs.h >>conftest.$ac_ext
18878cat >>conftest.$ac_ext <<_ACEOF
18879/* end confdefs.h. */
c906108c
SS
18880
18881 #include <proc_service.h>
18882 ps_err_e ps_pdwrite
18883 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 18884
bec39cab
AC
18885int
18886main ()
18887{
18888
18889 ;
18890 return 0;
18891}
18892_ACEOF
18893rm -f conftest.$ac_objext
18894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18895 (eval $ac_compile) 2>conftest.er1
18896 ac_status=$?
18897 grep -v '^ *+' conftest.er1 >conftest.err
18898 rm -f conftest.er1
18899 cat conftest.err >&5
18900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18901 (exit $ac_status); } &&
b4e70030
JB
18902 { ac_try='test -z "$ac_c_werror_flag"
18903 || test ! -s conftest.err'
bec39cab
AC
18904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18905 (eval $ac_try) 2>&5
18906 ac_status=$?
18907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18908 (exit $ac_status); }; } &&
18909 { ac_try='test -s conftest.$ac_objext'
18910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18911 (eval $ac_try) 2>&5
18912 ac_status=$?
18913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18914 (exit $ac_status); }; }; then
c906108c
SS
18915 gdb_cv_proc_service_is_old=no
18916else
bec39cab
AC
18917 echo "$as_me: failed program was:" >&5
18918sed 's/^/| /' conftest.$ac_ext >&5
18919
b4e70030 18920gdb_cv_proc_service_is_old=yes
c906108c 18921fi
bec39cab
AC
18922rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18923
c906108c
SS
18924fi
18925
b4e70030
JB
18926 echo "$as_me:$LINENO: result: $gdb_cv_proc_service_is_old" >&5
18927echo "${ECHO_T}$gdb_cv_proc_service_is_old" >&6
c906108c 18928 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f
SE
18929
18930cat >>confdefs.h <<\_ACEOF
c906108c 18931#define PROC_SERVICE_IS_OLD 1
bec39cab 18932_ACEOF
c906108c
SS
18933
18934 fi
18935 else
b4e70030
JB
18936 echo "$as_me:$LINENO: result: no" >&5
18937echo "${ECHO_T}no" >&6
c906108c
SS
18938 fi
18939 ;;
d92419e5 18940 aix*)
b4e70030
JB
18941 echo "$as_me:$LINENO: checking for AiX thread debugging library" >&5
18942echo $ECHO_N "checking for AiX thread debugging library... $ECHO_C" >&6
bec39cab
AC
18943 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then
18944 echo $ECHO_N "(cached) $ECHO_C" >&6
18945else
18946 cat >conftest.$ac_ext <<_ACEOF
18947/* confdefs.h. */
18948_ACEOF
18949cat confdefs.h >>conftest.$ac_ext
18950cat >>conftest.$ac_ext <<_ACEOF
18951/* end confdefs.h. */
d92419e5 18952#include <sys/pthdebug.h>
bec39cab
AC
18953int
18954main ()
18955{
d92419e5
JB
18956#ifndef PTHDB_VERSION_3
18957 #error
18958 #endif
bec39cab
AC
18959 ;
18960 return 0;
18961}
18962_ACEOF
18963rm -f conftest.$ac_objext
18964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18965 (eval $ac_compile) 2>conftest.er1
18966 ac_status=$?
18967 grep -v '^ *+' conftest.er1 >conftest.err
18968 rm -f conftest.er1
18969 cat conftest.err >&5
18970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18971 (exit $ac_status); } &&
b4e70030
JB
18972 { ac_try='test -z "$ac_c_werror_flag"
18973 || test ! -s conftest.err'
bec39cab
AC
18974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18975 (eval $ac_try) 2>&5
18976 ac_status=$?
18977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18978 (exit $ac_status); }; } &&
18979 { ac_try='test -s conftest.$ac_objext'
18980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18981 (eval $ac_try) 2>&5
18982 ac_status=$?
18983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18984 (exit $ac_status); }; }; then
d92419e5
JB
18985 gdb_cv_have_aix_thread_debug=yes
18986else
bec39cab
AC
18987 echo "$as_me: failed program was:" >&5
18988sed 's/^/| /' conftest.$ac_ext >&5
18989
b4e70030 18990gdb_cv_have_aix_thread_debug=no
d92419e5 18991fi
bec39cab 18992rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
18993fi
18994
b4e70030
JB
18995 echo "$as_me:$LINENO: result: $gdb_cv_have_aix_thread_debug" >&5
18996echo "${ECHO_T}$gdb_cv_have_aix_thread_debug" >&6
d92419e5
JB
18997 if test $gdb_cv_have_aix_thread_debug = yes; then
18998 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 18999 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
19000 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
19001 fi
19002 ;;
c906108c 19003 esac
bec39cab 19004
c906108c
SS
19005fi
19006
3f47be5c 19007if test "x$ac_cv_header_thread_db_h" = "xyes"; then
b4e70030
JB
19008 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTALLOC" >&5
19009echo $ECHO_N "checking whether <thread_db.h> has TD_NOTALLOC... $ECHO_C" >&6
bec39cab
AC
19010if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then
19011 echo $ECHO_N "(cached) $ECHO_C" >&6
19012else
19013 cat >conftest.$ac_ext <<_ACEOF
19014/* confdefs.h. */
19015_ACEOF
19016cat confdefs.h >>conftest.$ac_ext
19017cat >>conftest.$ac_ext <<_ACEOF
19018/* end confdefs.h. */
3f47be5c 19019#include <thread_db.h>
bec39cab
AC
19020int
19021main ()
19022{
3f47be5c 19023int i = TD_NOTALLOC;
bec39cab
AC
19024 ;
19025 return 0;
19026}
19027_ACEOF
19028rm -f conftest.$ac_objext
19029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19030 (eval $ac_compile) 2>conftest.er1
19031 ac_status=$?
19032 grep -v '^ *+' conftest.er1 >conftest.err
19033 rm -f conftest.er1
19034 cat conftest.err >&5
19035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19036 (exit $ac_status); } &&
b4e70030
JB
19037 { ac_try='test -z "$ac_c_werror_flag"
19038 || test ! -s conftest.err'
bec39cab
AC
19039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19040 (eval $ac_try) 2>&5
19041 ac_status=$?
19042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19043 (exit $ac_status); }; } &&
19044 { ac_try='test -s conftest.$ac_objext'
19045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19046 (eval $ac_try) 2>&5
19047 ac_status=$?
19048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19049 (exit $ac_status); }; }; then
3f47be5c
EZ
19050 gdb_cv_thread_db_h_has_td_notalloc=yes
19051else
bec39cab
AC
19052 echo "$as_me: failed program was:" >&5
19053sed 's/^/| /' conftest.$ac_ext >&5
19054
b4e70030 19055gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 19056
3f47be5c 19057fi
bec39cab 19058rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 19059
bec39cab 19060fi
b4e70030
JB
19061echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
19062echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notalloc" >&6
59f80f10
DJ
19063 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_VERSION" >&5
19064echo $ECHO_N "checking whether <thread_db.h> has TD_VERSION... $ECHO_C" >&6
19065if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then
19066 echo $ECHO_N "(cached) $ECHO_C" >&6
19067else
19068 cat >conftest.$ac_ext <<_ACEOF
19069/* confdefs.h. */
19070_ACEOF
19071cat confdefs.h >>conftest.$ac_ext
19072cat >>conftest.$ac_ext <<_ACEOF
19073/* end confdefs.h. */
19074#include <thread_db.h>
19075int
19076main ()
19077{
19078int i = TD_VERSION;
19079 ;
19080 return 0;
19081}
19082_ACEOF
19083rm -f conftest.$ac_objext
19084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19085 (eval $ac_compile) 2>conftest.er1
19086 ac_status=$?
19087 grep -v '^ *+' conftest.er1 >conftest.err
19088 rm -f conftest.er1
19089 cat conftest.err >&5
19090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19091 (exit $ac_status); } &&
19092 { ac_try='test -z "$ac_c_werror_flag"
19093 || test ! -s conftest.err'
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); }; } &&
19099 { ac_try='test -s conftest.$ac_objext'
19100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19101 (eval $ac_try) 2>&5
19102 ac_status=$?
19103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19104 (exit $ac_status); }; }; then
19105 gdb_cv_thread_db_h_has_td_version=yes
19106else
19107 echo "$as_me: failed program was:" >&5
19108sed 's/^/| /' conftest.$ac_ext >&5
19109
19110gdb_cv_thread_db_h_has_td_version=no
19111
19112fi
19113rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19114
19115fi
19116echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_version" >&5
19117echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_version" >&6
19118 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTLS" >&5
19119echo $ECHO_N "checking whether <thread_db.h> has TD_NOTLS... $ECHO_C" >&6
19120if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then
19121 echo $ECHO_N "(cached) $ECHO_C" >&6
19122else
19123 cat >conftest.$ac_ext <<_ACEOF
19124/* confdefs.h. */
19125_ACEOF
19126cat confdefs.h >>conftest.$ac_ext
19127cat >>conftest.$ac_ext <<_ACEOF
19128/* end confdefs.h. */
19129#include <thread_db.h>
19130int
19131main ()
19132{
19133int i = TD_NOTLS;
19134 ;
19135 return 0;
19136}
19137_ACEOF
19138rm -f conftest.$ac_objext
19139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19140 (eval $ac_compile) 2>conftest.er1
19141 ac_status=$?
19142 grep -v '^ *+' conftest.er1 >conftest.err
19143 rm -f conftest.er1
19144 cat conftest.err >&5
19145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19146 (exit $ac_status); } &&
19147 { ac_try='test -z "$ac_c_werror_flag"
19148 || test ! -s conftest.err'
19149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19150 (eval $ac_try) 2>&5
19151 ac_status=$?
19152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19153 (exit $ac_status); }; } &&
19154 { ac_try='test -s conftest.$ac_objext'
19155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19156 (eval $ac_try) 2>&5
19157 ac_status=$?
19158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19159 (exit $ac_status); }; }; then
19160 gdb_cv_thread_db_h_has_td_notls=yes
19161else
19162 echo "$as_me: failed program was:" >&5
19163sed 's/^/| /' conftest.$ac_ext >&5
19164
19165gdb_cv_thread_db_h_has_td_notls=no
19166
19167fi
19168rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19169
19170fi
19171echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notls" >&5
19172echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notls" >&6
3f47be5c
EZ
19173fi
19174if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab
AC
19175
19176cat >>confdefs.h <<\_ACEOF
3f47be5c 19177#define THREAD_DB_HAS_TD_NOTALLOC 1
bec39cab 19178_ACEOF
3f47be5c 19179
59f80f10
DJ
19180fi
19181if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
19182
19183cat >>confdefs.h <<\_ACEOF
19184#define THREAD_DB_HAS_TD_VERSION 1
19185_ACEOF
19186
19187fi
19188if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
19189
19190cat >>confdefs.h <<\_ACEOF
19191#define THREAD_DB_HAS_TD_NOTLS 1
19192_ACEOF
19193
3f47be5c
EZ
19194fi
19195
b757528f 19196if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
b4e70030
JB
19197 echo "$as_me:$LINENO: checking whether <sys/syscall.h> has __NR_tkill" >&5
19198echo $ECHO_N "checking whether <sys/syscall.h> has __NR_tkill... $ECHO_C" >&6
bec39cab
AC
19199if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then
19200 echo $ECHO_N "(cached) $ECHO_C" >&6
19201else
19202 cat >conftest.$ac_ext <<_ACEOF
19203/* confdefs.h. */
19204_ACEOF
19205cat confdefs.h >>conftest.$ac_ext
19206cat >>conftest.$ac_ext <<_ACEOF
19207/* end confdefs.h. */
b757528f 19208#include <sys/syscall.h>
bec39cab
AC
19209int
19210main ()
19211{
b757528f 19212int i = __NR_tkill;
bec39cab
AC
19213 ;
19214 return 0;
19215}
19216_ACEOF
19217rm -f conftest.$ac_objext
19218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19219 (eval $ac_compile) 2>conftest.er1
19220 ac_status=$?
19221 grep -v '^ *+' conftest.er1 >conftest.err
19222 rm -f conftest.er1
19223 cat conftest.err >&5
19224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19225 (exit $ac_status); } &&
b4e70030
JB
19226 { ac_try='test -z "$ac_c_werror_flag"
19227 || test ! -s conftest.err'
bec39cab
AC
19228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19229 (eval $ac_try) 2>&5
19230 ac_status=$?
19231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19232 (exit $ac_status); }; } &&
19233 { ac_try='test -s conftest.$ac_objext'
19234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19235 (eval $ac_try) 2>&5
19236 ac_status=$?
19237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19238 (exit $ac_status); }; }; then
b757528f
JJ
19239 gdb_cv_sys_syscall_h_has_tkill=yes
19240else
bec39cab
AC
19241 echo "$as_me: failed program was:" >&5
19242sed 's/^/| /' conftest.$ac_ext >&5
19243
b4e70030 19244gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 19245
b757528f 19246fi
bec39cab 19247rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 19248
bec39cab 19249fi
b4e70030
JB
19250echo "$as_me:$LINENO: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
19251echo "${ECHO_T}$gdb_cv_sys_syscall_h_has_tkill" >&6
b757528f
JJ
19252fi
19253if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab
AC
19254
19255cat >>confdefs.h <<\_ACEOF
b757528f 19256#define HAVE_TKILL_SYSCALL 1
bec39cab 19257_ACEOF
b757528f
JJ
19258
19259fi
19260
10568435
JK
19261echo "$as_me:$LINENO: checking whether ADDR_NO_RANDOMIZE is declared" >&5
19262echo $ECHO_N "checking whether ADDR_NO_RANDOMIZE is declared... $ECHO_C" >&6
19263if test "${ac_cv_have_decl_ADDR_NO_RANDOMIZE+set}" = set; then
19264 echo $ECHO_N "(cached) $ECHO_C" >&6
19265else
19266 cat >conftest.$ac_ext <<_ACEOF
19267/* confdefs.h. */
19268_ACEOF
19269cat confdefs.h >>conftest.$ac_ext
19270cat >>conftest.$ac_ext <<_ACEOF
19271/* end confdefs.h. */
19272#include <sys/personality.h>
19273
19274int
19275main ()
19276{
19277#ifndef ADDR_NO_RANDOMIZE
19278 char *p = (char *) ADDR_NO_RANDOMIZE;
19279#endif
19280
19281 ;
19282 return 0;
19283}
19284_ACEOF
19285rm -f conftest.$ac_objext
19286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19287 (eval $ac_compile) 2>conftest.er1
19288 ac_status=$?
19289 grep -v '^ *+' conftest.er1 >conftest.err
19290 rm -f conftest.er1
19291 cat conftest.err >&5
19292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19293 (exit $ac_status); } &&
19294 { ac_try='test -z "$ac_c_werror_flag"
19295 || test ! -s conftest.err'
19296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19297 (eval $ac_try) 2>&5
19298 ac_status=$?
19299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19300 (exit $ac_status); }; } &&
19301 { ac_try='test -s conftest.$ac_objext'
19302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19303 (eval $ac_try) 2>&5
19304 ac_status=$?
19305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19306 (exit $ac_status); }; }; then
19307 ac_cv_have_decl_ADDR_NO_RANDOMIZE=yes
19308else
19309 echo "$as_me: failed program was:" >&5
19310sed 's/^/| /' conftest.$ac_ext >&5
19311
19312ac_cv_have_decl_ADDR_NO_RANDOMIZE=no
19313fi
19314rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19315fi
19316echo "$as_me:$LINENO: result: $ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&5
19317echo "${ECHO_T}$ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&6
19318if test $ac_cv_have_decl_ADDR_NO_RANDOMIZE = yes; then
19319
19320cat >>confdefs.h <<_ACEOF
19321#define HAVE_DECL_ADDR_NO_RANDOMIZE 1
19322_ACEOF
19323
19324
19325else
19326 cat >>confdefs.h <<_ACEOF
19327#define HAVE_DECL_ADDR_NO_RANDOMIZE 0
19328_ACEOF
19329
19330
19331fi
19332
19333
19334
19335if test "$cross_compiling" = yes; then
19336 cat >conftest.$ac_ext <<_ACEOF
19337/* confdefs.h. */
19338_ACEOF
19339cat confdefs.h >>conftest.$ac_ext
19340cat >>conftest.$ac_ext <<_ACEOF
19341/* end confdefs.h. */
19342#include <sys/personality.h>
19343int
19344main ()
19345{
19346
19347# if !HAVE_DECL_ADDR_NO_RANDOMIZE
19348# define ADDR_NO_RANDOMIZE 0x0040000
19349# endif
19350 /* Test the flag could be set and stays set. */
19351 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19352 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19353 return 1
19354 ;
19355 return 0;
19356}
19357_ACEOF
19358rm -f conftest.$ac_objext conftest$ac_exeext
19359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19360 (eval $ac_link) 2>conftest.er1
19361 ac_status=$?
19362 grep -v '^ *+' conftest.er1 >conftest.err
19363 rm -f conftest.er1
19364 cat conftest.err >&5
19365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19366 (exit $ac_status); } &&
19367 { ac_try='test -z "$ac_c_werror_flag"
19368 || test ! -s conftest.err'
19369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19370 (eval $ac_try) 2>&5
19371 ac_status=$?
19372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19373 (exit $ac_status); }; } &&
19374 { ac_try='test -s conftest$ac_exeext'
19375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19376 (eval $ac_try) 2>&5
19377 ac_status=$?
19378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19379 (exit $ac_status); }; }; then
19380 have_personality=true
19381else
19382 echo "$as_me: failed program was:" >&5
19383sed 's/^/| /' conftest.$ac_ext >&5
19384
19385have_personality=false
19386fi
19387rm -f conftest.err conftest.$ac_objext \
19388 conftest$ac_exeext conftest.$ac_ext
19389else
19390 cat >conftest.$ac_ext <<_ACEOF
19391/* confdefs.h. */
19392_ACEOF
19393cat confdefs.h >>conftest.$ac_ext
19394cat >>conftest.$ac_ext <<_ACEOF
19395/* end confdefs.h. */
19396#include <sys/personality.h>
19397int
19398main ()
19399{
19400
19401# if !HAVE_DECL_ADDR_NO_RANDOMIZE
19402# define ADDR_NO_RANDOMIZE 0x0040000
19403# endif
19404 /* Test the flag could be set and stays set. */
19405 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19406 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19407 return 1
19408 ;
19409 return 0;
19410}
19411_ACEOF
19412rm -f conftest$ac_exeext
19413if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19414 (eval $ac_link) 2>&5
19415 ac_status=$?
19416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19417 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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); }; }; then
19423 have_personality=true
19424else
19425 echo "$as_me: program exited with status $ac_status" >&5
19426echo "$as_me: failed program was:" >&5
19427sed 's/^/| /' conftest.$ac_ext >&5
19428
19429( exit $ac_status )
19430have_personality=false
19431fi
19432rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19433fi
19434if $have_personality
19435then
19436
19437cat >>confdefs.h <<\_ACEOF
19438#define HAVE_PERSONALITY 1
19439_ACEOF
19440
19441fi
19442
fb40c209 19443
bec39cab 19444
b4e70030 19445# Check whether --with-sysroot or --without-sysroot was given.
030292b7 19446if test "${with_sysroot+set}" = set; then
b4e70030
JB
19447 withval="$with_sysroot"
19448
030292b7 19449 case ${with_sysroot} in
715d1656 19450 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
19451 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
19452 esac
19453
19454 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
19455
07abfebf
RS
19456 if test "x$prefix" = xNONE; then
19457 test_prefix=/usr/local
19458 else
19459 test_prefix=$prefix
19460 fi
aa28a74e 19461 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 19462 test_exec_prefix=$test_prefix
030292b7 19463 else
07abfebf 19464 test_exec_prefix=$exec_prefix
030292b7
DJ
19465 fi
19466 case ${TARGET_SYSTEM_ROOT} in
715d1656 19467 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
19468 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
19469 '${prefix}'|'${prefix}/'*|\
715d1656 19470 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
19471 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
19472 TARGET_SYSTEM_ROOT_DEFINE="$t"
19473 ;;
19474 esac
19475
19476else
bec39cab 19477
030292b7
DJ
19478 TARGET_SYSTEM_ROOT=
19479 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
19480
b4e70030 19481fi;
030292b7
DJ
19482
19483
19484
b4e70030 19485# Check whether --enable-werror or --disable-werror was given.
094a342e 19486if test "${enable_werror+set}" = set; then
b4e70030
JB
19487 enableval="$enable_werror"
19488 case "${enableval}" in
094a342e
MK
19489 yes | y) ERROR_ON_WARNING="yes" ;;
19490 no | n) ERROR_ON_WARNING="no" ;;
19491 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
19492echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
19493 { (exit 1); exit 1; }; } ;;
19494 esac
b4e70030 19495fi;
094a342e
MK
19496
19497# Enable -Werror by default when using gcc
19498if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
19499 ERROR_ON_WARNING=yes
19500fi
19501
19502WERROR_CFLAGS=""
19503if test "${ERROR_ON_WARNING}" = yes ; then
19504 WERROR_CFLAGS="-Werror"
19505fi
19506
aa79a185
DJ
19507# The entries after -Wno-pointer-sign are disabled warnings which may
19508# be enabled in the future, which can not currently be used to build
19509# GDB.
19510# NOTE: If you change this list, remember to update
3b851bce 19511# gdb/doc/gdbint.texinfo.
aa79a185
DJ
19512build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
19513-Wformat-nonliteral -Wno-pointer-sign \
58b38ee2 19514-Wno-unused -Wno-switch -Wno-char-subscripts"
a3b362c4 19515
3526781e
DJ
19516# Enable -Wno-format by default when using gcc on mingw since many
19517# GCC versions complain about %I64.
19518case "${host}" in
19519 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
19520esac
19521
b4e70030 19522# Check whether --enable-build-warnings or --disable-build-warnings was given.
c906108c 19523if test "${enable_build_warnings+set}" = set; then
b4e70030
JB
19524 enableval="$enable_build_warnings"
19525 case "${enableval}" in
c906108c
SS
19526 yes) ;;
19527 no) build_warnings="-w";;
19528 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
19529 build_warnings="${build_warnings} ${t}";;
19530 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
19531 build_warnings="${t} ${build_warnings}";;
19532 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
19533esac
d4f3574e 19534if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 19535 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 19536fi
b4e70030 19537fi; # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
3b851bce 19538if test "${enable_gdb_build_warnings+set}" = set; then
b4e70030
JB
19539 enableval="$enable_gdb_build_warnings"
19540 case "${enableval}" in
3b851bce
AC
19541 yes) ;;
19542 no) build_warnings="-w";;
19543 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
19544 build_warnings="${build_warnings} ${t}";;
19545 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
19546 build_warnings="${t} ${build_warnings}";;
19547 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
19548esac
19549if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
19550 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
19551fi
b4e70030 19552fi; WARN_CFLAGS=""
c906108c
SS
19553if test "x${build_warnings}" != x -a "x$GCC" = xyes
19554then
b4e70030
JB
19555 echo "$as_me:$LINENO: checking compiler warning flags" >&5
19556echo $ECHO_N "checking compiler warning flags... $ECHO_C" >&6
746a987d
AC
19557 # Separate out the -Werror flag as some files just cannot be
19558 # compiled with it enabled.
19559 for w in ${build_warnings}; do
19560 case $w in
19561 -Werr*) WERROR_CFLAGS=-Werror ;;
19562 *) # Check that GCC accepts it
4536bbc6
AC
19563 saved_CFLAGS="$CFLAGS"
19564 CFLAGS="$CFLAGS $w"
bec39cab
AC
19565 cat >conftest.$ac_ext <<_ACEOF
19566/* confdefs.h. */
19567_ACEOF
19568cat confdefs.h >>conftest.$ac_ext
19569cat >>conftest.$ac_ext <<_ACEOF
19570/* end confdefs.h. */
4536bbc6 19571
bec39cab
AC
19572int
19573main ()
19574{
4536bbc6 19575
bec39cab
AC
19576 ;
19577 return 0;
19578}
19579_ACEOF
19580rm -f conftest.$ac_objext
19581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19582 (eval $ac_compile) 2>conftest.er1
19583 ac_status=$?
19584 grep -v '^ *+' conftest.er1 >conftest.err
19585 rm -f conftest.er1
19586 cat conftest.err >&5
19587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19588 (exit $ac_status); } &&
b4e70030
JB
19589 { ac_try='test -z "$ac_c_werror_flag"
19590 || test ! -s conftest.err'
bec39cab
AC
19591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19592 (eval $ac_try) 2>&5
19593 ac_status=$?
19594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19595 (exit $ac_status); }; } &&
19596 { ac_try='test -s conftest.$ac_objext'
19597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19598 (eval $ac_try) 2>&5
19599 ac_status=$?
19600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19601 (exit $ac_status); }; }; then
4536bbc6
AC
19602 WARN_CFLAGS="${WARN_CFLAGS} $w"
19603else
bec39cab
AC
19604 echo "$as_me: failed program was:" >&5
19605sed 's/^/| /' conftest.$ac_ext >&5
19606
4536bbc6 19607fi
bec39cab 19608rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 19609 CFLAGS="$saved_CFLAGS"
746a987d
AC
19610 esac
19611 done
aa79a185
DJ
19612 echo "$as_me:$LINENO: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
19613echo "${ECHO_T}${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6
c906108c
SS
19614fi
19615
19616
104c1213 19617
7a292a7a 19618# In the Cygwin environment, we need some additional flags.
b4e70030
JB
19619echo "$as_me:$LINENO: checking for cygwin" >&5
19620echo $ECHO_N "checking for cygwin... $ECHO_C" >&6
bec39cab
AC
19621if test "${gdb_cv_os_cygwin+set}" = set; then
19622 echo $ECHO_N "(cached) $ECHO_C" >&6
19623else
19624 cat >conftest.$ac_ext <<_ACEOF
19625/* confdefs.h. */
19626_ACEOF
19627cat confdefs.h >>conftest.$ac_ext
19628cat >>conftest.$ac_ext <<_ACEOF
19629/* end confdefs.h. */
7a292a7a
SS
19630
19631#if defined (__CYGWIN__) || defined (__CYGWIN32__)
19632lose
19633#endif
bec39cab 19634_ACEOF
7a292a7a 19635if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 19636 $EGREP "lose" >/dev/null 2>&1; then
7a292a7a
SS
19637 gdb_cv_os_cygwin=yes
19638else
7a292a7a
SS
19639 gdb_cv_os_cygwin=no
19640fi
19641rm -f conftest*
19642
19643fi
b4e70030
JB
19644echo "$as_me:$LINENO: result: $gdb_cv_os_cygwin" >&5
19645echo "${ECHO_T}$gdb_cv_os_cygwin" >&6
7a292a7a 19646
aff38e61 19647
3eb25fda 19648SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 19649case ${host} in
95cbc983
AC
19650 *go32* ) SER_HARDWIRE=ser-go32.o ;;
19651 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 19652 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
19653esac
19654
19655
cd0fc7c3
SS
19656# libreadline needs libuser32.a in a cygwin environment
19657WIN32LIBS=
19658if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
19659 WIN32LIBS="-luser32"
19660 case "${target}" in
19661 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
19662 ;;
19663 esac
cd0fc7c3 19664fi
c906108c 19665
b4505029
MM
19666# The ser-tcp.c module requires sockets.
19667case ${host} in
19668 *mingw32*)
19669
19670cat >>confdefs.h <<\_ACEOF
19671#define USE_WIN32API 1
19672_ACEOF
19673
19674 WIN32LIBS="$WIN32LIBS -lws2_32"
19675 ;;
19676esac
19677
7a292a7a 19678
31d99776
DJ
19679# Add ELF support to GDB, but only if BFD includes ELF support.
19680OLD_CFLAGS=$CFLAGS
19681OLD_LDFLAGS=$LDFLAGS
19682OLD_LIBS=$LIBS
cab58a69 19683CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 19684LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 19685intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
0f72fb1c 19686LIBS="-lbfd -liberty $intl $LIBS"
31d99776
DJ
19687echo "$as_me:$LINENO: checking for ELF support in BFD" >&5
19688echo $ECHO_N "checking for ELF support in BFD... $ECHO_C" >&6
19689if test "${gdb_cv_var_elf+set}" = set; then
19690 echo $ECHO_N "(cached) $ECHO_C" >&6
19691else
19692 cat >conftest.$ac_ext <<_ACEOF
19693/* confdefs.h. */
19694_ACEOF
19695cat confdefs.h >>conftest.$ac_ext
19696cat >>conftest.$ac_ext <<_ACEOF
19697/* end confdefs.h. */
19698#include <stdlib.h>
19699#include "bfd.h"
19700#include "elf-bfd.h"
19701
19702int
19703main ()
19704{
19705bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
19706 ;
19707 return 0;
19708}
19709_ACEOF
19710rm -f conftest.$ac_objext conftest$ac_exeext
19711if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19712 (eval $ac_link) 2>conftest.er1
19713 ac_status=$?
19714 grep -v '^ *+' conftest.er1 >conftest.err
19715 rm -f conftest.er1
19716 cat conftest.err >&5
19717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19718 (exit $ac_status); } &&
19719 { ac_try='test -z "$ac_c_werror_flag"
19720 || test ! -s conftest.err'
19721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19722 (eval $ac_try) 2>&5
19723 ac_status=$?
19724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19725 (exit $ac_status); }; } &&
19726 { ac_try='test -s conftest$ac_exeext'
19727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19728 (eval $ac_try) 2>&5
19729 ac_status=$?
19730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19731 (exit $ac_status); }; }; then
19732 gdb_cv_var_elf=yes
19733else
19734 echo "$as_me: failed program was:" >&5
19735sed 's/^/| /' conftest.$ac_ext >&5
19736
19737gdb_cv_var_elf=no
19738fi
19739rm -f conftest.err conftest.$ac_objext \
19740 conftest$ac_exeext conftest.$ac_ext
19741fi
19742echo "$as_me:$LINENO: result: $gdb_cv_var_elf" >&5
19743echo "${ECHO_T}$gdb_cv_var_elf" >&6
19744if test $gdb_cv_var_elf = yes; then
19745 CONFIG_OBS="$CONFIG_OBS elfread.o"
19746
19747cat >>confdefs.h <<\_ACEOF
19748#define HAVE_ELF 1
19749_ACEOF
19750
19751fi
19752CFLAGS=$OLD_CFLAGS
19753LDFLAGS=$OLD_LDFLAGS
19754LIBS=$OLD_LIBS
19755
121ce6e5
DJ
19756# Add any host-specific objects to GDB.
19757CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
19758
3fc11d3e
JM
19759LIBGUI="../libgui/src/libgui.a"
19760GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
19761
19762
7a292a7a 19763
3fc11d3e
JM
19764WIN32LDAPP=
19765
19766
19767
d91670b9 19768case "${host}" in
686a5eed 19769*-*-cygwin* | *-*-mingw* )
d91670b9
CV
19770 configdir="win"
19771 ;;
19772*)
19773 configdir="unix"
19774 ;;
19775esac
3fc11d3e
JM
19776
19777GDBTKLIBS=
19778if test "${enable_gdbtk}" = "yes"; then
19779
d1c3b63a
KS
19780 # Gdbtk must have an absolute path to srcdir in order to run
19781 # properly when not installed.
19782 here=`pwd`
19783 cd ${srcdir}
19784 GDBTK_SRC_DIR=`pwd`
19785 cd $here
19786
bec39cab 19787
5062cc19
KS
19788 #
19789 # Ok, lets find the tcl configuration
19790 # First, look for one uninstalled.
19791 # the alternative search directory is invoked by --with-tcl
19792 #
3fc11d3e 19793
5062cc19
KS
19794 if test x"${no_tcl}" = x ; then
19795 # we reset no_tcl in case something fails here
19796 no_tcl=true
bec39cab 19797
5062cc19
KS
19798# Check whether --with-tcl or --without-tcl was given.
19799if test "${with_tcl+set}" = set; then
19800 withval="$with_tcl"
b4e70030
JB
19801 with_tclconfig=${withval}
19802fi;
5062cc19 19803 echo "$as_me:$LINENO: checking for Tcl configuration" >&5
b4e70030 19804echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
5062cc19 19805 if test "${ac_cv_c_tclconfig+set}" = set; then
bec39cab 19806 echo $ECHO_N "(cached) $ECHO_C" >&6
3fc11d3e 19807else
bec39cab 19808
3fc11d3e 19809
5062cc19
KS
19810 # First check to see if --with-tcl was specified.
19811 case "${host}" in
19812 *-*-cygwin*) platDir="win" ;;
19813 *) platDir="unix" ;;
19814 esac
19815 if test x"${with_tclconfig}" != x ; then
19816 if test -f "${with_tclconfig}/tclConfig.sh" ; then
19817 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
19818 else
19819 { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
bec39cab
AC
19820echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
19821 { (exit 1); exit 1; }; }
5062cc19
KS
19822 fi
19823 fi
19824
19825 # then check for a private Tcl installation
19826 if test x"${ac_cv_c_tclconfig}" = x ; then
19827 for i in \
19828 ../tcl \
19829 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
19830 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
19831 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
19832 ../../tcl \
19833 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
19834 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
19835 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
19836 ../../../tcl \
19837 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
19838 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
19839 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
19840 if test -f "$i/$platDir/tclConfig.sh" ; then
19841 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
19842 break
19843 fi
19844 done
19845 fi
19846
19847 # on Darwin, check in Framework installation locations
19848 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
19849 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
19850 `ls -d /Library/Frameworks 2>/dev/null` \
19851 `ls -d /Network/Library/Frameworks 2>/dev/null` \
19852 `ls -d /System/Library/Frameworks 2>/dev/null` \
19853 ; do
19854 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
19855 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
19856 break
19857 fi
19858 done
19859 fi
19860
19861 # check in a few common install locations
19862 if test x"${ac_cv_c_tclconfig}" = x ; then
19863 for i in `ls -d ${libdir} 2>/dev/null` \
19864 `ls -d ${exec_prefix}/lib 2>/dev/null` \
19865 `ls -d ${prefix}/lib 2>/dev/null` \
19866 `ls -d /usr/local/lib 2>/dev/null` \
19867 `ls -d /usr/contrib/lib 2>/dev/null` \
19868 `ls -d /usr/lib 2>/dev/null` \
19869 ; do
19870 if test -f "$i/tclConfig.sh" ; then
19871 ac_cv_c_tclconfig=`(cd $i; pwd)`
19872 break
19873 fi
19874 done
19875 fi
3fc11d3e 19876
5062cc19
KS
19877 # check in a few other private locations
19878 if test x"${ac_cv_c_tclconfig}" = x ; then
19879 for i in \
19880 ${srcdir}/../tcl \
19881 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
19882 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
19883 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
19884 if test -f "$i/$platDir/tclConfig.sh" ; then
19885 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
19886 break
19887 fi
19888 done
19889 fi
bec39cab 19890
3fc11d3e
JM
19891fi
19892
5062cc19
KS
19893
19894 if test x"${ac_cv_c_tclconfig}" = x ; then
19895 TCL_BIN_DIR="# no Tcl configs found"
19896 { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
bec39cab 19897echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
19898 exit 0
19899 else
19900 no_tcl=
19901 TCL_BIN_DIR=${ac_cv_c_tclconfig}
19902 echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
19903echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
19904 fi
19905 fi
3fc11d3e
JM
19906
19907 if test -z "${no_tcl}"; then
bec39cab 19908
5062cc19
KS
19909 echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
19910echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
bec39cab 19911
5062cc19
KS
19912 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
19913 echo "$as_me:$LINENO: result: loading" >&5
19914echo "${ECHO_T}loading" >&6
19915 . ${TCL_BIN_DIR}/tclConfig.sh
19916 else
19917 echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
19918echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
19919 fi
bec39cab 19920
5062cc19
KS
19921 # eval is required to do the TCL_DBGX substitution
19922 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
19923 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
19924
19925 # If the TCL_BIN_DIR is the build directory (not the install directory),
19926 # then set the common variable name to the value of the build variables.
19927 # For example, the variable TCL_LIB_SPEC will be set to the value
19928 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
19929 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
19930 # installed and uninstalled version of Tcl.
19931 if test -f ${TCL_BIN_DIR}/Makefile ; then
19932 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
19933 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
19934 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
19935 elif test "`uname -s`" = "Darwin"; then
19936 # If Tcl was built as a framework, attempt to use the libraries
19937 # from the framework at the given location so that linking works
19938 # against Tcl.framework installed in an arbitary location.
19939 case ${TCL_DEFS} in
19940 *TCL_FRAMEWORK*)
19941 if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then
19942 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
19943 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
19944 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
19945 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
19946 break
19947 fi
19948 done
19949 fi
19950 if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then
19951 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
19952 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
19953 fi
19954 ;;
19955 esac
19956 fi
bec39cab 19957
5062cc19
KS
19958 # eval is required to do the TCL_DBGX substitution
19959 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
19960 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
19961 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
19962 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
bec39cab
AC
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
3fc11d3e 19977
5062cc19
KS
19978 # Check for in-tree tcl
19979 here=`pwd`
19980 cd ${srcdir}/..
19981 topdir=`pwd`
19982 cd ${here}
bec39cab 19983
5062cc19
KS
19984 intree="no"
19985 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
19986 intree="yes"
19987 fi
bec39cab 19988
5062cc19
KS
19989 # Find Tcl private headers
19990 if test x"${intree}" = xno; then
3fc11d3e 19991
5062cc19
KS
19992 echo "$as_me:$LINENO: checking for Tcl private headers" >&5
19993echo $ECHO_N "checking for Tcl private headers... $ECHO_C" >&6
19994 private_dir=""
19995 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
19996 if test -f ${dir}/tclInt.h ; then
19997 private_dir=${dir}
3fc11d3e
JM
19998 fi
19999
5062cc19
KS
20000 if test x"${private_dir}" = x; then
20001 { { echo "$as_me:$LINENO: error: could not find private Tcl headers" >&5
20002echo "$as_me: error: could not find private Tcl headers" >&2;}
20003 { (exit 1); exit 1; }; }
3fc11d3e 20004 else
5062cc19
KS
20005 TCL_PRIVATE_INCLUDE="-I${private_dir}"
20006 echo "$as_me:$LINENO: result: ${private_dir}" >&5
20007echo "${ECHO_T}${private_dir}" >&6
3fc11d3e 20008 fi
3fc11d3e 20009
5062cc19
KS
20010 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
20011 TCL_LIBRARY="${TCL_LIB_SPEC}"
20012 TCL_DEPS=""
20013 else
20014 # If building tcl in the same src tree, private headers
20015 # are not needed, but we need to be sure to use the right
20016 # headers library
20017 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
20018 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
20019 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
20020 fi
3fc11d3e 20021
dd2504ab 20022
dd2504ab 20023
dd2504ab 20024
3fc11d3e
JM
20025 # If $no_tk is nonempty, then we can't do Tk, and there is no
20026 # point to doing Tcl.
20027 if test -z "${no_tk}"; then
bec39cab 20028
5062cc19
KS
20029 #
20030 # Ok, lets find the tk configuration
20031 # First, look for one uninstalled.
20032 # the alternative search directory is invoked by --with-tk
20033 #
3fc11d3e 20034
5062cc19
KS
20035 if test x"${no_tk}" = x ; then
20036 # we reset no_tk in case something fails here
20037 no_tk=true
bec39cab 20038
5062cc19
KS
20039# Check whether --with-tk or --without-tk was given.
20040if test "${with_tk+set}" = set; then
20041 withval="$with_tk"
20042 with_tkconfig=${withval}
b4e70030 20043fi;
5062cc19
KS
20044 echo "$as_me:$LINENO: checking for Tk configuration" >&5
20045echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6
20046 if test "${ac_cv_c_tkconfig+set}" = set; then
bec39cab
AC
20047 echo $ECHO_N "(cached) $ECHO_C" >&6
20048else
3fc11d3e
JM
20049
20050
5062cc19
KS
20051 # First check to see if --with-tkconfig was specified.
20052 if test x"${with_tkconfig}" != x ; then
20053 if test -f "${with_tkconfig}/tkConfig.sh" ; then
20054 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
20055 else
20056 { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
20057echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
bec39cab 20058 { (exit 1); exit 1; }; }
5062cc19
KS
20059 fi
20060 fi
3fc11d3e 20061
5062cc19
KS
20062 # then check for a private Tk library
20063 case "${host}" in
20064 *-*-cygwin*) platDir="win" ;;
20065 *) platDir="unix" ;;
20066 esac
20067 if test x"${ac_cv_c_tkconfig}" = x ; then
20068 for i in \
20069 ../tk \
20070 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20071 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
20072 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
20073 ../../tk \
20074 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20075 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
20076 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
20077 ../../../tk \
20078 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20079 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
20080 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
20081 if test -f "$i/$platDir/tkConfig.sh" ; then
20082 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20083 break
20084 fi
20085 done
20086 fi
20087
20088 # on Darwin, check in Framework installation locations
20089 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
20090 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
20091 `ls -d /Library/Frameworks 2>/dev/null` \
20092 `ls -d /Network/Library/Frameworks 2>/dev/null` \
20093 `ls -d /System/Library/Frameworks 2>/dev/null` \
20094 ; do
20095 if test -f "$i/Tk.framework/tkConfig.sh" ; then
20096 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
20097 break
20098 fi
20099 done
20100 fi
20101
20102 # check in a few common install locations
20103 if test x"${ac_cv_c_tkconfig}" = x ; then
20104 for i in `ls -d ${libdir} 2>/dev/null` \
20105 `ls -d ${exec_prefix}/lib 2>/dev/null` \
20106 `ls -d ${prefix}/lib 2>/dev/null` \
20107 `ls -d /usr/local/lib 2>/dev/null` \
20108 `ls -d /usr/contrib/lib 2>/dev/null` \
20109 `ls -d /usr/lib 2>/dev/null` \
20110 ; do
20111 if test -f "$i/tkConfig.sh" ; then
20112 ac_cv_c_tkconfig=`(cd $i; pwd)`
20113 break
20114 fi
20115 done
20116 fi
20117 # check in a few other private locations
20118 if test x"${ac_cv_c_tkconfig}" = x ; then
20119 for i in \
20120 ${srcdir}/../tk \
20121 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20122 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
20123 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
20124 if test -f "$i/$platDir/tkConfig.sh" ; then
20125 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20126 break
20127 fi
20128 done
20129 fi
3fc11d3e 20130
3fc11d3e
JM
20131fi
20132
20133
5062cc19
KS
20134 if test x"${ac_cv_c_tkconfig}" = x ; then
20135 TK_BIN_DIR="# no Tk configs found"
20136 { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
20137echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
20138 exit 0
20139 else
20140 no_tk=
20141 TK_BIN_DIR=${ac_cv_c_tkconfig}
20142 echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
20143echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6
20144 fi
3fc11d3e 20145 fi
dd2504ab 20146
dd2504ab 20147
5062cc19
KS
20148 echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
20149echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6
dd2504ab 20150
5062cc19
KS
20151 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
20152 echo "$as_me:$LINENO: result: loading" >&5
20153echo "${ECHO_T}loading" >&6
20154 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 20155 else
5062cc19
KS
20156 echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
20157echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
3fc11d3e 20158 fi
bec39cab 20159
5062cc19
KS
20160 # eval is required to do the TK_DBGX substitution
20161 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
20162 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
20163
20164 # If the TK_BIN_DIR is the build directory (not the install directory),
20165 # then set the common variable name to the value of the build variables.
20166 # For example, the variable TK_LIB_SPEC will be set to the value
20167 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
20168 # instead of TK_BUILD_LIB_SPEC since it will work with both an
20169 # installed and uninstalled version of Tcl.
20170 if test -f ${TK_BIN_DIR}/Makefile ; then
20171 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
20172 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
20173 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
20174 elif test "`uname -s`" = "Darwin"; then
20175 # If Tk was built as a framework, attempt to use the libraries
20176 # from the framework at the given location so that linking works
20177 # against Tk.framework installed in an arbitary location.
20178 case ${TK_DEFS} in
20179 *TK_FRAMEWORK*)
20180 if test -f ${TK_BIN_DIR}/${TK_LIB_FILE}; then
20181 for i in "`cd ${TK_BIN_DIR}; pwd`" \
20182 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
20183 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
20184 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
20185 break
20186 fi
20187 done
20188 fi
20189 if test -f ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}; then
20190 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
20191 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
20192 fi
20193 ;;
20194 esac
3fc11d3e
JM
20195 fi
20196
5062cc19
KS
20197 # eval is required to do the TK_DBGX substitution
20198 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
20199 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
20200 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
20201 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 20202
3fc11d3e
JM
20203
20204
bec39cab
AC
20205
20206
20207
20208
20209
20210
20211
3fc11d3e 20212
3fc11d3e 20213
bec39cab 20214
bec39cab 20215
5062cc19
KS
20216 # Check for in-tree Tk
20217 intree="no"
20218 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
20219 intree="yes"
20220 fi
3fc11d3e 20221
5062cc19
KS
20222 # Find Tk private headers
20223 if test x"${intree}" = xno; then
3fc11d3e 20224
5062cc19
KS
20225 echo "$as_me:$LINENO: checking for Tk private headers" >&5
20226echo $ECHO_N "checking for Tk private headers... $ECHO_C" >&6
20227 private_dir=""
20228 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
20229 if test -f ${dir}/tkInt.h; then
20230 private_dir=${dir}
3fc11d3e 20231 fi
bec39cab 20232
5062cc19
KS
20233 if test x"${private_dir}" = x; then
20234 { { echo "$as_me:$LINENO: error: could not find Tk private headers" >&5
20235echo "$as_me: error: could not find Tk private headers" >&2;}
20236 { (exit 1); exit 1; }; }
3fc11d3e 20237 else
5062cc19
KS
20238 TK_PRIVATE_INCLUDE="-I${private_dir}"
20239 echo "$as_me:$LINENO: result: ${private_dir}" >&5
20240echo "${ECHO_T}${private_dir}" >&6
3fc11d3e 20241 fi
3fc11d3e 20242
5062cc19
KS
20243 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
20244 TK_LIBRARY=${TK_LIB_SPEC}
20245 TK_DEPS=""
20246 else
20247 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
20248 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
20249 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
20250 fi
3fc11d3e
JM
20251
20252
3fc11d3e
JM
20253
20254
3fc11d3e 20255
4226a5a5 20256 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
20257
20258 # Include some libraries that Tcl and Tk want.
5062cc19 20259 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
20260 # Yes, the ordering seems wrong here. But it isn't.
20261 # TK_LIBS is the list of libraries that need to be linked
20262 # after Tcl/Tk. Note that this isn't put into LIBS. If it
20263 # were in LIBS then any link tests after this point would
20264 # try to include things like `$(LIBGUI)', which wouldn't work.
20265 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
20266
20267 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
20268 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
20269 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
33f8ca73
AC
20270 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
20271 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
20272 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
20273 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e
JM
20274
20275 if test x$gdb_cv_os_cygwin = xyes; then
20276 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
20277 WIN32LDAPP="-Wl,--subsystem,console"
20278 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
20279 fi
20280 fi
20281 fi
ffc6a242 20282
b4e70030
JB
20283
20284
20285subdirs="$subdirs gdbtk"
3ace7edb 20286
3fc11d3e
JM
20287fi
20288
20289
20290
20291
20292
20293
20294
20295
b4e70030
JB
20296echo "$as_me:$LINENO: checking for X" >&5
20297echo $ECHO_N "checking for X... $ECHO_C" >&6
bec39cab 20298
c906108c 20299
b4e70030 20300# Check whether --with-x or --without-x was given.
c906108c 20301if test "${with_x+set}" = set; then
b4e70030 20302 withval="$with_x"
c906108c 20303
b4e70030 20304fi;
c906108c
SS
20305# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20306if test "x$with_x" = xno; then
20307 # The user explicitly disabled X.
20308 have_x=disabled
20309else
20310 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20311 # Both variables are already set.
20312 have_x=yes
20313 else
bec39cab
AC
20314 if test "${ac_cv_have_x+set}" = set; then
20315 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
20316else
20317 # One or both of the vars are not set, and there is no cached value.
bec39cab 20318ac_x_includes=no ac_x_libraries=no
b4e70030 20319rm -fr conftest.dir
bec39cab
AC
20320if mkdir conftest.dir; then
20321 cd conftest.dir
c906108c 20322 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
bec39cab 20323 cat >Imakefile <<'_ACEOF'
c906108c
SS
20324acfindx:
20325 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
bec39cab 20326_ACEOF
b4e70030 20327 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c
SS
20328 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20329 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
20330 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20331 for ac_extension in a so sl; do
20332 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
bec39cab
AC
20333 test -f $ac_im_libdir/libX11.$ac_extension; then
20334 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
20335 fi
20336 done
20337 # Screen out bogus values from the imake configuration. They are
20338 # bogus both because they are the default anyway, and because
20339 # using them would break gcc on systems where it needs fixed includes.
bec39cab 20340 case $ac_im_incroot in
b4e70030 20341 /usr/include) ;;
bec39cab 20342 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 20343 esac
bec39cab 20344 case $ac_im_usrlibdir in
c906108c 20345 /usr/lib | /lib) ;;
bec39cab 20346 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
20347 esac
20348 fi
20349 cd ..
b4e70030 20350 rm -fr conftest.dir
c906108c
SS
20351fi
20352
bec39cab
AC
20353# Standard set of common directories for X headers.
20354# Check X11 before X11Rn because it is often a symlink to the current release.
20355ac_x_header_dirs='
20356/usr/X11/include
20357/usr/X11R6/include
20358/usr/X11R5/include
20359/usr/X11R4/include
20360
20361/usr/include/X11
20362/usr/include/X11R6
20363/usr/include/X11R5
20364/usr/include/X11R4
20365
20366/usr/local/X11/include
20367/usr/local/X11R6/include
20368/usr/local/X11R5/include
20369/usr/local/X11R4/include
20370
20371/usr/local/include/X11
20372/usr/local/include/X11R6
20373/usr/local/include/X11R5
20374/usr/local/include/X11R4
20375
20376/usr/X386/include
20377/usr/x386/include
20378/usr/XFree86/include/X11
20379
20380/usr/include
20381/usr/local/include
20382/usr/unsupported/include
20383/usr/athena/include
20384/usr/local/x11r5/include
20385/usr/lpp/Xamples/include
20386
20387/usr/openwin/include
20388/usr/openwin/share/include'
20389
20390if test "$ac_x_includes" = no; then
59f80f10 20391 # Guess where to find include files, by looking for Intrinsic.h.
c906108c 20392 # First, try using that file with no special directory specified.
bec39cab
AC
20393 cat >conftest.$ac_ext <<_ACEOF
20394/* confdefs.h. */
20395_ACEOF
20396cat confdefs.h >>conftest.$ac_ext
20397cat >>conftest.$ac_ext <<_ACEOF
20398/* end confdefs.h. */
59f80f10 20399#include <X11/Intrinsic.h>
bec39cab
AC
20400_ACEOF
20401if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20402 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20403 ac_status=$?
20404 grep -v '^ *+' conftest.er1 >conftest.err
20405 rm -f conftest.er1
20406 cat conftest.err >&5
20407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20408 (exit $ac_status); } >/dev/null; then
20409 if test -s conftest.err; then
20410 ac_cpp_err=$ac_c_preproc_warn_flag
20411 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20412 else
20413 ac_cpp_err=
20414 fi
20415else
20416 ac_cpp_err=yes
20417fi
20418if test -z "$ac_cpp_err"; then
c906108c
SS
20419 # We can compile using X headers with no special include directory.
20420ac_x_includes=
20421else
bec39cab
AC
20422 echo "$as_me: failed program was:" >&5
20423sed 's/^/| /' conftest.$ac_ext >&5
20424
20425 for ac_dir in $ac_x_header_dirs; do
59f80f10 20426 if test -r "$ac_dir/X11/Intrinsic.h"; then
bec39cab
AC
20427 ac_x_includes=$ac_dir
20428 break
20429 fi
20430done
c906108c 20431fi
bec39cab
AC
20432rm -f conftest.err conftest.$ac_ext
20433fi # $ac_x_includes = no
c906108c 20434
bec39cab 20435if test "$ac_x_libraries" = no; then
c906108c 20436 # Check for the libraries.
c906108c
SS
20437 # See if we find them without any special options.
20438 # Don't add to $LIBS permanently.
bec39cab 20439 ac_save_LIBS=$LIBS
4e8d927d 20440 LIBS="-lXt $LIBS"
bec39cab
AC
20441 cat >conftest.$ac_ext <<_ACEOF
20442/* confdefs.h. */
20443_ACEOF
20444cat confdefs.h >>conftest.$ac_ext
20445cat >>conftest.$ac_ext <<_ACEOF
20446/* end confdefs.h. */
59f80f10 20447#include <X11/Intrinsic.h>
bec39cab
AC
20448int
20449main ()
20450{
59f80f10 20451XtMalloc (0)
bec39cab
AC
20452 ;
20453 return 0;
20454}
20455_ACEOF
20456rm -f conftest.$ac_objext conftest$ac_exeext
20457if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20458 (eval $ac_link) 2>conftest.er1
20459 ac_status=$?
20460 grep -v '^ *+' conftest.er1 >conftest.err
20461 rm -f conftest.er1
20462 cat conftest.err >&5
20463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20464 (exit $ac_status); } &&
b4e70030
JB
20465 { ac_try='test -z "$ac_c_werror_flag"
20466 || test ! -s conftest.err'
bec39cab
AC
20467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20468 (eval $ac_try) 2>&5
20469 ac_status=$?
20470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20471 (exit $ac_status); }; } &&
20472 { ac_try='test -s conftest$ac_exeext'
20473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20474 (eval $ac_try) 2>&5
20475 ac_status=$?
20476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20477 (exit $ac_status); }; }; then
20478 LIBS=$ac_save_LIBS
c906108c
SS
20479# We can link X programs with no special library path.
20480ac_x_libraries=
20481else
bec39cab
AC
20482 echo "$as_me: failed program was:" >&5
20483sed 's/^/| /' conftest.$ac_ext >&5
20484
b4e70030 20485LIBS=$ac_save_LIBS
bec39cab 20486for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 20487do
bec39cab 20488 # Don't even attempt the hair of trying to link an X program!
c906108c 20489 for ac_extension in a so sl; do
b4e70030 20490 if test -r $ac_dir/libXt.$ac_extension; then
c906108c
SS
20491 ac_x_libraries=$ac_dir
20492 break 2
20493 fi
20494 done
20495done
20496fi
bec39cab
AC
20497rm -f conftest.err conftest.$ac_objext \
20498 conftest$ac_exeext conftest.$ac_ext
20499fi # $ac_x_libraries = no
c906108c 20500
bec39cab 20501if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
c906108c
SS
20502 # Didn't find X anywhere. Cache the known absence of X.
20503 ac_cv_have_x="have_x=no"
20504else
20505 # Record where we found X for the cache.
20506 ac_cv_have_x="have_x=yes \
bec39cab 20507 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
c906108c
SS
20508fi
20509fi
bec39cab 20510
c906108c
SS
20511 fi
20512 eval "$ac_cv_have_x"
20513fi # $with_x != no
20514
20515if test "$have_x" != yes; then
b4e70030
JB
20516 echo "$as_me:$LINENO: result: $have_x" >&5
20517echo "${ECHO_T}$have_x" >&6
c906108c
SS
20518 no_x=yes
20519else
20520 # If each of the values was on the command line, it overrides each guess.
20521 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
20522 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
20523 # Update the cache value to reflect the command line values.
20524 ac_cv_have_x="have_x=yes \
20525 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
b4e70030
JB
20526 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
20527echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
c906108c
SS
20528fi
20529
20530
bec39cab 20531# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 20532# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
20533# This code just checks for a few cases where we'd like to ignore those
20534# definitions, even when they're present in the '.mt' file. These cases
20535# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 20536# not part of the source tree.
7a292a7a 20537#
b4e70030 20538# Check whether --enable-sim or --disable-sim was given.
7a292a7a 20539if test "${enable_sim+set}" = set; then
b4e70030
JB
20540 enableval="$enable_sim"
20541 echo "enable_sim = $enable_sim";
7a292a7a
SS
20542 echo "enableval = ${enableval}";
20543 case "${enableval}" in
20544 yes) ignore_sim=false ;;
20545 no) ignore_sim=true ;;
20546 *) ignore_sim=false ;;
20547 esac
20548else
20549 ignore_sim=false
b4e70030 20550fi;
7a292a7a
SS
20551
20552if test ! -d "${srcdir}/../sim"; then
20553 ignore_sim=true
20554fi
20555
9b624dbe
UW
20556SIM=
20557SIM_OBS=
20558if test "${ignore_sim}" = "false"; then
20559 if test x"${gdb_sim}" != x ; then
20560 SIM="${gdb_sim}"
20561 SIM_OBS="remote-sim.o"
60ca704f
SE
20562
20563cat >>confdefs.h <<\_ACEOF
7a292a7a 20564#define WITH_SIM 1
bec39cab 20565_ACEOF
7a292a7a 20566
9b624dbe 20567 fi
7a292a7a
SS
20568fi
20569
20570
20571
c906108c
SS
20572
20573
20574
20575
20576
20577
dfcd3bfb 20578
e56ac5c3
AC
20579
20580
b3a90332
AC
20581
20582
c35f4ffc 20583# List of host floatformats.
bec39cab
AC
20584
20585cat >>confdefs.h <<_ACEOF
c35f4ffc 20586#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 20587_ACEOF
c35f4ffc 20588
bec39cab
AC
20589
20590cat >>confdefs.h <<_ACEOF
c35f4ffc 20591#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
20592_ACEOF
20593
c35f4ffc 20594
bec39cab 20595cat >>confdefs.h <<_ACEOF
c35f4ffc 20596#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 20597_ACEOF
c35f4ffc
AC
20598
20599
c906108c
SS
20600# target_subdir is used by the testsuite to find the target libraries.
20601target_subdir=
20602if test "${host}" != "${target}"; then
20603 target_subdir="${target_alias}/"
20604fi
20605
20606
20607frags=
771b4502 20608if test "${gdb_native}" = "yes"; then
0dad8a66
MK
20609 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
20610 if test ! -f ${host_makefile_frag}; then
bec39cab
AC
20611 { { echo "$as_me:$LINENO: error: \"*** Gdb does not support native target ${host}\"" >&5
20612echo "$as_me: error: \"*** Gdb does not support native target ${host}\"" >&2;}
20613 { (exit 1); exit 1; }; }
0dad8a66
MK
20614 fi
20615 frags="$frags $host_makefile_frag"
20616else
20617 host_makefile_frag=/dev/null
c906108c 20618fi
c906108c 20619
c906108c
SS
20620
20621
20622
771b4502 20623if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
20624# We pick this up from the host configuration file (.mh) because we
20625# do not have a native configuration Makefile fragment.
c906108c
SS
20626nativefile=`sed -n '
20627s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
20628' ${host_makefile_frag}`
c906108c
SS
20629fi
20630
20631
b00a8037 20632if test x"${gdb_osabi}" != x ; then
bec39cab
AC
20633
20634cat >>confdefs.h <<_ACEOF
b00a8037 20635#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 20636_ACEOF
b00a8037
DJ
20637
20638fi
20639
8dcde887 20640# Enable multi-ice-gdb-server.
b4e70030 20641# Check whether --enable-multi-ice or --disable-multi-ice was given.
8dcde887 20642if test "${enable_multi_ice+set}" = set; then
b4e70030
JB
20643 enableval="$enable_multi_ice"
20644 case $enableval in
8dcde887
MK
20645 yes | no)
20646 ;;
bec39cab
AC
20647 *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-multi-ice" >&5
20648echo "$as_me: error: bad value $enableval for --enable-multi-ice" >&2;}
20649 { (exit 1); exit 1; }; } ;;
8dcde887 20650 esac
b4e70030 20651fi;
4e8d927d 20652if test "x$enable_multi_ice" = xyes; then
b4e70030
JB
20653
20654
20655subdirs="$subdirs multi-ice"
3ace7edb 20656
a85f51e7
DJ
20657fi
20658
a13e2c95
UW
20659# We only build gdbserver automatically in a native configuration.
20660if test "$gdb_native" = "yes"; then
b4e70030
JB
20661 echo "$as_me:$LINENO: checking whether gdbserver is supported on this host" >&5
20662echo $ECHO_N "checking whether gdbserver is supported on this host... $ECHO_C" >&6
8dcde887 20663 if test "x$build_gdbserver" = xyes; then
b4e70030
JB
20664 echo "$as_me:$LINENO: result: yes" >&5
20665echo "${ECHO_T}yes" >&6
20666
20667
20668subdirs="$subdirs gdbserver"
3ace7edb 20669
8dcde887 20670 else
b4e70030
JB
20671 echo "$as_me:$LINENO: result: no" >&5
20672echo "${ECHO_T}no" >&6
8dcde887
MK
20673 fi
20674fi
20675
db985757 20676# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 20677# to an empty version.
c906108c
SS
20678
20679files=
20680links=
5a2402b8 20681
c906108c 20682rm -f nm.h
5a2402b8 20683nm_h=""
c906108c 20684if test "${nativefile}" != ""; then
5a2402b8 20685 nm_h=nm.h
0f475e27
AC
20686 case "${nativefile}" in
20687 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
20688 * ) GDB_NM_FILE="${nativefile}"
20689 esac
5a2402b8
AC
20690 files="${files} ${GDB_NM_FILE}"
20691 links="${links} nm.h"
60ca704f
SE
20692
20693cat >>confdefs.h <<_ACEOF
b78960be 20694#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 20695_ACEOF
5a2402b8 20696
c906108c 20697fi
5a2402b8
AC
20698
20699
bec39cab
AC
20700ac_sources="$files"
20701ac_dests="$links"
20702while test -n "$ac_sources"; do
20703 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
20704 set $ac_sources; ac_source=$1; shift; ac_sources=$*
20705 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
20706done
b4e70030 20707 ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
20708
20709
c906108c
SS
20710
20711
c906108c 20712
c906108c 20713
bec39cab
AC
20714cat >>confdefs.h <<\_ACEOF
20715#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
20716_ACEOF
c906108c 20717
234b45d4 20718
234b45d4
KB
20719
20720
20721
b4e70030 20722# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
234b45d4 20723if test "${with_libiconv_prefix+set}" = set; then
b4e70030
JB
20724 withval="$with_libiconv_prefix"
20725
234b45d4
KB
20726 for dir in `echo "$withval" | tr : ' '`; do
20727 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
20728 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
20729 done
234b45d4 20730
b4e70030 20731fi;
234b45d4 20732
b4e70030
JB
20733 echo "$as_me:$LINENO: checking for iconv" >&5
20734echo $ECHO_N "checking for iconv... $ECHO_C" >&6
bec39cab
AC
20735if test "${am_cv_func_iconv+set}" = set; then
20736 echo $ECHO_N "(cached) $ECHO_C" >&6
234b45d4 20737else
bec39cab 20738
234b45d4
KB
20739 am_cv_func_iconv="no, consider installing GNU libiconv"
20740 am_cv_lib_iconv=no
bec39cab
AC
20741 cat >conftest.$ac_ext <<_ACEOF
20742/* confdefs.h. */
20743_ACEOF
20744cat confdefs.h >>conftest.$ac_ext
20745cat >>conftest.$ac_ext <<_ACEOF
20746/* end confdefs.h. */
234b45d4
KB
20747#include <stdlib.h>
20748#include <iconv.h>
bec39cab
AC
20749int
20750main ()
20751{
234b45d4
KB
20752iconv_t cd = iconv_open("","");
20753 iconv(cd,NULL,NULL,NULL,NULL);
20754 iconv_close(cd);
bec39cab
AC
20755 ;
20756 return 0;
20757}
20758_ACEOF
20759rm -f conftest.$ac_objext conftest$ac_exeext
20760if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20761 (eval $ac_link) 2>conftest.er1
20762 ac_status=$?
20763 grep -v '^ *+' conftest.er1 >conftest.err
20764 rm -f conftest.er1
20765 cat conftest.err >&5
20766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20767 (exit $ac_status); } &&
b4e70030
JB
20768 { ac_try='test -z "$ac_c_werror_flag"
20769 || test ! -s conftest.err'
bec39cab
AC
20770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20771 (eval $ac_try) 2>&5
20772 ac_status=$?
20773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20774 (exit $ac_status); }; } &&
20775 { ac_try='test -s conftest$ac_exeext'
20776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20777 (eval $ac_try) 2>&5
20778 ac_status=$?
20779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20780 (exit $ac_status); }; }; then
234b45d4
KB
20781 am_cv_func_iconv=yes
20782else
bec39cab
AC
20783 echo "$as_me: failed program was:" >&5
20784sed 's/^/| /' conftest.$ac_ext >&5
20785
234b45d4 20786fi
bec39cab
AC
20787rm -f conftest.err conftest.$ac_objext \
20788 conftest$ac_exeext conftest.$ac_ext
234b45d4
KB
20789 if test "$am_cv_func_iconv" != yes; then
20790 am_save_LIBS="$LIBS"
20791 LIBS="$LIBS -liconv"
bec39cab
AC
20792 cat >conftest.$ac_ext <<_ACEOF
20793/* confdefs.h. */
20794_ACEOF
20795cat confdefs.h >>conftest.$ac_ext
20796cat >>conftest.$ac_ext <<_ACEOF
20797/* end confdefs.h. */
234b45d4
KB
20798#include <stdlib.h>
20799#include <iconv.h>
bec39cab
AC
20800int
20801main ()
20802{
234b45d4
KB
20803iconv_t cd = iconv_open("","");
20804 iconv(cd,NULL,NULL,NULL,NULL);
20805 iconv_close(cd);
bec39cab
AC
20806 ;
20807 return 0;
20808}
20809_ACEOF
20810rm -f conftest.$ac_objext conftest$ac_exeext
20811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20812 (eval $ac_link) 2>conftest.er1
20813 ac_status=$?
20814 grep -v '^ *+' conftest.er1 >conftest.err
20815 rm -f conftest.er1
20816 cat conftest.err >&5
20817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20818 (exit $ac_status); } &&
b4e70030
JB
20819 { ac_try='test -z "$ac_c_werror_flag"
20820 || test ! -s conftest.err'
bec39cab
AC
20821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20822 (eval $ac_try) 2>&5
20823 ac_status=$?
20824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20825 (exit $ac_status); }; } &&
20826 { ac_try='test -s conftest$ac_exeext'
20827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20828 (eval $ac_try) 2>&5
20829 ac_status=$?
20830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20831 (exit $ac_status); }; }; then
234b45d4
KB
20832 am_cv_lib_iconv=yes
20833 am_cv_func_iconv=yes
20834else
bec39cab
AC
20835 echo "$as_me: failed program was:" >&5
20836sed 's/^/| /' conftest.$ac_ext >&5
20837
234b45d4 20838fi
bec39cab
AC
20839rm -f conftest.err conftest.$ac_objext \
20840 conftest$ac_exeext conftest.$ac_ext
234b45d4
KB
20841 LIBS="$am_save_LIBS"
20842 fi
bec39cab
AC
20843
20844fi
b4e70030
JB
20845echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
20846echo "${ECHO_T}$am_cv_func_iconv" >&6
bec39cab
AC
20847 if test "$am_cv_func_iconv" = yes; then
20848
20849cat >>confdefs.h <<\_ACEOF
20850#define HAVE_ICONV 1
20851_ACEOF
20852
b4e70030
JB
20853 echo "$as_me:$LINENO: checking for iconv declaration" >&5
20854echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
bec39cab
AC
20855 if test "${am_cv_proto_iconv+set}" = set; then
20856 echo $ECHO_N "(cached) $ECHO_C" >&6
20857else
20858
20859 cat >conftest.$ac_ext <<_ACEOF
20860/* confdefs.h. */
20861_ACEOF
20862cat confdefs.h >>conftest.$ac_ext
20863cat >>conftest.$ac_ext <<_ACEOF
20864/* end confdefs.h. */
20865
20866#include <stdlib.h>
20867#include <iconv.h>
20868extern
20869#ifdef __cplusplus
20870"C"
20871#endif
20872#if defined(__STDC__) || defined(__cplusplus)
20873size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
20874#else
20875size_t iconv();
20876#endif
20877
20878int
20879main ()
20880{
20881
20882 ;
20883 return 0;
20884}
20885_ACEOF
20886rm -f conftest.$ac_objext
20887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20888 (eval $ac_compile) 2>conftest.er1
20889 ac_status=$?
20890 grep -v '^ *+' conftest.er1 >conftest.err
20891 rm -f conftest.er1
20892 cat conftest.err >&5
20893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20894 (exit $ac_status); } &&
b4e70030
JB
20895 { ac_try='test -z "$ac_c_werror_flag"
20896 || test ! -s conftest.err'
bec39cab
AC
20897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20898 (eval $ac_try) 2>&5
20899 ac_status=$?
20900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20901 (exit $ac_status); }; } &&
20902 { ac_try='test -s conftest.$ac_objext'
20903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20904 (eval $ac_try) 2>&5
20905 ac_status=$?
20906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20907 (exit $ac_status); }; }; then
20908 am_cv_proto_iconv_arg1=""
20909else
20910 echo "$as_me: failed program was:" >&5
20911sed 's/^/| /' conftest.$ac_ext >&5
20912
b4e70030 20913am_cv_proto_iconv_arg1="const"
bec39cab
AC
20914fi
20915rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20916 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);"
20917fi
20918
20919 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
b4e70030 20920 echo "$as_me:$LINENO: result: ${ac_t:-
bec39cab
AC
20921 }$am_cv_proto_iconv" >&5
20922echo "${ECHO_T}${ac_t:-
b4e70030 20923 }$am_cv_proto_iconv" >&6
bec39cab
AC
20924
20925cat >>confdefs.h <<_ACEOF
20926#define ICONV_CONST $am_cv_proto_iconv_arg1
20927_ACEOF
20928
20929 fi
20930 LIBICONV=
20931 if test "$am_cv_lib_iconv" = yes; then
20932 LIBICONV="-liconv"
20933 fi
20934
20935
20936
e28b3332 20937 ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
b4e70030 20938 ac_config_commands="$ac_config_commands default"
bec39cab
AC
20939cat >confcache <<\_ACEOF
20940# This file is a shell script that caches the results of configure
20941# tests run on this system so they can be shared between configure
20942# scripts and configure runs, see configure's option --config-cache.
20943# It is not useful on other systems. If it contains results you don't
20944# want to keep, you may remove or edit it.
20945#
20946# config.status only pays attention to the cache file if you give it
20947# the --recheck option to rerun configure.
20948#
20949# `ac_cv_env_foo' variables (set or unset) will be overridden when
20950# loading this file, other *unset* `ac_cv_foo' will be assigned the
20951# following values.
20952
20953_ACEOF
20954
20955# The following way of writing the cache mishandles newlines in values,
20956# but we know of no workaround that is simple, portable, and efficient.
b4e70030 20957# So, don't put newlines in cache variables' values.
bec39cab
AC
20958# Ultrix sh set writes to stderr and can't be redirected directly,
20959# and sets the high bit in the cache file unless we assign to the vars.
b4e70030 20960{
bec39cab 20961 (set) 2>&1 |
b4e70030
JB
20962 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20963 *ac_space=\ *)
bec39cab
AC
20964 # `set' does not quote correctly, so add quotes (double-quote
20965 # substitution turns \\\\ into \\, and sed turns \\ into \).
20966 sed -n \
20967 "s/'/'\\\\''/g;
20968 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b4e70030 20969 ;;
bec39cab
AC
20970 *)
20971 # `set' quotes correctly as required by POSIX, so do not add quotes.
b4e70030
JB
20972 sed -n \
20973 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 20974 ;;
b4e70030
JB
20975 esac;
20976} |
bec39cab
AC
20977 sed '
20978 t clear
b4e70030 20979 : clear
bec39cab
AC
20980 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20981 t end
b4e70030
JB
20982 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20983 : end' >>confcache
bec39cab
AC
20984if diff $cache_file confcache >/dev/null 2>&1; then :; else
20985 if test -w $cache_file; then
b4e70030 20986 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
bec39cab
AC
20987 cat confcache >$cache_file
20988 else
b4e70030 20989 echo "not updating unwritable cache $cache_file"
bec39cab
AC
20990 fi
20991fi
20992rm -f confcache
20993
20994test "x$prefix" = xNONE && prefix=$ac_default_prefix
20995# Let make expand exec_prefix.
20996test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20997
b4e70030
JB
20998# VPATH may cause trouble with some makes, so we remove $(srcdir),
20999# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21000# trailing colons and then remove the whole line if VPATH becomes empty
21001# (actually we leave an empty line to preserve line numbers).
21002if test "x$srcdir" = x.; then
21003 ac_vpsub='/^[ ]*VPATH[ ]*=/{
21004s/:*\$(srcdir):*/:/;
21005s/:*\${srcdir}:*/:/;
21006s/:*@srcdir@:*/:/;
21007s/^\([^=]*=[ ]*\):*/\1/;
21008s/:*$//;
21009s/^[^=]*=[ ]*$//;
21010}'
21011fi
21012
bec39cab
AC
21013DEFS=-DHAVE_CONFIG_H
21014
21015ac_libobjs=
21016ac_ltlibobjs=
21017for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21018 # 1. Remove the extension, and $U if already installed.
b4e70030
JB
21019 ac_i=`echo "$ac_i" |
21020 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
21021 # 2. Add them.
21022 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21023 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
bec39cab
AC
21024done
21025LIBOBJS=$ac_libobjs
21026
21027LTLIBOBJS=$ac_ltlibobjs
21028
21029
85981d60
AC
21030if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
21031 { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
21032Usually this means the macro was only invoked conditionally." >&5
21033echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
21034Usually this means the macro was only invoked conditionally." >&2;}
21035 { (exit 1); exit 1; }; }
21036fi
a417dc56
RW
21037if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
21038 { { echo "$as_me:$LINENO: error: conditional \"GMAKE\" was never defined.
21039Usually this means the macro was only invoked conditionally." >&5
21040echo "$as_me: error: conditional \"GMAKE\" was never defined.
21041Usually this means the macro was only invoked conditionally." >&2;}
21042 { (exit 1); exit 1; }; }
21043fi
783e057b
DJ
21044if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
21045 { { echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21046Usually this means the macro was only invoked conditionally." >&5
21047echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21048Usually this means the macro was only invoked conditionally." >&2;}
21049 { (exit 1); exit 1; }; }
21050fi
21051
21052 gl_libobjs=
21053 gl_ltlibobjs=
21054 if test -n "$gl_LIBOBJS"; then
21055 # Remove the extension.
21056 sed_drop_objext='s/\.o$//;s/\.obj$//'
21057 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21058 gl_libobjs="$gl_libobjs $i.$ac_objext"
21059 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
21060 done
21061 fi
21062 gl_LIBOBJS=$gl_libobjs
21063
21064 gl_LTLIBOBJS=$gl_ltlibobjs
21065
21066
21067
21068 gltests_libobjs=
21069 gltests_ltlibobjs=
21070 if test -n "$gltests_LIBOBJS"; then
21071 # Remove the extension.
21072 sed_drop_objext='s/\.o$//;s/\.obj$//'
21073 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21074 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
21075 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
21076 done
21077 fi
21078 gltests_LIBOBJS=$gltests_libobjs
21079
21080 gltests_LTLIBOBJS=$gltests_ltlibobjs
21081
21082
e28b3332
DJ
21083if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
21084 { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
21085Usually this means the macro was only invoked conditionally." >&5
21086echo "$as_me: error: conditional \"AMDEP\" was never defined.
21087Usually this means the macro was only invoked conditionally." >&2;}
21088 { (exit 1); exit 1; }; }
21089fi
21090if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
21091 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
21092Usually this means the macro was only invoked conditionally." >&5
21093echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
21094Usually this means the macro was only invoked conditionally." >&2;}
21095 { (exit 1); exit 1; }; }
21096fi
bec39cab
AC
21097
21098: ${CONFIG_STATUS=./config.status}
21099ac_clean_files_save=$ac_clean_files
21100ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21101{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21102echo "$as_me: creating $CONFIG_STATUS" >&6;}
21103cat >$CONFIG_STATUS <<_ACEOF
21104#! $SHELL
21105# Generated by $as_me.
21106# Run this file to recreate the current configuration.
21107# Compiler output produced by configure, useful for debugging
21108# configure, is in config.log if it exists.
21109
21110debug=false
21111ac_cs_recheck=false
21112ac_cs_silent=false
21113SHELL=\${CONFIG_SHELL-$SHELL}
21114_ACEOF
21115
21116cat >>$CONFIG_STATUS <<\_ACEOF
21117## --------------------- ##
21118## M4sh Initialization. ##
21119## --------------------- ##
21120
21121# Be Bourne compatible
21122if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21123 emulate sh
21124 NULLCMD=:
21125 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21126 # is contrary to our usage. Disable this feature.
21127 alias -g '${1+"$@"}'='"$@"'
b4e70030
JB
21128elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21129 set -o posix
bec39cab
AC
21130fi
21131DUALCASE=1; export DUALCASE # for MKS sh
21132
21133# Support unset when possible.
21134if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21135 as_unset=unset
21136else
21137 as_unset=false
21138fi
21139
21140
21141# Work around bugs in pre-3.0 UWIN ksh.
b4e70030 21142$as_unset ENV MAIL MAILPATH
bec39cab
AC
21143PS1='$ '
21144PS2='> '
21145PS4='+ '
21146
21147# NLS nuisances.
21148for as_var in \
21149 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21150 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21151 LC_TELEPHONE LC_TIME
21152do
21153 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
21154 eval $as_var=C; export $as_var
21155 else
b4e70030 21156 $as_unset $as_var
bec39cab
AC
21157 fi
21158done
21159
21160# Required to use basename.
b4e70030 21161if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
21162 as_expr=expr
21163else
21164 as_expr=false
21165fi
21166
b4e70030 21167if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
bec39cab
AC
21168 as_basename=basename
21169else
21170 as_basename=false
21171fi
21172
21173
21174# Name of the executable.
b4e70030 21175as_me=`$as_basename "$0" ||
bec39cab
AC
21176$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21177 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
21178 X"$0" : 'X\(/\)$' \| \
21179 . : '\(.\)' 2>/dev/null ||
bec39cab 21180echo X/"$0" |
b4e70030
JB
21181 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21182 /^X\/\(\/\/\)$/{ s//\1/; q; }
21183 /^X\/\(\/\).*/{ s//\1/; q; }
21184 s/.*/./; q'`
bec39cab 21185
b4e70030
JB
21186
21187# PATH needs CR, and LINENO needs CR and PATH.
21188# Avoid depending upon Character Ranges.
21189as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21190as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21191as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21192as_cr_digits='0123456789'
21193as_cr_alnum=$as_cr_Letters$as_cr_digits
21194
21195# The user is always right.
21196if test "${PATH_SEPARATOR+set}" != set; then
21197 echo "#! /bin/sh" >conf$$.sh
21198 echo "exit 0" >>conf$$.sh
21199 chmod +x conf$$.sh
21200 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
21201 PATH_SEPARATOR=';'
21202 else
21203 PATH_SEPARATOR=:
21204 fi
21205 rm -f conf$$.sh
21206fi
bec39cab
AC
21207
21208
b4e70030
JB
21209 as_lineno_1=$LINENO
21210 as_lineno_2=$LINENO
21211 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21212 test "x$as_lineno_1" != "x$as_lineno_2" &&
21213 test "x$as_lineno_3" = "x$as_lineno_2" || {
21214 # Find who we are. Look in the path if we contain no path at all
21215 # relative or not.
21216 case $0 in
21217 *[\\/]* ) as_myself=$0 ;;
21218 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21219for as_dir in $PATH
21220do
21221 IFS=$as_save_IFS
21222 test -z "$as_dir" && as_dir=.
21223 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21224done
bec39cab 21225
b4e70030
JB
21226 ;;
21227 esac
21228 # We did not find ourselves, most probably we were run as `sh COMMAND'
21229 # in which case we are not to be found in the path.
21230 if test "x$as_myself" = x; then
21231 as_myself=$0
21232 fi
21233 if test ! -f "$as_myself"; then
21234 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21235echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21236 { (exit 1); exit 1; }; }
21237 fi
21238 case $CONFIG_SHELL in
21239 '')
21240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21241for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21242do
21243 IFS=$as_save_IFS
21244 test -z "$as_dir" && as_dir=.
21245 for as_base in sh bash ksh sh5; do
21246 case $as_dir in
21247 /*)
21248 if ("$as_dir/$as_base" -c '
bec39cab
AC
21249 as_lineno_1=$LINENO
21250 as_lineno_2=$LINENO
b4e70030 21251 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
bec39cab 21252 test "x$as_lineno_1" != "x$as_lineno_2" &&
b4e70030
JB
21253 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
21254 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21255 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
21256 CONFIG_SHELL=$as_dir/$as_base
21257 export CONFIG_SHELL
21258 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21259 fi;;
21260 esac
21261 done
21262done
21263;;
21264 esac
bec39cab
AC
21265
21266 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21267 # uniformly replaced by the line number. The first 'sed' inserts a
b4e70030
JB
21268 # line-number line before each line; the second 'sed' does the real
21269 # work. The second script uses 'N' to pair each line-number line
21270 # with the numbered line, and appends trailing '-' during
21271 # substitution so that $LINENO is not a special case at line end.
bec39cab 21272 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b4e70030
JB
21273 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
21274 sed '=' <$as_myself |
bec39cab
AC
21275 sed '
21276 N
b4e70030
JB
21277 s,$,-,
21278 : loop
21279 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
bec39cab 21280 t loop
b4e70030
JB
21281 s,-$,,
21282 s,^['$as_cr_digits']*\n,,
bec39cab 21283 ' >$as_me.lineno &&
b4e70030
JB
21284 chmod +x $as_me.lineno ||
21285 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21286echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
bec39cab
AC
21287 { (exit 1); exit 1; }; }
21288
21289 # Don't try to exec as it changes $[0], causing all sort of problems
21290 # (the dirname of $[0] is not the place where we might find the
b4e70030
JB
21291 # original and so on. Autoconf is especially sensible to this).
21292 . ./$as_me.lineno
bec39cab
AC
21293 # Exit status is that of the last command.
21294 exit
21295}
21296
21297
b4e70030
JB
21298case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21299 *c*,-n*) ECHO_N= ECHO_C='
21300' ECHO_T=' ' ;;
21301 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21302 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
bec39cab
AC
21303esac
21304
b4e70030 21305if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
21306 as_expr=expr
21307else
21308 as_expr=false
21309fi
21310
21311rm -f conf$$ conf$$.exe conf$$.file
21312echo >conf$$.file
21313if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030
JB
21314 # We could just check for DJGPP; but this test a) works b) is more generic
21315 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21316 if test -f conf$$.exe; then
21317 # Don't use ln at all; we don't have any links
bec39cab 21318 as_ln_s='cp -p'
b4e70030
JB
21319 else
21320 as_ln_s='ln -s'
21321 fi
bec39cab
AC
21322elif ln conf$$.file conf$$ 2>/dev/null; then
21323 as_ln_s=ln
21324else
21325 as_ln_s='cp -p'
21326fi
b4e70030 21327rm -f conf$$ conf$$.exe conf$$.file
bec39cab
AC
21328
21329if mkdir -p . 2>/dev/null; then
21330 as_mkdir_p=:
21331else
21332 test -d ./-p && rmdir ./-p
21333 as_mkdir_p=false
21334fi
21335
b4e70030 21336as_executable_p="test -f"
bec39cab
AC
21337
21338# Sed expression to map a string onto a valid CPP name.
21339as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21340
21341# Sed expression to map a string onto a valid variable name.
21342as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21343
21344
b4e70030
JB
21345# IFS
21346# We need space, tab and new line, in precisely that order.
21347as_nl='
21348'
21349IFS=" $as_nl"
21350
21351# CDPATH.
21352$as_unset CDPATH
21353
bec39cab
AC
21354exec 6>&1
21355
b4e70030 21356# Open the log real soon, to keep \$[0] and so on meaningful, and to
bec39cab 21357# report actual input values of CONFIG_FILES etc. instead of their
b4e70030
JB
21358# values after options handling. Logging --version etc. is OK.
21359exec 5>>config.log
21360{
21361 echo
21362 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21363## Running $as_me. ##
21364_ASBOX
21365} >&5
21366cat >&5 <<_CSEOF
21367
bec39cab 21368This file was extended by $as_me, which was
b4e70030 21369generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
21370
21371 CONFIG_FILES = $CONFIG_FILES
21372 CONFIG_HEADERS = $CONFIG_HEADERS
21373 CONFIG_LINKS = $CONFIG_LINKS
21374 CONFIG_COMMANDS = $CONFIG_COMMANDS
21375 $ $0 $@
21376
b4e70030
JB
21377_CSEOF
21378echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21379echo >&5
bec39cab
AC
21380_ACEOF
21381
21382# Files that config.status was made for.
b4e70030
JB
21383if test -n "$ac_config_files"; then
21384 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21385fi
234b45d4 21386
b4e70030
JB
21387if test -n "$ac_config_headers"; then
21388 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21389fi
21390
21391if test -n "$ac_config_links"; then
21392 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21393fi
21394
21395if test -n "$ac_config_commands"; then
21396 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21397fi
234b45d4 21398
bec39cab 21399cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030 21400
bec39cab
AC
21401ac_cs_usage="\
21402\`$as_me' instantiates files from templates according to the
21403current configuration.
234b45d4 21404
bec39cab 21405Usage: $0 [OPTIONS] [FILE]...
234b45d4 21406
bec39cab
AC
21407 -h, --help print this help, then exit
21408 -V, --version print version number, then exit
21409 -q, --quiet do not print progress messages
21410 -d, --debug don't remove temporary files
21411 --recheck update $as_me by reconfiguring in the same conditions
21412 --file=FILE[:TEMPLATE]
21413 instantiate the configuration file FILE
21414 --header=FILE[:TEMPLATE]
21415 instantiate the configuration header FILE
234b45d4 21416
bec39cab
AC
21417Configuration files:
21418$config_files
234b45d4 21419
bec39cab
AC
21420Configuration headers:
21421$config_headers
234b45d4 21422
bec39cab
AC
21423Configuration links:
21424$config_links
234b45d4 21425
bec39cab
AC
21426Configuration commands:
21427$config_commands
21428
21429Report bugs to <bug-autoconf@gnu.org>."
4e8d927d 21430_ACEOF
b4e70030 21431
bec39cab
AC
21432cat >>$CONFIG_STATUS <<_ACEOF
21433ac_cs_version="\\
21434config.status
b4e70030 21435configured by $0, generated by GNU Autoconf 2.59,
bec39cab
AC
21436 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21437
b4e70030 21438Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
21439This config.status script is free software; the Free Software Foundation
21440gives unlimited permission to copy, distribute and modify it."
b4e70030
JB
21441srcdir=$srcdir
21442INSTALL="$INSTALL"
bec39cab
AC
21443_ACEOF
21444
21445cat >>$CONFIG_STATUS <<\_ACEOF
21446# If no file are specified by the user, then we need to provide default
21447# value. By we need to know if files were specified by the user.
21448ac_need_defaults=:
21449while test $# != 0
21450do
21451 case $1 in
21452 --*=*)
b4e70030
JB
21453 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21454 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
bec39cab 21455 ac_shift=:
c906108c 21456 ;;
b4e70030 21457 -*)
bec39cab
AC
21458 ac_option=$1
21459 ac_optarg=$2
21460 ac_shift=shift
c906108c 21461 ;;
b4e70030
JB
21462 *) # This is not an option, so the user has probably given explicit
21463 # arguments.
21464 ac_option=$1
21465 ac_need_defaults=false;;
bec39cab 21466 esac
c906108c 21467
bec39cab
AC
21468 case $ac_option in
21469 # Handling of the options.
b4e70030
JB
21470_ACEOF
21471cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
21472 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21473 ac_cs_recheck=: ;;
b4e70030
JB
21474 --version | --vers* | -V )
21475 echo "$ac_cs_version"; exit 0 ;;
21476 --he | --h)
21477 # Conflict between --help and --header
21478 { { echo "$as_me:$LINENO: error: ambiguous option: $1
21479Try \`$0 --help' for more information." >&5
21480echo "$as_me: error: ambiguous option: $1
21481Try \`$0 --help' for more information." >&2;}
21482 { (exit 1); exit 1; }; };;
21483 --help | --hel | -h )
21484 echo "$ac_cs_usage"; exit 0 ;;
21485 --debug | --d* | -d )
bec39cab
AC
21486 debug=: ;;
21487 --file | --fil | --fi | --f )
21488 $ac_shift
21489 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
21490 ac_need_defaults=false;;
21491 --header | --heade | --head | --hea )
21492 $ac_shift
21493 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
21494 ac_need_defaults=false;;
21495 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21496 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21497 ac_cs_silent=: ;;
c906108c 21498
bec39cab 21499 # This is an error.
b4e70030
JB
21500 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21501Try \`$0 --help' for more information." >&5
21502echo "$as_me: error: unrecognized option: $1
21503Try \`$0 --help' for more information." >&2;}
bec39cab 21504 { (exit 1); exit 1; }; } ;;
c906108c 21505
b4e70030 21506 *) ac_config_targets="$ac_config_targets $1" ;;
c906108c 21507
bec39cab
AC
21508 esac
21509 shift
21510done
c906108c 21511
bec39cab 21512ac_configure_extra_args=
c906108c 21513
bec39cab
AC
21514if $ac_cs_silent; then
21515 exec 6>/dev/null
21516 ac_configure_extra_args="$ac_configure_extra_args --silent"
21517fi
c906108c 21518
bec39cab
AC
21519_ACEOF
21520cat >>$CONFIG_STATUS <<_ACEOF
21521if \$ac_cs_recheck; then
b4e70030
JB
21522 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21523 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
bec39cab
AC
21524fi
21525
21526_ACEOF
21527
21528cat >>$CONFIG_STATUS <<_ACEOF
c906108c 21529#
b4e70030 21530# INIT-COMMANDS section.
c906108c 21531#
c906108c 21532
a417dc56 21533ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 21534AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 21535
bec39cab 21536gdb_host_cpu=$gdb_host_cpu
bec39cab
AC
21537nativefile=$nativefile
21538
21539
21540_ACEOF
21541
4e8d927d 21542
b4e70030
JB
21543
21544cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab 21545for ac_config_target in $ac_config_targets
c906108c 21546do
b4e70030
JB
21547 case "$ac_config_target" in
21548 # Handling of arguments.
21549 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21550 ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
e28b3332 21551 "gnulib/Makefile" ) CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
b4e70030 21552 "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
a417dc56 21553 "depdir" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
e28b3332 21554 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
b4e70030
JB
21555 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21556 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
bec39cab
AC
21557 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21558echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21559 { (exit 1); exit 1; }; };;
c906108c
SS
21560 esac
21561done
21562
bec39cab
AC
21563# If the user did not use the arguments to specify the items to instantiate,
21564# then the envvar interface is used. Set only those that are not.
21565# We use the long form for the default assignment because of an extremely
21566# bizarre bug on SunOS 4.1.3.
21567if $ac_need_defaults; then
21568 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21569 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21570 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
21571 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21572fi
21573
b4e70030
JB
21574# Have a temporary directory for convenience. Make it in the build tree
21575# simply because there is no reason to put it here, and in addition,
21576# creating and moving files from /tmp can sometimes cause problems.
21577# Create a temporary directory, and hook for its removal unless debugging.
21578$debug ||
21579{
21580 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21581 trap '{ (exit 1); exit 1; }' 1 2 13 15
21582}
4e8d927d 21583
b4e70030 21584# Create a (secure) tmp directory for tmp files.
4e8d927d 21585
b4e70030
JB
21586{
21587 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
21588 test -n "$tmp" && test -d "$tmp"
21589} ||
21590{
21591 tmp=./confstat$$-$RANDOM
21592 (umask 077 && mkdir $tmp)
21593} ||
21594{
21595 echo "$me: cannot create a temporary directory in ." >&2
21596 { (exit 1); exit 1; }
21597}
4e8d927d 21598
b4e70030 21599_ACEOF
4e8d927d 21600
b4e70030 21601cat >>$CONFIG_STATUS <<_ACEOF
4e8d927d 21602
b4e70030
JB
21603#
21604# CONFIG_FILES section.
21605#
4e8d927d 21606
b4e70030
JB
21607# No need to generate the scripts if there are no CONFIG_FILES.
21608# This happens for instance when ./config.status config.h
21609if test -n "\$CONFIG_FILES"; then
21610 # Protect against being on the right side of a sed subst in config.status.
21611 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21612 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21613s,@SHELL@,$SHELL,;t t
21614s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21615s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21616s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21617s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21618s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21619s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21620s,@exec_prefix@,$exec_prefix,;t t
21621s,@prefix@,$prefix,;t t
21622s,@program_transform_name@,$program_transform_name,;t t
21623s,@bindir@,$bindir,;t t
21624s,@sbindir@,$sbindir,;t t
21625s,@libexecdir@,$libexecdir,;t t
21626s,@datadir@,$datadir,;t t
21627s,@sysconfdir@,$sysconfdir,;t t
21628s,@sharedstatedir@,$sharedstatedir,;t t
21629s,@localstatedir@,$localstatedir,;t t
21630s,@libdir@,$libdir,;t t
21631s,@includedir@,$includedir,;t t
21632s,@oldincludedir@,$oldincludedir,;t t
21633s,@infodir@,$infodir,;t t
21634s,@mandir@,$mandir,;t t
21635s,@build_alias@,$build_alias,;t t
21636s,@host_alias@,$host_alias,;t t
21637s,@target_alias@,$target_alias,;t t
21638s,@DEFS@,$DEFS,;t t
21639s,@ECHO_C@,$ECHO_C,;t t
21640s,@ECHO_N@,$ECHO_N,;t t
21641s,@ECHO_T@,$ECHO_T,;t t
21642s,@LIBS@,$LIBS,;t t
21643s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
21644s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
21645s,@MAINT@,$MAINT,;t t
21646s,@CC@,$CC,;t t
21647s,@CFLAGS@,$CFLAGS,;t t
21648s,@LDFLAGS@,$LDFLAGS,;t t
21649s,@CPPFLAGS@,$CPPFLAGS,;t t
21650s,@ac_ct_CC@,$ac_ct_CC,;t t
21651s,@EXEEXT@,$EXEEXT,;t t
21652s,@OBJEXT@,$OBJEXT,;t t
21653s,@CPP@,$CPP,;t t
21654s,@EGREP@,$EGREP,;t t
783e057b
DJ
21655s,@RANLIB@,$RANLIB,;t t
21656s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
b4e70030
JB
21657s,@build@,$build,;t t
21658s,@build_cpu@,$build_cpu,;t t
21659s,@build_vendor@,$build_vendor,;t t
21660s,@build_os@,$build_os,;t t
21661s,@host@,$host,;t t
21662s,@host_cpu@,$host_cpu,;t t
21663s,@host_vendor@,$host_vendor,;t t
21664s,@host_os@,$host_os,;t t
21665s,@target@,$target,;t t
21666s,@target_cpu@,$target_cpu,;t t
21667s,@target_vendor@,$target_vendor,;t t
21668s,@target_os@,$target_os,;t t
a417dc56
RW
21669s,@am__leading_dot@,$am__leading_dot,;t t
21670s,@DEPDIR@,$DEPDIR,;t t
21671s,@CCDEPMODE@,$CCDEPMODE,;t t
21672s,@MAKE@,$MAKE,;t t
21673s,@GMAKE_TRUE@,$GMAKE_TRUE,;t t
21674s,@GMAKE_FALSE@,$GMAKE_FALSE,;t t
21675s,@SET_MAKE@,$SET_MAKE,;t t
b4e70030 21676s,@USE_NLS@,$USE_NLS,;t t
20e95c23
DJ
21677s,@LIBINTL@,$LIBINTL,;t t
21678s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
21679s,@INCINTL@,$INCINTL,;t t
b4e70030 21680s,@XGETTEXT@,$XGETTEXT,;t t
20e95c23
DJ
21681s,@GMSGFMT@,$GMSGFMT,;t t
21682s,@POSUB@,$POSUB,;t t
b4e70030 21683s,@CATALOGS@,$CATALOGS,;t t
b4e70030 21684s,@DATADIRNAME@,$DATADIRNAME,;t t
b4e70030 21685s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20e95c23
DJ
21686s,@GENCAT@,$GENCAT,;t t
21687s,@CATOBJEXT@,$CATOBJEXT,;t t
b4e70030 21688s,@localedir@,$localedir,;t t
783e057b
DJ
21689s,@GL_COND_LIBTOOL_TRUE@,$GL_COND_LIBTOOL_TRUE,;t t
21690s,@GL_COND_LIBTOOL_FALSE@,$GL_COND_LIBTOOL_FALSE,;t t
21691s,@GNULIB_MEMMEM@,$GNULIB_MEMMEM,;t t
21692s,@GNULIB_MEMPCPY@,$GNULIB_MEMPCPY,;t t
21693s,@GNULIB_MEMRCHR@,$GNULIB_MEMRCHR,;t t
21694s,@GNULIB_STPCPY@,$GNULIB_STPCPY,;t t
21695s,@GNULIB_STPNCPY@,$GNULIB_STPNCPY,;t t
21696s,@GNULIB_STRCHRNUL@,$GNULIB_STRCHRNUL,;t t
21697s,@GNULIB_STRDUP@,$GNULIB_STRDUP,;t t
21698s,@GNULIB_STRNDUP@,$GNULIB_STRNDUP,;t t
21699s,@GNULIB_STRNLEN@,$GNULIB_STRNLEN,;t t
21700s,@GNULIB_STRPBRK@,$GNULIB_STRPBRK,;t t
21701s,@GNULIB_STRSEP@,$GNULIB_STRSEP,;t t
21702s,@GNULIB_STRSTR@,$GNULIB_STRSTR,;t t
21703s,@GNULIB_STRCASESTR@,$GNULIB_STRCASESTR,;t t
21704s,@GNULIB_STRTOK_R@,$GNULIB_STRTOK_R,;t t
21705s,@GNULIB_MBSLEN@,$GNULIB_MBSLEN,;t t
21706s,@GNULIB_MBSNLEN@,$GNULIB_MBSNLEN,;t t
21707s,@GNULIB_MBSCHR@,$GNULIB_MBSCHR,;t t
21708s,@GNULIB_MBSRCHR@,$GNULIB_MBSRCHR,;t t
21709s,@GNULIB_MBSSTR@,$GNULIB_MBSSTR,;t t
21710s,@GNULIB_MBSCASECMP@,$GNULIB_MBSCASECMP,;t t
21711s,@GNULIB_MBSNCASECMP@,$GNULIB_MBSNCASECMP,;t t
21712s,@GNULIB_MBSPCASECMP@,$GNULIB_MBSPCASECMP,;t t
21713s,@GNULIB_MBSCASESTR@,$GNULIB_MBSCASESTR,;t t
21714s,@GNULIB_MBSCSPN@,$GNULIB_MBSCSPN,;t t
21715s,@GNULIB_MBSPBRK@,$GNULIB_MBSPBRK,;t t
21716s,@GNULIB_MBSSPN@,$GNULIB_MBSSPN,;t t
21717s,@GNULIB_MBSSEP@,$GNULIB_MBSSEP,;t t
21718s,@GNULIB_MBSTOK_R@,$GNULIB_MBSTOK_R,;t t
21719s,@GNULIB_STRERROR@,$GNULIB_STRERROR,;t t
21720s,@GNULIB_STRSIGNAL@,$GNULIB_STRSIGNAL,;t t
21721s,@HAVE_DECL_MEMMEM@,$HAVE_DECL_MEMMEM,;t t
21722s,@HAVE_MEMPCPY@,$HAVE_MEMPCPY,;t t
21723s,@HAVE_DECL_MEMRCHR@,$HAVE_DECL_MEMRCHR,;t t
21724s,@HAVE_STPCPY@,$HAVE_STPCPY,;t t
21725s,@HAVE_STPNCPY@,$HAVE_STPNCPY,;t t
21726s,@HAVE_STRCHRNUL@,$HAVE_STRCHRNUL,;t t
21727s,@HAVE_DECL_STRDUP@,$HAVE_DECL_STRDUP,;t t
21728s,@HAVE_STRNDUP@,$HAVE_STRNDUP,;t t
21729s,@HAVE_DECL_STRNDUP@,$HAVE_DECL_STRNDUP,;t t
21730s,@HAVE_DECL_STRNLEN@,$HAVE_DECL_STRNLEN,;t t
21731s,@HAVE_STRPBRK@,$HAVE_STRPBRK,;t t
21732s,@HAVE_STRSEP@,$HAVE_STRSEP,;t t
21733s,@HAVE_STRCASESTR@,$HAVE_STRCASESTR,;t t
21734s,@HAVE_DECL_STRTOK_R@,$HAVE_DECL_STRTOK_R,;t t
21735s,@HAVE_DECL_STRERROR@,$HAVE_DECL_STRERROR,;t t
21736s,@HAVE_DECL_STRSIGNAL@,$HAVE_DECL_STRSIGNAL,;t t
21737s,@REPLACE_STRERROR@,$REPLACE_STRERROR,;t t
21738s,@REPLACE_STRSIGNAL@,$REPLACE_STRSIGNAL,;t t
21739s,@REPLACE_MEMMEM@,$REPLACE_MEMMEM,;t t
21740s,@REPLACE_STRCASESTR@,$REPLACE_STRCASESTR,;t t
21741s,@REPLACE_STRSTR@,$REPLACE_STRSTR,;t t
21742s,@HAVE_LONG_LONG_INT@,$HAVE_LONG_LONG_INT,;t t
21743s,@HAVE_UNSIGNED_LONG_LONG_INT@,$HAVE_UNSIGNED_LONG_LONG_INT,;t t
21744s,@HAVE_INTTYPES_H@,$HAVE_INTTYPES_H,;t t
21745s,@HAVE_SYS_TYPES_H@,$HAVE_SYS_TYPES_H,;t t
21746s,@INCLUDE_NEXT@,$INCLUDE_NEXT,;t t
21747s,@NEXT_STDINT_H@,$NEXT_STDINT_H,;t t
21748s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
21749s,@HAVE_SYS_INTTYPES_H@,$HAVE_SYS_INTTYPES_H,;t t
21750s,@HAVE_SYS_BITYPES_H@,$HAVE_SYS_BITYPES_H,;t t
21751s,@BITSIZEOF_PTRDIFF_T@,$BITSIZEOF_PTRDIFF_T,;t t
21752s,@BITSIZEOF_SIG_ATOMIC_T@,$BITSIZEOF_SIG_ATOMIC_T,;t t
21753s,@BITSIZEOF_SIZE_T@,$BITSIZEOF_SIZE_T,;t t
21754s,@BITSIZEOF_WCHAR_T@,$BITSIZEOF_WCHAR_T,;t t
21755s,@BITSIZEOF_WINT_T@,$BITSIZEOF_WINT_T,;t t
21756s,@HAVE_SIGNED_SIG_ATOMIC_T@,$HAVE_SIGNED_SIG_ATOMIC_T,;t t
21757s,@HAVE_SIGNED_WCHAR_T@,$HAVE_SIGNED_WCHAR_T,;t t
21758s,@HAVE_SIGNED_WINT_T@,$HAVE_SIGNED_WINT_T,;t t
21759s,@PTRDIFF_T_SUFFIX@,$PTRDIFF_T_SUFFIX,;t t
21760s,@SIG_ATOMIC_T_SUFFIX@,$SIG_ATOMIC_T_SUFFIX,;t t
21761s,@SIZE_T_SUFFIX@,$SIZE_T_SUFFIX,;t t
21762s,@WCHAR_T_SUFFIX@,$WCHAR_T_SUFFIX,;t t
21763s,@WINT_T_SUFFIX@,$WINT_T_SUFFIX,;t t
21764s,@STDINT_H@,$STDINT_H,;t t
21765s,@NEXT_STRING_H@,$NEXT_STRING_H,;t t
21766s,@GNULIB_WCWIDTH@,$GNULIB_WCWIDTH,;t t
21767s,@HAVE_DECL_WCWIDTH@,$HAVE_DECL_WCWIDTH,;t t
21768s,@REPLACE_WCWIDTH@,$REPLACE_WCWIDTH,;t t
21769s,@WCHAR_H@,$WCHAR_H,;t t
21770s,@HAVE_WCHAR_H@,$HAVE_WCHAR_H,;t t
21771s,@NEXT_WCHAR_H@,$NEXT_WCHAR_H,;t t
21772s,@LIBGNU_LIBDEPS@,$LIBGNU_LIBDEPS,;t t
21773s,@LIBGNU_LTLIBDEPS@,$LIBGNU_LTLIBDEPS,;t t
d5af19ba 21774s,@GNULIB_STDINT_H@,$GNULIB_STDINT_H,;t t
b4e70030 21775s,@PACKAGE@,$PACKAGE,;t t
b4e70030
JB
21776s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21777s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21778s,@INSTALL_DATA@,$INSTALL_DATA,;t t
e28b3332 21779s,@CYGPATH_W@,$CYGPATH_W,;t t
d57a3c85 21780s,@PYTHON2_4@,$PYTHON2_4,;t t
e28b3332
DJ
21781s,@ACLOCAL@,$ACLOCAL,;t t
21782s,@AUTOCONF@,$AUTOCONF,;t t
21783s,@AUTOMAKE@,$AUTOMAKE,;t t
21784s,@AUTOHEADER@,$AUTOHEADER,;t t
21785s,@MAKEINFO@,$MAKEINFO,;t t
21786s,@install_sh@,$install_sh,;t t
21787s,@STRIP@,$STRIP,;t t
21788s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
21789s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
21790s,@mkdir_p@,$mkdir_p,;t t
21791s,@AWK@,$AWK,;t t
e28b3332
DJ
21792s,@AMTAR@,$AMTAR,;t t
21793s,@am__tar@,$am__tar,;t t
21794s,@am__untar@,$am__untar,;t t
e28b3332
DJ
21795s,@am__include@,$am__include,;t t
21796s,@am__quote@,$am__quote,;t t
21797s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
21798s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
21799s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
e28b3332
DJ
21800s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
21801s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
21802s,@subdirs@,$subdirs,;t t
21803s,@TARGET_OBS@,$TARGET_OBS,;t t
c16158bc
JM
21804s,@PKGVERSION@,$PKGVERSION,;t t
21805s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
21806s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
b4e70030
JB
21807s,@LN_S@,$LN_S,;t t
21808s,@YACC@,$YACC,;t t
21809s,@AR@,$AR,;t t
21810s,@ac_ct_AR@,$ac_ct_AR,;t t
21811s,@DLLTOOL@,$DLLTOOL,;t t
21812s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
21813s,@WINDRES@,$WINDRES,;t t
21814s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t
21815s,@MIG@,$MIG,;t t
21816s,@ac_ct_MIG@,$ac_ct_MIG,;t t
6a30b0a5
AS
21817s,@READLINE@,$READLINE,;t t
21818s,@READLINE_DEPS@,$READLINE_DEPS,;t t
21819s,@READLINE_CFLAGS@,$READLINE_CFLAGS,;t t
3841debe
DJ
21820s,@HAVE_LIBEXPAT@,$HAVE_LIBEXPAT,;t t
21821s,@LIBEXPAT@,$LIBEXPAT,;t t
21822s,@LTLIBEXPAT@,$LTLIBEXPAT,;t t
d57a3c85 21823s,@PYTHON_CFLAGS@,$PYTHON_CFLAGS,;t t
20e95c23 21824s,@ALLOCA@,$ALLOCA,;t t
b4e70030
JB
21825s,@CONFIG_LDFLAGS@,$CONFIG_LDFLAGS,;t t
21826s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
21827s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
21828s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
21829s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t
21830s,@SER_HARDWIRE@,$SER_HARDWIRE,;t t
21831s,@WIN32LIBS@,$WIN32LIBS,;t t
21832s,@LIBGUI@,$LIBGUI,;t t
21833s,@GUI_CFLAGS_X@,$GUI_CFLAGS_X,;t t
21834s,@WIN32LDAPP@,$WIN32LDAPP,;t t
21835s,@TCL_VERSION@,$TCL_VERSION,;t t
5062cc19
KS
21836s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
21837s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
21838s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
21839s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
21840s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
b4e70030 21841s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
5062cc19
KS
21842s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
21843s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
21844s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
21845s,@TCL_INCLUDE@,$TCL_INCLUDE,;t t
21846s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
21847s,@TCL_DEPS@,$TCL_DEPS,;t t
b4e70030 21848s,@TK_VERSION@,$TK_VERSION,;t t
5062cc19
KS
21849s,@TK_BIN_DIR@,$TK_BIN_DIR,;t t
21850s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t
21851s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
21852s,@TK_LIB_FLAG@,$TK_LIB_FLAG,;t t
b4e70030 21853s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
5062cc19
KS
21854s,@TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t
21855s,@TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t
21856s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t
21857s,@TK_INCLUDE@,$TK_INCLUDE,;t t
21858s,@TK_LIBRARY@,$TK_LIBRARY,;t t
21859s,@TK_DEPS@,$TK_DEPS,;t t
21860s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t
b4e70030
JB
21861s,@X_CFLAGS@,$X_CFLAGS,;t t
21862s,@X_LDFLAGS@,$X_LDFLAGS,;t t
21863s,@X_LIBS@,$X_LIBS,;t t
b4e70030
JB
21864s,@GDBTKLIBS@,$GDBTKLIBS,;t t
21865s,@GDBTK_CFLAGS@,$GDBTK_CFLAGS,;t t
21866s,@GDBTK_SRC_DIR@,$GDBTK_SRC_DIR,;t t
9b624dbe
UW
21867s,@SIM@,$SIM,;t t
21868s,@SIM_OBS@,$SIM_OBS,;t t
b4e70030
JB
21869s,@ENABLE_CFLAGS@,$ENABLE_CFLAGS,;t t
21870s,@PROFILE_CFLAGS@,$PROFILE_CFLAGS,;t t
21871s,@CONFIG_OBS@,$CONFIG_OBS,;t t
21872s,@CONFIG_DEPS@,$CONFIG_DEPS,;t t
21873s,@CONFIG_SRCS@,$CONFIG_SRCS,;t t
21874s,@CONFIG_ALL@,$CONFIG_ALL,;t t
21875s,@CONFIG_CLEAN@,$CONFIG_CLEAN,;t t
21876s,@CONFIG_INSTALL@,$CONFIG_INSTALL,;t t
21877s,@CONFIG_UNINSTALL@,$CONFIG_UNINSTALL,;t t
21878s,@target_subdir@,$target_subdir,;t t
21879s,@frags@,$frags,;t t
b4e70030
JB
21880s,@nm_h@,$nm_h,;t t
21881s,@LIBICONV@,$LIBICONV,;t t
21882s,@LIBOBJS@,$LIBOBJS,;t t
21883s,@LTLIBOBJS@,$LTLIBOBJS,;t t
783e057b
DJ
21884s,@gl_LIBOBJS@,$gl_LIBOBJS,;t t
21885s,@gl_LTLIBOBJS@,$gl_LTLIBOBJS,;t t
21886s,@gltests_LIBOBJS@,$gltests_LIBOBJS,;t t
21887s,@gltests_LTLIBOBJS@,$gltests_LTLIBOBJS,;t t
b4e70030
JB
21888/@host_makefile_frag@/r $host_makefile_frag
21889s,@host_makefile_frag@,,;t t
b4e70030
JB
21890CEOF
21891
21892_ACEOF
21893
21894 cat >>$CONFIG_STATUS <<\_ACEOF
21895 # Split the substitutions into bite-sized pieces for seds with
21896 # small command number limits, like on Digital OSF/1 and HP-UX.
21897 ac_max_sed_lines=48
21898 ac_sed_frag=1 # Number of current file.
21899 ac_beg=1 # First line for current file.
21900 ac_end=$ac_max_sed_lines # Line after last line for current file.
21901 ac_more_lines=:
21902 ac_sed_cmds=
21903 while $ac_more_lines; do
21904 if test $ac_beg -gt 1; then
21905 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21906 else
21907 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
4e8d927d 21908 fi
b4e70030
JB
21909 if test ! -s $tmp/subs.frag; then
21910 ac_more_lines=false
21911 else
21912 # The purpose of the label and of the branching condition is to
21913 # speed up the sed processing (if there are no `@' at all, there
21914 # is no need to browse any of the substitutions).
21915 # These are the two extra sed commands mentioned above.
21916 (echo ':t
21917 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21918 if test -z "$ac_sed_cmds"; then
21919 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21920 else
21921 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21922 fi
21923 ac_sed_frag=`expr $ac_sed_frag + 1`
21924 ac_beg=$ac_end
21925 ac_end=`expr $ac_end + $ac_max_sed_lines`
21926 fi
21927 done
21928 if test -z "$ac_sed_cmds"; then
21929 ac_sed_cmds=cat
21930 fi
21931fi # test -n "$CONFIG_FILES"
4e8d927d 21932
b4e70030
JB
21933_ACEOF
21934cat >>$CONFIG_STATUS <<\_ACEOF
21935for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21936 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21937 case $ac_file in
21938 - | *:- | *:-:* ) # input from stdin
21939 cat >$tmp/stdin
21940 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21941 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21942 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21943 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21944 * ) ac_file_in=$ac_file.in ;;
c906108c
SS
21945 esac
21946
b4e70030
JB
21947 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21948 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
bec39cab
AC
21949$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21950 X"$ac_file" : 'X\(//\)[^/]' \| \
21951 X"$ac_file" : 'X\(//\)$' \| \
b4e70030
JB
21952 X"$ac_file" : 'X\(/\)' \| \
21953 . : '\(.\)' 2>/dev/null ||
bec39cab 21954echo X"$ac_file" |
b4e70030
JB
21955 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21956 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21957 /^X\(\/\/\)$/{ s//\1/; q; }
21958 /^X\(\/\).*/{ s//\1/; q; }
21959 s/.*/./; q'`
21960 { if $as_mkdir_p; then
21961 mkdir -p "$ac_dir"
21962 else
21963 as_dir="$ac_dir"
bec39cab 21964 as_dirs=
b4e70030
JB
21965 while test ! -d "$as_dir"; do
21966 as_dirs="$as_dir $as_dirs"
21967 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
21968$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21969 X"$as_dir" : 'X\(//\)[^/]' \| \
21970 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
21971 X"$as_dir" : 'X\(/\)' \| \
21972 . : '\(.\)' 2>/dev/null ||
bec39cab 21973echo X"$as_dir" |
b4e70030
JB
21974 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21975 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21976 /^X\(\/\/\)$/{ s//\1/; q; }
21977 /^X\(\/\).*/{ s//\1/; q; }
21978 s/.*/./; q'`
bec39cab 21979 done
b4e70030
JB
21980 test ! -n "$as_dirs" || mkdir $as_dirs
21981 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21982echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 21983 { (exit 1); exit 1; }; }; }
b4e70030 21984
bec39cab
AC
21985 ac_builddir=.
21986
b4e70030 21987if test "$ac_dir" != .; then
bec39cab 21988 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
21989 # A "../" for each directory in $ac_dir_suffix.
21990 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21991else
21992 ac_dir_suffix= ac_top_builddir=
21993fi
bec39cab
AC
21994
21995case $srcdir in
b4e70030 21996 .) # No --srcdir option. We are building in place.
bec39cab 21997 ac_srcdir=.
b4e70030
JB
21998 if test -z "$ac_top_builddir"; then
21999 ac_top_srcdir=.
22000 else
22001 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22002 fi ;;
22003 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 22004 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
22005 ac_top_srcdir=$srcdir ;;
22006 *) # Relative path.
22007 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22008 ac_top_srcdir=$ac_top_builddir$srcdir ;;
bec39cab
AC
22009esac
22010
b4e70030
JB
22011# Do not use `cd foo && pwd` to compute absolute paths, because
22012# the directories may not exist.
22013case `pwd` in
22014.) ac_abs_builddir="$ac_dir";;
22015*)
22016 case "$ac_dir" in
22017 .) ac_abs_builddir=`pwd`;;
22018 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22019 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22020 esac;;
22021esac
22022case $ac_abs_builddir in
22023.) ac_abs_top_builddir=${ac_top_builddir}.;;
22024*)
22025 case ${ac_top_builddir}. in
22026 .) ac_abs_top_builddir=$ac_abs_builddir;;
22027 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22028 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22029 esac;;
22030esac
22031case $ac_abs_builddir in
22032.) ac_abs_srcdir=$ac_srcdir;;
22033*)
22034 case $ac_srcdir in
22035 .) ac_abs_srcdir=$ac_abs_builddir;;
22036 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22037 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22038 esac;;
22039esac
22040case $ac_abs_builddir in
22041.) ac_abs_top_srcdir=$ac_top_srcdir;;
22042*)
22043 case $ac_top_srcdir in
22044 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22045 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22046 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22047 esac;;
22048esac
c906108c 22049
c906108c 22050
bec39cab
AC
22051 case $INSTALL in
22052 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
b4e70030 22053 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
c906108c 22054 esac
121ce6e5 22055
b4e70030
JB
22056 if test x"$ac_file" != x-; then
22057 { echo "$as_me:$LINENO: creating $ac_file" >&5
22058echo "$as_me: creating $ac_file" >&6;}
22059 rm -f "$ac_file"
22060 fi
22061 # Let's still pretend it is `configure' which instantiates (i.e., don't
22062 # use $as_me), people would be surprised to read:
22063 # /* config.h. Generated by config.status. */
22064 if test x"$ac_file" = x-; then
22065 configure_input=
22066 else
22067 configure_input="$ac_file. "
22068 fi
22069 configure_input=$configure_input"Generated from `echo $ac_file_in |
22070 sed 's,.*/,,'` by configure."
22071
22072 # First look for the input files in the build tree, otherwise in the
22073 # src tree.
22074 ac_file_inputs=`IFS=:
22075 for f in $ac_file_in; do
22076 case $f in
22077 -) echo $tmp/stdin ;;
22078 [\\/$]*)
22079 # Absolute (can't be DOS-style, as IFS=:)
22080 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22081echo "$as_me: error: cannot find input file: $f" >&2;}
22082 { (exit 1); exit 1; }; }
22083 echo "$f";;
22084 *) # Relative
22085 if test -f "$f"; then
22086 # Build tree
22087 echo "$f"
22088 elif test -f "$srcdir/$f"; then
22089 # Source tree
22090 echo "$srcdir/$f"
22091 else
22092 # /dev/null tree
22093 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22094echo "$as_me: error: cannot find input file: $f" >&2;}
22095 { (exit 1); exit 1; }; }
22096 fi;;
22097 esac
22098 done` || { (exit 1); exit 1; }
4e8d927d 22099_ACEOF
bec39cab
AC
22100cat >>$CONFIG_STATUS <<_ACEOF
22101 sed "$ac_vpsub
22102$extrasub
22103_ACEOF
22104cat >>$CONFIG_STATUS <<\_ACEOF
22105:t
22106/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b4e70030
JB
22107s,@configure_input@,$configure_input,;t t
22108s,@srcdir@,$ac_srcdir,;t t
22109s,@abs_srcdir@,$ac_abs_srcdir,;t t
22110s,@top_srcdir@,$ac_top_srcdir,;t t
22111s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22112s,@builddir@,$ac_builddir,;t t
22113s,@abs_builddir@,$ac_abs_builddir,;t t
22114s,@top_builddir@,$ac_top_builddir,;t t
22115s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22116s,@INSTALL@,$ac_INSTALL,;t t
22117" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22118 rm -f $tmp/stdin
22119 if test x"$ac_file" != x-; then
22120 mv $tmp/out $ac_file
22121 else
22122 cat $tmp/out
22123 rm -f $tmp/out
22124 fi
22125
22126done
22127_ACEOF
22128cat >>$CONFIG_STATUS <<\_ACEOF
22129
22130#
22131# CONFIG_HEADER section.
22132#
22133
22134# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22135# NAME is the cpp macro being defined and VALUE is the value it is being given.
22136#
22137# ac_d sets the value in "#define NAME VALUE" lines.
22138ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22139ac_dB='[ ].*$,\1#\2'
22140ac_dC=' '
22141ac_dD=',;t'
22142# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22143ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
22144ac_uB='$,\1#\2define\3'
22145ac_uC=' '
22146ac_uD=',;t'
22147
22148for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22149 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
bec39cab 22150 case $ac_file in
b4e70030
JB
22151 - | *:- | *:-:* ) # input from stdin
22152 cat >$tmp/stdin
22153 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22154 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22155 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22156 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22157 * ) ac_file_in=$ac_file.in ;;
c906108c 22158 esac
b4e70030
JB
22159
22160 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22161echo "$as_me: creating $ac_file" >&6;}
22162
22163 # First look for the input files in the build tree, otherwise in the
22164 # src tree.
22165 ac_file_inputs=`IFS=:
22166 for f in $ac_file_in; do
22167 case $f in
22168 -) echo $tmp/stdin ;;
22169 [\\/$]*)
22170 # Absolute (can't be DOS-style, as IFS=:)
22171 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22172echo "$as_me: error: cannot find input file: $f" >&2;}
22173 { (exit 1); exit 1; }; }
22174 # Do quote $f, to prevent DOS paths from being IFS'd.
22175 echo "$f";;
22176 *) # Relative
22177 if test -f "$f"; then
22178 # Build tree
22179 echo "$f"
22180 elif test -f "$srcdir/$f"; then
22181 # Source tree
22182 echo "$srcdir/$f"
22183 else
22184 # /dev/null tree
22185 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22186echo "$as_me: error: cannot find input file: $f" >&2;}
22187 { (exit 1); exit 1; }; }
22188 fi;;
22189 esac
22190 done` || { (exit 1); exit 1; }
22191 # Remove the trailing spaces.
22192 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
22193
22194_ACEOF
22195
22196# Transform confdefs.h into two sed scripts, `conftest.defines' and
22197# `conftest.undefs', that substitutes the proper values into
22198# config.h.in to produce config.h. The first handles `#define'
22199# templates, and the second `#undef' templates.
22200# And first: Protect against being on the right side of a sed subst in
22201# config.status. Protect against being in an unquoted here document
22202# in config.status.
22203rm -f conftest.defines conftest.undefs
22204# Using a here document instead of a string reduces the quoting nightmare.
22205# Putting comments in sed scripts is not portable.
22206#
22207# `end' is used to avoid that the second main sed command (meant for
22208# 0-ary CPP macros) applies to n-ary macro definitions.
22209# See the Autoconf documentation for `clear'.
22210cat >confdef2sed.sed <<\_ACEOF
22211s/[\\&,]/\\&/g
22212s,[\\$`],\\&,g
22213t clear
22214: clear
22215s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
22216t end
22217s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
22218: end
22219_ACEOF
22220# If some macros were called several times there might be several times
22221# the same #defines, which is useless. Nevertheless, we may not want to
22222# sort them, since we want the *last* AC-DEFINE to be honored.
22223uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22224sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22225rm -f confdef2sed.sed
22226
22227# This sed command replaces #undef with comments. This is necessary, for
c906108c
SS
22228# example, in the case of _POSIX_SOURCE, which is predefined and required
22229# on some systems where configure will not decide to define it.
b4e70030
JB
22230cat >>conftest.undefs <<\_ACEOF
22231s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
22232_ACEOF
22233
22234# Break up conftest.defines because some shells have a limit on the size
22235# of here documents, and old seds have small limits too (100 cmds).
22236echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
22237echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
22238echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22239echo ' :' >>$CONFIG_STATUS
22240rm -f conftest.tail
22241while grep . conftest.defines >/dev/null
bec39cab 22242do
b4e70030
JB
22243 # Write a limited-size here document to $tmp/defines.sed.
22244 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22245 # Speed up: don't consider the non `#define' lines.
22246 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
22247 # Work around the forget-to-reset-the-flag bug.
22248 echo 't clr' >>$CONFIG_STATUS
22249 echo ': clr' >>$CONFIG_STATUS
22250 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
bec39cab 22251 echo 'CEOF
b4e70030
JB
22252 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22253 rm -f $tmp/in
22254 mv $tmp/out $tmp/in
22255' >>$CONFIG_STATUS
22256 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
bec39cab
AC
22257 rm -f conftest.defines
22258 mv conftest.tail conftest.defines
22259done
b4e70030
JB
22260rm -f conftest.defines
22261echo ' fi # grep' >>$CONFIG_STATUS
22262echo >>$CONFIG_STATUS
22263
22264# Break up conftest.undefs because some shells have a limit on the size
22265# of here documents, and old seds have small limits too (100 cmds).
22266echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22267rm -f conftest.tail
22268while grep . conftest.undefs >/dev/null
22269do
22270 # Write a limited-size here document to $tmp/undefs.sed.
22271 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22272 # Speed up: don't consider the non `#undef'
22273 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
22274 # Work around the forget-to-reset-the-flag bug.
22275 echo 't clr' >>$CONFIG_STATUS
22276 echo ': clr' >>$CONFIG_STATUS
22277 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22278 echo 'CEOF
22279 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22280 rm -f $tmp/in
22281 mv $tmp/out $tmp/in
22282' >>$CONFIG_STATUS
22283 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22284 rm -f conftest.undefs
22285 mv conftest.tail conftest.undefs
22286done
22287rm -f conftest.undefs
bec39cab
AC
22288
22289cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030
JB
22290 # Let's still pretend it is `configure' which instantiates (i.e., don't
22291 # use $as_me), people would be surprised to read:
22292 # /* config.h. Generated by config.status. */
22293 if test x"$ac_file" = x-; then
22294 echo "/* Generated by configure. */" >$tmp/config.h
22295 else
22296 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
22297 fi
22298 cat $tmp/in >>$tmp/config.h
22299 rm -f $tmp/in
bec39cab 22300 if test x"$ac_file" != x-; then
b4e70030 22301 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
bec39cab
AC
22302 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22303echo "$as_me: $ac_file is unchanged" >&6;}
22304 else
b4e70030
JB
22305 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22306$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22307 X"$ac_file" : 'X\(//\)[^/]' \| \
22308 X"$ac_file" : 'X\(//\)$' \| \
22309 X"$ac_file" : 'X\(/\)' \| \
22310 . : '\(.\)' 2>/dev/null ||
22311echo X"$ac_file" |
22312 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22313 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22314 /^X\(\/\/\)$/{ s//\1/; q; }
22315 /^X\(\/\).*/{ s//\1/; q; }
22316 s/.*/./; q'`
22317 { if $as_mkdir_p; then
22318 mkdir -p "$ac_dir"
22319 else
22320 as_dir="$ac_dir"
22321 as_dirs=
22322 while test ! -d "$as_dir"; do
22323 as_dirs="$as_dir $as_dirs"
22324 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22325$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22326 X"$as_dir" : 'X\(//\)[^/]' \| \
22327 X"$as_dir" : 'X\(//\)$' \| \
22328 X"$as_dir" : 'X\(/\)' \| \
22329 . : '\(.\)' 2>/dev/null ||
22330echo X"$as_dir" |
22331 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22332 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22333 /^X\(\/\/\)$/{ s//\1/; q; }
22334 /^X\(\/\).*/{ s//\1/; q; }
22335 s/.*/./; q'`
22336 done
22337 test ! -n "$as_dirs" || mkdir $as_dirs
22338 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22339echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22340 { (exit 1); exit 1; }; }; }
22341
bec39cab 22342 rm -f $ac_file
b4e70030 22343 mv $tmp/config.h $ac_file
bec39cab
AC
22344 fi
22345 else
b4e70030
JB
22346 cat $tmp/config.h
22347 rm -f $tmp/config.h
bec39cab 22348 fi
e28b3332
DJ
22349# Compute $ac_file's index in $config_headers.
22350_am_stamp_count=1
22351for _am_header in $config_headers :; do
22352 case $_am_header in
22353 $ac_file | $ac_file:* )
22354 break ;;
22355 * )
22356 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
22357 esac
22358done
22359echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
22360$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22361 X$ac_file : 'X\(//\)[^/]' \| \
22362 X$ac_file : 'X\(//\)$' \| \
22363 X$ac_file : 'X\(/\)' \| \
22364 . : '\(.\)' 2>/dev/null ||
22365echo X$ac_file |
22366 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22367 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22368 /^X\(\/\/\)$/{ s//\1/; q; }
22369 /^X\(\/\).*/{ s//\1/; q; }
22370 s/.*/./; q'`/stamp-h$_am_stamp_count
b4e70030
JB
22371done
22372_ACEOF
22373cat >>$CONFIG_STATUS <<\_ACEOF
22374
22375#
22376# CONFIG_LINKS section.
22377#
22378
22379for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
22380 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22381 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c906108c 22382
b4e70030
JB
22383 { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
22384echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
c906108c
SS
22385
22386 if test ! -r $srcdir/$ac_source; then
bec39cab
AC
22387 { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
22388echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
22389 { (exit 1); exit 1; }; }
c906108c 22390 fi
b4e70030
JB
22391 rm -f $ac_dest
22392
22393 # Make relative symlinks.
22394 ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
22395$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22396 X"$ac_dest" : 'X\(//\)[^/]' \| \
22397 X"$ac_dest" : 'X\(//\)$' \| \
22398 X"$ac_dest" : 'X\(/\)' \| \
22399 . : '\(.\)' 2>/dev/null ||
22400echo X"$ac_dest" |
22401 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22402 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22403 /^X\(\/\/\)$/{ s//\1/; q; }
22404 /^X\(\/\).*/{ s//\1/; q; }
22405 s/.*/./; q'`
22406 { if $as_mkdir_p; then
22407 mkdir -p "$ac_dest_dir"
22408 else
22409 as_dir="$ac_dest_dir"
22410 as_dirs=
22411 while test ! -d "$as_dir"; do
22412 as_dirs="$as_dir $as_dirs"
22413 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22414$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22415 X"$as_dir" : 'X\(//\)[^/]' \| \
22416 X"$as_dir" : 'X\(//\)$' \| \
22417 X"$as_dir" : 'X\(/\)' \| \
22418 . : '\(.\)' 2>/dev/null ||
22419echo X"$as_dir" |
22420 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22421 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22422 /^X\(\/\/\)$/{ s//\1/; q; }
22423 /^X\(\/\).*/{ s//\1/; q; }
22424 s/.*/./; q'`
22425 done
22426 test ! -n "$as_dirs" || mkdir $as_dirs
22427 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
22428echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
22429 { (exit 1); exit 1; }; }; }
22430
22431 ac_builddir=.
22432
22433if test "$ac_dest_dir" != .; then
22434 ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
22435 # A "../" for each directory in $ac_dir_suffix.
22436 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22437else
22438 ac_dir_suffix= ac_top_builddir=
22439fi
22440
22441case $srcdir in
22442 .) # No --srcdir option. We are building in place.
22443 ac_srcdir=.
22444 if test -z "$ac_top_builddir"; then
22445 ac_top_srcdir=.
22446 else
22447 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22448 fi ;;
22449 [\\/]* | ?:[\\/]* ) # Absolute path.
22450 ac_srcdir=$srcdir$ac_dir_suffix;
22451 ac_top_srcdir=$srcdir ;;
22452 *) # Relative path.
22453 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22454 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22455esac
22456
22457# Do not use `cd foo && pwd` to compute absolute paths, because
22458# the directories may not exist.
22459case `pwd` in
22460.) ac_abs_builddir="$ac_dest_dir";;
22461*)
22462 case "$ac_dest_dir" in
22463 .) ac_abs_builddir=`pwd`;;
22464 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
22465 *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
22466 esac;;
22467esac
22468case $ac_abs_builddir in
22469.) ac_abs_top_builddir=${ac_top_builddir}.;;
22470*)
22471 case ${ac_top_builddir}. in
22472 .) ac_abs_top_builddir=$ac_abs_builddir;;
22473 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22474 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22475 esac;;
22476esac
22477case $ac_abs_builddir in
22478.) ac_abs_srcdir=$ac_srcdir;;
22479*)
22480 case $ac_srcdir in
22481 .) ac_abs_srcdir=$ac_abs_builddir;;
22482 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22483 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22484 esac;;
22485esac
22486case $ac_abs_builddir in
22487.) ac_abs_top_srcdir=$ac_top_srcdir;;
22488*)
22489 case $ac_top_srcdir in
22490 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22491 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22492 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22493 esac;;
22494esac
22495
bec39cab
AC
22496
22497 case $srcdir in
22498 [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
b4e70030 22499 *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
c906108c 22500 esac
b4e70030
JB
22501
22502 # Try a symlink, then a hard link, then a copy.
22503 ln -s $ac_rel_source $ac_dest 2>/dev/null ||
22504 ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
22505 cp -p $srcdir/$ac_source $ac_dest ||
22506 { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
22507echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
bec39cab 22508 { (exit 1); exit 1; }; }
b4e70030
JB
22509done
22510_ACEOF
22511cat >>$CONFIG_STATUS <<\_ACEOF
22512
22513#
22514# CONFIG_COMMANDS section.
22515#
22516for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22517 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22518 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22519 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
22520$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22521 X"$ac_dest" : 'X\(//\)[^/]' \| \
22522 X"$ac_dest" : 'X\(//\)$' \| \
22523 X"$ac_dest" : 'X\(/\)' \| \
22524 . : '\(.\)' 2>/dev/null ||
22525echo X"$ac_dest" |
22526 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22527 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22528 /^X\(\/\/\)$/{ s//\1/; q; }
22529 /^X\(\/\).*/{ s//\1/; q; }
22530 s/.*/./; q'`
22531 { if $as_mkdir_p; then
22532 mkdir -p "$ac_dir"
22533 else
22534 as_dir="$ac_dir"
22535 as_dirs=
22536 while test ! -d "$as_dir"; do
22537 as_dirs="$as_dir $as_dirs"
22538 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22539$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22540 X"$as_dir" : 'X\(//\)[^/]' \| \
22541 X"$as_dir" : 'X\(//\)$' \| \
22542 X"$as_dir" : 'X\(/\)' \| \
22543 . : '\(.\)' 2>/dev/null ||
22544echo X"$as_dir" |
22545 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22546 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22547 /^X\(\/\/\)$/{ s//\1/; q; }
22548 /^X\(\/\).*/{ s//\1/; q; }
22549 s/.*/./; q'`
22550 done
22551 test ! -n "$as_dirs" || mkdir $as_dirs
22552 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22553echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22554 { (exit 1); exit 1; }; }; }
22555
22556 ac_builddir=.
22557
22558if test "$ac_dir" != .; then
22559 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22560 # A "../" for each directory in $ac_dir_suffix.
22561 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22562else
22563 ac_dir_suffix= ac_top_builddir=
22564fi
22565
22566case $srcdir in
22567 .) # No --srcdir option. We are building in place.
22568 ac_srcdir=.
22569 if test -z "$ac_top_builddir"; then
22570 ac_top_srcdir=.
22571 else
22572 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22573 fi ;;
22574 [\\/]* | ?:[\\/]* ) # Absolute path.
22575 ac_srcdir=$srcdir$ac_dir_suffix;
22576 ac_top_srcdir=$srcdir ;;
22577 *) # Relative path.
22578 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22579 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22580esac
22581
22582# Do not use `cd foo && pwd` to compute absolute paths, because
22583# the directories may not exist.
22584case `pwd` in
22585.) ac_abs_builddir="$ac_dir";;
22586*)
22587 case "$ac_dir" in
22588 .) ac_abs_builddir=`pwd`;;
22589 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22590 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22591 esac;;
22592esac
22593case $ac_abs_builddir in
22594.) ac_abs_top_builddir=${ac_top_builddir}.;;
22595*)
22596 case ${ac_top_builddir}. in
22597 .) ac_abs_top_builddir=$ac_abs_builddir;;
22598 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22599 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22600 esac;;
22601esac
22602case $ac_abs_builddir in
22603.) ac_abs_srcdir=$ac_srcdir;;
22604*)
22605 case $ac_srcdir in
22606 .) ac_abs_srcdir=$ac_abs_builddir;;
22607 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22608 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22609 esac;;
22610esac
22611case $ac_abs_builddir in
22612.) ac_abs_top_srcdir=$ac_top_srcdir;;
22613*)
22614 case $ac_top_srcdir in
22615 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22616 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22617 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22618 esac;;
22619esac
bec39cab 22620
bec39cab 22621
b4e70030
JB
22622 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
22623echo "$as_me: executing $ac_dest commands" >&6;}
22624 case $ac_dest in
a417dc56 22625 depdir ) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
e28b3332
DJ
22626 depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
22627 # Strip MF so we end up with the name of the file.
22628 mf=`echo "$mf" | sed -e 's/:.*$//'`
22629 # Check whether this is an Automake generated Makefile or not.
22630 # We used to match only the files named `Makefile.in', but
22631 # some people rename them; so instead we look at the file content.
22632 # Grep'ing the first line is not enough: some people post-process
22633 # each Makefile.in and add a new line on top of each file to say so.
22634 # So let's grep whole file.
22635 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
22636 dirpart=`(dirname "$mf") 2>/dev/null ||
22637$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22638 X"$mf" : 'X\(//\)[^/]' \| \
22639 X"$mf" : 'X\(//\)$' \| \
22640 X"$mf" : 'X\(/\)' \| \
22641 . : '\(.\)' 2>/dev/null ||
22642echo X"$mf" |
22643 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22644 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22645 /^X\(\/\/\)$/{ s//\1/; q; }
22646 /^X\(\/\).*/{ s//\1/; q; }
22647 s/.*/./; q'`
22648 else
22649 continue
22650 fi
22651 # Extract the definition of DEPDIR, am__include, and am__quote
22652 # from the Makefile without running `make'.
22653 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
22654 test -z "$DEPDIR" && continue
22655 am__include=`sed -n 's/^am__include = //p' < "$mf"`
22656 test -z "am__include" && continue
22657 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
22658 # When using ansi2knr, U may be empty or an underscore; expand it
22659 U=`sed -n 's/^U = //p' < "$mf"`
22660 # Find all dependency output files, they are included files with
22661 # $(DEPDIR) in their names. We invoke sed twice because it is the
22662 # simplest approach to changing $(DEPDIR) to its actual value in the
22663 # expansion.
22664 for file in `sed -n "
22665 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
22666 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
22667 # Make sure the directory exists.
22668 test -f "$dirpart/$file" && continue
22669 fdir=`(dirname "$file") 2>/dev/null ||
22670$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22671 X"$file" : 'X\(//\)[^/]' \| \
22672 X"$file" : 'X\(//\)$' \| \
22673 X"$file" : 'X\(/\)' \| \
22674 . : '\(.\)' 2>/dev/null ||
22675echo X"$file" |
22676 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22677 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22678 /^X\(\/\/\)$/{ s//\1/; q; }
22679 /^X\(\/\).*/{ s//\1/; q; }
22680 s/.*/./; q'`
22681 { if $as_mkdir_p; then
22682 mkdir -p $dirpart/$fdir
22683 else
22684 as_dir=$dirpart/$fdir
22685 as_dirs=
22686 while test ! -d "$as_dir"; do
22687 as_dirs="$as_dir $as_dirs"
22688 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22689$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22690 X"$as_dir" : 'X\(//\)[^/]' \| \
22691 X"$as_dir" : 'X\(//\)$' \| \
22692 X"$as_dir" : 'X\(/\)' \| \
22693 . : '\(.\)' 2>/dev/null ||
22694echo X"$as_dir" |
22695 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22696 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22697 /^X\(\/\/\)$/{ s//\1/; q; }
22698 /^X\(\/\).*/{ s//\1/; q; }
22699 s/.*/./; q'`
22700 done
22701 test ! -n "$as_dirs" || mkdir $as_dirs
22702 fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
22703echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
22704 { (exit 1); exit 1; }; }; }
22705
22706 # echo "creating $dirpart/$file"
22707 echo '# dummy' > "$dirpart/$file"
22708 done
22709done
4e8d927d 22710 ;;
b4e70030 22711 default )
c906108c 22712
db985757 22713sed -e '/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
c906108c
SS
22714mv -f Makefile.tmp Makefile
22715
2acceee2 22716
c906108c
SS
22717case x$CONFIG_HEADERS in
22718xconfig.h:config.in)
22719echo > stamp-h ;;
22720esac
bec39cab
AC
22721 ;;
22722 esac
b4e70030
JB
22723done
22724_ACEOF
c906108c 22725
b4e70030 22726cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
22727
22728{ (exit 0); exit 0; }
22729_ACEOF
c906108c 22730chmod +x $CONFIG_STATUS
bec39cab
AC
22731ac_clean_files=$ac_clean_files_save
22732
22733
22734# configure is writing to config.log, and then calls config.status.
22735# config.status does its own redirection, appending to config.log.
22736# Unfortunately, on DOS this fails, as config.log is still kept open
22737# by configure, so config.status won't be able to write to it; its
22738# output is simply discarded. So we exec the FD to /dev/null,
22739# effectively closing config.log, so it can be properly (re)opened and
22740# appended to by config.status. When coming back to configure, we
22741# need to make the FD available again.
22742if test "$no_create" != yes; then
22743 ac_cs_success=:
22744 ac_config_status_args=
22745 test "$silent" = yes &&
22746 ac_config_status_args="$ac_config_status_args --quiet"
22747 exec 5>/dev/null
22748 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22749 exec 5>>config.log
22750 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22751 # would make configure fail if this is the last instruction.
22752 $ac_cs_success || { (exit 1); exit 1; }
22753fi
c906108c 22754
bec39cab 22755#
fdc59709 22756# CONFIG_SUBDIRS section, as fixed in confsubdir.m4.
bec39cab 22757#
c906108c
SS
22758if test "$no_recursion" != yes; then
22759
22760 # Remove --cache-file and --srcdir arguments so they do not pile up.
22761 ac_sub_configure_args=
22762 ac_prev=
fdc59709
PB
22763 eval "set x $ac_configure_args"
22764 shift
22765 for ac_arg
22766 do
c906108c
SS
22767 if test -n "$ac_prev"; then
22768 ac_prev=
22769 continue
22770 fi
bec39cab 22771 case $ac_arg in
c906108c
SS
22772 -cache-file | --cache-file | --cache-fil | --cache-fi \
22773 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
22774 ac_prev=cache_file ;;
22775 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
22776 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
22777 | --c=*)
22778 ;;
22779 --config-cache | -C)
c906108c
SS
22780 ;;
22781 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
22782 ac_prev=srcdir ;;
22783 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
22784 ;;
bec39cab
AC
22785 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
22786 ac_prev=prefix ;;
22787 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
22788 ;;
fdc59709
PB
22789 *)
22790 case $ac_arg in
22791 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
22792 esac
22793 ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
c906108c
SS
22794 esac
22795 done
22796
bec39cab
AC
22797 # Always prepend --prefix to ensure using the same prefix
22798 # in subdir configurations.
fdc59709
PB
22799 ac_arg="--prefix=$prefix"
22800 case $ac_arg in
22801 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
22802 esac
22803 ac_sub_configure_args="$ac_arg $ac_sub_configure_args"
bec39cab 22804
b4e70030 22805 ac_popdir=`pwd`
bec39cab 22806 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
22807
22808 # Do not complain, so a configure script can configure whichever
22809 # parts of a large source tree are present.
fdc59709 22810 test -d "$srcdir/$ac_dir" || continue
c906108c 22811
b4e70030
JB
22812 { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
22813echo "$as_me: configuring in $ac_dir" >&6;}
22814 { if $as_mkdir_p; then
22815 mkdir -p "$ac_dir"
22816 else
22817 as_dir="$ac_dir"
bec39cab 22818 as_dirs=
b4e70030
JB
22819 while test ! -d "$as_dir"; do
22820 as_dirs="$as_dir $as_dirs"
22821 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
22822$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22823 X"$as_dir" : 'X\(//\)[^/]' \| \
22824 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
22825 X"$as_dir" : 'X\(/\)' \| \
22826 . : '\(.\)' 2>/dev/null ||
bec39cab 22827echo X"$as_dir" |
b4e70030
JB
22828 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22829 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22830 /^X\(\/\/\)$/{ s//\1/; q; }
22831 /^X\(\/\).*/{ s//\1/; q; }
22832 s/.*/./; q'`
bec39cab 22833 done
b4e70030
JB
22834 test ! -n "$as_dirs" || mkdir $as_dirs
22835 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22836echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 22837 { (exit 1); exit 1; }; }; }
b4e70030 22838
bec39cab
AC
22839 ac_builddir=.
22840
b4e70030 22841if test "$ac_dir" != .; then
bec39cab 22842 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
22843 # A "../" for each directory in $ac_dir_suffix.
22844 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22845else
22846 ac_dir_suffix= ac_top_builddir=
22847fi
bec39cab
AC
22848
22849case $srcdir in
b4e70030 22850 .) # No --srcdir option. We are building in place.
bec39cab 22851 ac_srcdir=.
b4e70030
JB
22852 if test -z "$ac_top_builddir"; then
22853 ac_top_srcdir=.
22854 else
22855 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22856 fi ;;
22857 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 22858 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
22859 ac_top_srcdir=$srcdir ;;
22860 *) # Relative path.
22861 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22862 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22863esac
22864
22865# Do not use `cd foo && pwd` to compute absolute paths, because
22866# the directories may not exist.
22867case `pwd` in
22868.) ac_abs_builddir="$ac_dir";;
22869*)
22870 case "$ac_dir" in
22871 .) ac_abs_builddir=`pwd`;;
22872 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22873 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22874 esac;;
22875esac
22876case $ac_abs_builddir in
22877.) ac_abs_top_builddir=${ac_top_builddir}.;;
22878*)
22879 case ${ac_top_builddir}. in
22880 .) ac_abs_top_builddir=$ac_abs_builddir;;
22881 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22882 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22883 esac;;
22884esac
22885case $ac_abs_builddir in
22886.) ac_abs_srcdir=$ac_srcdir;;
22887*)
22888 case $ac_srcdir in
22889 .) ac_abs_srcdir=$ac_abs_builddir;;
22890 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22891 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22892 esac;;
22893esac
22894case $ac_abs_builddir in
22895.) ac_abs_top_srcdir=$ac_top_srcdir;;
22896*)
22897 case $ac_top_srcdir in
22898 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22899 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22900 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22901 esac;;
bec39cab 22902esac
c906108c 22903
c906108c 22904
fdc59709 22905 cd "$ac_dir"
c906108c
SS
22906
22907 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
22908 if test -f "$ac_srcdir/configure.gnu"; then
22909 ac_sub_configure=$ac_srcdir/configure.gnu
22910 elif test -f "$ac_srcdir/configure"; then
22911 ac_sub_configure=$ac_srcdir/configure
22912 elif test -f "$ac_srcdir/configure.in"; then
22913 # This should be Cygnus configure.
22914 ac_sub_configure=$ac_aux_dir/configure
c906108c 22915 else
bec39cab
AC
22916 { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
22917echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
22918 ac_sub_configure=
22919 fi
22920
22921 # The recursion is here.
22922 if test -n "$ac_sub_configure"; then
c906108c 22923 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
22924 case $cache_file in
22925 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
b4e70030
JB
22926 *) # Relative path.
22927 ac_sub_cache_file=$ac_top_builddir$cache_file ;;
c906108c 22928 esac
c906108c 22929
fdc59709
PB
22930 { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
22931echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 22932 # The eval makes quoting arguments work.
fdc59709
PB
22933 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
22934 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
bec39cab
AC
22935 { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
22936echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
22937 { (exit 1); exit 1; }; }
c906108c
SS
22938 fi
22939
fdc59709 22940 cd "$ac_popdir"
c906108c
SS
22941 done
22942fi
22943
22944
22945exit 0
This page took 2.057526 seconds and 4 git commands to generate.