include/elf/
[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.
16e7150e 898 --with-system-gdbinit=file Automatically load a system-wide gdbinit file
5062cc19
KS
899 --with-tcl directory containing tcl configuration (tclConfig.sh)
900 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab
AC
901 --with-x use the X Window System
902 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
903
904Some influential environment variables:
905 CC C compiler command
906 CFLAGS C compiler flags
907 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
908 nonstandard directory <lib dir>
b4e70030
JB
909 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
910 headers in a nonstandard directory <include dir>
bec39cab
AC
911 CPP C preprocessor
912
913Use these variables to override the choices made by `configure' or to help
914it to find libraries and programs with nonstandard names/locations.
915
916_ACEOF
917fi
918
919if test "$ac_init_help" = "recursive"; then
920 # If there are subdirs, report their specific --help.
b4e70030 921 ac_popdir=`pwd`
bec39cab
AC
922 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
923 test -d $ac_dir || continue
924 ac_builddir=.
925
b4e70030 926if test "$ac_dir" != .; then
bec39cab 927 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
928 # A "../" for each directory in $ac_dir_suffix.
929 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
930else
931 ac_dir_suffix= ac_top_builddir=
932fi
bec39cab
AC
933
934case $srcdir in
b4e70030 935 .) # No --srcdir option. We are building in place.
bec39cab 936 ac_srcdir=.
b4e70030
JB
937 if test -z "$ac_top_builddir"; then
938 ac_top_srcdir=.
939 else
940 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
941 fi ;;
942 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 943 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
944 ac_top_srcdir=$srcdir ;;
945 *) # Relative path.
946 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
947 ac_top_srcdir=$ac_top_builddir$srcdir ;;
948esac
949
950# Do not use `cd foo && pwd` to compute absolute paths, because
951# the directories may not exist.
952case `pwd` in
953.) ac_abs_builddir="$ac_dir";;
954*)
955 case "$ac_dir" in
956 .) ac_abs_builddir=`pwd`;;
957 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
958 *) ac_abs_builddir=`pwd`/"$ac_dir";;
959 esac;;
960esac
961case $ac_abs_builddir in
962.) ac_abs_top_builddir=${ac_top_builddir}.;;
963*)
964 case ${ac_top_builddir}. in
965 .) ac_abs_top_builddir=$ac_abs_builddir;;
966 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
967 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
968 esac;;
969esac
970case $ac_abs_builddir in
971.) ac_abs_srcdir=$ac_srcdir;;
972*)
973 case $ac_srcdir in
974 .) ac_abs_srcdir=$ac_abs_builddir;;
975 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
976 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
977 esac;;
978esac
979case $ac_abs_builddir in
980.) ac_abs_top_srcdir=$ac_top_srcdir;;
981*)
982 case $ac_top_srcdir in
983 .) ac_abs_top_srcdir=$ac_abs_builddir;;
984 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
985 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
986 esac;;
bec39cab
AC
987esac
988
b4e70030
JB
989 cd $ac_dir
990 # Check for guested configure; otherwise get Cygnus style configure.
bec39cab 991 if test -f $ac_srcdir/configure.gnu; then
b4e70030 992 echo
bec39cab
AC
993 $SHELL $ac_srcdir/configure.gnu --help=recursive
994 elif test -f $ac_srcdir/configure; then
b4e70030 995 echo
bec39cab 996 $SHELL $ac_srcdir/configure --help=recursive
b4e70030
JB
997 elif test -f $ac_srcdir/configure.ac ||
998 test -f $ac_srcdir/configure.in; then
999 echo
1000 $ac_configure --help
3ace7edb 1001 else
bec39cab 1002 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b4e70030
JB
1003 fi
1004 cd $ac_popdir
bec39cab
AC
1005 done
1006fi
1007
b4e70030 1008test -n "$ac_init_help" && exit 0
bec39cab
AC
1009if $ac_init_version; then
1010 cat <<\_ACEOF
1011
b4e70030 1012Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
1013This configure script is free software; the Free Software Foundation
1014gives unlimited permission to copy, distribute and modify it.
1015_ACEOF
b4e70030 1016 exit 0
bec39cab 1017fi
b4e70030
JB
1018exec 5>config.log
1019cat >&5 <<_ACEOF
bec39cab
AC
1020This file contains any messages produced by compilers while
1021running configure, to aid debugging if configure makes a mistake.
1022
1023It was created by $as_me, which was
b4e70030 1024generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
1025
1026 $ $0 $@
1027
1028_ACEOF
1029{
1030cat <<_ASUNAME
1031## --------- ##
1032## Platform. ##
1033## --------- ##
1034
1035hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1036uname -m = `(uname -m) 2>/dev/null || echo unknown`
1037uname -r = `(uname -r) 2>/dev/null || echo unknown`
1038uname -s = `(uname -s) 2>/dev/null || echo unknown`
1039uname -v = `(uname -v) 2>/dev/null || echo unknown`
1040
1041/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1042/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1043
1044/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1045/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1046/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b4e70030 1047hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
bec39cab
AC
1048/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1049/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1050/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1051
1052_ASUNAME
1053
1054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1055for as_dir in $PATH
1056do
1057 IFS=$as_save_IFS
1058 test -z "$as_dir" && as_dir=.
1059 echo "PATH: $as_dir"
1060done
1061
1062} >&5
1063
1064cat >&5 <<_ACEOF
1065
1066
1067## ----------- ##
1068## Core tests. ##
1069## ----------- ##
1070
1071_ACEOF
1072
1073
1074# Keep a trace of the command line.
1075# Strip out --no-create and --no-recursion so they do not pile up.
1076# Strip out --silent because we don't want to record it for future runs.
1077# Also quote any args containing shell meta-characters.
1078# Make two passes to allow for proper duplicate-argument suppression.
1079ac_configure_args=
1080ac_configure_args0=
1081ac_configure_args1=
1082ac_sep=
1083ac_must_keep_next=false
1084for ac_pass in 1 2
1085do
1086 for ac_arg
1087 do
1088 case $ac_arg in
1089 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1090 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1091 | -silent | --silent | --silen | --sile | --sil)
1092 continue ;;
b4e70030 1093 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
bec39cab
AC
1094 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1095 esac
1096 case $ac_pass in
1097 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1098 2)
1099 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1100 if test $ac_must_keep_next = true; then
1101 ac_must_keep_next=false # Got value, back to normal.
1102 else
1103 case $ac_arg in
1104 *=* | --config-cache | -C | -disable-* | --disable-* \
1105 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1106 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1107 | -with-* | --with-* | -without-* | --without-* | --x)
1108 case "$ac_configure_args0 " in
1109 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1110 esac
1111 ;;
1112 -* ) ac_must_keep_next=true ;;
1113 esac
1114 fi
1115 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1116 # Get rid of the leading space.
1117 ac_sep=" "
1118 ;;
1119 esac
1120 done
1121done
1122$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1123$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1124
1125# When interrupted or exit'd, cleanup temporary files, and complete
1126# config.log. We remove comments because anyway the quotes in there
1127# would cause problems or look ugly.
b4e70030
JB
1128# WARNING: Be sure not to use single quotes in there, as some shells,
1129# such as our DU 5.0 friend, will then `close' the trap.
bec39cab
AC
1130trap 'exit_status=$?
1131 # Save into config.log some information that might help in debugging.
1132 {
1133 echo
1134
1135 cat <<\_ASBOX
1136## ---------------- ##
1137## Cache variables. ##
1138## ---------------- ##
1139_ASBOX
1140 echo
1141 # The following way of writing the cache mishandles newlines in values,
b4e70030 1142{
bec39cab 1143 (set) 2>&1 |
b4e70030
JB
1144 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1145 *ac_space=\ *)
bec39cab 1146 sed -n \
b4e70030
JB
1147 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1148 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1149 ;;
bec39cab 1150 *)
b4e70030
JB
1151 sed -n \
1152 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 1153 ;;
b4e70030
JB
1154 esac;
1155}
bec39cab
AC
1156 echo
1157
1158 cat <<\_ASBOX
1159## ----------------- ##
1160## Output variables. ##
1161## ----------------- ##
1162_ASBOX
1163 echo
1164 for ac_var in $ac_subst_vars
1165 do
b4e70030
JB
1166 eval ac_val=$`echo $ac_var`
1167 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1168 done | sort
1169 echo
1170
1171 if test -n "$ac_subst_files"; then
1172 cat <<\_ASBOX
b4e70030
JB
1173## ------------- ##
1174## Output files. ##
1175## ------------- ##
bec39cab
AC
1176_ASBOX
1177 echo
1178 for ac_var in $ac_subst_files
1179 do
b4e70030
JB
1180 eval ac_val=$`echo $ac_var`
1181 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1182 done | sort
1183 echo
1184 fi
1185
1186 if test -s confdefs.h; then
1187 cat <<\_ASBOX
1188## ----------- ##
1189## confdefs.h. ##
1190## ----------- ##
1191_ASBOX
1192 echo
b4e70030 1193 sed "/^$/d" confdefs.h | sort
bec39cab 1194 echo
3ace7edb 1195 fi
bec39cab
AC
1196 test "$ac_signal" != 0 &&
1197 echo "$as_me: caught signal $ac_signal"
1198 echo "$as_me: exit $exit_status"
1199 } >&5
b4e70030
JB
1200 rm -f core *.core &&
1201 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
bec39cab 1202 exit $exit_status
b4e70030 1203 ' 0
bec39cab
AC
1204for ac_signal in 1 2 13 15; do
1205 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1206done
1207ac_signal=0
1208
1209# confdefs.h avoids OS command line length limits that DEFS can exceed.
b4e70030
JB
1210rm -rf conftest* confdefs.h
1211# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1212echo >confdefs.h
bec39cab
AC
1213
1214# Predefined preprocessor variables.
1215
1216cat >>confdefs.h <<_ACEOF
1217#define PACKAGE_NAME "$PACKAGE_NAME"
1218_ACEOF
1219
1220
1221cat >>confdefs.h <<_ACEOF
1222#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1223_ACEOF
1224
1225
1226cat >>confdefs.h <<_ACEOF
1227#define PACKAGE_VERSION "$PACKAGE_VERSION"
1228_ACEOF
1229
1230
1231cat >>confdefs.h <<_ACEOF
1232#define PACKAGE_STRING "$PACKAGE_STRING"
1233_ACEOF
1234
1235
1236cat >>confdefs.h <<_ACEOF
1237#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1238_ACEOF
1239
1240
1241# Let the site file select an alternate cache file if it wants to.
1242# Prefer explicitly selected file to automatically selected ones.
b4e70030
JB
1243if test -z "$CONFIG_SITE"; then
1244 if test "x$prefix" != xNONE; then
1245 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1246 else
1247 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1248 fi
c906108c 1249fi
b4e70030 1250for ac_site_file in $CONFIG_SITE; do
c906108c 1251 if test -r "$ac_site_file"; then
bec39cab
AC
1252 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1253echo "$as_me: loading site script $ac_site_file" >&6;}
1254 sed 's/^/| /' "$ac_site_file" >&5
c906108c
SS
1255 . "$ac_site_file"
1256 fi
1257done
1258
1259if test -r "$cache_file"; then
bec39cab
AC
1260 # Some versions of bash will fail to source /dev/null (special
1261 # files actually), so we avoid doing that.
1262 if test -f "$cache_file"; then
1263 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1264echo "$as_me: loading cache $cache_file" >&6;}
1265 case $cache_file in
1266 [\\/]* | ?:[\\/]* ) . $cache_file;;
1267 *) . ./$cache_file;;
1268 esac
1269 fi
c906108c 1270else
bec39cab
AC
1271 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1272echo "$as_me: creating cache $cache_file" >&6;}
1273 >$cache_file
1274fi
1275
1276# Check that the precious variables saved in the cache have kept the same
1277# value.
1278ac_cache_corrupted=false
b4e70030
JB
1279for ac_var in `(set) 2>&1 |
1280 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
bec39cab
AC
1281 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1282 eval ac_new_set=\$ac_env_${ac_var}_set
b4e70030
JB
1283 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1284 eval ac_new_val="\$ac_env_${ac_var}_value"
bec39cab
AC
1285 case $ac_old_set,$ac_new_set in
1286 set,)
1287 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1288echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1289 ac_cache_corrupted=: ;;
1290 ,set)
1291 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1292echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1293 ac_cache_corrupted=: ;;
1294 ,);;
1295 *)
1296 if test "x$ac_old_val" != "x$ac_new_val"; then
fdc59709
PB
1297 # differences in whitespace do not lead to failure.
1298 ac_old_val_w=`echo x $ac_old_val`
1299 ac_new_val_w=`echo x $ac_new_val`
1300 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1301 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
bec39cab 1302echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
fdc59709
PB
1303 ac_cache_corrupted=:
1304 else
1305 { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1306echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1307 eval $ac_var=\$ac_old_val
1308 fi
1309 { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1310echo "$as_me: former value: \`$ac_old_val'" >&2;}
1311 { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1312echo "$as_me: current value: \`$ac_new_val'" >&2;}
bec39cab
AC
1313 fi;;
1314 esac
1315 # Pass precious variables to config.status.
1316 if test "$ac_new_set" = set; then
1317 case $ac_new_val in
b4e70030
JB
1318 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1319 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
1320 *) ac_arg=$ac_var=$ac_new_val ;;
1321 esac
1322 case " $ac_configure_args " in
1323 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1324 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1325 esac
1326 fi
1327done
1328if $ac_cache_corrupted; then
d5af19ba
DJ
1329 { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1330echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1331 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1332echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1333 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1334echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1335 { (exit 1); exit 1; }; }
c906108c
SS
1336fi
1337
b4e70030
JB
1338ac_ext=c
1339ac_cpp='$CPP $CPPFLAGS'
1340ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1341ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1342ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c
SS
1343
1344
783e057b
DJ
1345gl_header_list="$gl_header_list stdint.h"
1346gl_header_list="$gl_header_list wchar.h"
1347gl_header_list="$gl_header_list string.h"
bec39cab
AC
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
bec39cab 1364
d5af19ba
DJ
1365
1366
1367
b4e70030
JB
1368 ac_config_headers="$ac_config_headers config.h:config.in"
1369
1370echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1371echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
1372 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
413ccac7 1373if test "${enable_maintainer_mode+set}" = set; then
b4e70030
JB
1374 enableval="$enable_maintainer_mode"
1375 USE_MAINTAINER_MODE=$enableval
413ccac7
AC
1376else
1377 USE_MAINTAINER_MODE=no
b4e70030
JB
1378fi;
1379 echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
1380echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
413ccac7 1381
413ccac7
AC
1382
1383if test $USE_MAINTAINER_MODE = yes; then
1384 MAINTAINER_MODE_TRUE=
1385 MAINTAINER_MODE_FALSE='#'
1386else
1387 MAINTAINER_MODE_TRUE='#'
1388 MAINTAINER_MODE_FALSE=
1389fi
85981d60 1390
413ccac7 1391 MAINT=$MAINTAINER_MODE_TRUE
413ccac7 1392
c906108c 1393
bec39cab
AC
1394
1395ac_ext=c
1396ac_cpp='$CPP $CPPFLAGS'
1397ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1398ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1399ac_compiler_gnu=$ac_cv_c_compiler_gnu
1400if test -n "$ac_tool_prefix"; then
1401 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1402set dummy ${ac_tool_prefix}gcc; ac_word=$2
b4e70030
JB
1403echo "$as_me:$LINENO: checking for $ac_word" >&5
1404echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1405if test "${ac_cv_prog_CC+set}" = set; then
1406 echo $ECHO_N "(cached) $ECHO_C" >&6
1407else
1408 if test -n "$CC"; then
1409 ac_cv_prog_CC="$CC" # Let the user override the test.
1410else
1411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1412for as_dir in $PATH
1413do
1414 IFS=$as_save_IFS
1415 test -z "$as_dir" && as_dir=.
1416 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1417 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1418 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1419 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1420 break 2
1421 fi
1422done
1423done
1424
1425fi
1426fi
1427CC=$ac_cv_prog_CC
1428if test -n "$CC"; then
b4e70030
JB
1429 echo "$as_me:$LINENO: result: $CC" >&5
1430echo "${ECHO_T}$CC" >&6
bec39cab 1431else
b4e70030
JB
1432 echo "$as_me:$LINENO: result: no" >&5
1433echo "${ECHO_T}no" >&6
bec39cab
AC
1434fi
1435
1436fi
1437if test -z "$ac_cv_prog_CC"; then
1438 ac_ct_CC=$CC
1439 # Extract the first word of "gcc", so it can be a program name with args.
c906108c 1440set dummy gcc; ac_word=$2
b4e70030
JB
1441echo "$as_me:$LINENO: checking for $ac_word" >&5
1442echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1443if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1444 echo $ECHO_N "(cached) $ECHO_C" >&6
1445else
1446 if test -n "$ac_ct_CC"; then
1447 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1448else
1449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1450for as_dir in $PATH
1451do
1452 IFS=$as_save_IFS
1453 test -z "$as_dir" && as_dir=.
1454 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1455 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1456 ac_cv_prog_ac_ct_CC="gcc"
1457 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1458 break 2
1459 fi
1460done
1461done
1462
1463fi
1464fi
1465ac_ct_CC=$ac_cv_prog_ac_ct_CC
1466if test -n "$ac_ct_CC"; then
b4e70030
JB
1467 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1468echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1469else
b4e70030
JB
1470 echo "$as_me:$LINENO: result: no" >&5
1471echo "${ECHO_T}no" >&6
bec39cab
AC
1472fi
1473
b4e70030 1474 CC=$ac_ct_CC
bec39cab
AC
1475else
1476 CC="$ac_cv_prog_CC"
1477fi
1478
1479if test -z "$CC"; then
b4e70030
JB
1480 if test -n "$ac_tool_prefix"; then
1481 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
bec39cab 1482set dummy ${ac_tool_prefix}cc; ac_word=$2
b4e70030
JB
1483echo "$as_me:$LINENO: checking for $ac_word" >&5
1484echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1485if test "${ac_cv_prog_CC+set}" = set; then
1486 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1487else
1488 if test -n "$CC"; then
1489 ac_cv_prog_CC="$CC" # Let the user override the test.
1490else
bec39cab
AC
1491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1492for as_dir in $PATH
1493do
1494 IFS=$as_save_IFS
1495 test -z "$as_dir" && as_dir=.
1496 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1497 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1498 ac_cv_prog_CC="${ac_tool_prefix}cc"
1499 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1500 break 2
1501 fi
1502done
1503done
1504
c906108c
SS
1505fi
1506fi
bec39cab 1507CC=$ac_cv_prog_CC
c906108c 1508if test -n "$CC"; then
b4e70030
JB
1509 echo "$as_me:$LINENO: result: $CC" >&5
1510echo "${ECHO_T}$CC" >&6
c906108c 1511else
b4e70030
JB
1512 echo "$as_me:$LINENO: result: no" >&5
1513echo "${ECHO_T}no" >&6
c906108c
SS
1514fi
1515
b4e70030
JB
1516fi
1517if test -z "$ac_cv_prog_CC"; then
1518 ac_ct_CC=$CC
1519 # Extract the first word of "cc", so it can be a program name with args.
1520set dummy cc; ac_word=$2
1521echo "$as_me:$LINENO: checking for $ac_word" >&5
1522echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1523if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1524 echo $ECHO_N "(cached) $ECHO_C" >&6
1525else
1526 if test -n "$ac_ct_CC"; then
1527 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1528else
1529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1530for as_dir in $PATH
1531do
1532 IFS=$as_save_IFS
1533 test -z "$as_dir" && as_dir=.
1534 for ac_exec_ext in '' $ac_executable_extensions; do
1535 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1536 ac_cv_prog_ac_ct_CC="cc"
1537 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1538 break 2
4e8d927d 1539 fi
b4e70030
JB
1540done
1541done
1542
1543fi
1544fi
1545ac_ct_CC=$ac_cv_prog_ac_ct_CC
1546if test -n "$ac_ct_CC"; then
1547 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1548echo "${ECHO_T}$ac_ct_CC" >&6
1549else
1550 echo "$as_me:$LINENO: result: no" >&5
1551echo "${ECHO_T}no" >&6
1552fi
1553
1554 CC=$ac_ct_CC
1555else
1556 CC="$ac_cv_prog_CC"
1557fi
1558
bec39cab 1559fi
c906108c
SS
1560if test -z "$CC"; then
1561 # Extract the first word of "cc", so it can be a program name with args.
1562set dummy cc; ac_word=$2
b4e70030
JB
1563echo "$as_me:$LINENO: checking for $ac_word" >&5
1564echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1565if test "${ac_cv_prog_CC+set}" = set; then
1566 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1567else
1568 if test -n "$CC"; then
1569 ac_cv_prog_CC="$CC" # Let the user override the test.
1570else
c906108c 1571 ac_prog_rejected=no
bec39cab
AC
1572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1573for as_dir in $PATH
1574do
1575 IFS=$as_save_IFS
1576 test -z "$as_dir" && as_dir=.
1577 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1578 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1579 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1580 ac_prog_rejected=yes
1581 continue
1582 fi
1583 ac_cv_prog_CC="cc"
1584 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1585 break 2
1586 fi
1587done
1588done
1589
c906108c
SS
1590if test $ac_prog_rejected = yes; then
1591 # We found a bogon in the path, so make sure we never use it.
1592 set dummy $ac_cv_prog_CC
1593 shift
bec39cab 1594 if test $# != 0; then
c906108c
SS
1595 # We chose a different compiler from the bogus one.
1596 # However, it has the same basename, so the bogon will be chosen
1597 # first if we set CC to just the basename; use the full file name.
1598 shift
bec39cab 1599 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
1600 fi
1601fi
1602fi
1603fi
bec39cab 1604CC=$ac_cv_prog_CC
c906108c 1605if test -n "$CC"; then
b4e70030
JB
1606 echo "$as_me:$LINENO: result: $CC" >&5
1607echo "${ECHO_T}$CC" >&6
c906108c 1608else
b4e70030
JB
1609 echo "$as_me:$LINENO: result: no" >&5
1610echo "${ECHO_T}no" >&6
c906108c
SS
1611fi
1612
bec39cab
AC
1613fi
1614if test -z "$CC"; then
1615 if test -n "$ac_tool_prefix"; then
b4e70030 1616 for ac_prog in cl
bec39cab
AC
1617 do
1618 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1619set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b4e70030
JB
1620echo "$as_me:$LINENO: checking for $ac_word" >&5
1621echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1622if test "${ac_cv_prog_CC+set}" = set; then
1623 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1624else
1625 if test -n "$CC"; then
1626 ac_cv_prog_CC="$CC" # Let the user override the test.
1627else
bec39cab
AC
1628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1629for as_dir in $PATH
1630do
1631 IFS=$as_save_IFS
1632 test -z "$as_dir" && as_dir=.
1633 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1634 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1635 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1636 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1637 break 2
1638 fi
1639done
1640done
1641
c906108c
SS
1642fi
1643fi
bec39cab 1644CC=$ac_cv_prog_CC
c906108c 1645if test -n "$CC"; then
b4e70030
JB
1646 echo "$as_me:$LINENO: result: $CC" >&5
1647echo "${ECHO_T}$CC" >&6
c906108c 1648else
b4e70030
JB
1649 echo "$as_me:$LINENO: result: no" >&5
1650echo "${ECHO_T}no" >&6
c906108c 1651fi
bec39cab
AC
1652
1653 test -n "$CC" && break
1654 done
1655fi
1656if test -z "$CC"; then
1657 ac_ct_CC=$CC
b4e70030 1658 for ac_prog in cl
bec39cab
AC
1659do
1660 # Extract the first word of "$ac_prog", so it can be a program name with args.
1661set dummy $ac_prog; ac_word=$2
b4e70030
JB
1662echo "$as_me:$LINENO: checking for $ac_word" >&5
1663echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1664if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1665 echo $ECHO_N "(cached) $ECHO_C" >&6
1666else
1667 if test -n "$ac_ct_CC"; then
1668 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1669else
1670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1671for as_dir in $PATH
1672do
1673 IFS=$as_save_IFS
1674 test -z "$as_dir" && as_dir=.
1675 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1676 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1677 ac_cv_prog_ac_ct_CC="$ac_prog"
1678 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1679 break 2
c906108c 1680 fi
bec39cab
AC
1681done
1682done
1683
1684fi
1685fi
1686ac_ct_CC=$ac_cv_prog_ac_ct_CC
1687if test -n "$ac_ct_CC"; then
b4e70030
JB
1688 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1689echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1690else
b4e70030
JB
1691 echo "$as_me:$LINENO: result: no" >&5
1692echo "${ECHO_T}no" >&6
c906108c
SS
1693fi
1694
bec39cab
AC
1695 test -n "$ac_ct_CC" && break
1696done
c906108c 1697
b4e70030 1698 CC=$ac_ct_CC
bec39cab
AC
1699fi
1700
1701fi
1702
1703
d5af19ba
DJ
1704test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1705echo "$as_me: error: in \`$ac_pwd':" >&2;}
1706{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
bec39cab
AC
1707See \`config.log' for more details." >&5
1708echo "$as_me: error: no acceptable C compiler found in \$PATH
1709See \`config.log' for more details." >&2;}
d5af19ba 1710 { (exit 1); exit 1; }; }; }
bec39cab
AC
1711
1712# Provide some information about the compiler.
b4e70030
JB
1713echo "$as_me:$LINENO:" \
1714 "checking for C compiler version" >&5
bec39cab 1715ac_compiler=`set X $ac_compile; echo $2`
b4e70030
JB
1716{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1717 (eval $ac_compiler --version </dev/null >&5) 2>&5
bec39cab
AC
1718 ac_status=$?
1719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1720 (exit $ac_status); }
b4e70030
JB
1721{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1722 (eval $ac_compiler -v </dev/null >&5) 2>&5
bec39cab
AC
1723 ac_status=$?
1724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1725 (exit $ac_status); }
b4e70030
JB
1726{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1727 (eval $ac_compiler -V </dev/null >&5) 2>&5
bec39cab
AC
1728 ac_status=$?
1729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1730 (exit $ac_status); }
1731
1732cat >conftest.$ac_ext <<_ACEOF
1733/* confdefs.h. */
1734_ACEOF
1735cat confdefs.h >>conftest.$ac_ext
1736cat >>conftest.$ac_ext <<_ACEOF
1737/* end confdefs.h. */
1738
1739int
1740main ()
1741{
1742
1743 ;
1744 return 0;
1745}
1746_ACEOF
1747ac_clean_files_save=$ac_clean_files
b4e70030 1748ac_clean_files="$ac_clean_files a.out a.exe b.out"
bec39cab
AC
1749# Try to create an executable without -o first, disregard a.out.
1750# It will help us diagnose broken compilers, and finding out an intuition
1751# of exeext.
b4e70030
JB
1752echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1753echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
bec39cab
AC
1754ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1755if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1756 (eval $ac_link_default) 2>&5
1757 ac_status=$?
1758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1759 (exit $ac_status); }; then
b4e70030
JB
1760 # Find the output, starting from the most likely. This scheme is
1761# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1762# resort.
1763
1764# Be careful to initialize this variable, since it used to be cached.
1765# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1766ac_cv_exeext=
1767# b.out is created by i960 compilers.
1768for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
bec39cab
AC
1769do
1770 test -f "$ac_file" || continue
1771 case $ac_file in
b4e70030
JB
1772 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1773 ;;
1774 conftest.$ac_ext )
1775 # This is the source file.
1776 ;;
1777 [ab].out )
1778 # We found the default executable, but exeext='' is most
1779 # certainly right.
1780 break;;
1781 *.* )
1782 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1783 # FIXME: I believe we export ac_cv_exeext for Libtool,
1784 # but it would be cool to find out if it's true. Does anybody
1785 # maintain Libtool? --akim.
1786 export ac_cv_exeext
1787 break;;
1788 * )
1789 break;;
bec39cab
AC
1790 esac
1791done
1792else
1793 echo "$as_me: failed program was:" >&5
1794sed 's/^/| /' conftest.$ac_ext >&5
1795
d5af19ba
DJ
1796{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1797echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1798{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1799See \`config.log' for more details." >&5
1800echo "$as_me: error: C compiler cannot create executables
1801See \`config.log' for more details." >&2;}
d5af19ba 1802 { (exit 77); exit 77; }; }; }
bec39cab
AC
1803fi
1804
b4e70030
JB
1805ac_exeext=$ac_cv_exeext
1806echo "$as_me:$LINENO: result: $ac_file" >&5
1807echo "${ECHO_T}$ac_file" >&6
1808
1809# Check the compiler produces executables we can run. If not, either
bec39cab 1810# the compiler is broken, or we cross compile.
b4e70030
JB
1811echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1812echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
bec39cab
AC
1813# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1814# If not cross compiling, check that we can run a simple program.
1815if test "$cross_compiling" != yes; then
1816 if { ac_try='./$ac_file'
1817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1818 (eval $ac_try) 2>&5
1819 ac_status=$?
1820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1821 (exit $ac_status); }; }; then
1822 cross_compiling=no
c906108c 1823 else
bec39cab
AC
1824 if test "$cross_compiling" = maybe; then
1825 cross_compiling=yes
1826 else
d5af19ba
DJ
1827 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1828echo "$as_me: error: in \`$ac_pwd':" >&2;}
1829{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
bec39cab
AC
1830If you meant to cross compile, use \`--host'.
1831See \`config.log' for more details." >&5
1832echo "$as_me: error: cannot run C compiled programs.
1833If you meant to cross compile, use \`--host'.
1834See \`config.log' for more details." >&2;}
d5af19ba 1835 { (exit 1); exit 1; }; }; }
bec39cab 1836 fi
c906108c 1837 fi
bec39cab 1838fi
b4e70030
JB
1839echo "$as_me:$LINENO: result: yes" >&5
1840echo "${ECHO_T}yes" >&6
bec39cab 1841
b4e70030
JB
1842rm -f a.out a.exe conftest$ac_cv_exeext b.out
1843ac_clean_files=$ac_clean_files_save
1844# Check the compiler produces executables we can run. If not, either
1845# the compiler is broken, or we cross compile.
1846echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1847echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1848echo "$as_me:$LINENO: result: $cross_compiling" >&5
1849echo "${ECHO_T}$cross_compiling" >&6
4e8d927d 1850
b4e70030
JB
1851echo "$as_me:$LINENO: checking for suffix of executables" >&5
1852echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1853if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
bec39cab
AC
1854 (eval $ac_link) 2>&5
1855 ac_status=$?
1856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1857 (exit $ac_status); }; then
b4e70030
JB
1858 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1859# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1860# work properly (i.e., refer to `conftest.exe'), while it won't with
1861# `rm'.
1862for ac_file in conftest.exe conftest conftest.*; do
1863 test -f "$ac_file" || continue
1864 case $ac_file in
1865 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1866 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1867 export ac_cv_exeext
1868 break;;
1869 * ) break;;
1870 esac
1871done
c906108c 1872else
d5af19ba
DJ
1873 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1874echo "$as_me: error: in \`$ac_pwd':" >&2;}
1875{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
bec39cab
AC
1876See \`config.log' for more details." >&5
1877echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1878See \`config.log' for more details." >&2;}
d5af19ba 1879 { (exit 1); exit 1; }; }; }
c906108c 1880fi
c906108c 1881
b4e70030
JB
1882rm -f conftest$ac_cv_exeext
1883echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1884echo "${ECHO_T}$ac_cv_exeext" >&6
c906108c 1885
b4e70030 1886rm -f conftest.$ac_ext
bec39cab
AC
1887EXEEXT=$ac_cv_exeext
1888ac_exeext=$EXEEXT
b4e70030
JB
1889echo "$as_me:$LINENO: checking for suffix of object files" >&5
1890echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
bec39cab
AC
1891if test "${ac_cv_objext+set}" = set; then
1892 echo $ECHO_N "(cached) $ECHO_C" >&6
1893else
b4e70030
JB
1894 cat >conftest.$ac_ext <<_ACEOF
1895/* confdefs.h. */
1896_ACEOF
1897cat confdefs.h >>conftest.$ac_ext
1898cat >>conftest.$ac_ext <<_ACEOF
1899/* end confdefs.h. */
1900
1901int
1902main ()
1903{
1904
1905 ;
1906 return 0;
1907}
1908_ACEOF
1909rm -f conftest.o conftest.obj
bec39cab
AC
1910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1911 (eval $ac_compile) 2>&5
1912 ac_status=$?
1913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1914 (exit $ac_status); }; then
b4e70030 1915 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
bec39cab 1916 case $ac_file in
b4e70030 1917 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
bec39cab
AC
1918 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1919 break;;
1920 esac
1921done
c906108c 1922else
bec39cab
AC
1923 echo "$as_me: failed program was:" >&5
1924sed 's/^/| /' conftest.$ac_ext >&5
1925
d5af19ba
DJ
1926{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1927echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1928{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1929See \`config.log' for more details." >&5
1930echo "$as_me: error: cannot compute suffix of object files: cannot compile
1931See \`config.log' for more details." >&2;}
d5af19ba 1932 { (exit 1); exit 1; }; }; }
c906108c
SS
1933fi
1934
b4e70030 1935rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 1936fi
b4e70030
JB
1937echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1938echo "${ECHO_T}$ac_cv_objext" >&6
bec39cab
AC
1939OBJEXT=$ac_cv_objext
1940ac_objext=$OBJEXT
b4e70030
JB
1941echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1942echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
bec39cab
AC
1943if test "${ac_cv_c_compiler_gnu+set}" = set; then
1944 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 1945else
bec39cab
AC
1946 cat >conftest.$ac_ext <<_ACEOF
1947/* confdefs.h. */
1948_ACEOF
1949cat confdefs.h >>conftest.$ac_ext
1950cat >>conftest.$ac_ext <<_ACEOF
1951/* end confdefs.h. */
1952
1953int
1954main ()
1955{
1956#ifndef __GNUC__
1957 choke me
1958#endif
1959
1960 ;
1961 return 0;
1962}
1963_ACEOF
1964rm -f conftest.$ac_objext
1965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1966 (eval $ac_compile) 2>conftest.er1
1967 ac_status=$?
1968 grep -v '^ *+' conftest.er1 >conftest.err
1969 rm -f conftest.er1
1970 cat conftest.err >&5
1971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1972 (exit $ac_status); } &&
b4e70030
JB
1973 { ac_try='test -z "$ac_c_werror_flag"
1974 || test ! -s conftest.err'
bec39cab
AC
1975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1976 (eval $ac_try) 2>&5
1977 ac_status=$?
1978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1979 (exit $ac_status); }; } &&
1980 { ac_try='test -s conftest.$ac_objext'
1981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1982 (eval $ac_try) 2>&5
1983 ac_status=$?
1984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1985 (exit $ac_status); }; }; then
1986 ac_compiler_gnu=yes
1987else
1988 echo "$as_me: failed program was:" >&5
1989sed 's/^/| /' conftest.$ac_ext >&5
1990
b4e70030 1991ac_compiler_gnu=no
bec39cab
AC
1992fi
1993rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1994ac_cv_c_compiler_gnu=$ac_compiler_gnu
1995
1996fi
b4e70030
JB
1997echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
1998echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
bec39cab
AC
1999GCC=`test $ac_compiler_gnu = yes && echo yes`
2000ac_test_CFLAGS=${CFLAGS+set}
2001ac_save_CFLAGS=$CFLAGS
b4e70030
JB
2002CFLAGS="-g"
2003echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2004echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
bec39cab
AC
2005if test "${ac_cv_prog_cc_g+set}" = set; then
2006 echo $ECHO_N "(cached) $ECHO_C" >&6
2007else
b4e70030 2008 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
2009/* confdefs.h. */
2010_ACEOF
2011cat confdefs.h >>conftest.$ac_ext
2012cat >>conftest.$ac_ext <<_ACEOF
2013/* end confdefs.h. */
2014
2015int
2016main ()
2017{
2018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023rm -f conftest.$ac_objext
2024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2025 (eval $ac_compile) 2>conftest.er1
2026 ac_status=$?
2027 grep -v '^ *+' conftest.er1 >conftest.err
2028 rm -f conftest.er1
2029 cat conftest.err >&5
2030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2031 (exit $ac_status); } &&
b4e70030
JB
2032 { ac_try='test -z "$ac_c_werror_flag"
2033 || test ! -s conftest.err'
bec39cab
AC
2034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2035 (eval $ac_try) 2>&5
2036 ac_status=$?
2037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2038 (exit $ac_status); }; } &&
2039 { ac_try='test -s conftest.$ac_objext'
2040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2041 (eval $ac_try) 2>&5
2042 ac_status=$?
2043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2044 (exit $ac_status); }; }; then
c906108c
SS
2045 ac_cv_prog_cc_g=yes
2046else
bec39cab
AC
2047 echo "$as_me: failed program was:" >&5
2048sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2049
b4e70030 2050ac_cv_prog_cc_g=no
4e8d927d 2051fi
bec39cab
AC
2052rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2053fi
b4e70030
JB
2054echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2055echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c906108c 2056if test "$ac_test_CFLAGS" = set; then
bec39cab 2057 CFLAGS=$ac_save_CFLAGS
c906108c
SS
2058elif test $ac_cv_prog_cc_g = yes; then
2059 if test "$GCC" = yes; then
2060 CFLAGS="-g -O2"
2061 else
2062 CFLAGS="-g"
2063 fi
2064else
2065 if test "$GCC" = yes; then
2066 CFLAGS="-O2"
2067 else
2068 CFLAGS=
2069 fi
2070fi
b4e70030
JB
2071echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2072echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2073if test "${ac_cv_prog_cc_stdc+set}" = set; then
bec39cab
AC
2074 echo $ECHO_N "(cached) $ECHO_C" >&6
2075else
b4e70030 2076 ac_cv_prog_cc_stdc=no
bec39cab
AC
2077ac_save_CC=$CC
2078cat >conftest.$ac_ext <<_ACEOF
2079/* confdefs.h. */
2080_ACEOF
2081cat confdefs.h >>conftest.$ac_ext
2082cat >>conftest.$ac_ext <<_ACEOF
2083/* end confdefs.h. */
c906108c
SS
2084#include <stdarg.h>
2085#include <stdio.h>
2086#include <sys/types.h>
2087#include <sys/stat.h>
2088/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2089struct buf { int x; };
2090FILE * (*rcsopen) (struct buf *, struct stat *, int);
2091static char *e (p, i)
2092 char **p;
2093 int i;
2094{
2095 return p[i];
2096}
2097static char *f (char * (*g) (char **, int), char **p, ...)
2098{
2099 char *s;
2100 va_list v;
2101 va_start (v,p);
2102 s = g (p, va_arg (v,int));
2103 va_end (v);
2104 return s;
2105}
bec39cab
AC
2106
2107/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2108 function prototypes and stuff, but not '\xHH' hex character constants.
2109 These don't provoke an error unfortunately, instead are silently treated
b4e70030 2110 as 'x'. The following induces an error, until -std1 is added to get
bec39cab
AC
2111 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2112 array size at least. It's necessary to write '\x00'==0 to get something
b4e70030 2113 that's true only with -std1. */
bec39cab
AC
2114int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2115
c906108c
SS
2116int test (int i, double x);
2117struct s1 {int (*f) (int a);};
2118struct s2 {int (*f) (double a);};
2119int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2120int argc;
2121char **argv;
bec39cab
AC
2122int
2123main ()
2124{
c906108c 2125return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
2126 ;
2127 return 0;
2128}
2129_ACEOF
b4e70030
JB
2130# Don't try gcc -ansi; that turns off useful extensions and
2131# breaks some systems' header files.
2132# AIX -qlanglvl=ansi
2133# Ultrix and OSF/1 -std1
2134# HP-UX 10.20 and later -Ae
2135# HP-UX older versions -Aa -D_HPUX_SOURCE
2136# SVR4 -Xc -D__EXTENSIONS__
2137for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
2138do
2139 CC="$ac_save_CC $ac_arg"
2140 rm -f conftest.$ac_objext
2141if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2142 (eval $ac_compile) 2>conftest.er1
2143 ac_status=$?
2144 grep -v '^ *+' conftest.er1 >conftest.err
2145 rm -f conftest.er1
2146 cat conftest.err >&5
2147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2148 (exit $ac_status); } &&
b4e70030
JB
2149 { ac_try='test -z "$ac_c_werror_flag"
2150 || test ! -s conftest.err'
bec39cab
AC
2151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2152 (eval $ac_try) 2>&5
2153 ac_status=$?
2154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2155 (exit $ac_status); }; } &&
2156 { ac_try='test -s conftest.$ac_objext'
2157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2158 (eval $ac_try) 2>&5
2159 ac_status=$?
2160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2161 (exit $ac_status); }; }; then
b4e70030
JB
2162 ac_cv_prog_cc_stdc=$ac_arg
2163break
c906108c 2164else
bec39cab
AC
2165 echo "$as_me: failed program was:" >&5
2166sed 's/^/| /' conftest.$ac_ext >&5
2167
c906108c 2168fi
bec39cab 2169rm -f conftest.err conftest.$ac_objext
c906108c 2170done
b4e70030 2171rm -f conftest.$ac_ext conftest.$ac_objext
bec39cab 2172CC=$ac_save_CC
c906108c
SS
2173
2174fi
b4e70030
JB
2175
2176case "x$ac_cv_prog_cc_stdc" in
2177 x|xno)
2178 echo "$as_me:$LINENO: result: none needed" >&5
2179echo "${ECHO_T}none needed" >&6 ;;
bec39cab 2180 *)
b4e70030
JB
2181 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2182echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2183 CC="$CC $ac_cv_prog_cc_stdc" ;;
c906108c
SS
2184esac
2185
b4e70030
JB
2186# Some people use a C++ compiler to compile C. Since we use `exit',
2187# in C++ we need to declare it. In case someone uses the same compiler
2188# for both compiling C and C++ we need to have the C++ compiler decide
2189# the declaration of exit, since it's the most demanding environment.
2190cat >conftest.$ac_ext <<_ACEOF
2191#ifndef __cplusplus
2192 choke me
2193#endif
2194_ACEOF
2195rm -f conftest.$ac_objext
2196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2197 (eval $ac_compile) 2>conftest.er1
2198 ac_status=$?
2199 grep -v '^ *+' conftest.er1 >conftest.err
2200 rm -f conftest.er1
2201 cat conftest.err >&5
2202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2203 (exit $ac_status); } &&
2204 { ac_try='test -z "$ac_c_werror_flag"
2205 || test ! -s conftest.err'
2206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2207 (eval $ac_try) 2>&5
2208 ac_status=$?
2209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2210 (exit $ac_status); }; } &&
2211 { ac_try='test -s conftest.$ac_objext'
2212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2213 (eval $ac_try) 2>&5
2214 ac_status=$?
2215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2216 (exit $ac_status); }; }; then
2217 for ac_declaration in \
2218 '' \
2219 'extern "C" void std::exit (int) throw (); using std::exit;' \
2220 'extern "C" void std::exit (int); using std::exit;' \
2221 'extern "C" void exit (int) throw ();' \
2222 'extern "C" void exit (int);' \
2223 'void exit (int);'
2224do
2225 cat >conftest.$ac_ext <<_ACEOF
2226/* confdefs.h. */
2227_ACEOF
2228cat confdefs.h >>conftest.$ac_ext
2229cat >>conftest.$ac_ext <<_ACEOF
2230/* end confdefs.h. */
2231$ac_declaration
2232#include <stdlib.h>
2233int
2234main ()
2235{
2236exit (42);
2237 ;
2238 return 0;
2239}
2240_ACEOF
2241rm -f conftest.$ac_objext
2242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2243 (eval $ac_compile) 2>conftest.er1
2244 ac_status=$?
2245 grep -v '^ *+' conftest.er1 >conftest.err
2246 rm -f conftest.er1
2247 cat conftest.err >&5
2248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2249 (exit $ac_status); } &&
2250 { ac_try='test -z "$ac_c_werror_flag"
2251 || test ! -s conftest.err'
2252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2253 (eval $ac_try) 2>&5
2254 ac_status=$?
2255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2256 (exit $ac_status); }; } &&
2257 { ac_try='test -s conftest.$ac_objext'
2258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2259 (eval $ac_try) 2>&5
2260 ac_status=$?
2261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2262 (exit $ac_status); }; }; then
2263 :
2264else
2265 echo "$as_me: failed program was:" >&5
2266sed 's/^/| /' conftest.$ac_ext >&5
2267
2268continue
2269fi
2270rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2271 cat >conftest.$ac_ext <<_ACEOF
2272/* confdefs.h. */
2273_ACEOF
2274cat confdefs.h >>conftest.$ac_ext
2275cat >>conftest.$ac_ext <<_ACEOF
2276/* end confdefs.h. */
2277$ac_declaration
2278int
2279main ()
2280{
2281exit (42);
2282 ;
2283 return 0;
2284}
2285_ACEOF
2286rm -f conftest.$ac_objext
2287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2288 (eval $ac_compile) 2>conftest.er1
2289 ac_status=$?
2290 grep -v '^ *+' conftest.er1 >conftest.err
2291 rm -f conftest.er1
2292 cat conftest.err >&5
2293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2294 (exit $ac_status); } &&
2295 { ac_try='test -z "$ac_c_werror_flag"
2296 || test ! -s conftest.err'
2297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2298 (eval $ac_try) 2>&5
2299 ac_status=$?
2300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2301 (exit $ac_status); }; } &&
2302 { ac_try='test -s conftest.$ac_objext'
2303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2304 (eval $ac_try) 2>&5
2305 ac_status=$?
2306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2307 (exit $ac_status); }; }; then
2308 break
2309else
2310 echo "$as_me: failed program was:" >&5
2311sed 's/^/| /' conftest.$ac_ext >&5
2312
2313fi
2314rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2315done
2316rm -f conftest*
2317if test -n "$ac_declaration"; then
2318 echo '#ifdef __cplusplus' >>confdefs.h
2319 echo $ac_declaration >>confdefs.h
2320 echo '#endif' >>confdefs.h
2321fi
2322
2323else
2324 echo "$as_me: failed program was:" >&5
2325sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2326
b4e70030
JB
2327fi
2328rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
2329ac_ext=c
2330ac_cpp='$CPP $CPPFLAGS'
2331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2333ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 2334
60ca704f 2335
bec39cab
AC
2336cat >>confdefs.h <<\_ACEOF
2337#define _GNU_SOURCE 1
2338_ACEOF
c906108c
SS
2339
2340
8bb2c122 2341
bec39cab
AC
2342ac_ext=c
2343ac_cpp='$CPP $CPPFLAGS'
2344ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2345ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2346ac_compiler_gnu=$ac_cv_c_compiler_gnu
b4e70030
JB
2347echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2348echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
bec39cab
AC
2349# On Suns, sometimes $CPP names a directory.
2350if test -n "$CPP" && test -d "$CPP"; then
2351 CPP=
8bb2c122 2352fi
bec39cab
AC
2353if test -z "$CPP"; then
2354 if test "${ac_cv_prog_CPP+set}" = set; then
2355 echo $ECHO_N "(cached) $ECHO_C" >&6
2356else
2357 # Double quotes because CPP needs to be expanded
2358 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2359 do
2360 ac_preproc_ok=false
2361for ac_c_preproc_warn_flag in '' yes
2362do
2363 # Use a header file that comes with gcc, so configuring glibc
2364 # with a fresh cross-compiler works.
2365 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2366 # <limits.h> exists even on freestanding compilers.
2367 # On the NeXT, cc -E runs the code through the compiler's parser,
2368 # not just through cpp. "Syntax error" is here to catch this case.
2369 cat >conftest.$ac_ext <<_ACEOF
2370/* confdefs.h. */
2371_ACEOF
2372cat confdefs.h >>conftest.$ac_ext
2373cat >>conftest.$ac_ext <<_ACEOF
2374/* end confdefs.h. */
2375#ifdef __STDC__
2376# include <limits.h>
2377#else
2378# include <assert.h>
2379#endif
2380 Syntax error
2381_ACEOF
2382if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2383 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2384 ac_status=$?
2385 grep -v '^ *+' conftest.er1 >conftest.err
2386 rm -f conftest.er1
2387 cat conftest.err >&5
2388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389 (exit $ac_status); } >/dev/null; then
2390 if test -s conftest.err; then
2391 ac_cpp_err=$ac_c_preproc_warn_flag
2392 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2393 else
2394 ac_cpp_err=
2395 fi
8bb2c122 2396else
bec39cab 2397 ac_cpp_err=yes
8bb2c122 2398fi
bec39cab
AC
2399if test -z "$ac_cpp_err"; then
2400 :
8bb2c122 2401else
bec39cab
AC
2402 echo "$as_me: failed program was:" >&5
2403sed 's/^/| /' conftest.$ac_ext >&5
2404
2405 # Broken: fails on valid input.
2406continue
2407fi
2408rm -f conftest.err conftest.$ac_ext
2409
b4e70030 2410 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2411 # can be detected and how.
2412 cat >conftest.$ac_ext <<_ACEOF
2413/* confdefs.h. */
2414_ACEOF
2415cat confdefs.h >>conftest.$ac_ext
2416cat >>conftest.$ac_ext <<_ACEOF
2417/* end confdefs.h. */
2418#include <ac_nonexistent.h>
2419_ACEOF
2420if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2421 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2422 ac_status=$?
2423 grep -v '^ *+' conftest.er1 >conftest.err
2424 rm -f conftest.er1
2425 cat conftest.err >&5
2426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2427 (exit $ac_status); } >/dev/null; then
2428 if test -s conftest.err; then
2429 ac_cpp_err=$ac_c_preproc_warn_flag
2430 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2431 else
2432 ac_cpp_err=
2433 fi
8bb2c122 2434else
bec39cab 2435 ac_cpp_err=yes
8bb2c122 2436fi
bec39cab
AC
2437if test -z "$ac_cpp_err"; then
2438 # Broken: success on invalid input.
2439continue
8bb2c122 2440else
bec39cab
AC
2441 echo "$as_me: failed program was:" >&5
2442sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 2443
bec39cab
AC
2444 # Passes both tests.
2445ac_preproc_ok=:
2446break
8bb2c122 2447fi
bec39cab 2448rm -f conftest.err conftest.$ac_ext
8bb2c122 2449
bec39cab
AC
2450done
2451# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2452rm -f conftest.err conftest.$ac_ext
2453if $ac_preproc_ok; then
2454 break
2455fi
8bb2c122 2456
bec39cab
AC
2457 done
2458 ac_cv_prog_CPP=$CPP
ddc9cd0f 2459
c906108c 2460fi
bec39cab
AC
2461 CPP=$ac_cv_prog_CPP
2462else
2463 ac_cv_prog_CPP=$CPP
c906108c 2464fi
b4e70030
JB
2465echo "$as_me:$LINENO: result: $CPP" >&5
2466echo "${ECHO_T}$CPP" >&6
bec39cab
AC
2467ac_preproc_ok=false
2468for ac_c_preproc_warn_flag in '' yes
2469do
2470 # Use a header file that comes with gcc, so configuring glibc
2471 # with a fresh cross-compiler works.
2472 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2473 # <limits.h> exists even on freestanding compilers.
2474 # On the NeXT, cc -E runs the code through the compiler's parser,
2475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >conftest.$ac_ext <<_ACEOF
2477/* confdefs.h. */
2478_ACEOF
2479cat confdefs.h >>conftest.$ac_ext
2480cat >>conftest.$ac_ext <<_ACEOF
2481/* end confdefs.h. */
2482#ifdef __STDC__
2483# include <limits.h>
2484#else
2485# include <assert.h>
2486#endif
2487 Syntax error
2488_ACEOF
2489if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2490 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2491 ac_status=$?
2492 grep -v '^ *+' conftest.er1 >conftest.err
2493 rm -f conftest.er1
2494 cat conftest.err >&5
2495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2496 (exit $ac_status); } >/dev/null; then
2497 if test -s conftest.err; then
2498 ac_cpp_err=$ac_c_preproc_warn_flag
2499 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2500 else
2501 ac_cpp_err=
2502 fi
c906108c 2503else
bec39cab 2504 ac_cpp_err=yes
c906108c 2505fi
bec39cab
AC
2506if test -z "$ac_cpp_err"; then
2507 :
c906108c 2508else
bec39cab
AC
2509 echo "$as_me: failed program was:" >&5
2510sed 's/^/| /' conftest.$ac_ext >&5
2511
2512 # Broken: fails on valid input.
2513continue
2514fi
2515rm -f conftest.err conftest.$ac_ext
2516
b4e70030 2517 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2518 # can be detected and how.
2519 cat >conftest.$ac_ext <<_ACEOF
2520/* confdefs.h. */
2521_ACEOF
2522cat confdefs.h >>conftest.$ac_ext
2523cat >>conftest.$ac_ext <<_ACEOF
2524/* end confdefs.h. */
2525#include <ac_nonexistent.h>
2526_ACEOF
2527if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2528 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2529 ac_status=$?
2530 grep -v '^ *+' conftest.er1 >conftest.err
2531 rm -f conftest.er1
2532 cat conftest.err >&5
2533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2534 (exit $ac_status); } >/dev/null; then
2535 if test -s conftest.err; then
2536 ac_cpp_err=$ac_c_preproc_warn_flag
2537 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2538 else
2539 ac_cpp_err=
2540 fi
c906108c 2541else
bec39cab 2542 ac_cpp_err=yes
c906108c 2543fi
bec39cab
AC
2544if test -z "$ac_cpp_err"; then
2545 # Broken: success on invalid input.
2546continue
c906108c 2547else
bec39cab
AC
2548 echo "$as_me: failed program was:" >&5
2549sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2550
bec39cab
AC
2551 # Passes both tests.
2552ac_preproc_ok=:
2553break
c906108c 2554fi
bec39cab 2555rm -f conftest.err conftest.$ac_ext
c906108c 2556
bec39cab
AC
2557done
2558# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2559rm -f conftest.err conftest.$ac_ext
2560if $ac_preproc_ok; then
c906108c
SS
2561 :
2562else
d5af19ba
DJ
2563 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2564echo "$as_me: error: in \`$ac_pwd':" >&2;}
2565{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
bec39cab
AC
2566See \`config.log' for more details." >&5
2567echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2568See \`config.log' for more details." >&2;}
d5af19ba 2569 { (exit 1); exit 1; }; }; }
c906108c 2570fi
c906108c 2571
bec39cab
AC
2572ac_ext=c
2573ac_cpp='$CPP $CPPFLAGS'
2574ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2575ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2576ac_compiler_gnu=$ac_cv_c_compiler_gnu
2577
2578
b4e70030
JB
2579echo "$as_me:$LINENO: checking for egrep" >&5
2580echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2581if test "${ac_cv_prog_egrep+set}" = set; then
4e8d927d
DJ
2582 echo $ECHO_N "(cached) $ECHO_C" >&6
2583else
b4e70030
JB
2584 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2585 then ac_cv_prog_egrep='grep -E'
2586 else ac_cv_prog_egrep='egrep'
bec39cab 2587 fi
4e8d927d 2588fi
b4e70030
JB
2589echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2590echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2591 EGREP=$ac_cv_prog_egrep
c906108c 2592
bec39cab
AC
2593
2594
b4e70030
JB
2595echo "$as_me:$LINENO: checking for AIX" >&5
2596echo $ECHO_N "checking for AIX... $ECHO_C" >&6
bec39cab
AC
2597cat >conftest.$ac_ext <<_ACEOF
2598/* confdefs.h. */
2599_ACEOF
2600cat confdefs.h >>conftest.$ac_ext
2601cat >>conftest.$ac_ext <<_ACEOF
2602/* end confdefs.h. */
2603#ifdef _AIX
2604 yes
2605#endif
2606
2607_ACEOF
c906108c 2608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 2609 $EGREP "yes" >/dev/null 2>&1; then
b4e70030
JB
2610 echo "$as_me:$LINENO: result: yes" >&5
2611echo "${ECHO_T}yes" >&6
bec39cab
AC
2612cat >>confdefs.h <<\_ACEOF
2613#define _ALL_SOURCE 1
2614_ACEOF
2615
c906108c 2616else
b4e70030
JB
2617 echo "$as_me:$LINENO: result: no" >&5
2618echo "${ECHO_T}no" >&6
c906108c
SS
2619fi
2620rm -f conftest*
2621
c906108c 2622
b4e70030
JB
2623echo "$as_me:$LINENO: checking for library containing strerror" >&5
2624echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
bec39cab
AC
2625if test "${ac_cv_search_strerror+set}" = set; then
2626 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2627else
bec39cab 2628 ac_func_search_save_LIBS=$LIBS
b4e70030 2629ac_cv_search_strerror=no
bec39cab
AC
2630cat >conftest.$ac_ext <<_ACEOF
2631/* confdefs.h. */
2632_ACEOF
2633cat confdefs.h >>conftest.$ac_ext
2634cat >>conftest.$ac_ext <<_ACEOF
2635/* end confdefs.h. */
c906108c 2636
b4e70030 2637/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
2638#ifdef __cplusplus
2639extern "C"
2640#endif
b4e70030
JB
2641/* We use char because int might match the return type of a gcc2
2642 builtin and then its argument prototype would still apply. */
bec39cab
AC
2643char strerror ();
2644int
2645main ()
2646{
b4e70030 2647strerror ();
bec39cab
AC
2648 ;
2649 return 0;
2650}
2651_ACEOF
b4e70030 2652rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
2653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2654 (eval $ac_link) 2>conftest.er1
2655 ac_status=$?
2656 grep -v '^ *+' conftest.er1 >conftest.err
2657 rm -f conftest.er1
2658 cat conftest.err >&5
2659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660 (exit $ac_status); } &&
b4e70030
JB
2661 { ac_try='test -z "$ac_c_werror_flag"
2662 || test ! -s conftest.err'
bec39cab
AC
2663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2664 (eval $ac_try) 2>&5
2665 ac_status=$?
2666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2667 (exit $ac_status); }; } &&
2668 { ac_try='test -s conftest$ac_exeext'
2669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2670 (eval $ac_try) 2>&5
2671 ac_status=$?
2672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2673 (exit $ac_status); }; }; then
b4e70030 2674 ac_cv_search_strerror="none required"
c906108c 2675else
bec39cab
AC
2676 echo "$as_me: failed program was:" >&5
2677sed 's/^/| /' conftest.$ac_ext >&5
c906108c
SS
2678
2679fi
bec39cab 2680rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
2681 conftest$ac_exeext conftest.$ac_ext
2682if test "$ac_cv_search_strerror" = no; then
2683 for ac_lib in cposix; do
2684 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
2685 cat >conftest.$ac_ext <<_ACEOF
2686/* confdefs.h. */
2687_ACEOF
2688cat confdefs.h >>conftest.$ac_ext
2689cat >>conftest.$ac_ext <<_ACEOF
2690/* end confdefs.h. */
2691
2692/* Override any gcc2 internal prototype to avoid an error. */
2693#ifdef __cplusplus
2694extern "C"
2695#endif
2696/* We use char because int might match the return type of a gcc2
2697 builtin and then its argument prototype would still apply. */
2698char strerror ();
2699int
2700main ()
2701{
2702strerror ();
2703 ;
2704 return 0;
2705}
2706_ACEOF
2707rm -f conftest.$ac_objext conftest$ac_exeext
2708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2709 (eval $ac_link) 2>conftest.er1
2710 ac_status=$?
2711 grep -v '^ *+' conftest.er1 >conftest.err
2712 rm -f conftest.er1
2713 cat conftest.err >&5
2714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2715 (exit $ac_status); } &&
2716 { ac_try='test -z "$ac_c_werror_flag"
2717 || test ! -s conftest.err'
2718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2719 (eval $ac_try) 2>&5
2720 ac_status=$?
2721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2722 (exit $ac_status); }; } &&
2723 { ac_try='test -s conftest$ac_exeext'
2724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2725 (eval $ac_try) 2>&5
2726 ac_status=$?
2727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2728 (exit $ac_status); }; }; then
2729 ac_cv_search_strerror="-l$ac_lib"
2730break
4e8d927d 2731else
b4e70030
JB
2732 echo "$as_me: failed program was:" >&5
2733sed 's/^/| /' conftest.$ac_ext >&5
2734
2735fi
2736rm -f conftest.err conftest.$ac_objext \
2737 conftest$ac_exeext conftest.$ac_ext
2738 done
c906108c 2739fi
bec39cab 2740LIBS=$ac_func_search_save_LIBS
c906108c 2741fi
b4e70030
JB
2742echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
2743echo "${ECHO_T}$ac_cv_search_strerror" >&6
2744if test "$ac_cv_search_strerror" != no; then
2745 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
bec39cab 2746
c906108c
SS
2747fi
2748
783e057b
DJ
2749if test -n "$ac_tool_prefix"; then
2750 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2751set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2752echo "$as_me:$LINENO: checking for $ac_word" >&5
2753echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2754if test "${ac_cv_prog_RANLIB+set}" = set; then
2755 echo $ECHO_N "(cached) $ECHO_C" >&6
2756else
2757 if test -n "$RANLIB"; then
2758 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2759else
2760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2761for as_dir in $PATH
2762do
2763 IFS=$as_save_IFS
2764 test -z "$as_dir" && as_dir=.
2765 for ac_exec_ext in '' $ac_executable_extensions; do
2766 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2767 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2768 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2769 break 2
2770 fi
2771done
2772done
c906108c 2773
783e057b
DJ
2774fi
2775fi
2776RANLIB=$ac_cv_prog_RANLIB
2777if test -n "$RANLIB"; then
2778 echo "$as_me:$LINENO: result: $RANLIB" >&5
2779echo "${ECHO_T}$RANLIB" >&6
2780else
2781 echo "$as_me:$LINENO: result: no" >&5
2782echo "${ECHO_T}no" >&6
2783fi
bec39cab 2784
783e057b
DJ
2785fi
2786if test -z "$ac_cv_prog_RANLIB"; then
2787 ac_ct_RANLIB=$RANLIB
2788 # Extract the first word of "ranlib", so it can be a program name with args.
2789set dummy ranlib; ac_word=$2
2790echo "$as_me:$LINENO: checking for $ac_word" >&5
2791echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2792if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
bec39cab 2793 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2794else
783e057b
DJ
2795 if test -n "$ac_ct_RANLIB"; then
2796 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2797else
2798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2799for as_dir in $PATH
bec39cab 2800do
783e057b
DJ
2801 IFS=$as_save_IFS
2802 test -z "$as_dir" && as_dir=.
2803 for ac_exec_ext in '' $ac_executable_extensions; do
2804 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2805 ac_cv_prog_ac_ct_RANLIB="ranlib"
2806 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2807 break 2
2808 fi
2809done
2810done
2811
2812 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2813fi
2814fi
2815ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2816if test -n "$ac_ct_RANLIB"; then
2817 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2818echo "${ECHO_T}$ac_ct_RANLIB" >&6
2819else
2820 echo "$as_me:$LINENO: result: no" >&5
2821echo "${ECHO_T}no" >&6
2822fi
2823
2824 RANLIB=$ac_ct_RANLIB
2825else
2826 RANLIB="$ac_cv_prog_RANLIB"
2827fi
2828
2829echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2830echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2831if test "${ac_cv_header_stdc+set}" = set; then
2832 echo $ECHO_N "(cached) $ECHO_C" >&6
2833else
bec39cab
AC
2834 cat >conftest.$ac_ext <<_ACEOF
2835/* confdefs.h. */
2836_ACEOF
2837cat confdefs.h >>conftest.$ac_ext
2838cat >>conftest.$ac_ext <<_ACEOF
2839/* end confdefs.h. */
783e057b 2840#include <stdlib.h>
bec39cab 2841#include <stdarg.h>
783e057b
DJ
2842#include <string.h>
2843#include <float.h>
c906108c 2844
bec39cab
AC
2845int
2846main ()
2847{
c906108c 2848
bec39cab
AC
2849 ;
2850 return 0;
2851}
2852_ACEOF
2853rm -f conftest.$ac_objext
2854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2855 (eval $ac_compile) 2>conftest.er1
2856 ac_status=$?
2857 grep -v '^ *+' conftest.er1 >conftest.err
2858 rm -f conftest.er1
2859 cat conftest.err >&5
2860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2861 (exit $ac_status); } &&
b4e70030
JB
2862 { ac_try='test -z "$ac_c_werror_flag"
2863 || test ! -s conftest.err'
bec39cab
AC
2864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2865 (eval $ac_try) 2>&5
2866 ac_status=$?
2867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2868 (exit $ac_status); }; } &&
2869 { ac_try='test -s conftest.$ac_objext'
2870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2871 (eval $ac_try) 2>&5
2872 ac_status=$?
2873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2874 (exit $ac_status); }; }; then
783e057b 2875 ac_cv_header_stdc=yes
c906108c 2876else
bec39cab
AC
2877 echo "$as_me: failed program was:" >&5
2878sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2879
783e057b 2880ac_cv_header_stdc=no
c906108c 2881fi
bec39cab 2882rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 2883
783e057b
DJ
2884if test $ac_cv_header_stdc = yes; then
2885 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2886 cat >conftest.$ac_ext <<_ACEOF
2887/* confdefs.h. */
2888_ACEOF
2889cat confdefs.h >>conftest.$ac_ext
2890cat >>conftest.$ac_ext <<_ACEOF
2891/* end confdefs.h. */
2892#include <string.h>
c906108c 2893
783e057b
DJ
2894_ACEOF
2895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2896 $EGREP "memchr" >/dev/null 2>&1; then
2897 :
c906108c 2898else
783e057b 2899 ac_cv_header_stdc=no
c906108c 2900fi
783e057b 2901rm -f conftest*
c906108c
SS
2902
2903fi
2904
783e057b
DJ
2905if test $ac_cv_header_stdc = yes; then
2906 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2907 cat >conftest.$ac_ext <<_ACEOF
2908/* confdefs.h. */
2909_ACEOF
2910cat confdefs.h >>conftest.$ac_ext
2911cat >>conftest.$ac_ext <<_ACEOF
2912/* end confdefs.h. */
2913#include <stdlib.h>
bec39cab 2914
783e057b
DJ
2915_ACEOF
2916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2917 $EGREP "free" >/dev/null 2>&1; then
2918 :
bec39cab 2919else
783e057b 2920 ac_cv_header_stdc=no
bec39cab 2921fi
783e057b 2922rm -f conftest*
bec39cab
AC
2923
2924fi
bec39cab 2925
783e057b
DJ
2926if test $ac_cv_header_stdc = yes; then
2927 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2928 if test "$cross_compiling" = yes; then
2929 :
bec39cab 2930else
783e057b
DJ
2931 cat >conftest.$ac_ext <<_ACEOF
2932/* confdefs.h. */
2933_ACEOF
2934cat confdefs.h >>conftest.$ac_ext
2935cat >>conftest.$ac_ext <<_ACEOF
2936/* end confdefs.h. */
2937#include <ctype.h>
2938#if ((' ' & 0x0FF) == 0x020)
2939# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2940# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2941#else
2942# define ISLOWER(c) \
2943 (('a' <= (c) && (c) <= 'i') \
2944 || ('j' <= (c) && (c) <= 'r') \
2945 || ('s' <= (c) && (c) <= 'z'))
2946# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2947#endif
2948
2949#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2950int
2951main ()
2952{
2953 int i;
2954 for (i = 0; i < 256; i++)
2955 if (XOR (islower (i), ISLOWER (i))
2956 || toupper (i) != TOUPPER (i))
2957 exit(2);
2958 exit (0);
2959}
2960_ACEOF
2961rm -f conftest$ac_exeext
2962if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2963 (eval $ac_link) 2>&5
2964 ac_status=$?
2965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2966 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2968 (eval $ac_try) 2>&5
2969 ac_status=$?
2970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2971 (exit $ac_status); }; }; then
2972 :
2973else
2974 echo "$as_me: program exited with status $ac_status" >&5
2975echo "$as_me: failed program was:" >&5
2976sed 's/^/| /' conftest.$ac_ext >&5
2977
2978( exit $ac_status )
2979ac_cv_header_stdc=no
2980fi
2981rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2982fi
2983fi
2984fi
2985echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2986echo "${ECHO_T}$ac_cv_header_stdc" >&6
2987if test $ac_cv_header_stdc = yes; then
2988
2989cat >>confdefs.h <<\_ACEOF
2990#define STDC_HEADERS 1
2991_ACEOF
2992
2993fi
2994
2995# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3006 inttypes.h stdint.h unistd.h
3007do
3008as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3009echo "$as_me:$LINENO: checking for $ac_header" >&5
3010echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3011if eval "test \"\${$as_ac_Header+set}\" = set"; then
3012 echo $ECHO_N "(cached) $ECHO_C" >&6
3013else
3014 cat >conftest.$ac_ext <<_ACEOF
3015/* confdefs.h. */
3016_ACEOF
3017cat confdefs.h >>conftest.$ac_ext
3018cat >>conftest.$ac_ext <<_ACEOF
3019/* end confdefs.h. */
3020$ac_includes_default
3021
3022#include <$ac_header>
3023_ACEOF
3024rm -f conftest.$ac_objext
3025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3026 (eval $ac_compile) 2>conftest.er1
3027 ac_status=$?
3028 grep -v '^ *+' conftest.er1 >conftest.err
3029 rm -f conftest.er1
3030 cat conftest.err >&5
3031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3032 (exit $ac_status); } &&
3033 { ac_try='test -z "$ac_c_werror_flag"
3034 || test ! -s conftest.err'
3035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3036 (eval $ac_try) 2>&5
3037 ac_status=$?
3038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3039 (exit $ac_status); }; } &&
3040 { ac_try='test -s conftest.$ac_objext'
3041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3042 (eval $ac_try) 2>&5
3043 ac_status=$?
3044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3045 (exit $ac_status); }; }; then
3046 eval "$as_ac_Header=yes"
3047else
3048 echo "$as_me: failed program was:" >&5
3049sed 's/^/| /' conftest.$ac_ext >&5
3050
3051eval "$as_ac_Header=no"
3052fi
3053rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3054fi
3055echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3056echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3057if test `eval echo '${'$as_ac_Header'}'` = yes; then
3058 cat >>confdefs.h <<_ACEOF
3059#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3060_ACEOF
3061
3062fi
3063
3064done
3065
3066
3067
3068 if test "${ac_cv_header_minix_config_h+set}" = set; then
3069 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3070echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3071if test "${ac_cv_header_minix_config_h+set}" = set; then
3072 echo $ECHO_N "(cached) $ECHO_C" >&6
3073fi
3074echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3075echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3076else
3077 # Is the header compilable?
3078echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3079echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3080cat >conftest.$ac_ext <<_ACEOF
3081/* confdefs.h. */
3082_ACEOF
3083cat confdefs.h >>conftest.$ac_ext
3084cat >>conftest.$ac_ext <<_ACEOF
3085/* end confdefs.h. */
3086$ac_includes_default
3087#include <minix/config.h>
3088_ACEOF
3089rm -f conftest.$ac_objext
3090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3091 (eval $ac_compile) 2>conftest.er1
3092 ac_status=$?
3093 grep -v '^ *+' conftest.er1 >conftest.err
3094 rm -f conftest.er1
3095 cat conftest.err >&5
3096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3097 (exit $ac_status); } &&
3098 { ac_try='test -z "$ac_c_werror_flag"
3099 || test ! -s conftest.err'
3100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3101 (eval $ac_try) 2>&5
3102 ac_status=$?
3103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3104 (exit $ac_status); }; } &&
3105 { ac_try='test -s conftest.$ac_objext'
3106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3107 (eval $ac_try) 2>&5
3108 ac_status=$?
3109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3110 (exit $ac_status); }; }; then
3111 ac_header_compiler=yes
3112else
3113 echo "$as_me: failed program was:" >&5
3114sed 's/^/| /' conftest.$ac_ext >&5
3115
3116ac_header_compiler=no
3117fi
3118rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3119echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3120echo "${ECHO_T}$ac_header_compiler" >&6
3121
3122# Is the header present?
3123echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3124echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3125cat >conftest.$ac_ext <<_ACEOF
3126/* confdefs.h. */
3127_ACEOF
3128cat confdefs.h >>conftest.$ac_ext
3129cat >>conftest.$ac_ext <<_ACEOF
3130/* end confdefs.h. */
3131#include <minix/config.h>
3132_ACEOF
3133if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3134 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3135 ac_status=$?
3136 grep -v '^ *+' conftest.er1 >conftest.err
3137 rm -f conftest.er1
3138 cat conftest.err >&5
3139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3140 (exit $ac_status); } >/dev/null; then
3141 if test -s conftest.err; then
3142 ac_cpp_err=$ac_c_preproc_warn_flag
3143 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3144 else
3145 ac_cpp_err=
3146 fi
3147else
3148 ac_cpp_err=yes
3149fi
3150if test -z "$ac_cpp_err"; then
3151 ac_header_preproc=yes
3152else
3153 echo "$as_me: failed program was:" >&5
3154sed 's/^/| /' conftest.$ac_ext >&5
3155
3156 ac_header_preproc=no
3157fi
3158rm -f conftest.err conftest.$ac_ext
3159echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3160echo "${ECHO_T}$ac_header_preproc" >&6
3161
3162# So? What about this header?
3163case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3164 yes:no: )
3165 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3166echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3167 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
3168echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
3169 ac_header_preproc=yes
3170 ;;
3171 no:yes:* )
3172 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3173echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3174 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3175echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3176 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
3177echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
3178 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
3179echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
3180 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3181echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3182 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
3183echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
3184 (
3185 cat <<\_ASBOX
3186## ------------------------------------------ ##
3187## Report this to the AC_PACKAGE_NAME lists. ##
3188## ------------------------------------------ ##
3189_ASBOX
3190 ) |
3191 sed "s/^/$as_me: WARNING: /" >&2
3192 ;;
3193esac
3194echo "$as_me:$LINENO: checking for minix/config.h" >&5
3195echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3196if test "${ac_cv_header_minix_config_h+set}" = set; then
3197 echo $ECHO_N "(cached) $ECHO_C" >&6
3198else
3199 ac_cv_header_minix_config_h=$ac_header_preproc
3200fi
3201echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3202echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3203
3204fi
3205if test $ac_cv_header_minix_config_h = yes; then
3206 MINIX=yes
3207else
3208 MINIX=
3209fi
3210
3211
3212 if test "$MINIX" = yes; then
3213
3214cat >>confdefs.h <<\_ACEOF
3215#define _POSIX_SOURCE 1
3216_ACEOF
3217
3218
3219cat >>confdefs.h <<\_ACEOF
3220#define _POSIX_1_SOURCE 2
3221_ACEOF
3222
3223
3224cat >>confdefs.h <<\_ACEOF
3225#define _MINIX 1
3226_ACEOF
3227
3228 fi
3229
3230
3231
3232 echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
3233echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
3234if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
3235 echo $ECHO_N "(cached) $ECHO_C" >&6
3236else
3237 cat >conftest.$ac_ext <<_ACEOF
3238/* confdefs.h. */
3239_ACEOF
3240cat confdefs.h >>conftest.$ac_ext
3241cat >>conftest.$ac_ext <<_ACEOF
3242/* end confdefs.h. */
3243
3244# define __EXTENSIONS__ 1
3245 $ac_includes_default
3246int
3247main ()
3248{
3249
3250 ;
3251 return 0;
3252}
3253_ACEOF
3254rm -f conftest.$ac_objext
3255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3256 (eval $ac_compile) 2>conftest.er1
3257 ac_status=$?
3258 grep -v '^ *+' conftest.er1 >conftest.err
3259 rm -f conftest.er1
3260 cat conftest.err >&5
3261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3262 (exit $ac_status); } &&
3263 { ac_try='test -z "$ac_c_werror_flag"
3264 || test ! -s conftest.err'
3265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3266 (eval $ac_try) 2>&5
3267 ac_status=$?
3268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3269 (exit $ac_status); }; } &&
3270 { ac_try='test -s conftest.$ac_objext'
3271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3272 (eval $ac_try) 2>&5
3273 ac_status=$?
3274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3275 (exit $ac_status); }; }; then
3276 ac_cv_safe_to_define___extensions__=yes
3277else
3278 echo "$as_me: failed program was:" >&5
3279sed 's/^/| /' conftest.$ac_ext >&5
3280
3281ac_cv_safe_to_define___extensions__=no
3282fi
3283rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3284fi
3285echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
3286echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
3287 test $ac_cv_safe_to_define___extensions__ = yes &&
3288 cat >>confdefs.h <<\_ACEOF
3289#define __EXTENSIONS__ 1
3290_ACEOF
3291
3292 cat >>confdefs.h <<\_ACEOF
3293#define _ALL_SOURCE 1
3294_ACEOF
3295
3296 cat >>confdefs.h <<\_ACEOF
3297#define _GNU_SOURCE 1
3298_ACEOF
3299
3300 cat >>confdefs.h <<\_ACEOF
3301#define _POSIX_PTHREAD_SEMANTICS 1
3302_ACEOF
3303
3304 cat >>confdefs.h <<\_ACEOF
3305#define _TANDEM_SOURCE 1
3306_ACEOF
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5
3318echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
3319if test "${am_cv_prog_cc_stdc+set}" = set; then
3320 echo $ECHO_N "(cached) $ECHO_C" >&6
3321else
3322 am_cv_prog_cc_stdc=no
3323ac_save_CC="$CC"
3324# Don't try gcc -ansi; that turns off useful extensions and
3325# breaks some systems' header files.
3326# AIX -qlanglvl=ansi
3327# Ultrix and OSF/1 -std1
3328# HP-UX 10.20 and later -Ae
3329# HP-UX older versions -Aa -D_HPUX_SOURCE
3330# SVR4 -Xc -D__EXTENSIONS__
3331for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3332do
3333 CC="$ac_save_CC $ac_arg"
3334 cat >conftest.$ac_ext <<_ACEOF
3335/* confdefs.h. */
3336_ACEOF
3337cat confdefs.h >>conftest.$ac_ext
3338cat >>conftest.$ac_ext <<_ACEOF
3339/* end confdefs.h. */
3340#include <stdarg.h>
3341#include <stdio.h>
3342#include <sys/types.h>
3343#include <sys/stat.h>
3344/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3345struct buf { int x; };
3346FILE * (*rcsopen) (struct buf *, struct stat *, int);
3347static char *e (p, i)
3348 char **p;
3349 int i;
3350{
3351 return p[i];
3352}
3353static char *f (char * (*g) (char **, int), char **p, ...)
3354{
3355 char *s;
3356 va_list v;
3357 va_start (v,p);
3358 s = g (p, va_arg (v,int));
3359 va_end (v);
3360 return s;
3361}
3362int test (int i, double x);
3363struct s1 {int (*f) (int a);};
3364struct s2 {int (*f) (double a);};
3365int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3366int argc;
3367char **argv;
3368
3369int
3370main ()
3371{
3372
3373return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3374
3375 ;
3376 return 0;
3377}
3378_ACEOF
3379rm -f conftest.$ac_objext
3380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3381 (eval $ac_compile) 2>conftest.er1
3382 ac_status=$?
3383 grep -v '^ *+' conftest.er1 >conftest.err
3384 rm -f conftest.er1
3385 cat conftest.err >&5
3386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3387 (exit $ac_status); } &&
3388 { ac_try='test -z "$ac_c_werror_flag"
3389 || test ! -s conftest.err'
3390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3391 (eval $ac_try) 2>&5
3392 ac_status=$?
3393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3394 (exit $ac_status); }; } &&
3395 { ac_try='test -s conftest.$ac_objext'
3396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3397 (eval $ac_try) 2>&5
3398 ac_status=$?
3399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3400 (exit $ac_status); }; }; then
3401 am_cv_prog_cc_stdc="$ac_arg"; break
3402else
3403 echo "$as_me: failed program was:" >&5
3404sed 's/^/| /' conftest.$ac_ext >&5
3405
3406fi
3407rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3408done
3409CC="$ac_save_CC"
3410
3411fi
3412
3413if test -z "$am_cv_prog_cc_stdc"; then
3414 echo "$as_me:$LINENO: result: none needed" >&5
3415echo "${ECHO_T}none needed" >&6
3416else
3417 echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5
3418echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6
3419fi
3420case "x$am_cv_prog_cc_stdc" in
3421 x|xno) ;;
3422 *) CC="$CC $am_cv_prog_cc_stdc" ;;
3423esac
3424
3425
3426ac_aux_dir=
3427for ac_dir in .. $srcdir/..; do
3428 if test -f $ac_dir/install-sh; then
3429 ac_aux_dir=$ac_dir
3430 ac_install_sh="$ac_aux_dir/install-sh -c"
3431 break
3432 elif test -f $ac_dir/install.sh; then
3433 ac_aux_dir=$ac_dir
3434 ac_install_sh="$ac_aux_dir/install.sh -c"
3435 break
3436 elif test -f $ac_dir/shtool; then
3437 ac_aux_dir=$ac_dir
3438 ac_install_sh="$ac_aux_dir/shtool install -c"
3439 break
3440 fi
3441done
3442if test -z "$ac_aux_dir"; then
3443 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5
3444echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;}
3445 { (exit 1); exit 1; }; }
3446fi
3447ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3448ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3449ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
3450
3451# Make sure we can run config.sub.
3452$ac_config_sub sun4 >/dev/null 2>&1 ||
3453 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
3454echo "$as_me: error: cannot run $ac_config_sub" >&2;}
3455 { (exit 1); exit 1; }; }
3456
3457echo "$as_me:$LINENO: checking build system type" >&5
3458echo $ECHO_N "checking build system type... $ECHO_C" >&6
3459if test "${ac_cv_build+set}" = set; then
3460 echo $ECHO_N "(cached) $ECHO_C" >&6
3461else
3462 ac_cv_build_alias=$build_alias
3463test -z "$ac_cv_build_alias" &&
3464 ac_cv_build_alias=`$ac_config_guess`
3465test -z "$ac_cv_build_alias" &&
3466 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
3467echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
3468 { (exit 1); exit 1; }; }
3469ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
3470 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
3471echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
3472 { (exit 1); exit 1; }; }
3473
3474fi
3475echo "$as_me:$LINENO: result: $ac_cv_build" >&5
3476echo "${ECHO_T}$ac_cv_build" >&6
3477build=$ac_cv_build
3478build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3479build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3480build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3481
3482
3483echo "$as_me:$LINENO: checking host system type" >&5
3484echo $ECHO_N "checking host system type... $ECHO_C" >&6
3485if test "${ac_cv_host+set}" = set; then
3486 echo $ECHO_N "(cached) $ECHO_C" >&6
3487else
3488 ac_cv_host_alias=$host_alias
3489test -z "$ac_cv_host_alias" &&
3490 ac_cv_host_alias=$ac_cv_build_alias
3491ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
3492 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
3493echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
3494 { (exit 1); exit 1; }; }
3495
3496fi
3497echo "$as_me:$LINENO: result: $ac_cv_host" >&5
3498echo "${ECHO_T}$ac_cv_host" >&6
3499host=$ac_cv_host
3500host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3501host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3502host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3503
3504
3505echo "$as_me:$LINENO: checking target system type" >&5
3506echo $ECHO_N "checking target system type... $ECHO_C" >&6
3507if test "${ac_cv_target+set}" = set; then
3508 echo $ECHO_N "(cached) $ECHO_C" >&6
3509else
3510 ac_cv_target_alias=$target_alias
3511test "x$ac_cv_target_alias" = "x" &&
b4e70030
JB
3512 ac_cv_target_alias=$ac_cv_host_alias
3513ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
3514 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
3515echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
bec39cab
AC
3516 { (exit 1); exit 1; }; }
3517
3518fi
783e057b
DJ
3519echo "$as_me:$LINENO: result: $ac_cv_target" >&5
3520echo "${ECHO_T}$ac_cv_target" >&6
3521target=$ac_cv_target
3522target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3523target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3524target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3525
3526
3527# The aliases save the names the user supplied, while $host etc.
3528# will get canonicalized.
3529test -n "$target_alias" &&
3530 test "$program_prefix$program_suffix$program_transform_name" = \
3531 NONENONEs,x,x, &&
3532 program_prefix=${target_alias}-
3533
a417dc56
RW
3534# Dependency checking.
3535rm -rf .tst 2>/dev/null
3536mkdir .tst 2>/dev/null
3537if test -d .tst; then
3538 am__leading_dot=.
3539else
3540 am__leading_dot=_
3541fi
3542rmdir .tst 2>/dev/null
3543
3544DEPDIR="${am__leading_dot}deps"
3545
3546 ac_config_commands="$ac_config_commands depdir"
3547
3548
3549depcc="$CC" am_compiler_list=
3550
3551am_depcomp=$ac_aux_dir/depcomp
3552echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
3553echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
3554if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
3555 echo $ECHO_N "(cached) $ECHO_C" >&6
3556else
3557 if test -f "$am_depcomp"; then
3558 # We make a subdir and do the tests there. Otherwise we can end up
3559 # making bogus files that we don't know about and never remove. For
3560 # instance it was reported that on HP-UX the gcc test will end up
3561 # making a dummy file named `D' -- because `-MD' means `put the output
3562 # in D'.
3563 mkdir conftest.dir
3564 # Copy depcomp to subdir because otherwise we won't find it if we're
3565 # using a relative directory.
3566 cp "$am_depcomp" conftest.dir
3567 cd conftest.dir
3568 # We will build objects and dependencies in a subdirectory because
3569 # it helps to detect inapplicable dependency modes. For instance
3570 # both Tru64's cc and ICC support -MD to output dependencies as a
3571 # side effect of compilation, but ICC will put the dependencies in
3572 # the current directory while Tru64 will put them in the object
3573 # directory.
3574 mkdir sub
3575
3576 am_cv_CC_dependencies_compiler_type=none
3577 if test "$am_compiler_list" = ""; then
3578 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3579 fi
3580 for depmode in $am_compiler_list; do
3581 if test $depmode = none; then break; fi
3582
3583 echo "$as_me:$LINENO: trying $depmode" >&5
3584 # Setup a source with many dependencies, because some compilers
3585 # like to wrap large dependency lists on column 80 (with \), and
3586 # we should not choose a depcomp mode which is confused by this.
3587 #
3588 # We need to recreate these files for each test, as the compiler may
3589 # overwrite some of them when testing with obscure command lines.
3590 # This happens at least with the AIX C compiler.
3591 : > sub/conftest.c
3592 for i in 1 2 3 4 5 6; do
3593 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3594 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3595 # Solaris 8's {/usr,}/bin/sh.
3596 touch sub/conftst$i.h
3597 done
3598 echo "include sub/conftest.Po" > confmf
3599
3600 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3601 # mode. It turns out that the SunPro C++ compiler does not properly
3602 # handle `-M -o', and we need to detect this.
3603 depcmd="depmode=$depmode \
3604 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
3605 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3606 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
3607 echo "| $depcmd" | sed -e 's/ */ /g' >&5
3608 if env $depcmd > conftest.err 2>&1 &&
3609 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
3610 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
3611 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
3612 # icc doesn't choke on unknown options, it will just issue warnings
3613 # or remarks (even with -Werror). So we grep stderr for any message
3614 # that says an option was ignored or not supported.
3615 # When given -MP, icc 7.0 and 7.1 complain thusly:
3616 # icc: Command line warning: ignoring option '-M'; no argument required
3617 # The diagnosis changed in icc 8.0:
3618 # icc: Command line remark: option '-MP' not supported
3619 if (grep 'ignoring option' conftest.err ||
3620 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3621 am_cv_CC_dependencies_compiler_type=$depmode
3622 echo "$as_me:$LINENO: success" >&5
3623 break
3624 fi
3625 fi
3626 echo "$as_me:$LINENO: failure, diagnostics are:" >&5
3627 sed -e 's/^/| /' < conftest.err >&5
3628 done
3629
3630 cd ..
3631 rm -rf conftest.dir
3632else
3633 am_cv_CC_dependencies_compiler_type=none
3634fi
3635
3636fi
3637echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3638echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
3639if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
3640then { { echo "$as_me:$LINENO: error: no usable dependency style found" >&5
3641echo "$as_me: error: no usable dependency style found" >&2;}
3642 { (exit 1); exit 1; }; }
3643else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3644
3645fi
3646
3647
3648# Check for the 'make' the user wants to use.
3649for ac_prog in make
3650do
3651 # Extract the first word of "$ac_prog", so it can be a program name with args.
3652set dummy $ac_prog; ac_word=$2
3653echo "$as_me:$LINENO: checking for $ac_word" >&5
3654echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3655if test "${ac_cv_prog_MAKE+set}" = set; then
3656 echo $ECHO_N "(cached) $ECHO_C" >&6
3657else
3658 if test -n "$MAKE"; then
3659 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
3660else
3661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3662for as_dir in $PATH
3663do
3664 IFS=$as_save_IFS
3665 test -z "$as_dir" && as_dir=.
3666 for ac_exec_ext in '' $ac_executable_extensions; do
3667 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3668 ac_cv_prog_MAKE="$ac_prog"
3669 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3670 break 2
3671 fi
3672done
3673done
3674
3675fi
3676fi
3677MAKE=$ac_cv_prog_MAKE
3678if test -n "$MAKE"; then
3679 echo "$as_me:$LINENO: result: $MAKE" >&5
3680echo "${ECHO_T}$MAKE" >&6
3681else
3682 echo "$as_me:$LINENO: result: no" >&5
3683echo "${ECHO_T}no" >&6
3684fi
3685
3686 test -n "$MAKE" && break
3687done
3688
3689MAKE_IS_GNU=
3690case "`$MAKE --version 2>&1 | sed 1q`" in
3691 *GNU*)
3692 MAKE_IS_GNU=yes
3693 ;;
3694esac
3695
3696
3697if test "$MAKE_IS_GNU" = yes; then
3698 GMAKE_TRUE=
3699 GMAKE_FALSE='#'
3700else
3701 GMAKE_TRUE='#'
3702 GMAKE_FALSE=
3703fi
3704
3705echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3706echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3707set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3708if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3709 echo $ECHO_N "(cached) $ECHO_C" >&6
3710else
3711 cat >conftest.make <<\_ACEOF
3712all:
3713 @echo 'ac_maketemp="$(MAKE)"'
3714_ACEOF
3715# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3716eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3717if test -n "$ac_maketemp"; then
3718 eval ac_cv_prog_make_${ac_make}_set=yes
3719else
3720 eval ac_cv_prog_make_${ac_make}_set=no
3721fi
3722rm -f conftest.make
3723fi
3724if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3725 echo "$as_me:$LINENO: result: yes" >&5
3726echo "${ECHO_T}yes" >&6
3727 SET_MAKE=
3728else
3729 echo "$as_me:$LINENO: result: no" >&5
3730echo "${ECHO_T}no" >&6
3731 SET_MAKE="MAKE=${MAKE-make}"
3732fi
3733
3734
783e057b
DJ
3735
3736CONFIG_OBS=
3737CONFIG_DEPS=
3738CONFIG_SRCS=
3739ENABLE_CFLAGS=
3740
3741CONFIG_ALL=
3742CONFIG_CLEAN=
3743CONFIG_INSTALL=
3744CONFIG_UNINSTALL=
3745
3746# If we haven't got the data from the intl directory,
3747# assume NLS is disabled.
3748USE_NLS=no
3749LIBINTL=
3750LIBINTL_DEP=
3751INCINTL=
3752XGETTEXT=
3753GMSGFMT=
3754POSUB=
3755
3756if test -f ../intl/config.intl; then
3757 . ../intl/config.intl
3758fi
3759echo "$as_me:$LINENO: checking whether NLS is requested" >&5
3760echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
3761if test x"$USE_NLS" != xyes; then
3762 echo "$as_me:$LINENO: result: no" >&5
3763echo "${ECHO_T}no" >&6
3764else
3765 echo "$as_me:$LINENO: result: yes" >&5
3766echo "${ECHO_T}yes" >&6
3767
3768cat >>confdefs.h <<\_ACEOF
3769#define ENABLE_NLS 1
3770_ACEOF
3771
3772
3773 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
3774echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
3775 # Look for .po and .gmo files in the source directory.
3776 CATALOGS=
3777 XLINGUAS=
3778 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
3779 # If there aren't any .gmo files the shell will give us the
3780 # literal string "../path/to/srcdir/po/*.gmo" which has to be
3781 # weeded out.
3782 case "$cat" in *\**)
3783 continue;;
3784 esac
3785 # The quadruple backslash is collapsed to a double backslash
3786 # by the backticks, then collapsed again by the double quotes,
3787 # leaving us with one backslash in the sed expression (right
3788 # before the dot that mustn't act as a wildcard).
3789 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
3790 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
3791 # The user is allowed to set LINGUAS to a list of languages to
3792 # install catalogs for. If it's empty that means "all of them."
3793 if test "x$LINGUAS" = x; then
3794 CATALOGS="$CATALOGS $cat"
3795 XLINGUAS="$XLINGUAS $lang"
3796 else
3797 case "$LINGUAS" in *$lang*)
3798 CATALOGS="$CATALOGS $cat"
3799 XLINGUAS="$XLINGUAS $lang"
3800 ;;
3801 esac
3802 fi
3803 done
3804 LINGUAS="$XLINGUAS"
3805 echo "$as_me:$LINENO: result: $LINGUAS" >&5
3806echo "${ECHO_T}$LINGUAS" >&6
3807
3808
3809 DATADIRNAME=share
3810
3811 INSTOBJEXT=.mo
3812
3813 GENCAT=gencat
3814
3815 CATOBJEXT=.gmo
3816
3817fi
3818
3819localedir='${datadir}/locale'
3820
3821
3822if test x"$USE_NLS" = xyes; then
3823 CONFIG_ALL="$CONFIG_ALL all-po"
3824 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
3825 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
3826 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
3827fi
3828
3829
3830 GNULIB_MEMMEM=0;
3831 GNULIB_MEMPCPY=0;
3832 GNULIB_MEMRCHR=0;
3833 GNULIB_STPCPY=0;
3834 GNULIB_STPNCPY=0;
3835 GNULIB_STRCHRNUL=0;
3836 GNULIB_STRDUP=0;
3837 GNULIB_STRNDUP=0;
3838 GNULIB_STRNLEN=0;
3839 GNULIB_STRPBRK=0;
3840 GNULIB_STRSEP=0;
3841 GNULIB_STRSTR=0;
3842 GNULIB_STRCASESTR=0;
3843 GNULIB_STRTOK_R=0;
3844 GNULIB_MBSLEN=0;
3845 GNULIB_MBSNLEN=0;
3846 GNULIB_MBSCHR=0;
3847 GNULIB_MBSRCHR=0;
3848 GNULIB_MBSSTR=0;
3849 GNULIB_MBSCASECMP=0;
3850 GNULIB_MBSNCASECMP=0;
3851 GNULIB_MBSPCASECMP=0;
3852 GNULIB_MBSCASESTR=0;
3853 GNULIB_MBSCSPN=0;
3854 GNULIB_MBSPBRK=0;
3855 GNULIB_MBSSPN=0;
3856 GNULIB_MBSSEP=0;
3857 GNULIB_MBSTOK_R=0;
3858 GNULIB_STRERROR=0;
3859 GNULIB_STRSIGNAL=0;
3860 HAVE_DECL_MEMMEM=1;
3861 HAVE_MEMPCPY=1;
3862 HAVE_DECL_MEMRCHR=1;
3863 HAVE_STPCPY=1;
3864 HAVE_STPNCPY=1;
3865 HAVE_STRCHRNUL=1;
3866 HAVE_DECL_STRDUP=1;
3867 HAVE_STRNDUP=1;
3868 HAVE_DECL_STRNDUP=1;
3869 HAVE_DECL_STRNLEN=1;
3870 HAVE_STRPBRK=1;
3871 HAVE_STRSEP=1;
3872 HAVE_STRCASESTR=1;
3873 HAVE_DECL_STRTOK_R=1;
3874 HAVE_DECL_STRERROR=1;
3875 HAVE_DECL_STRSIGNAL=1;
3876 REPLACE_STRERROR=0;
3877 REPLACE_STRSIGNAL=0;
3878 REPLACE_MEMMEM=0;
3879 REPLACE_STRCASESTR=0;
3880 REPLACE_STRSTR=0;
3881
3882
3883 echo "$as_me:$LINENO: checking whether memmem is declared" >&5
3884echo $ECHO_N "checking whether memmem is declared... $ECHO_C" >&6
3885if test "${ac_cv_have_decl_memmem+set}" = set; then
3886 echo $ECHO_N "(cached) $ECHO_C" >&6
3887else
3888 cat >conftest.$ac_ext <<_ACEOF
3889/* confdefs.h. */
3890_ACEOF
3891cat confdefs.h >>conftest.$ac_ext
3892cat >>conftest.$ac_ext <<_ACEOF
3893/* end confdefs.h. */
3894$ac_includes_default
3895int
3896main ()
3897{
3898#ifndef memmem
3899 char *p = (char *) memmem;
3900#endif
3901
3902 ;
3903 return 0;
3904}
3905_ACEOF
3906rm -f conftest.$ac_objext
3907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3908 (eval $ac_compile) 2>conftest.er1
3909 ac_status=$?
3910 grep -v '^ *+' conftest.er1 >conftest.err
3911 rm -f conftest.er1
3912 cat conftest.err >&5
3913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3914 (exit $ac_status); } &&
3915 { ac_try='test -z "$ac_c_werror_flag"
3916 || test ! -s conftest.err'
3917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3918 (eval $ac_try) 2>&5
3919 ac_status=$?
3920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3921 (exit $ac_status); }; } &&
3922 { ac_try='test -s conftest.$ac_objext'
3923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3924 (eval $ac_try) 2>&5
3925 ac_status=$?
3926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3927 (exit $ac_status); }; }; then
3928 ac_cv_have_decl_memmem=yes
3929else
3930 echo "$as_me: failed program was:" >&5
3931sed 's/^/| /' conftest.$ac_ext >&5
3932
3933ac_cv_have_decl_memmem=no
3934fi
3935rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3936fi
3937echo "$as_me:$LINENO: result: $ac_cv_have_decl_memmem" >&5
3938echo "${ECHO_T}$ac_cv_have_decl_memmem" >&6
3939if test $ac_cv_have_decl_memmem = yes; then
3940
3941cat >>confdefs.h <<_ACEOF
3942#define HAVE_DECL_MEMMEM 1
3943_ACEOF
3944
3945
3946else
3947 cat >>confdefs.h <<_ACEOF
3948#define HAVE_DECL_MEMMEM 0
3949_ACEOF
3950
3951
3952fi
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968for ac_func in memmem
3969do
3970as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3971echo "$as_me:$LINENO: checking for $ac_func" >&5
3972echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3973if eval "test \"\${$as_ac_var+set}\" = set"; then
3974 echo $ECHO_N "(cached) $ECHO_C" >&6
3975else
3976 cat >conftest.$ac_ext <<_ACEOF
3977/* confdefs.h. */
3978_ACEOF
3979cat confdefs.h >>conftest.$ac_ext
3980cat >>conftest.$ac_ext <<_ACEOF
3981/* end confdefs.h. */
3982/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
3983 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3984#define $ac_func innocuous_$ac_func
3985
3986/* System header to define __stub macros and hopefully few prototypes,
3987 which can conflict with char $ac_func (); below.
3988 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3989 <limits.h> exists even on freestanding compilers. */
3990
3991#ifdef __STDC__
3992# include <limits.h>
3993#else
3994# include <assert.h>
3995#endif
3996
3997#undef $ac_func
3998
3999/* Override any gcc2 internal prototype to avoid an error. */
4000#ifdef __cplusplus
4001extern "C"
4002{
4003#endif
4004/* We use char because int might match the return type of a gcc2
4005 builtin and then its argument prototype would still apply. */
4006char $ac_func ();
4007/* The GNU C library defines this for functions which it implements
4008 to always fail with ENOSYS. Some functions are actually named
4009 something starting with __ and the normal name is an alias. */
4010#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4011choke me
4012#else
4013char (*f) () = $ac_func;
4014#endif
4015#ifdef __cplusplus
4016}
4017#endif
4018
4019int
4020main ()
4021{
4022return f != $ac_func;
4023 ;
4024 return 0;
4025}
4026_ACEOF
4027rm -f conftest.$ac_objext conftest$ac_exeext
4028if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4029 (eval $ac_link) 2>conftest.er1
4030 ac_status=$?
4031 grep -v '^ *+' conftest.er1 >conftest.err
4032 rm -f conftest.er1
4033 cat conftest.err >&5
4034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4035 (exit $ac_status); } &&
4036 { ac_try='test -z "$ac_c_werror_flag"
4037 || test ! -s conftest.err'
4038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4039 (eval $ac_try) 2>&5
4040 ac_status=$?
4041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4042 (exit $ac_status); }; } &&
4043 { ac_try='test -s conftest$ac_exeext'
4044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4045 (eval $ac_try) 2>&5
4046 ac_status=$?
4047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4048 (exit $ac_status); }; }; then
4049 eval "$as_ac_var=yes"
4050else
4051 echo "$as_me: failed program was:" >&5
4052sed 's/^/| /' conftest.$ac_ext >&5
4053
4054eval "$as_ac_var=no"
4055fi
4056rm -f conftest.err conftest.$ac_objext \
4057 conftest$ac_exeext conftest.$ac_ext
4058fi
4059echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4060echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4061if test `eval echo '${'$as_ac_var'}'` = yes; then
4062 cat >>confdefs.h <<_ACEOF
4063#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4064_ACEOF
4065
4066else
4067
4068 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4069
4070fi
4071done
4072
4073
4074
4075 :
4076
4077
4078
4079
4080
4081 if test $ac_cv_have_decl_memmem = no; then
4082 HAVE_DECL_MEMMEM=0
4083 fi
4084 :
4085
4086
4087 echo "$as_me:$LINENO: checking for long long int" >&5
4088echo $ECHO_N "checking for long long int... $ECHO_C" >&6
4089if test "${ac_cv_type_long_long_int+set}" = set; then
4090 echo $ECHO_N "(cached) $ECHO_C" >&6
4091else
4092 cat >conftest.$ac_ext <<_ACEOF
4093
4094 /* confdefs.h. */
4095_ACEOF
4096cat confdefs.h >>conftest.$ac_ext
4097cat >>conftest.$ac_ext <<_ACEOF
4098/* end confdefs.h. */
4099/* For now, do not test the preprocessor; as of 2007 there are too many
4100 implementations with broken preprocessors. Perhaps this can
4101 be revisited in 2012. In the meantime, code should not expect
4102 #if to work with literals wider than 32 bits. */
4103 /* Test literals. */
4104 long long int ll = 9223372036854775807ll;
4105 long long int nll = -9223372036854775807LL;
4106 unsigned long long int ull = 18446744073709551615ULL;
4107 /* Test constant expressions. */
4108 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4109 ? 1 : -1)];
4110 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4111 ? 1 : -1)];
4112 int i = 63;
4113int
4114main ()
4115{
4116/* Test availability of runtime routines for shift and division. */
4117 long long int llmax = 9223372036854775807ll;
4118 unsigned long long int ullmax = 18446744073709551615ull;
4119 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4120 | (llmax / ll) | (llmax % ll)
4121 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4122 | (ullmax / ull) | (ullmax % ull));
4123 ;
4124 return 0;
4125}
4126
4127_ACEOF
4128rm -f conftest.$ac_objext conftest$ac_exeext
4129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4130 (eval $ac_link) 2>conftest.er1
4131 ac_status=$?
4132 grep -v '^ *+' conftest.er1 >conftest.err
4133 rm -f conftest.er1
4134 cat conftest.err >&5
4135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4136 (exit $ac_status); } &&
4137 { ac_try='test -z "$ac_c_werror_flag"
4138 || test ! -s conftest.err'
4139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4140 (eval $ac_try) 2>&5
4141 ac_status=$?
4142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4143 (exit $ac_status); }; } &&
4144 { ac_try='test -s conftest$ac_exeext'
4145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4146 (eval $ac_try) 2>&5
4147 ac_status=$?
4148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4149 (exit $ac_status); }; }; then
4150 if test "$cross_compiling" = yes; then
4151 ac_cv_type_long_long_int=yes
4152else
4153 cat >conftest.$ac_ext <<_ACEOF
4154/* confdefs.h. */
4155_ACEOF
4156cat confdefs.h >>conftest.$ac_ext
4157cat >>conftest.$ac_ext <<_ACEOF
4158/* end confdefs.h. */
4159#include <limits.h>
4160 #ifndef LLONG_MAX
4161 # define HALF \
4162 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4163 # define LLONG_MAX (HALF - 1 + HALF)
4164 #endif
4165int
4166main ()
4167{
4168long long int n = 1;
4169 int i;
4170 for (i = 0; ; i++)
4171 {
4172 long long int m = n << i;
4173 if (m >> i != n)
4174 return 1;
4175 if (LLONG_MAX / 2 < m)
4176 break;
4177 }
4178 return 0;
4179 ;
4180 return 0;
4181}
4182_ACEOF
4183rm -f conftest$ac_exeext
4184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4185 (eval $ac_link) 2>&5
4186 ac_status=$?
4187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4188 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4190 (eval $ac_try) 2>&5
4191 ac_status=$?
4192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4193 (exit $ac_status); }; }; then
4194 ac_cv_type_long_long_int=yes
4195else
4196 echo "$as_me: program exited with status $ac_status" >&5
4197echo "$as_me: failed program was:" >&5
4198sed 's/^/| /' conftest.$ac_ext >&5
4199
4200( exit $ac_status )
4201ac_cv_type_long_long_int=no
4202fi
4203rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4204fi
4205else
4206 echo "$as_me: failed program was:" >&5
4207sed 's/^/| /' conftest.$ac_ext >&5
4208
4209ac_cv_type_long_long_int=no
4210fi
4211rm -f conftest.err conftest.$ac_objext \
4212 conftest$ac_exeext conftest.$ac_ext
4213fi
4214echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
4215echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
4216 if test $ac_cv_type_long_long_int = yes; then
4217
4218cat >>confdefs.h <<\_ACEOF
4219#define HAVE_LONG_LONG_INT 1
4220_ACEOF
4221
4222 fi
4223
4224
4225 echo "$as_me:$LINENO: checking for unsigned long long int" >&5
4226echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6
4227if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
4228 echo $ECHO_N "(cached) $ECHO_C" >&6
4229else
4230 cat >conftest.$ac_ext <<_ACEOF
4231
4232 /* confdefs.h. */
4233_ACEOF
4234cat confdefs.h >>conftest.$ac_ext
4235cat >>conftest.$ac_ext <<_ACEOF
4236/* end confdefs.h. */
4237/* For now, do not test the preprocessor; as of 2007 there are too many
4238 implementations with broken preprocessors. Perhaps this can
4239 be revisited in 2012. In the meantime, code should not expect
4240 #if to work with literals wider than 32 bits. */
4241 /* Test literals. */
4242 long long int ll = 9223372036854775807ll;
4243 long long int nll = -9223372036854775807LL;
4244 unsigned long long int ull = 18446744073709551615ULL;
4245 /* Test constant expressions. */
4246 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4247 ? 1 : -1)];
4248 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4249 ? 1 : -1)];
4250 int i = 63;
4251int
4252main ()
4253{
4254/* Test availability of runtime routines for shift and division. */
4255 long long int llmax = 9223372036854775807ll;
4256 unsigned long long int ullmax = 18446744073709551615ull;
4257 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4258 | (llmax / ll) | (llmax % ll)
4259 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4260 | (ullmax / ull) | (ullmax % ull));
4261 ;
4262 return 0;
4263}
4264
4265_ACEOF
4266rm -f conftest.$ac_objext conftest$ac_exeext
4267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4268 (eval $ac_link) 2>conftest.er1
4269 ac_status=$?
4270 grep -v '^ *+' conftest.er1 >conftest.err
4271 rm -f conftest.er1
4272 cat conftest.err >&5
4273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4274 (exit $ac_status); } &&
4275 { ac_try='test -z "$ac_c_werror_flag"
4276 || test ! -s conftest.err'
4277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4278 (eval $ac_try) 2>&5
4279 ac_status=$?
4280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4281 (exit $ac_status); }; } &&
4282 { ac_try='test -s conftest$ac_exeext'
4283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4284 (eval $ac_try) 2>&5
4285 ac_status=$?
4286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4287 (exit $ac_status); }; }; then
4288 ac_cv_type_unsigned_long_long_int=yes
4289else
4290 echo "$as_me: failed program was:" >&5
4291sed 's/^/| /' conftest.$ac_ext >&5
4292
4293ac_cv_type_unsigned_long_long_int=no
4294fi
4295rm -f conftest.err conftest.$ac_objext \
4296 conftest$ac_exeext conftest.$ac_ext
4297fi
4298echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
4299echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6
4300 if test $ac_cv_type_unsigned_long_long_int = yes; then
4301
4302cat >>confdefs.h <<\_ACEOF
4303#define HAVE_UNSIGNED_LONG_LONG_INT 1
4304_ACEOF
4305
4306 fi
4307
4308
4309
4310 echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5
4311echo $ECHO_N "checking whether the preprocessor supports include_next... $ECHO_C" >&6
4312if test "${gl_cv_have_include_next+set}" = set; then
4313 echo $ECHO_N "(cached) $ECHO_C" >&6
4314else
4315 rm -rf conftestd1 conftestd2
4316 mkdir conftestd1 conftestd2
4317 cat <<EOF > conftestd1/conftest.h
4318#define DEFINED_IN_CONFTESTD1
4319#include_next <conftest.h>
4320#ifdef DEFINED_IN_CONFTESTD2
4321int foo;
4322#else
4323#error "include_next doesn't work"
4324#endif
4325EOF
4326 cat <<EOF > conftestd2/conftest.h
4327#ifndef DEFINED_IN_CONFTESTD1
4328#error "include_next test doesn't work"
4329#endif
4330#define DEFINED_IN_CONFTESTD2
4331EOF
4332 save_CPPFLAGS="$CPPFLAGS"
4333 CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
4334 cat >conftest.$ac_ext <<_ACEOF
4335#include <conftest.h>
4336_ACEOF
4337rm -f conftest.$ac_objext
4338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4339 (eval $ac_compile) 2>conftest.er1
4340 ac_status=$?
4341 grep -v '^ *+' conftest.er1 >conftest.err
4342 rm -f conftest.er1
4343 cat conftest.err >&5
4344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4345 (exit $ac_status); } &&
4346 { ac_try='test -z "$ac_c_werror_flag"
4347 || test ! -s conftest.err'
4348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4349 (eval $ac_try) 2>&5
4350 ac_status=$?
4351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4352 (exit $ac_status); }; } &&
4353 { ac_try='test -s conftest.$ac_objext'
4354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4355 (eval $ac_try) 2>&5
4356 ac_status=$?
4357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4358 (exit $ac_status); }; }; then
4359 gl_cv_have_include_next=yes
4360else
4361 echo "$as_me: failed program was:" >&5
4362sed 's/^/| /' conftest.$ac_ext >&5
4363
4364gl_cv_have_include_next=no
4365fi
4366rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4367 CPPFLAGS="$save_CPPFLAGS"
4368 rm -rf conftestd1 conftestd2
4369
4370fi
4371echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5
4372echo "${ECHO_T}$gl_cv_have_include_next" >&6
4373 if test $gl_cv_have_include_next = yes; then
4374
4375
4376cat >>confdefs.h <<\_ACEOF
4377#define HAVE_INCLUDE_NEXT 1
4378_ACEOF
4379
4380
4381 INCLUDE_NEXT=include_next
4382 else
4383 INCLUDE_NEXT=include
4384 fi
4385
4386
4387
4388
4389
4390
4391
4392for ac_header in $gl_header_list
4393do
4394as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4395if eval "test \"\${$as_ac_Header+set}\" = set"; then
4396 echo "$as_me:$LINENO: checking for $ac_header" >&5
4397echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4398if eval "test \"\${$as_ac_Header+set}\" = set"; then
4399 echo $ECHO_N "(cached) $ECHO_C" >&6
4400fi
4401echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4402echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4403else
4404 # Is the header compilable?
4405echo "$as_me:$LINENO: checking $ac_header usability" >&5
4406echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4407cat >conftest.$ac_ext <<_ACEOF
4408/* confdefs.h. */
4409_ACEOF
4410cat confdefs.h >>conftest.$ac_ext
4411cat >>conftest.$ac_ext <<_ACEOF
4412/* end confdefs.h. */
4413$ac_includes_default
4414#include <$ac_header>
4415_ACEOF
4416rm -f conftest.$ac_objext
4417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4418 (eval $ac_compile) 2>conftest.er1
4419 ac_status=$?
4420 grep -v '^ *+' conftest.er1 >conftest.err
4421 rm -f conftest.er1
4422 cat conftest.err >&5
4423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4424 (exit $ac_status); } &&
4425 { ac_try='test -z "$ac_c_werror_flag"
4426 || test ! -s conftest.err'
4427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4428 (eval $ac_try) 2>&5
4429 ac_status=$?
4430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4431 (exit $ac_status); }; } &&
4432 { ac_try='test -s conftest.$ac_objext'
4433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4434 (eval $ac_try) 2>&5
4435 ac_status=$?
4436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4437 (exit $ac_status); }; }; then
4438 ac_header_compiler=yes
4439else
4440 echo "$as_me: failed program was:" >&5
4441sed 's/^/| /' conftest.$ac_ext >&5
4442
4443ac_header_compiler=no
4444fi
4445rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4446echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4447echo "${ECHO_T}$ac_header_compiler" >&6
4448
4449# Is the header present?
4450echo "$as_me:$LINENO: checking $ac_header presence" >&5
4451echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4452cat >conftest.$ac_ext <<_ACEOF
4453/* confdefs.h. */
4454_ACEOF
4455cat confdefs.h >>conftest.$ac_ext
4456cat >>conftest.$ac_ext <<_ACEOF
4457/* end confdefs.h. */
4458#include <$ac_header>
4459_ACEOF
4460if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4461 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4462 ac_status=$?
4463 grep -v '^ *+' conftest.er1 >conftest.err
4464 rm -f conftest.er1
4465 cat conftest.err >&5
4466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4467 (exit $ac_status); } >/dev/null; then
4468 if test -s conftest.err; then
4469 ac_cpp_err=$ac_c_preproc_warn_flag
4470 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4471 else
4472 ac_cpp_err=
4473 fi
4474else
4475 ac_cpp_err=yes
4476fi
4477if test -z "$ac_cpp_err"; then
4478 ac_header_preproc=yes
4479else
4480 echo "$as_me: failed program was:" >&5
4481sed 's/^/| /' conftest.$ac_ext >&5
4482
4483 ac_header_preproc=no
4484fi
4485rm -f conftest.err conftest.$ac_ext
4486echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4487echo "${ECHO_T}$ac_header_preproc" >&6
4488
4489# So? What about this header?
4490case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4491 yes:no: )
4492 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4493echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4494 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4495echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4496 ac_header_preproc=yes
4497 ;;
4498 no:yes:* )
4499 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4500echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4501 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4502echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4503 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4504echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4505 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4506echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4507 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4508echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4509 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4510echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4511 (
4512 cat <<\_ASBOX
4513## ------------------------------------------ ##
4514## Report this to the AC_PACKAGE_NAME lists. ##
4515## ------------------------------------------ ##
4516_ASBOX
4517 ) |
4518 sed "s/^/$as_me: WARNING: /" >&2
4519 ;;
4520esac
4521echo "$as_me:$LINENO: checking for $ac_header" >&5
4522echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4523if eval "test \"\${$as_ac_Header+set}\" = set"; then
4524 echo $ECHO_N "(cached) $ECHO_C" >&6
4525else
4526 eval "$as_ac_Header=\$ac_header_preproc"
4527fi
4528echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4529echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4530
4531fi
4532if test `eval echo '${'$as_ac_Header'}'` = yes; then
4533 cat >>confdefs.h <<_ACEOF
4534#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4535_ACEOF
4536
4537fi
4538
4539done
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
4553echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6
4554if test "${ac_cv_c_restrict+set}" = set; then
4555 echo $ECHO_N "(cached) $ECHO_C" >&6
4556else
4557 ac_cv_c_restrict=no
4558 # The order here caters to the fact that C++ does not require restrict.
4559 for ac_kw in __restrict __restrict__ _Restrict restrict; do
4560 cat >conftest.$ac_ext <<_ACEOF
4561/* confdefs.h. */
4562_ACEOF
4563cat confdefs.h >>conftest.$ac_ext
4564cat >>conftest.$ac_ext <<_ACEOF
4565/* end confdefs.h. */
4566typedef int * int_ptr;
4567 int foo (int_ptr $ac_kw ip) {
4568 return ip[0];
4569 }
4570int
4571main ()
4572{
4573int s[1];
4574 int * $ac_kw t = s;
4575 t[0] = 0;
4576 return foo(t)
4577 ;
4578 return 0;
4579}
4580_ACEOF
4581rm -f conftest.$ac_objext
4582if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4583 (eval $ac_compile) 2>conftest.er1
4584 ac_status=$?
4585 grep -v '^ *+' conftest.er1 >conftest.err
4586 rm -f conftest.er1
4587 cat conftest.err >&5
4588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4589 (exit $ac_status); } &&
4590 { ac_try='test -z "$ac_c_werror_flag"
4591 || test ! -s conftest.err'
4592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4593 (eval $ac_try) 2>&5
4594 ac_status=$?
4595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4596 (exit $ac_status); }; } &&
4597 { ac_try='test -s conftest.$ac_objext'
4598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4599 (eval $ac_try) 2>&5
4600 ac_status=$?
4601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602 (exit $ac_status); }; }; then
4603 ac_cv_c_restrict=$ac_kw
4604else
4605 echo "$as_me: failed program was:" >&5
4606sed 's/^/| /' conftest.$ac_ext >&5
4607
4608fi
4609rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4610 test "$ac_cv_c_restrict" != no && break
4611 done
4612
4613fi
4614echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5
4615echo "${ECHO_T}$ac_cv_c_restrict" >&6
4616
4617
4618 case $ac_cv_c_restrict in
4619 restrict) ;;
4620 no) cat >>confdefs.h <<\_ACEOF
4621#define restrict
4622_ACEOF
4623 ;;
4624 *) cat >>confdefs.h <<_ACEOF
4625#define restrict $ac_cv_c_restrict
4626_ACEOF
4627 ;;
4628 esac
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642 :
4643
4644
4645
4646
4647
4648
4649
4650 if test $gl_cv_have_include_next = yes; then
4651 gl_cv_next_string_h='<'string.h'>'
4652 else
4653 echo "$as_me:$LINENO: checking absolute name of <string.h>" >&5
4654echo $ECHO_N "checking absolute name of <string.h>... $ECHO_C" >&6
4655if test "${gl_cv_next_string_h+set}" = set; then
4656 echo $ECHO_N "(cached) $ECHO_C" >&6
4657else
4658
4659 if test $ac_cv_header_string_h = yes; then
4660 cat >conftest.$ac_ext <<_ACEOF
4661/* confdefs.h. */
4662_ACEOF
4663cat confdefs.h >>conftest.$ac_ext
4664cat >>conftest.$ac_ext <<_ACEOF
4665/* end confdefs.h. */
4666#include <string.h>
4667
4668_ACEOF
4669 gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4670 sed -n '\#/string.h#{
4671 s#.*"\(.*/string.h\)".*#\1#
4672 s#^/[^/]#//&#
4673 p
4674 q
4675 }'`'"'
4676 else
4677 gl_cv_next_string_h='<'string.h'>'
4678 fi
4679
4680fi
4681echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5
4682echo "${ECHO_T}$gl_cv_next_string_h" >&6
4683 fi
4684 NEXT_STRING_H=$gl_cv_next_string_h
4685
4686
4687
4688
4689
4690 GNULIB_WCWIDTH=0;
4691 HAVE_DECL_WCWIDTH=1;
4692 REPLACE_WCWIDTH=0;
4693 WCHAR_H=
4694
4695
4696
4697
4698
4699if false; then
4700 GL_COND_LIBTOOL_TRUE=
4701 GL_COND_LIBTOOL_FALSE='#'
4702else
4703 GL_COND_LIBTOOL_TRUE='#'
4704 GL_COND_LIBTOOL_FALSE=
4705fi
4706
4707 gl_cond_libtool=false
4708 gl_libdeps=
4709 gl_ltlibdeps=
4710
4711
4712
4713 gl_source_base='gnulib'
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723for ac_func in memchr
4724do
4725as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4726echo "$as_me:$LINENO: checking for $ac_func" >&5
4727echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4728if eval "test \"\${$as_ac_var+set}\" = set"; then
4729 echo $ECHO_N "(cached) $ECHO_C" >&6
4730else
4731 cat >conftest.$ac_ext <<_ACEOF
4732/* confdefs.h. */
4733_ACEOF
4734cat confdefs.h >>conftest.$ac_ext
4735cat >>conftest.$ac_ext <<_ACEOF
4736/* end confdefs.h. */
4737/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4738 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4739#define $ac_func innocuous_$ac_func
4740
4741/* System header to define __stub macros and hopefully few prototypes,
4742 which can conflict with char $ac_func (); below.
4743 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4744 <limits.h> exists even on freestanding compilers. */
4745
4746#ifdef __STDC__
4747# include <limits.h>
4748#else
4749# include <assert.h>
4750#endif
4751
4752#undef $ac_func
4753
4754/* Override any gcc2 internal prototype to avoid an error. */
4755#ifdef __cplusplus
4756extern "C"
4757{
4758#endif
4759/* We use char because int might match the return type of a gcc2
4760 builtin and then its argument prototype would still apply. */
4761char $ac_func ();
4762/* The GNU C library defines this for functions which it implements
4763 to always fail with ENOSYS. Some functions are actually named
4764 something starting with __ and the normal name is an alias. */
4765#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4766choke me
4767#else
4768char (*f) () = $ac_func;
4769#endif
4770#ifdef __cplusplus
4771}
4772#endif
4773
4774int
4775main ()
4776{
4777return f != $ac_func;
4778 ;
4779 return 0;
4780}
4781_ACEOF
4782rm -f conftest.$ac_objext conftest$ac_exeext
4783if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4784 (eval $ac_link) 2>conftest.er1
4785 ac_status=$?
4786 grep -v '^ *+' conftest.er1 >conftest.err
4787 rm -f conftest.er1
4788 cat conftest.err >&5
4789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4790 (exit $ac_status); } &&
4791 { ac_try='test -z "$ac_c_werror_flag"
4792 || test ! -s conftest.err'
4793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4794 (eval $ac_try) 2>&5
4795 ac_status=$?
4796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4797 (exit $ac_status); }; } &&
4798 { ac_try='test -s conftest$ac_exeext'
4799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4800 (eval $ac_try) 2>&5
4801 ac_status=$?
4802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4803 (exit $ac_status); }; }; then
4804 eval "$as_ac_var=yes"
4805else
4806 echo "$as_me: failed program was:" >&5
4807sed 's/^/| /' conftest.$ac_ext >&5
4808
4809eval "$as_ac_var=no"
4810fi
4811rm -f conftest.err conftest.$ac_objext \
4812 conftest$ac_exeext conftest.$ac_ext
4813fi
4814echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4815echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4816if test `eval echo '${'$as_ac_var'}'` = yes; then
4817 cat >>confdefs.h <<_ACEOF
4818#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4819_ACEOF
4820
4821else
4822
4823 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4824
4825fi
4826done
4827
4828
4829 if test $ac_cv_func_memchr = no; then
4830
4831
4832for ac_header in bp-sym.h
4833do
4834as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4835if eval "test \"\${$as_ac_Header+set}\" = set"; then
4836 echo "$as_me:$LINENO: checking for $ac_header" >&5
4837echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4838if eval "test \"\${$as_ac_Header+set}\" = set"; then
4839 echo $ECHO_N "(cached) $ECHO_C" >&6
4840fi
4841echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4842echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4843else
4844 # Is the header compilable?
4845echo "$as_me:$LINENO: checking $ac_header usability" >&5
4846echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4847cat >conftest.$ac_ext <<_ACEOF
4848/* confdefs.h. */
4849_ACEOF
4850cat confdefs.h >>conftest.$ac_ext
4851cat >>conftest.$ac_ext <<_ACEOF
4852/* end confdefs.h. */
4853$ac_includes_default
4854#include <$ac_header>
4855_ACEOF
4856rm -f conftest.$ac_objext
4857if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4858 (eval $ac_compile) 2>conftest.er1
4859 ac_status=$?
4860 grep -v '^ *+' conftest.er1 >conftest.err
4861 rm -f conftest.er1
4862 cat conftest.err >&5
4863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4864 (exit $ac_status); } &&
4865 { ac_try='test -z "$ac_c_werror_flag"
4866 || test ! -s conftest.err'
4867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4868 (eval $ac_try) 2>&5
4869 ac_status=$?
4870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4871 (exit $ac_status); }; } &&
4872 { ac_try='test -s conftest.$ac_objext'
4873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4874 (eval $ac_try) 2>&5
4875 ac_status=$?
4876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4877 (exit $ac_status); }; }; then
4878 ac_header_compiler=yes
4879else
4880 echo "$as_me: failed program was:" >&5
4881sed 's/^/| /' conftest.$ac_ext >&5
4882
4883ac_header_compiler=no
4884fi
4885rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4886echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4887echo "${ECHO_T}$ac_header_compiler" >&6
4888
4889# Is the header present?
4890echo "$as_me:$LINENO: checking $ac_header presence" >&5
4891echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4892cat >conftest.$ac_ext <<_ACEOF
4893/* confdefs.h. */
4894_ACEOF
4895cat confdefs.h >>conftest.$ac_ext
4896cat >>conftest.$ac_ext <<_ACEOF
4897/* end confdefs.h. */
4898#include <$ac_header>
4899_ACEOF
4900if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4901 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4902 ac_status=$?
4903 grep -v '^ *+' conftest.er1 >conftest.err
4904 rm -f conftest.er1
4905 cat conftest.err >&5
4906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4907 (exit $ac_status); } >/dev/null; then
4908 if test -s conftest.err; then
4909 ac_cpp_err=$ac_c_preproc_warn_flag
4910 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4911 else
4912 ac_cpp_err=
4913 fi
4914else
4915 ac_cpp_err=yes
4916fi
4917if test -z "$ac_cpp_err"; then
4918 ac_header_preproc=yes
4919else
4920 echo "$as_me: failed program was:" >&5
4921sed 's/^/| /' conftest.$ac_ext >&5
4922
4923 ac_header_preproc=no
4924fi
4925rm -f conftest.err conftest.$ac_ext
4926echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4927echo "${ECHO_T}$ac_header_preproc" >&6
4928
4929# So? What about this header?
4930case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4931 yes:no: )
4932 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4933echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4934 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4935echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4936 ac_header_preproc=yes
4937 ;;
4938 no:yes:* )
4939 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4940echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4941 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4942echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4943 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4944echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4945 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4946echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4947 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4948echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4949 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4950echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4951 (
4952 cat <<\_ASBOX
4953## ------------------------------------------ ##
4954## Report this to the AC_PACKAGE_NAME lists. ##
4955## ------------------------------------------ ##
4956_ASBOX
4957 ) |
4958 sed "s/^/$as_me: WARNING: /" >&2
4959 ;;
4960esac
4961echo "$as_me:$LINENO: checking for $ac_header" >&5
4962echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4963if eval "test \"\${$as_ac_Header+set}\" = set"; then
4964 echo $ECHO_N "(cached) $ECHO_C" >&6
4965else
4966 eval "$as_ac_Header=\$ac_header_preproc"
4967fi
4968echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4969echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4970
4971fi
4972if test `eval echo '${'$as_ac_Header'}'` = yes; then
4973 cat >>confdefs.h <<_ACEOF
4974#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4975_ACEOF
4976
4977fi
4978
4979done
4980
4981
4982 fi
4983
4984
4985 echo "$as_me:$LINENO: checking for working memcmp" >&5
4986echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
4987if test "${ac_cv_func_memcmp_working+set}" = set; then
4988 echo $ECHO_N "(cached) $ECHO_C" >&6
4989else
4990 if test "$cross_compiling" = yes; then
4991 ac_cv_func_memcmp_working=no
4992else
4993 cat >conftest.$ac_ext <<_ACEOF
4994/* confdefs.h. */
4995_ACEOF
4996cat confdefs.h >>conftest.$ac_ext
4997cat >>conftest.$ac_ext <<_ACEOF
4998/* end confdefs.h. */
4999$ac_includes_default
5000int
5001main ()
5002{
5003
5004 /* Some versions of memcmp are not 8-bit clean. */
5005 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
5006 if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
5007 exit (1);
5008
5009 /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
5010 or more and with at least one buffer not starting on a 4-byte boundary.
5011 William Lewis provided this test program. */
5012 {
5013 char foo[21];
5014 char bar[21];
5015 int i;
5016 for (i = 0; i < 4; i++)
5017 {
5018 char *a = foo + i;
5019 char *b = bar + i;
5020 strcpy (a, "--------01111111");
5021 strcpy (b, "--------10000000");
5022 if (memcmp (a, b, 16) >= 0)
5023 exit (1);
5024 }
5025 exit (0);
5026 }
5027
5028 ;
5029 return 0;
5030}
5031_ACEOF
5032rm -f conftest$ac_exeext
5033if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5034 (eval $ac_link) 2>&5
5035 ac_status=$?
5036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5037 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5039 (eval $ac_try) 2>&5
5040 ac_status=$?
5041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5042 (exit $ac_status); }; }; then
5043 ac_cv_func_memcmp_working=yes
5044else
5045 echo "$as_me: program exited with status $ac_status" >&5
5046echo "$as_me: failed program was:" >&5
5047sed 's/^/| /' conftest.$ac_ext >&5
5048
5049( exit $ac_status )
5050ac_cv_func_memcmp_working=no
5051fi
5052rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5053fi
5054fi
5055echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
5056echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
5057test $ac_cv_func_memcmp_working = no &&
5058
5059
5060
5061
5062
5063
5064 gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext"
5065
5066
5067 if test $ac_cv_func_memcmp_working = no; then
5068
5069cat >>confdefs.h <<\_ACEOF
5070#define memcmp rpl_memcmp
5071_ACEOF
5072
5073 :
5074 fi
5075
5076
5077
5078 if test $ac_cv_have_decl_memmem = yes; then
5079 echo "$as_me:$LINENO: checking whether memmem works in linear time" >&5
5080echo $ECHO_N "checking whether memmem works in linear time... $ECHO_C" >&6
5081if test "${gl_cv_func_memmem_works+set}" = set; then
5082 echo $ECHO_N "(cached) $ECHO_C" >&6
5083else
5084 if test "$cross_compiling" = yes; then
5085 gl_cv_func_memmem_works="guessing no"
5086else
5087 cat >conftest.$ac_ext <<_ACEOF
5088/* confdefs.h. */
5089_ACEOF
5090cat confdefs.h >>conftest.$ac_ext
5091cat >>conftest.$ac_ext <<_ACEOF
5092/* end confdefs.h. */
5093
5094#include <string.h> /* for memmem */
5095#include <stdlib.h> /* for malloc */
5096#include <unistd.h> /* for alarm */
5097
5098int
5099main ()
5100{
5101size_t m = 1000000;
5102 char *haystack = (char *) malloc (2 * m + 1);
5103 char *needle = (char *) malloc (m + 1);
5104 void *result = 0;
5105 /* Failure to compile this test due to missing alarm is okay,
5106 since all such platforms (mingw) also lack memmem. */
5107 alarm (5);
5108 /* Check for quadratic performance. */
5109 if (haystack && needle)
5110 {
5111 memset (haystack, 'A', 2 * m);
5112 haystack[2 * m] = 'B';
5113 memset (needle, 'A', m);
5114 needle[m] = 'B';
5115 result = memmem (haystack, 2 * m + 1, needle, m + 1);
5116 }
5117 /* Check for empty needle behavior. */
5118 return !result || !memmem ("a", 1, 0, 0);
5119 ;
5120 return 0;
5121}
5122_ACEOF
5123rm -f conftest$ac_exeext
5124if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5125 (eval $ac_link) 2>&5
5126 ac_status=$?
5127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5128 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5130 (eval $ac_try) 2>&5
5131 ac_status=$?
5132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5133 (exit $ac_status); }; }; then
5134 gl_cv_func_memmem_works=yes
5135else
5136 echo "$as_me: program exited with status $ac_status" >&5
5137echo "$as_me: failed program was:" >&5
5138sed 's/^/| /' conftest.$ac_ext >&5
5139
5140( exit $ac_status )
5141gl_cv_func_memmem_works=no
5142fi
5143rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5144fi
5145fi
5146echo "$as_me:$LINENO: result: $gl_cv_func_memmem_works" >&5
5147echo "${ECHO_T}$gl_cv_func_memmem_works" >&6
5148 if test "$gl_cv_func_memmem_works" != yes; then
5149 REPLACE_MEMMEM=1
5150
5151
5152
5153
5154
5155
5156
5157 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
5158
5159 fi
5160 fi
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174for ac_func in memmem
5175do
5176as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5177echo "$as_me:$LINENO: checking for $ac_func" >&5
5178echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5179if eval "test \"\${$as_ac_var+set}\" = set"; then
5180 echo $ECHO_N "(cached) $ECHO_C" >&6
5181else
5182 cat >conftest.$ac_ext <<_ACEOF
5183/* confdefs.h. */
5184_ACEOF
5185cat confdefs.h >>conftest.$ac_ext
5186cat >>conftest.$ac_ext <<_ACEOF
5187/* end confdefs.h. */
5188/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5189 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5190#define $ac_func innocuous_$ac_func
5191
5192/* System header to define __stub macros and hopefully few prototypes,
5193 which can conflict with char $ac_func (); below.
5194 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5195 <limits.h> exists even on freestanding compilers. */
5196
5197#ifdef __STDC__
5198# include <limits.h>
5199#else
5200# include <assert.h>
5201#endif
5202
5203#undef $ac_func
5204
5205/* Override any gcc2 internal prototype to avoid an error. */
5206#ifdef __cplusplus
5207extern "C"
5208{
5209#endif
5210/* We use char because int might match the return type of a gcc2
5211 builtin and then its argument prototype would still apply. */
5212char $ac_func ();
5213/* The GNU C library defines this for functions which it implements
5214 to always fail with ENOSYS. Some functions are actually named
5215 something starting with __ and the normal name is an alias. */
5216#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5217choke me
5218#else
5219char (*f) () = $ac_func;
5220#endif
5221#ifdef __cplusplus
5222}
5223#endif
5224
5225int
5226main ()
5227{
5228return f != $ac_func;
5229 ;
5230 return 0;
5231}
5232_ACEOF
5233rm -f conftest.$ac_objext conftest$ac_exeext
5234if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5235 (eval $ac_link) 2>conftest.er1
5236 ac_status=$?
5237 grep -v '^ *+' conftest.er1 >conftest.err
5238 rm -f conftest.er1
5239 cat conftest.err >&5
5240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5241 (exit $ac_status); } &&
5242 { ac_try='test -z "$ac_c_werror_flag"
5243 || test ! -s conftest.err'
5244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5245 (eval $ac_try) 2>&5
5246 ac_status=$?
5247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5248 (exit $ac_status); }; } &&
5249 { ac_try='test -s conftest$ac_exeext'
5250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5251 (eval $ac_try) 2>&5
5252 ac_status=$?
5253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5254 (exit $ac_status); }; }; then
5255 eval "$as_ac_var=yes"
5256else
5257 echo "$as_me: failed program was:" >&5
5258sed 's/^/| /' conftest.$ac_ext >&5
5259
5260eval "$as_ac_var=no"
5261fi
5262rm -f conftest.err conftest.$ac_objext \
5263 conftest$ac_exeext conftest.$ac_ext
5264fi
5265echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5266echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5267if test `eval echo '${'$as_ac_var'}'` = yes; then
5268 cat >>confdefs.h <<_ACEOF
5269#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5270_ACEOF
5271
5272else
5273
5274 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5275
5276fi
5277done
5278
5279
5280
5281 :
5282
5283
5284
5285
5286
5287 if test $ac_cv_have_decl_memmem = no; then
5288 HAVE_DECL_MEMMEM=0
5289 fi
5290 :
5291
5292
5293
5294 GNULIB_MEMMEM=1
5295
5296
5297
5298
5299 if test $ac_cv_type_long_long_int = yes; then
5300 HAVE_LONG_LONG_INT=1
5301 else
5302 HAVE_LONG_LONG_INT=0
5303 fi
5304
5305
5306 if test $ac_cv_type_unsigned_long_long_int = yes; then
5307 HAVE_UNSIGNED_LONG_LONG_INT=1
5308 else
5309 HAVE_UNSIGNED_LONG_LONG_INT=0
5310 fi
5311
5312
5313 if test $ac_cv_header_inttypes_h = yes; then
5314 HAVE_INTTYPES_H=1
5315 else
5316 HAVE_INTTYPES_H=0
5317 fi
5318
5319
5320 if test $ac_cv_header_sys_types_h = yes; then
5321 HAVE_SYS_TYPES_H=1
5322 else
5323 HAVE_SYS_TYPES_H=0
5324 fi
5325
5326
5327
5328
5329
5330 :
5331
5332
5333
5334
5335
5336
5337
5338 if test $gl_cv_have_include_next = yes; then
5339 gl_cv_next_stdint_h='<'stdint.h'>'
5340 else
5341 echo "$as_me:$LINENO: checking absolute name of <stdint.h>" >&5
5342echo $ECHO_N "checking absolute name of <stdint.h>... $ECHO_C" >&6
5343if test "${gl_cv_next_stdint_h+set}" = set; then
5344 echo $ECHO_N "(cached) $ECHO_C" >&6
5345else
5346
5347 if test $ac_cv_header_stdint_h = yes; then
5348 cat >conftest.$ac_ext <<_ACEOF
5349/* confdefs.h. */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h. */
5354#include <stdint.h>
5355
5356_ACEOF
5357 gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5358 sed -n '\#/stdint.h#{
5359 s#.*"\(.*/stdint.h\)".*#\1#
5360 s#^/[^/]#//&#
5361 p
5362 q
5363 }'`'"'
5364 else
5365 gl_cv_next_stdint_h='<'stdint.h'>'
5366 fi
5367
5368fi
5369echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5
5370echo "${ECHO_T}$gl_cv_next_stdint_h" >&6
5371 fi
5372 NEXT_STDINT_H=$gl_cv_next_stdint_h
5373
5374
5375
5376 if test $ac_cv_header_stdint_h = yes; then
5377 HAVE_STDINT_H=1
5378 else
5379 HAVE_STDINT_H=0
5380 fi
5381
5382
5383 if test $ac_cv_header_stdint_h = yes; then
5384 echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5
5385echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6
5386if test "${gl_cv_header_working_stdint_h+set}" = set; then
5387 echo $ECHO_N "(cached) $ECHO_C" >&6
5388else
5389 gl_cv_header_working_stdint_h=no
5390 cat >conftest.$ac_ext <<_ACEOF
5391
5392 /* confdefs.h. */
5393_ACEOF
5394cat confdefs.h >>conftest.$ac_ext
5395cat >>conftest.$ac_ext <<_ACEOF
5396/* end confdefs.h. */
5397
5398#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
5399#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
5400#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5401#include <stdint.h>
5402/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
5403#if !(defined WCHAR_MIN && defined WCHAR_MAX)
5404#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
5405#endif
5406
5407
5408 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5409 included before <wchar.h>. */
5410 #include <stddef.h>
5411 #include <signal.h>
5412 #if HAVE_WCHAR_H
5413 # include <stdio.h>
5414 # include <time.h>
5415 # include <wchar.h>
5416 #endif
5417
5418
5419#ifdef INT8_MAX
5420int8_t a1 = INT8_MAX;
5421int8_t a1min = INT8_MIN;
5422#endif
5423#ifdef INT16_MAX
5424int16_t a2 = INT16_MAX;
5425int16_t a2min = INT16_MIN;
5426#endif
5427#ifdef INT32_MAX
5428int32_t a3 = INT32_MAX;
5429int32_t a3min = INT32_MIN;
5430#endif
5431#ifdef INT64_MAX
5432int64_t a4 = INT64_MAX;
5433int64_t a4min = INT64_MIN;
5434#endif
5435#ifdef UINT8_MAX
5436uint8_t b1 = UINT8_MAX;
5437#else
5438typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
5439#endif
5440#ifdef UINT16_MAX
5441uint16_t b2 = UINT16_MAX;
5442#endif
5443#ifdef UINT32_MAX
5444uint32_t b3 = UINT32_MAX;
5445#endif
5446#ifdef UINT64_MAX
5447uint64_t b4 = UINT64_MAX;
5448#endif
5449int_least8_t c1 = INT8_C (0x7f);
5450int_least8_t c1max = INT_LEAST8_MAX;
5451int_least8_t c1min = INT_LEAST8_MIN;
5452int_least16_t c2 = INT16_C (0x7fff);
5453int_least16_t c2max = INT_LEAST16_MAX;
5454int_least16_t c2min = INT_LEAST16_MIN;
5455int_least32_t c3 = INT32_C (0x7fffffff);
5456int_least32_t c3max = INT_LEAST32_MAX;
5457int_least32_t c3min = INT_LEAST32_MIN;
5458int_least64_t c4 = INT64_C (0x7fffffffffffffff);
5459int_least64_t c4max = INT_LEAST64_MAX;
5460int_least64_t c4min = INT_LEAST64_MIN;
5461uint_least8_t d1 = UINT8_C (0xff);
5462uint_least8_t d1max = UINT_LEAST8_MAX;
5463uint_least16_t d2 = UINT16_C (0xffff);
5464uint_least16_t d2max = UINT_LEAST16_MAX;
5465uint_least32_t d3 = UINT32_C (0xffffffff);
5466uint_least32_t d3max = UINT_LEAST32_MAX;
5467uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
5468uint_least64_t d4max = UINT_LEAST64_MAX;
5469int_fast8_t e1 = INT_FAST8_MAX;
5470int_fast8_t e1min = INT_FAST8_MIN;
5471int_fast16_t e2 = INT_FAST16_MAX;
5472int_fast16_t e2min = INT_FAST16_MIN;
5473int_fast32_t e3 = INT_FAST32_MAX;
5474int_fast32_t e3min = INT_FAST32_MIN;
5475int_fast64_t e4 = INT_FAST64_MAX;
5476int_fast64_t e4min = INT_FAST64_MIN;
5477uint_fast8_t f1 = UINT_FAST8_MAX;
5478uint_fast16_t f2 = UINT_FAST16_MAX;
5479uint_fast32_t f3 = UINT_FAST32_MAX;
5480uint_fast64_t f4 = UINT_FAST64_MAX;
5481#ifdef INTPTR_MAX
5482intptr_t g = INTPTR_MAX;
5483intptr_t gmin = INTPTR_MIN;
5484#endif
5485#ifdef UINTPTR_MAX
5486uintptr_t h = UINTPTR_MAX;
5487#endif
5488intmax_t i = INTMAX_MAX;
5489uintmax_t j = UINTMAX_MAX;
5490
5491#include <limits.h> /* for CHAR_BIT */
5492#define TYPE_MINIMUM(t) \
5493 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
5494#define TYPE_MAXIMUM(t) \
5495 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
5496struct s {
5497 int check_PTRDIFF:
5498 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
5499 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
5500 ? 1 : -1;
5501 /* Detect bug in FreeBSD 6.0 / ia64. */
5502 int check_SIG_ATOMIC:
5503 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
5504 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
5505 ? 1 : -1;
5506 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
5507 int check_WCHAR:
5508 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
5509 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
5510 ? 1 : -1;
5511 /* Detect bug in mingw. */
5512 int check_WINT:
5513 WINT_MIN == TYPE_MINIMUM (wint_t)
5514 && WINT_MAX == TYPE_MAXIMUM (wint_t)
5515 ? 1 : -1;
5516
5517 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
5518 int check_UINT8_C:
5519 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
5520 int check_UINT16_C:
5521 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
5522
5523 /* Detect bugs in OpenBSD 3.9 stdint.h. */
5524#ifdef UINT8_MAX
5525 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
5526#endif
5527#ifdef UINT16_MAX
5528 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
5529#endif
5530#ifdef UINT32_MAX
5531 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
5532#endif
5533#ifdef UINT64_MAX
5534 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
5535#endif
5536 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
5537 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
5538 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
5539 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
5540 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
5541 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
5542 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
5543 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
5544 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
5545 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
5546 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
5547};
5548
5549int
5550main ()
5551{
5552
5553 ;
5554 return 0;
5555}
5556_ACEOF
5557rm -f conftest.$ac_objext
5558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5559 (eval $ac_compile) 2>conftest.er1
5560 ac_status=$?
5561 grep -v '^ *+' conftest.er1 >conftest.err
5562 rm -f conftest.er1
5563 cat conftest.err >&5
5564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5565 (exit $ac_status); } &&
5566 { ac_try='test -z "$ac_c_werror_flag"
5567 || test ! -s conftest.err'
5568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5569 (eval $ac_try) 2>&5
5570 ac_status=$?
5571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5572 (exit $ac_status); }; } &&
5573 { ac_try='test -s conftest.$ac_objext'
5574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5575 (eval $ac_try) 2>&5
5576 ac_status=$?
5577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578 (exit $ac_status); }; }; then
5579 gl_cv_header_working_stdint_h=yes
5580else
5581 echo "$as_me: failed program was:" >&5
5582sed 's/^/| /' conftest.$ac_ext >&5
5583
5584fi
5585rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5586fi
5587echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5
5588echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6
5589 fi
5590 if test "$gl_cv_header_working_stdint_h" = yes; then
5591 STDINT_H=
5592 else
5593
5594
5595for ac_header in sys/inttypes.h sys/bitypes.h
5596do
5597as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5598if eval "test \"\${$as_ac_Header+set}\" = set"; then
5599 echo "$as_me:$LINENO: checking for $ac_header" >&5
5600echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5601if eval "test \"\${$as_ac_Header+set}\" = set"; then
5602 echo $ECHO_N "(cached) $ECHO_C" >&6
5603fi
5604echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5605echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5606else
5607 # Is the header compilable?
5608echo "$as_me:$LINENO: checking $ac_header usability" >&5
5609echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5610cat >conftest.$ac_ext <<_ACEOF
5611/* confdefs.h. */
5612_ACEOF
5613cat confdefs.h >>conftest.$ac_ext
5614cat >>conftest.$ac_ext <<_ACEOF
5615/* end confdefs.h. */
5616$ac_includes_default
5617#include <$ac_header>
5618_ACEOF
5619rm -f conftest.$ac_objext
5620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5621 (eval $ac_compile) 2>conftest.er1
5622 ac_status=$?
5623 grep -v '^ *+' conftest.er1 >conftest.err
5624 rm -f conftest.er1
5625 cat conftest.err >&5
5626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627 (exit $ac_status); } &&
5628 { ac_try='test -z "$ac_c_werror_flag"
5629 || test ! -s conftest.err'
5630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5631 (eval $ac_try) 2>&5
5632 ac_status=$?
5633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5634 (exit $ac_status); }; } &&
5635 { ac_try='test -s conftest.$ac_objext'
5636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5637 (eval $ac_try) 2>&5
5638 ac_status=$?
5639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5640 (exit $ac_status); }; }; then
5641 ac_header_compiler=yes
5642else
5643 echo "$as_me: failed program was:" >&5
5644sed 's/^/| /' conftest.$ac_ext >&5
5645
5646ac_header_compiler=no
5647fi
5648rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5649echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5650echo "${ECHO_T}$ac_header_compiler" >&6
5651
5652# Is the header present?
5653echo "$as_me:$LINENO: checking $ac_header presence" >&5
5654echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5655cat >conftest.$ac_ext <<_ACEOF
5656/* confdefs.h. */
5657_ACEOF
5658cat confdefs.h >>conftest.$ac_ext
5659cat >>conftest.$ac_ext <<_ACEOF
5660/* end confdefs.h. */
5661#include <$ac_header>
5662_ACEOF
5663if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5664 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5665 ac_status=$?
5666 grep -v '^ *+' conftest.er1 >conftest.err
5667 rm -f conftest.er1
5668 cat conftest.err >&5
5669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5670 (exit $ac_status); } >/dev/null; then
5671 if test -s conftest.err; then
5672 ac_cpp_err=$ac_c_preproc_warn_flag
5673 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5674 else
5675 ac_cpp_err=
5676 fi
5677else
5678 ac_cpp_err=yes
5679fi
5680if test -z "$ac_cpp_err"; then
5681 ac_header_preproc=yes
5682else
5683 echo "$as_me: failed program was:" >&5
5684sed 's/^/| /' conftest.$ac_ext >&5
5685
5686 ac_header_preproc=no
5687fi
5688rm -f conftest.err conftest.$ac_ext
5689echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5690echo "${ECHO_T}$ac_header_preproc" >&6
5691
5692# So? What about this header?
5693case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5694 yes:no: )
5695 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5696echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5697 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5698echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5699 ac_header_preproc=yes
5700 ;;
5701 no:yes:* )
5702 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5703echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5704 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5705echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5706 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5707echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5708 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5709echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5710 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5711echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5712 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5713echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5714 (
5715 cat <<\_ASBOX
5716## ------------------------------------------ ##
5717## Report this to the AC_PACKAGE_NAME lists. ##
5718## ------------------------------------------ ##
5719_ASBOX
5720 ) |
5721 sed "s/^/$as_me: WARNING: /" >&2
5722 ;;
5723esac
5724echo "$as_me:$LINENO: checking for $ac_header" >&5
5725echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5726if eval "test \"\${$as_ac_Header+set}\" = set"; then
5727 echo $ECHO_N "(cached) $ECHO_C" >&6
5728else
5729 eval "$as_ac_Header=\$ac_header_preproc"
5730fi
5731echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5732echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5733
5734fi
5735if test `eval echo '${'$as_ac_Header'}'` = yes; then
5736 cat >>confdefs.h <<_ACEOF
5737#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5738_ACEOF
5739
5740fi
5741
5742done
5743
5744 if test $ac_cv_header_sys_inttypes_h = yes; then
5745 HAVE_SYS_INTTYPES_H=1
5746 else
5747 HAVE_SYS_INTTYPES_H=0
5748 fi
5749
5750 if test $ac_cv_header_sys_bitypes_h = yes; then
5751 HAVE_SYS_BITYPES_H=1
5752 else
5753 HAVE_SYS_BITYPES_H=0
5754 fi
5755
5756
5757
5758 :
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
5774 echo "$as_me:$LINENO: checking for bit size of $gltype" >&5
5775echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6
5776if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\" = set"; then
5777 echo $ECHO_N "(cached) $ECHO_C" >&6
5778else
5779 if test "$cross_compiling" = yes; then
5780 # Depending upon the size, compute the lo and hi bounds.
5781cat >conftest.$ac_ext <<_ACEOF
5782/* confdefs.h. */
5783_ACEOF
5784cat confdefs.h >>conftest.$ac_ext
5785cat >>conftest.$ac_ext <<_ACEOF
5786/* end confdefs.h. */
5787
5788 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5789 included before <wchar.h>. */
5790 #include <stddef.h>
5791 #include <signal.h>
5792 #if HAVE_WCHAR_H
5793 # include <stdio.h>
5794 # include <time.h>
5795 # include <wchar.h>
5796 #endif
5797
5798#include <limits.h>
5799int
5800main ()
5801{
5802static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)];
5803test_array [0] = 0
5804
5805 ;
5806 return 0;
5807}
5808_ACEOF
5809rm -f conftest.$ac_objext
5810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5811 (eval $ac_compile) 2>conftest.er1
5812 ac_status=$?
5813 grep -v '^ *+' conftest.er1 >conftest.err
5814 rm -f conftest.er1
5815 cat conftest.err >&5
5816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5817 (exit $ac_status); } &&
5818 { ac_try='test -z "$ac_c_werror_flag"
5819 || test ! -s conftest.err'
5820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5821 (eval $ac_try) 2>&5
5822 ac_status=$?
5823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5824 (exit $ac_status); }; } &&
5825 { ac_try='test -s conftest.$ac_objext'
5826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5827 (eval $ac_try) 2>&5
5828 ac_status=$?
5829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830 (exit $ac_status); }; }; then
5831 ac_lo=0 ac_mid=0
5832 while :; do
5833 cat >conftest.$ac_ext <<_ACEOF
5834/* confdefs.h. */
5835_ACEOF
5836cat confdefs.h >>conftest.$ac_ext
5837cat >>conftest.$ac_ext <<_ACEOF
5838/* end confdefs.h. */
5839
5840 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5841 included before <wchar.h>. */
5842 #include <stddef.h>
5843 #include <signal.h>
5844 #if HAVE_WCHAR_H
5845 # include <stdio.h>
5846 # include <time.h>
5847 # include <wchar.h>
5848 #endif
5849
5850#include <limits.h>
5851int
5852main ()
5853{
5854static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
5855test_array [0] = 0
5856
5857 ;
5858 return 0;
5859}
5860_ACEOF
5861rm -f conftest.$ac_objext
5862if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5863 (eval $ac_compile) 2>conftest.er1
5864 ac_status=$?
5865 grep -v '^ *+' conftest.er1 >conftest.err
5866 rm -f conftest.er1
5867 cat conftest.err >&5
5868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5869 (exit $ac_status); } &&
5870 { ac_try='test -z "$ac_c_werror_flag"
5871 || test ! -s conftest.err'
5872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5873 (eval $ac_try) 2>&5
5874 ac_status=$?
5875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5876 (exit $ac_status); }; } &&
5877 { ac_try='test -s conftest.$ac_objext'
5878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5879 (eval $ac_try) 2>&5
5880 ac_status=$?
5881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5882 (exit $ac_status); }; }; then
5883 ac_hi=$ac_mid; break
5884else
5885 echo "$as_me: failed program was:" >&5
5886sed 's/^/| /' conftest.$ac_ext >&5
5887
5888ac_lo=`expr $ac_mid + 1`
5889 if test $ac_lo -le $ac_mid; then
5890 ac_lo= ac_hi=
5891 break
5892 fi
5893 ac_mid=`expr 2 '*' $ac_mid + 1`
5894fi
5895rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5896 done
5897else
5898 echo "$as_me: failed program was:" >&5
5899sed 's/^/| /' conftest.$ac_ext >&5
5900
5901cat >conftest.$ac_ext <<_ACEOF
5902/* confdefs.h. */
5903_ACEOF
5904cat confdefs.h >>conftest.$ac_ext
5905cat >>conftest.$ac_ext <<_ACEOF
5906/* end confdefs.h. */
5907
5908 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5909 included before <wchar.h>. */
5910 #include <stddef.h>
5911 #include <signal.h>
5912 #if HAVE_WCHAR_H
5913 # include <stdio.h>
5914 # include <time.h>
5915 # include <wchar.h>
5916 #endif
5917
5918#include <limits.h>
5919int
5920main ()
5921{
5922static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)];
5923test_array [0] = 0
5924
5925 ;
5926 return 0;
5927}
5928_ACEOF
5929rm -f conftest.$ac_objext
5930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5931 (eval $ac_compile) 2>conftest.er1
5932 ac_status=$?
5933 grep -v '^ *+' conftest.er1 >conftest.err
5934 rm -f conftest.er1
5935 cat conftest.err >&5
5936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5937 (exit $ac_status); } &&
5938 { ac_try='test -z "$ac_c_werror_flag"
5939 || test ! -s conftest.err'
5940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5941 (eval $ac_try) 2>&5
5942 ac_status=$?
5943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5944 (exit $ac_status); }; } &&
5945 { ac_try='test -s conftest.$ac_objext'
5946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5947 (eval $ac_try) 2>&5
5948 ac_status=$?
5949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5950 (exit $ac_status); }; }; then
5951 ac_hi=-1 ac_mid=-1
5952 while :; do
5953 cat >conftest.$ac_ext <<_ACEOF
5954/* confdefs.h. */
5955_ACEOF
5956cat confdefs.h >>conftest.$ac_ext
5957cat >>conftest.$ac_ext <<_ACEOF
5958/* end confdefs.h. */
5959
5960 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5961 included before <wchar.h>. */
5962 #include <stddef.h>
5963 #include <signal.h>
5964 #if HAVE_WCHAR_H
5965 # include <stdio.h>
5966 # include <time.h>
5967 # include <wchar.h>
5968 #endif
5969
5970#include <limits.h>
5971int
5972main ()
5973{
5974static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)];
5975test_array [0] = 0
5976
5977 ;
5978 return 0;
5979}
5980_ACEOF
5981rm -f conftest.$ac_objext
5982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5983 (eval $ac_compile) 2>conftest.er1
5984 ac_status=$?
5985 grep -v '^ *+' conftest.er1 >conftest.err
5986 rm -f conftest.er1
5987 cat conftest.err >&5
5988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5989 (exit $ac_status); } &&
5990 { ac_try='test -z "$ac_c_werror_flag"
5991 || test ! -s conftest.err'
5992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5993 (eval $ac_try) 2>&5
5994 ac_status=$?
5995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5996 (exit $ac_status); }; } &&
5997 { ac_try='test -s conftest.$ac_objext'
5998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5999 (eval $ac_try) 2>&5
6000 ac_status=$?
6001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6002 (exit $ac_status); }; }; then
6003 ac_lo=$ac_mid; break
6004else
6005 echo "$as_me: failed program was:" >&5
6006sed 's/^/| /' conftest.$ac_ext >&5
6007
6008ac_hi=`expr '(' $ac_mid ')' - 1`
6009 if test $ac_mid -le $ac_hi; then
6010 ac_lo= ac_hi=
6011 break
6012 fi
6013 ac_mid=`expr 2 '*' $ac_mid`
6014fi
6015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6016 done
6017else
6018 echo "$as_me: failed program was:" >&5
6019sed 's/^/| /' conftest.$ac_ext >&5
6020
6021ac_lo= ac_hi=
6022fi
6023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6024fi
6025rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6026# Binary search between lo and hi bounds.
6027while test "x$ac_lo" != "x$ac_hi"; do
6028 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6029 cat >conftest.$ac_ext <<_ACEOF
6030/* confdefs.h. */
6031_ACEOF
6032cat confdefs.h >>conftest.$ac_ext
6033cat >>conftest.$ac_ext <<_ACEOF
6034/* end confdefs.h. */
6035
6036 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6037 included before <wchar.h>. */
6038 #include <stddef.h>
6039 #include <signal.h>
6040 #if HAVE_WCHAR_H
6041 # include <stdio.h>
6042 # include <time.h>
6043 # include <wchar.h>
6044 #endif
6045
6046#include <limits.h>
6047int
6048main ()
6049{
6050static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
6051test_array [0] = 0
6052
6053 ;
6054 return 0;
6055}
6056_ACEOF
6057rm -f conftest.$ac_objext
6058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6059 (eval $ac_compile) 2>conftest.er1
6060 ac_status=$?
6061 grep -v '^ *+' conftest.er1 >conftest.err
6062 rm -f conftest.er1
6063 cat conftest.err >&5
6064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6065 (exit $ac_status); } &&
6066 { ac_try='test -z "$ac_c_werror_flag"
6067 || test ! -s conftest.err'
6068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6069 (eval $ac_try) 2>&5
6070 ac_status=$?
6071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6072 (exit $ac_status); }; } &&
6073 { ac_try='test -s conftest.$ac_objext'
6074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6075 (eval $ac_try) 2>&5
6076 ac_status=$?
6077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6078 (exit $ac_status); }; }; then
6079 ac_hi=$ac_mid
6080else
6081 echo "$as_me: failed program was:" >&5
6082sed 's/^/| /' conftest.$ac_ext >&5
6083
6084ac_lo=`expr '(' $ac_mid ')' + 1`
6085fi
6086rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6087done
6088case $ac_lo in
6089?*) result=$ac_lo;;
6090'') result=unknown ;;
6091esac
6092else
6093 if test "$cross_compiling" = yes; then
d5af19ba
DJ
6094 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6095echo "$as_me: error: in \`$ac_pwd':" >&2;}
6096{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
783e057b
DJ
6097See \`config.log' for more details." >&5
6098echo "$as_me: error: cannot run test program while cross compiling
6099See \`config.log' for more details." >&2;}
d5af19ba 6100 { (exit 1); exit 1; }; }; }
783e057b
DJ
6101else
6102 cat >conftest.$ac_ext <<_ACEOF
6103/* confdefs.h. */
6104_ACEOF
6105cat confdefs.h >>conftest.$ac_ext
6106cat >>conftest.$ac_ext <<_ACEOF
6107/* end confdefs.h. */
6108
6109 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6110 included before <wchar.h>. */
6111 #include <stddef.h>
6112 #include <signal.h>
6113 #if HAVE_WCHAR_H
6114 # include <stdio.h>
6115 # include <time.h>
6116 # include <wchar.h>
6117 #endif
6118
6119#include <limits.h>
6120long longval () { return sizeof ($gltype) * CHAR_BIT; }
6121unsigned long ulongval () { return sizeof ($gltype) * CHAR_BIT; }
6122#include <stdio.h>
6123#include <stdlib.h>
6124int
6125main ()
6126{
6127
6128 FILE *f = fopen ("conftest.val", "w");
6129 if (! f)
6130 exit (1);
6131 if ((sizeof ($gltype) * CHAR_BIT) < 0)
6132 {
6133 long i = longval ();
6134 if (i != (sizeof ($gltype) * CHAR_BIT))
6135 exit (1);
6136 fprintf (f, "%ld\n", i);
6137 }
6138 else
6139 {
6140 unsigned long i = ulongval ();
6141 if (i != (sizeof ($gltype) * CHAR_BIT))
6142 exit (1);
6143 fprintf (f, "%lu\n", i);
6144 }
6145 exit (ferror (f) || fclose (f) != 0);
6146
6147 ;
6148 return 0;
6149}
6150_ACEOF
6151rm -f conftest$ac_exeext
6152if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6153 (eval $ac_link) 2>&5
6154 ac_status=$?
6155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6156 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6158 (eval $ac_try) 2>&5
6159 ac_status=$?
6160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6161 (exit $ac_status); }; }; then
6162 result=`cat conftest.val`
6163else
6164 echo "$as_me: program exited with status $ac_status" >&5
6165echo "$as_me: failed program was:" >&5
6166sed 's/^/| /' conftest.$ac_ext >&5
6167
6168( exit $ac_status )
6169result=unknown
6170fi
6171rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6172fi
6173fi
6174rm -f conftest.val
6175 eval gl_cv_bitsizeof_${gltype}=\$result
c906108c 6176
783e057b
DJ
6177fi
6178echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&5
6179echo "${ECHO_T}`eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&6
6180 eval result=\$gl_cv_bitsizeof_${gltype}
6181 if test $result = unknown; then
6182 result=0
6183 fi
6184 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6185 cat >>confdefs.h <<_ACEOF
6186#define BITSIZEOF_${GLTYPE} $result
6187_ACEOF
c906108c 6188
783e057b
DJ
6189 eval BITSIZEOF_${GLTYPE}=\$result
6190 done
c906108c 6191
c906108c 6192
c906108c 6193
bec39cab 6194
3841debe 6195
783e057b
DJ
6196
6197
6198 for gltype in sig_atomic_t wchar_t wint_t ; do
6199 echo "$as_me:$LINENO: checking whether $gltype is signed" >&5
6200echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6
6201if eval "test \"\${gl_cv_type_${gltype}_signed+set}\" = set"; then
6202 echo $ECHO_N "(cached) $ECHO_C" >&6
6203else
6204 cat >conftest.$ac_ext <<_ACEOF
6205/* confdefs.h. */
6206_ACEOF
6207cat confdefs.h >>conftest.$ac_ext
6208cat >>conftest.$ac_ext <<_ACEOF
6209/* end confdefs.h. */
6210
6211 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6212 included before <wchar.h>. */
6213 #include <stddef.h>
6214 #include <signal.h>
6215 #if HAVE_WCHAR_H
6216 # include <stdio.h>
6217 # include <time.h>
6218 # include <wchar.h>
6219 #endif
6220
6221 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6222int
6223main ()
6224{
6225
6226 ;
6227 return 0;
6228}
6229_ACEOF
6230rm -f conftest.$ac_objext
6231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6232 (eval $ac_compile) 2>conftest.er1
6233 ac_status=$?
6234 grep -v '^ *+' conftest.er1 >conftest.err
6235 rm -f conftest.er1
6236 cat conftest.err >&5
6237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6238 (exit $ac_status); } &&
6239 { ac_try='test -z "$ac_c_werror_flag"
6240 || test ! -s conftest.err'
6241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6242 (eval $ac_try) 2>&5
6243 ac_status=$?
6244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6245 (exit $ac_status); }; } &&
6246 { ac_try='test -s conftest.$ac_objext'
6247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6248 (eval $ac_try) 2>&5
6249 ac_status=$?
6250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6251 (exit $ac_status); }; }; then
6252 result=yes
6253else
6254 echo "$as_me: failed program was:" >&5
6255sed 's/^/| /' conftest.$ac_ext >&5
6256
6257result=no
20e95c23 6258fi
783e057b
DJ
6259rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6260 eval gl_cv_type_${gltype}_signed=\$result
6261
6262fi
6263echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&5
6264echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&6
6265 eval result=\$gl_cv_type_${gltype}_signed
6266 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6267 if test "$result" = yes; then
6268 cat >>confdefs.h <<_ACEOF
6269#define HAVE_SIGNED_${GLTYPE} 1
6270_ACEOF
6271
6272 eval HAVE_SIGNED_${GLTYPE}=1
6273 else
6274 eval HAVE_SIGNED_${GLTYPE}=0
6275 fi
6276 done
6277
6278
6279 gl_cv_type_ptrdiff_t_signed=yes
6280 gl_cv_type_size_t_signed=no
6281
6282
6283
6284
6285
6286
6287
6288 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
6289 echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5
6290echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6
6291if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\" = set"; then
6292 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 6293else
783e057b
DJ
6294 eval gl_cv_type_${gltype}_suffix=no
6295 eval result=\$gl_cv_type_${gltype}_signed
6296 if test "$result" = yes; then
6297 glsufu=
6298 else
6299 glsufu=u
6300 fi
6301 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6302 case $glsuf in
6303 '') gltype1='int';;
6304 l) gltype1='long int';;
6305 ll) gltype1='long long int';;
6306 i64) gltype1='__int64';;
6307 u) gltype1='unsigned int';;
6308 ul) gltype1='unsigned long int';;
6309 ull) gltype1='unsigned long long int';;
6310 ui64)gltype1='unsigned __int64';;
6311 esac
6312 cat >conftest.$ac_ext <<_ACEOF
6313/* confdefs.h. */
6314_ACEOF
6315cat confdefs.h >>conftest.$ac_ext
6316cat >>conftest.$ac_ext <<_ACEOF
6317/* end confdefs.h. */
6318
6319 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6320 included before <wchar.h>. */
6321 #include <stddef.h>
6322 #include <signal.h>
6323 #if HAVE_WCHAR_H
6324 # include <stdio.h>
6325 # include <time.h>
6326 # include <wchar.h>
6327 #endif
6328
6329 extern $gltype foo;
6330 extern $gltype1 foo;
6331int
6332main ()
6333{
6334
6335 ;
6336 return 0;
6337}
6338_ACEOF
6339rm -f conftest.$ac_objext
6340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6341 (eval $ac_compile) 2>conftest.er1
6342 ac_status=$?
6343 grep -v '^ *+' conftest.er1 >conftest.err
6344 rm -f conftest.er1
6345 cat conftest.err >&5
6346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6347 (exit $ac_status); } &&
6348 { ac_try='test -z "$ac_c_werror_flag"
6349 || test ! -s conftest.err'
6350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6351 (eval $ac_try) 2>&5
6352 ac_status=$?
6353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354 (exit $ac_status); }; } &&
6355 { ac_try='test -s conftest.$ac_objext'
6356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6357 (eval $ac_try) 2>&5
6358 ac_status=$?
6359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6360 (exit $ac_status); }; }; then
6361 eval gl_cv_type_${gltype}_suffix=\$glsuf
6362else
6363 echo "$as_me: failed program was:" >&5
6364sed 's/^/| /' conftest.$ac_ext >&5
6365
6366fi
6367rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6368 eval result=\$gl_cv_type_${gltype}_suffix
6369 test "$result" != no && break
6370 done
6371fi
6372echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&5
6373echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&6
6374 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6375 eval result=\$gl_cv_type_${gltype}_suffix
6376 test "$result" = no && result=
6377 eval ${GLTYPE}_SUFFIX=\$result
6378 cat >>confdefs.h <<_ACEOF
6379#define ${GLTYPE}_SUFFIX $result
6380_ACEOF
6381
6382 done
6383
6384
6385
6386 STDINT_H=stdint.h
6387 fi
6388
6389
6390
6391
6392
6393
6394
6395 echo "$as_me:$LINENO: checking whether <wchar.h> is standalone" >&5
6396echo $ECHO_N "checking whether <wchar.h> is standalone... $ECHO_C" >&6
6397if test "${gl_cv_header_wchar_h_standalone+set}" = set; then
6398 echo $ECHO_N "(cached) $ECHO_C" >&6
6399else
6400 cat >conftest.$ac_ext <<_ACEOF
6401#include <wchar.h>
6402wchar_t w;
6403_ACEOF
6404rm -f conftest.$ac_objext
6405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6406 (eval $ac_compile) 2>conftest.er1
6407 ac_status=$?
6408 grep -v '^ *+' conftest.er1 >conftest.err
6409 rm -f conftest.er1
6410 cat conftest.err >&5
6411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6412 (exit $ac_status); } &&
6413 { ac_try='test -z "$ac_c_werror_flag"
6414 || test ! -s conftest.err'
6415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6416 (eval $ac_try) 2>&5
6417 ac_status=$?
6418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6419 (exit $ac_status); }; } &&
6420 { ac_try='test -s conftest.$ac_objext'
6421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6422 (eval $ac_try) 2>&5
6423 ac_status=$?
6424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6425 (exit $ac_status); }; }; then
6426 gl_cv_header_wchar_h_standalone=yes
6427else
6428 echo "$as_me: failed program was:" >&5
6429sed 's/^/| /' conftest.$ac_ext >&5
6430
6431gl_cv_header_wchar_h_standalone=no
6432fi
6433rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6434fi
6435echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5
6436echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6
6437 if test $gl_cv_header_wchar_h_standalone != yes; then
6438 WCHAR_H=wchar.h
6439 fi
6440
6441
6442 :
6443
6444
6445
6446
6447
6448 if test $ac_cv_header_wchar_h = yes; then
6449 HAVE_WCHAR_H=1
6450 else
6451 HAVE_WCHAR_H=0
6452 fi
6453
6454
6455
6456
6457 :
6458
6459
6460
6461
6462
6463
6464
6465 if test $gl_cv_have_include_next = yes; then
6466 gl_cv_next_wchar_h='<'wchar.h'>'
6467 else
6468 echo "$as_me:$LINENO: checking absolute name of <wchar.h>" >&5
6469echo $ECHO_N "checking absolute name of <wchar.h>... $ECHO_C" >&6
6470if test "${gl_cv_next_wchar_h+set}" = set; then
6471 echo $ECHO_N "(cached) $ECHO_C" >&6
6472else
6473
6474 if test $ac_cv_header_wchar_h = yes; then
6475 cat >conftest.$ac_ext <<_ACEOF
6476/* confdefs.h. */
6477_ACEOF
6478cat confdefs.h >>conftest.$ac_ext
6479cat >>conftest.$ac_ext <<_ACEOF
6480/* end confdefs.h. */
6481#include <wchar.h>
6482
6483_ACEOF
6484 gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6485 sed -n '\#/wchar.h#{
6486 s#.*"\(.*/wchar.h\)".*#\1#
6487 s#^/[^/]#//&#
6488 p
6489 q
6490 }'`'"'
6491 else
6492 gl_cv_next_wchar_h='<'wchar.h'>'
6493 fi
6494
6495fi
6496echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5
6497echo "${ECHO_T}$gl_cv_next_wchar_h" >&6
6498 fi
6499 NEXT_WCHAR_H=$gl_cv_next_wchar_h
6500
c906108c 6501
c906108c 6502
c906108c 6503
c906108c 6504
c906108c 6505
c906108c 6506
c906108c 6507
783e057b
DJ
6508 gltests_libdeps=
6509 gltests_ltlibdeps=
20e95c23 6510
20e95c23 6511
20e95c23 6512
783e057b 6513 gl_source_base='tests'
c906108c 6514
bec39cab 6515
bec39cab 6516
783e057b
DJ
6517
6518 LIBGNU_LIBDEPS="$gl_libdeps"
6519
6520 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
6521
6522
e28b3332 6523
d5af19ba
DJ
6524# For Makefile dependencies.
6525GNULIB_STDINT_H=
6526if test x"$STDINT_H" != x; then
6527 GNULIB_STDINT_H=gnulib/$STDINT_H
6528fi
6529
6530
bec39cab
AC
6531PACKAGE=gdb
6532
6533cat >>confdefs.h <<_ACEOF
6534#define PACKAGE "$PACKAGE"
6535_ACEOF
6536
6537
6538
e28b3332
DJ
6539# GDB does not use automake, but gnulib does. This line lets us
6540# generate its Makefile.in.
6541am__api_version="1.9"
6542# Find a good install program. We prefer a C program (faster),
6543# so one script is as good as another. But avoid the broken or
6544# incompatible versions:
6545# SysV /etc/install, /usr/sbin/install
6546# SunOS /usr/etc/install
6547# IRIX /sbin/install
6548# AIX /bin/install
6549# AmigaOS /C/install, which installs bootblocks on floppy discs
6550# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6551# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6552# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6553# OS/2's system install, which has a completely different semantic
6554# ./install, which can be erroneously created by make from ./install.sh.
85541719 6555# Reject install programs that cannot install multiple files.
e28b3332
DJ
6556echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
6557echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
6558if test -z "$INSTALL"; then
6559if test "${ac_cv_path_install+set}" = set; then
6560 echo $ECHO_N "(cached) $ECHO_C" >&6
6561else
6562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6563for as_dir in $PATH
6564do
6565 IFS=$as_save_IFS
6566 test -z "$as_dir" && as_dir=.
6567 # Account for people who put trailing slashes in PATH elements.
6568case $as_dir/ in
6569 ./ | .// | /cC/* | \
6570 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6571 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
6572 /usr/ucb/* ) ;;
6573 *)
6574 # OSF1 and SCO ODT 3.0 have their own names for install.
6575 # Don't use installbsd from OSF since it installs stuff as root
6576 # by default.
6577 for ac_prog in ginstall scoinst install; do
6578 for ac_exec_ext in '' $ac_executable_extensions; do
6579 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6580 if test $ac_prog = install &&
6581 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6582 # AIX install. It has an incompatible calling convention.
6583 :
6584 elif test $ac_prog = install &&
6585 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6586 # program-specific install script used by HP pwplus--don't use.
6587 :
6588 else
85541719
DE
6589 rm -rf conftest.one conftest.two conftest.dir
6590 echo one > conftest.one
6591 echo two > conftest.two
6592 mkdir conftest.dir
6593 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6594 test -s conftest.one && test -s conftest.two &&
6595 test -s conftest.dir/conftest.one &&
6596 test -s conftest.dir/conftest.two
6597 then
6598 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6599 break 3
6600 fi
e28b3332
DJ
6601 fi
6602 fi
6603 done
6604 done
6605 ;;
6606esac
6607done
6608
85541719 6609rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
6610
6611fi
6612 if test "${ac_cv_path_install+set}" = set; then
6613 INSTALL=$ac_cv_path_install
6614 else
85541719
DE
6615 # As a last resort, use the slow shell script. Don't cache a
6616 # value for INSTALL within a source directory, because that will
e28b3332 6617 # break other packages using the cache if that directory is
85541719 6618 # removed, or if the value is a relative name.
e28b3332
DJ
6619 INSTALL=$ac_install_sh
6620 fi
6621fi
6622echo "$as_me:$LINENO: result: $INSTALL" >&5
6623echo "${ECHO_T}$INSTALL" >&6
6624
6625# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6626# It thinks the first close brace ends the variable substitution.
6627test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6628
6629test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6630
6631test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6632
6633echo "$as_me:$LINENO: checking whether build environment is sane" >&5
6634echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
6635# Just in case
6636sleep 1
6637echo timestamp > conftest.file
6638# Do `set' in a subshell so we don't clobber the current shell's
6639# arguments. Must try -L first in case configure is actually a
6640# symlink; some systems play weird games with the mod time of symlinks
6641# (eg FreeBSD returns the mod time of the symlink's containing
6642# directory).
6643if (
6644 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6645 if test "$*" = "X"; then
6646 # -L didn't work.
6647 set X `ls -t $srcdir/configure conftest.file`
6648 fi
6649 rm -f conftest.file
6650 if test "$*" != "X $srcdir/configure conftest.file" \
6651 && test "$*" != "X conftest.file $srcdir/configure"; then
6652
6653 # If neither matched, then we have a broken ls. This can happen
6654 # if, for instance, CONFIG_SHELL is bash and it inherits a
6655 # broken ls alias from the environment. This has actually
6656 # happened. Such a system could not be considered "sane".
6657 { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
6658alias in your environment" >&5
6659echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
6660alias in your environment" >&2;}
6661 { (exit 1); exit 1; }; }
6662 fi
6663
6664 test "$2" = conftest.file
6665 )
6666then
6667 # Ok.
6668 :
6669else
6670 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
6671Check your system clock" >&5
6672echo "$as_me: error: newly created file is older than distributed files!
6673Check your system clock" >&2;}
6674 { (exit 1); exit 1; }; }
6675fi
6676echo "$as_me:$LINENO: result: yes" >&5
6677echo "${ECHO_T}yes" >&6
6678test "$program_prefix" != NONE &&
6679 program_transform_name="s,^,$program_prefix,;$program_transform_name"
6680# Use a double $ so make ignores it.
6681test "$program_suffix" != NONE &&
6682 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
6683# Double any \ or $. echo might interpret backslashes.
6684# By default was `s,x,x', remove it if useless.
6685cat <<\_ACEOF >conftest.sed
6686s/[\\$]/&&/g;s/;s,x,x,$//
6687_ACEOF
6688program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
6689rm conftest.sed
6690
6691# expand $ac_aux_dir to an absolute path
6692am_aux_dir=`cd $ac_aux_dir && pwd`
6693
6694test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6695# Use eval to expand $SHELL
6696if eval "$MISSING --run true"; then
6697 am_missing_run="$MISSING --run "
6698else
6699 am_missing_run=
6700 { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
6701echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
6702fi
6703
6704if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6705 # We used to keeping the `.' as first argument, in order to
6706 # allow $(mkdir_p) to be used without argument. As in
6707 # $(mkdir_p) $(somedir)
6708 # where $(somedir) is conditionally defined. However this is wrong
6709 # for two reasons:
6710 # 1. if the package is installed by a user who cannot write `.'
6711 # make install will fail,
6712 # 2. the above comment should most certainly read
6713 # $(mkdir_p) $(DESTDIR)$(somedir)
6714 # so it does not work when $(somedir) is undefined and
6715 # $(DESTDIR) is not.
6716 # To support the latter case, we have to write
6717 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6718 # so the `.' trick is pointless.
6719 mkdir_p='mkdir -p --'
6720else
6721 # On NextStep and OpenStep, the `mkdir' command does not
6722 # recognize any option. It will interpret all options as
6723 # directories to create, and then abort because `.' already
6724 # exists.
6725 for d in ./-p ./--version;
6726 do
6727 test -d $d && rmdir $d
6728 done
6729 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6730 if test -f "$ac_aux_dir/mkinstalldirs"; then
6731 mkdir_p='$(mkinstalldirs)'
6732 else
6733 mkdir_p='$(install_sh) -d'
6734 fi
6735fi
6736
6737for ac_prog in gawk mawk nawk awk
6738do
6739 # Extract the first word of "$ac_prog", so it can be a program name with args.
6740set dummy $ac_prog; ac_word=$2
6741echo "$as_me:$LINENO: checking for $ac_word" >&5
6742echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6743if test "${ac_cv_prog_AWK+set}" = set; then
6744 echo $ECHO_N "(cached) $ECHO_C" >&6
6745else
6746 if test -n "$AWK"; then
6747 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6748else
6749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6750for as_dir in $PATH
6751do
6752 IFS=$as_save_IFS
6753 test -z "$as_dir" && as_dir=.
6754 for ac_exec_ext in '' $ac_executable_extensions; do
6755 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6756 ac_cv_prog_AWK="$ac_prog"
6757 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6758 break 2
6759 fi
6760done
6761done
6762
6763fi
6764fi
6765AWK=$ac_cv_prog_AWK
6766if test -n "$AWK"; then
6767 echo "$as_me:$LINENO: result: $AWK" >&5
6768echo "${ECHO_T}$AWK" >&6
6769else
6770 echo "$as_me:$LINENO: result: no" >&5
6771echo "${ECHO_T}no" >&6
6772fi
6773
6774 test -n "$AWK" && break
6775done
6776
e28b3332
DJ
6777 ac_config_commands="$ac_config_commands depfiles"
6778
6779
6780am_make=${MAKE-make}
6781cat > confinc << 'END'
6782am__doit:
6783 @echo done
6784.PHONY: am__doit
6785END
6786# If we don't find an include directive, just comment out the code.
6787echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
6788echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
6789am__include="#"
6790am__quote=
6791_am_result=none
6792# First try GNU make style include.
6793echo "include confinc" > confmf
6794# We grep out `Entering directory' and `Leaving directory'
6795# messages which can occur if `w' ends up in MAKEFLAGS.
6796# In particular we don't look at `^make:' because GNU make might
6797# be invoked under some other name (usually "gmake"), in which
6798# case it prints its new name instead of `make'.
6799if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6800 am__include=include
6801 am__quote=
6802 _am_result=GNU
6803fi
6804# Now try BSD make style include.
6805if test "$am__include" = "#"; then
6806 echo '.include "confinc"' > confmf
6807 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6808 am__include=.include
6809 am__quote="\""
6810 _am_result=BSD
6811 fi
6812fi
6813
6814
6815echo "$as_me:$LINENO: result: $_am_result" >&5
6816echo "${ECHO_T}$_am_result" >&6
6817rm -f confinc confmf
6818
6819# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
6820if test "${enable_dependency_tracking+set}" = set; then
6821 enableval="$enable_dependency_tracking"
6822
6823fi;
6824if test "x$enable_dependency_tracking" != xno; then
6825 am_depcomp="$ac_aux_dir/depcomp"
6826 AMDEPBACKSLASH='\'
6827fi
6828
6829
6830if test "x$enable_dependency_tracking" != xno; then
6831 AMDEP_TRUE=
6832 AMDEP_FALSE='#'
6833else
6834 AMDEP_TRUE='#'
6835 AMDEP_FALSE=
6836fi
6837
6838
6839
6840# test to see if srcdir already configured
6841if test "`cd $srcdir && pwd`" != "`pwd`" &&
6842 test -f $srcdir/config.status; then
6843 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
6844echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
6845 { (exit 1); exit 1; }; }
6846fi
6847
6848# test whether we have cygpath
6849if test -z "$CYGPATH_W"; then
6850 if (cygpath --version) >/dev/null 2>/dev/null; then
6851 CYGPATH_W='cygpath -w'
6852 else
6853 CYGPATH_W=echo
6854 fi
6855fi
6856
6857
6858# Define the identity of the package.
6859 PACKAGE=gdb
6860 VERSION=UNUSED-VERSION
6861
6862
6863# Some tools Automake needs.
6864
6865ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6866
6867
6868AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6869
6870
6871AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6872
6873
6874AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6875
6876
6877MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6878
6879install_sh=${install_sh-"$am_aux_dir/install-sh"}
6880
6881# Installed binaries are usually stripped using `strip' when the user
6882# run `make install-strip'. However `strip' might not be the right
6883# tool to use in cross-compilation environments, therefore Automake
6884# will honor the `STRIP' environment variable to overrule this program.
6885if test "$cross_compiling" != no; then
6886 if test -n "$ac_tool_prefix"; then
6887 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6888set dummy ${ac_tool_prefix}strip; ac_word=$2
6889echo "$as_me:$LINENO: checking for $ac_word" >&5
6890echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6891if test "${ac_cv_prog_STRIP+set}" = set; then
6892 echo $ECHO_N "(cached) $ECHO_C" >&6
6893else
6894 if test -n "$STRIP"; then
6895 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6896else
6897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6898for as_dir in $PATH
6899do
6900 IFS=$as_save_IFS
6901 test -z "$as_dir" && as_dir=.
6902 for ac_exec_ext in '' $ac_executable_extensions; do
6903 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6904 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6905 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6906 break 2
6907 fi
6908done
6909done
6910
6911fi
6912fi
6913STRIP=$ac_cv_prog_STRIP
6914if test -n "$STRIP"; then
6915 echo "$as_me:$LINENO: result: $STRIP" >&5
6916echo "${ECHO_T}$STRIP" >&6
6917else
6918 echo "$as_me:$LINENO: result: no" >&5
6919echo "${ECHO_T}no" >&6
6920fi
6921
6922fi
6923if test -z "$ac_cv_prog_STRIP"; then
6924 ac_ct_STRIP=$STRIP
6925 # Extract the first word of "strip", so it can be a program name with args.
6926set dummy strip; ac_word=$2
6927echo "$as_me:$LINENO: checking for $ac_word" >&5
6928echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6929if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6930 echo $ECHO_N "(cached) $ECHO_C" >&6
6931else
6932 if test -n "$ac_ct_STRIP"; then
6933 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6934else
6935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6936for as_dir in $PATH
6937do
6938 IFS=$as_save_IFS
6939 test -z "$as_dir" && as_dir=.
6940 for ac_exec_ext in '' $ac_executable_extensions; do
6941 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6942 ac_cv_prog_ac_ct_STRIP="strip"
6943 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6944 break 2
6945 fi
6946done
6947done
6948
6949 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
6950fi
6951fi
6952ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6953if test -n "$ac_ct_STRIP"; then
6954 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6955echo "${ECHO_T}$ac_ct_STRIP" >&6
6956else
6957 echo "$as_me:$LINENO: result: no" >&5
6958echo "${ECHO_T}no" >&6
6959fi
6960
6961 STRIP=$ac_ct_STRIP
6962else
6963 STRIP="$ac_cv_prog_STRIP"
6964fi
6965
6966fi
6967INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
6968
6969# We need awk for the "check" target. The system "awk" is bad on
6970# some platforms.
6971# Always define AMTAR for backward compatibility.
6972
6973AMTAR=${AMTAR-"${am_missing_run}tar"}
6974
6975am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
6976
6977
6978
6979
6980depcc="$CC" am_compiler_list=
6981
6982echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
6983echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
6984if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
6985 echo $ECHO_N "(cached) $ECHO_C" >&6
6986else
6987 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6988 # We make a subdir and do the tests there. Otherwise we can end up
6989 # making bogus files that we don't know about and never remove. For
6990 # instance it was reported that on HP-UX the gcc test will end up
6991 # making a dummy file named `D' -- because `-MD' means `put the output
6992 # in D'.
6993 mkdir conftest.dir
6994 # Copy depcomp to subdir because otherwise we won't find it if we're
6995 # using a relative directory.
6996 cp "$am_depcomp" conftest.dir
6997 cd conftest.dir
6998 # We will build objects and dependencies in a subdirectory because
6999 # it helps to detect inapplicable dependency modes. For instance
7000 # both Tru64's cc and ICC support -MD to output dependencies as a
7001 # side effect of compilation, but ICC will put the dependencies in
7002 # the current directory while Tru64 will put them in the object
7003 # directory.
7004 mkdir sub
7005
7006 am_cv_CC_dependencies_compiler_type=none
7007 if test "$am_compiler_list" = ""; then
7008 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7009 fi
7010 for depmode in $am_compiler_list; do
7011 # Setup a source with many dependencies, because some compilers
7012 # like to wrap large dependency lists on column 80 (with \), and
7013 # we should not choose a depcomp mode which is confused by this.
7014 #
7015 # We need to recreate these files for each test, as the compiler may
7016 # overwrite some of them when testing with obscure command lines.
7017 # This happens at least with the AIX C compiler.
7018 : > sub/conftest.c
7019 for i in 1 2 3 4 5 6; do
7020 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7021 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7022 # Solaris 8's {/usr,}/bin/sh.
7023 touch sub/conftst$i.h
7024 done
7025 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7026
7027 case $depmode in
7028 nosideeffect)
7029 # after this tag, mechanisms are not by side-effect, so they'll
7030 # only be used when explicitly requested
7031 if test "x$enable_dependency_tracking" = xyes; then
7032 continue
7033 else
7034 break
7035 fi
7036 ;;
7037 none) break ;;
7038 esac
7039 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7040 # mode. It turns out that the SunPro C++ compiler does not properly
7041 # handle `-M -o', and we need to detect this.
7042 if depmode=$depmode \
7043 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7044 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7045 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7046 >/dev/null 2>conftest.err &&
7047 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7048 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7049 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7050 # icc doesn't choke on unknown options, it will just issue warnings
7051 # or remarks (even with -Werror). So we grep stderr for any message
7052 # that says an option was ignored or not supported.
7053 # When given -MP, icc 7.0 and 7.1 complain thusly:
7054 # icc: Command line warning: ignoring option '-M'; no argument required
7055 # The diagnosis changed in icc 8.0:
7056 # icc: Command line remark: option '-MP' not supported
7057 if (grep 'ignoring option' conftest.err ||
7058 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7059 am_cv_CC_dependencies_compiler_type=$depmode
7060 break
7061 fi
7062 fi
7063 done
7064
7065 cd ..
7066 rm -rf conftest.dir
7067else
7068 am_cv_CC_dependencies_compiler_type=none
7069fi
7070
7071fi
7072echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
7073echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
7074CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7075
7076
7077
7078if
7079 test "x$enable_dependency_tracking" != xno \
7080 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7081 am__fastdepCC_TRUE=
7082 am__fastdepCC_FALSE='#'
7083else
7084 am__fastdepCC_TRUE='#'
7085 am__fastdepCC_FALSE=
7086fi
7087
7088
7089
7090
bec39cab
AC
7091debugdir=${libdir}/debug
7092
7093
b4e70030 7094# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
bec39cab 7095if test "${with_separate_debug_dir+set}" = set; then
783e057b
DJ
7096 withval="$with_separate_debug_dir"
7097 debugdir="${withval}"
7098fi;
20e95c23 7099
20e95c23 7100
783e057b
DJ
7101 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7102 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7103 ac_define_dir=`eval echo $debugdir`
7104 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7105
783e057b
DJ
7106cat >>confdefs.h <<_ACEOF
7107#define DEBUGDIR "$ac_define_dir"
20e95c23 7108_ACEOF
20e95c23 7109
20e95c23 7110
783e057b 7111#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
20e95c23 7112
783e057b
DJ
7113if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7114 if test "x$prefix" = xNONE; then
7115 test_prefix=/usr/local
7116 else
7117 test_prefix=$prefix
7118 fi
20e95c23 7119else
783e057b 7120 test_prefix=$exec_prefix
20e95c23 7121fi
783e057b
DJ
7122case ${debugdir} in
7123"${test_prefix}"|"${test_prefix}/"*|\
7124'${exec_prefix}'|'${exec_prefix}/'*)
20e95c23
DJ
7125
7126cat >>confdefs.h <<\_ACEOF
783e057b 7127#define DEBUGDIR_RELOCATABLE 1
20e95c23
DJ
7128_ACEOF
7129
783e057b
DJ
7130 ;;
7131esac
7132
20e95c23 7133
20e95c23 7134
783e057b 7135subdirs="$subdirs doc testsuite"
20e95c23
DJ
7136
7137
783e057b
DJ
7138# Check whether to support alternative target configurations
7139# Check whether --enable-targets or --disable-targets was given.
7140if test "${enable_targets+set}" = set; then
7141 enableval="$enable_targets"
7142 case "${enableval}" in
7143 yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
7144echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
7145 { (exit 1); exit 1; }; }
7146 ;;
7147 no) enable_targets= ;;
7148 *) enable_targets=$enableval ;;
7149esac
7150fi;
20e95c23 7151
783e057b
DJ
7152# Check whether to enable 64-bit support on 32-bit hosts
7153# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
7154if test "${enable_64_bit_bfd+set}" = set; then
7155 enableval="$enable_64_bit_bfd"
7156 case "${enableval}" in
7157 yes) want64=true ;;
7158 no) want64=false ;;
7159 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
7160echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
7161 { (exit 1); exit 1; }; } ;;
7162esac
7163else
7164 want64=false
7165fi;
7166# Provide defaults for some variables set by the per-host and per-target
7167# configuration.
7168gdb_host_obs=posix-hdep.o
20e95c23 7169
783e057b
DJ
7170if test "${target}" = "${host}"; then
7171 gdb_native=yes
7172else
7173 gdb_native=no
7174fi
20e95c23 7175
783e057b 7176. $srcdir/configure.host
20e95c23 7177
783e057b 7178# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 7179
783e057b
DJ
7180TARGET_OBS=
7181all_targets=
20e95c23 7182
783e057b 7183for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 7184do
783e057b
DJ
7185 if test "$targ_alias" = "all"; then
7186 all_targets=true
7187 else
7188 # Canonicalize the secondary target names.
7189 result=`$ac_config_sub $targ_alias 2>/dev/null`
7190 if test -n "$result"; then
7191 targ=$result
7192 else
7193 targ=$targ_alias
7194 fi
20e95c23 7195
783e057b 7196 . ${srcdir}/configure.tgt
20e95c23 7197
783e057b
DJ
7198 # Target-specific object files
7199 for i in ${gdb_target_obs}; do
7200 case " $TARGET_OBS " in
7201 *" ${i} "*) ;;
7202 *)
7203 TARGET_OBS="$TARGET_OBS ${i}"
7204 ;;
7205 esac
7206 done
20e95c23 7207
783e057b
DJ
7208 # Check whether this target needs 64-bit CORE_ADDR
7209 if test x${want64} = xfalse; then
7210 . ${srcdir}/../bfd/config.bfd
7211 fi
7212 fi
20e95c23
DJ
7213done
7214
783e057b
DJ
7215if test x${all_targets} = xtrue; then
7216
7217 # We want all 64-bit targets if we either:
7218 # - run on a 64-bit host or
7219 # - already require 64-bit support for some other target or
7220 # - the --enable-64-bit-bfd option was supplied
7221 # Otherwise we only support all 32-bit targets.
7222 #
7223 # NOTE: This test must be in sync with the corresponding
7224 # tests in BFD!
20e95c23 7225
783e057b
DJ
7226 if test x${want64} = xfalse; then
7227 echo "$as_me:$LINENO: checking for long" >&5
c0993dbe
UW
7228echo $ECHO_N "checking for long... $ECHO_C" >&6
7229if test "${ac_cv_type_long+set}" = set; then
7230 echo $ECHO_N "(cached) $ECHO_C" >&6
7231else
7232 cat >conftest.$ac_ext <<_ACEOF
7233/* confdefs.h. */
7234_ACEOF
7235cat confdefs.h >>conftest.$ac_ext
7236cat >>conftest.$ac_ext <<_ACEOF
7237/* end confdefs.h. */
7238$ac_includes_default
7239int
7240main ()
7241{
7242if ((long *) 0)
7243 return 0;
7244if (sizeof (long))
7245 return 0;
7246 ;
7247 return 0;
7248}
7249_ACEOF
7250rm -f conftest.$ac_objext
7251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7252 (eval $ac_compile) 2>conftest.er1
7253 ac_status=$?
7254 grep -v '^ *+' conftest.er1 >conftest.err
7255 rm -f conftest.er1
7256 cat conftest.err >&5
7257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7258 (exit $ac_status); } &&
7259 { ac_try='test -z "$ac_c_werror_flag"
7260 || test ! -s conftest.err'
7261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7262 (eval $ac_try) 2>&5
7263 ac_status=$?
7264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7265 (exit $ac_status); }; } &&
7266 { ac_try='test -s conftest.$ac_objext'
7267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7268 (eval $ac_try) 2>&5
7269 ac_status=$?
7270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7271 (exit $ac_status); }; }; then
7272 ac_cv_type_long=yes
7273else
7274 echo "$as_me: failed program was:" >&5
7275sed 's/^/| /' conftest.$ac_ext >&5
7276
7277ac_cv_type_long=no
7278fi
7279rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7280fi
7281echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7282echo "${ECHO_T}$ac_cv_type_long" >&6
7283
7284echo "$as_me:$LINENO: checking size of long" >&5
7285echo $ECHO_N "checking size of long... $ECHO_C" >&6
7286if test "${ac_cv_sizeof_long+set}" = set; then
7287 echo $ECHO_N "(cached) $ECHO_C" >&6
7288else
7289 if test "$ac_cv_type_long" = yes; then
7290 # The cast to unsigned long works around a bug in the HP C Compiler
7291 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7292 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7293 # This bug is HP SR number 8606223364.
7294 if test "$cross_compiling" = yes; then
7295 # Depending upon the size, compute the lo and hi bounds.
7296cat >conftest.$ac_ext <<_ACEOF
7297/* confdefs.h. */
7298_ACEOF
7299cat confdefs.h >>conftest.$ac_ext
7300cat >>conftest.$ac_ext <<_ACEOF
7301/* end confdefs.h. */
7302$ac_includes_default
7303int
7304main ()
7305{
7306static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
7307test_array [0] = 0
7308
7309 ;
7310 return 0;
7311}
7312_ACEOF
7313rm -f conftest.$ac_objext
7314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7315 (eval $ac_compile) 2>conftest.er1
7316 ac_status=$?
7317 grep -v '^ *+' conftest.er1 >conftest.err
7318 rm -f conftest.er1
7319 cat conftest.err >&5
7320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7321 (exit $ac_status); } &&
7322 { ac_try='test -z "$ac_c_werror_flag"
7323 || test ! -s conftest.err'
7324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7325 (eval $ac_try) 2>&5
7326 ac_status=$?
7327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328 (exit $ac_status); }; } &&
7329 { ac_try='test -s conftest.$ac_objext'
7330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7331 (eval $ac_try) 2>&5
7332 ac_status=$?
7333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7334 (exit $ac_status); }; }; then
7335 ac_lo=0 ac_mid=0
7336 while :; do
7337 cat >conftest.$ac_ext <<_ACEOF
7338/* confdefs.h. */
7339_ACEOF
7340cat confdefs.h >>conftest.$ac_ext
7341cat >>conftest.$ac_ext <<_ACEOF
7342/* end confdefs.h. */
7343$ac_includes_default
7344int
7345main ()
7346{
7347static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7348test_array [0] = 0
7349
7350 ;
7351 return 0;
7352}
7353_ACEOF
7354rm -f conftest.$ac_objext
7355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7356 (eval $ac_compile) 2>conftest.er1
7357 ac_status=$?
7358 grep -v '^ *+' conftest.er1 >conftest.err
7359 rm -f conftest.er1
7360 cat conftest.err >&5
7361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7362 (exit $ac_status); } &&
7363 { ac_try='test -z "$ac_c_werror_flag"
7364 || test ! -s conftest.err'
7365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7366 (eval $ac_try) 2>&5
7367 ac_status=$?
7368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7369 (exit $ac_status); }; } &&
7370 { ac_try='test -s conftest.$ac_objext'
7371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7372 (eval $ac_try) 2>&5
7373 ac_status=$?
7374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7375 (exit $ac_status); }; }; then
7376 ac_hi=$ac_mid; break
7377else
7378 echo "$as_me: failed program was:" >&5
7379sed 's/^/| /' conftest.$ac_ext >&5
7380
7381ac_lo=`expr $ac_mid + 1`
7382 if test $ac_lo -le $ac_mid; then
7383 ac_lo= ac_hi=
7384 break
7385 fi
7386 ac_mid=`expr 2 '*' $ac_mid + 1`
7387fi
7388rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7389 done
7390else
7391 echo "$as_me: failed program was:" >&5
7392sed 's/^/| /' conftest.$ac_ext >&5
7393
7394cat >conftest.$ac_ext <<_ACEOF
7395/* confdefs.h. */
7396_ACEOF
7397cat confdefs.h >>conftest.$ac_ext
7398cat >>conftest.$ac_ext <<_ACEOF
7399/* end confdefs.h. */
7400$ac_includes_default
7401int
7402main ()
7403{
7404static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
7405test_array [0] = 0
7406
7407 ;
7408 return 0;
7409}
7410_ACEOF
7411rm -f conftest.$ac_objext
7412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7413 (eval $ac_compile) 2>conftest.er1
7414 ac_status=$?
7415 grep -v '^ *+' conftest.er1 >conftest.err
7416 rm -f conftest.er1
7417 cat conftest.err >&5
7418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7419 (exit $ac_status); } &&
7420 { ac_try='test -z "$ac_c_werror_flag"
7421 || test ! -s conftest.err'
7422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7423 (eval $ac_try) 2>&5
7424 ac_status=$?
7425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7426 (exit $ac_status); }; } &&
7427 { ac_try='test -s conftest.$ac_objext'
7428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7429 (eval $ac_try) 2>&5
7430 ac_status=$?
7431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7432 (exit $ac_status); }; }; then
7433 ac_hi=-1 ac_mid=-1
7434 while :; do
7435 cat >conftest.$ac_ext <<_ACEOF
7436/* confdefs.h. */
7437_ACEOF
7438cat confdefs.h >>conftest.$ac_ext
7439cat >>conftest.$ac_ext <<_ACEOF
7440/* end confdefs.h. */
7441$ac_includes_default
7442int
7443main ()
7444{
7445static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
7446test_array [0] = 0
7447
7448 ;
7449 return 0;
7450}
7451_ACEOF
7452rm -f conftest.$ac_objext
7453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7454 (eval $ac_compile) 2>conftest.er1
7455 ac_status=$?
7456 grep -v '^ *+' conftest.er1 >conftest.err
7457 rm -f conftest.er1
7458 cat conftest.err >&5
7459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7460 (exit $ac_status); } &&
7461 { ac_try='test -z "$ac_c_werror_flag"
7462 || test ! -s conftest.err'
7463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7464 (eval $ac_try) 2>&5
7465 ac_status=$?
7466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7467 (exit $ac_status); }; } &&
7468 { ac_try='test -s conftest.$ac_objext'
7469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7470 (eval $ac_try) 2>&5
7471 ac_status=$?
7472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7473 (exit $ac_status); }; }; then
7474 ac_lo=$ac_mid; break
7475else
7476 echo "$as_me: failed program was:" >&5
7477sed 's/^/| /' conftest.$ac_ext >&5
7478
7479ac_hi=`expr '(' $ac_mid ')' - 1`
7480 if test $ac_mid -le $ac_hi; then
7481 ac_lo= ac_hi=
7482 break
7483 fi
7484 ac_mid=`expr 2 '*' $ac_mid`
7485fi
7486rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7487 done
7488else
7489 echo "$as_me: failed program was:" >&5
7490sed 's/^/| /' conftest.$ac_ext >&5
7491
7492ac_lo= ac_hi=
7493fi
7494rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7495fi
7496rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7497# Binary search between lo and hi bounds.
7498while test "x$ac_lo" != "x$ac_hi"; do
7499 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7500 cat >conftest.$ac_ext <<_ACEOF
7501/* confdefs.h. */
7502_ACEOF
7503cat confdefs.h >>conftest.$ac_ext
7504cat >>conftest.$ac_ext <<_ACEOF
7505/* end confdefs.h. */
7506$ac_includes_default
7507int
7508main ()
7509{
7510static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7511test_array [0] = 0
7512
7513 ;
7514 return 0;
7515}
7516_ACEOF
7517rm -f conftest.$ac_objext
7518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7519 (eval $ac_compile) 2>conftest.er1
7520 ac_status=$?
7521 grep -v '^ *+' conftest.er1 >conftest.err
7522 rm -f conftest.er1
7523 cat conftest.err >&5
7524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7525 (exit $ac_status); } &&
7526 { ac_try='test -z "$ac_c_werror_flag"
7527 || test ! -s conftest.err'
7528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7529 (eval $ac_try) 2>&5
7530 ac_status=$?
7531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7532 (exit $ac_status); }; } &&
7533 { ac_try='test -s conftest.$ac_objext'
7534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7535 (eval $ac_try) 2>&5
7536 ac_status=$?
7537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7538 (exit $ac_status); }; }; then
7539 ac_hi=$ac_mid
7540else
7541 echo "$as_me: failed program was:" >&5
7542sed 's/^/| /' conftest.$ac_ext >&5
7543
7544ac_lo=`expr '(' $ac_mid ')' + 1`
7545fi
7546rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7547done
7548case $ac_lo in
7549?*) ac_cv_sizeof_long=$ac_lo;;
d5af19ba
DJ
7550'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7551echo "$as_me: error: in \`$ac_pwd':" >&2;}
7552{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
c0993dbe
UW
7553See \`config.log' for more details." >&5
7554echo "$as_me: error: cannot compute sizeof (long), 77
7555See \`config.log' for more details." >&2;}
d5af19ba 7556 { (exit 1); exit 1; }; }; } ;;
c0993dbe
UW
7557esac
7558else
7559 if test "$cross_compiling" = yes; then
d5af19ba
DJ
7560 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7561echo "$as_me: error: in \`$ac_pwd':" >&2;}
7562{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
c0993dbe
UW
7563See \`config.log' for more details." >&5
7564echo "$as_me: error: cannot run test program while cross compiling
7565See \`config.log' for more details." >&2;}
d5af19ba 7566 { (exit 1); exit 1; }; }; }
c0993dbe
UW
7567else
7568 cat >conftest.$ac_ext <<_ACEOF
7569/* confdefs.h. */
7570_ACEOF
7571cat confdefs.h >>conftest.$ac_ext
7572cat >>conftest.$ac_ext <<_ACEOF
7573/* end confdefs.h. */
7574$ac_includes_default
7575long longval () { return (long) (sizeof (long)); }
7576unsigned long ulongval () { return (long) (sizeof (long)); }
7577#include <stdio.h>
7578#include <stdlib.h>
7579int
7580main ()
7581{
7582
7583 FILE *f = fopen ("conftest.val", "w");
7584 if (! f)
7585 exit (1);
7586 if (((long) (sizeof (long))) < 0)
7587 {
7588 long i = longval ();
7589 if (i != ((long) (sizeof (long))))
7590 exit (1);
7591 fprintf (f, "%ld\n", i);
7592 }
7593 else
7594 {
7595 unsigned long i = ulongval ();
7596 if (i != ((long) (sizeof (long))))
7597 exit (1);
7598 fprintf (f, "%lu\n", i);
7599 }
7600 exit (ferror (f) || fclose (f) != 0);
7601
7602 ;
7603 return 0;
7604}
7605_ACEOF
7606rm -f conftest$ac_exeext
7607if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7608 (eval $ac_link) 2>&5
7609 ac_status=$?
7610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7611 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7613 (eval $ac_try) 2>&5
7614 ac_status=$?
7615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7616 (exit $ac_status); }; }; then
7617 ac_cv_sizeof_long=`cat conftest.val`
7618else
7619 echo "$as_me: program exited with status $ac_status" >&5
7620echo "$as_me: failed program was:" >&5
7621sed 's/^/| /' conftest.$ac_ext >&5
7622
7623( exit $ac_status )
d5af19ba
DJ
7624{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7625echo "$as_me: error: in \`$ac_pwd':" >&2;}
c0993dbe
UW
7626{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7627See \`config.log' for more details." >&5
7628echo "$as_me: error: cannot compute sizeof (long), 77
7629See \`config.log' for more details." >&2;}
d5af19ba 7630 { (exit 1); exit 1; }; }; }
c0993dbe
UW
7631fi
7632rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7633fi
7634fi
7635rm -f conftest.val
7636else
7637 ac_cv_sizeof_long=0
7638fi
7639fi
7640echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7641echo "${ECHO_T}$ac_cv_sizeof_long" >&6
7642cat >>confdefs.h <<_ACEOF
7643#define SIZEOF_LONG $ac_cv_sizeof_long
7644_ACEOF
7645
7646
7647 if test "x${ac_cv_sizeof_long}" = "x8"; then
7648 want64=true
7649 fi
7650 fi
7651 if test x${want64} = xtrue; then
7652 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
7653 else
7654 TARGET_OBS='$(ALL_TARGET_OBS)'
7655 fi
7656fi
7657
7658
7659
7660# For other settings, only the main target counts.
7661gdb_sim=
7662gdb_osabi=
7663build_gdbserver=
7664targ=$target; . ${srcdir}/configure.tgt
7665
7666# Fetch the default architecture and default target vector from BFD.
7667targ=$target; . $srcdir/../bfd/config.bfd
7668
7669# We only want the first architecture, so strip off the others if
7670# there is more than one.
7671targ_archs=`echo $targ_archs | sed 's/ .*//'`
7672
7673if test "x$targ_archs" != x; then
7674
7675cat >>confdefs.h <<_ACEOF
7676#define DEFAULT_BFD_ARCH $targ_archs
7677_ACEOF
7678
7679fi
7680if test "x$targ_defvec" != x; then
7681
7682cat >>confdefs.h <<_ACEOF
7683#define DEFAULT_BFD_VEC $targ_defvec
7684_ACEOF
7685
7686fi
7687
c0993dbe
UW
7688# The CLI cannot be disabled yet, but may be in the future.
7689
7690# Enable CLI.
7691# Check whether --enable-gdbcli or --disable-gdbcli was given.
7692if test "${enable_gdbcli+set}" = set; then
7693 enableval="$enable_gdbcli"
7694 case $enableval in
7695 yes)
7696 ;;
7697 no)
7698 { { echo "$as_me:$LINENO: error: the command-line interface cannot be disabled yet" >&5
7699echo "$as_me: error: the command-line interface cannot be disabled yet" >&2;}
7700 { (exit 1); exit 1; }; } ;;
7701 *)
7702 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbcli" >&5
7703echo "$as_me: error: bad value $enableval for --enable-gdbcli" >&2;}
7704 { (exit 1); exit 1; }; } ;;
7705 esac
7706else
7707 enable_gdbcli=yes
7708fi;
7709if test x"$enable_gdbcli" = xyes; then
7710 if test -d $srcdir/cli; then
7711 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
7712 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
7713 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
7714 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
7715 fi
7716fi
7717
7718# Enable MI.
7719# Check whether --enable-gdbmi or --disable-gdbmi was given.
7720if test "${enable_gdbmi+set}" = set; then
7721 enableval="$enable_gdbmi"
7722 case $enableval in
7723 yes | no)
7724 ;;
7725 *)
7726 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbmi" >&5
7727echo "$as_me: error: bad value $enableval for --enable-gdbmi" >&2;}
7728 { (exit 1); exit 1; }; } ;;
7729 esac
7730else
7731 enable_gdbmi=yes
7732fi;
7733if test x"$enable_gdbmi" = xyes; then
7734 if test -d $srcdir/mi; then
7735 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
7736 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
7737 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
7738 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
7739 fi
7740fi
7741
7742# Enable TUI.
7743# Check whether --enable-tui or --disable-tui was given.
7744if test "${enable_tui+set}" = set; then
7745 enableval="$enable_tui"
7746 case $enableval in
3ca64bd3 7747 yes | no | auto)
c0993dbe
UW
7748 ;;
7749 *)
7750 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tui" >&5
7751echo "$as_me: error: bad value $enableval for --enable-tui" >&2;}
7752 { (exit 1); exit 1; }; } ;;
7753 esac
7754else
3ca64bd3 7755 enable_tui=auto
c0993dbe
UW
7756fi;
7757
7758# Enable gdbtk.
7759# Check whether --enable-gdbtk or --disable-gdbtk was given.
7760if test "${enable_gdbtk+set}" = set; then
7761 enableval="$enable_gdbtk"
7762 case $enableval in
7763 yes | no)
7764 ;;
7765 *)
7766 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbtk" >&5
7767echo "$as_me: error: bad value $enableval for --enable-gdbtk" >&2;}
7768 { (exit 1); exit 1; }; } ;;
7769 esac
7770else
5062cc19 7771 if test -d $srcdir/gdbtk; then
c0993dbe
UW
7772 enable_gdbtk=yes
7773 else
7774 enable_gdbtk=no
7775 fi
7776fi;
7777# We unconditionally disable gdbtk tests on selected platforms.
7778case $host_os in
7779 go32* | windows*)
7780 { echo "$as_me:$LINENO: WARNING: gdbtk isn't supported on $host; disabling" >&5
7781echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
7782 enable_gdbtk=no ;;
7783esac
7784
7785# Libunwind support.
bec39cab 7786
b4e70030 7787# Check whether --with-libunwind or --without-libunwind was given.
bec39cab 7788if test "${with_libunwind+set}" = set; then
b4e70030
JB
7789 withval="$with_libunwind"
7790 case "${withval}" in
bec39cab
AC
7791 yes) enable_libunwind=yes ;;
7792 no) enable_libunwind=no ;;
7793 *) { { echo "$as_me:$LINENO: error: bad value ${withval} for GDB with-libunwind option" >&5
7794echo "$as_me: error: bad value ${withval} for GDB with-libunwind option" >&2;}
7795 { (exit 1); exit 1; }; } ;;
7796esac
7797else
7798
7799
a9322a30
TT
7800
7801for ac_header in libunwind.h libunwind-ia64.h
bec39cab
AC
7802do
7803as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7804if eval "test \"\${$as_ac_Header+set}\" = set"; then
7805 echo "$as_me:$LINENO: checking for $ac_header" >&5
7806echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7807if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7808 echo $ECHO_N "(cached) $ECHO_C" >&6
7809fi
b4e70030
JB
7810echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7811echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7812else
7813 # Is the header compilable?
b4e70030
JB
7814echo "$as_me:$LINENO: checking $ac_header usability" >&5
7815echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7816cat >conftest.$ac_ext <<_ACEOF
7817/* confdefs.h. */
7818_ACEOF
7819cat confdefs.h >>conftest.$ac_ext
7820cat >>conftest.$ac_ext <<_ACEOF
7821/* end confdefs.h. */
7822$ac_includes_default
7823#include <$ac_header>
7824_ACEOF
7825rm -f conftest.$ac_objext
7826if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7827 (eval $ac_compile) 2>conftest.er1
7828 ac_status=$?
7829 grep -v '^ *+' conftest.er1 >conftest.err
7830 rm -f conftest.er1
7831 cat conftest.err >&5
7832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7833 (exit $ac_status); } &&
b4e70030
JB
7834 { ac_try='test -z "$ac_c_werror_flag"
7835 || test ! -s conftest.err'
bec39cab
AC
7836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7837 (eval $ac_try) 2>&5
7838 ac_status=$?
7839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7840 (exit $ac_status); }; } &&
7841 { ac_try='test -s conftest.$ac_objext'
7842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7843 (eval $ac_try) 2>&5
7844 ac_status=$?
7845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7846 (exit $ac_status); }; }; then
7847 ac_header_compiler=yes
7848else
7849 echo "$as_me: failed program was:" >&5
7850sed 's/^/| /' conftest.$ac_ext >&5
7851
b4e70030 7852ac_header_compiler=no
bec39cab
AC
7853fi
7854rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
7855echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7856echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
7857
7858# Is the header present?
b4e70030
JB
7859echo "$as_me:$LINENO: checking $ac_header presence" >&5
7860echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
7861cat >conftest.$ac_ext <<_ACEOF
7862/* confdefs.h. */
7863_ACEOF
7864cat confdefs.h >>conftest.$ac_ext
7865cat >>conftest.$ac_ext <<_ACEOF
7866/* end confdefs.h. */
7867#include <$ac_header>
7868_ACEOF
7869if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7870 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7871 ac_status=$?
7872 grep -v '^ *+' conftest.er1 >conftest.err
7873 rm -f conftest.er1
7874 cat conftest.err >&5
7875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7876 (exit $ac_status); } >/dev/null; then
7877 if test -s conftest.err; then
7878 ac_cpp_err=$ac_c_preproc_warn_flag
7879 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7880 else
7881 ac_cpp_err=
7882 fi
7883else
7884 ac_cpp_err=yes
7885fi
7886if test -z "$ac_cpp_err"; then
7887 ac_header_preproc=yes
7888else
7889 echo "$as_me: failed program was:" >&5
7890sed 's/^/| /' conftest.$ac_ext >&5
7891
7892 ac_header_preproc=no
7893fi
7894rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7895echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7896echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
7897
7898# So? What about this header?
7899case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7900 yes:no: )
7901 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7902echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7903 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7904echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7905 ac_header_preproc=yes
7906 ;;
7907 no:yes:* )
7908 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7909echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7910 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7911echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7912 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7913echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7914 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7915echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7916 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7917echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7918 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7919echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
7920 (
7921 cat <<\_ASBOX
7922## ------------------------------------------ ##
7923## Report this to the AC_PACKAGE_NAME lists. ##
7924## ------------------------------------------ ##
7925_ASBOX
7926 ) |
7927 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
7928 ;;
7929esac
b4e70030
JB
7930echo "$as_me:$LINENO: checking for $ac_header" >&5
7931echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7932if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7933 echo $ECHO_N "(cached) $ECHO_C" >&6
7934else
7935 eval "$as_ac_Header=\$ac_header_preproc"
7936fi
b4e70030
JB
7937echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7938echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7939
7940fi
7941if test `eval echo '${'$as_ac_Header'}'` = yes; then
7942 cat >>confdefs.h <<_ACEOF
7943#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7944_ACEOF
7945
7946fi
7947
7948done
7949
a9322a30
TT
7950 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
7951 enable_libunwind=yes;
7952 fi
7953
7954fi;
7955
7956if test x"$enable_libunwind" = xyes; then
7957
bec39cab 7958
a9322a30 7959for ac_header in libunwind.h libunwind-ia64.h
bec39cab
AC
7960do
7961as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7962if eval "test \"\${$as_ac_Header+set}\" = set"; then
7963 echo "$as_me:$LINENO: checking for $ac_header" >&5
7964echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7965if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7966 echo $ECHO_N "(cached) $ECHO_C" >&6
7967fi
b4e70030
JB
7968echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7969echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7970else
7971 # Is the header compilable?
b4e70030
JB
7972echo "$as_me:$LINENO: checking $ac_header usability" >&5
7973echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7974cat >conftest.$ac_ext <<_ACEOF
7975/* confdefs.h. */
7976_ACEOF
7977cat confdefs.h >>conftest.$ac_ext
7978cat >>conftest.$ac_ext <<_ACEOF
7979/* end confdefs.h. */
7980$ac_includes_default
7981#include <$ac_header>
7982_ACEOF
7983rm -f conftest.$ac_objext
7984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7985 (eval $ac_compile) 2>conftest.er1
7986 ac_status=$?
7987 grep -v '^ *+' conftest.er1 >conftest.err
7988 rm -f conftest.er1
7989 cat conftest.err >&5
7990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991 (exit $ac_status); } &&
b4e70030
JB
7992 { ac_try='test -z "$ac_c_werror_flag"
7993 || test ! -s conftest.err'
bec39cab
AC
7994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7995 (eval $ac_try) 2>&5
7996 ac_status=$?
7997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7998 (exit $ac_status); }; } &&
7999 { ac_try='test -s conftest.$ac_objext'
8000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8001 (eval $ac_try) 2>&5
8002 ac_status=$?
8003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8004 (exit $ac_status); }; }; then
8005 ac_header_compiler=yes
8006else
8007 echo "$as_me: failed program was:" >&5
8008sed 's/^/| /' conftest.$ac_ext >&5
8009
b4e70030 8010ac_header_compiler=no
bec39cab
AC
8011fi
8012rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8013echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8014echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8015
8016# Is the header present?
b4e70030
JB
8017echo "$as_me:$LINENO: checking $ac_header presence" >&5
8018echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8019cat >conftest.$ac_ext <<_ACEOF
8020/* confdefs.h. */
8021_ACEOF
8022cat confdefs.h >>conftest.$ac_ext
8023cat >>conftest.$ac_ext <<_ACEOF
8024/* end confdefs.h. */
8025#include <$ac_header>
8026_ACEOF
8027if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8028 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8029 ac_status=$?
8030 grep -v '^ *+' conftest.er1 >conftest.err
8031 rm -f conftest.er1
8032 cat conftest.err >&5
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); } >/dev/null; then
8035 if test -s conftest.err; then
8036 ac_cpp_err=$ac_c_preproc_warn_flag
8037 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8038 else
8039 ac_cpp_err=
8040 fi
8041else
8042 ac_cpp_err=yes
8043fi
8044if test -z "$ac_cpp_err"; then
8045 ac_header_preproc=yes
8046else
8047 echo "$as_me: failed program was:" >&5
8048sed 's/^/| /' conftest.$ac_ext >&5
8049
8050 ac_header_preproc=no
8051fi
8052rm -f conftest.err conftest.$ac_ext
b4e70030
JB
8053echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8054echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
8055
8056# So? What about this header?
8057case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8058 yes:no: )
8059 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8060echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8061 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8062echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8063 ac_header_preproc=yes
8064 ;;
8065 no:yes:* )
8066 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8067echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8068 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8069echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8070 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8071echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8072 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8073echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8074 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8075echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8076 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8077echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8078 (
8079 cat <<\_ASBOX
8080## ------------------------------------------ ##
8081## Report this to the AC_PACKAGE_NAME lists. ##
8082## ------------------------------------------ ##
8083_ASBOX
8084 ) |
8085 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8086 ;;
8087esac
b4e70030
JB
8088echo "$as_me:$LINENO: checking for $ac_header" >&5
8089echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8090if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8091 echo $ECHO_N "(cached) $ECHO_C" >&6
8092else
8093 eval "$as_ac_Header=\$ac_header_preproc"
8094fi
b4e70030
JB
8095echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8096echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8097
8098fi
8099if test `eval echo '${'$as_ac_Header'}'` = yes; then
8100 cat >>confdefs.h <<_ACEOF
8101#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8102_ACEOF
8103
8104fi
8105
8106done
8107
bec39cab 8108
a9322a30
TT
8109cat >>confdefs.h <<\_ACEOF
8110#define HAVE_LIBUNWIND 1
8111_ACEOF
8112
8113 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8114 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8115 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8116fi
8117
8118# Profiling support.
8119# Check whether --enable-profiling or --disable-profiling was given.
8120if test "${enable_profiling+set}" = set; then
8121 enableval="$enable_profiling"
8122 case $enableval in
8123 yes | no)
8124 ;;
8125 *)
8126 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-profile" >&5
8127echo "$as_me: error: bad value $enableval for --enable-profile" >&2;}
8128 { (exit 1); exit 1; }; } ;;
8129 esac
8130else
8131 enable_profiling=no
b4e70030 8132fi;
bec39cab 8133
bec39cab 8134
a9322a30
TT
8135
8136for ac_func in monstartup _mcleanup
bec39cab 8137do
a9322a30
TT
8138as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8139echo "$as_me:$LINENO: checking for $ac_func" >&5
8140echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8141if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 8142 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8143else
a9322a30 8144 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8145/* confdefs.h. */
8146_ACEOF
8147cat confdefs.h >>conftest.$ac_ext
8148cat >>conftest.$ac_ext <<_ACEOF
8149/* end confdefs.h. */
a9322a30
TT
8150/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8151 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8152#define $ac_func innocuous_$ac_func
8153
8154/* System header to define __stub macros and hopefully few prototypes,
8155 which can conflict with char $ac_func (); below.
8156 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8157 <limits.h> exists even on freestanding compilers. */
8158
8159#ifdef __STDC__
8160# include <limits.h>
8161#else
8162# include <assert.h>
8163#endif
8164
8165#undef $ac_func
8166
8167/* Override any gcc2 internal prototype to avoid an error. */
8168#ifdef __cplusplus
8169extern "C"
8170{
8171#endif
8172/* We use char because int might match the return type of a gcc2
8173 builtin and then its argument prototype would still apply. */
8174char $ac_func ();
8175/* The GNU C library defines this for functions which it implements
8176 to always fail with ENOSYS. Some functions are actually named
8177 something starting with __ and the normal name is an alias. */
8178#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8179choke me
8180#else
8181char (*f) () = $ac_func;
8182#endif
8183#ifdef __cplusplus
8184}
8185#endif
8186
8187int
8188main ()
8189{
8190return f != $ac_func;
8191 ;
8192 return 0;
8193}
bec39cab 8194_ACEOF
a9322a30
TT
8195rm -f conftest.$ac_objext conftest$ac_exeext
8196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8197 (eval $ac_link) 2>conftest.er1
bec39cab
AC
8198 ac_status=$?
8199 grep -v '^ *+' conftest.er1 >conftest.err
8200 rm -f conftest.er1
8201 cat conftest.err >&5
8202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8203 (exit $ac_status); } &&
b4e70030
JB
8204 { ac_try='test -z "$ac_c_werror_flag"
8205 || test ! -s conftest.err'
bec39cab
AC
8206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8207 (eval $ac_try) 2>&5
8208 ac_status=$?
8209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8210 (exit $ac_status); }; } &&
a9322a30 8211 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
8212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8213 (eval $ac_try) 2>&5
8214 ac_status=$?
8215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8216 (exit $ac_status); }; }; then
a9322a30 8217 eval "$as_ac_var=yes"
bec39cab
AC
8218else
8219 echo "$as_me: failed program was:" >&5
8220sed 's/^/| /' conftest.$ac_ext >&5
8221
a9322a30 8222eval "$as_ac_var=no"
bec39cab 8223fi
a9322a30
TT
8224rm -f conftest.err conftest.$ac_objext \
8225 conftest$ac_exeext conftest.$ac_ext
bec39cab 8226fi
a9322a30
TT
8227echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8228echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8229if test `eval echo '${'$as_ac_var'}'` = yes; then
bec39cab 8230 cat >>confdefs.h <<_ACEOF
a9322a30 8231#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab
AC
8232_ACEOF
8233
8234fi
bec39cab
AC
8235done
8236
a9322a30
TT
8237echo "$as_me:$LINENO: checking for _etext" >&5
8238echo $ECHO_N "checking for _etext... $ECHO_C" >&6
8239if test "${ac_cv_var__etext+set}" = set; then
bec39cab 8240 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8241else
a9322a30 8242 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8243/* confdefs.h. */
8244_ACEOF
8245cat confdefs.h >>conftest.$ac_ext
8246cat >>conftest.$ac_ext <<_ACEOF
8247/* end confdefs.h. */
a9322a30
TT
8248#include <stdlib.h>
8249extern char _etext;
8250
8251int
8252main ()
8253{
8254free (&_etext);
8255 ;
8256 return 0;
8257}
bec39cab 8258_ACEOF
a9322a30
TT
8259rm -f conftest.$ac_objext conftest$ac_exeext
8260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8261 (eval $ac_link) 2>conftest.er1
bec39cab
AC
8262 ac_status=$?
8263 grep -v '^ *+' conftest.er1 >conftest.err
8264 rm -f conftest.er1
8265 cat conftest.err >&5
8266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8267 (exit $ac_status); } &&
b4e70030
JB
8268 { ac_try='test -z "$ac_c_werror_flag"
8269 || test ! -s conftest.err'
bec39cab
AC
8270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8271 (eval $ac_try) 2>&5
8272 ac_status=$?
8273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8274 (exit $ac_status); }; } &&
a9322a30 8275 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
8276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8277 (eval $ac_try) 2>&5
8278 ac_status=$?
8279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8280 (exit $ac_status); }; }; then
a9322a30 8281 ac_cv_var__etext=yes
bec39cab
AC
8282else
8283 echo "$as_me: failed program was:" >&5
8284sed 's/^/| /' conftest.$ac_ext >&5
8285
a9322a30 8286ac_cv_var__etext=no
bec39cab 8287fi
a9322a30
TT
8288rm -f conftest.err conftest.$ac_objext \
8289 conftest$ac_exeext conftest.$ac_ext
bec39cab 8290fi
a9322a30
TT
8291echo "$as_me:$LINENO: result: $ac_cv_var__etext" >&5
8292echo "${ECHO_T}$ac_cv_var__etext" >&6
8293if test $ac_cv_var__etext = yes; then
60ca704f
SE
8294
8295cat >>confdefs.h <<\_ACEOF
a9322a30 8296#define HAVE__ETEXT 1
bec39cab
AC
8297_ACEOF
8298
bec39cab 8299fi
a9322a30
TT
8300echo "$as_me:$LINENO: checking for etext" >&5
8301echo $ECHO_N "checking for etext... $ECHO_C" >&6
8302if test "${ac_cv_var_etext+set}" = set; then
bec39cab
AC
8303 echo $ECHO_N "(cached) $ECHO_C" >&6
8304else
8305 cat >conftest.$ac_ext <<_ACEOF
8306/* confdefs.h. */
8307_ACEOF
8308cat confdefs.h >>conftest.$ac_ext
8309cat >>conftest.$ac_ext <<_ACEOF
8310/* end confdefs.h. */
a9322a30
TT
8311#include <stdlib.h>
8312extern char etext;
bec39cab
AC
8313
8314int
8315main ()
8316{
a9322a30 8317free (&etext);
bec39cab
AC
8318 ;
8319 return 0;
8320}
8321_ACEOF
8322rm -f conftest.$ac_objext conftest$ac_exeext
8323if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8324 (eval $ac_link) 2>conftest.er1
8325 ac_status=$?
8326 grep -v '^ *+' conftest.er1 >conftest.err
8327 rm -f conftest.er1
8328 cat conftest.err >&5
8329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8330 (exit $ac_status); } &&
b4e70030
JB
8331 { ac_try='test -z "$ac_c_werror_flag"
8332 || test ! -s conftest.err'
bec39cab
AC
8333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8334 (eval $ac_try) 2>&5
8335 ac_status=$?
8336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337 (exit $ac_status); }; } &&
8338 { ac_try='test -s conftest$ac_exeext'
8339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8340 (eval $ac_try) 2>&5
8341 ac_status=$?
8342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8343 (exit $ac_status); }; }; then
a9322a30 8344 ac_cv_var_etext=yes
bec39cab
AC
8345else
8346 echo "$as_me: failed program was:" >&5
8347sed 's/^/| /' conftest.$ac_ext >&5
8348
a9322a30 8349ac_cv_var_etext=no
bec39cab
AC
8350fi
8351rm -f conftest.err conftest.$ac_objext \
8352 conftest$ac_exeext conftest.$ac_ext
8353fi
a9322a30
TT
8354echo "$as_me:$LINENO: result: $ac_cv_var_etext" >&5
8355echo "${ECHO_T}$ac_cv_var_etext" >&6
8356if test $ac_cv_var_etext = yes; then
8357
8358cat >>confdefs.h <<\_ACEOF
8359#define HAVE_ETEXT 1
bec39cab
AC
8360_ACEOF
8361
8362fi
a9322a30
TT
8363if test "$enable_profiling" = yes ; then
8364 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
8365 { { echo "$as_me:$LINENO: error: --enable-profiling requires monstartup and _mcleanup" >&5
8366echo "$as_me: error: --enable-profiling requires monstartup and _mcleanup" >&2;}
8367 { (exit 1); exit 1; }; }
8368 fi
8369 PROFILE_CFLAGS=-pg
8370 OLD_CFLAGS="$CFLAGS"
8371 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8372
a9322a30
TT
8373 echo "$as_me:$LINENO: checking whether $CC supports -pg" >&5
8374echo $ECHO_N "checking whether $CC supports -pg... $ECHO_C" >&6
8375if test "${ac_cv_cc_supports_pg+set}" = set; then
bec39cab
AC
8376 echo $ECHO_N "(cached) $ECHO_C" >&6
8377else
8378 cat >conftest.$ac_ext <<_ACEOF
8379/* confdefs.h. */
8380_ACEOF
8381cat confdefs.h >>conftest.$ac_ext
8382cat >>conftest.$ac_ext <<_ACEOF
8383/* end confdefs.h. */
bec39cab
AC
8384
8385int
8386main ()
8387{
a9322a30 8388int x;
bec39cab
AC
8389 ;
8390 return 0;
8391}
8392_ACEOF
a9322a30
TT
8393rm -f conftest.$ac_objext
8394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8395 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
8396 ac_status=$?
8397 grep -v '^ *+' conftest.er1 >conftest.err
8398 rm -f conftest.er1
8399 cat conftest.err >&5
8400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8401 (exit $ac_status); } &&
b4e70030
JB
8402 { ac_try='test -z "$ac_c_werror_flag"
8403 || test ! -s conftest.err'
bec39cab
AC
8404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8405 (eval $ac_try) 2>&5
8406 ac_status=$?
8407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8408 (exit $ac_status); }; } &&
a9322a30 8409 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
8410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8411 (eval $ac_try) 2>&5
8412 ac_status=$?
8413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8414 (exit $ac_status); }; }; then
a9322a30 8415 ac_cv_cc_supports_pg=yes
bec39cab
AC
8416else
8417 echo "$as_me: failed program was:" >&5
8418sed 's/^/| /' conftest.$ac_ext >&5
8419
a9322a30 8420ac_cv_cc_supports_pg=no
bec39cab 8421fi
a9322a30 8422rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8423fi
a9322a30
TT
8424echo "$as_me:$LINENO: result: $ac_cv_cc_supports_pg" >&5
8425echo "${ECHO_T}$ac_cv_cc_supports_pg" >&6
bec39cab 8426
a9322a30
TT
8427 if test $ac_cv_cc_supports_pg = no; then
8428 { { echo "$as_me:$LINENO: error: --enable-profiling requires a compiler which supports -pg" >&5
8429echo "$as_me: error: --enable-profiling requires a compiler which supports -pg" >&2;}
8430 { (exit 1); exit 1; }; }
8431 fi
bec39cab 8432
a9322a30 8433 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8434fi
8435
c16158bc
JM
8436
8437
8438# Check whether --with-pkgversion or --without-pkgversion was given.
8439if test "${with_pkgversion+set}" = set; then
8440 withval="$with_pkgversion"
8441 case "$withval" in
8442 yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
8443echo "$as_me: error: package version not specified" >&2;}
8444 { (exit 1); exit 1; }; } ;;
8445 no) PKGVERSION= ;;
8446 *) PKGVERSION="($withval) " ;;
8447 esac
8448else
8449 PKGVERSION="(GDB) "
8450
8451fi;
8452
8453
8454
8455
8456# Check whether --with-bugurl or --without-bugurl was given.
8457if test "${with_bugurl+set}" = set; then
8458 withval="$with_bugurl"
8459 case "$withval" in
8460 yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
8461echo "$as_me: error: bug URL not specified" >&2;}
8462 { (exit 1); exit 1; }; } ;;
8463 no) BUGURL=
8464 ;;
8465 *) BUGURL="$withval"
8466 ;;
8467 esac
8468else
8469 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8470
8471fi;
8472 case ${BUGURL} in
8473 "")
8474 REPORT_BUGS_TO=
8475 REPORT_BUGS_TEXI=
8476 ;;
8477 *)
8478 REPORT_BUGS_TO="<$BUGURL>"
8479 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8480 ;;
8481 esac;
8482
8483
8484
8485
8486cat >>confdefs.h <<_ACEOF
8487#define PKGVERSION "$PKGVERSION"
8488_ACEOF
8489
8490
8491cat >>confdefs.h <<_ACEOF
8492#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8493_ACEOF
8494
8495
bec39cab
AC
8496# --------------------- #
8497# Checks for programs. #
8498# --------------------- #
8499
8500for ac_prog in gawk mawk nawk awk
8501do
8502 # Extract the first word of "$ac_prog", so it can be a program name with args.
8503set dummy $ac_prog; ac_word=$2
b4e70030
JB
8504echo "$as_me:$LINENO: checking for $ac_word" >&5
8505echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8506if test "${ac_cv_prog_AWK+set}" = set; then
8507 echo $ECHO_N "(cached) $ECHO_C" >&6
8508else
8509 if test -n "$AWK"; then
8510 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8511else
8512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8513for as_dir in $PATH
8514do
8515 IFS=$as_save_IFS
8516 test -z "$as_dir" && as_dir=.
8517 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8518 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8519 ac_cv_prog_AWK="$ac_prog"
8520 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8521 break 2
8522 fi
8523done
8524done
8525
8526fi
8527fi
8528AWK=$ac_cv_prog_AWK
8529if test -n "$AWK"; then
b4e70030
JB
8530 echo "$as_me:$LINENO: result: $AWK" >&5
8531echo "${ECHO_T}$AWK" >&6
bec39cab 8532else
b4e70030
JB
8533 echo "$as_me:$LINENO: result: no" >&5
8534echo "${ECHO_T}no" >&6
bec39cab
AC
8535fi
8536
8537 test -n "$AWK" && break
8538done
8539
8540# Find a good install program. We prefer a C program (faster),
8541# so one script is as good as another. But avoid the broken or
8542# incompatible versions:
8543# SysV /etc/install, /usr/sbin/install
8544# SunOS /usr/etc/install
8545# IRIX /sbin/install
8546# AIX /bin/install
8547# AmigaOS /C/install, which installs bootblocks on floppy discs
8548# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8549# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8550# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8551# OS/2's system install, which has a completely different semantic
8552# ./install, which can be erroneously created by make from ./install.sh.
85541719 8553# Reject install programs that cannot install multiple files.
b4e70030
JB
8554echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
8555echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
bec39cab
AC
8556if test -z "$INSTALL"; then
8557if test "${ac_cv_path_install+set}" = set; then
8558 echo $ECHO_N "(cached) $ECHO_C" >&6
8559else
8560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8561for as_dir in $PATH
8562do
8563 IFS=$as_save_IFS
8564 test -z "$as_dir" && as_dir=.
8565 # Account for people who put trailing slashes in PATH elements.
8566case $as_dir/ in
8567 ./ | .// | /cC/* | \
8568 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8569 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
8570 /usr/ucb/* ) ;;
c906108c 8571 *)
bec39cab
AC
8572 # OSF1 and SCO ODT 3.0 have their own names for install.
8573 # Don't use installbsd from OSF since it installs stuff as root
8574 # by default.
8575 for ac_prog in ginstall scoinst install; do
8576 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8577 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
bec39cab
AC
8578 if test $ac_prog = install &&
8579 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8580 # AIX install. It has an incompatible calling convention.
8581 :
8582 elif test $ac_prog = install &&
8583 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8584 # program-specific install script used by HP pwplus--don't use.
8585 :
8586 else
85541719
DE
8587 rm -rf conftest.one conftest.two conftest.dir
8588 echo one > conftest.one
8589 echo two > conftest.two
8590 mkdir conftest.dir
8591 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
8592 test -s conftest.one && test -s conftest.two &&
8593 test -s conftest.dir/conftest.one &&
8594 test -s conftest.dir/conftest.two
8595 then
8596 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8597 break 3
8598 fi
bec39cab
AC
8599 fi
8600 fi
8601 done
8602 done
8603 ;;
c906108c 8604esac
bec39cab
AC
8605done
8606
85541719 8607rm -rf conftest.one conftest.two conftest.dir
bec39cab
AC
8608
8609fi
8610 if test "${ac_cv_path_install+set}" = set; then
8611 INSTALL=$ac_cv_path_install
8612 else
85541719
DE
8613 # As a last resort, use the slow shell script. Don't cache a
8614 # value for INSTALL within a source directory, because that will
bec39cab 8615 # break other packages using the cache if that directory is
85541719 8616 # removed, or if the value is a relative name.
bec39cab
AC
8617 INSTALL=$ac_install_sh
8618 fi
8619fi
b4e70030
JB
8620echo "$as_me:$LINENO: result: $INSTALL" >&5
8621echo "${ECHO_T}$INSTALL" >&6
bec39cab
AC
8622
8623# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8624# It thinks the first close brace ends the variable substitution.
8625test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8626
8627test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8628
8629test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8630
b4e70030
JB
8631echo "$as_me:$LINENO: checking whether ln -s works" >&5
8632echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
bec39cab
AC
8633LN_S=$as_ln_s
8634if test "$LN_S" = "ln -s"; then
b4e70030
JB
8635 echo "$as_me:$LINENO: result: yes" >&5
8636echo "${ECHO_T}yes" >&6
bec39cab 8637else
b4e70030
JB
8638 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
8639echo "${ECHO_T}no, using $LN_S" >&6
bec39cab
AC
8640fi
8641
8642if test -n "$ac_tool_prefix"; then
8643 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8644set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b4e70030
JB
8645echo "$as_me:$LINENO: checking for $ac_word" >&5
8646echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8647if test "${ac_cv_prog_RANLIB+set}" = set; then
8648 echo $ECHO_N "(cached) $ECHO_C" >&6
8649else
8650 if test -n "$RANLIB"; then
8651 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8652else
8653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8654for as_dir in $PATH
8655do
8656 IFS=$as_save_IFS
8657 test -z "$as_dir" && as_dir=.
8658 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8659 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8660 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8661 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8662 break 2
8663 fi
8664done
8665done
8666
8667fi
8668fi
8669RANLIB=$ac_cv_prog_RANLIB
8670if test -n "$RANLIB"; then
b4e70030
JB
8671 echo "$as_me:$LINENO: result: $RANLIB" >&5
8672echo "${ECHO_T}$RANLIB" >&6
bec39cab 8673else
b4e70030
JB
8674 echo "$as_me:$LINENO: result: no" >&5
8675echo "${ECHO_T}no" >&6
bec39cab
AC
8676fi
8677
8678fi
8679if test -z "$ac_cv_prog_RANLIB"; then
8680 ac_ct_RANLIB=$RANLIB
8681 # Extract the first word of "ranlib", so it can be a program name with args.
8682set dummy ranlib; ac_word=$2
b4e70030
JB
8683echo "$as_me:$LINENO: checking for $ac_word" >&5
8684echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8685if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8686 echo $ECHO_N "(cached) $ECHO_C" >&6
8687else
8688 if test -n "$ac_ct_RANLIB"; then
8689 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8690else
8691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8692for as_dir in $PATH
8693do
8694 IFS=$as_save_IFS
8695 test -z "$as_dir" && as_dir=.
8696 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8697 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8698 ac_cv_prog_ac_ct_RANLIB="ranlib"
8699 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8700 break 2
8701 fi
8702done
8703done
8704
b4e70030 8705 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
bec39cab
AC
8706fi
8707fi
8708ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8709if test -n "$ac_ct_RANLIB"; then
b4e70030
JB
8710 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8711echo "${ECHO_T}$ac_ct_RANLIB" >&6
bec39cab 8712else
b4e70030
JB
8713 echo "$as_me:$LINENO: result: no" >&5
8714echo "${ECHO_T}no" >&6
bec39cab
AC
8715fi
8716
b4e70030 8717 RANLIB=$ac_ct_RANLIB
bec39cab
AC
8718else
8719 RANLIB="$ac_cv_prog_RANLIB"
8720fi
8721
8722for ac_prog in 'bison -y' byacc
8723do
8724 # Extract the first word of "$ac_prog", so it can be a program name with args.
8725set dummy $ac_prog; ac_word=$2
b4e70030
JB
8726echo "$as_me:$LINENO: checking for $ac_word" >&5
8727echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8728if test "${ac_cv_prog_YACC+set}" = set; then
8729 echo $ECHO_N "(cached) $ECHO_C" >&6
8730else
8731 if test -n "$YACC"; then
8732 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8733else
8734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8735for as_dir in $PATH
8736do
8737 IFS=$as_save_IFS
8738 test -z "$as_dir" && as_dir=.
8739 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8740 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8741 ac_cv_prog_YACC="$ac_prog"
8742 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8743 break 2
8744 fi
8745done
8746done
8747
8748fi
8749fi
8750YACC=$ac_cv_prog_YACC
8751if test -n "$YACC"; then
b4e70030
JB
8752 echo "$as_me:$LINENO: result: $YACC" >&5
8753echo "${ECHO_T}$YACC" >&6
bec39cab 8754else
b4e70030
JB
8755 echo "$as_me:$LINENO: result: no" >&5
8756echo "${ECHO_T}no" >&6
bec39cab
AC
8757fi
8758
8759 test -n "$YACC" && break
8760done
8761test -n "$YACC" || YACC="yacc"
8762
8763
8764if test -n "$ac_tool_prefix"; then
8765 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8766set dummy ${ac_tool_prefix}ar; ac_word=$2
b4e70030
JB
8767echo "$as_me:$LINENO: checking for $ac_word" >&5
8768echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8769if test "${ac_cv_prog_AR+set}" = set; then
8770 echo $ECHO_N "(cached) $ECHO_C" >&6
8771else
8772 if test -n "$AR"; then
8773 ac_cv_prog_AR="$AR" # Let the user override the test.
8774else
8775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8776for as_dir in $PATH
8777do
8778 IFS=$as_save_IFS
8779 test -z "$as_dir" && as_dir=.
8780 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8781 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8782 ac_cv_prog_AR="${ac_tool_prefix}ar"
8783 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8784 break 2
8785 fi
8786done
8787done
8788
8789fi
8790fi
8791AR=$ac_cv_prog_AR
8792if test -n "$AR"; then
b4e70030
JB
8793 echo "$as_me:$LINENO: result: $AR" >&5
8794echo "${ECHO_T}$AR" >&6
bec39cab 8795else
b4e70030
JB
8796 echo "$as_me:$LINENO: result: no" >&5
8797echo "${ECHO_T}no" >&6
bec39cab
AC
8798fi
8799
8800fi
8801if test -z "$ac_cv_prog_AR"; then
8802 ac_ct_AR=$AR
8803 # Extract the first word of "ar", so it can be a program name with args.
8804set dummy ar; ac_word=$2
b4e70030
JB
8805echo "$as_me:$LINENO: checking for $ac_word" >&5
8806echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8807if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
8808 echo $ECHO_N "(cached) $ECHO_C" >&6
8809else
8810 if test -n "$ac_ct_AR"; then
8811 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8812else
8813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8814for as_dir in $PATH
8815do
8816 IFS=$as_save_IFS
8817 test -z "$as_dir" && as_dir=.
8818 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8819 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8820 ac_cv_prog_ac_ct_AR="ar"
8821 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8822 break 2
8823 fi
8824done
8825done
8826
8827fi
8828fi
8829ac_ct_AR=$ac_cv_prog_ac_ct_AR
8830if test -n "$ac_ct_AR"; then
b4e70030
JB
8831 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
8832echo "${ECHO_T}$ac_ct_AR" >&6
bec39cab 8833else
b4e70030
JB
8834 echo "$as_me:$LINENO: result: no" >&5
8835echo "${ECHO_T}no" >&6
bec39cab
AC
8836fi
8837
b4e70030 8838 AR=$ac_ct_AR
bec39cab
AC
8839else
8840 AR="$ac_cv_prog_AR"
8841fi
8842
8843if test -n "$ac_tool_prefix"; then
8844 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8845set dummy ${ac_tool_prefix}dlltool; ac_word=$2
b4e70030
JB
8846echo "$as_me:$LINENO: checking for $ac_word" >&5
8847echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8848if test "${ac_cv_prog_DLLTOOL+set}" = set; then
8849 echo $ECHO_N "(cached) $ECHO_C" >&6
8850else
8851 if test -n "$DLLTOOL"; then
8852 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8853else
8854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8855for as_dir in $PATH
8856do
8857 IFS=$as_save_IFS
8858 test -z "$as_dir" && as_dir=.
8859 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8860 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8861 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8862 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8863 break 2
8864 fi
8865done
8866done
8867
8868fi
8869fi
8870DLLTOOL=$ac_cv_prog_DLLTOOL
8871if test -n "$DLLTOOL"; then
b4e70030
JB
8872 echo "$as_me:$LINENO: result: $DLLTOOL" >&5
8873echo "${ECHO_T}$DLLTOOL" >&6
bec39cab 8874else
b4e70030
JB
8875 echo "$as_me:$LINENO: result: no" >&5
8876echo "${ECHO_T}no" >&6
bec39cab
AC
8877fi
8878
8879fi
8880if test -z "$ac_cv_prog_DLLTOOL"; then
8881 ac_ct_DLLTOOL=$DLLTOOL
8882 # Extract the first word of "dlltool", so it can be a program name with args.
8883set dummy dlltool; ac_word=$2
b4e70030
JB
8884echo "$as_me:$LINENO: checking for $ac_word" >&5
8885echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8886if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
8887 echo $ECHO_N "(cached) $ECHO_C" >&6
8888else
8889 if test -n "$ac_ct_DLLTOOL"; then
8890 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8891else
8892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8893for as_dir in $PATH
8894do
8895 IFS=$as_save_IFS
8896 test -z "$as_dir" && as_dir=.
8897 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8898 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8899 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8900 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8901 break 2
8902 fi
8903done
8904done
8905
8906fi
8907fi
8908ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8909if test -n "$ac_ct_DLLTOOL"; then
b4e70030
JB
8910 echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
8911echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
bec39cab 8912else
b4e70030
JB
8913 echo "$as_me:$LINENO: result: no" >&5
8914echo "${ECHO_T}no" >&6
bec39cab
AC
8915fi
8916
b4e70030 8917 DLLTOOL=$ac_ct_DLLTOOL
bec39cab
AC
8918else
8919 DLLTOOL="$ac_cv_prog_DLLTOOL"
8920fi
8921
8922if test -n "$ac_tool_prefix"; then
8923 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8924set dummy ${ac_tool_prefix}windres; ac_word=$2
b4e70030
JB
8925echo "$as_me:$LINENO: checking for $ac_word" >&5
8926echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8927if test "${ac_cv_prog_WINDRES+set}" = set; then
8928 echo $ECHO_N "(cached) $ECHO_C" >&6
8929else
8930 if test -n "$WINDRES"; then
8931 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8932else
8933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8934for as_dir in $PATH
8935do
8936 IFS=$as_save_IFS
8937 test -z "$as_dir" && as_dir=.
8938 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8939 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8940 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
8941 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8942 break 2
8943 fi
8944done
8945done
8946
8947fi
8948fi
8949WINDRES=$ac_cv_prog_WINDRES
8950if test -n "$WINDRES"; then
b4e70030
JB
8951 echo "$as_me:$LINENO: result: $WINDRES" >&5
8952echo "${ECHO_T}$WINDRES" >&6
bec39cab 8953else
b4e70030
JB
8954 echo "$as_me:$LINENO: result: no" >&5
8955echo "${ECHO_T}no" >&6
bec39cab
AC
8956fi
8957
8958fi
8959if test -z "$ac_cv_prog_WINDRES"; then
8960 ac_ct_WINDRES=$WINDRES
8961 # Extract the first word of "windres", so it can be a program name with args.
8962set dummy windres; ac_word=$2
b4e70030
JB
8963echo "$as_me:$LINENO: checking for $ac_word" >&5
8964echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8965if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
8966 echo $ECHO_N "(cached) $ECHO_C" >&6
8967else
8968 if test -n "$ac_ct_WINDRES"; then
8969 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8970else
8971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8972for as_dir in $PATH
8973do
8974 IFS=$as_save_IFS
8975 test -z "$as_dir" && as_dir=.
8976 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8977 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8978 ac_cv_prog_ac_ct_WINDRES="windres"
8979 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8980 break 2
8981 fi
8982done
8983done
8984
8985fi
8986fi
8987ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8988if test -n "$ac_ct_WINDRES"; then
b4e70030
JB
8989 echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
8990echo "${ECHO_T}$ac_ct_WINDRES" >&6
bec39cab 8991else
b4e70030
JB
8992 echo "$as_me:$LINENO: result: no" >&5
8993echo "${ECHO_T}no" >&6
c906108c 8994fi
bec39cab 8995
b4e70030 8996 WINDRES=$ac_ct_WINDRES
c906108c 8997else
bec39cab 8998 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
8999fi
9000
bec39cab
AC
9001
9002# Needed for GNU/Hurd.
9003if test -n "$ac_tool_prefix"; then
9004 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
9005set dummy ${ac_tool_prefix}mig; ac_word=$2
b4e70030
JB
9006echo "$as_me:$LINENO: checking for $ac_word" >&5
9007echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9008if test "${ac_cv_prog_MIG+set}" = set; then
9009 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 9010else
bec39cab
AC
9011 if test -n "$MIG"; then
9012 ac_cv_prog_MIG="$MIG" # Let the user override the test.
9013else
9014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9015for as_dir in $PATH
9016do
9017 IFS=$as_save_IFS
9018 test -z "$as_dir" && as_dir=.
9019 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9020 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9021 ac_cv_prog_MIG="${ac_tool_prefix}mig"
9022 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9023 break 2
9024 fi
9025done
9026done
9027
c906108c 9028fi
bec39cab
AC
9029fi
9030MIG=$ac_cv_prog_MIG
9031if test -n "$MIG"; then
b4e70030
JB
9032 echo "$as_me:$LINENO: result: $MIG" >&5
9033echo "${ECHO_T}$MIG" >&6
c906108c 9034else
b4e70030
JB
9035 echo "$as_me:$LINENO: result: no" >&5
9036echo "${ECHO_T}no" >&6
c906108c
SS
9037fi
9038
bec39cab
AC
9039fi
9040if test -z "$ac_cv_prog_MIG"; then
9041 ac_ct_MIG=$MIG
9042 # Extract the first word of "mig", so it can be a program name with args.
9043set dummy mig; ac_word=$2
b4e70030
JB
9044echo "$as_me:$LINENO: checking for $ac_word" >&5
9045echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9046if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then
9047 echo $ECHO_N "(cached) $ECHO_C" >&6
9048else
9049 if test -n "$ac_ct_MIG"; then
9050 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
9051else
9052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9053for as_dir in $PATH
9054do
9055 IFS=$as_save_IFS
9056 test -z "$as_dir" && as_dir=.
9057 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9058 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9059 ac_cv_prog_ac_ct_MIG="mig"
9060 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9061 break 2
9062 fi
9063done
9064done
c906108c 9065
bec39cab
AC
9066fi
9067fi
9068ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9069if test -n "$ac_ct_MIG"; then
b4e70030
JB
9070 echo "$as_me:$LINENO: result: $ac_ct_MIG" >&5
9071echo "${ECHO_T}$ac_ct_MIG" >&6
bec39cab 9072else
b4e70030
JB
9073 echo "$as_me:$LINENO: result: no" >&5
9074echo "${ECHO_T}no" >&6
bec39cab 9075fi
c906108c 9076
b4e70030 9077 MIG=$ac_ct_MIG
bec39cab
AC
9078else
9079 MIG="$ac_cv_prog_MIG"
9080fi
c906108c 9081
c906108c 9082
bec39cab
AC
9083# ---------------------- #
9084# Checks for libraries. #
9085# ---------------------- #
c906108c 9086
bec39cab 9087# We might need to link with -lm; most simulators need it.
c906108c 9088
b4e70030
JB
9089echo "$as_me:$LINENO: checking for main in -lm" >&5
9090echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
bec39cab
AC
9091if test "${ac_cv_lib_m_main+set}" = set; then
9092 echo $ECHO_N "(cached) $ECHO_C" >&6
9093else
9094 ac_check_lib_save_LIBS=$LIBS
9095LIBS="-lm $LIBS"
9096cat >conftest.$ac_ext <<_ACEOF
9097/* confdefs.h. */
9098_ACEOF
9099cat confdefs.h >>conftest.$ac_ext
9100cat >>conftest.$ac_ext <<_ACEOF
9101/* end confdefs.h. */
c906108c 9102
c906108c 9103
bec39cab
AC
9104int
9105main ()
9106{
b4e70030 9107main ();
bec39cab
AC
9108 ;
9109 return 0;
9110}
9111_ACEOF
9112rm -f conftest.$ac_objext conftest$ac_exeext
9113if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9114 (eval $ac_link) 2>conftest.er1
9115 ac_status=$?
9116 grep -v '^ *+' conftest.er1 >conftest.err
9117 rm -f conftest.er1
9118 cat conftest.err >&5
9119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9120 (exit $ac_status); } &&
b4e70030
JB
9121 { ac_try='test -z "$ac_c_werror_flag"
9122 || test ! -s conftest.err'
bec39cab
AC
9123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9124 (eval $ac_try) 2>&5
9125 ac_status=$?
9126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9127 (exit $ac_status); }; } &&
9128 { ac_try='test -s conftest$ac_exeext'
9129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9130 (eval $ac_try) 2>&5
9131 ac_status=$?
9132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9133 (exit $ac_status); }; }; then
9134 ac_cv_lib_m_main=yes
9135else
9136 echo "$as_me: failed program was:" >&5
9137sed 's/^/| /' conftest.$ac_ext >&5
9138
b4e70030 9139ac_cv_lib_m_main=no
bec39cab
AC
9140fi
9141rm -f conftest.err conftest.$ac_objext \
9142 conftest$ac_exeext conftest.$ac_ext
9143LIBS=$ac_check_lib_save_LIBS
9144fi
b4e70030
JB
9145echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
9146echo "${ECHO_T}$ac_cv_lib_m_main" >&6
bec39cab
AC
9147if test $ac_cv_lib_m_main = yes; then
9148 cat >>confdefs.h <<_ACEOF
9149#define HAVE_LIBM 1
9150_ACEOF
9151
9152 LIBS="-lm $LIBS"
c906108c 9153
c906108c 9154fi
bec39cab
AC
9155
9156
9157# We need to link with -lw to get `wctype' on Solaris before Solaris
9158# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9159# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9160# is known to have this problem). Therefore we avoid libw if we can.
b4e70030
JB
9161echo "$as_me:$LINENO: checking for wctype" >&5
9162echo $ECHO_N "checking for wctype... $ECHO_C" >&6
bec39cab
AC
9163if test "${ac_cv_func_wctype+set}" = set; then
9164 echo $ECHO_N "(cached) $ECHO_C" >&6
9165else
9166 cat >conftest.$ac_ext <<_ACEOF
9167/* confdefs.h. */
9168_ACEOF
9169cat confdefs.h >>conftest.$ac_ext
9170cat >>conftest.$ac_ext <<_ACEOF
9171/* end confdefs.h. */
9172/* Define wctype to an innocuous variant, in case <limits.h> declares wctype.
9173 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9174#define wctype innocuous_wctype
9175
9176/* System header to define __stub macros and hopefully few prototypes,
9177 which can conflict with char wctype (); below.
9178 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9179 <limits.h> exists even on freestanding compilers. */
9180
9181#ifdef __STDC__
9182# include <limits.h>
9183#else
9184# include <assert.h>
9185#endif
9186
9187#undef wctype
9188
b4e70030 9189/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9190#ifdef __cplusplus
9191extern "C"
b4e70030 9192{
bec39cab 9193#endif
b4e70030
JB
9194/* We use char because int might match the return type of a gcc2
9195 builtin and then its argument prototype would still apply. */
bec39cab
AC
9196char wctype ();
9197/* The GNU C library defines this for functions which it implements
9198 to always fail with ENOSYS. Some functions are actually named
9199 something starting with __ and the normal name is an alias. */
b4e70030 9200#if defined (__stub_wctype) || defined (__stub___wctype)
bec39cab 9201choke me
b4e70030
JB
9202#else
9203char (*f) () = wctype;
9204#endif
9205#ifdef __cplusplus
9206}
bec39cab
AC
9207#endif
9208
9209int
9210main ()
9211{
b4e70030 9212return f != wctype;
bec39cab
AC
9213 ;
9214 return 0;
9215}
9216_ACEOF
9217rm -f conftest.$ac_objext conftest$ac_exeext
9218if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9219 (eval $ac_link) 2>conftest.er1
9220 ac_status=$?
9221 grep -v '^ *+' conftest.er1 >conftest.err
9222 rm -f conftest.er1
9223 cat conftest.err >&5
9224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9225 (exit $ac_status); } &&
b4e70030
JB
9226 { ac_try='test -z "$ac_c_werror_flag"
9227 || test ! -s conftest.err'
bec39cab
AC
9228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9229 (eval $ac_try) 2>&5
9230 ac_status=$?
9231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9232 (exit $ac_status); }; } &&
9233 { ac_try='test -s conftest$ac_exeext'
9234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9235 (eval $ac_try) 2>&5
9236 ac_status=$?
9237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9238 (exit $ac_status); }; }; then
9239 ac_cv_func_wctype=yes
9240else
9241 echo "$as_me: failed program was:" >&5
9242sed 's/^/| /' conftest.$ac_ext >&5
9243
b4e70030 9244ac_cv_func_wctype=no
bec39cab
AC
9245fi
9246rm -f conftest.err conftest.$ac_objext \
9247 conftest$ac_exeext conftest.$ac_ext
9248fi
b4e70030
JB
9249echo "$as_me:$LINENO: result: $ac_cv_func_wctype" >&5
9250echo "${ECHO_T}$ac_cv_func_wctype" >&6
bec39cab
AC
9251if test $ac_cv_func_wctype = yes; then
9252 :
c906108c 9253else
c906108c 9254
b4e70030
JB
9255echo "$as_me:$LINENO: checking for wctype in -lw" >&5
9256echo $ECHO_N "checking for wctype in -lw... $ECHO_C" >&6
bec39cab
AC
9257if test "${ac_cv_lib_w_wctype+set}" = set; then
9258 echo $ECHO_N "(cached) $ECHO_C" >&6
9259else
9260 ac_check_lib_save_LIBS=$LIBS
9261LIBS="-lw $LIBS"
9262cat >conftest.$ac_ext <<_ACEOF
9263/* confdefs.h. */
9264_ACEOF
9265cat confdefs.h >>conftest.$ac_ext
9266cat >>conftest.$ac_ext <<_ACEOF
9267/* end confdefs.h. */
c906108c 9268
b4e70030 9269/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9270#ifdef __cplusplus
9271extern "C"
9272#endif
b4e70030
JB
9273/* We use char because int might match the return type of a gcc2
9274 builtin and then its argument prototype would still apply. */
bec39cab
AC
9275char wctype ();
9276int
9277main ()
9278{
b4e70030 9279wctype ();
bec39cab
AC
9280 ;
9281 return 0;
9282}
9283_ACEOF
9284rm -f conftest.$ac_objext conftest$ac_exeext
9285if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9286 (eval $ac_link) 2>conftest.er1
9287 ac_status=$?
9288 grep -v '^ *+' conftest.er1 >conftest.err
9289 rm -f conftest.er1
9290 cat conftest.err >&5
9291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9292 (exit $ac_status); } &&
b4e70030
JB
9293 { ac_try='test -z "$ac_c_werror_flag"
9294 || test ! -s conftest.err'
bec39cab
AC
9295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9296 (eval $ac_try) 2>&5
9297 ac_status=$?
9298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9299 (exit $ac_status); }; } &&
9300 { ac_try='test -s conftest$ac_exeext'
9301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9302 (eval $ac_try) 2>&5
9303 ac_status=$?
9304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9305 (exit $ac_status); }; }; then
9306 ac_cv_lib_w_wctype=yes
9307else
9308 echo "$as_me: failed program was:" >&5
9309sed 's/^/| /' conftest.$ac_ext >&5
9310
b4e70030 9311ac_cv_lib_w_wctype=no
bec39cab
AC
9312fi
9313rm -f conftest.err conftest.$ac_objext \
9314 conftest$ac_exeext conftest.$ac_ext
9315LIBS=$ac_check_lib_save_LIBS
9316fi
b4e70030
JB
9317echo "$as_me:$LINENO: result: $ac_cv_lib_w_wctype" >&5
9318echo "${ECHO_T}$ac_cv_lib_w_wctype" >&6
bec39cab
AC
9319if test $ac_cv_lib_w_wctype = yes; then
9320 cat >>confdefs.h <<_ACEOF
9321#define HAVE_LIBW 1
9322_ACEOF
c906108c 9323
bec39cab 9324 LIBS="-lw $LIBS"
c906108c 9325
bec39cab 9326fi
c906108c 9327
bec39cab 9328fi
c906108c 9329
ddc9cd0f 9330
bec39cab 9331# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
b4e70030
JB
9332echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
9333echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
bec39cab
AC
9334if test "${ac_cv_search_gethostbyname+set}" = set; then
9335 echo $ECHO_N "(cached) $ECHO_C" >&6
9336else
9337 ac_func_search_save_LIBS=$LIBS
b4e70030 9338ac_cv_search_gethostbyname=no
bec39cab
AC
9339cat >conftest.$ac_ext <<_ACEOF
9340/* confdefs.h. */
9341_ACEOF
9342cat confdefs.h >>conftest.$ac_ext
9343cat >>conftest.$ac_ext <<_ACEOF
9344/* end confdefs.h. */
ddc9cd0f 9345
b4e70030 9346/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9347#ifdef __cplusplus
9348extern "C"
9349#endif
b4e70030
JB
9350/* We use char because int might match the return type of a gcc2
9351 builtin and then its argument prototype would still apply. */
bec39cab
AC
9352char gethostbyname ();
9353int
9354main ()
9355{
b4e70030 9356gethostbyname ();
bec39cab
AC
9357 ;
9358 return 0;
9359}
9360_ACEOF
b4e70030 9361rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9362if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9363 (eval $ac_link) 2>conftest.er1
9364 ac_status=$?
9365 grep -v '^ *+' conftest.er1 >conftest.err
9366 rm -f conftest.er1
9367 cat conftest.err >&5
9368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9369 (exit $ac_status); } &&
b4e70030
JB
9370 { ac_try='test -z "$ac_c_werror_flag"
9371 || test ! -s conftest.err'
bec39cab
AC
9372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9373 (eval $ac_try) 2>&5
9374 ac_status=$?
9375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9376 (exit $ac_status); }; } &&
9377 { ac_try='test -s conftest$ac_exeext'
9378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9379 (eval $ac_try) 2>&5
9380 ac_status=$?
9381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9382 (exit $ac_status); }; }; then
b4e70030 9383 ac_cv_search_gethostbyname="none required"
bec39cab
AC
9384else
9385 echo "$as_me: failed program was:" >&5
9386sed 's/^/| /' conftest.$ac_ext >&5
ddc9cd0f 9387
bec39cab
AC
9388fi
9389rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
9390 conftest$ac_exeext conftest.$ac_ext
9391if test "$ac_cv_search_gethostbyname" = no; then
9392 for ac_lib in nsl; do
9393 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9394 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
9395/* confdefs.h. */
9396_ACEOF
9397cat confdefs.h >>conftest.$ac_ext
9398cat >>conftest.$ac_ext <<_ACEOF
9399/* end confdefs.h. */
ddc9cd0f 9400
b4e70030 9401/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9402#ifdef __cplusplus
9403extern "C"
9404#endif
b4e70030
JB
9405/* We use char because int might match the return type of a gcc2
9406 builtin and then its argument prototype would still apply. */
9407char gethostbyname ();
bec39cab
AC
9408int
9409main ()
9410{
b4e70030 9411gethostbyname ();
bec39cab
AC
9412 ;
9413 return 0;
9414}
9415_ACEOF
b4e70030 9416rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9418 (eval $ac_link) 2>conftest.er1
9419 ac_status=$?
9420 grep -v '^ *+' conftest.er1 >conftest.err
9421 rm -f conftest.er1
9422 cat conftest.err >&5
9423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9424 (exit $ac_status); } &&
b4e70030
JB
9425 { ac_try='test -z "$ac_c_werror_flag"
9426 || test ! -s conftest.err'
bec39cab
AC
9427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9428 (eval $ac_try) 2>&5
9429 ac_status=$?
9430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9431 (exit $ac_status); }; } &&
9432 { ac_try='test -s conftest$ac_exeext'
9433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9434 (eval $ac_try) 2>&5
9435 ac_status=$?
9436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9437 (exit $ac_status); }; }; then
b4e70030
JB
9438 ac_cv_search_gethostbyname="-l$ac_lib"
9439break
bec39cab
AC
9440else
9441 echo "$as_me: failed program was:" >&5
9442sed 's/^/| /' conftest.$ac_ext >&5
9443
9444fi
9445rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
9446 conftest$ac_exeext conftest.$ac_ext
9447 done
bec39cab
AC
9448fi
9449LIBS=$ac_func_search_save_LIBS
9450fi
b4e70030
JB
9451echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
9452echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
9453if test "$ac_cv_search_gethostbyname" != no; then
9454 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
96baa820 9455
bec39cab 9456fi
96baa820 9457
c906108c 9458
b4e70030
JB
9459# Some systems (e.g. Solaris) have `socketpair' in libsocket.
9460echo "$as_me:$LINENO: checking for library containing socketpair" >&5
9461echo $ECHO_N "checking for library containing socketpair... $ECHO_C" >&6
9462if test "${ac_cv_search_socketpair+set}" = set; then
9463 echo $ECHO_N "(cached) $ECHO_C" >&6
9464else
9465 ac_func_search_save_LIBS=$LIBS
9466ac_cv_search_socketpair=no
9467cat >conftest.$ac_ext <<_ACEOF
9468/* confdefs.h. */
9469_ACEOF
9470cat confdefs.h >>conftest.$ac_ext
9471cat >>conftest.$ac_ext <<_ACEOF
9472/* end confdefs.h. */
9473
9474/* Override any gcc2 internal prototype to avoid an error. */
9475#ifdef __cplusplus
9476extern "C"
9477#endif
9478/* We use char because int might match the return type of a gcc2
9479 builtin and then its argument prototype would still apply. */
9480char socketpair ();
9481int
9482main ()
9483{
9484socketpair ();
9485 ;
9486 return 0;
9487}
9488_ACEOF
9489rm -f conftest.$ac_objext conftest$ac_exeext
9490if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9491 (eval $ac_link) 2>conftest.er1
9492 ac_status=$?
9493 grep -v '^ *+' conftest.er1 >conftest.err
9494 rm -f conftest.er1
9495 cat conftest.err >&5
9496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9497 (exit $ac_status); } &&
9498 { ac_try='test -z "$ac_c_werror_flag"
9499 || test ! -s conftest.err'
9500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9501 (eval $ac_try) 2>&5
9502 ac_status=$?
9503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9504 (exit $ac_status); }; } &&
9505 { ac_try='test -s conftest$ac_exeext'
9506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9507 (eval $ac_try) 2>&5
9508 ac_status=$?
9509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9510 (exit $ac_status); }; }; then
9511 ac_cv_search_socketpair="none required"
9512else
9513 echo "$as_me: failed program was:" >&5
9514sed 's/^/| /' conftest.$ac_ext >&5
9515
9516fi
9517rm -f conftest.err conftest.$ac_objext \
9518 conftest$ac_exeext conftest.$ac_ext
9519if test "$ac_cv_search_socketpair" = no; then
9520 for ac_lib in socket; do
9521 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9522 cat >conftest.$ac_ext <<_ACEOF
9523/* confdefs.h. */
9524_ACEOF
9525cat confdefs.h >>conftest.$ac_ext
9526cat >>conftest.$ac_ext <<_ACEOF
9527/* end confdefs.h. */
9528
9529/* Override any gcc2 internal prototype to avoid an error. */
9530#ifdef __cplusplus
9531extern "C"
9532#endif
9533/* We use char because int might match the return type of a gcc2
9534 builtin and then its argument prototype would still apply. */
9535char socketpair ();
9536int
9537main ()
9538{
9539socketpair ();
9540 ;
9541 return 0;
9542}
9543_ACEOF
9544rm -f conftest.$ac_objext conftest$ac_exeext
9545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9546 (eval $ac_link) 2>conftest.er1
9547 ac_status=$?
9548 grep -v '^ *+' conftest.er1 >conftest.err
9549 rm -f conftest.er1
9550 cat conftest.err >&5
9551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9552 (exit $ac_status); } &&
9553 { ac_try='test -z "$ac_c_werror_flag"
9554 || test ! -s conftest.err'
9555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9556 (eval $ac_try) 2>&5
9557 ac_status=$?
9558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9559 (exit $ac_status); }; } &&
9560 { ac_try='test -s conftest$ac_exeext'
9561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9562 (eval $ac_try) 2>&5
9563 ac_status=$?
9564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9565 (exit $ac_status); }; }; then
9566 ac_cv_search_socketpair="-l$ac_lib"
9567break
9568else
9569 echo "$as_me: failed program was:" >&5
9570sed 's/^/| /' conftest.$ac_ext >&5
9571
9572fi
9573rm -f conftest.err conftest.$ac_objext \
9574 conftest$ac_exeext conftest.$ac_ext
9575 done
9576fi
9577LIBS=$ac_func_search_save_LIBS
9578fi
9579echo "$as_me:$LINENO: result: $ac_cv_search_socketpair" >&5
9580echo "${ECHO_T}$ac_cv_search_socketpair" >&6
9581if test "$ac_cv_search_socketpair" != no; then
9582 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
9583
9584fi
9585
9586
233a11ab
CS
9587# Link in zlib if we can. This allows us to read compressed debug sections.
9588echo "$as_me:$LINENO: checking for library containing zlibVersion" >&5
9589echo $ECHO_N "checking for library containing zlibVersion... $ECHO_C" >&6
9590if test "${ac_cv_search_zlibVersion+set}" = set; then
9591 echo $ECHO_N "(cached) $ECHO_C" >&6
9592else
9593 ac_func_search_save_LIBS=$LIBS
9594ac_cv_search_zlibVersion=no
9595cat >conftest.$ac_ext <<_ACEOF
9596/* confdefs.h. */
9597_ACEOF
9598cat confdefs.h >>conftest.$ac_ext
9599cat >>conftest.$ac_ext <<_ACEOF
9600/* end confdefs.h. */
9601
9602/* Override any gcc2 internal prototype to avoid an error. */
9603#ifdef __cplusplus
9604extern "C"
9605#endif
9606/* We use char because int might match the return type of a gcc2
9607 builtin and then its argument prototype would still apply. */
9608char zlibVersion ();
9609int
9610main ()
9611{
9612zlibVersion ();
9613 ;
9614 return 0;
9615}
9616_ACEOF
9617rm -f conftest.$ac_objext conftest$ac_exeext
9618if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9619 (eval $ac_link) 2>conftest.er1
9620 ac_status=$?
9621 grep -v '^ *+' conftest.er1 >conftest.err
9622 rm -f conftest.er1
9623 cat conftest.err >&5
9624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9625 (exit $ac_status); } &&
9626 { ac_try='test -z "$ac_c_werror_flag"
9627 || test ! -s conftest.err'
9628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9629 (eval $ac_try) 2>&5
9630 ac_status=$?
9631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9632 (exit $ac_status); }; } &&
9633 { ac_try='test -s conftest$ac_exeext'
9634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9635 (eval $ac_try) 2>&5
9636 ac_status=$?
9637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9638 (exit $ac_status); }; }; then
9639 ac_cv_search_zlibVersion="none required"
9640else
9641 echo "$as_me: failed program was:" >&5
9642sed 's/^/| /' conftest.$ac_ext >&5
9643
9644fi
9645rm -f conftest.err conftest.$ac_objext \
9646 conftest$ac_exeext conftest.$ac_ext
9647if test "$ac_cv_search_zlibVersion" = no; then
9648 for ac_lib in z; do
9649 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9650 cat >conftest.$ac_ext <<_ACEOF
9651/* confdefs.h. */
9652_ACEOF
9653cat confdefs.h >>conftest.$ac_ext
9654cat >>conftest.$ac_ext <<_ACEOF
9655/* end confdefs.h. */
9656
9657/* Override any gcc2 internal prototype to avoid an error. */
9658#ifdef __cplusplus
9659extern "C"
9660#endif
9661/* We use char because int might match the return type of a gcc2
9662 builtin and then its argument prototype would still apply. */
9663char zlibVersion ();
9664int
9665main ()
9666{
9667zlibVersion ();
9668 ;
9669 return 0;
9670}
9671_ACEOF
9672rm -f conftest.$ac_objext conftest$ac_exeext
9673if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9674 (eval $ac_link) 2>conftest.er1
9675 ac_status=$?
9676 grep -v '^ *+' conftest.er1 >conftest.err
9677 rm -f conftest.er1
9678 cat conftest.err >&5
9679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9680 (exit $ac_status); } &&
9681 { ac_try='test -z "$ac_c_werror_flag"
9682 || test ! -s conftest.err'
9683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9684 (eval $ac_try) 2>&5
9685 ac_status=$?
9686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9687 (exit $ac_status); }; } &&
9688 { ac_try='test -s conftest$ac_exeext'
9689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9690 (eval $ac_try) 2>&5
9691 ac_status=$?
9692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9693 (exit $ac_status); }; }; then
9694 ac_cv_search_zlibVersion="-l$ac_lib"
9695break
9696else
9697 echo "$as_me: failed program was:" >&5
9698sed 's/^/| /' conftest.$ac_ext >&5
9699
9700fi
9701rm -f conftest.err conftest.$ac_objext \
9702 conftest$ac_exeext conftest.$ac_ext
9703 done
9704fi
9705LIBS=$ac_func_search_save_LIBS
9706fi
9707echo "$as_me:$LINENO: result: $ac_cv_search_zlibVersion" >&5
9708echo "${ECHO_T}$ac_cv_search_zlibVersion" >&6
9709if test "$ac_cv_search_zlibVersion" != no; then
9710 test "$ac_cv_search_zlibVersion" = "none required" || LIBS="$ac_cv_search_zlibVersion $LIBS"
9711
9712for ac_header in zlib.h
9713do
9714as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9715if eval "test \"\${$as_ac_Header+set}\" = set"; then
9716 echo "$as_me:$LINENO: checking for $ac_header" >&5
9717echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9718if eval "test \"\${$as_ac_Header+set}\" = set"; then
9719 echo $ECHO_N "(cached) $ECHO_C" >&6
9720fi
9721echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9722echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9723else
9724 # Is the header compilable?
9725echo "$as_me:$LINENO: checking $ac_header usability" >&5
9726echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9727cat >conftest.$ac_ext <<_ACEOF
9728/* confdefs.h. */
9729_ACEOF
9730cat confdefs.h >>conftest.$ac_ext
9731cat >>conftest.$ac_ext <<_ACEOF
9732/* end confdefs.h. */
9733$ac_includes_default
9734#include <$ac_header>
9735_ACEOF
9736rm -f conftest.$ac_objext
9737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9738 (eval $ac_compile) 2>conftest.er1
9739 ac_status=$?
9740 grep -v '^ *+' conftest.er1 >conftest.err
9741 rm -f conftest.er1
9742 cat conftest.err >&5
9743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9744 (exit $ac_status); } &&
9745 { ac_try='test -z "$ac_c_werror_flag"
9746 || test ! -s conftest.err'
9747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9748 (eval $ac_try) 2>&5
9749 ac_status=$?
9750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9751 (exit $ac_status); }; } &&
9752 { ac_try='test -s conftest.$ac_objext'
9753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9754 (eval $ac_try) 2>&5
9755 ac_status=$?
9756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9757 (exit $ac_status); }; }; then
9758 ac_header_compiler=yes
9759else
9760 echo "$as_me: failed program was:" >&5
9761sed 's/^/| /' conftest.$ac_ext >&5
9762
9763ac_header_compiler=no
9764fi
9765rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9766echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9767echo "${ECHO_T}$ac_header_compiler" >&6
9768
9769# Is the header present?
9770echo "$as_me:$LINENO: checking $ac_header presence" >&5
9771echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9772cat >conftest.$ac_ext <<_ACEOF
9773/* confdefs.h. */
9774_ACEOF
9775cat confdefs.h >>conftest.$ac_ext
9776cat >>conftest.$ac_ext <<_ACEOF
9777/* end confdefs.h. */
9778#include <$ac_header>
9779_ACEOF
9780if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9781 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9782 ac_status=$?
9783 grep -v '^ *+' conftest.er1 >conftest.err
9784 rm -f conftest.er1
9785 cat conftest.err >&5
9786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9787 (exit $ac_status); } >/dev/null; then
9788 if test -s conftest.err; then
9789 ac_cpp_err=$ac_c_preproc_warn_flag
9790 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9791 else
9792 ac_cpp_err=
9793 fi
9794else
9795 ac_cpp_err=yes
9796fi
9797if test -z "$ac_cpp_err"; then
9798 ac_header_preproc=yes
9799else
9800 echo "$as_me: failed program was:" >&5
9801sed 's/^/| /' conftest.$ac_ext >&5
9802
9803 ac_header_preproc=no
9804fi
9805rm -f conftest.err conftest.$ac_ext
9806echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9807echo "${ECHO_T}$ac_header_preproc" >&6
9808
9809# So? What about this header?
9810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9811 yes:no: )
9812 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9813echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9814 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9815echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9816 ac_header_preproc=yes
9817 ;;
9818 no:yes:* )
9819 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9820echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9821 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9822echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9823 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9824echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9825 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9826echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9827 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9828echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9829 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9830echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9831 (
9832 cat <<\_ASBOX
9833## ------------------------------------------ ##
9834## Report this to the AC_PACKAGE_NAME lists. ##
9835## ------------------------------------------ ##
9836_ASBOX
9837 ) |
9838 sed "s/^/$as_me: WARNING: /" >&2
9839 ;;
9840esac
9841echo "$as_me:$LINENO: checking for $ac_header" >&5
9842echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9843if eval "test \"\${$as_ac_Header+set}\" = set"; then
9844 echo $ECHO_N "(cached) $ECHO_C" >&6
9845else
9846 eval "$as_ac_Header=\$ac_header_preproc"
9847fi
9848echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9849echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9850
9851fi
9852if test `eval echo '${'$as_ac_Header'}'` = yes; then
9853 cat >>confdefs.h <<_ACEOF
9854#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9855_ACEOF
9856
9857fi
9858
9859done
9860
9861fi
9862
9863
77f120bf
JB
9864# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
9865echo "$as_me:$LINENO: checking for library containing dlgetmodinfo" >&5
9866echo $ECHO_N "checking for library containing dlgetmodinfo... $ECHO_C" >&6
9867if test "${ac_cv_search_dlgetmodinfo+set}" = set; then
bec39cab
AC
9868 echo $ECHO_N "(cached) $ECHO_C" >&6
9869else
9870 ac_func_search_save_LIBS=$LIBS
77f120bf 9871ac_cv_search_dlgetmodinfo=no
bec39cab
AC
9872cat >conftest.$ac_ext <<_ACEOF
9873/* confdefs.h. */
9874_ACEOF
9875cat confdefs.h >>conftest.$ac_ext
9876cat >>conftest.$ac_ext <<_ACEOF
9877/* end confdefs.h. */
c906108c 9878
b4e70030 9879/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9880#ifdef __cplusplus
9881extern "C"
9882#endif
b4e70030
JB
9883/* We use char because int might match the return type of a gcc2
9884 builtin and then its argument prototype would still apply. */
77f120bf 9885char dlgetmodinfo ();
bec39cab
AC
9886int
9887main ()
9888{
77f120bf 9889dlgetmodinfo ();
bec39cab
AC
9890 ;
9891 return 0;
9892}
9893_ACEOF
b4e70030 9894rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9895if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9896 (eval $ac_link) 2>conftest.er1
9897 ac_status=$?
9898 grep -v '^ *+' conftest.er1 >conftest.err
9899 rm -f conftest.er1
9900 cat conftest.err >&5
9901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9902 (exit $ac_status); } &&
b4e70030
JB
9903 { ac_try='test -z "$ac_c_werror_flag"
9904 || test ! -s conftest.err'
bec39cab
AC
9905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9906 (eval $ac_try) 2>&5
9907 ac_status=$?
9908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9909 (exit $ac_status); }; } &&
9910 { ac_try='test -s conftest$ac_exeext'
9911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9912 (eval $ac_try) 2>&5
9913 ac_status=$?
9914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9915 (exit $ac_status); }; }; then
77f120bf 9916 ac_cv_search_dlgetmodinfo="none required"
bec39cab
AC
9917else
9918 echo "$as_me: failed program was:" >&5
9919sed 's/^/| /' conftest.$ac_ext >&5
1ba607ad
AC
9920
9921fi
bec39cab 9922rm -f conftest.err conftest.$ac_objext \
b4e70030 9923 conftest$ac_exeext conftest.$ac_ext
77f120bf
JB
9924if test "$ac_cv_search_dlgetmodinfo" = no; then
9925 for ac_lib in dl xpdl; do
b4e70030
JB
9926 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9927 cat >conftest.$ac_ext <<_ACEOF
9928/* confdefs.h. */
9929_ACEOF
9930cat confdefs.h >>conftest.$ac_ext
9931cat >>conftest.$ac_ext <<_ACEOF
9932/* end confdefs.h. */
9933
9934/* Override any gcc2 internal prototype to avoid an error. */
9935#ifdef __cplusplus
9936extern "C"
9937#endif
9938/* We use char because int might match the return type of a gcc2
9939 builtin and then its argument prototype would still apply. */
77f120bf 9940char dlgetmodinfo ();
b4e70030
JB
9941int
9942main ()
9943{
77f120bf 9944dlgetmodinfo ();
b4e70030
JB
9945 ;
9946 return 0;
9947}
9948_ACEOF
9949rm -f conftest.$ac_objext conftest$ac_exeext
9950if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9951 (eval $ac_link) 2>conftest.er1
9952 ac_status=$?
9953 grep -v '^ *+' conftest.er1 >conftest.err
9954 rm -f conftest.er1
9955 cat conftest.err >&5
9956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9957 (exit $ac_status); } &&
9958 { ac_try='test -z "$ac_c_werror_flag"
9959 || test ! -s conftest.err'
9960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9961 (eval $ac_try) 2>&5
9962 ac_status=$?
9963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9964 (exit $ac_status); }; } &&
9965 { ac_try='test -s conftest$ac_exeext'
9966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9967 (eval $ac_try) 2>&5
9968 ac_status=$?
9969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9970 (exit $ac_status); }; }; then
77f120bf 9971 ac_cv_search_dlgetmodinfo="-l$ac_lib"
b4e70030 9972break
4e8d927d 9973else
b4e70030
JB
9974 echo "$as_me: failed program was:" >&5
9975sed 's/^/| /' conftest.$ac_ext >&5
9976
9977fi
9978rm -f conftest.err conftest.$ac_objext \
9979 conftest$ac_exeext conftest.$ac_ext
9980 done
1ba607ad 9981fi
bec39cab
AC
9982LIBS=$ac_func_search_save_LIBS
9983fi
77f120bf
JB
9984echo "$as_me:$LINENO: result: $ac_cv_search_dlgetmodinfo" >&5
9985echo "${ECHO_T}$ac_cv_search_dlgetmodinfo" >&6
9986if test "$ac_cv_search_dlgetmodinfo" != no; then
9987 test "$ac_cv_search_dlgetmodinfo" = "none required" || LIBS="$ac_cv_search_dlgetmodinfo $LIBS"
c906108c 9988
8bb2c122 9989fi
8bb2c122 9990
8bb2c122 9991
77f120bf
JB
9992# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
9993# There is a very specific comment in /usr/include/curses.h explaining that
9994# termcap routines built into libcurses must not be used.
9995#
9996# The symptoms we observed so far is GDB unexpectedly changing
9997# the terminal settings when tgetent is called - this is particularly
9998# visible as the output is missing carriage returns, and so rapidly
9999# becomes very hard to read.
10000#
10001# The readline configure script has already decided that libtermcap
10002# was enough for its purposes, and so decided to build readline using
10003# libtermcap. Since the TUI mode requires curses, building GDB with
10004# TUI enabled results in both libraries to be used at the same time,
10005# which is not allowed. This basically means that GDB with TUI is
10006# broken on alpha-osf.
10007
10008case $host_os in
10009 alpha*-*-osf* )
10010 if "$enable_tui" = "yes"; then
10011 { { echo "$as_me:$LINENO: error: Building GDB with TUI mode is not supported on this host" >&5
10012echo "$as_me: error: Building GDB with TUI mode is not supported on this host" >&2;}
10013 { (exit 1); exit 1; }; }
10014 fi
10015 if "$enable_tui" = "auto"; then
10016 enable_tui=no
10017 fi
10018 ;;
10019esac
10020
10021# Check whether we should enable the TUI, but only do so if we really
10022# can.
10023if test x"$enable_tui" != xno; then
10024 if test -d $srcdir/tui; then
10025 # For the TUI, we need enhanced curses functionality.
10026 #
10027 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
10028 # curses library because the latter might not provide all the
10029 # functionality we need. However, this leads to problems on systems
10030 # where the linker searches /usr/local/lib, but the compiler doesn't
10031 # search /usr/local/include, if ncurses is installed in /usr/local. A
10032 # default installation of ncurses on alpha*-dec-osf* will lead to such
10033 # a situation.
10034 echo "$as_me:$LINENO: checking for library containing waddstr" >&5
10035echo $ECHO_N "checking for library containing waddstr... $ECHO_C" >&6
10036if test "${ac_cv_search_waddstr+set}" = set; then
d542061a
UW
10037 echo $ECHO_N "(cached) $ECHO_C" >&6
10038else
10039 ac_func_search_save_LIBS=$LIBS
77f120bf 10040ac_cv_search_waddstr=no
d542061a
UW
10041cat >conftest.$ac_ext <<_ACEOF
10042/* confdefs.h. */
10043_ACEOF
10044cat confdefs.h >>conftest.$ac_ext
10045cat >>conftest.$ac_ext <<_ACEOF
10046/* end confdefs.h. */
10047
10048/* Override any gcc2 internal prototype to avoid an error. */
10049#ifdef __cplusplus
10050extern "C"
10051#endif
10052/* We use char because int might match the return type of a gcc2
10053 builtin and then its argument prototype would still apply. */
77f120bf 10054char waddstr ();
d542061a
UW
10055int
10056main ()
10057{
77f120bf 10058waddstr ();
d542061a
UW
10059 ;
10060 return 0;
10061}
10062_ACEOF
10063rm -f conftest.$ac_objext conftest$ac_exeext
10064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10065 (eval $ac_link) 2>conftest.er1
10066 ac_status=$?
10067 grep -v '^ *+' conftest.er1 >conftest.err
10068 rm -f conftest.er1
10069 cat conftest.err >&5
10070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10071 (exit $ac_status); } &&
10072 { ac_try='test -z "$ac_c_werror_flag"
10073 || test ! -s conftest.err'
10074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10075 (eval $ac_try) 2>&5
10076 ac_status=$?
10077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10078 (exit $ac_status); }; } &&
10079 { ac_try='test -s conftest$ac_exeext'
10080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10081 (eval $ac_try) 2>&5
10082 ac_status=$?
10083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10084 (exit $ac_status); }; }; then
77f120bf 10085 ac_cv_search_waddstr="none required"
d542061a
UW
10086else
10087 echo "$as_me: failed program was:" >&5
10088sed 's/^/| /' conftest.$ac_ext >&5
10089
10090fi
10091rm -f conftest.err conftest.$ac_objext \
10092 conftest$ac_exeext conftest.$ac_ext
77f120bf
JB
10093if test "$ac_cv_search_waddstr" = no; then
10094 for ac_lib in ncurses cursesX curses; do
d542061a
UW
10095 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10096 cat >conftest.$ac_ext <<_ACEOF
10097/* confdefs.h. */
10098_ACEOF
10099cat confdefs.h >>conftest.$ac_ext
10100cat >>conftest.$ac_ext <<_ACEOF
10101/* end confdefs.h. */
10102
10103/* Override any gcc2 internal prototype to avoid an error. */
10104#ifdef __cplusplus
10105extern "C"
10106#endif
10107/* We use char because int might match the return type of a gcc2
10108 builtin and then its argument prototype would still apply. */
77f120bf 10109char waddstr ();
d542061a
UW
10110int
10111main ()
10112{
77f120bf 10113waddstr ();
d542061a
UW
10114 ;
10115 return 0;
10116}
10117_ACEOF
10118rm -f conftest.$ac_objext conftest$ac_exeext
10119if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10120 (eval $ac_link) 2>conftest.er1
10121 ac_status=$?
10122 grep -v '^ *+' conftest.er1 >conftest.err
10123 rm -f conftest.er1
10124 cat conftest.err >&5
10125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10126 (exit $ac_status); } &&
10127 { ac_try='test -z "$ac_c_werror_flag"
10128 || test ! -s conftest.err'
10129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10130 (eval $ac_try) 2>&5
10131 ac_status=$?
10132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10133 (exit $ac_status); }; } &&
10134 { ac_try='test -s conftest$ac_exeext'
10135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10136 (eval $ac_try) 2>&5
10137 ac_status=$?
10138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10139 (exit $ac_status); }; }; then
77f120bf 10140 ac_cv_search_waddstr="-l$ac_lib"
d542061a
UW
10141break
10142else
10143 echo "$as_me: failed program was:" >&5
10144sed 's/^/| /' conftest.$ac_ext >&5
10145
10146fi
10147rm -f conftest.err conftest.$ac_objext \
10148 conftest$ac_exeext conftest.$ac_ext
10149 done
10150fi
10151LIBS=$ac_func_search_save_LIBS
10152fi
77f120bf
JB
10153echo "$as_me:$LINENO: result: $ac_cv_search_waddstr" >&5
10154echo "${ECHO_T}$ac_cv_search_waddstr" >&6
10155if test "$ac_cv_search_waddstr" != no; then
10156 test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
d542061a
UW
10157
10158fi
10159
10160
77f120bf
JB
10161 if test "$ac_cv_search_waddstr" != no; then
10162 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
10163 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
10164 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
10165 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
10166 CONFIG_ALL="${CONFIG_ALL} all-tui"
10167 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
10168 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
10169 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
10170 else
10171 if test x"$enable_tui" = xyes; then
10172 { { echo "$as_me:$LINENO: error: no enhanced curses library found; disable TUI" >&5
10173echo "$as_me: error: no enhanced curses library found; disable TUI" >&2;}
10174 { (exit 1); exit 1; }; }
10175 else
10176 { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
10177echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
10178 fi
10179 fi
10180 fi
10181fi
10182
bec39cab
AC
10183# Since GDB uses Readline, we need termcap functionality. In many
10184# cases this will be provided by the curses library, but some systems
10185# have a seperate termcap library, or no curses library at all.
8bb2c122 10186
bec39cab
AC
10187case $host_os in
10188 cygwin*)
10189 if test -d $srcdir/libtermcap; then
10190 LIBS="../libtermcap/libtermcap.a $LIBS"
10191 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
10192 fi ;;
10193 go32* | *djgpp*)
10194 ac_cv_search_tgetent="none required"
10195 ;;
7ef34f2c
MM
10196 *mingw32*)
10197 ac_cv_search_tgetent="none required"
31b060a2 10198 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
7ef34f2c 10199 ;;
bec39cab 10200esac
627af7ea 10201
bec39cab 10202# These are the libraries checked by Readline.
b4e70030
JB
10203echo "$as_me:$LINENO: checking for library containing tgetent" >&5
10204echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6
bec39cab
AC
10205if test "${ac_cv_search_tgetent+set}" = set; then
10206 echo $ECHO_N "(cached) $ECHO_C" >&6
10207else
10208 ac_func_search_save_LIBS=$LIBS
b4e70030 10209ac_cv_search_tgetent=no
bec39cab
AC
10210cat >conftest.$ac_ext <<_ACEOF
10211/* confdefs.h. */
10212_ACEOF
10213cat confdefs.h >>conftest.$ac_ext
10214cat >>conftest.$ac_ext <<_ACEOF
10215/* end confdefs.h. */
10216
b4e70030 10217/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
10218#ifdef __cplusplus
10219extern "C"
10220#endif
b4e70030
JB
10221/* We use char because int might match the return type of a gcc2
10222 builtin and then its argument prototype would still apply. */
bec39cab
AC
10223char tgetent ();
10224int
10225main ()
10226{
b4e70030 10227tgetent ();
bec39cab
AC
10228 ;
10229 return 0;
10230}
10231_ACEOF
b4e70030 10232rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
10233if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10234 (eval $ac_link) 2>conftest.er1
10235 ac_status=$?
10236 grep -v '^ *+' conftest.er1 >conftest.err
10237 rm -f conftest.er1
10238 cat conftest.err >&5
10239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10240 (exit $ac_status); } &&
b4e70030
JB
10241 { ac_try='test -z "$ac_c_werror_flag"
10242 || test ! -s conftest.err'
bec39cab
AC
10243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10244 (eval $ac_try) 2>&5
10245 ac_status=$?
10246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10247 (exit $ac_status); }; } &&
10248 { ac_try='test -s conftest$ac_exeext'
10249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10250 (eval $ac_try) 2>&5
10251 ac_status=$?
10252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10253 (exit $ac_status); }; }; then
b4e70030 10254 ac_cv_search_tgetent="none required"
627af7ea 10255else
bec39cab
AC
10256 echo "$as_me: failed program was:" >&5
10257sed 's/^/| /' conftest.$ac_ext >&5
627af7ea 10258
627af7ea 10259fi
bec39cab 10260rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
10261 conftest$ac_exeext conftest.$ac_ext
10262if test "$ac_cv_search_tgetent" = no; then
10263 for ac_lib in termcap tinfo curses ncurses; do
10264 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10265 cat >conftest.$ac_ext <<_ACEOF
10266/* confdefs.h. */
10267_ACEOF
10268cat confdefs.h >>conftest.$ac_ext
10269cat >>conftest.$ac_ext <<_ACEOF
10270/* end confdefs.h. */
10271
10272/* Override any gcc2 internal prototype to avoid an error. */
10273#ifdef __cplusplus
10274extern "C"
10275#endif
10276/* We use char because int might match the return type of a gcc2
10277 builtin and then its argument prototype would still apply. */
10278char tgetent ();
10279int
10280main ()
10281{
10282tgetent ();
10283 ;
10284 return 0;
10285}
10286_ACEOF
10287rm -f conftest.$ac_objext conftest$ac_exeext
10288if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10289 (eval $ac_link) 2>conftest.er1
10290 ac_status=$?
10291 grep -v '^ *+' conftest.er1 >conftest.err
10292 rm -f conftest.er1
10293 cat conftest.err >&5
10294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10295 (exit $ac_status); } &&
10296 { ac_try='test -z "$ac_c_werror_flag"
10297 || test ! -s conftest.err'
10298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10299 (eval $ac_try) 2>&5
10300 ac_status=$?
10301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10302 (exit $ac_status); }; } &&
10303 { ac_try='test -s conftest$ac_exeext'
10304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10305 (eval $ac_try) 2>&5
10306 ac_status=$?
10307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10308 (exit $ac_status); }; }; then
10309 ac_cv_search_tgetent="-l$ac_lib"
10310break
4e8d927d 10311else
b4e70030
JB
10312 echo "$as_me: failed program was:" >&5
10313sed 's/^/| /' conftest.$ac_ext >&5
10314
10315fi
10316rm -f conftest.err conftest.$ac_objext \
10317 conftest$ac_exeext conftest.$ac_ext
10318 done
bec39cab
AC
10319fi
10320LIBS=$ac_func_search_save_LIBS
10321fi
b4e70030
JB
10322echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5
10323echo "${ECHO_T}$ac_cv_search_tgetent" >&6
10324if test "$ac_cv_search_tgetent" != no; then
10325 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
627af7ea 10326
06825bd1
MK
10327fi
10328
06825bd1 10329
bec39cab
AC
10330if test "$ac_cv_search_tgetent" = no; then
10331 { { echo "$as_me:$LINENO: error: no termcap library found" >&5
10332echo "$as_me: error: no termcap library found" >&2;}
10333 { (exit 1); exit 1; }; }
8ee53726
MK
10334fi
10335
3841debe 10336
6a30b0a5
AS
10337# Check whether --with-system-readline or --without-system-readline was given.
10338if test "${with_system_readline+set}" = set; then
10339 withval="$with_system_readline"
10340
10341fi;
10342
10343if test "$with_system_readline" = yes; then
10344 READLINE=-lreadline
10345 READLINE_DEPS=
10346 READLINE_CFLAGS=
10347else
10348 READLINE='$(READLINE_DIR)/libreadline.a'
10349 READLINE_DEPS='$(READLINE)'
10350 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
10351fi
10352
10353
10354
10355
10356
5c39566f
DJ
10357# Check whether --with-expat or --without-expat was given.
10358if test "${with_expat+set}" = set; then
10359 withval="$with_expat"
10360
10361else
10362 with_expat=auto
10363fi;
10364echo "$as_me:$LINENO: checking whether to use expat" >&5
10365echo $ECHO_N "checking whether to use expat... $ECHO_C" >&6
10366echo "$as_me:$LINENO: result: $with_expat" >&5
10367echo "${ECHO_T}$with_expat" >&6
10368
10369if test "${with_expat}" = no; then
10370 { echo "$as_me:$LINENO: WARNING: expat support disabled; some features may be unavailable." >&5
10371echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
10372 HAVE_LIBEXPAT=no
10373else
10374
3841debe
DJ
10375 if test "X$prefix" = "XNONE"; then
10376 acl_final_prefix="$ac_default_prefix"
10377 else
10378 acl_final_prefix="$prefix"
10379 fi
10380 if test "X$exec_prefix" = "XNONE"; then
10381 acl_final_exec_prefix='${prefix}'
10382 else
10383 acl_final_exec_prefix="$exec_prefix"
10384 fi
10385 acl_save_prefix="$prefix"
10386 prefix="$acl_final_prefix"
10387 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10388 prefix="$acl_save_prefix"
10389
10390
10391# Check whether --with-gnu-ld or --without-gnu-ld was given.
10392if test "${with_gnu_ld+set}" = set; then
10393 withval="$with_gnu_ld"
10394 test "$withval" = no || with_gnu_ld=yes
10395else
10396 with_gnu_ld=no
10397fi;
10398# Prepare PATH_SEPARATOR.
10399# The user is always right.
10400if test "${PATH_SEPARATOR+set}" != set; then
10401 echo "#! /bin/sh" >conf$$.sh
10402 echo "exit 0" >>conf$$.sh
10403 chmod +x conf$$.sh
10404 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10405 PATH_SEPARATOR=';'
10406 else
10407 PATH_SEPARATOR=:
10408 fi
10409 rm -f conf$$.sh
10410fi
10411ac_prog=ld
10412if test "$GCC" = yes; then
10413 # Check if gcc -print-prog-name=ld gives a path.
10414 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10415echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10416 case $host in
10417 *-*-mingw*)
10418 # gcc leaves a trailing carriage return which upsets mingw
10419 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10420 *)
10421 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10422 esac
10423 case $ac_prog in
10424 # Accept absolute paths.
10425 [\\/]* | [A-Za-z]:[\\/]*)
10426 re_direlt='/[^/][^/]*/\.\./'
10427 # Canonicalize the path of ld
10428 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10429 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10430 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10431 done
10432 test -z "$LD" && LD="$ac_prog"
10433 ;;
10434 "")
10435 # If it fails, then pretend we aren't using GCC.
10436 ac_prog=ld
10437 ;;
10438 *)
10439 # If it is relative, then search for the first ld in PATH.
10440 with_gnu_ld=unknown
10441 ;;
10442 esac
10443elif test "$with_gnu_ld" = yes; then
10444 echo "$as_me:$LINENO: checking for GNU ld" >&5
10445echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
10446else
10447 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10448echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
10449fi
10450if test "${acl_cv_path_LD+set}" = set; then
10451 echo $ECHO_N "(cached) $ECHO_C" >&6
10452else
10453 if test -z "$LD"; then
10454 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10455 for ac_dir in $PATH; do
10456 test -z "$ac_dir" && ac_dir=.
10457 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10458 acl_cv_path_LD="$ac_dir/$ac_prog"
10459 # Check to see if the program is GNU ld. I'd rather use --version,
10460 # but apparently some GNU ld's only accept -v.
10461 # Break only if it was the GNU/non-GNU ld that we prefer.
10462 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10463 test "$with_gnu_ld" != no && break
10464 else
10465 test "$with_gnu_ld" != yes && break
10466 fi
10467 fi
10468 done
10469 IFS="$ac_save_ifs"
10470else
10471 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10472fi
10473fi
10474
10475LD="$acl_cv_path_LD"
10476if test -n "$LD"; then
10477 echo "$as_me:$LINENO: result: $LD" >&5
10478echo "${ECHO_T}$LD" >&6
10479else
10480 echo "$as_me:$LINENO: result: no" >&5
10481echo "${ECHO_T}no" >&6
10482fi
10483test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10484echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10485 { (exit 1); exit 1; }; }
10486echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10487echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10488if test "${acl_cv_prog_gnu_ld+set}" = set; then
10489 echo $ECHO_N "(cached) $ECHO_C" >&6
10490else
10491 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10492if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10493 acl_cv_prog_gnu_ld=yes
10494else
10495 acl_cv_prog_gnu_ld=no
10496fi
10497fi
10498echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10499echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10500with_gnu_ld=$acl_cv_prog_gnu_ld
10501
10502
10503
10504 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10505echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10506if test "${acl_cv_rpath+set}" = set; then
10507 echo $ECHO_N "(cached) $ECHO_C" >&6
10508else
10509
10510 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10511 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10512 . ./conftest.sh
10513 rm -f ./conftest.sh
10514 acl_cv_rpath=done
10515
10516fi
10517echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10518echo "${ECHO_T}$acl_cv_rpath" >&6
10519 wl="$acl_cv_wl"
10520 libext="$acl_cv_libext"
10521 shlibext="$acl_cv_shlibext"
10522 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10523 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10524 hardcode_direct="$acl_cv_hardcode_direct"
10525 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10526 # Check whether --enable-rpath or --disable-rpath was given.
10527if test "${enable_rpath+set}" = set; then
10528 enableval="$enable_rpath"
10529 :
10530else
10531 enable_rpath=yes
10532fi;
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542 use_additional=yes
10543
10544 acl_save_prefix="$prefix"
10545 prefix="$acl_final_prefix"
10546 acl_save_exec_prefix="$exec_prefix"
10547 exec_prefix="$acl_final_exec_prefix"
10548
10549 eval additional_includedir=\"$includedir\"
10550 eval additional_libdir=\"$libdir\"
10551
10552 exec_prefix="$acl_save_exec_prefix"
10553 prefix="$acl_save_prefix"
10554
10555
10556# Check whether --with-libexpat-prefix or --without-libexpat-prefix was given.
10557if test "${with_libexpat_prefix+set}" = set; then
10558 withval="$with_libexpat_prefix"
10559
10560 if test "X$withval" = "Xno"; then
10561 use_additional=no
10562 else
10563 if test "X$withval" = "X"; then
10564
10565 acl_save_prefix="$prefix"
10566 prefix="$acl_final_prefix"
10567 acl_save_exec_prefix="$exec_prefix"
10568 exec_prefix="$acl_final_exec_prefix"
10569
10570 eval additional_includedir=\"$includedir\"
10571 eval additional_libdir=\"$libdir\"
10572
10573 exec_prefix="$acl_save_exec_prefix"
10574 prefix="$acl_save_prefix"
10575
10576 else
10577 additional_includedir="$withval/include"
10578 additional_libdir="$withval/lib"
10579 fi
10580 fi
10581
10582fi;
10583 LIBEXPAT=
10584 LTLIBEXPAT=
10585 INCEXPAT=
10586 rpathdirs=
10587 ltrpathdirs=
10588 names_already_handled=
10589 names_next_round='expat '
10590 while test -n "$names_next_round"; do
10591 names_this_round="$names_next_round"
10592 names_next_round=
10593 for name in $names_this_round; do
10594 already_handled=
10595 for n in $names_already_handled; do
10596 if test "$n" = "$name"; then
10597 already_handled=yes
10598 break
10599 fi
10600 done
10601 if test -z "$already_handled"; then
10602 names_already_handled="$names_already_handled $name"
10603 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10604 eval value=\"\$HAVE_LIB$uppername\"
10605 if test -n "$value"; then
10606 if test "$value" = yes; then
10607 eval value=\"\$LIB$uppername\"
10608 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10609 eval value=\"\$LTLIB$uppername\"
10610 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10611 else
10612 :
10613 fi
10614 else
10615 found_dir=
10616 found_la=
10617 found_so=
10618 found_a=
10619 if test $use_additional = yes; then
10620 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10621 found_dir="$additional_libdir"
10622 found_so="$additional_libdir/lib$name.$shlibext"
10623 if test -f "$additional_libdir/lib$name.la"; then
10624 found_la="$additional_libdir/lib$name.la"
10625 fi
10626 else
10627 if test -f "$additional_libdir/lib$name.$libext"; then
10628 found_dir="$additional_libdir"
10629 found_a="$additional_libdir/lib$name.$libext"
10630 if test -f "$additional_libdir/lib$name.la"; then
10631 found_la="$additional_libdir/lib$name.la"
10632 fi
10633 fi
10634 fi
10635 fi
10636 if test "X$found_dir" = "X"; then
10637 for x in $LDFLAGS $LTLIBEXPAT; do
10638
10639 acl_save_prefix="$prefix"
10640 prefix="$acl_final_prefix"
10641 acl_save_exec_prefix="$exec_prefix"
10642 exec_prefix="$acl_final_exec_prefix"
10643 eval x=\"$x\"
10644 exec_prefix="$acl_save_exec_prefix"
10645 prefix="$acl_save_prefix"
10646
10647 case "$x" in
10648 -L*)
10649 dir=`echo "X$x" | sed -e 's/^X-L//'`
10650 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10651 found_dir="$dir"
10652 found_so="$dir/lib$name.$shlibext"
10653 if test -f "$dir/lib$name.la"; then
10654 found_la="$dir/lib$name.la"
10655 fi
10656 else
10657 if test -f "$dir/lib$name.$libext"; then
10658 found_dir="$dir"
10659 found_a="$dir/lib$name.$libext"
10660 if test -f "$dir/lib$name.la"; then
10661 found_la="$dir/lib$name.la"
10662 fi
10663 fi
10664 fi
10665 ;;
10666 esac
10667 if test "X$found_dir" != "X"; then
10668 break
10669 fi
10670 done
10671 fi
10672 if test "X$found_dir" != "X"; then
10673 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10674 if test "X$found_so" != "X"; then
10675 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10676 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10677 else
10678 haveit=
10679 for x in $ltrpathdirs; do
10680 if test "X$x" = "X$found_dir"; then
10681 haveit=yes
10682 break
10683 fi
10684 done
10685 if test -z "$haveit"; then
10686 ltrpathdirs="$ltrpathdirs $found_dir"
10687 fi
10688 if test "$hardcode_direct" = yes; then
10689 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10690 else
10691 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10692 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10693 haveit=
10694 for x in $rpathdirs; do
10695 if test "X$x" = "X$found_dir"; then
10696 haveit=yes
10697 break
10698 fi
10699 done
10700 if test -z "$haveit"; then
10701 rpathdirs="$rpathdirs $found_dir"
10702 fi
10703 else
10704 haveit=
10705 for x in $LDFLAGS $LIBEXPAT; do
10706
10707 acl_save_prefix="$prefix"
10708 prefix="$acl_final_prefix"
10709 acl_save_exec_prefix="$exec_prefix"
10710 exec_prefix="$acl_final_exec_prefix"
10711 eval x=\"$x\"
10712 exec_prefix="$acl_save_exec_prefix"
10713 prefix="$acl_save_prefix"
10714
10715 if test "X$x" = "X-L$found_dir"; then
10716 haveit=yes
10717 break
10718 fi
10719 done
10720 if test -z "$haveit"; then
10721 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
10722 fi
10723 if test "$hardcode_minus_L" != no; then
10724 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10725 else
10726 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10727 fi
10728 fi
10729 fi
10730 fi
10731 else
10732 if test "X$found_a" != "X"; then
10733 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
10734 else
10735 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
10736 fi
10737 fi
10738 additional_includedir=
10739 case "$found_dir" in
10740 */lib | */lib/)
10741 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10742 additional_includedir="$basedir/include"
10743 ;;
10744 esac
10745 if test "X$additional_includedir" != "X"; then
10746 if test "X$additional_includedir" != "X/usr/include"; then
10747 haveit=
10748 if test "X$additional_includedir" = "X/usr/local/include"; then
10749 if test -n "$GCC"; then
10750 case $host_os in
10751 linux*) haveit=yes;;
10752 esac
10753 fi
10754 fi
10755 if test -z "$haveit"; then
10756 for x in $CPPFLAGS $INCEXPAT; do
10757
10758 acl_save_prefix="$prefix"
10759 prefix="$acl_final_prefix"
10760 acl_save_exec_prefix="$exec_prefix"
10761 exec_prefix="$acl_final_exec_prefix"
10762 eval x=\"$x\"
10763 exec_prefix="$acl_save_exec_prefix"
10764 prefix="$acl_save_prefix"
10765
10766 if test "X$x" = "X-I$additional_includedir"; then
10767 haveit=yes
10768 break
10769 fi
10770 done
10771 if test -z "$haveit"; then
10772 if test -d "$additional_includedir"; then
10773 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
10774 fi
10775 fi
10776 fi
10777 fi
10778 fi
10779 if test -n "$found_la"; then
10780 save_libdir="$libdir"
10781 case "$found_la" in
10782 */* | *\\*) . "$found_la" ;;
10783 *) . "./$found_la" ;;
10784 esac
10785 libdir="$save_libdir"
10786 for dep in $dependency_libs; do
10787 case "$dep" in
10788 -L*)
10789 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10790 if test "X$additional_libdir" != "X/usr/lib"; then
10791 haveit=
10792 if test "X$additional_libdir" = "X/usr/local/lib"; then
10793 if test -n "$GCC"; then
10794 case $host_os in
10795 linux*) haveit=yes;;
10796 esac
10797 fi
10798 fi
10799 if test -z "$haveit"; then
10800 haveit=
10801 for x in $LDFLAGS $LIBEXPAT; do
10802
10803 acl_save_prefix="$prefix"
10804 prefix="$acl_final_prefix"
10805 acl_save_exec_prefix="$exec_prefix"
10806 exec_prefix="$acl_final_exec_prefix"
10807 eval x=\"$x\"
10808 exec_prefix="$acl_save_exec_prefix"
10809 prefix="$acl_save_prefix"
10810
10811 if test "X$x" = "X-L$additional_libdir"; then
10812 haveit=yes
10813 break
10814 fi
10815 done
10816 if test -z "$haveit"; then
10817 if test -d "$additional_libdir"; then
10818 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
10819 fi
10820 fi
10821 haveit=
10822 for x in $LDFLAGS $LTLIBEXPAT; do
10823
10824 acl_save_prefix="$prefix"
10825 prefix="$acl_final_prefix"
10826 acl_save_exec_prefix="$exec_prefix"
10827 exec_prefix="$acl_final_exec_prefix"
10828 eval x=\"$x\"
10829 exec_prefix="$acl_save_exec_prefix"
10830 prefix="$acl_save_prefix"
10831
10832 if test "X$x" = "X-L$additional_libdir"; then
10833 haveit=yes
10834 break
10835 fi
10836 done
10837 if test -z "$haveit"; then
10838 if test -d "$additional_libdir"; then
10839 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10840 fi
10841 fi
10842 fi
10843 fi
10844 ;;
10845 -R*)
10846 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10847 if test "$enable_rpath" != no; then
10848 haveit=
10849 for x in $rpathdirs; do
10850 if test "X$x" = "X$dir"; then
10851 haveit=yes
10852 break
10853 fi
10854 done
10855 if test -z "$haveit"; then
10856 rpathdirs="$rpathdirs $dir"
10857 fi
10858 haveit=
10859 for x in $ltrpathdirs; do
10860 if test "X$x" = "X$dir"; then
10861 haveit=yes
10862 break
10863 fi
10864 done
10865 if test -z "$haveit"; then
10866 ltrpathdirs="$ltrpathdirs $dir"
10867 fi
10868 fi
10869 ;;
10870 -l*)
10871 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10872 ;;
10873 *.la)
10874 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10875 ;;
10876 *)
10877 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10878 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10879 ;;
10880 esac
10881 done
10882 fi
10883 else
10884 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10885 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10886 fi
10887 fi
10888 fi
10889 done
10890 done
10891 if test "X$rpathdirs" != "X"; then
10892 if test -n "$hardcode_libdir_separator"; then
10893 alldirs=
10894 for found_dir in $rpathdirs; do
10895 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10896 done
10897 acl_save_libdir="$libdir"
10898 libdir="$alldirs"
10899 eval flag=\"$hardcode_libdir_flag_spec\"
10900 libdir="$acl_save_libdir"
10901 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10902 else
10903 for found_dir in $rpathdirs; do
10904 acl_save_libdir="$libdir"
10905 libdir="$found_dir"
10906 eval flag=\"$hardcode_libdir_flag_spec\"
10907 libdir="$acl_save_libdir"
10908 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10909 done
10910 fi
10911 fi
10912 if test "X$ltrpathdirs" != "X"; then
10913 for found_dir in $ltrpathdirs; do
10914 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10915 done
10916 fi
10917
10918
10919 ac_save_CPPFLAGS="$CPPFLAGS"
10920
10921 for element in $INCEXPAT; do
10922 haveit=
10923 for x in $CPPFLAGS; do
10924
10925 acl_save_prefix="$prefix"
10926 prefix="$acl_final_prefix"
10927 acl_save_exec_prefix="$exec_prefix"
10928 exec_prefix="$acl_final_exec_prefix"
10929 eval x=\"$x\"
10930 exec_prefix="$acl_save_exec_prefix"
10931 prefix="$acl_save_prefix"
10932
10933 if test "X$x" = "X$element"; then
10934 haveit=yes
10935 break
10936 fi
10937 done
10938 if test -z "$haveit"; then
10939 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10940 fi
10941 done
10942
10943
10944 echo "$as_me:$LINENO: checking for libexpat" >&5
10945echo $ECHO_N "checking for libexpat... $ECHO_C" >&6
10946if test "${ac_cv_libexpat+set}" = set; then
10947 echo $ECHO_N "(cached) $ECHO_C" >&6
10948else
10949
10950 ac_save_LIBS="$LIBS"
10951 LIBS="$LIBS $LIBEXPAT"
10952 cat >conftest.$ac_ext <<_ACEOF
10953/* confdefs.h. */
10954_ACEOF
10955cat confdefs.h >>conftest.$ac_ext
10956cat >>conftest.$ac_ext <<_ACEOF
10957/* end confdefs.h. */
10958#include "expat.h"
10959int
10960main ()
10961{
10962XML_Parser p = XML_ParserCreate (0);
10963 ;
10964 return 0;
10965}
10966_ACEOF
10967rm -f conftest.$ac_objext conftest$ac_exeext
10968if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10969 (eval $ac_link) 2>conftest.er1
10970 ac_status=$?
10971 grep -v '^ *+' conftest.er1 >conftest.err
10972 rm -f conftest.er1
10973 cat conftest.err >&5
10974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10975 (exit $ac_status); } &&
10976 { ac_try='test -z "$ac_c_werror_flag"
10977 || test ! -s conftest.err'
10978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10979 (eval $ac_try) 2>&5
10980 ac_status=$?
10981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10982 (exit $ac_status); }; } &&
10983 { ac_try='test -s conftest$ac_exeext'
10984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10985 (eval $ac_try) 2>&5
10986 ac_status=$?
10987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10988 (exit $ac_status); }; }; then
10989 ac_cv_libexpat=yes
10990else
10991 echo "$as_me: failed program was:" >&5
10992sed 's/^/| /' conftest.$ac_ext >&5
10993
10994ac_cv_libexpat=no
10995fi
10996rm -f conftest.err conftest.$ac_objext \
10997 conftest$ac_exeext conftest.$ac_ext
10998 LIBS="$ac_save_LIBS"
10999
11000fi
11001echo "$as_me:$LINENO: result: $ac_cv_libexpat" >&5
11002echo "${ECHO_T}$ac_cv_libexpat" >&6
11003 if test "$ac_cv_libexpat" = yes; then
11004 HAVE_LIBEXPAT=yes
11005
11006cat >>confdefs.h <<\_ACEOF
11007#define HAVE_LIBEXPAT 1
11008_ACEOF
11009
11010 echo "$as_me:$LINENO: checking how to link with libexpat" >&5
11011echo $ECHO_N "checking how to link with libexpat... $ECHO_C" >&6
11012 echo "$as_me:$LINENO: result: $LIBEXPAT" >&5
11013echo "${ECHO_T}$LIBEXPAT" >&6
11014 else
11015 HAVE_LIBEXPAT=no
11016 CPPFLAGS="$ac_save_CPPFLAGS"
11017 LIBEXPAT=
11018 LTLIBEXPAT=
11019 fi
11020
11021
11022
11023
11024
11025
5c39566f
DJ
11026 if test "$HAVE_LIBEXPAT" != yes; then
11027 if test "$with_expat" = yes; then
11028 { { echo "$as_me:$LINENO: error: expat is missing or unusable" >&5
11029echo "$as_me: error: expat is missing or unusable" >&2;}
11030 { (exit 1); exit 1; }; }
11031 else
11032 { echo "$as_me:$LINENO: WARNING: expat is missing or unusable; some features may be unavailable." >&5
11033echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
11034 fi
11035 else
11036 save_LIBS=$LIBS
11037 LIBS="$LIBS $LIBEXPAT"
ca4ca11e
DJ
11038
11039for ac_func in XML_StopParser
11040do
11041as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11042echo "$as_me:$LINENO: checking for $ac_func" >&5
11043echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11044if eval "test \"\${$as_ac_var+set}\" = set"; then
11045 echo $ECHO_N "(cached) $ECHO_C" >&6
11046else
11047 cat >conftest.$ac_ext <<_ACEOF
11048/* confdefs.h. */
11049_ACEOF
11050cat confdefs.h >>conftest.$ac_ext
11051cat >>conftest.$ac_ext <<_ACEOF
11052/* end confdefs.h. */
11053/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11054 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11055#define $ac_func innocuous_$ac_func
11056
11057/* System header to define __stub macros and hopefully few prototypes,
11058 which can conflict with char $ac_func (); below.
11059 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11060 <limits.h> exists even on freestanding compilers. */
11061
11062#ifdef __STDC__
11063# include <limits.h>
11064#else
11065# include <assert.h>
11066#endif
11067
11068#undef $ac_func
11069
11070/* Override any gcc2 internal prototype to avoid an error. */
11071#ifdef __cplusplus
11072extern "C"
11073{
11074#endif
11075/* We use char because int might match the return type of a gcc2
11076 builtin and then its argument prototype would still apply. */
11077char $ac_func ();
11078/* The GNU C library defines this for functions which it implements
11079 to always fail with ENOSYS. Some functions are actually named
11080 something starting with __ and the normal name is an alias. */
11081#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11082choke me
11083#else
11084char (*f) () = $ac_func;
11085#endif
11086#ifdef __cplusplus
11087}
11088#endif
11089
11090int
11091main ()
11092{
11093return f != $ac_func;
11094 ;
11095 return 0;
11096}
11097_ACEOF
11098rm -f conftest.$ac_objext conftest$ac_exeext
11099if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11100 (eval $ac_link) 2>conftest.er1
11101 ac_status=$?
11102 grep -v '^ *+' conftest.er1 >conftest.err
11103 rm -f conftest.er1
11104 cat conftest.err >&5
11105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11106 (exit $ac_status); } &&
11107 { ac_try='test -z "$ac_c_werror_flag"
11108 || test ! -s conftest.err'
11109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11110 (eval $ac_try) 2>&5
11111 ac_status=$?
11112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11113 (exit $ac_status); }; } &&
11114 { ac_try='test -s conftest$ac_exeext'
11115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11116 (eval $ac_try) 2>&5
11117 ac_status=$?
11118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11119 (exit $ac_status); }; }; then
11120 eval "$as_ac_var=yes"
11121else
11122 echo "$as_me: failed program was:" >&5
11123sed 's/^/| /' conftest.$ac_ext >&5
11124
11125eval "$as_ac_var=no"
11126fi
11127rm -f conftest.err conftest.$ac_objext \
11128 conftest$ac_exeext conftest.$ac_ext
11129fi
11130echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11131echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11132if test `eval echo '${'$as_ac_var'}'` = yes; then
11133 cat >>confdefs.h <<_ACEOF
11134#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11135_ACEOF
11136
11137fi
11138done
11139
5c39566f
DJ
11140 LIBS=$save_LIBS
11141 fi
3841debe
DJ
11142fi
11143
d57a3c85
TJB
11144
11145
11146
11147# Check whether --with-python or --without-python was given.
11148if test "${with_python+set}" = set; then
11149 withval="$with_python"
11150
11151else
11152 with_python=auto
11153fi;
11154echo "$as_me:$LINENO: checking whether to use python" >&5
11155echo $ECHO_N "checking whether to use python... $ECHO_C" >&6
11156echo "$as_me:$LINENO: result: $with_python" >&5
11157echo "${ECHO_T}$with_python" >&6
11158
11159if test "${with_python}" = no; then
11160 { echo "$as_me:$LINENO: WARNING: python support disabled; some features may be unavailable." >&5
11161echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11162 have_libpython=no
11163else
11164 case "${with_python}" in
11165 yes | auto)
11166 # Leave as empty, use defaults.
11167 python_includes=
11168 python_libs=
11169 ;;
11170 /*)
11171 python_includes="-I${with_python}/include"
11172 python_libs="-L${with_python}/lib"
11173 ;;
11174 *)
11175 { { echo "$as_me:$LINENO: error: invalid value for --with-python" >&5
11176echo "$as_me: error: invalid value for --with-python" >&2;}
11177 { (exit 1); exit 1; }; }
11178 ;;
11179 esac
11180
11181 save_CPPFLAGS=$CPPFLAGS
11182 CPPFLAGS="$CPPFLAGS ${python_includes}"
11183 save_LIBS=$LIBS
11184 LIBS="$LIBS ${python_libs}"
11185 have_libpython=no
11186 if test "${have_libpython}" = no; then
11187
11188 version=python2.6
11189
11190
11191 HAVE_LIBPYTHON2_6=no
11192 echo "$as_me:$LINENO: checking for ${version}" >&5
11193echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11194 save_LIBS=$LIBS
11195 LIBS="$LIBS -l${version}"
11196 cat >conftest.$ac_ext <<_ACEOF
11197/* confdefs.h. */
11198_ACEOF
11199cat confdefs.h >>conftest.$ac_ext
11200cat >>conftest.$ac_ext <<_ACEOF
11201/* end confdefs.h. */
11202#include "${version}/Python.h"
11203int
11204main ()
11205{
11206Py_Initialize ();
11207 ;
11208 return 0;
11209}
11210_ACEOF
11211rm -f conftest.$ac_objext conftest$ac_exeext
11212if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11213 (eval $ac_link) 2>conftest.er1
11214 ac_status=$?
11215 grep -v '^ *+' conftest.er1 >conftest.err
11216 rm -f conftest.er1
11217 cat conftest.err >&5
11218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11219 (exit $ac_status); } &&
11220 { ac_try='test -z "$ac_c_werror_flag"
11221 || test ! -s conftest.err'
11222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11223 (eval $ac_try) 2>&5
11224 ac_status=$?
11225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11226 (exit $ac_status); }; } &&
11227 { ac_try='test -s conftest$ac_exeext'
11228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11229 (eval $ac_try) 2>&5
11230 ac_status=$?
11231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11232 (exit $ac_status); }; }; then
11233 HAVE_LIBPYTHON2_6=yes
11234 have_libpython=yes
11235else
11236 echo "$as_me: failed program was:" >&5
11237sed 's/^/| /' conftest.$ac_ext >&5
11238
11239LIBS=$save_LIBS
11240fi
11241rm -f conftest.err conftest.$ac_objext \
11242 conftest$ac_exeext conftest.$ac_ext
11243 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_6" >&5
11244echo "${ECHO_T}$HAVE_LIBPYTHON2_6" >&6
11245
11246 if test "${HAVE_LIBPYTHON2_6}" = yes; then
11247
11248cat >>confdefs.h <<\_ACEOF
11249#define HAVE_LIBPYTHON2_6 1
11250_ACEOF
11251
11252 fi
11253 fi
11254 if test ${have_libpython} = no; then
11255
11256 version=python2.5
11257
11258
11259 HAVE_LIBPYTHON2_5=no
11260 echo "$as_me:$LINENO: checking for ${version}" >&5
11261echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11262 save_LIBS=$LIBS
11263 LIBS="$LIBS -l${version}"
11264 cat >conftest.$ac_ext <<_ACEOF
11265/* confdefs.h. */
11266_ACEOF
11267cat confdefs.h >>conftest.$ac_ext
11268cat >>conftest.$ac_ext <<_ACEOF
11269/* end confdefs.h. */
11270#include "${version}/Python.h"
11271int
11272main ()
11273{
11274Py_Initialize ();
11275 ;
11276 return 0;
11277}
11278_ACEOF
11279rm -f conftest.$ac_objext conftest$ac_exeext
11280if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11281 (eval $ac_link) 2>conftest.er1
11282 ac_status=$?
11283 grep -v '^ *+' conftest.er1 >conftest.err
11284 rm -f conftest.er1
11285 cat conftest.err >&5
11286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11287 (exit $ac_status); } &&
11288 { ac_try='test -z "$ac_c_werror_flag"
11289 || test ! -s conftest.err'
11290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11291 (eval $ac_try) 2>&5
11292 ac_status=$?
11293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11294 (exit $ac_status); }; } &&
11295 { ac_try='test -s conftest$ac_exeext'
11296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11297 (eval $ac_try) 2>&5
11298 ac_status=$?
11299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11300 (exit $ac_status); }; }; then
11301 HAVE_LIBPYTHON2_5=yes
11302 have_libpython=yes
11303else
11304 echo "$as_me: failed program was:" >&5
11305sed 's/^/| /' conftest.$ac_ext >&5
11306
11307LIBS=$save_LIBS
11308fi
11309rm -f conftest.err conftest.$ac_objext \
11310 conftest$ac_exeext conftest.$ac_ext
11311 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_5" >&5
11312echo "${ECHO_T}$HAVE_LIBPYTHON2_5" >&6
11313
11314 if test "${HAVE_LIBPYTHON2_5}" = yes; then
11315
11316cat >>confdefs.h <<\_ACEOF
11317#define HAVE_LIBPYTHON2_5 1
11318_ACEOF
11319
11320 fi
11321 fi
11322 if test ${have_libpython} = no; then
11323
11324 version=python2.4
11325
11326
11327 HAVE_LIBPYTHON2_4=no
11328 echo "$as_me:$LINENO: checking for ${version}" >&5
11329echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11330 save_LIBS=$LIBS
11331 LIBS="$LIBS -l${version}"
11332 cat >conftest.$ac_ext <<_ACEOF
11333/* confdefs.h. */
11334_ACEOF
11335cat confdefs.h >>conftest.$ac_ext
11336cat >>conftest.$ac_ext <<_ACEOF
11337/* end confdefs.h. */
11338#include "${version}/Python.h"
11339int
11340main ()
11341{
11342Py_Initialize ();
11343 ;
11344 return 0;
11345}
11346_ACEOF
11347rm -f conftest.$ac_objext conftest$ac_exeext
11348if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11349 (eval $ac_link) 2>conftest.er1
11350 ac_status=$?
11351 grep -v '^ *+' conftest.er1 >conftest.err
11352 rm -f conftest.er1
11353 cat conftest.err >&5
11354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11355 (exit $ac_status); } &&
11356 { ac_try='test -z "$ac_c_werror_flag"
11357 || test ! -s conftest.err'
11358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11359 (eval $ac_try) 2>&5
11360 ac_status=$?
11361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11362 (exit $ac_status); }; } &&
11363 { ac_try='test -s conftest$ac_exeext'
11364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11365 (eval $ac_try) 2>&5
11366 ac_status=$?
11367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11368 (exit $ac_status); }; }; then
11369 HAVE_LIBPYTHON2_4=yes
11370 have_libpython=yes
11371else
11372 echo "$as_me: failed program was:" >&5
11373sed 's/^/| /' conftest.$ac_ext >&5
11374
11375LIBS=$save_LIBS
11376fi
11377rm -f conftest.err conftest.$ac_objext \
11378 conftest$ac_exeext conftest.$ac_ext
11379 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_4" >&5
11380echo "${ECHO_T}$HAVE_LIBPYTHON2_4" >&6
11381
11382 if test "${HAVE_LIBPYTHON2_4}" = yes; then
11383
11384cat >>confdefs.h <<\_ACEOF
11385#define HAVE_LIBPYTHON2_4 1
11386_ACEOF
11387
11388 fi
11389 fi
11390 if test ${have_libpython} = no; then
11391 case "${with_python}" in
11392 yes)
11393 { { echo "$as_me:$LINENO: error: python is missing or unusable" >&5
11394echo "$as_me: error: python is missing or unusable" >&2;}
11395 { (exit 1); exit 1; }; }
11396 ;;
11397 auto)
11398 { echo "$as_me:$LINENO: WARNING: python is missing or unusable; some features may be unavailable." >&5
11399echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11400 ;;
11401 *)
11402 { { echo "$as_me:$LINENO: error: no usable python found at ${with_python}" >&5
11403echo "$as_me: error: no usable python found at ${with_python}" >&2;}
11404 { (exit 1); exit 1; }; }
11405 ;;
11406 esac
11407 CPPFLAGS=$save_CPPFLAGS
11408 LIBS=$save_LIBS
11409 fi
11410fi
11411
11412if test "${have_libpython}" = yes; then
11413
11414cat >>confdefs.h <<\_ACEOF
11415#define HAVE_PYTHON 1
11416_ACEOF
11417
11418 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11419 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11420 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11421 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11422
11423 # Flags needed to compile Python code (taken from python-config --cflags).
11424 # We cannot call python-config directly because it will output whatever was
11425 # used when compiling the Python interpreter itself, including flags which
11426 # would make the python-related objects be compiled differently from the
11427 # rest of GDB (e.g., -O2 and -fPIC).
11428 if test "${GCC}" = yes; then
11429 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11430 fi
11431
11432 if test "x${tentative_python_cflags}" != x; then
11433 echo "$as_me:$LINENO: checking compiler flags for python code" >&5
11434echo $ECHO_N "checking compiler flags for python code... $ECHO_C" >&6
11435 for flag in ${tentative_python_cflags}; do
11436 # Check that the compiler accepts it
11437 saved_CFLAGS="$CFLAGS"
11438 CFLAGS="$CFLAGS $flag"
11439 cat >conftest.$ac_ext <<_ACEOF
11440/* confdefs.h. */
11441_ACEOF
11442cat confdefs.h >>conftest.$ac_ext
11443cat >>conftest.$ac_ext <<_ACEOF
11444/* end confdefs.h. */
11445
11446int
11447main ()
11448{
11449
11450 ;
11451 return 0;
11452}
11453_ACEOF
11454rm -f conftest.$ac_objext
11455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11456 (eval $ac_compile) 2>conftest.er1
11457 ac_status=$?
11458 grep -v '^ *+' conftest.er1 >conftest.err
11459 rm -f conftest.er1
11460 cat conftest.err >&5
11461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11462 (exit $ac_status); } &&
11463 { ac_try='test -z "$ac_c_werror_flag"
11464 || test ! -s conftest.err'
11465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11466 (eval $ac_try) 2>&5
11467 ac_status=$?
11468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11469 (exit $ac_status); }; } &&
11470 { ac_try='test -s conftest.$ac_objext'
11471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11472 (eval $ac_try) 2>&5
11473 ac_status=$?
11474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11475 (exit $ac_status); }; }; then
11476 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11477else
11478 echo "$as_me: failed program was:" >&5
11479sed 's/^/| /' conftest.$ac_ext >&5
11480
11481fi
11482rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11483 CFLAGS="$saved_CFLAGS"
11484 done
11485 echo "$as_me:$LINENO: result: ${PYTHON_CFLAGS}" >&5
11486echo "${ECHO_T}${PYTHON_CFLAGS}" >&6
11487 fi
11488else
a08702d6 11489 # Even if Python support is not compiled in, we need to have these files
d57a3c85 11490 # included in order to recognize the GDB command "python".
a08702d6
TJB
11491 CONFIG_OBS="$CONFIG_OBS python.o python-value.o"
11492 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c"
d57a3c85
TJB
11493fi
11494
11495
bec39cab
AC
11496# ------------------------- #
11497# Checks for header files. #
11498# ------------------------- #
8ee53726 11499
0e5d83e3 11500
bec39cab
AC
11501
11502
11503
11504
11505ac_header_dirent=no
11506for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11507 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
b4e70030
JB
11508echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
11509echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11510if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
11511 echo $ECHO_N "(cached) $ECHO_C" >&6
11512else
11513 cat >conftest.$ac_ext <<_ACEOF
11514/* confdefs.h. */
11515_ACEOF
11516cat confdefs.h >>conftest.$ac_ext
11517cat >>conftest.$ac_ext <<_ACEOF
11518/* end confdefs.h. */
11519#include <sys/types.h>
0e5d83e3 11520#include <$ac_hdr>
bec39cab
AC
11521
11522int
11523main ()
11524{
11525if ((DIR *) 0)
11526return 0;
11527 ;
11528 return 0;
11529}
11530_ACEOF
11531rm -f conftest.$ac_objext
11532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11533 (eval $ac_compile) 2>conftest.er1
11534 ac_status=$?
11535 grep -v '^ *+' conftest.er1 >conftest.err
11536 rm -f conftest.er1
11537 cat conftest.err >&5
11538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11539 (exit $ac_status); } &&
b4e70030
JB
11540 { ac_try='test -z "$ac_c_werror_flag"
11541 || test ! -s conftest.err'
bec39cab
AC
11542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11543 (eval $ac_try) 2>&5
11544 ac_status=$?
11545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11546 (exit $ac_status); }; } &&
11547 { ac_try='test -s conftest.$ac_objext'
11548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11549 (eval $ac_try) 2>&5
11550 ac_status=$?
11551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11552 (exit $ac_status); }; }; then
11553 eval "$as_ac_Header=yes"
11554else
11555 echo "$as_me: failed program was:" >&5
11556sed 's/^/| /' conftest.$ac_ext >&5
11557
b4e70030 11558eval "$as_ac_Header=no"
bec39cab
AC
11559fi
11560rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11561fi
b4e70030
JB
11562echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11563echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
11564if test `eval echo '${'$as_ac_Header'}'` = yes; then
11565 cat >>confdefs.h <<_ACEOF
11566#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11567_ACEOF
11568
11569ac_header_dirent=$ac_hdr; break
0e5d83e3 11570fi
0e5d83e3 11571
bec39cab
AC
11572done
11573# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11574if test $ac_header_dirent = dirent.h; then
b4e70030
JB
11575 echo "$as_me:$LINENO: checking for library containing opendir" >&5
11576echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
11577if test "${ac_cv_search_opendir+set}" = set; then
11578 echo $ECHO_N "(cached) $ECHO_C" >&6
11579else
11580 ac_func_search_save_LIBS=$LIBS
b4e70030 11581ac_cv_search_opendir=no
bec39cab
AC
11582cat >conftest.$ac_ext <<_ACEOF
11583/* confdefs.h. */
11584_ACEOF
11585cat confdefs.h >>conftest.$ac_ext
11586cat >>conftest.$ac_ext <<_ACEOF
11587/* end confdefs.h. */
0e5d83e3 11588
b4e70030 11589/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
11590#ifdef __cplusplus
11591extern "C"
11592#endif
b4e70030
JB
11593/* We use char because int might match the return type of a gcc2
11594 builtin and then its argument prototype would still apply. */
bec39cab
AC
11595char opendir ();
11596int
11597main ()
11598{
b4e70030 11599opendir ();
bec39cab
AC
11600 ;
11601 return 0;
11602}
11603_ACEOF
b4e70030 11604rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
11605if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11606 (eval $ac_link) 2>conftest.er1
11607 ac_status=$?
11608 grep -v '^ *+' conftest.er1 >conftest.err
11609 rm -f conftest.er1
11610 cat conftest.err >&5
11611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11612 (exit $ac_status); } &&
b4e70030
JB
11613 { ac_try='test -z "$ac_c_werror_flag"
11614 || test ! -s conftest.err'
bec39cab
AC
11615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11616 (eval $ac_try) 2>&5
11617 ac_status=$?
11618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11619 (exit $ac_status); }; } &&
11620 { ac_try='test -s conftest$ac_exeext'
11621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11622 (eval $ac_try) 2>&5
11623 ac_status=$?
11624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11625 (exit $ac_status); }; }; then
b4e70030 11626 ac_cv_search_opendir="none required"
bec39cab
AC
11627else
11628 echo "$as_me: failed program was:" >&5
11629sed 's/^/| /' conftest.$ac_ext >&5
11630
11631fi
bec39cab 11632rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
11633 conftest$ac_exeext conftest.$ac_ext
11634if test "$ac_cv_search_opendir" = no; then
11635 for ac_lib in dir; do
11636 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11637 cat >conftest.$ac_ext <<_ACEOF
11638/* confdefs.h. */
11639_ACEOF
11640cat confdefs.h >>conftest.$ac_ext
11641cat >>conftest.$ac_ext <<_ACEOF
11642/* end confdefs.h. */
11643
11644/* Override any gcc2 internal prototype to avoid an error. */
11645#ifdef __cplusplus
11646extern "C"
11647#endif
11648/* We use char because int might match the return type of a gcc2
11649 builtin and then its argument prototype would still apply. */
11650char opendir ();
11651int
11652main ()
11653{
11654opendir ();
11655 ;
11656 return 0;
11657}
11658_ACEOF
11659rm -f conftest.$ac_objext conftest$ac_exeext
11660if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11661 (eval $ac_link) 2>conftest.er1
11662 ac_status=$?
11663 grep -v '^ *+' conftest.er1 >conftest.err
11664 rm -f conftest.er1
11665 cat conftest.err >&5
11666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11667 (exit $ac_status); } &&
11668 { ac_try='test -z "$ac_c_werror_flag"
11669 || test ! -s conftest.err'
11670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11671 (eval $ac_try) 2>&5
11672 ac_status=$?
11673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11674 (exit $ac_status); }; } &&
11675 { ac_try='test -s conftest$ac_exeext'
11676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11677 (eval $ac_try) 2>&5
11678 ac_status=$?
11679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11680 (exit $ac_status); }; }; then
11681 ac_cv_search_opendir="-l$ac_lib"
11682break
4e8d927d 11683else
b4e70030
JB
11684 echo "$as_me: failed program was:" >&5
11685sed 's/^/| /' conftest.$ac_ext >&5
11686
11687fi
11688rm -f conftest.err conftest.$ac_objext \
11689 conftest$ac_exeext conftest.$ac_ext
11690 done
0e5d83e3 11691fi
bec39cab 11692LIBS=$ac_func_search_save_LIBS
0e5d83e3 11693fi
b4e70030
JB
11694echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
11695echo "${ECHO_T}$ac_cv_search_opendir" >&6
11696if test "$ac_cv_search_opendir" != no; then
11697 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
0e5d83e3 11698
0e5d83e3
JJ
11699fi
11700
d28f9cdf 11701else
b4e70030
JB
11702 echo "$as_me:$LINENO: checking for library containing opendir" >&5
11703echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
11704if test "${ac_cv_search_opendir+set}" = set; then
11705 echo $ECHO_N "(cached) $ECHO_C" >&6
11706else
11707 ac_func_search_save_LIBS=$LIBS
b4e70030 11708ac_cv_search_opendir=no
bec39cab
AC
11709cat >conftest.$ac_ext <<_ACEOF
11710/* confdefs.h. */
11711_ACEOF
11712cat confdefs.h >>conftest.$ac_ext
11713cat >>conftest.$ac_ext <<_ACEOF
11714/* end confdefs.h. */
d28f9cdf 11715
b4e70030 11716/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
11717#ifdef __cplusplus
11718extern "C"
d28f9cdf 11719#endif
b4e70030
JB
11720/* We use char because int might match the return type of a gcc2
11721 builtin and then its argument prototype would still apply. */
bec39cab
AC
11722char opendir ();
11723int
11724main ()
11725{
b4e70030 11726opendir ();
bec39cab
AC
11727 ;
11728 return 0;
11729}
11730_ACEOF
b4e70030 11731rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
11732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11733 (eval $ac_link) 2>conftest.er1
11734 ac_status=$?
11735 grep -v '^ *+' conftest.er1 >conftest.err
11736 rm -f conftest.er1
11737 cat conftest.err >&5
11738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11739 (exit $ac_status); } &&
b4e70030
JB
11740 { ac_try='test -z "$ac_c_werror_flag"
11741 || test ! -s conftest.err'
bec39cab
AC
11742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11743 (eval $ac_try) 2>&5
11744 ac_status=$?
11745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11746 (exit $ac_status); }; } &&
11747 { ac_try='test -s conftest$ac_exeext'
11748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11749 (eval $ac_try) 2>&5
11750 ac_status=$?
11751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11752 (exit $ac_status); }; }; then
b4e70030 11753 ac_cv_search_opendir="none required"
d28f9cdf 11754else
bec39cab
AC
11755 echo "$as_me: failed program was:" >&5
11756sed 's/^/| /' conftest.$ac_ext >&5
11757
d28f9cdf 11758fi
bec39cab 11759rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
11760 conftest$ac_exeext conftest.$ac_ext
11761if test "$ac_cv_search_opendir" = no; then
11762 for ac_lib in x; do
11763 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11764 cat >conftest.$ac_ext <<_ACEOF
11765/* confdefs.h. */
11766_ACEOF
11767cat confdefs.h >>conftest.$ac_ext
11768cat >>conftest.$ac_ext <<_ACEOF
11769/* end confdefs.h. */
11770
11771/* Override any gcc2 internal prototype to avoid an error. */
11772#ifdef __cplusplus
11773extern "C"
11774#endif
11775/* We use char because int might match the return type of a gcc2
11776 builtin and then its argument prototype would still apply. */
11777char opendir ();
11778int
11779main ()
11780{
11781opendir ();
11782 ;
11783 return 0;
11784}
11785_ACEOF
11786rm -f conftest.$ac_objext conftest$ac_exeext
11787if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11788 (eval $ac_link) 2>conftest.er1
11789 ac_status=$?
11790 grep -v '^ *+' conftest.er1 >conftest.err
11791 rm -f conftest.er1
11792 cat conftest.err >&5
11793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11794 (exit $ac_status); } &&
11795 { ac_try='test -z "$ac_c_werror_flag"
11796 || test ! -s conftest.err'
11797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11798 (eval $ac_try) 2>&5
11799 ac_status=$?
11800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11801 (exit $ac_status); }; } &&
11802 { ac_try='test -s conftest$ac_exeext'
11803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11804 (eval $ac_try) 2>&5
11805 ac_status=$?
11806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11807 (exit $ac_status); }; }; then
11808 ac_cv_search_opendir="-l$ac_lib"
11809break
4e8d927d 11810else
b4e70030
JB
11811 echo "$as_me: failed program was:" >&5
11812sed 's/^/| /' conftest.$ac_ext >&5
11813
11814fi
11815rm -f conftest.err conftest.$ac_objext \
11816 conftest$ac_exeext conftest.$ac_ext
11817 done
bec39cab
AC
11818fi
11819LIBS=$ac_func_search_save_LIBS
d28f9cdf 11820fi
b4e70030
JB
11821echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
11822echo "${ECHO_T}$ac_cv_search_opendir" >&6
11823if test "$ac_cv_search_opendir" != no; then
11824 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
d28f9cdf 11825
d28f9cdf
DJ
11826fi
11827
bec39cab 11828fi
b0b1c2c0 11829
b4e70030
JB
11830echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
11831echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
bec39cab
AC
11832if test "${ac_cv_header_stat_broken+set}" = set; then
11833 echo $ECHO_N "(cached) $ECHO_C" >&6
b0b1c2c0 11834else
bec39cab
AC
11835 cat >conftest.$ac_ext <<_ACEOF
11836/* confdefs.h. */
11837_ACEOF
11838cat confdefs.h >>conftest.$ac_ext
11839cat >>conftest.$ac_ext <<_ACEOF
11840/* end confdefs.h. */
11841#include <sys/types.h>
11842#include <sys/stat.h>
b0b1c2c0 11843
b4e70030 11844#if defined(S_ISBLK) && defined(S_IFDIR)
bec39cab
AC
11845# if S_ISBLK (S_IFDIR)
11846You lose.
11847# endif
11848#endif
b0b1c2c0 11849
b4e70030 11850#if defined(S_ISBLK) && defined(S_IFCHR)
bec39cab
AC
11851# if S_ISBLK (S_IFCHR)
11852You lose.
11853# endif
11854#endif
d28f9cdf 11855
b4e70030 11856#if defined(S_ISLNK) && defined(S_IFREG)
bec39cab
AC
11857# if S_ISLNK (S_IFREG)
11858You lose.
11859# endif
11860#endif
d28f9cdf 11861
b4e70030 11862#if defined(S_ISSOCK) && defined(S_IFREG)
bec39cab
AC
11863# if S_ISSOCK (S_IFREG)
11864You lose.
11865# endif
11866#endif
11867
11868_ACEOF
11869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11870 $EGREP "You lose" >/dev/null 2>&1; then
11871 ac_cv_header_stat_broken=yes
d28f9cdf 11872else
bec39cab 11873 ac_cv_header_stat_broken=no
d28f9cdf
DJ
11874fi
11875rm -f conftest*
d28f9cdf 11876
d28f9cdf 11877fi
b4e70030
JB
11878echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
11879echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
bec39cab 11880if test $ac_cv_header_stat_broken = yes; then
d28f9cdf 11881
bec39cab
AC
11882cat >>confdefs.h <<\_ACEOF
11883#define STAT_MACROS_BROKEN 1
11884_ACEOF
8bb2c122 11885
7a292a7a 11886fi
bec39cab 11887
b4e70030
JB
11888echo "$as_me:$LINENO: checking for ANSI C header files" >&5
11889echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
bec39cab
AC
11890if test "${ac_cv_header_stdc+set}" = set; then
11891 echo $ECHO_N "(cached) $ECHO_C" >&6
7a292a7a 11892else
bec39cab
AC
11893 cat >conftest.$ac_ext <<_ACEOF
11894/* confdefs.h. */
11895_ACEOF
11896cat confdefs.h >>conftest.$ac_ext
11897cat >>conftest.$ac_ext <<_ACEOF
11898/* end confdefs.h. */
11899#include <stdlib.h>
11900#include <stdarg.h>
11901#include <string.h>
11902#include <float.h>
7a292a7a 11903
bec39cab
AC
11904int
11905main ()
11906{
7a292a7a 11907
bec39cab
AC
11908 ;
11909 return 0;
11910}
11911_ACEOF
11912rm -f conftest.$ac_objext
11913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11914 (eval $ac_compile) 2>conftest.er1
11915 ac_status=$?
11916 grep -v '^ *+' conftest.er1 >conftest.err
11917 rm -f conftest.er1
11918 cat conftest.err >&5
11919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11920 (exit $ac_status); } &&
b4e70030
JB
11921 { ac_try='test -z "$ac_c_werror_flag"
11922 || test ! -s conftest.err'
bec39cab
AC
11923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11924 (eval $ac_try) 2>&5
11925 ac_status=$?
11926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11927 (exit $ac_status); }; } &&
11928 { ac_try='test -s conftest.$ac_objext'
11929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11930 (eval $ac_try) 2>&5
11931 ac_status=$?
11932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11933 (exit $ac_status); }; }; then
11934 ac_cv_header_stdc=yes
c906108c 11935else
bec39cab
AC
11936 echo "$as_me: failed program was:" >&5
11937sed 's/^/| /' conftest.$ac_ext >&5
c906108c 11938
b4e70030 11939ac_cv_header_stdc=no
c906108c 11940fi
bec39cab 11941rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11942
bec39cab
AC
11943if test $ac_cv_header_stdc = yes; then
11944 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11945 cat >conftest.$ac_ext <<_ACEOF
11946/* confdefs.h. */
11947_ACEOF
11948cat confdefs.h >>conftest.$ac_ext
11949cat >>conftest.$ac_ext <<_ACEOF
11950/* end confdefs.h. */
11951#include <string.h>
c906108c 11952
bec39cab
AC
11953_ACEOF
11954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11955 $EGREP "memchr" >/dev/null 2>&1; then
11956 :
8bb2c122 11957else
bec39cab 11958 ac_cv_header_stdc=no
8bb2c122 11959fi
bec39cab
AC
11960rm -f conftest*
11961
c906108c
SS
11962fi
11963
bec39cab
AC
11964if test $ac_cv_header_stdc = yes; then
11965 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11966 cat >conftest.$ac_ext <<_ACEOF
11967/* confdefs.h. */
11968_ACEOF
11969cat confdefs.h >>conftest.$ac_ext
11970cat >>conftest.$ac_ext <<_ACEOF
11971/* end confdefs.h. */
11972#include <stdlib.h>
11973
11974_ACEOF
11975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11976 $EGREP "free" >/dev/null 2>&1; then
11977 :
c906108c 11978else
bec39cab 11979 ac_cv_header_stdc=no
c906108c 11980fi
bec39cab
AC
11981rm -f conftest*
11982
c906108c
SS
11983fi
11984
bec39cab
AC
11985if test $ac_cv_header_stdc = yes; then
11986 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11987 if test "$cross_compiling" = yes; then
11988 :
c906108c 11989else
bec39cab
AC
11990 cat >conftest.$ac_ext <<_ACEOF
11991/* confdefs.h. */
11992_ACEOF
11993cat confdefs.h >>conftest.$ac_ext
11994cat >>conftest.$ac_ext <<_ACEOF
11995/* end confdefs.h. */
11996#include <ctype.h>
11997#if ((' ' & 0x0FF) == 0x020)
11998# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11999# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12000#else
12001# define ISLOWER(c) \
12002 (('a' <= (c) && (c) <= 'i') \
12003 || ('j' <= (c) && (c) <= 'r') \
12004 || ('s' <= (c) && (c) <= 'z'))
12005# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12006#endif
12007
12008#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12009int
12010main ()
12011{
12012 int i;
12013 for (i = 0; i < 256; i++)
12014 if (XOR (islower (i), ISLOWER (i))
12015 || toupper (i) != TOUPPER (i))
b4e70030
JB
12016 exit(2);
12017 exit (0);
bec39cab
AC
12018}
12019_ACEOF
12020rm -f conftest$ac_exeext
12021if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12022 (eval $ac_link) 2>&5
12023 ac_status=$?
12024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12025 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12027 (eval $ac_try) 2>&5
12028 ac_status=$?
12029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12030 (exit $ac_status); }; }; then
12031 :
12032else
12033 echo "$as_me: program exited with status $ac_status" >&5
12034echo "$as_me: failed program was:" >&5
12035sed 's/^/| /' conftest.$ac_ext >&5
12036
12037( exit $ac_status )
12038ac_cv_header_stdc=no
c906108c 12039fi
b4e70030 12040rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 12041fi
c906108c 12042fi
bec39cab 12043fi
b4e70030
JB
12044echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
12045echo "${ECHO_T}$ac_cv_header_stdc" >&6
bec39cab 12046if test $ac_cv_header_stdc = yes; then
c906108c 12047
bec39cab
AC
12048cat >>confdefs.h <<\_ACEOF
12049#define STDC_HEADERS 1
12050_ACEOF
c906108c 12051
bec39cab 12052fi
8bb2c122 12053
a9322a30
TT
12054# elf_hp.h is for HP/UX 64-bit shared library support.
12055# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
12056# unconditionally, so what's the point in checking these?
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
bec39cab 12074
a9322a30
TT
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
a8111142 12091
a9322a30
TT
12092
12093
12094for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12095 thread_db.h gnu/libc-version.h signal.h stddef.h \
12096 stdlib.h string.h memory.h strings.h sys/fault.h \
12097 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12098 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12099 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
12100 sys/types.h sys/wait.h wait.h termios.h termio.h \
a8111142 12101 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
bec39cab
AC
12102do
12103as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12104if eval "test \"\${$as_ac_Header+set}\" = set"; then
12105 echo "$as_me:$LINENO: checking for $ac_header" >&5
12106echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12107if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
12108 echo $ECHO_N "(cached) $ECHO_C" >&6
12109fi
b4e70030
JB
12110echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12111echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12112else
12113 # Is the header compilable?
b4e70030
JB
12114echo "$as_me:$LINENO: checking $ac_header usability" >&5
12115echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
12116cat >conftest.$ac_ext <<_ACEOF
12117/* confdefs.h. */
12118_ACEOF
12119cat confdefs.h >>conftest.$ac_ext
12120cat >>conftest.$ac_ext <<_ACEOF
12121/* end confdefs.h. */
12122$ac_includes_default
12123#include <$ac_header>
12124_ACEOF
12125rm -f conftest.$ac_objext
12126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12127 (eval $ac_compile) 2>conftest.er1
12128 ac_status=$?
12129 grep -v '^ *+' conftest.er1 >conftest.err
12130 rm -f conftest.er1
12131 cat conftest.err >&5
12132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12133 (exit $ac_status); } &&
b4e70030
JB
12134 { ac_try='test -z "$ac_c_werror_flag"
12135 || test ! -s conftest.err'
bec39cab
AC
12136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12137 (eval $ac_try) 2>&5
12138 ac_status=$?
12139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12140 (exit $ac_status); }; } &&
12141 { ac_try='test -s conftest.$ac_objext'
12142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12143 (eval $ac_try) 2>&5
12144 ac_status=$?
12145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12146 (exit $ac_status); }; }; then
12147 ac_header_compiler=yes
12148else
12149 echo "$as_me: failed program was:" >&5
12150sed 's/^/| /' conftest.$ac_ext >&5
12151
b4e70030 12152ac_header_compiler=no
bec39cab
AC
12153fi
12154rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
12155echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12156echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
12157
12158# Is the header present?
b4e70030
JB
12159echo "$as_me:$LINENO: checking $ac_header presence" >&5
12160echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
12161cat >conftest.$ac_ext <<_ACEOF
12162/* confdefs.h. */
12163_ACEOF
12164cat confdefs.h >>conftest.$ac_ext
12165cat >>conftest.$ac_ext <<_ACEOF
12166/* end confdefs.h. */
12167#include <$ac_header>
12168_ACEOF
12169if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12170 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12171 ac_status=$?
12172 grep -v '^ *+' conftest.er1 >conftest.err
12173 rm -f conftest.er1
12174 cat conftest.err >&5
12175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12176 (exit $ac_status); } >/dev/null; then
12177 if test -s conftest.err; then
12178 ac_cpp_err=$ac_c_preproc_warn_flag
12179 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12180 else
12181 ac_cpp_err=
12182 fi
c906108c 12183else
bec39cab 12184 ac_cpp_err=yes
c906108c 12185fi
bec39cab
AC
12186if test -z "$ac_cpp_err"; then
12187 ac_header_preproc=yes
c906108c 12188else
bec39cab
AC
12189 echo "$as_me: failed program was:" >&5
12190sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 12191
bec39cab
AC
12192 ac_header_preproc=no
12193fi
12194rm -f conftest.err conftest.$ac_ext
b4e70030
JB
12195echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12196echo "${ECHO_T}$ac_header_preproc" >&6
c906108c 12197
bec39cab
AC
12198# So? What about this header?
12199case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12200 yes:no: )
12201 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12202echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12203 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12204echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12205 ac_header_preproc=yes
12206 ;;
12207 no:yes:* )
12208 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12209echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12210 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12211echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12212 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12213echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12214 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12215echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12216 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12217echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12218 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12219echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
12220 (
12221 cat <<\_ASBOX
12222## ------------------------------------------ ##
12223## Report this to the AC_PACKAGE_NAME lists. ##
12224## ------------------------------------------ ##
12225_ASBOX
12226 ) |
12227 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
12228 ;;
12229esac
b4e70030
JB
12230echo "$as_me:$LINENO: checking for $ac_header" >&5
12231echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12232if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12233 echo $ECHO_N "(cached) $ECHO_C" >&6
95ca63c4 12234else
bec39cab 12235 eval "$as_ac_Header=\$ac_header_preproc"
95ca63c4 12236fi
b4e70030
JB
12237echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12238echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 12239
95ca63c4 12240fi
bec39cab
AC
12241if test `eval echo '${'$as_ac_Header'}'` = yes; then
12242 cat >>confdefs.h <<_ACEOF
12243#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12244_ACEOF
12245
95ca63c4
CF
12246fi
12247
bec39cab 12248done
95ca63c4
CF
12249
12250
7cb9022a 12251for ac_header in link.h
bec39cab
AC
12252do
12253as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12254echo "$as_me:$LINENO: checking for $ac_header" >&5
12255echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12256if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12257 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12258else
7cb9022a 12259 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12260/* confdefs.h. */
12261_ACEOF
12262cat confdefs.h >>conftest.$ac_ext
12263cat >>conftest.$ac_ext <<_ACEOF
12264/* end confdefs.h. */
7cb9022a
MK
12265#if HAVE_SYS_TYPES_H
12266# include <sys/types.h>
12267#endif
12268#if HAVE_NLIST_H
12269# include <nlist.h>
12270#endif
12271
12272
bec39cab
AC
12273#include <$ac_header>
12274_ACEOF
12275rm -f conftest.$ac_objext
12276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12277 (eval $ac_compile) 2>conftest.er1
12278 ac_status=$?
12279 grep -v '^ *+' conftest.er1 >conftest.err
12280 rm -f conftest.er1
12281 cat conftest.err >&5
12282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12283 (exit $ac_status); } &&
b4e70030
JB
12284 { ac_try='test -z "$ac_c_werror_flag"
12285 || test ! -s conftest.err'
bec39cab
AC
12286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12287 (eval $ac_try) 2>&5
12288 ac_status=$?
12289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12290 (exit $ac_status); }; } &&
12291 { ac_try='test -s conftest.$ac_objext'
12292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12293 (eval $ac_try) 2>&5
12294 ac_status=$?
12295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12296 (exit $ac_status); }; }; then
7cb9022a 12297 eval "$as_ac_Header=yes"
bec39cab
AC
12298else
12299 echo "$as_me: failed program was:" >&5
12300sed 's/^/| /' conftest.$ac_ext >&5
12301
b4e70030 12302eval "$as_ac_Header=no"
bec39cab
AC
12303fi
12304rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12305fi
b4e70030
JB
12306echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12307echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12308if test `eval echo '${'$as_ac_Header'}'` = yes; then
12309 cat >>confdefs.h <<_ACEOF
12310#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12311_ACEOF
95ca63c4 12312
bec39cab 12313fi
95ca63c4 12314
bec39cab 12315done
95ca63c4 12316
c906108c 12317
a9322a30 12318for ac_header in sys/proc.h
bec39cab
AC
12319do
12320as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a9322a30 12321echo "$as_me:$LINENO: checking for $ac_header" >&5
b4e70030
JB
12322echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12323if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12324 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12325else
a9322a30 12326 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12327/* confdefs.h. */
12328_ACEOF
12329cat confdefs.h >>conftest.$ac_ext
12330cat >>conftest.$ac_ext <<_ACEOF
12331/* end confdefs.h. */
a9322a30
TT
12332#if HAVE_SYS_PARAM_H
12333# include <sys/param.h>
12334#endif
12335
12336
bec39cab
AC
12337#include <$ac_header>
12338_ACEOF
12339rm -f conftest.$ac_objext
12340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12341 (eval $ac_compile) 2>conftest.er1
12342 ac_status=$?
12343 grep -v '^ *+' conftest.er1 >conftest.err
12344 rm -f conftest.er1
12345 cat conftest.err >&5
12346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12347 (exit $ac_status); } &&
b4e70030
JB
12348 { ac_try='test -z "$ac_c_werror_flag"
12349 || test ! -s conftest.err'
bec39cab
AC
12350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12351 (eval $ac_try) 2>&5
12352 ac_status=$?
12353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12354 (exit $ac_status); }; } &&
12355 { ac_try='test -s conftest.$ac_objext'
12356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12357 (eval $ac_try) 2>&5
12358 ac_status=$?
12359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12360 (exit $ac_status); }; }; then
a9322a30 12361 eval "$as_ac_Header=yes"
bec39cab
AC
12362else
12363 echo "$as_me: failed program was:" >&5
12364sed 's/^/| /' conftest.$ac_ext >&5
12365
a9322a30 12366eval "$as_ac_Header=no"
bec39cab
AC
12367fi
12368rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12369fi
12370echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12371echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12372if test `eval echo '${'$as_ac_Header'}'` = yes; then
12373 cat >>confdefs.h <<_ACEOF
12374#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12375_ACEOF
bec39cab 12376
a9322a30
TT
12377fi
12378
12379done
12380
12381
12382for ac_header in sys/user.h
12383do
12384as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12385echo "$as_me:$LINENO: checking for $ac_header" >&5
12386echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12387if eval "test \"\${$as_ac_Header+set}\" = set"; then
12388 echo $ECHO_N "(cached) $ECHO_C" >&6
12389else
12390 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12391/* confdefs.h. */
12392_ACEOF
12393cat confdefs.h >>conftest.$ac_ext
12394cat >>conftest.$ac_ext <<_ACEOF
12395/* end confdefs.h. */
a9322a30
TT
12396#if HAVE_SYS_PARAM_H
12397# include <sys/param.h>
12398#endif
12399
12400
bec39cab
AC
12401#include <$ac_header>
12402_ACEOF
a9322a30
TT
12403rm -f conftest.$ac_objext
12404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12405 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
12406 ac_status=$?
12407 grep -v '^ *+' conftest.er1 >conftest.err
12408 rm -f conftest.er1
12409 cat conftest.err >&5
12410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
12411 (exit $ac_status); } &&
12412 { ac_try='test -z "$ac_c_werror_flag"
12413 || test ! -s conftest.err'
12414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12415 (eval $ac_try) 2>&5
12416 ac_status=$?
12417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12418 (exit $ac_status); }; } &&
12419 { ac_try='test -s conftest.$ac_objext'
12420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12421 (eval $ac_try) 2>&5
12422 ac_status=$?
12423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12424 (exit $ac_status); }; }; then
12425 eval "$as_ac_Header=yes"
bec39cab
AC
12426else
12427 echo "$as_me: failed program was:" >&5
12428sed 's/^/| /' conftest.$ac_ext >&5
12429
a9322a30 12430eval "$as_ac_Header=no"
75c6e08a 12431fi
a9322a30
TT
12432rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12433fi
12434echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12435echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12436if test `eval echo '${'$as_ac_Header'}'` = yes; then
12437 cat >>confdefs.h <<_ACEOF
12438#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12439_ACEOF
bec39cab 12440
bec39cab 12441fi
bec39cab 12442
a9322a30
TT
12443done
12444
12445
12446# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
12447# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
12448# think that we don't have <curses.h> if we're using GCC.
12449case $host_os in
12450 solaris2.[789])
12451 if test "$GCC" = yes; then
12452
12453cat >>confdefs.h <<\_ACEOF
12454#define _MSE_INT_H 1
bec39cab 12455_ACEOF
75c6e08a 12456
a9322a30
TT
12457 fi ;;
12458esac
12459
75c6e08a
MK
12460
12461
12462
9a156167 12463
a9322a30 12464for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
bec39cab
AC
12465do
12466as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12467if eval "test \"\${$as_ac_Header+set}\" = set"; then
12468 echo "$as_me:$LINENO: checking for $ac_header" >&5
12469echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12470if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
12471 echo $ECHO_N "(cached) $ECHO_C" >&6
12472fi
b4e70030
JB
12473echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12474echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12475else
12476 # Is the header compilable?
b4e70030
JB
12477echo "$as_me:$LINENO: checking $ac_header usability" >&5
12478echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
12479cat >conftest.$ac_ext <<_ACEOF
12480/* confdefs.h. */
12481_ACEOF
12482cat confdefs.h >>conftest.$ac_ext
12483cat >>conftest.$ac_ext <<_ACEOF
12484/* end confdefs.h. */
12485$ac_includes_default
12486#include <$ac_header>
12487_ACEOF
12488rm -f conftest.$ac_objext
12489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12490 (eval $ac_compile) 2>conftest.er1
12491 ac_status=$?
12492 grep -v '^ *+' conftest.er1 >conftest.err
12493 rm -f conftest.er1
12494 cat conftest.err >&5
12495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12496 (exit $ac_status); } &&
b4e70030
JB
12497 { ac_try='test -z "$ac_c_werror_flag"
12498 || test ! -s conftest.err'
bec39cab
AC
12499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12500 (eval $ac_try) 2>&5
12501 ac_status=$?
12502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12503 (exit $ac_status); }; } &&
12504 { ac_try='test -s conftest.$ac_objext'
12505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12506 (eval $ac_try) 2>&5
12507 ac_status=$?
12508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12509 (exit $ac_status); }; }; then
12510 ac_header_compiler=yes
12511else
12512 echo "$as_me: failed program was:" >&5
12513sed 's/^/| /' conftest.$ac_ext >&5
12514
b4e70030 12515ac_header_compiler=no
bec39cab
AC
12516fi
12517rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
12518echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12519echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
12520
12521# Is the header present?
b4e70030
JB
12522echo "$as_me:$LINENO: checking $ac_header presence" >&5
12523echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
12524cat >conftest.$ac_ext <<_ACEOF
12525/* confdefs.h. */
12526_ACEOF
12527cat confdefs.h >>conftest.$ac_ext
12528cat >>conftest.$ac_ext <<_ACEOF
12529/* end confdefs.h. */
12530#include <$ac_header>
12531_ACEOF
12532if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12533 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12534 ac_status=$?
12535 grep -v '^ *+' conftest.er1 >conftest.err
12536 rm -f conftest.er1
12537 cat conftest.err >&5
12538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12539 (exit $ac_status); } >/dev/null; then
12540 if test -s conftest.err; then
12541 ac_cpp_err=$ac_c_preproc_warn_flag
12542 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12543 else
12544 ac_cpp_err=
12545 fi
9a156167 12546else
bec39cab 12547 ac_cpp_err=yes
9a156167 12548fi
bec39cab
AC
12549if test -z "$ac_cpp_err"; then
12550 ac_header_preproc=yes
12551else
12552 echo "$as_me: failed program was:" >&5
12553sed 's/^/| /' conftest.$ac_ext >&5
9a156167 12554
bec39cab 12555 ac_header_preproc=no
9a156167 12556fi
bec39cab 12557rm -f conftest.err conftest.$ac_ext
b4e70030
JB
12558echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12559echo "${ECHO_T}$ac_header_preproc" >&6
9a156167 12560
bec39cab
AC
12561# So? What about this header?
12562case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12563 yes:no: )
12564 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12565echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12566 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12567echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12568 ac_header_preproc=yes
12569 ;;
12570 no:yes:* )
12571 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12572echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12573 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12574echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12575 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12576echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12577 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12578echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12579 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12580echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12581 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12582echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
12583 (
12584 cat <<\_ASBOX
12585## ------------------------------------------ ##
12586## Report this to the AC_PACKAGE_NAME lists. ##
12587## ------------------------------------------ ##
12588_ASBOX
12589 ) |
12590 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
12591 ;;
12592esac
b4e70030
JB
12593echo "$as_me:$LINENO: checking for $ac_header" >&5
12594echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12595if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12596 echo $ECHO_N "(cached) $ECHO_C" >&6
9a156167 12597else
bec39cab 12598 eval "$as_ac_Header=\$ac_header_preproc"
9a156167 12599fi
b4e70030
JB
12600echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12601echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9a156167 12602
bec39cab
AC
12603fi
12604if test `eval echo '${'$as_ac_Header'}'` = yes; then
12605 cat >>confdefs.h <<_ACEOF
12606#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12607_ACEOF
9a156167 12608
bec39cab 12609fi
9a156167 12610
bec39cab 12611done
9a156167 12612
9a156167 12613
a9322a30 12614for ac_header in term.h
bec39cab
AC
12615do
12616as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a9322a30 12617echo "$as_me:$LINENO: checking for $ac_header" >&5
b4e70030
JB
12618echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12619if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12620 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12621else
a9322a30 12622 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12623/* confdefs.h. */
12624_ACEOF
12625cat confdefs.h >>conftest.$ac_ext
12626cat >>conftest.$ac_ext <<_ACEOF
436868fb 12627/* end confdefs.h. */
a9322a30
TT
12628#if HAVE_CURSES_H
12629# include <curses.h>
12630#endif
12631
12632
436868fb
DP
12633#include <$ac_header>
12634_ACEOF
12635rm -f conftest.$ac_objext
12636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12637 (eval $ac_compile) 2>conftest.er1
12638 ac_status=$?
12639 grep -v '^ *+' conftest.er1 >conftest.err
12640 rm -f conftest.er1
12641 cat conftest.err >&5
12642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12643 (exit $ac_status); } &&
12644 { ac_try='test -z "$ac_c_werror_flag"
12645 || test ! -s conftest.err'
12646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12647 (eval $ac_try) 2>&5
12648 ac_status=$?
12649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12650 (exit $ac_status); }; } &&
12651 { ac_try='test -s conftest.$ac_objext'
12652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12653 (eval $ac_try) 2>&5
12654 ac_status=$?
12655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12656 (exit $ac_status); }; }; then
a9322a30 12657 eval "$as_ac_Header=yes"
436868fb
DP
12658else
12659 echo "$as_me: failed program was:" >&5
12660sed 's/^/| /' conftest.$ac_ext >&5
12661
a9322a30 12662eval "$as_ac_Header=no"
436868fb
DP
12663fi
12664rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12665fi
12666echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12667echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12668if test `eval echo '${'$as_ac_Header'}'` = yes; then
12669 cat >>confdefs.h <<_ACEOF
12670#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12671_ACEOF
436868fb 12672
a9322a30
TT
12673fi
12674
12675done
12676
12677
12678# ------------------------- #
12679# Checks for declarations. #
12680# ------------------------- #
12681
12682echo "$as_me:$LINENO: checking whether free is declared" >&5
12683echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
12684if test "${ac_cv_have_decl_free+set}" = set; then
12685 echo $ECHO_N "(cached) $ECHO_C" >&6
12686else
12687 cat >conftest.$ac_ext <<_ACEOF
436868fb
DP
12688/* confdefs.h. */
12689_ACEOF
12690cat confdefs.h >>conftest.$ac_ext
12691cat >>conftest.$ac_ext <<_ACEOF
12692/* end confdefs.h. */
a9322a30
TT
12693$ac_includes_default
12694int
12695main ()
12696{
12697#ifndef free
12698 char *p = (char *) free;
12699#endif
12700
12701 ;
12702 return 0;
12703}
436868fb 12704_ACEOF
a9322a30
TT
12705rm -f conftest.$ac_objext
12706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12707 (eval $ac_compile) 2>conftest.er1
436868fb
DP
12708 ac_status=$?
12709 grep -v '^ *+' conftest.er1 >conftest.err
12710 rm -f conftest.er1
12711 cat conftest.err >&5
12712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
12713 (exit $ac_status); } &&
12714 { ac_try='test -z "$ac_c_werror_flag"
12715 || test ! -s conftest.err'
12716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12717 (eval $ac_try) 2>&5
12718 ac_status=$?
12719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12720 (exit $ac_status); }; } &&
12721 { ac_try='test -s conftest.$ac_objext'
12722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12723 (eval $ac_try) 2>&5
12724 ac_status=$?
12725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12726 (exit $ac_status); }; }; then
12727 ac_cv_have_decl_free=yes
436868fb
DP
12728else
12729 echo "$as_me: failed program was:" >&5
12730sed 's/^/| /' conftest.$ac_ext >&5
12731
a9322a30 12732ac_cv_have_decl_free=no
436868fb 12733fi
a9322a30 12734rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
436868fb 12735fi
a9322a30
TT
12736echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
12737echo "${ECHO_T}$ac_cv_have_decl_free" >&6
12738if test $ac_cv_have_decl_free = yes; then
436868fb 12739
a9322a30
TT
12740cat >>confdefs.h <<_ACEOF
12741#define HAVE_DECL_FREE 1
436868fb
DP
12742_ACEOF
12743
436868fb 12744
a9322a30
TT
12745else
12746 cat >>confdefs.h <<_ACEOF
12747#define HAVE_DECL_FREE 0
12748_ACEOF
436868fb
DP
12749
12750
436868fb 12751fi
a9322a30
TT
12752echo "$as_me:$LINENO: checking whether malloc is declared" >&5
12753echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
12754if test "${ac_cv_have_decl_malloc+set}" = set; then
12755 echo $ECHO_N "(cached) $ECHO_C" >&6
436868fb 12756else
a9322a30 12757 cat >conftest.$ac_ext <<_ACEOF
436868fb
DP
12758/* confdefs.h. */
12759_ACEOF
12760cat confdefs.h >>conftest.$ac_ext
12761cat >>conftest.$ac_ext <<_ACEOF
bec39cab
AC
12762/* end confdefs.h. */
12763$ac_includes_default
a9322a30
TT
12764int
12765main ()
12766{
12767#ifndef malloc
12768 char *p = (char *) malloc;
12769#endif
12770
12771 ;
12772 return 0;
12773}
bec39cab
AC
12774_ACEOF
12775rm -f conftest.$ac_objext
12776if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12777 (eval $ac_compile) 2>conftest.er1
12778 ac_status=$?
12779 grep -v '^ *+' conftest.er1 >conftest.err
12780 rm -f conftest.er1
12781 cat conftest.err >&5
12782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12783 (exit $ac_status); } &&
b4e70030
JB
12784 { ac_try='test -z "$ac_c_werror_flag"
12785 || test ! -s conftest.err'
bec39cab
AC
12786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12787 (eval $ac_try) 2>&5
12788 ac_status=$?
12789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12790 (exit $ac_status); }; } &&
12791 { ac_try='test -s conftest.$ac_objext'
12792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12793 (eval $ac_try) 2>&5
12794 ac_status=$?
12795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12796 (exit $ac_status); }; }; then
a9322a30 12797 ac_cv_have_decl_malloc=yes
bec39cab
AC
12798else
12799 echo "$as_me: failed program was:" >&5
12800sed 's/^/| /' conftest.$ac_ext >&5
12801
a9322a30 12802ac_cv_have_decl_malloc=no
bec39cab
AC
12803fi
12804rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12805fi
12806echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
12807echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
12808if test $ac_cv_have_decl_malloc = yes; then
bec39cab 12809
a9322a30
TT
12810cat >>confdefs.h <<_ACEOF
12811#define HAVE_DECL_MALLOC 1
bec39cab 12812_ACEOF
9a156167 12813
9a156167
MK
12814
12815else
bec39cab 12816 cat >>confdefs.h <<_ACEOF
a9322a30 12817#define HAVE_DECL_MALLOC 0
bec39cab 12818_ACEOF
9a156167 12819
c890192f 12820
bec39cab 12821fi
a9322a30
TT
12822echo "$as_me:$LINENO: checking whether realloc is declared" >&5
12823echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
12824if test "${ac_cv_have_decl_realloc+set}" = set; then
12825 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12826else
a9322a30 12827 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12828/* confdefs.h. */
12829_ACEOF
12830cat confdefs.h >>conftest.$ac_ext
12831cat >>conftest.$ac_ext <<_ACEOF
12832/* end confdefs.h. */
12833$ac_includes_default
a9322a30
TT
12834int
12835main ()
12836{
12837#ifndef realloc
12838 char *p = (char *) realloc;
12839#endif
12840
12841 ;
12842 return 0;
12843}
bec39cab
AC
12844_ACEOF
12845rm -f conftest.$ac_objext
12846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12847 (eval $ac_compile) 2>conftest.er1
12848 ac_status=$?
12849 grep -v '^ *+' conftest.er1 >conftest.err
12850 rm -f conftest.er1
12851 cat conftest.err >&5
12852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12853 (exit $ac_status); } &&
b4e70030
JB
12854 { ac_try='test -z "$ac_c_werror_flag"
12855 || test ! -s conftest.err'
bec39cab
AC
12856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12857 (eval $ac_try) 2>&5
12858 ac_status=$?
12859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12860 (exit $ac_status); }; } &&
12861 { ac_try='test -s conftest.$ac_objext'
12862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12863 (eval $ac_try) 2>&5
12864 ac_status=$?
12865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12866 (exit $ac_status); }; }; then
a9322a30 12867 ac_cv_have_decl_realloc=yes
bec39cab
AC
12868else
12869 echo "$as_me: failed program was:" >&5
12870sed 's/^/| /' conftest.$ac_ext >&5
12871
a9322a30 12872ac_cv_have_decl_realloc=no
bec39cab
AC
12873fi
12874rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12875fi
12876echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
12877echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
12878if test $ac_cv_have_decl_realloc = yes; then
bec39cab 12879
a9322a30
TT
12880cat >>confdefs.h <<_ACEOF
12881#define HAVE_DECL_REALLOC 1
bec39cab 12882_ACEOF
bec39cab 12883
bec39cab 12884
c890192f 12885else
bec39cab 12886 cat >>confdefs.h <<_ACEOF
a9322a30 12887#define HAVE_DECL_REALLOC 0
bec39cab 12888_ACEOF
c890192f 12889
bec39cab 12890
bec39cab 12891fi
a9322a30
TT
12892echo "$as_me:$LINENO: checking whether strerror is declared" >&5
12893echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
12894if test "${ac_cv_have_decl_strerror+set}" = set; then
12895 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12896else
a9322a30 12897 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12898/* confdefs.h. */
12899_ACEOF
12900cat confdefs.h >>conftest.$ac_ext
12901cat >>conftest.$ac_ext <<_ACEOF
12902/* end confdefs.h. */
12903$ac_includes_default
a9322a30
TT
12904int
12905main ()
12906{
12907#ifndef strerror
12908 char *p = (char *) strerror;
12909#endif
12910
12911 ;
12912 return 0;
12913}
bec39cab
AC
12914_ACEOF
12915rm -f conftest.$ac_objext
12916if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12917 (eval $ac_compile) 2>conftest.er1
12918 ac_status=$?
12919 grep -v '^ *+' conftest.er1 >conftest.err
12920 rm -f conftest.er1
12921 cat conftest.err >&5
12922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12923 (exit $ac_status); } &&
b4e70030
JB
12924 { ac_try='test -z "$ac_c_werror_flag"
12925 || test ! -s conftest.err'
bec39cab
AC
12926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12927 (eval $ac_try) 2>&5
12928 ac_status=$?
12929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12930 (exit $ac_status); }; } &&
12931 { ac_try='test -s conftest.$ac_objext'
12932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12933 (eval $ac_try) 2>&5
12934 ac_status=$?
12935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12936 (exit $ac_status); }; }; then
a9322a30 12937 ac_cv_have_decl_strerror=yes
bec39cab
AC
12938else
12939 echo "$as_me: failed program was:" >&5
12940sed 's/^/| /' conftest.$ac_ext >&5
12941
a9322a30 12942ac_cv_have_decl_strerror=no
bec39cab
AC
12943fi
12944rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12945fi
12946echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
12947echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
12948if test $ac_cv_have_decl_strerror = yes; then
bec39cab 12949
a9322a30
TT
12950cat >>confdefs.h <<_ACEOF
12951#define HAVE_DECL_STRERROR 1
bec39cab 12952_ACEOF
bec39cab 12953
bec39cab 12954
9a156167 12955else
bec39cab 12956 cat >>confdefs.h <<_ACEOF
a9322a30 12957#define HAVE_DECL_STRERROR 0
bec39cab 12958_ACEOF
9a156167 12959
06825bd1 12960
bec39cab 12961fi
a9322a30
TT
12962echo "$as_me:$LINENO: checking whether strstr is declared" >&5
12963echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
12964if test "${ac_cv_have_decl_strstr+set}" = set; then
12965 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12966else
a9322a30 12967 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12968/* confdefs.h. */
12969_ACEOF
12970cat confdefs.h >>conftest.$ac_ext
12971cat >>conftest.$ac_ext <<_ACEOF
12972/* end confdefs.h. */
12973$ac_includes_default
a9322a30
TT
12974int
12975main ()
12976{
12977#ifndef strstr
12978 char *p = (char *) strstr;
12979#endif
12980
12981 ;
12982 return 0;
12983}
bec39cab
AC
12984_ACEOF
12985rm -f conftest.$ac_objext
12986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12987 (eval $ac_compile) 2>conftest.er1
12988 ac_status=$?
12989 grep -v '^ *+' conftest.er1 >conftest.err
12990 rm -f conftest.er1
12991 cat conftest.err >&5
12992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12993 (exit $ac_status); } &&
b4e70030
JB
12994 { ac_try='test -z "$ac_c_werror_flag"
12995 || test ! -s conftest.err'
bec39cab
AC
12996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12997 (eval $ac_try) 2>&5
12998 ac_status=$?
12999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13000 (exit $ac_status); }; } &&
13001 { ac_try='test -s conftest.$ac_objext'
13002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13003 (eval $ac_try) 2>&5
13004 ac_status=$?
13005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13006 (exit $ac_status); }; }; then
a9322a30 13007 ac_cv_have_decl_strstr=yes
bec39cab
AC
13008else
13009 echo "$as_me: failed program was:" >&5
13010sed 's/^/| /' conftest.$ac_ext >&5
13011
a9322a30 13012ac_cv_have_decl_strstr=no
bec39cab
AC
13013fi
13014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13015fi
13016echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
13017echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
13018if test $ac_cv_have_decl_strstr = yes; then
bec39cab 13019
a9322a30
TT
13020cat >>confdefs.h <<_ACEOF
13021#define HAVE_DECL_STRSTR 1
bec39cab 13022_ACEOF
bec39cab 13023
bec39cab 13024
bec39cab 13025else
bec39cab 13026 cat >>confdefs.h <<_ACEOF
a9322a30 13027#define HAVE_DECL_STRSTR 0
bec39cab 13028_ACEOF
06825bd1 13029
bec39cab 13030
bec39cab 13031fi
a9322a30
TT
13032echo "$as_me:$LINENO: checking whether getopt is declared" >&5
13033echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
13034if test "${ac_cv_have_decl_getopt+set}" = set; then
13035 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13036else
a9322a30 13037 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13038/* confdefs.h. */
13039_ACEOF
13040cat confdefs.h >>conftest.$ac_ext
13041cat >>conftest.$ac_ext <<_ACEOF
13042/* end confdefs.h. */
13043$ac_includes_default
a9322a30
TT
13044int
13045main ()
13046{
13047#ifndef getopt
13048 char *p = (char *) getopt;
13049#endif
13050
13051 ;
13052 return 0;
13053}
bec39cab
AC
13054_ACEOF
13055rm -f conftest.$ac_objext
13056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13057 (eval $ac_compile) 2>conftest.er1
13058 ac_status=$?
13059 grep -v '^ *+' conftest.er1 >conftest.err
13060 rm -f conftest.er1
13061 cat conftest.err >&5
13062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13063 (exit $ac_status); } &&
b4e70030
JB
13064 { ac_try='test -z "$ac_c_werror_flag"
13065 || test ! -s conftest.err'
bec39cab
AC
13066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13067 (eval $ac_try) 2>&5
13068 ac_status=$?
13069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13070 (exit $ac_status); }; } &&
13071 { ac_try='test -s conftest.$ac_objext'
13072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13073 (eval $ac_try) 2>&5
13074 ac_status=$?
13075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13076 (exit $ac_status); }; }; then
a9322a30 13077 ac_cv_have_decl_getopt=yes
bec39cab
AC
13078else
13079 echo "$as_me: failed program was:" >&5
13080sed 's/^/| /' conftest.$ac_ext >&5
13081
a9322a30 13082ac_cv_have_decl_getopt=no
bec39cab
AC
13083fi
13084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13085fi
13086echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
13087echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
13088if test $ac_cv_have_decl_getopt = yes; then
bec39cab 13089
a9322a30
TT
13090cat >>confdefs.h <<_ACEOF
13091#define HAVE_DECL_GETOPT 1
bec39cab 13092_ACEOF
5ee754fc 13093
bec39cab 13094
5ee754fc 13095else
bec39cab 13096 cat >>confdefs.h <<_ACEOF
a9322a30 13097#define HAVE_DECL_GETOPT 0
bec39cab 13098_ACEOF
c906108c 13099
bec39cab 13100
bec39cab 13101fi
a9322a30
TT
13102echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
13103echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
13104if test "${ac_cv_have_decl_snprintf+set}" = set; then
13105 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13106else
a9322a30 13107 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13108/* confdefs.h. */
13109_ACEOF
13110cat confdefs.h >>conftest.$ac_ext
13111cat >>conftest.$ac_ext <<_ACEOF
13112/* end confdefs.h. */
13113$ac_includes_default
a9322a30
TT
13114int
13115main ()
13116{
13117#ifndef snprintf
13118 char *p = (char *) snprintf;
13119#endif
13120
13121 ;
13122 return 0;
13123}
bec39cab
AC
13124_ACEOF
13125rm -f conftest.$ac_objext
13126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13127 (eval $ac_compile) 2>conftest.er1
13128 ac_status=$?
13129 grep -v '^ *+' conftest.er1 >conftest.err
13130 rm -f conftest.er1
13131 cat conftest.err >&5
13132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13133 (exit $ac_status); } &&
b4e70030
JB
13134 { ac_try='test -z "$ac_c_werror_flag"
13135 || test ! -s conftest.err'
bec39cab
AC
13136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13137 (eval $ac_try) 2>&5
13138 ac_status=$?
13139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13140 (exit $ac_status); }; } &&
13141 { ac_try='test -s conftest.$ac_objext'
13142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13143 (eval $ac_try) 2>&5
13144 ac_status=$?
13145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13146 (exit $ac_status); }; }; then
a9322a30 13147 ac_cv_have_decl_snprintf=yes
bec39cab
AC
13148else
13149 echo "$as_me: failed program was:" >&5
13150sed 's/^/| /' conftest.$ac_ext >&5
13151
a9322a30 13152ac_cv_have_decl_snprintf=no
bec39cab
AC
13153fi
13154rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13155fi
13156echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
13157echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
13158if test $ac_cv_have_decl_snprintf = yes; then
bec39cab 13159
a9322a30
TT
13160cat >>confdefs.h <<_ACEOF
13161#define HAVE_DECL_SNPRINTF 1
bec39cab 13162_ACEOF
c906108c
SS
13163
13164
9608ab8b 13165else
bec39cab 13166 cat >>confdefs.h <<_ACEOF
a9322a30 13167#define HAVE_DECL_SNPRINTF 0
bec39cab 13168_ACEOF
5ee754fc 13169
5ee754fc 13170
bec39cab 13171fi
a9322a30
TT
13172echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
13173echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
13174if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
13175 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13176else
a9322a30 13177 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13178/* confdefs.h. */
13179_ACEOF
13180cat confdefs.h >>conftest.$ac_ext
13181cat >>conftest.$ac_ext <<_ACEOF
13182/* end confdefs.h. */
13183$ac_includes_default
a9322a30
TT
13184int
13185main ()
13186{
13187#ifndef vsnprintf
13188 char *p = (char *) vsnprintf;
13189#endif
13190
13191 ;
13192 return 0;
13193}
bec39cab
AC
13194_ACEOF
13195rm -f conftest.$ac_objext
13196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13197 (eval $ac_compile) 2>conftest.er1
13198 ac_status=$?
13199 grep -v '^ *+' conftest.er1 >conftest.err
13200 rm -f conftest.er1
13201 cat conftest.err >&5
13202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13203 (exit $ac_status); } &&
b4e70030
JB
13204 { ac_try='test -z "$ac_c_werror_flag"
13205 || test ! -s conftest.err'
bec39cab
AC
13206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13207 (eval $ac_try) 2>&5
13208 ac_status=$?
13209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13210 (exit $ac_status); }; } &&
13211 { ac_try='test -s conftest.$ac_objext'
13212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13213 (eval $ac_try) 2>&5
13214 ac_status=$?
13215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13216 (exit $ac_status); }; }; then
a9322a30 13217 ac_cv_have_decl_vsnprintf=yes
bec39cab
AC
13218else
13219 echo "$as_me: failed program was:" >&5
13220sed 's/^/| /' conftest.$ac_ext >&5
13221
a9322a30 13222ac_cv_have_decl_vsnprintf=no
bec39cab
AC
13223fi
13224rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13225fi
13226echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
13227echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
13228if test $ac_cv_have_decl_vsnprintf = yes; then
bec39cab 13229
a9322a30
TT
13230cat >>confdefs.h <<_ACEOF
13231#define HAVE_DECL_VSNPRINTF 1
bec39cab 13232_ACEOF
5ee754fc 13233
5ee754fc 13234
5ee754fc 13235else
bec39cab 13236 cat >>confdefs.h <<_ACEOF
a9322a30 13237#define HAVE_DECL_VSNPRINTF 0
bec39cab 13238_ACEOF
5ee754fc 13239
a9322a30 13240
5ee754fc
MK
13241fi
13242
bec39cab
AC
13243
13244
a8111142
TT
13245 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
13246echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
13247if test "${am_cv_val_LC_MESSAGES+set}" = set; then
13248 echo $ECHO_N "(cached) $ECHO_C" >&6
13249else
13250 cat >conftest.$ac_ext <<_ACEOF
13251/* confdefs.h. */
13252_ACEOF
13253cat confdefs.h >>conftest.$ac_ext
13254cat >>conftest.$ac_ext <<_ACEOF
13255/* end confdefs.h. */
13256#include <locale.h>
13257int
13258main ()
13259{
13260return LC_MESSAGES
13261 ;
13262 return 0;
13263}
13264_ACEOF
13265rm -f conftest.$ac_objext conftest$ac_exeext
13266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13267 (eval $ac_link) 2>conftest.er1
13268 ac_status=$?
13269 grep -v '^ *+' conftest.er1 >conftest.err
13270 rm -f conftest.er1
13271 cat conftest.err >&5
13272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13273 (exit $ac_status); } &&
13274 { ac_try='test -z "$ac_c_werror_flag"
13275 || test ! -s conftest.err'
13276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13277 (eval $ac_try) 2>&5
13278 ac_status=$?
13279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13280 (exit $ac_status); }; } &&
13281 { ac_try='test -s conftest$ac_exeext'
13282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13283 (eval $ac_try) 2>&5
13284 ac_status=$?
13285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13286 (exit $ac_status); }; }; then
13287 am_cv_val_LC_MESSAGES=yes
13288else
13289 echo "$as_me: failed program was:" >&5
13290sed 's/^/| /' conftest.$ac_ext >&5
13291
13292am_cv_val_LC_MESSAGES=no
13293fi
13294rm -f conftest.err conftest.$ac_objext \
13295 conftest$ac_exeext conftest.$ac_ext
13296fi
13297echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
13298echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
13299 if test $am_cv_val_LC_MESSAGES = yes; then
13300
13301cat >>confdefs.h <<\_ACEOF
13302#define HAVE_LC_MESSAGES 1
13303_ACEOF
13304
13305 fi
13306
13307
a9322a30
TT
13308# ----------------------- #
13309# Checks for structures. #
13310# ----------------------- #
13311
13312echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13313echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13314if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
bec39cab 13315 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13316else
a9322a30 13317 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13318/* confdefs.h. */
13319_ACEOF
13320cat confdefs.h >>conftest.$ac_ext
13321cat >>conftest.$ac_ext <<_ACEOF
13322/* end confdefs.h. */
13323$ac_includes_default
a9322a30
TT
13324int
13325main ()
13326{
13327static struct stat ac_aggr;
13328if (ac_aggr.st_blocks)
13329return 0;
13330 ;
13331 return 0;
13332}
bec39cab
AC
13333_ACEOF
13334rm -f conftest.$ac_objext
13335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13336 (eval $ac_compile) 2>conftest.er1
13337 ac_status=$?
13338 grep -v '^ *+' conftest.er1 >conftest.err
13339 rm -f conftest.er1
13340 cat conftest.err >&5
13341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13342 (exit $ac_status); } &&
b4e70030
JB
13343 { ac_try='test -z "$ac_c_werror_flag"
13344 || test ! -s conftest.err'
bec39cab
AC
13345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13346 (eval $ac_try) 2>&5
13347 ac_status=$?
13348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13349 (exit $ac_status); }; } &&
13350 { ac_try='test -s conftest.$ac_objext'
13351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13352 (eval $ac_try) 2>&5
13353 ac_status=$?
13354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13355 (exit $ac_status); }; }; then
a9322a30 13356 ac_cv_member_struct_stat_st_blocks=yes
bec39cab
AC
13357else
13358 echo "$as_me: failed program was:" >&5
13359sed 's/^/| /' conftest.$ac_ext >&5
13360
bec39cab
AC
13361cat >conftest.$ac_ext <<_ACEOF
13362/* confdefs.h. */
13363_ACEOF
13364cat confdefs.h >>conftest.$ac_ext
13365cat >>conftest.$ac_ext <<_ACEOF
13366/* end confdefs.h. */
a9322a30
TT
13367$ac_includes_default
13368int
13369main ()
13370{
13371static struct stat ac_aggr;
13372if (sizeof ac_aggr.st_blocks)
13373return 0;
13374 ;
13375 return 0;
13376}
bec39cab 13377_ACEOF
a9322a30
TT
13378rm -f conftest.$ac_objext
13379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13380 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
13381 ac_status=$?
13382 grep -v '^ *+' conftest.er1 >conftest.err
13383 rm -f conftest.er1
13384 cat conftest.err >&5
13385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13386 (exit $ac_status); } &&
13387 { ac_try='test -z "$ac_c_werror_flag"
13388 || test ! -s conftest.err'
13389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13390 (eval $ac_try) 2>&5
13391 ac_status=$?
13392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13393 (exit $ac_status); }; } &&
13394 { ac_try='test -s conftest.$ac_objext'
13395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13396 (eval $ac_try) 2>&5
13397 ac_status=$?
13398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399 (exit $ac_status); }; }; then
13400 ac_cv_member_struct_stat_st_blocks=yes
bec39cab
AC
13401else
13402 echo "$as_me: failed program was:" >&5
13403sed 's/^/| /' conftest.$ac_ext >&5
5ee754fc 13404
a9322a30 13405ac_cv_member_struct_stat_st_blocks=no
5ee754fc 13406fi
a9322a30 13407rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13408fi
a9322a30 13409rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13410fi
a9322a30
TT
13411echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13412echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13413if test $ac_cv_member_struct_stat_st_blocks = yes; then
5ee754fc 13414
a9322a30
TT
13415cat >>confdefs.h <<_ACEOF
13416#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13417_ACEOF
5ee754fc 13418
5ee754fc 13419
bec39cab 13420fi
a9322a30
TT
13421echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13422echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13423if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13424 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13425else
a9322a30 13426 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13427/* confdefs.h. */
13428_ACEOF
13429cat confdefs.h >>conftest.$ac_ext
13430cat >>conftest.$ac_ext <<_ACEOF
13431/* end confdefs.h. */
13432$ac_includes_default
a9322a30
TT
13433int
13434main ()
13435{
13436static struct stat ac_aggr;
13437if (ac_aggr.st_blksize)
13438return 0;
13439 ;
13440 return 0;
13441}
bec39cab
AC
13442_ACEOF
13443rm -f conftest.$ac_objext
13444if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13445 (eval $ac_compile) 2>conftest.er1
13446 ac_status=$?
13447 grep -v '^ *+' conftest.er1 >conftest.err
13448 rm -f conftest.er1
13449 cat conftest.err >&5
13450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13451 (exit $ac_status); } &&
b4e70030
JB
13452 { ac_try='test -z "$ac_c_werror_flag"
13453 || test ! -s conftest.err'
bec39cab
AC
13454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13455 (eval $ac_try) 2>&5
13456 ac_status=$?
13457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13458 (exit $ac_status); }; } &&
13459 { ac_try='test -s conftest.$ac_objext'
13460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13461 (eval $ac_try) 2>&5
13462 ac_status=$?
13463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13464 (exit $ac_status); }; }; then
a9322a30 13465 ac_cv_member_struct_stat_st_blksize=yes
bec39cab
AC
13466else
13467 echo "$as_me: failed program was:" >&5
13468sed 's/^/| /' conftest.$ac_ext >&5
13469
7eb368b3
NR
13470cat >conftest.$ac_ext <<_ACEOF
13471/* confdefs.h. */
13472_ACEOF
13473cat confdefs.h >>conftest.$ac_ext
13474cat >>conftest.$ac_ext <<_ACEOF
13475/* end confdefs.h. */
13476$ac_includes_default
a9322a30
TT
13477int
13478main ()
13479{
13480static struct stat ac_aggr;
13481if (sizeof ac_aggr.st_blksize)
13482return 0;
13483 ;
13484 return 0;
13485}
7eb368b3
NR
13486_ACEOF
13487rm -f conftest.$ac_objext
13488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13489 (eval $ac_compile) 2>conftest.er1
13490 ac_status=$?
13491 grep -v '^ *+' conftest.er1 >conftest.err
13492 rm -f conftest.er1
13493 cat conftest.err >&5
13494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13495 (exit $ac_status); } &&
13496 { ac_try='test -z "$ac_c_werror_flag"
13497 || test ! -s conftest.err'
13498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13499 (eval $ac_try) 2>&5
13500 ac_status=$?
13501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13502 (exit $ac_status); }; } &&
13503 { ac_try='test -s conftest.$ac_objext'
13504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13505 (eval $ac_try) 2>&5
13506 ac_status=$?
13507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13508 (exit $ac_status); }; }; then
a9322a30 13509 ac_cv_member_struct_stat_st_blksize=yes
7eb368b3
NR
13510else
13511 echo "$as_me: failed program was:" >&5
13512sed 's/^/| /' conftest.$ac_ext >&5
13513
a9322a30 13514ac_cv_member_struct_stat_st_blksize=no
7eb368b3
NR
13515fi
13516rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7eb368b3 13517fi
a9322a30 13518rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7eb368b3 13519fi
a9322a30
TT
13520echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13521echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13522if test $ac_cv_member_struct_stat_st_blksize = yes; then
7eb368b3 13523
a9322a30
TT
13524cat >>confdefs.h <<_ACEOF
13525#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
13526_ACEOF
13527
a9322a30 13528
7eb368b3
NR
13529fi
13530
7eb368b3 13531
a9322a30
TT
13532# ------------------ #
13533# Checks for types. #
13534# ------------------ #
7eb368b3 13535
a9322a30
TT
13536echo "$as_me:$LINENO: checking return type of signal handlers" >&5
13537echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13538if test "${ac_cv_type_signal+set}" = set; then
bec39cab 13539 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13540else
7cb9022a 13541 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13542/* confdefs.h. */
13543_ACEOF
13544cat confdefs.h >>conftest.$ac_ext
13545cat >>conftest.$ac_ext <<_ACEOF
13546/* end confdefs.h. */
a9322a30
TT
13547#include <sys/types.h>
13548#include <signal.h>
13549#ifdef signal
13550# undef signal
13551#endif
13552#ifdef __cplusplus
13553extern "C" void (*signal (int, void (*)(int)))(int);
13554#else
13555void (*signal ()) ();
7cb9022a
MK
13556#endif
13557
a9322a30
TT
13558int
13559main ()
13560{
13561int i;
13562 ;
13563 return 0;
13564}
bec39cab
AC
13565_ACEOF
13566rm -f conftest.$ac_objext
13567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13568 (eval $ac_compile) 2>conftest.er1
13569 ac_status=$?
13570 grep -v '^ *+' conftest.er1 >conftest.err
13571 rm -f conftest.er1
13572 cat conftest.err >&5
13573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13574 (exit $ac_status); } &&
b4e70030
JB
13575 { ac_try='test -z "$ac_c_werror_flag"
13576 || test ! -s conftest.err'
bec39cab
AC
13577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13578 (eval $ac_try) 2>&5
13579 ac_status=$?
13580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13581 (exit $ac_status); }; } &&
13582 { ac_try='test -s conftest.$ac_objext'
13583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13584 (eval $ac_try) 2>&5
13585 ac_status=$?
13586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13587 (exit $ac_status); }; }; then
a9322a30 13588 ac_cv_type_signal=void
bec39cab
AC
13589else
13590 echo "$as_me: failed program was:" >&5
13591sed 's/^/| /' conftest.$ac_ext >&5
13592
a9322a30 13593ac_cv_type_signal=int
bec39cab
AC
13594fi
13595rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13596fi
a9322a30
TT
13597echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
13598echo "${ECHO_T}$ac_cv_type_signal" >&6
bec39cab 13599
a9322a30
TT
13600cat >>confdefs.h <<_ACEOF
13601#define RETSIGTYPE $ac_cv_type_signal
13602_ACEOF
5ee754fc 13603
bec39cab 13604
a9322a30
TT
13605echo "$as_me:$LINENO: checking for socklen_t" >&5
13606echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
13607if test "${ac_cv_type_socklen_t+set}" = set; then
bec39cab 13608 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13609else
a9322a30 13610 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13611/* confdefs.h. */
13612_ACEOF
13613cat confdefs.h >>conftest.$ac_ext
13614cat >>conftest.$ac_ext <<_ACEOF
13615/* end confdefs.h. */
a9322a30
TT
13616#include <sys/types.h>
13617#include <sys/socket.h>
13618
13619
13620int
13621main ()
13622{
13623if ((socklen_t *) 0)
13624 return 0;
13625if (sizeof (socklen_t))
13626 return 0;
13627 ;
13628 return 0;
13629}
bec39cab
AC
13630_ACEOF
13631rm -f conftest.$ac_objext
13632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13633 (eval $ac_compile) 2>conftest.er1
13634 ac_status=$?
13635 grep -v '^ *+' conftest.er1 >conftest.err
13636 rm -f conftest.er1
13637 cat conftest.err >&5
13638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13639 (exit $ac_status); } &&
b4e70030
JB
13640 { ac_try='test -z "$ac_c_werror_flag"
13641 || test ! -s conftest.err'
bec39cab
AC
13642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13643 (eval $ac_try) 2>&5
13644 ac_status=$?
13645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13646 (exit $ac_status); }; } &&
13647 { ac_try='test -s conftest.$ac_objext'
13648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13649 (eval $ac_try) 2>&5
13650 ac_status=$?
13651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13652 (exit $ac_status); }; }; then
a9322a30 13653 ac_cv_type_socklen_t=yes
bec39cab
AC
13654else
13655 echo "$as_me: failed program was:" >&5
13656sed 's/^/| /' conftest.$ac_ext >&5
13657
a9322a30 13658ac_cv_type_socklen_t=no
bec39cab
AC
13659fi
13660rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13661fi
13662echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
13663echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
13664if test $ac_cv_type_socklen_t = yes; then
bec39cab 13665
a9322a30
TT
13666cat >>confdefs.h <<_ACEOF
13667#define HAVE_SOCKLEN_T 1
13668_ACEOF
13669
13670
13671fi
13672
13673
13674# ------------------------------------- #
13675# Checks for compiler characteristics. #
13676# ------------------------------------- #
13677
13678echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13679echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13680if test "${ac_cv_c_const+set}" = set; then
13681 echo $ECHO_N "(cached) $ECHO_C" >&6
13682else
13683 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13684/* confdefs.h. */
13685_ACEOF
13686cat confdefs.h >>conftest.$ac_ext
13687cat >>conftest.$ac_ext <<_ACEOF
13688/* end confdefs.h. */
a9322a30
TT
13689
13690int
13691main ()
13692{
13693/* FIXME: Include the comments suggested by Paul. */
13694#ifndef __cplusplus
13695 /* Ultrix mips cc rejects this. */
13696 typedef int charset[2];
13697 const charset x;
13698 /* SunOS 4.1.1 cc rejects this. */
13699 char const *const *ccp;
13700 char **p;
13701 /* NEC SVR4.0.2 mips cc rejects this. */
13702 struct point {int x, y;};
13703 static struct point const zero = {0,0};
13704 /* AIX XL C 1.02.0.0 rejects this.
13705 It does not let you subtract one const X* pointer from another in
13706 an arm of an if-expression whose if-part is not a constant
13707 expression */
13708 const char *g = "string";
13709 ccp = &g + (g ? g-g : 0);
13710 /* HPUX 7.0 cc rejects these. */
13711 ++ccp;
13712 p = (char**) ccp;
13713 ccp = (char const *const *) p;
13714 { /* SCO 3.2v4 cc rejects this. */
13715 char *t;
13716 char const *s = 0 ? (char *) 0 : (char const *) 0;
13717
13718 *t++ = 0;
13719 }
13720 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13721 int x[] = {25, 17};
13722 const int *foo = &x[0];
13723 ++foo;
13724 }
13725 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13726 typedef const int *iptr;
13727 iptr p = 0;
13728 ++p;
13729 }
13730 { /* AIX XL C 1.02.0.0 rejects this saying
13731 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13732 struct s { int j; const int *ap[3]; };
13733 struct s *b; b->j = 5;
13734 }
13735 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13736 const int foo = 10;
13737 }
13738#endif
13739
13740 ;
13741 return 0;
13742}
bec39cab 13743_ACEOF
a9322a30
TT
13744rm -f conftest.$ac_objext
13745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13746 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
13747 ac_status=$?
13748 grep -v '^ *+' conftest.er1 >conftest.err
13749 rm -f conftest.er1
13750 cat conftest.err >&5
13751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13752 (exit $ac_status); } &&
13753 { ac_try='test -z "$ac_c_werror_flag"
13754 || test ! -s conftest.err'
13755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13756 (eval $ac_try) 2>&5
13757 ac_status=$?
13758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13759 (exit $ac_status); }; } &&
13760 { ac_try='test -s conftest.$ac_objext'
13761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13762 (eval $ac_try) 2>&5
13763 ac_status=$?
13764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13765 (exit $ac_status); }; }; then
13766 ac_cv_c_const=yes
5ee754fc 13767else
bec39cab
AC
13768 echo "$as_me: failed program was:" >&5
13769sed 's/^/| /' conftest.$ac_ext >&5
13770
a9322a30 13771ac_cv_c_const=no
5ee754fc 13772fi
a9322a30 13773rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13774fi
a9322a30
TT
13775echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13776echo "${ECHO_T}$ac_cv_c_const" >&6
13777if test $ac_cv_c_const = no; then
bec39cab 13778
a9322a30
TT
13779cat >>confdefs.h <<\_ACEOF
13780#define const
bec39cab
AC
13781_ACEOF
13782
5ee754fc 13783fi
bec39cab 13784
a9322a30
TT
13785echo "$as_me:$LINENO: checking for inline" >&5
13786echo $ECHO_N "checking for inline... $ECHO_C" >&6
13787if test "${ac_cv_c_inline+set}" = set; then
bec39cab 13788 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13789else
a9322a30
TT
13790 ac_cv_c_inline=no
13791for ac_kw in inline __inline__ __inline; do
13792 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13793/* confdefs.h. */
13794_ACEOF
13795cat confdefs.h >>conftest.$ac_ext
13796cat >>conftest.$ac_ext <<_ACEOF
13797/* end confdefs.h. */
a9322a30
TT
13798#ifndef __cplusplus
13799typedef int foo_t;
13800static $ac_kw foo_t static_foo () {return 0; }
13801$ac_kw foo_t foo () {return 0; }
13802#endif
13803
bec39cab
AC
13804_ACEOF
13805rm -f conftest.$ac_objext
13806if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13807 (eval $ac_compile) 2>conftest.er1
13808 ac_status=$?
13809 grep -v '^ *+' conftest.er1 >conftest.err
13810 rm -f conftest.er1
13811 cat conftest.err >&5
13812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13813 (exit $ac_status); } &&
b4e70030
JB
13814 { ac_try='test -z "$ac_c_werror_flag"
13815 || test ! -s conftest.err'
bec39cab
AC
13816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13817 (eval $ac_try) 2>&5
13818 ac_status=$?
13819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13820 (exit $ac_status); }; } &&
13821 { ac_try='test -s conftest.$ac_objext'
13822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13823 (eval $ac_try) 2>&5
13824 ac_status=$?
13825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13826 (exit $ac_status); }; }; then
a9322a30 13827 ac_cv_c_inline=$ac_kw; break
bec39cab
AC
13828else
13829 echo "$as_me: failed program was:" >&5
13830sed 's/^/| /' conftest.$ac_ext >&5
13831
bec39cab
AC
13832fi
13833rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 13834done
bec39cab 13835
5ee754fc 13836fi
a9322a30
TT
13837echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
13838echo "${ECHO_T}$ac_cv_c_inline" >&6
bec39cab 13839
5ee754fc 13840
a9322a30
TT
13841case $ac_cv_c_inline in
13842 inline | yes) ;;
13843 *)
13844 case $ac_cv_c_inline in
13845 no) ac_val=;;
13846 *) ac_val=$ac_cv_c_inline;;
13847 esac
13848 cat >>confdefs.h <<_ACEOF
13849#ifndef __cplusplus
13850#define inline $ac_val
13851#endif
13852_ACEOF
bec39cab
AC
13853 ;;
13854esac
bec39cab 13855
a9322a30
TT
13856echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
13857echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
13858if test "${ac_cv_c_bigendian+set}" = set; then
bec39cab 13859 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13860else
a9322a30 13861 # See if sys/param.h defines the BYTE_ORDER macro.
bec39cab
AC
13862cat >conftest.$ac_ext <<_ACEOF
13863/* confdefs.h. */
13864_ACEOF
13865cat confdefs.h >>conftest.$ac_ext
13866cat >>conftest.$ac_ext <<_ACEOF
13867/* end confdefs.h. */
a9322a30
TT
13868#include <sys/types.h>
13869#include <sys/param.h>
13870
13871int
13872main ()
13873{
13874#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13875 bogus endian macros
13876#endif
13877
13878 ;
13879 return 0;
13880}
bec39cab
AC
13881_ACEOF
13882rm -f conftest.$ac_objext
13883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13884 (eval $ac_compile) 2>conftest.er1
13885 ac_status=$?
13886 grep -v '^ *+' conftest.er1 >conftest.err
13887 rm -f conftest.er1
13888 cat conftest.err >&5
13889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13890 (exit $ac_status); } &&
b4e70030
JB
13891 { ac_try='test -z "$ac_c_werror_flag"
13892 || test ! -s conftest.err'
bec39cab
AC
13893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13894 (eval $ac_try) 2>&5
13895 ac_status=$?
13896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13897 (exit $ac_status); }; } &&
13898 { ac_try='test -s conftest.$ac_objext'
13899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13900 (eval $ac_try) 2>&5
13901 ac_status=$?
13902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13903 (exit $ac_status); }; }; then
a9322a30 13904 # It does; now see whether it defined to BIG_ENDIAN or not.
bec39cab
AC
13905cat >conftest.$ac_ext <<_ACEOF
13906/* confdefs.h. */
13907_ACEOF
13908cat confdefs.h >>conftest.$ac_ext
13909cat >>conftest.$ac_ext <<_ACEOF
13910/* end confdefs.h. */
a9322a30
TT
13911#include <sys/types.h>
13912#include <sys/param.h>
13913
13914int
13915main ()
13916{
13917#if BYTE_ORDER != BIG_ENDIAN
13918 not big endian
13919#endif
13920
13921 ;
13922 return 0;
13923}
bec39cab 13924_ACEOF
a9322a30
TT
13925rm -f conftest.$ac_objext
13926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13927 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
13928 ac_status=$?
13929 grep -v '^ *+' conftest.er1 >conftest.err
13930 rm -f conftest.er1
13931 cat conftest.err >&5
13932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13933 (exit $ac_status); } &&
13934 { ac_try='test -z "$ac_c_werror_flag"
13935 || test ! -s conftest.err'
13936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13937 (eval $ac_try) 2>&5
13938 ac_status=$?
13939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13940 (exit $ac_status); }; } &&
13941 { ac_try='test -s conftest.$ac_objext'
13942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13943 (eval $ac_try) 2>&5
13944 ac_status=$?
13945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13946 (exit $ac_status); }; }; then
13947 ac_cv_c_bigendian=yes
5ee754fc 13948else
bec39cab
AC
13949 echo "$as_me: failed program was:" >&5
13950sed 's/^/| /' conftest.$ac_ext >&5
13951
a9322a30 13952ac_cv_c_bigendian=no
5ee754fc 13953fi
a9322a30 13954rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13955else
a9322a30
TT
13956 echo "$as_me: failed program was:" >&5
13957sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 13958
a9322a30
TT
13959# It does not; compile a test program.
13960if test "$cross_compiling" = yes; then
13961 # try to guess the endianness by grepping values into an object file
13962 ac_cv_c_bigendian=unknown
13963 cat >conftest.$ac_ext <<_ACEOF
13964/* confdefs.h. */
7eb368b3
NR
13965_ACEOF
13966cat confdefs.h >>conftest.$ac_ext
13967cat >>conftest.$ac_ext <<_ACEOF
13968/* end confdefs.h. */
a9322a30
TT
13969short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13970short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13971void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
13972short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13973short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13974void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
7eb368b3
NR
13975int
13976main ()
13977{
a9322a30 13978 _ascii (); _ebcdic ();
7eb368b3
NR
13979 ;
13980 return 0;
13981}
13982_ACEOF
a9322a30
TT
13983rm -f conftest.$ac_objext
13984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13985 (eval $ac_compile) 2>conftest.er1
7eb368b3
NR
13986 ac_status=$?
13987 grep -v '^ *+' conftest.er1 >conftest.err
13988 rm -f conftest.er1
13989 cat conftest.err >&5
13990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13991 (exit $ac_status); } &&
13992 { ac_try='test -z "$ac_c_werror_flag"
13993 || test ! -s conftest.err'
13994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13995 (eval $ac_try) 2>&5
13996 ac_status=$?
13997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13998 (exit $ac_status); }; } &&
a9322a30 13999 { ac_try='test -s conftest.$ac_objext'
7eb368b3
NR
14000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14001 (eval $ac_try) 2>&5
14002 ac_status=$?
14003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14004 (exit $ac_status); }; }; then
a9322a30
TT
14005 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
14006 ac_cv_c_bigendian=yes
14007fi
14008if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14009 if test "$ac_cv_c_bigendian" = unknown; then
14010 ac_cv_c_bigendian=no
14011 else
14012 # finding both strings is unlikely to happen, but who knows?
14013 ac_cv_c_bigendian=unknown
14014 fi
14015fi
7eb368b3
NR
14016else
14017 echo "$as_me: failed program was:" >&5
14018sed 's/^/| /' conftest.$ac_ext >&5
14019
7eb368b3 14020fi
a9322a30 14021rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
14022else
14023 cat >conftest.$ac_ext <<_ACEOF
14024/* confdefs.h. */
14025_ACEOF
14026cat confdefs.h >>conftest.$ac_ext
14027cat >>conftest.$ac_ext <<_ACEOF
14028/* end confdefs.h. */
d3ea6809
MM
14029int
14030main ()
14031{
a9322a30
TT
14032 /* Are we little or big endian? From Harbison&Steele. */
14033 union
14034 {
14035 long l;
14036 char c[sizeof (long)];
14037 } u;
14038 u.l = 1;
14039 exit (u.c[sizeof (long) - 1] == 1);
d3ea6809
MM
14040}
14041_ACEOF
a9322a30 14042rm -f conftest$ac_exeext
d3ea6809 14043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30 14044 (eval $ac_link) 2>&5
d3ea6809
MM
14045 ac_status=$?
14046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30 14047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3ea6809
MM
14048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14049 (eval $ac_try) 2>&5
14050 ac_status=$?
14051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14052 (exit $ac_status); }; }; then
a9322a30 14053 ac_cv_c_bigendian=no
d3ea6809 14054else
a9322a30
TT
14055 echo "$as_me: program exited with status $ac_status" >&5
14056echo "$as_me: failed program was:" >&5
d3ea6809
MM
14057sed 's/^/| /' conftest.$ac_ext >&5
14058
a9322a30
TT
14059( exit $ac_status )
14060ac_cv_c_bigendian=yes
d3ea6809 14061fi
a9322a30 14062rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d3ea6809 14063fi
d3ea6809 14064fi
a9322a30
TT
14065rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14066fi
14067echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
14068echo "${ECHO_T}$ac_cv_c_bigendian" >&6
14069case $ac_cv_c_bigendian in
14070 yes)
14071
14072cat >>confdefs.h <<\_ACEOF
14073#define WORDS_BIGENDIAN 1
14074_ACEOF
14075 ;;
14076 no)
14077 ;;
14078 *)
14079 { { echo "$as_me:$LINENO: error: unknown endianness
14080presetting ac_cv_c_bigendian=no (or yes) will help" >&5
14081echo "$as_me: error: unknown endianness
14082presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
14083 { (exit 1); exit 1; }; } ;;
14084esac
d3ea6809
MM
14085
14086
a9322a30
TT
14087# ------------------------------ #
14088# Checks for library functions. #
14089# ------------------------------ #
d3ea6809 14090
a9322a30
TT
14091# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14092# for constant arguments. Useless!
14093echo "$as_me:$LINENO: checking for working alloca.h" >&5
14094echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
14095if test "${ac_cv_working_alloca_h+set}" = set; then
d3ea6809
MM
14096 echo $ECHO_N "(cached) $ECHO_C" >&6
14097else
14098 cat >conftest.$ac_ext <<_ACEOF
14099/* confdefs.h. */
14100_ACEOF
14101cat confdefs.h >>conftest.$ac_ext
14102cat >>conftest.$ac_ext <<_ACEOF
14103/* end confdefs.h. */
a9322a30 14104#include <alloca.h>
bec39cab
AC
14105int
14106main ()
14107{
a9322a30 14108char *p = (char *) alloca (2 * sizeof (int));
bec39cab
AC
14109 ;
14110 return 0;
14111}
14112_ACEOF
14113rm -f conftest.$ac_objext conftest$ac_exeext
14114if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14115 (eval $ac_link) 2>conftest.er1
14116 ac_status=$?
14117 grep -v '^ *+' conftest.er1 >conftest.err
14118 rm -f conftest.er1
14119 cat conftest.err >&5
14120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14121 (exit $ac_status); } &&
b4e70030
JB
14122 { ac_try='test -z "$ac_c_werror_flag"
14123 || test ! -s conftest.err'
bec39cab
AC
14124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14125 (eval $ac_try) 2>&5
14126 ac_status=$?
14127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14128 (exit $ac_status); }; } &&
14129 { ac_try='test -s conftest$ac_exeext'
14130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14131 (eval $ac_try) 2>&5
14132 ac_status=$?
14133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14134 (exit $ac_status); }; }; then
a9322a30 14135 ac_cv_working_alloca_h=yes
bec39cab
AC
14136else
14137 echo "$as_me: failed program was:" >&5
14138sed 's/^/| /' conftest.$ac_ext >&5
14139
a9322a30 14140ac_cv_working_alloca_h=no
bec39cab
AC
14141fi
14142rm -f conftest.err conftest.$ac_objext \
14143 conftest$ac_exeext conftest.$ac_ext
14144fi
a9322a30
TT
14145echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14146echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
14147if test $ac_cv_working_alloca_h = yes; then
14148
14149cat >>confdefs.h <<\_ACEOF
14150#define HAVE_ALLOCA_H 1
bec39cab 14151_ACEOF
c906108c 14152
c906108c 14153fi
bec39cab 14154
a9322a30
TT
14155echo "$as_me:$LINENO: checking for alloca" >&5
14156echo $ECHO_N "checking for alloca... $ECHO_C" >&6
14157if test "${ac_cv_func_alloca_works+set}" = set; then
bec39cab
AC
14158 echo $ECHO_N "(cached) $ECHO_C" >&6
14159else
14160 cat >conftest.$ac_ext <<_ACEOF
14161/* confdefs.h. */
14162_ACEOF
14163cat confdefs.h >>conftest.$ac_ext
14164cat >>conftest.$ac_ext <<_ACEOF
14165/* end confdefs.h. */
a9322a30
TT
14166#ifdef __GNUC__
14167# define alloca __builtin_alloca
b4e70030 14168#else
a9322a30
TT
14169# ifdef _MSC_VER
14170# include <malloc.h>
14171# define alloca _alloca
14172# else
14173# if HAVE_ALLOCA_H
14174# include <alloca.h>
14175# else
14176# ifdef _AIX
14177 #pragma alloca
14178# else
14179# ifndef alloca /* predefined by HP cc +Olibcalls */
14180char *alloca ();
14181# endif
14182# endif
14183# endif
14184# endif
c906108c 14185#endif
97bf5e38 14186
bec39cab
AC
14187int
14188main ()
14189{
a9322a30 14190char *p = (char *) alloca (1);
bec39cab
AC
14191 ;
14192 return 0;
14193}
14194_ACEOF
14195rm -f conftest.$ac_objext conftest$ac_exeext
14196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14197 (eval $ac_link) 2>conftest.er1
14198 ac_status=$?
14199 grep -v '^ *+' conftest.er1 >conftest.err
14200 rm -f conftest.er1
14201 cat conftest.err >&5
14202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14203 (exit $ac_status); } &&
b4e70030
JB
14204 { ac_try='test -z "$ac_c_werror_flag"
14205 || test ! -s conftest.err'
bec39cab
AC
14206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14207 (eval $ac_try) 2>&5
14208 ac_status=$?
14209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210 (exit $ac_status); }; } &&
14211 { ac_try='test -s conftest$ac_exeext'
14212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14213 (eval $ac_try) 2>&5
14214 ac_status=$?
14215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14216 (exit $ac_status); }; }; then
a9322a30 14217 ac_cv_func_alloca_works=yes
bec39cab
AC
14218else
14219 echo "$as_me: failed program was:" >&5
14220sed 's/^/| /' conftest.$ac_ext >&5
14221
a9322a30 14222ac_cv_func_alloca_works=no
bec39cab
AC
14223fi
14224rm -f conftest.err conftest.$ac_objext \
14225 conftest$ac_exeext conftest.$ac_ext
14226fi
a9322a30
TT
14227echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14228echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
14229
14230if test $ac_cv_func_alloca_works = yes; then
14231
14232cat >>confdefs.h <<\_ACEOF
14233#define HAVE_ALLOCA 1
bec39cab 14234_ACEOF
c906108c 14235
a9322a30
TT
14236else
14237 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14238# that cause trouble. Some versions do not even contain alloca or
14239# contain a buggy version. If you still want to use their alloca,
14240# use ar to extract alloca.o from them instead of compiling alloca.c.
14241
14242ALLOCA=alloca.$ac_objext
14243
14244cat >>confdefs.h <<\_ACEOF
14245#define C_ALLOCA 1
14246_ACEOF
c906108c 14247
bec39cab 14248
a9322a30
TT
14249echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14250echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
14251if test "${ac_cv_os_cray+set}" = set; then
14252 echo $ECHO_N "(cached) $ECHO_C" >&6
14253else
14254 cat >conftest.$ac_ext <<_ACEOF
14255/* confdefs.h. */
14256_ACEOF
14257cat confdefs.h >>conftest.$ac_ext
14258cat >>conftest.$ac_ext <<_ACEOF
14259/* end confdefs.h. */
14260#if defined(CRAY) && ! defined(CRAY2)
14261webecray
14262#else
14263wenotbecray
14264#endif
14265
14266_ACEOF
14267if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14268 $EGREP "webecray" >/dev/null 2>&1; then
14269 ac_cv_os_cray=yes
14270else
14271 ac_cv_os_cray=no
14272fi
14273rm -f conftest*
14274
14275fi
14276echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14277echo "${ECHO_T}$ac_cv_os_cray" >&6
14278if test $ac_cv_os_cray = yes; then
14279 for ac_func in _getb67 GETB67 getb67; do
14280 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14281echo "$as_me:$LINENO: checking for $ac_func" >&5
14282echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14283if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
14284 echo $ECHO_N "(cached) $ECHO_C" >&6
14285else
14286 cat >conftest.$ac_ext <<_ACEOF
14287/* confdefs.h. */
14288_ACEOF
14289cat confdefs.h >>conftest.$ac_ext
14290cat >>conftest.$ac_ext <<_ACEOF
14291/* end confdefs.h. */
14292/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14293 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14294#define $ac_func innocuous_$ac_func
14295
97bf5e38 14296/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
14297 which can conflict with char $ac_func (); below.
14298 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14299 <limits.h> exists even on freestanding compilers. */
14300
14301#ifdef __STDC__
14302# include <limits.h>
14303#else
14304# include <assert.h>
14305#endif
c906108c 14306
bec39cab 14307#undef $ac_func
97bf5e38 14308
b4e70030 14309/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
14310#ifdef __cplusplus
14311extern "C"
b4e70030 14312{
bec39cab 14313#endif
b4e70030
JB
14314/* We use char because int might match the return type of a gcc2
14315 builtin and then its argument prototype would still apply. */
bec39cab 14316char $ac_func ();
97bf5e38
MK
14317/* The GNU C library defines this for functions which it implements
14318 to always fail with ENOSYS. Some functions are actually named
14319 something starting with __ and the normal name is an alias. */
b4e70030 14320#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
97bf5e38 14321choke me
b4e70030
JB
14322#else
14323char (*f) () = $ac_func;
14324#endif
14325#ifdef __cplusplus
14326}
c906108c 14327#endif
97bf5e38 14328
bec39cab
AC
14329int
14330main ()
14331{
b4e70030 14332return f != $ac_func;
bec39cab
AC
14333 ;
14334 return 0;
14335}
14336_ACEOF
14337rm -f conftest.$ac_objext conftest$ac_exeext
14338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14339 (eval $ac_link) 2>conftest.er1
14340 ac_status=$?
14341 grep -v '^ *+' conftest.er1 >conftest.err
14342 rm -f conftest.er1
14343 cat conftest.err >&5
14344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14345 (exit $ac_status); } &&
b4e70030
JB
14346 { ac_try='test -z "$ac_c_werror_flag"
14347 || test ! -s conftest.err'
bec39cab
AC
14348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14349 (eval $ac_try) 2>&5
14350 ac_status=$?
14351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14352 (exit $ac_status); }; } &&
14353 { ac_try='test -s conftest$ac_exeext'
14354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14355 (eval $ac_try) 2>&5
14356 ac_status=$?
14357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14358 (exit $ac_status); }; }; then
14359 eval "$as_ac_var=yes"
14360else
14361 echo "$as_me: failed program was:" >&5
14362sed 's/^/| /' conftest.$ac_ext >&5
14363
b4e70030 14364eval "$as_ac_var=no"
bec39cab
AC
14365fi
14366rm -f conftest.err conftest.$ac_objext \
14367 conftest$ac_exeext conftest.$ac_ext
14368fi
b4e70030
JB
14369echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14370echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab 14371if test `eval echo '${'$as_ac_var'}'` = yes; then
a9322a30
TT
14372
14373cat >>confdefs.h <<_ACEOF
14374#define CRAY_STACKSEG_END $ac_func
bec39cab 14375_ACEOF
c906108c 14376
a9322a30 14377 break
c906108c
SS
14378fi
14379
a9322a30
TT
14380 done
14381fi
bec39cab 14382
a9322a30
TT
14383echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14384echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
14385if test "${ac_cv_c_stack_direction+set}" = set; then
bec39cab 14386 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
14387else
14388 if test "$cross_compiling" = yes; then
14389 ac_cv_c_stack_direction=0
bec39cab
AC
14390else
14391 cat >conftest.$ac_ext <<_ACEOF
14392/* confdefs.h. */
14393_ACEOF
14394cat confdefs.h >>conftest.$ac_ext
14395cat >>conftest.$ac_ext <<_ACEOF
14396/* end confdefs.h. */
a9322a30
TT
14397int
14398find_stack_direction ()
b4e70030 14399{
a9322a30
TT
14400 static char *addr = 0;
14401 auto char dummy;
14402 if (addr == 0)
14403 {
14404 addr = &dummy;
14405 return find_stack_direction ();
14406 }
14407 else
14408 return (&dummy > addr) ? 1 : -1;
b4e70030 14409}
b757528f 14410
bec39cab
AC
14411int
14412main ()
14413{
a9322a30 14414 exit (find_stack_direction () < 0);
bec39cab
AC
14415}
14416_ACEOF
a9322a30 14417rm -f conftest$ac_exeext
bec39cab 14418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30
TT
14419 (eval $ac_link) 2>&5
14420 ac_status=$?
14421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14422 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14424 (eval $ac_try) 2>&5
14425 ac_status=$?
14426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14427 (exit $ac_status); }; }; then
14428 ac_cv_c_stack_direction=1
14429else
14430 echo "$as_me: program exited with status $ac_status" >&5
14431echo "$as_me: failed program was:" >&5
14432sed 's/^/| /' conftest.$ac_ext >&5
14433
14434( exit $ac_status )
14435ac_cv_c_stack_direction=-1
14436fi
14437rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14438fi
14439fi
14440echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14441echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
14442
14443cat >>confdefs.h <<_ACEOF
14444#define STACK_DIRECTION $ac_cv_c_stack_direction
14445_ACEOF
14446
14447
14448fi
14449
14450
14451
14452for ac_header in stdlib.h unistd.h
14453do
14454as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14455if eval "test \"\${$as_ac_Header+set}\" = set"; then
14456 echo "$as_me:$LINENO: checking for $ac_header" >&5
14457echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14458if eval "test \"\${$as_ac_Header+set}\" = set"; then
14459 echo $ECHO_N "(cached) $ECHO_C" >&6
14460fi
14461echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14462echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14463else
14464 # Is the header compilable?
14465echo "$as_me:$LINENO: checking $ac_header usability" >&5
14466echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14467cat >conftest.$ac_ext <<_ACEOF
14468/* confdefs.h. */
14469_ACEOF
14470cat confdefs.h >>conftest.$ac_ext
14471cat >>conftest.$ac_ext <<_ACEOF
14472/* end confdefs.h. */
14473$ac_includes_default
14474#include <$ac_header>
14475_ACEOF
14476rm -f conftest.$ac_objext
14477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14478 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14479 ac_status=$?
14480 grep -v '^ *+' conftest.er1 >conftest.err
14481 rm -f conftest.er1
14482 cat conftest.err >&5
14483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14484 (exit $ac_status); } &&
b4e70030
JB
14485 { ac_try='test -z "$ac_c_werror_flag"
14486 || test ! -s conftest.err'
bec39cab
AC
14487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14488 (eval $ac_try) 2>&5
14489 ac_status=$?
14490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14491 (exit $ac_status); }; } &&
a9322a30 14492 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
14493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14494 (eval $ac_try) 2>&5
14495 ac_status=$?
14496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14497 (exit $ac_status); }; }; then
a9322a30
TT
14498 ac_header_compiler=yes
14499else
14500 echo "$as_me: failed program was:" >&5
14501sed 's/^/| /' conftest.$ac_ext >&5
14502
14503ac_header_compiler=no
14504fi
14505rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14506echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14507echo "${ECHO_T}$ac_header_compiler" >&6
14508
14509# Is the header present?
14510echo "$as_me:$LINENO: checking $ac_header presence" >&5
14511echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14512cat >conftest.$ac_ext <<_ACEOF
14513/* confdefs.h. */
14514_ACEOF
14515cat confdefs.h >>conftest.$ac_ext
14516cat >>conftest.$ac_ext <<_ACEOF
14517/* end confdefs.h. */
14518#include <$ac_header>
14519_ACEOF
14520if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14521 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14522 ac_status=$?
14523 grep -v '^ *+' conftest.er1 >conftest.err
14524 rm -f conftest.er1
14525 cat conftest.err >&5
14526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14527 (exit $ac_status); } >/dev/null; then
14528 if test -s conftest.err; then
14529 ac_cpp_err=$ac_c_preproc_warn_flag
14530 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14531 else
14532 ac_cpp_err=
14533 fi
14534else
14535 ac_cpp_err=yes
14536fi
14537if test -z "$ac_cpp_err"; then
14538 ac_header_preproc=yes
bec39cab
AC
14539else
14540 echo "$as_me: failed program was:" >&5
14541sed 's/^/| /' conftest.$ac_ext >&5
14542
a9322a30
TT
14543 ac_header_preproc=no
14544fi
14545rm -f conftest.err conftest.$ac_ext
14546echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14547echo "${ECHO_T}$ac_header_preproc" >&6
14548
14549# So? What about this header?
14550case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14551 yes:no: )
14552 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14553echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14554 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14555echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14556 ac_header_preproc=yes
14557 ;;
14558 no:yes:* )
14559 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14560echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14561 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14562echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14563 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14564echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14565 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14566echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
14567 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14568echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14569 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14570echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14571 (
14572 cat <<\_ASBOX
14573## ------------------------------------------ ##
14574## Report this to the AC_PACKAGE_NAME lists. ##
14575## ------------------------------------------ ##
14576_ASBOX
14577 ) |
14578 sed "s/^/$as_me: WARNING: /" >&2
14579 ;;
14580esac
14581echo "$as_me:$LINENO: checking for $ac_header" >&5
14582echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14583if eval "test \"\${$as_ac_Header+set}\" = set"; then
14584 echo $ECHO_N "(cached) $ECHO_C" >&6
14585else
14586 eval "$as_ac_Header=\$ac_header_preproc"
bec39cab 14587fi
a9322a30
TT
14588echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14589echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14590
bec39cab 14591fi
a9322a30 14592if test `eval echo '${'$as_ac_Header'}'` = yes; then
bec39cab 14593 cat >>confdefs.h <<_ACEOF
a9322a30 14594#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 14595_ACEOF
b757528f 14596
b757528f 14597fi
bec39cab 14598
a9322a30 14599done
a3828db0 14600
83116857 14601
a9322a30 14602for ac_func in getpagesize
bcb3dc3d 14603do
bec39cab 14604as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14605echo "$as_me:$LINENO: checking for $ac_func" >&5
14606echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14607if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
14608 echo $ECHO_N "(cached) $ECHO_C" >&6
14609else
14610 cat >conftest.$ac_ext <<_ACEOF
14611/* confdefs.h. */
14612_ACEOF
14613cat confdefs.h >>conftest.$ac_ext
14614cat >>conftest.$ac_ext <<_ACEOF
14615/* end confdefs.h. */
14616/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14617 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14618#define $ac_func innocuous_$ac_func
14619
bcb3dc3d 14620/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
14621 which can conflict with char $ac_func (); below.
14622 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14623 <limits.h> exists even on freestanding compilers. */
14624
14625#ifdef __STDC__
14626# include <limits.h>
14627#else
14628# include <assert.h>
14629#endif
bcb3dc3d 14630
bec39cab 14631#undef $ac_func
bcb3dc3d 14632
b4e70030 14633/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
14634#ifdef __cplusplus
14635extern "C"
b4e70030 14636{
bec39cab 14637#endif
b4e70030
JB
14638/* We use char because int might match the return type of a gcc2
14639 builtin and then its argument prototype would still apply. */
bec39cab 14640char $ac_func ();
bcb3dc3d
MK
14641/* The GNU C library defines this for functions which it implements
14642 to always fail with ENOSYS. Some functions are actually named
14643 something starting with __ and the normal name is an alias. */
b4e70030 14644#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
bcb3dc3d 14645choke me
b4e70030
JB
14646#else
14647char (*f) () = $ac_func;
14648#endif
14649#ifdef __cplusplus
14650}
bcb3dc3d
MK
14651#endif
14652
bec39cab
AC
14653int
14654main ()
14655{
b4e70030 14656return f != $ac_func;
bec39cab
AC
14657 ;
14658 return 0;
14659}
14660_ACEOF
14661rm -f conftest.$ac_objext conftest$ac_exeext
14662if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14663 (eval $ac_link) 2>conftest.er1
14664 ac_status=$?
14665 grep -v '^ *+' conftest.er1 >conftest.err
14666 rm -f conftest.er1
14667 cat conftest.err >&5
14668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14669 (exit $ac_status); } &&
b4e70030
JB
14670 { ac_try='test -z "$ac_c_werror_flag"
14671 || test ! -s conftest.err'
bec39cab
AC
14672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14673 (eval $ac_try) 2>&5
14674 ac_status=$?
14675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14676 (exit $ac_status); }; } &&
14677 { ac_try='test -s conftest$ac_exeext'
14678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14679 (eval $ac_try) 2>&5
14680 ac_status=$?
14681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14682 (exit $ac_status); }; }; then
14683 eval "$as_ac_var=yes"
14684else
14685 echo "$as_me: failed program was:" >&5
14686sed 's/^/| /' conftest.$ac_ext >&5
14687
b4e70030 14688eval "$as_ac_var=no"
bec39cab
AC
14689fi
14690rm -f conftest.err conftest.$ac_objext \
14691 conftest$ac_exeext conftest.$ac_ext
14692fi
b4e70030
JB
14693echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14694echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
14695if test `eval echo '${'$as_ac_var'}'` = yes; then
14696 cat >>confdefs.h <<_ACEOF
14697#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14698_ACEOF
bcb3dc3d 14699
bcb3dc3d
MK
14700fi
14701done
14702
a9322a30
TT
14703echo "$as_me:$LINENO: checking for working mmap" >&5
14704echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
14705if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
bec39cab 14706 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
14707else
14708 if test "$cross_compiling" = yes; then
14709 ac_cv_func_mmap_fixed_mapped=no
bec39cab
AC
14710else
14711 cat >conftest.$ac_ext <<_ACEOF
14712/* confdefs.h. */
14713_ACEOF
14714cat confdefs.h >>conftest.$ac_ext
14715cat >>conftest.$ac_ext <<_ACEOF
14716/* end confdefs.h. */
a9322a30
TT
14717$ac_includes_default
14718/* malloc might have been renamed as rpl_malloc. */
14719#undef malloc
bec39cab 14720
a9322a30
TT
14721/* Thanks to Mike Haertel and Jim Avera for this test.
14722 Here is a matrix of mmap possibilities:
14723 mmap private not fixed
14724 mmap private fixed at somewhere currently unmapped
14725 mmap private fixed at somewhere already mapped
14726 mmap shared not fixed
14727 mmap shared fixed at somewhere currently unmapped
14728 mmap shared fixed at somewhere already mapped
14729 For private mappings, we should verify that changes cannot be read()
14730 back from the file, nor mmap's back from the file at a different
14731 address. (There have been systems where private was not correctly
14732 implemented like the infamous i386 svr4.0, and systems where the
14733 VM page cache was not coherent with the file system buffer cache
14734 like early versions of FreeBSD and possibly contemporary NetBSD.)
14735 For shared mappings, we should conversely verify that changes get
14736 propagated back to all the places they're supposed to be.
bec39cab 14737
a9322a30
TT
14738 Grep wants private fixed already mapped.
14739 The main things grep needs to know about mmap are:
14740 * does it exist and is it safe to write into the mmap'd area
14741 * how to use it (BSD variants) */
8b9cf735 14742
a9322a30
TT
14743#include <fcntl.h>
14744#include <sys/mman.h>
8b9cf735 14745
a9322a30
TT
14746#if !STDC_HEADERS && !HAVE_STDLIB_H
14747char *malloc ();
a3828db0
MK
14748#endif
14749
a9322a30
TT
14750/* This mess was copied from the GNU getpagesize.h. */
14751#if !HAVE_GETPAGESIZE
14752/* Assume that all systems that can run configure have sys/param.h. */
14753# if !HAVE_SYS_PARAM_H
14754# define HAVE_SYS_PARAM_H 1
14755# endif
14756
14757# ifdef _SC_PAGESIZE
14758# define getpagesize() sysconf(_SC_PAGESIZE)
14759# else /* no _SC_PAGESIZE */
14760# if HAVE_SYS_PARAM_H
14761# include <sys/param.h>
14762# ifdef EXEC_PAGESIZE
14763# define getpagesize() EXEC_PAGESIZE
14764# else /* no EXEC_PAGESIZE */
14765# ifdef NBPG
14766# define getpagesize() NBPG * CLSIZE
14767# ifndef CLSIZE
14768# define CLSIZE 1
14769# endif /* no CLSIZE */
14770# else /* no NBPG */
14771# ifdef NBPC
14772# define getpagesize() NBPC
14773# else /* no NBPC */
14774# ifdef PAGESIZE
14775# define getpagesize() PAGESIZE
14776# endif /* PAGESIZE */
14777# endif /* no NBPC */
14778# endif /* no NBPG */
14779# endif /* no EXEC_PAGESIZE */
14780# else /* no HAVE_SYS_PARAM_H */
14781# define getpagesize() 8192 /* punt totally */
14782# endif /* no HAVE_SYS_PARAM_H */
14783# endif /* no _SC_PAGESIZE */
14784
14785#endif /* no HAVE_GETPAGESIZE */
14786
bec39cab
AC
14787int
14788main ()
14789{
a9322a30
TT
14790 char *data, *data2, *data3;
14791 int i, pagesize;
14792 int fd;
14793
14794 pagesize = getpagesize ();
14795
14796 /* First, make a file with some known garbage in it. */
14797 data = (char *) malloc (pagesize);
14798 if (!data)
14799 exit (1);
14800 for (i = 0; i < pagesize; ++i)
14801 *(data + i) = rand ();
14802 umask (0);
14803 fd = creat ("conftest.mmap", 0600);
14804 if (fd < 0)
14805 exit (1);
14806 if (write (fd, data, pagesize) != pagesize)
14807 exit (1);
14808 close (fd);
14809
14810 /* Next, try to mmap the file at a fixed address which already has
14811 something else allocated at it. If we can, also make sure that
14812 we see the same garbage. */
14813 fd = open ("conftest.mmap", O_RDWR);
14814 if (fd < 0)
14815 exit (1);
14816 data2 = (char *) malloc (2 * pagesize);
14817 if (!data2)
14818 exit (1);
14819 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
14820 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
14821 MAP_PRIVATE | MAP_FIXED, fd, 0L))
14822 exit (1);
14823 for (i = 0; i < pagesize; ++i)
14824 if (*(data + i) != *(data2 + i))
14825 exit (1);
14826
14827 /* Finally, make sure that changes to the mapped area do not
14828 percolate back to the file as seen by read(). (This is a bug on
14829 some variants of i386 svr4.0.) */
14830 for (i = 0; i < pagesize; ++i)
14831 *(data2 + i) = *(data2 + i) + 1;
14832 data3 = (char *) malloc (pagesize);
14833 if (!data3)
14834 exit (1);
14835 if (read (fd, data3, pagesize) != pagesize)
14836 exit (1);
14837 for (i = 0; i < pagesize; ++i)
14838 if (*(data + i) != *(data3 + i))
14839 exit (1);
14840 close (fd);
14841 exit (0);
bec39cab
AC
14842}
14843_ACEOF
a9322a30 14844rm -f conftest$ac_exeext
a3828db0 14845if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30 14846 (eval $ac_link) 2>&5
bec39cab
AC
14847 ac_status=$?
14848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30 14849 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
14850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14851 (eval $ac_try) 2>&5
14852 ac_status=$?
14853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14854 (exit $ac_status); }; }; then
a9322a30 14855 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 14856else
a9322a30
TT
14857 echo "$as_me: program exited with status $ac_status" >&5
14858echo "$as_me: failed program was:" >&5
bec39cab
AC
14859sed 's/^/| /' conftest.$ac_ext >&5
14860
a9322a30
TT
14861( exit $ac_status )
14862ac_cv_func_mmap_fixed_mapped=no
a3828db0 14863fi
a9322a30 14864rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a3828db0 14865fi
a9322a30
TT
14866fi
14867echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
14868echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
14869if test $ac_cv_func_mmap_fixed_mapped = yes; then
14870
14871cat >>confdefs.h <<\_ACEOF
14872#define HAVE_MMAP 1
a3828db0
MK
14873_ACEOF
14874
086ec9eb 14875fi
a9322a30 14876rm -f conftest.mmap
a3828db0 14877
a9322a30
TT
14878echo "$as_me:$LINENO: checking for pid_t" >&5
14879echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
14880if test "${ac_cv_type_pid_t+set}" = set; then
a3828db0
MK
14881 echo $ECHO_N "(cached) $ECHO_C" >&6
14882else
14883 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14884/* confdefs.h. */
14885_ACEOF
14886cat confdefs.h >>conftest.$ac_ext
14887cat >>conftest.$ac_ext <<_ACEOF
14888/* end confdefs.h. */
a9322a30 14889$ac_includes_default
bec39cab
AC
14890int
14891main ()
14892{
a9322a30
TT
14893if ((pid_t *) 0)
14894 return 0;
14895if (sizeof (pid_t))
14896 return 0;
bec39cab
AC
14897 ;
14898 return 0;
14899}
14900_ACEOF
a9322a30
TT
14901rm -f conftest.$ac_objext
14902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14903 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14904 ac_status=$?
14905 grep -v '^ *+' conftest.er1 >conftest.err
14906 rm -f conftest.er1
14907 cat conftest.err >&5
14908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14909 (exit $ac_status); } &&
b4e70030
JB
14910 { ac_try='test -z "$ac_c_werror_flag"
14911 || test ! -s conftest.err'
bec39cab
AC
14912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14913 (eval $ac_try) 2>&5
14914 ac_status=$?
14915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14916 (exit $ac_status); }; } &&
a9322a30 14917 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
14918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14919 (eval $ac_try) 2>&5
14920 ac_status=$?
14921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14922 (exit $ac_status); }; }; then
a9322a30 14923 ac_cv_type_pid_t=yes
086ec9eb 14924else
bec39cab
AC
14925 echo "$as_me: failed program was:" >&5
14926sed 's/^/| /' conftest.$ac_ext >&5
14927
a9322a30 14928ac_cv_type_pid_t=no
086ec9eb 14929fi
a9322a30 14930rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
086ec9eb 14931fi
a9322a30
TT
14932echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
14933echo "${ECHO_T}$ac_cv_type_pid_t" >&6
14934if test $ac_cv_type_pid_t = yes; then
14935 :
14936else
14937
14938cat >>confdefs.h <<_ACEOF
14939#define pid_t int
bec39cab 14940_ACEOF
086ec9eb
MK
14941
14942fi
14943
a3828db0 14944
a9322a30
TT
14945
14946for ac_header in unistd.h vfork.h
a3828db0 14947do
a9322a30
TT
14948as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14949if eval "test \"\${$as_ac_Header+set}\" = set"; then
14950 echo "$as_me:$LINENO: checking for $ac_header" >&5
14951echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14952if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 14953 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
14954fi
14955echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14956echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 14957else
a9322a30
TT
14958 # Is the header compilable?
14959echo "$as_me:$LINENO: checking $ac_header usability" >&5
14960echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14961cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14962/* confdefs.h. */
14963_ACEOF
14964cat confdefs.h >>conftest.$ac_ext
14965cat >>conftest.$ac_ext <<_ACEOF
14966/* end confdefs.h. */
a9322a30
TT
14967$ac_includes_default
14968#include <$ac_header>
bec39cab 14969_ACEOF
a9322a30
TT
14970rm -f conftest.$ac_objext
14971if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14972 (eval $ac_compile) 2>conftest.er1
bec39cab 14973 ac_status=$?
a3828db0
MK
14974 grep -v '^ *+' conftest.er1 >conftest.err
14975 rm -f conftest.er1
14976 cat conftest.err >&5
bec39cab 14977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 14978 (exit $ac_status); } &&
b4e70030
JB
14979 { ac_try='test -z "$ac_c_werror_flag"
14980 || test ! -s conftest.err'
a3828db0
MK
14981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14982 (eval $ac_try) 2>&5
14983 ac_status=$?
14984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14985 (exit $ac_status); }; } &&
a9322a30 14986 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
14987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14988 (eval $ac_try) 2>&5
14989 ac_status=$?
14990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14991 (exit $ac_status); }; }; then
a9322a30 14992 ac_header_compiler=yes
c906108c 14993else
a3828db0 14994 echo "$as_me: failed program was:" >&5
bec39cab
AC
14995sed 's/^/| /' conftest.$ac_ext >&5
14996
a9322a30 14997ac_header_compiler=no
97bf5e38 14998fi
a9322a30
TT
14999rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15000echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15001echo "${ECHO_T}$ac_header_compiler" >&6
15002
15003# Is the header present?
15004echo "$as_me:$LINENO: checking $ac_header presence" >&5
15005echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15006cat >conftest.$ac_ext <<_ACEOF
15007/* confdefs.h. */
15008_ACEOF
15009cat confdefs.h >>conftest.$ac_ext
15010cat >>conftest.$ac_ext <<_ACEOF
15011/* end confdefs.h. */
15012#include <$ac_header>
15013_ACEOF
15014if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15015 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15016 ac_status=$?
15017 grep -v '^ *+' conftest.er1 >conftest.err
15018 rm -f conftest.er1
15019 cat conftest.err >&5
15020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15021 (exit $ac_status); } >/dev/null; then
15022 if test -s conftest.err; then
15023 ac_cpp_err=$ac_c_preproc_warn_flag
15024 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15025 else
15026 ac_cpp_err=
15027 fi
15028else
15029 ac_cpp_err=yes
a3828db0 15030fi
a9322a30
TT
15031if test -z "$ac_cpp_err"; then
15032 ac_header_preproc=yes
15033else
15034 echo "$as_me: failed program was:" >&5
15035sed 's/^/| /' conftest.$ac_ext >&5
15036
15037 ac_header_preproc=no
15038fi
15039rm -f conftest.err conftest.$ac_ext
15040echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15041echo "${ECHO_T}$ac_header_preproc" >&6
15042
15043# So? What about this header?
15044case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15045 yes:no: )
15046 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15047echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15048 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15049echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15050 ac_header_preproc=yes
15051 ;;
15052 no:yes:* )
15053 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15054echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15055 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15056echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15057 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15058echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15059 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15060echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
15061 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15062echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15063 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15064echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15065 (
15066 cat <<\_ASBOX
15067## ------------------------------------------ ##
15068## Report this to the AC_PACKAGE_NAME lists. ##
15069## ------------------------------------------ ##
15070_ASBOX
15071 ) |
15072 sed "s/^/$as_me: WARNING: /" >&2
15073 ;;
15074esac
15075echo "$as_me:$LINENO: checking for $ac_header" >&5
15076echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15077if eval "test \"\${$as_ac_Header+set}\" = set"; then
15078 echo $ECHO_N "(cached) $ECHO_C" >&6
15079else
15080 eval "$as_ac_Header=\$ac_header_preproc"
15081fi
15082echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15083echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15084
15085fi
15086if test `eval echo '${'$as_ac_Header'}'` = yes; then
a3828db0 15087 cat >>confdefs.h <<_ACEOF
a9322a30 15088#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 15089_ACEOF
c906108c
SS
15090
15091fi
a9322a30 15092
a3828db0 15093done
c906108c 15094
a3828db0 15095
a9322a30
TT
15096
15097for ac_func in fork vfork
a3828db0
MK
15098do
15099as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15100echo "$as_me:$LINENO: checking for $ac_func" >&5
15101echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15102if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 15103 echo $ECHO_N "(cached) $ECHO_C" >&6
b83266a0 15104else
bec39cab
AC
15105 cat >conftest.$ac_ext <<_ACEOF
15106/* confdefs.h. */
15107_ACEOF
15108cat confdefs.h >>conftest.$ac_ext
15109cat >>conftest.$ac_ext <<_ACEOF
15110/* end confdefs.h. */
a3828db0
MK
15111/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15112 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15113#define $ac_func innocuous_$ac_func
b83266a0 15114
a3828db0
MK
15115/* System header to define __stub macros and hopefully few prototypes,
15116 which can conflict with char $ac_func (); below.
15117 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15118 <limits.h> exists even on freestanding compilers. */
15119
15120#ifdef __STDC__
15121# include <limits.h>
15122#else
15123# include <assert.h>
15124#endif
15125
15126#undef $ac_func
15127
b4e70030 15128/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
15129#ifdef __cplusplus
15130extern "C"
b4e70030 15131{
a3828db0 15132#endif
b4e70030
JB
15133/* We use char because int might match the return type of a gcc2
15134 builtin and then its argument prototype would still apply. */
a3828db0
MK
15135char $ac_func ();
15136/* The GNU C library defines this for functions which it implements
15137 to always fail with ENOSYS. Some functions are actually named
15138 something starting with __ and the normal name is an alias. */
b4e70030 15139#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 15140choke me
b4e70030
JB
15141#else
15142char (*f) () = $ac_func;
15143#endif
15144#ifdef __cplusplus
15145}
a3828db0 15146#endif
97bf5e38 15147
bec39cab
AC
15148int
15149main ()
15150{
b4e70030 15151return f != $ac_func;
bec39cab
AC
15152 ;
15153 return 0;
15154}
15155_ACEOF
a3828db0
MK
15156rm -f conftest.$ac_objext conftest$ac_exeext
15157if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15158 (eval $ac_link) 2>conftest.er1
bec39cab
AC
15159 ac_status=$?
15160 grep -v '^ *+' conftest.er1 >conftest.err
15161 rm -f conftest.er1
15162 cat conftest.err >&5
15163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15164 (exit $ac_status); } &&
b4e70030
JB
15165 { ac_try='test -z "$ac_c_werror_flag"
15166 || test ! -s conftest.err'
bec39cab
AC
15167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15168 (eval $ac_try) 2>&5
15169 ac_status=$?
15170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15171 (exit $ac_status); }; } &&
a3828db0 15172 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
15173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15174 (eval $ac_try) 2>&5
15175 ac_status=$?
15176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15177 (exit $ac_status); }; }; then
a3828db0 15178 eval "$as_ac_var=yes"
b83266a0 15179else
bec39cab
AC
15180 echo "$as_me: failed program was:" >&5
15181sed 's/^/| /' conftest.$ac_ext >&5
15182
b4e70030 15183eval "$as_ac_var=no"
b83266a0 15184fi
a3828db0
MK
15185rm -f conftest.err conftest.$ac_objext \
15186 conftest$ac_exeext conftest.$ac_ext
b83266a0 15187fi
b4e70030
JB
15188echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15189echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
15190if test `eval echo '${'$as_ac_var'}'` = yes; then
15191 cat >>confdefs.h <<_ACEOF
15192#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 15193_ACEOF
b83266a0 15194
97bf5e38 15195fi
a3828db0 15196done
b83266a0 15197
a9322a30
TT
15198if test "x$ac_cv_func_fork" = xyes; then
15199 echo "$as_me:$LINENO: checking for working fork" >&5
15200echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15201if test "${ac_cv_func_fork_works+set}" = set; then
15202 echo $ECHO_N "(cached) $ECHO_C" >&6
15203else
15204 if test "$cross_compiling" = yes; then
15205 ac_cv_func_fork_works=cross
15206else
15207 cat >conftest.$ac_ext <<_ACEOF
15208/* By Ruediger Kuhlmann. */
15209 #include <sys/types.h>
15210 #if HAVE_UNISTD_H
15211 # include <unistd.h>
15212 #endif
15213 /* Some systems only have a dummy stub for fork() */
15214 int main ()
15215 {
15216 if (fork() < 0)
15217 exit (1);
15218 exit (0);
15219 }
15220_ACEOF
15221rm -f conftest$ac_exeext
15222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15223 (eval $ac_link) 2>&5
15224 ac_status=$?
15225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15226 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15228 (eval $ac_try) 2>&5
15229 ac_status=$?
15230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15231 (exit $ac_status); }; }; then
15232 ac_cv_func_fork_works=yes
15233else
15234 echo "$as_me: program exited with status $ac_status" >&5
15235echo "$as_me: failed program was:" >&5
15236sed 's/^/| /' conftest.$ac_ext >&5
15237
15238( exit $ac_status )
15239ac_cv_func_fork_works=no
15240fi
15241rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15242fi
15243fi
15244echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
15245echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15246
15247else
15248 ac_cv_func_fork_works=$ac_cv_func_fork
15249fi
15250if test "x$ac_cv_func_fork_works" = xcross; then
15251 case $host in
15252 *-*-amigaos* | *-*-msdosdjgpp*)
15253 # Override, as these systems have only a dummy fork() stub
15254 ac_cv_func_fork_works=no
15255 ;;
15256 *)
15257 ac_cv_func_fork_works=yes
15258 ;;
15259 esac
15260 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15261echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15262fi
15263ac_cv_func_vfork_works=$ac_cv_func_vfork
15264if test "x$ac_cv_func_vfork" = xyes; then
15265 echo "$as_me:$LINENO: checking for working vfork" >&5
15266echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15267if test "${ac_cv_func_vfork_works+set}" = set; then
15268 echo $ECHO_N "(cached) $ECHO_C" >&6
15269else
15270 if test "$cross_compiling" = yes; then
15271 ac_cv_func_vfork_works=cross
15272else
15273 cat >conftest.$ac_ext <<_ACEOF
15274/* confdefs.h. */
15275_ACEOF
15276cat confdefs.h >>conftest.$ac_ext
15277cat >>conftest.$ac_ext <<_ACEOF
15278/* end confdefs.h. */
15279/* Thanks to Paul Eggert for this test. */
15280#include <stdio.h>
15281#include <stdlib.h>
15282#include <sys/types.h>
15283#include <sys/stat.h>
15284#include <sys/wait.h>
15285#if HAVE_UNISTD_H
15286# include <unistd.h>
15287#endif
15288#if HAVE_VFORK_H
15289# include <vfork.h>
15290#endif
15291/* On some sparc systems, changes by the child to local and incoming
15292 argument registers are propagated back to the parent. The compiler
15293 is told about this with #include <vfork.h>, but some compilers
15294 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15295 static variable whose address is put into a register that is
15296 clobbered by the vfork. */
15297static void
15298#ifdef __cplusplus
15299sparc_address_test (int arg)
15300# else
15301sparc_address_test (arg) int arg;
15302#endif
15303{
15304 static pid_t child;
15305 if (!child) {
15306 child = vfork ();
15307 if (child < 0) {
15308 perror ("vfork");
15309 _exit(2);
15310 }
15311 if (!child) {
15312 arg = getpid();
15313 write(-1, "", 0);
15314 _exit (arg);
15315 }
15316 }
15317}
15318
15319int
15320main ()
15321{
15322 pid_t parent = getpid ();
15323 pid_t child;
15324
15325 sparc_address_test (0);
15326
15327 child = vfork ();
15328
15329 if (child == 0) {
15330 /* Here is another test for sparc vfork register problems. This
15331 test uses lots of local variables, at least as many local
15332 variables as main has allocated so far including compiler
15333 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15334 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15335 reuse the register of parent for one of the local variables,
15336 since it will think that parent can't possibly be used any more
15337 in this routine. Assigning to the local variable will thus
15338 munge parent in the parent process. */
15339 pid_t
15340 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15341 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15342 /* Convince the compiler that p..p7 are live; otherwise, it might
15343 use the same hardware register for all 8 local variables. */
15344 if (p != p1 || p != p2 || p != p3 || p != p4
15345 || p != p5 || p != p6 || p != p7)
15346 _exit(1);
15347
15348 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15349 from child file descriptors. If the child closes a descriptor
15350 before it execs or exits, this munges the parent's descriptor
15351 as well. Test for this by closing stdout in the child. */
15352 _exit(close(fileno(stdout)) != 0);
15353 } else {
15354 int status;
15355 struct stat st;
15356
15357 while (wait(&status) != child)
15358 ;
15359 exit(
15360 /* Was there some problem with vforking? */
15361 child < 0
15362
15363 /* Did the child fail? (This shouldn't happen.) */
15364 || status
15365
15366 /* Did the vfork/compiler bug occur? */
15367 || parent != getpid()
15368
15369 /* Did the file descriptor bug occur? */
15370 || fstat(fileno(stdout), &st) != 0
15371 );
15372 }
15373}
15374_ACEOF
15375rm -f conftest$ac_exeext
15376if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15377 (eval $ac_link) 2>&5
15378 ac_status=$?
15379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15380 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15382 (eval $ac_try) 2>&5
15383 ac_status=$?
15384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15385 (exit $ac_status); }; }; then
15386 ac_cv_func_vfork_works=yes
15387else
15388 echo "$as_me: program exited with status $ac_status" >&5
15389echo "$as_me: failed program was:" >&5
15390sed 's/^/| /' conftest.$ac_ext >&5
15391
15392( exit $ac_status )
15393ac_cv_func_vfork_works=no
15394fi
15395rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15396fi
15397fi
15398echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
15399echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15400
15401fi;
15402if test "x$ac_cv_func_fork_works" = xcross; then
15403 ac_cv_func_vfork_works=$ac_cv_func_vfork
15404 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15405echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15406fi
15407
15408if test "x$ac_cv_func_vfork_works" = xyes; then
15409
15410cat >>confdefs.h <<\_ACEOF
15411#define HAVE_WORKING_VFORK 1
15412_ACEOF
15413
15414else
15415
15416cat >>confdefs.h <<\_ACEOF
15417#define vfork fork
15418_ACEOF
15419
15420fi
15421if test "x$ac_cv_func_fork_works" = xyes; then
15422
15423cat >>confdefs.h <<\_ACEOF
15424#define HAVE_WORKING_FORK 1
15425_ACEOF
15426
15427fi
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
a3828db0 15446
a8111142 15447
a9322a30
TT
15448for ac_func in canonicalize_file_name realpath getrusage getuid \
15449 getgid poll pread64 sbrk setpgid setpgrp setsid \
15450 sigaction sigprocmask sigsetmask socketpair syscall \
a8111142 15451 ttrace wborder setlocale
a3828db0
MK
15452do
15453as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15454echo "$as_me:$LINENO: checking for $ac_func" >&5
15455echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15456if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
15457 echo $ECHO_N "(cached) $ECHO_C" >&6
15458else
15459 cat >conftest.$ac_ext <<_ACEOF
15460/* confdefs.h. */
15461_ACEOF
15462cat confdefs.h >>conftest.$ac_ext
15463cat >>conftest.$ac_ext <<_ACEOF
15464/* end confdefs.h. */
a3828db0
MK
15465/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15466 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15467#define $ac_func innocuous_$ac_func
a4db0f07 15468
a3828db0
MK
15469/* System header to define __stub macros and hopefully few prototypes,
15470 which can conflict with char $ac_func (); below.
15471 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15472 <limits.h> exists even on freestanding compilers. */
15473
15474#ifdef __STDC__
15475# include <limits.h>
15476#else
15477# include <assert.h>
15478#endif
15479
15480#undef $ac_func
15481
b4e70030 15482/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
15483#ifdef __cplusplus
15484extern "C"
b4e70030 15485{
a3828db0 15486#endif
b4e70030
JB
15487/* We use char because int might match the return type of a gcc2
15488 builtin and then its argument prototype would still apply. */
a3828db0
MK
15489char $ac_func ();
15490/* The GNU C library defines this for functions which it implements
15491 to always fail with ENOSYS. Some functions are actually named
15492 something starting with __ and the normal name is an alias. */
b4e70030 15493#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 15494choke me
b4e70030
JB
15495#else
15496char (*f) () = $ac_func;
15497#endif
15498#ifdef __cplusplus
15499}
a3828db0 15500#endif
97bf5e38 15501
bec39cab
AC
15502int
15503main ()
15504{
b4e70030 15505return f != $ac_func;
bec39cab
AC
15506 ;
15507 return 0;
15508}
15509_ACEOF
a3828db0
MK
15510rm -f conftest.$ac_objext conftest$ac_exeext
15511if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15512 (eval $ac_link) 2>conftest.er1
bec39cab
AC
15513 ac_status=$?
15514 grep -v '^ *+' conftest.er1 >conftest.err
15515 rm -f conftest.er1
15516 cat conftest.err >&5
15517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15518 (exit $ac_status); } &&
b4e70030
JB
15519 { ac_try='test -z "$ac_c_werror_flag"
15520 || test ! -s conftest.err'
bec39cab
AC
15521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15522 (eval $ac_try) 2>&5
15523 ac_status=$?
15524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525 (exit $ac_status); }; } &&
a3828db0 15526 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
15527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15528 (eval $ac_try) 2>&5
15529 ac_status=$?
15530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15531 (exit $ac_status); }; }; then
a3828db0 15532 eval "$as_ac_var=yes"
a4db0f07 15533else
bec39cab
AC
15534 echo "$as_me: failed program was:" >&5
15535sed 's/^/| /' conftest.$ac_ext >&5
15536
b4e70030 15537eval "$as_ac_var=no"
a4db0f07 15538fi
a3828db0
MK
15539rm -f conftest.err conftest.$ac_objext \
15540 conftest$ac_exeext conftest.$ac_ext
a4db0f07 15541fi
b4e70030
JB
15542echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15543echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
15544if test `eval echo '${'$as_ac_var'}'` = yes; then
15545 cat >>confdefs.h <<_ACEOF
15546#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 15547_ACEOF
a4db0f07
RH
15548
15549fi
a3828db0 15550done
c906108c 15551
06825bd1 15552
a3828db0
MK
15553# Check the return and argument types of ptrace. No canned test for
15554# this, so roll our own.
15555gdb_ptrace_headers='
15556#if HAVE_SYS_TYPES_H
15557# include <sys/types.h>
15558#endif
15559#if HAVE_SYS_PTRACE_H
15560# include <sys/ptrace.h>
15561#endif
15562#if HAVE_UNISTD_H
15563# include <unistd.h>
15564#endif
15565'
15566# There is no point in checking if we don't have a prototype.
b4e70030
JB
15567echo "$as_me:$LINENO: checking whether ptrace is declared" >&5
15568echo $ECHO_N "checking whether ptrace is declared... $ECHO_C" >&6
a3828db0 15569if test "${ac_cv_have_decl_ptrace+set}" = set; then
bec39cab
AC
15570 echo $ECHO_N "(cached) $ECHO_C" >&6
15571else
15572 cat >conftest.$ac_ext <<_ACEOF
15573/* confdefs.h. */
15574_ACEOF
15575cat confdefs.h >>conftest.$ac_ext
15576cat >>conftest.$ac_ext <<_ACEOF
15577/* end confdefs.h. */
a3828db0
MK
15578$gdb_ptrace_headers
15579
bec39cab
AC
15580int
15581main ()
15582{
a3828db0
MK
15583#ifndef ptrace
15584 char *p = (char *) ptrace;
06825bd1 15585#endif
a3828db0 15586
bec39cab
AC
15587 ;
15588 return 0;
15589}
15590_ACEOF
15591rm -f conftest.$ac_objext
15592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15593 (eval $ac_compile) 2>conftest.er1
15594 ac_status=$?
15595 grep -v '^ *+' conftest.er1 >conftest.err
15596 rm -f conftest.er1
15597 cat conftest.err >&5
15598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15599 (exit $ac_status); } &&
b4e70030
JB
15600 { ac_try='test -z "$ac_c_werror_flag"
15601 || test ! -s conftest.err'
bec39cab
AC
15602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15603 (eval $ac_try) 2>&5
15604 ac_status=$?
15605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15606 (exit $ac_status); }; } &&
15607 { ac_try='test -s conftest.$ac_objext'
15608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15609 (eval $ac_try) 2>&5
15610 ac_status=$?
15611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15612 (exit $ac_status); }; }; then
a3828db0 15613 ac_cv_have_decl_ptrace=yes
06825bd1 15614else
bec39cab
AC
15615 echo "$as_me: failed program was:" >&5
15616sed 's/^/| /' conftest.$ac_ext >&5
15617
b4e70030 15618ac_cv_have_decl_ptrace=no
06825bd1 15619fi
bec39cab 15620rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 15621fi
b4e70030
JB
15622echo "$as_me:$LINENO: result: $ac_cv_have_decl_ptrace" >&5
15623echo "${ECHO_T}$ac_cv_have_decl_ptrace" >&6
a3828db0 15624if test $ac_cv_have_decl_ptrace = yes; then
06825bd1 15625
a3828db0
MK
15626cat >>confdefs.h <<_ACEOF
15627#define HAVE_DECL_PTRACE 1
15628_ACEOF
bec39cab 15629
bec39cab 15630
a3828db0
MK
15631else
15632 cat >>confdefs.h <<_ACEOF
15633#define HAVE_DECL_PTRACE 0
bec39cab 15634_ACEOF
06825bd1 15635
a3828db0
MK
15636
15637 : ${gdb_cv_func_ptrace_ret='int'}
15638 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15639
06825bd1
MK
15640fi
15641
a3828db0 15642
064ef605
DJ
15643# Check return type. Varargs (used on GNU/Linux) conflict with the
15644# empty argument list, so check for that explicitly.
b4e70030
JB
15645echo "$as_me:$LINENO: checking return type of ptrace" >&5
15646echo $ECHO_N "checking return type of ptrace... $ECHO_C" >&6
a3828db0 15647if test "${gdb_cv_func_ptrace_ret+set}" = set; then
bec39cab
AC
15648 echo $ECHO_N "(cached) $ECHO_C" >&6
15649else
15650 cat >conftest.$ac_ext <<_ACEOF
15651/* confdefs.h. */
15652_ACEOF
15653cat confdefs.h >>conftest.$ac_ext
15654cat >>conftest.$ac_ext <<_ACEOF
15655/* end confdefs.h. */
a3828db0 15656$gdb_ptrace_headers
bec39cab
AC
15657int
15658main ()
15659{
064ef605
DJ
15660extern long ptrace (enum __ptrace_request, ...);
15661 ;
15662 return 0;
15663}
15664_ACEOF
15665rm -f conftest.$ac_objext
15666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15667 (eval $ac_compile) 2>conftest.er1
15668 ac_status=$?
15669 grep -v '^ *+' conftest.er1 >conftest.err
15670 rm -f conftest.er1
15671 cat conftest.err >&5
15672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15673 (exit $ac_status); } &&
15674 { ac_try='test -z "$ac_c_werror_flag"
15675 || test ! -s conftest.err'
15676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15677 (eval $ac_try) 2>&5
15678 ac_status=$?
15679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15680 (exit $ac_status); }; } &&
15681 { ac_try='test -s conftest.$ac_objext'
15682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15683 (eval $ac_try) 2>&5
15684 ac_status=$?
15685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15686 (exit $ac_status); }; }; then
15687 gdb_cv_func_ptrace_ret='long'
15688else
15689 echo "$as_me: failed program was:" >&5
15690sed 's/^/| /' conftest.$ac_ext >&5
15691
15692cat >conftest.$ac_ext <<_ACEOF
15693/* confdefs.h. */
15694_ACEOF
15695cat confdefs.h >>conftest.$ac_ext
15696cat >>conftest.$ac_ext <<_ACEOF
15697/* end confdefs.h. */
15698$gdb_ptrace_headers
15699int
15700main ()
15701{
a3828db0 15702extern int ptrace ();
bec39cab
AC
15703 ;
15704 return 0;
15705}
15706_ACEOF
15707rm -f conftest.$ac_objext
15708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15709 (eval $ac_compile) 2>conftest.er1
15710 ac_status=$?
15711 grep -v '^ *+' conftest.er1 >conftest.err
15712 rm -f conftest.er1
15713 cat conftest.err >&5
15714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15715 (exit $ac_status); } &&
b4e70030
JB
15716 { ac_try='test -z "$ac_c_werror_flag"
15717 || test ! -s conftest.err'
bec39cab
AC
15718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15719 (eval $ac_try) 2>&5
15720 ac_status=$?
15721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15722 (exit $ac_status); }; } &&
15723 { ac_try='test -s conftest.$ac_objext'
15724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15725 (eval $ac_try) 2>&5
15726 ac_status=$?
15727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15728 (exit $ac_status); }; }; then
a3828db0 15729 gdb_cv_func_ptrace_ret='int'
70f9f479 15730else
bec39cab
AC
15731 echo "$as_me: failed program was:" >&5
15732sed 's/^/| /' conftest.$ac_ext >&5
15733
b4e70030 15734gdb_cv_func_ptrace_ret='long'
70f9f479 15735fi
bec39cab 15736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 15737fi
064ef605
DJ
15738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15739fi
b4e70030
JB
15740echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_ret" >&5
15741echo "${ECHO_T}$gdb_cv_func_ptrace_ret" >&6
bec39cab 15742
a3828db0
MK
15743cat >>confdefs.h <<_ACEOF
15744#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 15745_ACEOF
70f9f479 15746
a3828db0 15747# Check argument types.
b4e70030
JB
15748echo "$as_me:$LINENO: checking types of arguments for ptrace" >&5
15749echo $ECHO_N "checking types of arguments for ptrace... $ECHO_C" >&6
a3828db0 15750if test "${gdb_cv_func_ptrace_args+set}" = set; then
bec39cab
AC
15751 echo $ECHO_N "(cached) $ECHO_C" >&6
15752else
a3828db0 15753
064ef605
DJ
15754 cat >conftest.$ac_ext <<_ACEOF
15755/* confdefs.h. */
15756_ACEOF
15757cat confdefs.h >>conftest.$ac_ext
15758cat >>conftest.$ac_ext <<_ACEOF
15759/* end confdefs.h. */
15760$gdb_ptrace_headers
15761int
15762main ()
15763{
15764extern long ptrace (enum __ptrace_request, ...);
15765 ;
15766 return 0;
15767}
15768_ACEOF
15769rm -f conftest.$ac_objext
15770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15771 (eval $ac_compile) 2>conftest.er1
15772 ac_status=$?
15773 grep -v '^ *+' conftest.er1 >conftest.err
15774 rm -f conftest.er1
15775 cat conftest.err >&5
15776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15777 (exit $ac_status); } &&
15778 { ac_try='test -z "$ac_c_werror_flag"
15779 || test ! -s conftest.err'
15780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15781 (eval $ac_try) 2>&5
15782 ac_status=$?
15783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15784 (exit $ac_status); }; } &&
15785 { ac_try='test -s conftest.$ac_objext'
15786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15787 (eval $ac_try) 2>&5
15788 ac_status=$?
15789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15790 (exit $ac_status); }; }; then
15791 gdb_cv_func_ptrace_args='int,int,long,long'
15792else
15793 echo "$as_me: failed program was:" >&5
15794sed 's/^/| /' conftest.$ac_ext >&5
15795
15796
a3828db0
MK
15797for gdb_arg1 in 'int' 'long'; do
15798 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 15799 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0
MK
15800 for gdb_arg4 in 'int' 'long'; do
15801 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15802/* confdefs.h. */
15803_ACEOF
15804cat confdefs.h >>conftest.$ac_ext
15805cat >>conftest.$ac_ext <<_ACEOF
15806/* end confdefs.h. */
a3828db0 15807$gdb_ptrace_headers
bec39cab
AC
15808int
15809main ()
15810{
a3828db0
MK
15811
15812extern $gdb_cv_func_ptrace_ret
15813 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15814
bec39cab
AC
15815 ;
15816 return 0;
15817}
15818_ACEOF
15819rm -f conftest.$ac_objext
15820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15821 (eval $ac_compile) 2>conftest.er1
15822 ac_status=$?
15823 grep -v '^ *+' conftest.er1 >conftest.err
15824 rm -f conftest.er1
15825 cat conftest.err >&5
15826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15827 (exit $ac_status); } &&
b4e70030
JB
15828 { ac_try='test -z "$ac_c_werror_flag"
15829 || test ! -s conftest.err'
bec39cab
AC
15830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15831 (eval $ac_try) 2>&5
15832 ac_status=$?
15833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15834 (exit $ac_status); }; } &&
15835 { ac_try='test -s conftest.$ac_objext'
15836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15837 (eval $ac_try) 2>&5
15838 ac_status=$?
15839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15840 (exit $ac_status); }; }; then
a3828db0
MK
15841 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15842 break 4;
5c7f2947 15843else
bec39cab
AC
15844 echo "$as_me: failed program was:" >&5
15845sed 's/^/| /' conftest.$ac_ext >&5
15846
5c7f2947 15847fi
bec39cab 15848rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
15849 for gdb_arg5 in 'int *' 'int' 'long'; do
15850 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15851/* confdefs.h. */
15852_ACEOF
15853cat confdefs.h >>conftest.$ac_ext
15854cat >>conftest.$ac_ext <<_ACEOF
15855/* end confdefs.h. */
a3828db0 15856$gdb_ptrace_headers
bec39cab
AC
15857int
15858main ()
15859{
a3828db0
MK
15860
15861extern $gdb_cv_func_ptrace_ret
15862 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15863
bec39cab
AC
15864 ;
15865 return 0;
15866}
15867_ACEOF
15868rm -f conftest.$ac_objext
15869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15870 (eval $ac_compile) 2>conftest.er1
15871 ac_status=$?
15872 grep -v '^ *+' conftest.er1 >conftest.err
15873 rm -f conftest.er1
15874 cat conftest.err >&5
15875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15876 (exit $ac_status); } &&
b4e70030
JB
15877 { ac_try='test -z "$ac_c_werror_flag"
15878 || test ! -s conftest.err'
bec39cab
AC
15879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15880 (eval $ac_try) 2>&5
15881 ac_status=$?
15882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15883 (exit $ac_status); }; } &&
15884 { ac_try='test -s conftest.$ac_objext'
15885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15886 (eval $ac_try) 2>&5
15887 ac_status=$?
15888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15889 (exit $ac_status); }; }; then
a3828db0
MK
15890
15891gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15892 break 5;
78434e59 15893else
bec39cab
AC
15894 echo "$as_me: failed program was:" >&5
15895sed 's/^/| /' conftest.$ac_ext >&5
15896
78434e59 15897fi
bec39cab 15898rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
15899 done
15900 done
15901 done
15902 done
15903done
15904# Provide a safe default value.
15905: ${gdb_cv_func_ptrace_args='int,int,long,long'}
15906
064ef605
DJ
15907fi
15908rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 15909fi
b4e70030
JB
15910echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_args" >&5
15911echo "${ECHO_T}$gdb_cv_func_ptrace_args" >&6
a3828db0
MK
15912ac_save_IFS=$IFS; IFS=','
15913set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15914IFS=$ac_save_IFS
15915shift
bec39cab 15916
a3828db0
MK
15917cat >>confdefs.h <<_ACEOF
15918#define PTRACE_TYPE_ARG3 $3
15919_ACEOF
15920
15921if test -n "$5"; then
15922
15923cat >>confdefs.h <<_ACEOF
15924#define PTRACE_TYPE_ARG5 $5
bec39cab 15925_ACEOF
78434e59
MK
15926
15927fi
15928
a3828db0 15929if test "$cross_compiling" = no; then
b4e70030
JB
15930 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
15931echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 15932if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 15933 echo $ECHO_N "(cached) $ECHO_C" >&6
a3828db0
MK
15934else
15935 if test "$cross_compiling" = yes; then
15936 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
15937echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
15938 { (exit 1); exit 1; }; }
bec39cab
AC
15939else
15940 cat >conftest.$ac_ext <<_ACEOF
15941/* confdefs.h. */
15942_ACEOF
15943cat confdefs.h >>conftest.$ac_ext
15944cat >>conftest.$ac_ext <<_ACEOF
15945/* end confdefs.h. */
b4e70030
JB
15946#if HAVE_UNISTD_H
15947# include <unistd.h>
15948#endif
15949
bec39cab
AC
15950int
15951main ()
15952{
a3828db0
MK
15953/* If this system has a BSD-style setpgrp which takes arguments,
15954 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15955 exit successfully. */
b4e70030 15956 exit (setpgrp (1,1) == -1 ? 0 : 1);
bec39cab
AC
15957 ;
15958 return 0;
15959}
15960_ACEOF
a3828db0
MK
15961rm -f conftest$ac_exeext
15962if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15963 (eval $ac_link) 2>&5
bec39cab
AC
15964 ac_status=$?
15965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 15966 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
15967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15968 (eval $ac_try) 2>&5
15969 ac_status=$?
15970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15971 (exit $ac_status); }; }; then
a3828db0 15972 ac_cv_func_setpgrp_void=no
c906108c 15973else
a3828db0
MK
15974 echo "$as_me: program exited with status $ac_status" >&5
15975echo "$as_me: failed program was:" >&5
bec39cab
AC
15976sed 's/^/| /' conftest.$ac_ext >&5
15977
a3828db0
MK
15978( exit $ac_status )
15979ac_cv_func_setpgrp_void=yes
c906108c 15980fi
b4e70030 15981rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 15982fi
a3828db0 15983fi
b4e70030
JB
15984echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
15985echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0
MK
15986if test $ac_cv_func_setpgrp_void = yes; then
15987
15988cat >>confdefs.h <<\_ACEOF
15989#define SETPGRP_VOID 1
bec39cab 15990_ACEOF
97bf5e38
MK
15991
15992fi
a3828db0
MK
15993
15994else
b4e70030
JB
15995 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
15996echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 15997if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 15998 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 15999else
bec39cab
AC
16000 cat >conftest.$ac_ext <<_ACEOF
16001/* confdefs.h. */
16002_ACEOF
16003cat confdefs.h >>conftest.$ac_ext
16004cat >>conftest.$ac_ext <<_ACEOF
16005/* end confdefs.h. */
a3828db0
MK
16006
16007#include <unistd.h>
16008
bec39cab
AC
16009int
16010main ()
16011{
a3828db0
MK
16012
16013 if (setpgrp(1,1) == -1)
16014 exit (0);
16015 else
16016 exit (1);
16017
bec39cab
AC
16018 ;
16019 return 0;
16020}
16021_ACEOF
16022rm -f conftest.$ac_objext
16023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16024 (eval $ac_compile) 2>conftest.er1
16025 ac_status=$?
16026 grep -v '^ *+' conftest.er1 >conftest.err
16027 rm -f conftest.er1
16028 cat conftest.err >&5
16029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16030 (exit $ac_status); } &&
b4e70030
JB
16031 { ac_try='test -z "$ac_c_werror_flag"
16032 || test ! -s conftest.err'
bec39cab
AC
16033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16034 (eval $ac_try) 2>&5
16035 ac_status=$?
16036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16037 (exit $ac_status); }; } &&
16038 { ac_try='test -s conftest.$ac_objext'
16039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16040 (eval $ac_try) 2>&5
16041 ac_status=$?
16042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16043 (exit $ac_status); }; }; then
a3828db0 16044 ac_cv_func_setpgrp_void=no
c906108c 16045else
bec39cab
AC
16046 echo "$as_me: failed program was:" >&5
16047sed 's/^/| /' conftest.$ac_ext >&5
16048
b4e70030 16049ac_cv_func_setpgrp_void=yes
c906108c 16050fi
bec39cab 16051rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16052fi
b4e70030
JB
16053echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
16054echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0 16055if test $ac_cv_func_setpgrp_void = yes; then
bec39cab 16056 cat >>confdefs.h <<\_ACEOF
a3828db0 16057#define SETPGRP_VOID 1
bec39cab 16058_ACEOF
c3f6f71d 16059
a3828db0 16060fi
c906108c
SS
16061fi
16062
a3828db0
MK
16063# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
16064# since sigsetjmp might only be defined as a macro.
b4e70030
JB
16065echo "$as_me:$LINENO: checking for sigsetjmp" >&5
16066echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
a3828db0 16067if test "${gdb_cv_func_sigsetjmp+set}" = set; then
bec39cab
AC
16068 echo $ECHO_N "(cached) $ECHO_C" >&6
16069else
16070 cat >conftest.$ac_ext <<_ACEOF
16071/* confdefs.h. */
16072_ACEOF
16073cat confdefs.h >>conftest.$ac_ext
16074cat >>conftest.$ac_ext <<_ACEOF
16075/* end confdefs.h. */
a3828db0
MK
16076
16077#include <setjmp.h>
16078
bec39cab
AC
16079int
16080main ()
16081{
a3828db0 16082sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
16083 ;
16084 return 0;
16085}
16086_ACEOF
16087rm -f conftest.$ac_objext
16088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16089 (eval $ac_compile) 2>conftest.er1
16090 ac_status=$?
16091 grep -v '^ *+' conftest.er1 >conftest.err
16092 rm -f conftest.er1
16093 cat conftest.err >&5
16094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16095 (exit $ac_status); } &&
b4e70030
JB
16096 { ac_try='test -z "$ac_c_werror_flag"
16097 || test ! -s conftest.err'
bec39cab
AC
16098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16099 (eval $ac_try) 2>&5
16100 ac_status=$?
16101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16102 (exit $ac_status); }; } &&
16103 { ac_try='test -s conftest.$ac_objext'
16104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16105 (eval $ac_try) 2>&5
16106 ac_status=$?
16107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16108 (exit $ac_status); }; }; then
a3828db0 16109 gdb_cv_func_sigsetjmp=yes
c906108c 16110else
bec39cab
AC
16111 echo "$as_me: failed program was:" >&5
16112sed 's/^/| /' conftest.$ac_ext >&5
16113
b4e70030 16114gdb_cv_func_sigsetjmp=no
c906108c 16115fi
bec39cab 16116rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16117fi
b4e70030
JB
16118echo "$as_me:$LINENO: result: $gdb_cv_func_sigsetjmp" >&5
16119echo "${ECHO_T}$gdb_cv_func_sigsetjmp" >&6
a3828db0 16120if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 16121
a3828db0
MK
16122cat >>confdefs.h <<\_ACEOF
16123#define HAVE_SIGSETJMP 1
bec39cab 16124_ACEOF
c906108c 16125
97bf5e38 16126fi
c906108c 16127
a3828db0
MK
16128# Assume we'll default to using the included libiberty regex.
16129gdb_use_included_regex=yes
16130
16131# However, if the system regex is GNU regex, then default to *not*
16132# using the included regex.
b4e70030
JB
16133echo "$as_me:$LINENO: checking for GNU regex" >&5
16134echo $ECHO_N "checking for GNU regex... $ECHO_C" >&6
a3828db0 16135if test "${gdb_cv_have_gnu_regex+set}" = set; then
bec39cab
AC
16136 echo $ECHO_N "(cached) $ECHO_C" >&6
16137else
16138 cat >conftest.$ac_ext <<_ACEOF
16139/* confdefs.h. */
16140_ACEOF
16141cat confdefs.h >>conftest.$ac_ext
16142cat >>conftest.$ac_ext <<_ACEOF
16143/* end confdefs.h. */
a3828db0 16144#include <gnu-versions.h>
bec39cab
AC
16145int
16146main ()
16147{
a3828db0
MK
16148#define REGEX_INTERFACE_VERSION 1
16149#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
16150# error "Version mismatch"
16151#endif
bec39cab
AC
16152 ;
16153 return 0;
16154}
16155_ACEOF
16156rm -f conftest.$ac_objext
16157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16158 (eval $ac_compile) 2>conftest.er1
16159 ac_status=$?
16160 grep -v '^ *+' conftest.er1 >conftest.err
16161 rm -f conftest.er1
16162 cat conftest.err >&5
16163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16164 (exit $ac_status); } &&
b4e70030
JB
16165 { ac_try='test -z "$ac_c_werror_flag"
16166 || test ! -s conftest.err'
bec39cab
AC
16167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16168 (eval $ac_try) 2>&5
16169 ac_status=$?
16170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16171 (exit $ac_status); }; } &&
16172 { ac_try='test -s conftest.$ac_objext'
16173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16174 (eval $ac_try) 2>&5
16175 ac_status=$?
16176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16177 (exit $ac_status); }; }; then
a3828db0 16178 gdb_cv_have_gnu_regex=yes
c906108c 16179else
bec39cab
AC
16180 echo "$as_me: failed program was:" >&5
16181sed 's/^/| /' conftest.$ac_ext >&5
16182
b4e70030 16183gdb_cv_have_gnu_regex=no
c906108c 16184fi
bec39cab 16185rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16186fi
b4e70030
JB
16187echo "$as_me:$LINENO: result: $gdb_cv_have_gnu_regex" >&5
16188echo "${ECHO_T}$gdb_cv_have_gnu_regex" >&6
a3828db0
MK
16189if test $gdb_cv_have_gnu_regex = yes; then
16190 gdb_use_included_regex=no
16191fi
c906108c 16192
a3828db0 16193
b4e70030 16194# Check whether --with-included-regex or --without-included-regex was given.
a3828db0 16195if test "${with_included_regex+set}" = set; then
b4e70030
JB
16196 withval="$with_included_regex"
16197 gdb_with_regex=$withval
a3828db0
MK
16198else
16199 gdb_with_regex=$gdb_use_included_regex
b4e70030 16200fi;
a3828db0
MK
16201if test "$gdb_with_regex" = yes; then
16202
16203cat >>confdefs.h <<\_ACEOF
16204#define USE_INCLUDED_REGEX 1
bec39cab 16205_ACEOF
c906108c 16206
97bf5e38 16207fi
c906108c 16208
5c45e068 16209# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
b4e70030
JB
16210echo "$as_me:$LINENO: checking for struct thread.td_pcb" >&5
16211echo $ECHO_N "checking for struct thread.td_pcb... $ECHO_C" >&6
5c45e068 16212if test "${ac_cv_member_struct_thread_td_pcb+set}" = set; then
bec39cab
AC
16213 echo $ECHO_N "(cached) $ECHO_C" >&6
16214else
16215 cat >conftest.$ac_ext <<_ACEOF
16216/* confdefs.h. */
16217_ACEOF
16218cat confdefs.h >>conftest.$ac_ext
16219cat >>conftest.$ac_ext <<_ACEOF
16220/* end confdefs.h. */
a3828db0
MK
16221#include <sys/param.h>
16222#include <sys/proc.h>
5c45e068
MK
16223
16224
bec39cab
AC
16225int
16226main ()
16227{
5c45e068
MK
16228static struct thread ac_aggr;
16229if (ac_aggr.td_pcb)
16230return 0;
bec39cab
AC
16231 ;
16232 return 0;
16233}
16234_ACEOF
16235rm -f conftest.$ac_objext
16236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16237 (eval $ac_compile) 2>conftest.er1
16238 ac_status=$?
16239 grep -v '^ *+' conftest.er1 >conftest.err
16240 rm -f conftest.er1
16241 cat conftest.err >&5
16242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16243 (exit $ac_status); } &&
b4e70030
JB
16244 { ac_try='test -z "$ac_c_werror_flag"
16245 || test ! -s conftest.err'
bec39cab
AC
16246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16247 (eval $ac_try) 2>&5
16248 ac_status=$?
16249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16250 (exit $ac_status); }; } &&
16251 { ac_try='test -s conftest.$ac_objext'
16252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16253 (eval $ac_try) 2>&5
16254 ac_status=$?
16255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16256 (exit $ac_status); }; }; then
5c45e068 16257 ac_cv_member_struct_thread_td_pcb=yes
c906108c 16258else
bec39cab
AC
16259 echo "$as_me: failed program was:" >&5
16260sed 's/^/| /' conftest.$ac_ext >&5
16261
b4e70030 16262cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16263/* confdefs.h. */
16264_ACEOF
16265cat confdefs.h >>conftest.$ac_ext
16266cat >>conftest.$ac_ext <<_ACEOF
16267/* end confdefs.h. */
16268#include <sys/param.h>
16269#include <sys/proc.h>
16270
16271
16272int
16273main ()
16274{
16275static struct thread ac_aggr;
16276if (sizeof ac_aggr.td_pcb)
16277return 0;
16278 ;
16279 return 0;
16280}
16281_ACEOF
16282rm -f conftest.$ac_objext
16283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16284 (eval $ac_compile) 2>conftest.er1
16285 ac_status=$?
16286 grep -v '^ *+' conftest.er1 >conftest.err
16287 rm -f conftest.er1
16288 cat conftest.err >&5
16289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16290 (exit $ac_status); } &&
b4e70030
JB
16291 { ac_try='test -z "$ac_c_werror_flag"
16292 || test ! -s conftest.err'
5c45e068
MK
16293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16294 (eval $ac_try) 2>&5
16295 ac_status=$?
16296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16297 (exit $ac_status); }; } &&
16298 { ac_try='test -s conftest.$ac_objext'
16299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16300 (eval $ac_try) 2>&5
16301 ac_status=$?
16302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16303 (exit $ac_status); }; }; then
16304 ac_cv_member_struct_thread_td_pcb=yes
16305else
16306 echo "$as_me: failed program was:" >&5
16307sed 's/^/| /' conftest.$ac_ext >&5
16308
b4e70030 16309ac_cv_member_struct_thread_td_pcb=no
5c45e068
MK
16310fi
16311rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16312fi
bec39cab 16313rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16314fi
b4e70030
JB
16315echo "$as_me:$LINENO: result: $ac_cv_member_struct_thread_td_pcb" >&5
16316echo "${ECHO_T}$ac_cv_member_struct_thread_td_pcb" >&6
5c45e068 16317if test $ac_cv_member_struct_thread_td_pcb = yes; then
c906108c 16318
5c45e068 16319cat >>confdefs.h <<_ACEOF
a3828db0 16320#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 16321_ACEOF
c906108c 16322
5c45e068 16323
97bf5e38 16324fi
c906108c 16325
5c45e068 16326
a3828db0 16327# See if <sys/lwp.h> defines `struct lwp`.
b4e70030
JB
16328echo "$as_me:$LINENO: checking for struct lwp" >&5
16329echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
a3828db0 16330if test "${gdb_cv_struct_lwp+set}" = set; then
bec39cab
AC
16331 echo $ECHO_N "(cached) $ECHO_C" >&6
16332else
16333 cat >conftest.$ac_ext <<_ACEOF
16334/* confdefs.h. */
16335_ACEOF
16336cat confdefs.h >>conftest.$ac_ext
16337cat >>conftest.$ac_ext <<_ACEOF
16338/* end confdefs.h. */
a3828db0
MK
16339#include <sys/param.h>
16340#include <sys/lwp.h>
bec39cab
AC
16341int
16342main ()
16343{
a3828db0 16344struct lwp l;
bec39cab
AC
16345 ;
16346 return 0;
16347}
16348_ACEOF
16349rm -f conftest.$ac_objext
16350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16351 (eval $ac_compile) 2>conftest.er1
16352 ac_status=$?
16353 grep -v '^ *+' conftest.er1 >conftest.err
16354 rm -f conftest.er1
16355 cat conftest.err >&5
16356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16357 (exit $ac_status); } &&
b4e70030
JB
16358 { ac_try='test -z "$ac_c_werror_flag"
16359 || test ! -s conftest.err'
bec39cab
AC
16360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16361 (eval $ac_try) 2>&5
16362 ac_status=$?
16363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16364 (exit $ac_status); }; } &&
16365 { ac_try='test -s conftest.$ac_objext'
16366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16367 (eval $ac_try) 2>&5
16368 ac_status=$?
16369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16370 (exit $ac_status); }; }; then
a3828db0 16371 gdb_cv_struct_lwp=yes
c906108c 16372else
bec39cab
AC
16373 echo "$as_me: failed program was:" >&5
16374sed 's/^/| /' conftest.$ac_ext >&5
16375
b4e70030 16376gdb_cv_struct_lwp=no
c906108c 16377fi
bec39cab 16378rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16379fi
b4e70030
JB
16380echo "$as_me:$LINENO: result: $gdb_cv_struct_lwp" >&5
16381echo "${ECHO_T}$gdb_cv_struct_lwp" >&6
a3828db0 16382if test $gdb_cv_struct_lwp = yes; then
c906108c 16383
a3828db0
MK
16384cat >>confdefs.h <<\_ACEOF
16385#define HAVE_STRUCT_LWP 1
bec39cab 16386_ACEOF
c906108c 16387
97bf5e38 16388fi
c906108c 16389
a3828db0 16390# See if <machine/reg.h> degines `struct reg'.
b4e70030
JB
16391echo "$as_me:$LINENO: checking for struct reg in machine/reg.h" >&5
16392echo $ECHO_N "checking for struct reg in machine/reg.h... $ECHO_C" >&6
a3828db0 16393if test "${gdb_cv_struct_reg+set}" = set; then
bec39cab
AC
16394 echo $ECHO_N "(cached) $ECHO_C" >&6
16395else
16396 cat >conftest.$ac_ext <<_ACEOF
16397/* confdefs.h. */
16398_ACEOF
16399cat confdefs.h >>conftest.$ac_ext
16400cat >>conftest.$ac_ext <<_ACEOF
16401/* end confdefs.h. */
a3828db0
MK
16402#include <sys/types.h>
16403#include <machine/reg.h>
bec39cab
AC
16404int
16405main ()
16406{
a3828db0 16407struct reg r;
bec39cab
AC
16408 ;
16409 return 0;
16410}
16411_ACEOF
16412rm -f conftest.$ac_objext
16413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16414 (eval $ac_compile) 2>conftest.er1
16415 ac_status=$?
16416 grep -v '^ *+' conftest.er1 >conftest.err
16417 rm -f conftest.er1
16418 cat conftest.err >&5
16419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16420 (exit $ac_status); } &&
b4e70030
JB
16421 { ac_try='test -z "$ac_c_werror_flag"
16422 || test ! -s conftest.err'
bec39cab
AC
16423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16424 (eval $ac_try) 2>&5
16425 ac_status=$?
16426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16427 (exit $ac_status); }; } &&
16428 { ac_try='test -s conftest.$ac_objext'
16429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16430 (eval $ac_try) 2>&5
16431 ac_status=$?
16432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16433 (exit $ac_status); }; }; then
a3828db0 16434 gdb_cv_struct_reg=yes
27ca5dad 16435else
bec39cab
AC
16436 echo "$as_me: failed program was:" >&5
16437sed 's/^/| /' conftest.$ac_ext >&5
16438
b4e70030 16439gdb_cv_struct_reg=no
27ca5dad 16440fi
bec39cab 16441rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 16442fi
b4e70030
JB
16443echo "$as_me:$LINENO: result: $gdb_cv_struct_reg" >&5
16444echo "${ECHO_T}$gdb_cv_struct_reg" >&6
a3828db0 16445if test $gdb_cv_struct_reg = yes; then
bec39cab
AC
16446
16447cat >>confdefs.h <<\_ACEOF
a3828db0 16448#define HAVE_STRUCT_REG 1
bec39cab 16449_ACEOF
27ca5dad
MC
16450
16451fi
97bf5e38 16452
a3828db0
MK
16453# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
16454# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
b4e70030
JB
16455echo "$as_me:$LINENO: checking for struct reg.r_fs" >&5
16456echo $ECHO_N "checking for struct reg.r_fs... $ECHO_C" >&6
5c45e068 16457if test "${ac_cv_member_struct_reg_r_fs+set}" = set; then
bec39cab 16458 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16459else
bec39cab
AC
16460 cat >conftest.$ac_ext <<_ACEOF
16461/* confdefs.h. */
16462_ACEOF
16463cat confdefs.h >>conftest.$ac_ext
16464cat >>conftest.$ac_ext <<_ACEOF
16465/* end confdefs.h. */
a3828db0 16466#include <machine/reg.h>
5c45e068
MK
16467
16468int
16469main ()
16470{
16471static struct reg ac_aggr;
16472if (ac_aggr.r_fs)
16473return 0;
16474 ;
16475 return 0;
16476}
16477_ACEOF
16478rm -f conftest.$ac_objext
16479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16480 (eval $ac_compile) 2>conftest.er1
16481 ac_status=$?
16482 grep -v '^ *+' conftest.er1 >conftest.err
16483 rm -f conftest.er1
16484 cat conftest.err >&5
16485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16486 (exit $ac_status); } &&
b4e70030
JB
16487 { ac_try='test -z "$ac_c_werror_flag"
16488 || test ! -s conftest.err'
5c45e068
MK
16489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16490 (eval $ac_try) 2>&5
16491 ac_status=$?
16492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16493 (exit $ac_status); }; } &&
16494 { ac_try='test -s conftest.$ac_objext'
16495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16496 (eval $ac_try) 2>&5
16497 ac_status=$?
16498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16499 (exit $ac_status); }; }; then
16500 ac_cv_member_struct_reg_r_fs=yes
16501else
16502 echo "$as_me: failed program was:" >&5
16503sed 's/^/| /' conftest.$ac_ext >&5
16504
b4e70030 16505cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16506/* confdefs.h. */
16507_ACEOF
16508cat confdefs.h >>conftest.$ac_ext
16509cat >>conftest.$ac_ext <<_ACEOF
16510/* end confdefs.h. */
16511#include <machine/reg.h>
16512
bec39cab
AC
16513int
16514main ()
16515{
5c45e068
MK
16516static struct reg ac_aggr;
16517if (sizeof ac_aggr.r_fs)
16518return 0;
bec39cab
AC
16519 ;
16520 return 0;
16521}
16522_ACEOF
16523rm -f conftest.$ac_objext
16524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16525 (eval $ac_compile) 2>conftest.er1
16526 ac_status=$?
16527 grep -v '^ *+' conftest.er1 >conftest.err
16528 rm -f conftest.er1
16529 cat conftest.err >&5
16530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16531 (exit $ac_status); } &&
b4e70030
JB
16532 { ac_try='test -z "$ac_c_werror_flag"
16533 || test ! -s conftest.err'
bec39cab
AC
16534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16535 (eval $ac_try) 2>&5
16536 ac_status=$?
16537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16538 (exit $ac_status); }; } &&
16539 { ac_try='test -s conftest.$ac_objext'
16540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16541 (eval $ac_try) 2>&5
16542 ac_status=$?
16543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16544 (exit $ac_status); }; }; then
5c45e068 16545 ac_cv_member_struct_reg_r_fs=yes
3862412b 16546else
bec39cab
AC
16547 echo "$as_me: failed program was:" >&5
16548sed 's/^/| /' conftest.$ac_ext >&5
16549
b4e70030 16550ac_cv_member_struct_reg_r_fs=no
3862412b 16551fi
bec39cab 16552rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 16553fi
5c45e068
MK
16554rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16555fi
b4e70030
JB
16556echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_fs" >&5
16557echo "${ECHO_T}$ac_cv_member_struct_reg_r_fs" >&6
5c45e068
MK
16558if test $ac_cv_member_struct_reg_r_fs = yes; then
16559
16560cat >>confdefs.h <<_ACEOF
a3828db0 16561#define HAVE_STRUCT_REG_R_FS 1
bec39cab 16562_ACEOF
3862412b 16563
5c45e068 16564
97bf5e38 16565fi
b4e70030
JB
16566echo "$as_me:$LINENO: checking for struct reg.r_gs" >&5
16567echo $ECHO_N "checking for struct reg.r_gs... $ECHO_C" >&6
5c45e068 16568if test "${ac_cv_member_struct_reg_r_gs+set}" = set; then
bec39cab 16569 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16570else
bec39cab
AC
16571 cat >conftest.$ac_ext <<_ACEOF
16572/* confdefs.h. */
16573_ACEOF
16574cat confdefs.h >>conftest.$ac_ext
16575cat >>conftest.$ac_ext <<_ACEOF
16576/* end confdefs.h. */
a3828db0 16577#include <machine/reg.h>
5c45e068 16578
bec39cab
AC
16579int
16580main ()
16581{
5c45e068
MK
16582static struct reg ac_aggr;
16583if (ac_aggr.r_gs)
16584return 0;
bec39cab
AC
16585 ;
16586 return 0;
16587}
16588_ACEOF
16589rm -f conftest.$ac_objext
16590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16591 (eval $ac_compile) 2>conftest.er1
16592 ac_status=$?
16593 grep -v '^ *+' conftest.er1 >conftest.err
16594 rm -f conftest.er1
16595 cat conftest.err >&5
16596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16597 (exit $ac_status); } &&
b4e70030
JB
16598 { ac_try='test -z "$ac_c_werror_flag"
16599 || test ! -s conftest.err'
bec39cab
AC
16600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16601 (eval $ac_try) 2>&5
16602 ac_status=$?
16603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16604 (exit $ac_status); }; } &&
16605 { ac_try='test -s conftest.$ac_objext'
16606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16607 (eval $ac_try) 2>&5
16608 ac_status=$?
16609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16610 (exit $ac_status); }; }; then
5c45e068 16611 ac_cv_member_struct_reg_r_gs=yes
3862412b 16612else
bec39cab
AC
16613 echo "$as_me: failed program was:" >&5
16614sed 's/^/| /' conftest.$ac_ext >&5
16615
b4e70030 16616cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16617/* confdefs.h. */
16618_ACEOF
16619cat confdefs.h >>conftest.$ac_ext
16620cat >>conftest.$ac_ext <<_ACEOF
16621/* end confdefs.h. */
16622#include <machine/reg.h>
16623
16624int
16625main ()
16626{
16627static struct reg ac_aggr;
16628if (sizeof ac_aggr.r_gs)
16629return 0;
16630 ;
16631 return 0;
16632}
16633_ACEOF
16634rm -f conftest.$ac_objext
16635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16636 (eval $ac_compile) 2>conftest.er1
16637 ac_status=$?
16638 grep -v '^ *+' conftest.er1 >conftest.err
16639 rm -f conftest.er1
16640 cat conftest.err >&5
16641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16642 (exit $ac_status); } &&
b4e70030
JB
16643 { ac_try='test -z "$ac_c_werror_flag"
16644 || test ! -s conftest.err'
5c45e068
MK
16645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16646 (eval $ac_try) 2>&5
16647 ac_status=$?
16648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16649 (exit $ac_status); }; } &&
16650 { ac_try='test -s conftest.$ac_objext'
16651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16652 (eval $ac_try) 2>&5
16653 ac_status=$?
16654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16655 (exit $ac_status); }; }; then
16656 ac_cv_member_struct_reg_r_gs=yes
16657else
16658 echo "$as_me: failed program was:" >&5
16659sed 's/^/| /' conftest.$ac_ext >&5
16660
b4e70030 16661ac_cv_member_struct_reg_r_gs=no
3862412b 16662fi
bec39cab 16663rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 16664fi
5c45e068
MK
16665rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16666fi
b4e70030
JB
16667echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_gs" >&5
16668echo "${ECHO_T}$ac_cv_member_struct_reg_r_gs" >&6
5c45e068
MK
16669if test $ac_cv_member_struct_reg_r_gs = yes; then
16670
16671cat >>confdefs.h <<_ACEOF
a3828db0 16672#define HAVE_STRUCT_REG_R_GS 1
bec39cab 16673_ACEOF
3862412b 16674
5c45e068 16675
97bf5e38 16676fi
3862412b 16677
5c45e068 16678
a3828db0 16679# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
b4e70030
JB
16680echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
16681echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
a3828db0 16682if test "${gdb_cv_have_ptrace_getregs+set}" = set; then
bec39cab 16683 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 16684else
bec39cab
AC
16685 cat >conftest.$ac_ext <<_ACEOF
16686/* confdefs.h. */
16687_ACEOF
16688cat confdefs.h >>conftest.$ac_ext
16689cat >>conftest.$ac_ext <<_ACEOF
16690/* end confdefs.h. */
a3828db0 16691#include <sys/ptrace.h>
bec39cab
AC
16692int
16693main ()
16694{
a3828db0 16695PTRACE_GETREGS;
bec39cab
AC
16696 ;
16697 return 0;
16698}
16699_ACEOF
16700rm -f conftest.$ac_objext
16701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16702 (eval $ac_compile) 2>conftest.er1
16703 ac_status=$?
16704 grep -v '^ *+' conftest.er1 >conftest.err
16705 rm -f conftest.er1
16706 cat conftest.err >&5
16707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16708 (exit $ac_status); } &&
b4e70030
JB
16709 { ac_try='test -z "$ac_c_werror_flag"
16710 || test ! -s conftest.err'
bec39cab
AC
16711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16712 (eval $ac_try) 2>&5
16713 ac_status=$?
16714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16715 (exit $ac_status); }; } &&
16716 { ac_try='test -s conftest.$ac_objext'
16717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16718 (eval $ac_try) 2>&5
16719 ac_status=$?
16720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16721 (exit $ac_status); }; }; then
a3828db0 16722 gdb_cv_have_ptrace_getregs=yes
451928c5 16723else
bec39cab
AC
16724 echo "$as_me: failed program was:" >&5
16725sed 's/^/| /' conftest.$ac_ext >&5
16726
b4e70030 16727gdb_cv_have_ptrace_getregs=no
451928c5 16728fi
bec39cab 16729rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
16730fi
16731
b4e70030
JB
16732echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getregs" >&5
16733echo "${ECHO_T}$gdb_cv_have_ptrace_getregs" >&6
a3828db0 16734if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f
SE
16735
16736cat >>confdefs.h <<\_ACEOF
a3828db0 16737#define HAVE_PTRACE_GETREGS 1
bec39cab 16738_ACEOF
451928c5 16739
97bf5e38 16740fi
451928c5 16741
a3828db0 16742# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
b4e70030
JB
16743echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5
16744echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6
a3828db0 16745if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then
bec39cab 16746 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 16747else
bec39cab
AC
16748 cat >conftest.$ac_ext <<_ACEOF
16749/* confdefs.h. */
16750_ACEOF
16751cat confdefs.h >>conftest.$ac_ext
16752cat >>conftest.$ac_ext <<_ACEOF
16753/* end confdefs.h. */
a3828db0 16754#include <sys/ptrace.h>
bec39cab
AC
16755int
16756main ()
16757{
a3828db0 16758PTRACE_GETFPXREGS;
bec39cab
AC
16759 ;
16760 return 0;
16761}
16762_ACEOF
16763rm -f conftest.$ac_objext
16764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16765 (eval $ac_compile) 2>conftest.er1
16766 ac_status=$?
16767 grep -v '^ *+' conftest.er1 >conftest.err
16768 rm -f conftest.er1
16769 cat conftest.err >&5
16770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16771 (exit $ac_status); } &&
b4e70030
JB
16772 { ac_try='test -z "$ac_c_werror_flag"
16773 || test ! -s conftest.err'
bec39cab
AC
16774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16775 (eval $ac_try) 2>&5
16776 ac_status=$?
16777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16778 (exit $ac_status); }; } &&
16779 { ac_try='test -s conftest.$ac_objext'
16780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16781 (eval $ac_try) 2>&5
16782 ac_status=$?
16783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16784 (exit $ac_status); }; }; then
a3828db0 16785 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 16786else
bec39cab
AC
16787 echo "$as_me: failed program was:" >&5
16788sed 's/^/| /' conftest.$ac_ext >&5
16789
b4e70030 16790gdb_cv_have_ptrace_getfpxregs=no
451928c5 16791fi
bec39cab 16792rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
16793fi
16794
b4e70030
JB
16795echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getfpxregs" >&5
16796echo "${ECHO_T}$gdb_cv_have_ptrace_getfpxregs" >&6
a3828db0 16797if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f
SE
16798
16799cat >>confdefs.h <<\_ACEOF
a3828db0 16800#define HAVE_PTRACE_GETFPXREGS 1
bec39cab 16801_ACEOF
451928c5 16802
97bf5e38 16803fi
451928c5 16804
a3828db0 16805# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
b4e70030
JB
16806echo "$as_me:$LINENO: checking for PT_GETDBREGS" >&5
16807echo $ECHO_N "checking for PT_GETDBREGS... $ECHO_C" >&6
a3828db0 16808if test "${gdb_cv_have_pt_getdbregs+set}" = set; then
bec39cab 16809 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16810else
bec39cab
AC
16811 cat >conftest.$ac_ext <<_ACEOF
16812/* confdefs.h. */
16813_ACEOF
16814cat confdefs.h >>conftest.$ac_ext
16815cat >>conftest.$ac_ext <<_ACEOF
16816/* end confdefs.h. */
a3828db0
MK
16817#include <sys/types.h>
16818#include <sys/ptrace.h>
bec39cab
AC
16819int
16820main ()
16821{
a3828db0 16822PT_GETDBREGS;
bec39cab
AC
16823 ;
16824 return 0;
16825}
16826_ACEOF
16827rm -f conftest.$ac_objext
16828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16829 (eval $ac_compile) 2>conftest.er1
16830 ac_status=$?
16831 grep -v '^ *+' conftest.er1 >conftest.err
16832 rm -f conftest.er1
16833 cat conftest.err >&5
16834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16835 (exit $ac_status); } &&
b4e70030
JB
16836 { ac_try='test -z "$ac_c_werror_flag"
16837 || test ! -s conftest.err'
bec39cab
AC
16838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16839 (eval $ac_try) 2>&5
16840 ac_status=$?
16841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16842 (exit $ac_status); }; } &&
16843 { ac_try='test -s conftest.$ac_objext'
16844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16845 (eval $ac_try) 2>&5
16846 ac_status=$?
16847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16848 (exit $ac_status); }; }; then
a3828db0 16849 gdb_cv_have_pt_getdbregs=yes
3862412b 16850else
bec39cab
AC
16851 echo "$as_me: failed program was:" >&5
16852sed 's/^/| /' conftest.$ac_ext >&5
16853
b4e70030 16854gdb_cv_have_pt_getdbregs=no
3862412b 16855fi
bec39cab 16856rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
16857fi
16858
b4e70030
JB
16859echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getdbregs" >&5
16860echo "${ECHO_T}$gdb_cv_have_pt_getdbregs" >&6
a3828db0 16861if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f
SE
16862
16863cat >>confdefs.h <<\_ACEOF
a3828db0 16864#define HAVE_PT_GETDBREGS 1
bec39cab 16865_ACEOF
3862412b 16866
97bf5e38 16867fi
3862412b 16868
a3828db0 16869# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
b4e70030
JB
16870echo "$as_me:$LINENO: checking for PT_GETXMMREGS" >&5
16871echo $ECHO_N "checking for PT_GETXMMREGS... $ECHO_C" >&6
a3828db0 16872if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then
bec39cab 16873 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16874else
bec39cab
AC
16875 cat >conftest.$ac_ext <<_ACEOF
16876/* confdefs.h. */
16877_ACEOF
16878cat confdefs.h >>conftest.$ac_ext
16879cat >>conftest.$ac_ext <<_ACEOF
16880/* end confdefs.h. */
a3828db0
MK
16881#include <sys/types.h>
16882#include <sys/ptrace.h>
bec39cab
AC
16883int
16884main ()
16885{
a3828db0 16886PT_GETXMMREGS;
bec39cab
AC
16887 ;
16888 return 0;
16889}
16890_ACEOF
16891rm -f conftest.$ac_objext
16892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16893 (eval $ac_compile) 2>conftest.er1
16894 ac_status=$?
16895 grep -v '^ *+' conftest.er1 >conftest.err
16896 rm -f conftest.er1
16897 cat conftest.err >&5
16898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16899 (exit $ac_status); } &&
b4e70030
JB
16900 { ac_try='test -z "$ac_c_werror_flag"
16901 || test ! -s conftest.err'
bec39cab
AC
16902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16903 (eval $ac_try) 2>&5
16904 ac_status=$?
16905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16906 (exit $ac_status); }; } &&
16907 { ac_try='test -s conftest.$ac_objext'
16908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16909 (eval $ac_try) 2>&5
16910 ac_status=$?
16911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16912 (exit $ac_status); }; }; then
a3828db0 16913 gdb_cv_have_pt_getxmmregs=yes
3862412b 16914else
bec39cab
AC
16915 echo "$as_me: failed program was:" >&5
16916sed 's/^/| /' conftest.$ac_ext >&5
16917
b4e70030 16918gdb_cv_have_pt_getxmmregs=no
3862412b 16919fi
bec39cab 16920rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
16921fi
16922
b4e70030
JB
16923echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getxmmregs" >&5
16924echo "${ECHO_T}$gdb_cv_have_pt_getxmmregs" >&6
a3828db0 16925if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f
SE
16926
16927cat >>confdefs.h <<\_ACEOF
a3828db0 16928#define HAVE_PT_GETXMMREGS 1
bec39cab 16929_ACEOF
3862412b 16930
97bf5e38 16931fi
3862412b 16932
eb368090 16933# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
16934
16935if test "${target}" = "${host}"; then
16936 case "${host}" in
97bf5e38 16937 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f
SE
16938
16939cat >>confdefs.h <<\_ACEOF
97bf5e38 16940#define NEW_PROC_API 1
bec39cab 16941_ACEOF
97bf5e38
MK
16942
16943 ;;
c162e8c9 16944 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f
SE
16945
16946cat >>confdefs.h <<\_ACEOF
97bf5e38 16947#define NEW_PROC_API 1
bec39cab 16948_ACEOF
c960c18f
AC
16949
16950 ;;
16951 mips-sgi-irix5*)
16952 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f
SE
16953
16954cat >>confdefs.h <<\_ACEOF
c960c18f 16955#define _KMEMUSER 1
bec39cab 16956_ACEOF
97bf5e38
MK
16957
16958 ;;
16959 esac
16960fi
16961
16962if test "$ac_cv_header_sys_procfs_h" = yes; then
b4e70030
JB
16963 echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5
16964echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
16965 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then
16966 echo $ECHO_N "(cached) $ECHO_C" >&6
16967else
16968 cat >conftest.$ac_ext <<_ACEOF
16969/* confdefs.h. */
16970_ACEOF
16971cat confdefs.h >>conftest.$ac_ext
16972cat >>conftest.$ac_ext <<_ACEOF
16973/* end confdefs.h. */
596c9d4b
KB
16974
16975#define _SYSCALL32
16976#include <sys/procfs.h>
bec39cab
AC
16977int
16978main ()
16979{
97bf5e38 16980pstatus_t avar
bec39cab
AC
16981 ;
16982 return 0;
16983}
16984_ACEOF
16985rm -f conftest.$ac_objext
16986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16987 (eval $ac_compile) 2>conftest.er1
16988 ac_status=$?
16989 grep -v '^ *+' conftest.er1 >conftest.err
16990 rm -f conftest.er1
16991 cat conftest.err >&5
16992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16993 (exit $ac_status); } &&
b4e70030
JB
16994 { ac_try='test -z "$ac_c_werror_flag"
16995 || test ! -s conftest.err'
bec39cab
AC
16996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16997 (eval $ac_try) 2>&5
16998 ac_status=$?
16999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17000 (exit $ac_status); }; } &&
17001 { ac_try='test -s conftest.$ac_objext'
17002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17003 (eval $ac_try) 2>&5
17004 ac_status=$?
17005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17006 (exit $ac_status); }; }; then
97bf5e38 17007 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 17008else
bec39cab
AC
17009 echo "$as_me: failed program was:" >&5
17010sed 's/^/| /' conftest.$ac_ext >&5
17011
b4e70030 17012bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 17013
596c9d4b 17014fi
bec39cab 17015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17016fi
17017
97bf5e38 17018 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab
AC
17019
17020cat >>confdefs.h <<\_ACEOF
97bf5e38 17021#define HAVE_PSTATUS_T 1
bec39cab 17022_ACEOF
596c9d4b
KB
17023
17024 fi
b4e70030
JB
17025 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
17026echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6
596c9d4b 17027
b4e70030
JB
17028 echo "$as_me:$LINENO: checking for prrun_t in sys/procfs.h" >&5
17029echo $ECHO_N "checking for prrun_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17030 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then
17031 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 17032else
bec39cab
AC
17033 cat >conftest.$ac_ext <<_ACEOF
17034/* confdefs.h. */
17035_ACEOF
17036cat confdefs.h >>conftest.$ac_ext
17037cat >>conftest.$ac_ext <<_ACEOF
17038/* end confdefs.h. */
596c9d4b
KB
17039
17040#define _SYSCALL32
17041#include <sys/procfs.h>
bec39cab
AC
17042int
17043main ()
17044{
97bf5e38 17045prrun_t avar
bec39cab
AC
17046 ;
17047 return 0;
17048}
17049_ACEOF
17050rm -f conftest.$ac_objext
17051if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17052 (eval $ac_compile) 2>conftest.er1
17053 ac_status=$?
17054 grep -v '^ *+' conftest.er1 >conftest.err
17055 rm -f conftest.er1
17056 cat conftest.err >&5
17057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17058 (exit $ac_status); } &&
b4e70030
JB
17059 { ac_try='test -z "$ac_c_werror_flag"
17060 || test ! -s conftest.err'
bec39cab
AC
17061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17062 (eval $ac_try) 2>&5
17063 ac_status=$?
17064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17065 (exit $ac_status); }; } &&
17066 { ac_try='test -s conftest.$ac_objext'
17067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17068 (eval $ac_try) 2>&5
17069 ac_status=$?
17070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17071 (exit $ac_status); }; }; then
97bf5e38 17072 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 17073else
bec39cab
AC
17074 echo "$as_me: failed program was:" >&5
17075sed 's/^/| /' conftest.$ac_ext >&5
17076
b4e70030 17077bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 17078
596c9d4b 17079fi
bec39cab 17080rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17081fi
17082
97bf5e38 17083 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab
AC
17084
17085cat >>confdefs.h <<\_ACEOF
97bf5e38 17086#define HAVE_PRRUN_T 1
bec39cab 17087_ACEOF
596c9d4b
KB
17088
17089 fi
b4e70030
JB
17090 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
17091echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prrun_t" >&6
596c9d4b 17092
b4e70030
JB
17093 echo "$as_me:$LINENO: checking for gregset_t in sys/procfs.h" >&5
17094echo $ECHO_N "checking for gregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17095 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then
17096 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 17097else
bec39cab
AC
17098 cat >conftest.$ac_ext <<_ACEOF
17099/* confdefs.h. */
17100_ACEOF
17101cat confdefs.h >>conftest.$ac_ext
17102cat >>conftest.$ac_ext <<_ACEOF
17103/* end confdefs.h. */
596c9d4b
KB
17104
17105#define _SYSCALL32
17106#include <sys/procfs.h>
bec39cab
AC
17107int
17108main ()
17109{
97bf5e38 17110gregset_t avar
bec39cab
AC
17111 ;
17112 return 0;
17113}
17114_ACEOF
17115rm -f conftest.$ac_objext
17116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17117 (eval $ac_compile) 2>conftest.er1
17118 ac_status=$?
17119 grep -v '^ *+' conftest.er1 >conftest.err
17120 rm -f conftest.er1
17121 cat conftest.err >&5
17122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17123 (exit $ac_status); } &&
b4e70030
JB
17124 { ac_try='test -z "$ac_c_werror_flag"
17125 || test ! -s conftest.err'
bec39cab
AC
17126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17127 (eval $ac_try) 2>&5
17128 ac_status=$?
17129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17130 (exit $ac_status); }; } &&
17131 { ac_try='test -s conftest.$ac_objext'
17132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17133 (eval $ac_try) 2>&5
17134 ac_status=$?
17135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17136 (exit $ac_status); }; }; then
97bf5e38 17137 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 17138else
bec39cab
AC
17139 echo "$as_me: failed program was:" >&5
17140sed 's/^/| /' conftest.$ac_ext >&5
17141
b4e70030 17142bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 17143
596c9d4b 17144fi
bec39cab 17145rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17146fi
17147
97bf5e38 17148 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab
AC
17149
17150cat >>confdefs.h <<\_ACEOF
97bf5e38 17151#define HAVE_GREGSET_T 1
bec39cab 17152_ACEOF
596c9d4b
KB
17153
17154 fi
b4e70030
JB
17155 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
17156echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_gregset_t" >&6
451928c5 17157
b4e70030
JB
17158 echo "$as_me:$LINENO: checking for fpregset_t in sys/procfs.h" >&5
17159echo $ECHO_N "checking for fpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17160 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then
17161 echo $ECHO_N "(cached) $ECHO_C" >&6
d84dd0c5 17162else
bec39cab
AC
17163 cat >conftest.$ac_ext <<_ACEOF
17164/* confdefs.h. */
17165_ACEOF
17166cat confdefs.h >>conftest.$ac_ext
17167cat >>conftest.$ac_ext <<_ACEOF
17168/* end confdefs.h. */
97bf5e38
MK
17169
17170#define _SYSCALL32
d84dd0c5 17171#include <sys/procfs.h>
bec39cab
AC
17172int
17173main ()
17174{
97bf5e38 17175fpregset_t avar
bec39cab
AC
17176 ;
17177 return 0;
17178}
17179_ACEOF
17180rm -f conftest.$ac_objext
17181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17182 (eval $ac_compile) 2>conftest.er1
17183 ac_status=$?
17184 grep -v '^ *+' conftest.er1 >conftest.err
17185 rm -f conftest.er1
17186 cat conftest.err >&5
17187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17188 (exit $ac_status); } &&
b4e70030
JB
17189 { ac_try='test -z "$ac_c_werror_flag"
17190 || test ! -s conftest.err'
bec39cab
AC
17191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17192 (eval $ac_try) 2>&5
17193 ac_status=$?
17194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17195 (exit $ac_status); }; } &&
17196 { ac_try='test -s conftest.$ac_objext'
17197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17198 (eval $ac_try) 2>&5
17199 ac_status=$?
17200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17201 (exit $ac_status); }; }; then
97bf5e38 17202 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 17203else
bec39cab
AC
17204 echo "$as_me: failed program was:" >&5
17205sed 's/^/| /' conftest.$ac_ext >&5
17206
b4e70030 17207bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 17208
d84dd0c5 17209fi
bec39cab 17210rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
17211fi
17212
97bf5e38 17213 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab
AC
17214
17215cat >>confdefs.h <<\_ACEOF
97bf5e38 17216#define HAVE_FPREGSET_T 1
bec39cab 17217_ACEOF
d84dd0c5 17218
97bf5e38 17219 fi
b4e70030
JB
17220 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
17221echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_fpregset_t" >&6
d84dd0c5 17222
b4e70030
JB
17223 echo "$as_me:$LINENO: checking for prgregset_t in sys/procfs.h" >&5
17224echo $ECHO_N "checking for prgregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17225 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then
17226 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17227else
bec39cab
AC
17228 cat >conftest.$ac_ext <<_ACEOF
17229/* confdefs.h. */
17230_ACEOF
17231cat confdefs.h >>conftest.$ac_ext
17232cat >>conftest.$ac_ext <<_ACEOF
17233/* end confdefs.h. */
c906108c 17234
97bf5e38
MK
17235#define _SYSCALL32
17236#include <sys/procfs.h>
bec39cab
AC
17237int
17238main ()
17239{
97bf5e38 17240prgregset_t avar
bec39cab
AC
17241 ;
17242 return 0;
17243}
17244_ACEOF
17245rm -f conftest.$ac_objext
17246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17247 (eval $ac_compile) 2>conftest.er1
17248 ac_status=$?
17249 grep -v '^ *+' conftest.er1 >conftest.err
17250 rm -f conftest.er1
17251 cat conftest.err >&5
17252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17253 (exit $ac_status); } &&
b4e70030
JB
17254 { ac_try='test -z "$ac_c_werror_flag"
17255 || test ! -s conftest.err'
bec39cab
AC
17256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17257 (eval $ac_try) 2>&5
17258 ac_status=$?
17259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17260 (exit $ac_status); }; } &&
17261 { ac_try='test -s conftest.$ac_objext'
17262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17263 (eval $ac_try) 2>&5
17264 ac_status=$?
17265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17266 (exit $ac_status); }; }; then
97bf5e38 17267 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 17268else
bec39cab
AC
17269 echo "$as_me: failed program was:" >&5
17270sed 's/^/| /' conftest.$ac_ext >&5
17271
b4e70030 17272bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 17273
c906108c 17274fi
bec39cab 17275rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17276fi
17277
97bf5e38 17278 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab
AC
17279
17280cat >>confdefs.h <<\_ACEOF
97bf5e38 17281#define HAVE_PRGREGSET_T 1
bec39cab 17282_ACEOF
c906108c 17283
97bf5e38 17284 fi
b4e70030
JB
17285 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
17286echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset_t" >&6
c906108c 17287
b4e70030
JB
17288 echo "$as_me:$LINENO: checking for prfpregset_t in sys/procfs.h" >&5
17289echo $ECHO_N "checking for prfpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17290 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then
17291 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17292else
bec39cab
AC
17293 cat >conftest.$ac_ext <<_ACEOF
17294/* confdefs.h. */
17295_ACEOF
17296cat confdefs.h >>conftest.$ac_ext
17297cat >>conftest.$ac_ext <<_ACEOF
17298/* end confdefs.h. */
97bf5e38
MK
17299
17300#define _SYSCALL32
17301#include <sys/procfs.h>
bec39cab
AC
17302int
17303main ()
17304{
97bf5e38 17305prfpregset_t avar
bec39cab
AC
17306 ;
17307 return 0;
17308}
17309_ACEOF
17310rm -f conftest.$ac_objext
17311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17312 (eval $ac_compile) 2>conftest.er1
17313 ac_status=$?
17314 grep -v '^ *+' conftest.er1 >conftest.err
17315 rm -f conftest.er1
17316 cat conftest.err >&5
17317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17318 (exit $ac_status); } &&
b4e70030
JB
17319 { ac_try='test -z "$ac_c_werror_flag"
17320 || test ! -s conftest.err'
bec39cab
AC
17321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17322 (eval $ac_try) 2>&5
17323 ac_status=$?
17324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17325 (exit $ac_status); }; } &&
17326 { ac_try='test -s conftest.$ac_objext'
17327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17328 (eval $ac_try) 2>&5
17329 ac_status=$?
17330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17331 (exit $ac_status); }; }; then
97bf5e38 17332 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 17333else
bec39cab
AC
17334 echo "$as_me: failed program was:" >&5
17335sed 's/^/| /' conftest.$ac_ext >&5
17336
b4e70030 17337bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 17338
d45fe813 17339fi
bec39cab 17340rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17341fi
17342
97bf5e38 17343 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab
AC
17344
17345cat >>confdefs.h <<\_ACEOF
97bf5e38 17346#define HAVE_PRFPREGSET_T 1
bec39cab 17347_ACEOF
d45fe813 17348
97bf5e38 17349 fi
b4e70030
JB
17350 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
17351echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6
d45fe813 17352
b4e70030
JB
17353 echo "$as_me:$LINENO: checking for prgregset32_t in sys/procfs.h" >&5
17354echo $ECHO_N "checking for prgregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17355 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then
17356 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17357else
bec39cab
AC
17358 cat >conftest.$ac_ext <<_ACEOF
17359/* confdefs.h. */
17360_ACEOF
17361cat confdefs.h >>conftest.$ac_ext
17362cat >>conftest.$ac_ext <<_ACEOF
17363/* end confdefs.h. */
97bf5e38
MK
17364
17365#define _SYSCALL32
17366#include <sys/procfs.h>
bec39cab
AC
17367int
17368main ()
17369{
97bf5e38 17370prgregset32_t avar
bec39cab
AC
17371 ;
17372 return 0;
17373}
17374_ACEOF
17375rm -f conftest.$ac_objext
17376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17377 (eval $ac_compile) 2>conftest.er1
17378 ac_status=$?
17379 grep -v '^ *+' conftest.er1 >conftest.err
17380 rm -f conftest.er1
17381 cat conftest.err >&5
17382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17383 (exit $ac_status); } &&
b4e70030
JB
17384 { ac_try='test -z "$ac_c_werror_flag"
17385 || test ! -s conftest.err'
bec39cab
AC
17386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17387 (eval $ac_try) 2>&5
17388 ac_status=$?
17389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17390 (exit $ac_status); }; } &&
17391 { ac_try='test -s conftest.$ac_objext'
17392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17393 (eval $ac_try) 2>&5
17394 ac_status=$?
17395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17396 (exit $ac_status); }; }; then
97bf5e38 17397 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 17398else
bec39cab
AC
17399 echo "$as_me: failed program was:" >&5
17400sed 's/^/| /' conftest.$ac_ext >&5
17401
b4e70030 17402bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 17403
d45fe813 17404fi
bec39cab 17405rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17406fi
17407
97bf5e38 17408 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab
AC
17409
17410cat >>confdefs.h <<\_ACEOF
97bf5e38 17411#define HAVE_PRGREGSET32_T 1
bec39cab 17412_ACEOF
d45fe813 17413
97bf5e38 17414 fi
b4e70030
JB
17415 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
17416echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6
d45fe813 17417
b4e70030
JB
17418 echo "$as_me:$LINENO: checking for prfpregset32_t in sys/procfs.h" >&5
17419echo $ECHO_N "checking for prfpregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17420 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then
17421 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17422else
bec39cab
AC
17423 cat >conftest.$ac_ext <<_ACEOF
17424/* confdefs.h. */
17425_ACEOF
17426cat confdefs.h >>conftest.$ac_ext
17427cat >>conftest.$ac_ext <<_ACEOF
17428/* end confdefs.h. */
97bf5e38
MK
17429
17430#define _SYSCALL32
17431#include <sys/procfs.h>
bec39cab
AC
17432int
17433main ()
17434{
97bf5e38 17435prfpregset32_t avar
bec39cab
AC
17436 ;
17437 return 0;
17438}
17439_ACEOF
17440rm -f conftest.$ac_objext
17441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17442 (eval $ac_compile) 2>conftest.er1
17443 ac_status=$?
17444 grep -v '^ *+' conftest.er1 >conftest.err
17445 rm -f conftest.er1
17446 cat conftest.err >&5
17447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17448 (exit $ac_status); } &&
b4e70030
JB
17449 { ac_try='test -z "$ac_c_werror_flag"
17450 || test ! -s conftest.err'
bec39cab
AC
17451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17452 (eval $ac_try) 2>&5
17453 ac_status=$?
17454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17455 (exit $ac_status); }; } &&
17456 { ac_try='test -s conftest.$ac_objext'
17457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17458 (eval $ac_try) 2>&5
17459 ac_status=$?
17460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17461 (exit $ac_status); }; }; then
97bf5e38 17462 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 17463else
bec39cab
AC
17464 echo "$as_me: failed program was:" >&5
17465sed 's/^/| /' conftest.$ac_ext >&5
17466
b4e70030 17467bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 17468
d45fe813 17469fi
bec39cab 17470rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17471fi
17472
97bf5e38 17473 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab
AC
17474
17475cat >>confdefs.h <<\_ACEOF
97bf5e38 17476#define HAVE_PRFPREGSET32_T 1
bec39cab 17477_ACEOF
d45fe813 17478
97bf5e38 17479 fi
b4e70030
JB
17480 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
17481echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6
d45fe813 17482
b4e70030
JB
17483 echo "$as_me:$LINENO: checking for lwpid_t in sys/procfs.h" >&5
17484echo $ECHO_N "checking for lwpid_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17485 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then
17486 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17487else
bec39cab
AC
17488 cat >conftest.$ac_ext <<_ACEOF
17489/* confdefs.h. */
17490_ACEOF
17491cat confdefs.h >>conftest.$ac_ext
17492cat >>conftest.$ac_ext <<_ACEOF
17493/* end confdefs.h. */
97bf5e38 17494
d45fe813 17495#define _SYSCALL32
97bf5e38 17496#include <sys/procfs.h>
bec39cab
AC
17497int
17498main ()
17499{
97bf5e38 17500lwpid_t avar
bec39cab
AC
17501 ;
17502 return 0;
17503}
17504_ACEOF
17505rm -f conftest.$ac_objext
17506if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17507 (eval $ac_compile) 2>conftest.er1
17508 ac_status=$?
17509 grep -v '^ *+' conftest.er1 >conftest.err
17510 rm -f conftest.er1
17511 cat conftest.err >&5
17512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17513 (exit $ac_status); } &&
b4e70030
JB
17514 { ac_try='test -z "$ac_c_werror_flag"
17515 || test ! -s conftest.err'
bec39cab
AC
17516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17517 (eval $ac_try) 2>&5
17518 ac_status=$?
17519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17520 (exit $ac_status); }; } &&
17521 { ac_try='test -s conftest.$ac_objext'
17522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17523 (eval $ac_try) 2>&5
17524 ac_status=$?
17525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17526 (exit $ac_status); }; }; then
97bf5e38 17527 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 17528else
bec39cab
AC
17529 echo "$as_me: failed program was:" >&5
17530sed 's/^/| /' conftest.$ac_ext >&5
17531
b4e70030 17532bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 17533
d45fe813 17534fi
bec39cab 17535rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17536fi
17537
97bf5e38 17538 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab
AC
17539
17540cat >>confdefs.h <<\_ACEOF
97bf5e38 17541#define HAVE_LWPID_T 1
bec39cab 17542_ACEOF
d45fe813 17543
97bf5e38 17544 fi
b4e70030
JB
17545 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
17546echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpid_t" >&6
c906108c 17547
b4e70030
JB
17548 echo "$as_me:$LINENO: checking for psaddr_t in sys/procfs.h" >&5
17549echo $ECHO_N "checking for psaddr_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17550 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then
17551 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17552else
bec39cab
AC
17553 cat >conftest.$ac_ext <<_ACEOF
17554/* confdefs.h. */
17555_ACEOF
17556cat confdefs.h >>conftest.$ac_ext
17557cat >>conftest.$ac_ext <<_ACEOF
17558/* end confdefs.h. */
c906108c 17559
97bf5e38
MK
17560#define _SYSCALL32
17561#include <sys/procfs.h>
bec39cab
AC
17562int
17563main ()
17564{
97bf5e38 17565psaddr_t avar
bec39cab
AC
17566 ;
17567 return 0;
17568}
17569_ACEOF
17570rm -f conftest.$ac_objext
17571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17572 (eval $ac_compile) 2>conftest.er1
17573 ac_status=$?
17574 grep -v '^ *+' conftest.er1 >conftest.err
17575 rm -f conftest.er1
17576 cat conftest.err >&5
17577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17578 (exit $ac_status); } &&
b4e70030
JB
17579 { ac_try='test -z "$ac_c_werror_flag"
17580 || test ! -s conftest.err'
bec39cab
AC
17581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17582 (eval $ac_try) 2>&5
17583 ac_status=$?
17584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17585 (exit $ac_status); }; } &&
17586 { ac_try='test -s conftest.$ac_objext'
17587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17588 (eval $ac_try) 2>&5
17589 ac_status=$?
17590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17591 (exit $ac_status); }; }; then
97bf5e38 17592 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 17593else
bec39cab
AC
17594 echo "$as_me: failed program was:" >&5
17595sed 's/^/| /' conftest.$ac_ext >&5
17596
b4e70030 17597bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 17598
c906108c 17599fi
bec39cab 17600rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17601fi
17602
97bf5e38 17603 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab
AC
17604
17605cat >>confdefs.h <<\_ACEOF
97bf5e38 17606#define HAVE_PSADDR_T 1
bec39cab 17607_ACEOF
c906108c 17608
97bf5e38 17609 fi
b4e70030
JB
17610 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
17611echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psaddr_t" >&6
c906108c 17612
b4e70030
JB
17613 echo "$as_me:$LINENO: checking for prsysent_t in sys/procfs.h" >&5
17614echo $ECHO_N "checking for prsysent_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17615 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then
17616 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17617else
bec39cab
AC
17618 cat >conftest.$ac_ext <<_ACEOF
17619/* confdefs.h. */
17620_ACEOF
17621cat confdefs.h >>conftest.$ac_ext
17622cat >>conftest.$ac_ext <<_ACEOF
17623/* end confdefs.h. */
c906108c 17624
97bf5e38
MK
17625#define _SYSCALL32
17626#include <sys/procfs.h>
bec39cab
AC
17627int
17628main ()
17629{
97bf5e38 17630prsysent_t avar
bec39cab
AC
17631 ;
17632 return 0;
17633}
17634_ACEOF
17635rm -f conftest.$ac_objext
17636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17637 (eval $ac_compile) 2>conftest.er1
17638 ac_status=$?
17639 grep -v '^ *+' conftest.er1 >conftest.err
17640 rm -f conftest.er1
17641 cat conftest.err >&5
17642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17643 (exit $ac_status); } &&
b4e70030
JB
17644 { ac_try='test -z "$ac_c_werror_flag"
17645 || test ! -s conftest.err'
bec39cab
AC
17646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17647 (eval $ac_try) 2>&5
17648 ac_status=$?
17649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17650 (exit $ac_status); }; } &&
17651 { ac_try='test -s conftest.$ac_objext'
17652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17653 (eval $ac_try) 2>&5
17654 ac_status=$?
17655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17656 (exit $ac_status); }; }; then
97bf5e38 17657 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 17658else
bec39cab
AC
17659 echo "$as_me: failed program was:" >&5
17660sed 's/^/| /' conftest.$ac_ext >&5
17661
b4e70030 17662bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 17663
c906108c 17664fi
bec39cab 17665rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17666fi
17667
97bf5e38 17668 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab
AC
17669
17670cat >>confdefs.h <<\_ACEOF
97bf5e38 17671#define HAVE_PRSYSENT_T 1
bec39cab 17672_ACEOF
c906108c 17673
97bf5e38 17674 fi
b4e70030
JB
17675 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
17676echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prsysent_t" >&6
c906108c 17677
b4e70030
JB
17678 echo "$as_me:$LINENO: checking for pr_sigset_t in sys/procfs.h" >&5
17679echo $ECHO_N "checking for pr_sigset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17680 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then
17681 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17682else
bec39cab
AC
17683 cat >conftest.$ac_ext <<_ACEOF
17684/* confdefs.h. */
17685_ACEOF
17686cat confdefs.h >>conftest.$ac_ext
17687cat >>conftest.$ac_ext <<_ACEOF
17688/* end confdefs.h. */
c906108c 17689
97bf5e38
MK
17690#define _SYSCALL32
17691#include <sys/procfs.h>
bec39cab
AC
17692int
17693main ()
17694{
97bf5e38 17695pr_sigset_t avar
bec39cab
AC
17696 ;
17697 return 0;
17698}
17699_ACEOF
17700rm -f conftest.$ac_objext
17701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17702 (eval $ac_compile) 2>conftest.er1
17703 ac_status=$?
17704 grep -v '^ *+' conftest.er1 >conftest.err
17705 rm -f conftest.er1
17706 cat conftest.err >&5
17707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17708 (exit $ac_status); } &&
b4e70030
JB
17709 { ac_try='test -z "$ac_c_werror_flag"
17710 || test ! -s conftest.err'
bec39cab
AC
17711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17712 (eval $ac_try) 2>&5
17713 ac_status=$?
17714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17715 (exit $ac_status); }; } &&
17716 { ac_try='test -s conftest.$ac_objext'
17717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17718 (eval $ac_try) 2>&5
17719 ac_status=$?
17720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17721 (exit $ac_status); }; }; then
97bf5e38 17722 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 17723else
bec39cab
AC
17724 echo "$as_me: failed program was:" >&5
17725sed 's/^/| /' conftest.$ac_ext >&5
17726
b4e70030 17727bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 17728
c906108c 17729fi
bec39cab 17730rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17731fi
17732
97bf5e38 17733 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab
AC
17734
17735cat >>confdefs.h <<\_ACEOF
97bf5e38 17736#define HAVE_PR_SIGSET_T 1
bec39cab 17737_ACEOF
c906108c 17738
97bf5e38 17739 fi
b4e70030
JB
17740 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
17741echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6
c906108c 17742
b4e70030
JB
17743 echo "$as_me:$LINENO: checking for pr_sigaction64_t in sys/procfs.h" >&5
17744echo $ECHO_N "checking for pr_sigaction64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17745 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then
17746 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17747else
bec39cab
AC
17748 cat >conftest.$ac_ext <<_ACEOF
17749/* confdefs.h. */
17750_ACEOF
17751cat confdefs.h >>conftest.$ac_ext
17752cat >>conftest.$ac_ext <<_ACEOF
17753/* end confdefs.h. */
c906108c 17754
97bf5e38
MK
17755#define _SYSCALL32
17756#include <sys/procfs.h>
bec39cab
AC
17757int
17758main ()
17759{
97bf5e38 17760pr_sigaction64_t avar
bec39cab
AC
17761 ;
17762 return 0;
17763}
17764_ACEOF
17765rm -f conftest.$ac_objext
17766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17767 (eval $ac_compile) 2>conftest.er1
17768 ac_status=$?
17769 grep -v '^ *+' conftest.er1 >conftest.err
17770 rm -f conftest.er1
17771 cat conftest.err >&5
17772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17773 (exit $ac_status); } &&
b4e70030
JB
17774 { ac_try='test -z "$ac_c_werror_flag"
17775 || test ! -s conftest.err'
bec39cab
AC
17776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17777 (eval $ac_try) 2>&5
17778 ac_status=$?
17779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17780 (exit $ac_status); }; } &&
17781 { ac_try='test -s conftest.$ac_objext'
17782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17783 (eval $ac_try) 2>&5
17784 ac_status=$?
17785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17786 (exit $ac_status); }; }; then
97bf5e38 17787 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 17788else
bec39cab
AC
17789 echo "$as_me: failed program was:" >&5
17790sed 's/^/| /' conftest.$ac_ext >&5
17791
b4e70030 17792bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 17793
c906108c 17794fi
bec39cab 17795rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17796fi
17797
97bf5e38 17798 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab
AC
17799
17800cat >>confdefs.h <<\_ACEOF
97bf5e38 17801#define HAVE_PR_SIGACTION64_T 1
bec39cab 17802_ACEOF
c906108c 17803
97bf5e38 17804 fi
b4e70030
JB
17805 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
17806echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6
97bf5e38 17807
b4e70030
JB
17808 echo "$as_me:$LINENO: checking for pr_siginfo64_t in sys/procfs.h" >&5
17809echo $ECHO_N "checking for pr_siginfo64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17810 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then
17811 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 17812else
bec39cab
AC
17813 cat >conftest.$ac_ext <<_ACEOF
17814/* confdefs.h. */
17815_ACEOF
17816cat confdefs.h >>conftest.$ac_ext
17817cat >>conftest.$ac_ext <<_ACEOF
17818/* end confdefs.h. */
97bf5e38
MK
17819
17820#define _SYSCALL32
17821#include <sys/procfs.h>
bec39cab
AC
17822int
17823main ()
17824{
97bf5e38 17825pr_siginfo64_t avar
bec39cab
AC
17826 ;
17827 return 0;
17828}
17829_ACEOF
17830rm -f conftest.$ac_objext
17831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17832 (eval $ac_compile) 2>conftest.er1
17833 ac_status=$?
17834 grep -v '^ *+' conftest.er1 >conftest.err
17835 rm -f conftest.er1
17836 cat conftest.err >&5
17837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17838 (exit $ac_status); } &&
b4e70030
JB
17839 { ac_try='test -z "$ac_c_werror_flag"
17840 || test ! -s conftest.err'
bec39cab
AC
17841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17842 (eval $ac_try) 2>&5
17843 ac_status=$?
17844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17845 (exit $ac_status); }; } &&
17846 { ac_try='test -s conftest.$ac_objext'
17847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17848 (eval $ac_try) 2>&5
17849 ac_status=$?
17850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17851 (exit $ac_status); }; }; then
97bf5e38
MK
17852 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
17853else
bec39cab
AC
17854 echo "$as_me: failed program was:" >&5
17855sed 's/^/| /' conftest.$ac_ext >&5
17856
b4e70030 17857bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 17858
97bf5e38 17859fi
bec39cab 17860rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 17861fi
c906108c 17862
97bf5e38 17863 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab
AC
17864
17865cat >>confdefs.h <<\_ACEOF
97bf5e38 17866#define HAVE_PR_SIGINFO64_T 1
bec39cab 17867_ACEOF
c906108c 17868
97bf5e38 17869 fi
b4e70030
JB
17870 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
17871echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6
bec39cab
AC
17872
17873
97bf5e38
MK
17874
17875
17876
97bf5e38 17877 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
b4e70030
JB
17878 echo "$as_me:$LINENO: checking whether prfpregset_t type is broken" >&5
17879echo $ECHO_N "checking whether prfpregset_t type is broken... $ECHO_C" >&6
bec39cab
AC
17880 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then
17881 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
17882else
17883 if test "$cross_compiling" = yes; then
97bf5e38 17884 gdb_cv_prfpregset_t_broken=yes
c906108c 17885else
bec39cab
AC
17886 cat >conftest.$ac_ext <<_ACEOF
17887/* confdefs.h. */
17888_ACEOF
17889cat confdefs.h >>conftest.$ac_ext
17890cat >>conftest.$ac_ext <<_ACEOF
17891/* end confdefs.h. */
97bf5e38
MK
17892#include <sys/procfs.h>
17893 int main ()
17894 {
17895 if (sizeof (prfpregset_t) == sizeof (void *))
17896 return 1;
17897 return 0;
17898 }
bec39cab
AC
17899_ACEOF
17900rm -f conftest$ac_exeext
17901if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17902 (eval $ac_link) 2>&5
17903 ac_status=$?
17904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17905 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17907 (eval $ac_try) 2>&5
17908 ac_status=$?
17909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17910 (exit $ac_status); }; }; then
97bf5e38 17911 gdb_cv_prfpregset_t_broken=no
c906108c 17912else
bec39cab
AC
17913 echo "$as_me: program exited with status $ac_status" >&5
17914echo "$as_me: failed program was:" >&5
17915sed 's/^/| /' conftest.$ac_ext >&5
17916
17917( exit $ac_status )
17918gdb_cv_prfpregset_t_broken=yes
c906108c 17919fi
b4e70030 17920rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 17921fi
c906108c
SS
17922fi
17923
b4e70030
JB
17924 echo "$as_me:$LINENO: result: $gdb_cv_prfpregset_t_broken" >&5
17925echo "${ECHO_T}$gdb_cv_prfpregset_t_broken" >&6
97bf5e38 17926 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f
SE
17927
17928cat >>confdefs.h <<\_ACEOF
97bf5e38 17929#define PRFPREGSET_T_BROKEN 1
bec39cab 17930_ACEOF
c906108c 17931
97bf5e38
MK
17932 fi
17933 fi
c906108c 17934
bec39cab 17935
b4e70030
JB
17936 echo "$as_me:$LINENO: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
17937echo $ECHO_N "checking for PIOCSET ioctl entry in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17938 if test "${gdb_cv_have_procfs_piocset+set}" = set; then
17939 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17940else
bec39cab
AC
17941 cat >conftest.$ac_ext <<_ACEOF
17942/* confdefs.h. */
17943_ACEOF
17944cat confdefs.h >>conftest.$ac_ext
17945cat >>conftest.$ac_ext <<_ACEOF
17946/* end confdefs.h. */
97bf5e38
MK
17947#include <unistd.h>
17948#include <sys/types.h>
17949#include <sys/procfs.h>
17950
bec39cab
AC
17951int
17952main ()
17953{
97bf5e38
MK
17954
17955 int dummy;;
17956 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
17957
17958 ;
17959 return 0;
17960}
17961_ACEOF
17962rm -f conftest.$ac_objext
17963if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17964 (eval $ac_compile) 2>conftest.er1
17965 ac_status=$?
17966 grep -v '^ *+' conftest.er1 >conftest.err
17967 rm -f conftest.er1
17968 cat conftest.err >&5
17969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17970 (exit $ac_status); } &&
b4e70030
JB
17971 { ac_try='test -z "$ac_c_werror_flag"
17972 || test ! -s conftest.err'
bec39cab
AC
17973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17974 (eval $ac_try) 2>&5
17975 ac_status=$?
17976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17977 (exit $ac_status); }; } &&
17978 { ac_try='test -s conftest.$ac_objext'
17979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17980 (eval $ac_try) 2>&5
17981 ac_status=$?
17982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17983 (exit $ac_status); }; }; then
97bf5e38 17984 gdb_cv_have_procfs_piocset=yes
c906108c 17985else
bec39cab
AC
17986 echo "$as_me: failed program was:" >&5
17987sed 's/^/| /' conftest.$ac_ext >&5
17988
b4e70030 17989gdb_cv_have_procfs_piocset=no
c906108c 17990fi
bec39cab 17991rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 17992fi
97bf5e38 17993
b4e70030
JB
17994 echo "$as_me:$LINENO: result: $gdb_cv_have_procfs_piocset" >&5
17995echo "${ECHO_T}$gdb_cv_have_procfs_piocset" >&6
97bf5e38 17996 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f
SE
17997
17998cat >>confdefs.h <<\_ACEOF
97bf5e38 17999#define HAVE_PROCFS_PIOCSET 1
bec39cab 18000_ACEOF
97bf5e38
MK
18001
18002 fi
c906108c 18003fi
c906108c 18004
97bf5e38 18005if test ${host} = ${target} ; then
bec39cab 18006
b4e70030
JB
18007 echo "$as_me:$LINENO: checking for member l_addr in struct link_map" >&5
18008echo $ECHO_N "checking for member l_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
18009 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then
18010 echo $ECHO_N "(cached) $ECHO_C" >&6
18011else
18012 cat >conftest.$ac_ext <<_ACEOF
18013/* confdefs.h. */
18014_ACEOF
18015cat confdefs.h >>conftest.$ac_ext
18016cat >>conftest.$ac_ext <<_ACEOF
18017/* end confdefs.h. */
97bf5e38 18018#include <link.h>
bec39cab
AC
18019int
18020main ()
18021{
97bf5e38 18022struct link_map lm; (void) lm.l_addr;
bec39cab
AC
18023 ;
18024 return 0;
18025}
18026_ACEOF
18027rm -f conftest.$ac_objext
18028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18029 (eval $ac_compile) 2>conftest.er1
18030 ac_status=$?
18031 grep -v '^ *+' conftest.er1 >conftest.err
18032 rm -f conftest.er1
18033 cat conftest.err >&5
18034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18035 (exit $ac_status); } &&
b4e70030
JB
18036 { ac_try='test -z "$ac_c_werror_flag"
18037 || test ! -s conftest.err'
bec39cab
AC
18038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18039 (eval $ac_try) 2>&5
18040 ac_status=$?
18041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18042 (exit $ac_status); }; } &&
18043 { ac_try='test -s conftest.$ac_objext'
18044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18045 (eval $ac_try) 2>&5
18046 ac_status=$?
18047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18048 (exit $ac_status); }; }; then
97bf5e38 18049 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 18050else
bec39cab
AC
18051 echo "$as_me: failed program was:" >&5
18052sed 's/^/| /' conftest.$ac_ext >&5
18053
b4e70030 18054gdb_cv_have_struct_link_map_with_l_members=no
c906108c 18055fi
bec39cab 18056rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18057fi
18058
b4e70030
JB
18059 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
18060echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_l_members" >&6
97bf5e38 18061 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f
SE
18062
18063cat >>confdefs.h <<\_ACEOF
97bf5e38 18064#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
bec39cab 18065_ACEOF
97bf5e38
MK
18066
18067 fi
18068
bec39cab 18069
b4e70030
JB
18070 echo "$as_me:$LINENO: checking for member lm_addr in struct link_map" >&5
18071echo $ECHO_N "checking for member lm_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
18072 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then
18073 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18074else
bec39cab
AC
18075 cat >conftest.$ac_ext <<_ACEOF
18076/* confdefs.h. */
18077_ACEOF
18078cat confdefs.h >>conftest.$ac_ext
18079cat >>conftest.$ac_ext <<_ACEOF
18080/* end confdefs.h. */
97bf5e38
MK
18081#include <sys/types.h>
18082#include <link.h>
bec39cab
AC
18083int
18084main ()
18085{
97bf5e38 18086struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
18087 ;
18088 return 0;
18089}
18090_ACEOF
18091rm -f conftest.$ac_objext
18092if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18093 (eval $ac_compile) 2>conftest.er1
18094 ac_status=$?
18095 grep -v '^ *+' conftest.er1 >conftest.err
18096 rm -f conftest.er1
18097 cat conftest.err >&5
18098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18099 (exit $ac_status); } &&
b4e70030
JB
18100 { ac_try='test -z "$ac_c_werror_flag"
18101 || test ! -s conftest.err'
bec39cab
AC
18102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18103 (eval $ac_try) 2>&5
18104 ac_status=$?
18105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18106 (exit $ac_status); }; } &&
18107 { ac_try='test -s conftest.$ac_objext'
18108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18109 (eval $ac_try) 2>&5
18110 ac_status=$?
18111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18112 (exit $ac_status); }; }; then
97bf5e38
MK
18113 gdb_cv_have_struct_link_map_with_lm_members=yes
18114else
bec39cab
AC
18115 echo "$as_me: failed program was:" >&5
18116sed 's/^/| /' conftest.$ac_ext >&5
18117
b4e70030 18118gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 18119fi
bec39cab 18120rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18121fi
c906108c 18122
b4e70030
JB
18123 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
18124echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_lm_members" >&6
97bf5e38 18125 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f
SE
18126
18127cat >>confdefs.h <<\_ACEOF
97bf5e38 18128#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
bec39cab 18129_ACEOF
97bf5e38
MK
18130
18131 fi
18132
bec39cab 18133
b4e70030
JB
18134 echo "$as_me:$LINENO: checking for member som_addr in struct so_map" >&5
18135echo $ECHO_N "checking for member som_addr in struct so_map... $ECHO_C" >&6
bec39cab
AC
18136 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then
18137 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18138else
bec39cab
AC
18139 cat >conftest.$ac_ext <<_ACEOF
18140/* confdefs.h. */
18141_ACEOF
18142cat confdefs.h >>conftest.$ac_ext
18143cat >>conftest.$ac_ext <<_ACEOF
18144/* end confdefs.h. */
97bf5e38
MK
18145#include <sys/types.h>
18146#ifdef HAVE_NLIST_H
18147#include <nlist.h>
18148#endif
18149#include <link.h>
bec39cab
AC
18150int
18151main ()
18152{
97bf5e38 18153struct so_map lm; (void) lm.som_addr;
bec39cab
AC
18154 ;
18155 return 0;
18156}
18157_ACEOF
18158rm -f conftest.$ac_objext
18159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18160 (eval $ac_compile) 2>conftest.er1
18161 ac_status=$?
18162 grep -v '^ *+' conftest.er1 >conftest.err
18163 rm -f conftest.er1
18164 cat conftest.err >&5
18165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18166 (exit $ac_status); } &&
b4e70030
JB
18167 { ac_try='test -z "$ac_c_werror_flag"
18168 || test ! -s conftest.err'
bec39cab
AC
18169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18170 (eval $ac_try) 2>&5
18171 ac_status=$?
18172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18173 (exit $ac_status); }; } &&
18174 { ac_try='test -s conftest.$ac_objext'
18175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18176 (eval $ac_try) 2>&5
18177 ac_status=$?
18178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18179 (exit $ac_status); }; }; then
97bf5e38
MK
18180 gdb_cv_have_struct_so_map_with_som_members=yes
18181else
bec39cab
AC
18182 echo "$as_me: failed program was:" >&5
18183sed 's/^/| /' conftest.$ac_ext >&5
18184
b4e70030 18185gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 18186fi
bec39cab 18187rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18188fi
c906108c 18189
b4e70030
JB
18190 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
18191echo "${ECHO_T}$gdb_cv_have_struct_so_map_with_som_members" >&6
97bf5e38 18192 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f
SE
18193
18194cat >>confdefs.h <<\_ACEOF
97bf5e38 18195#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
bec39cab 18196_ACEOF
c906108c 18197
97bf5e38 18198 fi
c906108c 18199
bec39cab 18200
b4e70030
JB
18201 echo "$as_me:$LINENO: checking for struct link_map32 in sys/link.h" >&5
18202echo $ECHO_N "checking for struct link_map32 in sys/link.h... $ECHO_C" >&6
bec39cab
AC
18203 if test "${gdb_cv_have_struct_link_map32+set}" = set; then
18204 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18205else
bec39cab
AC
18206 cat >conftest.$ac_ext <<_ACEOF
18207/* confdefs.h. */
18208_ACEOF
18209cat confdefs.h >>conftest.$ac_ext
18210cat >>conftest.$ac_ext <<_ACEOF
18211/* end confdefs.h. */
97bf5e38
MK
18212#define _SYSCALL32
18213#include <sys/link.h>
bec39cab
AC
18214int
18215main ()
18216{
97bf5e38 18217struct link_map32 l;
bec39cab
AC
18218 ;
18219 return 0;
18220}
18221_ACEOF
18222rm -f conftest.$ac_objext
18223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18224 (eval $ac_compile) 2>conftest.er1
18225 ac_status=$?
18226 grep -v '^ *+' conftest.er1 >conftest.err
18227 rm -f conftest.er1
18228 cat conftest.err >&5
18229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18230 (exit $ac_status); } &&
b4e70030
JB
18231 { ac_try='test -z "$ac_c_werror_flag"
18232 || test ! -s conftest.err'
bec39cab
AC
18233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18234 (eval $ac_try) 2>&5
18235 ac_status=$?
18236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18237 (exit $ac_status); }; } &&
18238 { ac_try='test -s conftest.$ac_objext'
18239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18240 (eval $ac_try) 2>&5
18241 ac_status=$?
18242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18243 (exit $ac_status); }; }; then
97bf5e38
MK
18244 gdb_cv_have_struct_link_map32=yes
18245else
bec39cab
AC
18246 echo "$as_me: failed program was:" >&5
18247sed 's/^/| /' conftest.$ac_ext >&5
18248
b4e70030 18249gdb_cv_have_struct_link_map32=no
97bf5e38 18250fi
bec39cab 18251rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18252fi
c906108c 18253
b4e70030
JB
18254 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map32" >&5
18255echo "${ECHO_T}$gdb_cv_have_struct_link_map32" >&6
97bf5e38 18256 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f
SE
18257
18258cat >>confdefs.h <<\_ACEOF
97bf5e38 18259#define HAVE_STRUCT_LINK_MAP32 1
bec39cab 18260_ACEOF
c906108c 18261
60ca704f
SE
18262
18263cat >>confdefs.h <<\_ACEOF
97bf5e38 18264#define _SYSCALL32 1
bec39cab 18265_ACEOF
c906108c 18266
97bf5e38
MK
18267 fi
18268fi
c906108c 18269
bc8bcb4b 18270# Check if the compiler supports the `long long' type.
c906108c 18271
b4e70030
JB
18272echo "$as_me:$LINENO: checking for long long support in compiler" >&5
18273echo $ECHO_N "checking for long long support in compiler... $ECHO_C" >&6
bec39cab
AC
18274if test "${gdb_cv_c_long_long+set}" = set; then
18275 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18276else
bec39cab
AC
18277 cat >conftest.$ac_ext <<_ACEOF
18278/* confdefs.h. */
18279_ACEOF
18280cat confdefs.h >>conftest.$ac_ext
18281cat >>conftest.$ac_ext <<_ACEOF
18282/* end confdefs.h. */
bc8bcb4b 18283extern long long foo;
bec39cab
AC
18284int
18285main ()
18286{
bc8bcb4b 18287switch (foo & 2) { case 0: return 1; }
bec39cab
AC
18288 ;
18289 return 0;
18290}
18291_ACEOF
18292rm -f conftest.$ac_objext
18293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18294 (eval $ac_compile) 2>conftest.er1
18295 ac_status=$?
18296 grep -v '^ *+' conftest.er1 >conftest.err
18297 rm -f conftest.er1
18298 cat conftest.err >&5
18299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18300 (exit $ac_status); } &&
b4e70030
JB
18301 { ac_try='test -z "$ac_c_werror_flag"
18302 || test ! -s conftest.err'
bec39cab
AC
18303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18304 (eval $ac_try) 2>&5
18305 ac_status=$?
18306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18307 (exit $ac_status); }; } &&
18308 { ac_try='test -s conftest.$ac_objext'
18309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18310 (eval $ac_try) 2>&5
18311 ac_status=$?
18312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18313 (exit $ac_status); }; }; then
97bf5e38
MK
18314 gdb_cv_c_long_long=yes
18315else
bec39cab
AC
18316 echo "$as_me: failed program was:" >&5
18317sed 's/^/| /' conftest.$ac_ext >&5
18318
b4e70030 18319gdb_cv_c_long_long=no
97bf5e38 18320fi
bec39cab 18321rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18322fi
b4e70030
JB
18323echo "$as_me:$LINENO: result: $gdb_cv_c_long_long" >&5
18324echo "${ECHO_T}$gdb_cv_c_long_long" >&6
97bf5e38 18325if test $gdb_cv_c_long_long = yes; then
bc8bcb4b
MK
18326
18327cat >>confdefs.h <<\_ACEOF
97bf5e38 18328#define CC_HAS_LONG_LONG 1
bec39cab 18329_ACEOF
97bf5e38
MK
18330
18331fi
18332
bc8bcb4b 18333# Check if the compiler and runtime support printing long longs.
97bf5e38 18334
b4e70030
JB
18335echo "$as_me:$LINENO: checking for long long support in printf" >&5
18336echo $ECHO_N "checking for long long support in printf... $ECHO_C" >&6
bec39cab
AC
18337if test "${gdb_cv_printf_has_long_long+set}" = set; then
18338 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18339else
18340 if test "$cross_compiling" = yes; then
18341 gdb_cv_printf_has_long_long=no
18342else
bec39cab
AC
18343 cat >conftest.$ac_ext <<_ACEOF
18344/* confdefs.h. */
18345_ACEOF
18346cat confdefs.h >>conftest.$ac_ext
18347cat >>conftest.$ac_ext <<_ACEOF
18348/* end confdefs.h. */
bc8bcb4b
MK
18349$ac_includes_default
18350int
18351main ()
18352{
18353char buf[32];
97bf5e38
MK
18354 long long l = 0;
18355 l = (l << 16) + 0x0123;
18356 l = (l << 16) + 0x4567;
18357 l = (l << 16) + 0x89ab;
18358 l = (l << 16) + 0xcdef;
18359 sprintf (buf, "0x%016llx", l);
18360 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
18361 ;
18362 return 0;
c906108c 18363}
bec39cab
AC
18364_ACEOF
18365rm -f conftest$ac_exeext
18366if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18367 (eval $ac_link) 2>&5
18368 ac_status=$?
18369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18370 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18372 (eval $ac_try) 2>&5
18373 ac_status=$?
18374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18375 (exit $ac_status); }; }; then
97bf5e38
MK
18376 gdb_cv_printf_has_long_long=yes
18377else
bec39cab
AC
18378 echo "$as_me: program exited with status $ac_status" >&5
18379echo "$as_me: failed program was:" >&5
18380sed 's/^/| /' conftest.$ac_ext >&5
18381
18382( exit $ac_status )
18383gdb_cv_printf_has_long_long=no
97bf5e38 18384fi
b4e70030 18385rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 18386fi
97bf5e38 18387fi
b4e70030
JB
18388echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_long" >&5
18389echo "${ECHO_T}$gdb_cv_printf_has_long_long" >&6
97bf5e38 18390if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b
MK
18391
18392cat >>confdefs.h <<\_ACEOF
97bf5e38 18393#define PRINTF_HAS_LONG_LONG 1
bec39cab 18394_ACEOF
97bf5e38
MK
18395
18396fi
97bf5e38 18397
1a619819
LM
18398# Check if the compiler and runtime support printing decfloats.
18399
18400echo "$as_me:$LINENO: checking for decfloat support in printf" >&5
18401echo $ECHO_N "checking for decfloat support in printf... $ECHO_C" >&6
18402if test "${gdb_cv_printf_has_decfloat+set}" = set; then
18403 echo $ECHO_N "(cached) $ECHO_C" >&6
18404else
18405 if test "$cross_compiling" = yes; then
18406 gdb_cv_printf_has_decfloat=no
18407else
18408 cat >conftest.$ac_ext <<_ACEOF
18409/* confdefs.h. */
18410_ACEOF
18411cat confdefs.h >>conftest.$ac_ext
18412cat >>conftest.$ac_ext <<_ACEOF
18413/* end confdefs.h. */
18414$ac_includes_default
18415int
18416main ()
18417{
18418char buf[64];
18419 _Decimal32 d32 = 1.2345df;
18420 _Decimal64 d64 = 1.2345dd;
18421 _Decimal128 d128 = 1.2345dl;
18422 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
18423 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
18424 ;
18425 return 0;
18426}
18427_ACEOF
18428rm -f conftest$ac_exeext
18429if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18430 (eval $ac_link) 2>&5
18431 ac_status=$?
18432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18433 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18435 (eval $ac_try) 2>&5
18436 ac_status=$?
18437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18438 (exit $ac_status); }; }; then
18439 gdb_cv_printf_has_decfloat=yes
18440else
18441 echo "$as_me: program exited with status $ac_status" >&5
18442echo "$as_me: failed program was:" >&5
18443sed 's/^/| /' conftest.$ac_ext >&5
18444
18445( exit $ac_status )
18446gdb_cv_printf_has_decfloat=no
18447fi
18448rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18449fi
18450fi
18451echo "$as_me:$LINENO: result: $gdb_cv_printf_has_decfloat" >&5
18452echo "${ECHO_T}$gdb_cv_printf_has_decfloat" >&6
18453if test $gdb_cv_printf_has_decfloat = yes; then
18454
18455cat >>confdefs.h <<\_ACEOF
18456#define PRINTF_HAS_DECFLOAT 1
18457_ACEOF
18458
18459fi
18460
bc8bcb4b
MK
18461# Check if the compiler supports the `long double' type. We can't use
18462# AC_C_LONG_DOUBLE because that one does additional checks on the
18463# constants defined in <float.h> that fail on some systems,
18464# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 18465
b4e70030
JB
18466echo "$as_me:$LINENO: checking for long double support in compiler" >&5
18467echo $ECHO_N "checking for long double support in compiler... $ECHO_C" >&6
bc8bcb4b 18468if test "${gdb_cv_c_long_double+set}" = set; then
bec39cab 18469 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18470else
bec39cab
AC
18471 cat >conftest.$ac_ext <<_ACEOF
18472/* confdefs.h. */
18473_ACEOF
18474cat confdefs.h >>conftest.$ac_ext
18475cat >>conftest.$ac_ext <<_ACEOF
18476/* end confdefs.h. */
97bf5e38 18477long double foo;
bec39cab
AC
18478_ACEOF
18479rm -f conftest.$ac_objext
18480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18481 (eval $ac_compile) 2>conftest.er1
18482 ac_status=$?
18483 grep -v '^ *+' conftest.er1 >conftest.err
18484 rm -f conftest.er1
18485 cat conftest.err >&5
18486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18487 (exit $ac_status); } &&
b4e70030
JB
18488 { ac_try='test -z "$ac_c_werror_flag"
18489 || test ! -s conftest.err'
bec39cab
AC
18490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18491 (eval $ac_try) 2>&5
18492 ac_status=$?
18493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18494 (exit $ac_status); }; } &&
18495 { ac_try='test -s conftest.$ac_objext'
18496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18497 (eval $ac_try) 2>&5
18498 ac_status=$?
18499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18500 (exit $ac_status); }; }; then
bc8bcb4b 18501 gdb_cv_c_long_double=yes
97bf5e38 18502else
bec39cab
AC
18503 echo "$as_me: failed program was:" >&5
18504sed 's/^/| /' conftest.$ac_ext >&5
18505
b4e70030 18506gdb_cv_c_long_double=no
97bf5e38 18507fi
bec39cab 18508rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18509fi
b4e70030
JB
18510echo "$as_me:$LINENO: result: $gdb_cv_c_long_double" >&5
18511echo "${ECHO_T}$gdb_cv_c_long_double" >&6
bc8bcb4b 18512if test $gdb_cv_c_long_double = yes; then
c906108c 18513
bc8bcb4b 18514cat >>confdefs.h <<\_ACEOF
97bf5e38 18515#define HAVE_LONG_DOUBLE 1
bec39cab 18516_ACEOF
97bf5e38
MK
18517
18518fi
18519
bc8bcb4b 18520# Check if the compiler and runtime support printing long doubles.
97bf5e38 18521
b4e70030
JB
18522echo "$as_me:$LINENO: checking for long double support in printf" >&5
18523echo $ECHO_N "checking for long double support in printf... $ECHO_C" >&6
bec39cab
AC
18524if test "${gdb_cv_printf_has_long_double+set}" = set; then
18525 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18526else
18527 if test "$cross_compiling" = yes; then
18528 gdb_cv_printf_has_long_double=no
18529else
bec39cab
AC
18530 cat >conftest.$ac_ext <<_ACEOF
18531/* confdefs.h. */
18532_ACEOF
18533cat confdefs.h >>conftest.$ac_ext
18534cat >>conftest.$ac_ext <<_ACEOF
18535/* end confdefs.h. */
bc8bcb4b
MK
18536$ac_includes_default
18537int
18538main ()
18539{
18540char buf[16];
97bf5e38
MK
18541 long double f = 3.141592653;
18542 sprintf (buf, "%Lg", f);
18543 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
18544 ;
18545 return 0;
97bf5e38 18546}
bec39cab
AC
18547_ACEOF
18548rm -f conftest$ac_exeext
18549if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18550 (eval $ac_link) 2>&5
18551 ac_status=$?
18552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18553 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18555 (eval $ac_try) 2>&5
18556 ac_status=$?
18557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18558 (exit $ac_status); }; }; then
97bf5e38 18559 gdb_cv_printf_has_long_double=yes
c906108c 18560else
bec39cab
AC
18561 echo "$as_me: program exited with status $ac_status" >&5
18562echo "$as_me: failed program was:" >&5
18563sed 's/^/| /' conftest.$ac_ext >&5
18564
18565( exit $ac_status )
18566gdb_cv_printf_has_long_double=no
c906108c 18567fi
b4e70030 18568rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 18569fi
c906108c 18570fi
b4e70030
JB
18571echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_double" >&5
18572echo "${ECHO_T}$gdb_cv_printf_has_long_double" >&6
97bf5e38 18573if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b
MK
18574
18575cat >>confdefs.h <<\_ACEOF
97bf5e38 18576#define PRINTF_HAS_LONG_DOUBLE 1
bec39cab 18577_ACEOF
97bf5e38
MK
18578
18579fi
97bf5e38 18580
bc8bcb4b 18581# Check if the compiler and runtime support scanning long doubles.
97bf5e38 18582
b4e70030
JB
18583echo "$as_me:$LINENO: checking for long double support in scanf" >&5
18584echo $ECHO_N "checking for long double support in scanf... $ECHO_C" >&6
bec39cab
AC
18585if test "${gdb_cv_scanf_has_long_double+set}" = set; then
18586 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18587else
18588 if test "$cross_compiling" = yes; then
18589 gdb_cv_scanf_has_long_double=no
18590else
bec39cab
AC
18591 cat >conftest.$ac_ext <<_ACEOF
18592/* confdefs.h. */
18593_ACEOF
18594cat confdefs.h >>conftest.$ac_ext
18595cat >>conftest.$ac_ext <<_ACEOF
18596/* end confdefs.h. */
bc8bcb4b
MK
18597#include <stdio.h>
18598int
18599main ()
18600{
18601char *buf = "3.141592653";
97bf5e38
MK
18602 long double f = 0;
18603 sscanf (buf, "%Lg", &f);
18604 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
18605 ;
18606 return 0;
97bf5e38 18607}
bec39cab
AC
18608_ACEOF
18609rm -f conftest$ac_exeext
18610if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18611 (eval $ac_link) 2>&5
18612 ac_status=$?
18613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18614 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18616 (eval $ac_try) 2>&5
18617 ac_status=$?
18618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18619 (exit $ac_status); }; }; then
97bf5e38
MK
18620 gdb_cv_scanf_has_long_double=yes
18621else
bec39cab
AC
18622 echo "$as_me: program exited with status $ac_status" >&5
18623echo "$as_me: failed program was:" >&5
18624sed 's/^/| /' conftest.$ac_ext >&5
18625
18626( exit $ac_status )
18627gdb_cv_scanf_has_long_double=no
97bf5e38 18628fi
b4e70030 18629rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 18630fi
c906108c 18631fi
b4e70030
JB
18632echo "$as_me:$LINENO: result: $gdb_cv_scanf_has_long_double" >&5
18633echo "${ECHO_T}$gdb_cv_scanf_has_long_double" >&6
97bf5e38 18634if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b
MK
18635
18636cat >>confdefs.h <<\_ACEOF
97bf5e38 18637#define SCANF_HAS_LONG_DOUBLE 1
bec39cab 18638_ACEOF
97bf5e38
MK
18639
18640fi
c906108c 18641
438013df
AO
18642case ${host_os} in
18643aix*)
b4e70030
JB
18644 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
18645echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
bec39cab
AC
18646if test "${gdb_cv_bigtoc+set}" = set; then
18647 echo $ECHO_N "(cached) $ECHO_C" >&6
438013df 18648else
bec39cab 18649
438013df
AO
18650 SAVE_LDFLAGS=$LDFLAGS
18651
18652 case $GCC in
18653 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
18654 *) gdb_cv_bigtoc=-bbigtoc ;;
18655 esac
18656
18657 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
bec39cab
AC
18658 cat >conftest.$ac_ext <<_ACEOF
18659/* confdefs.h. */
18660_ACEOF
18661cat confdefs.h >>conftest.$ac_ext
18662cat >>conftest.$ac_ext <<_ACEOF
18663/* end confdefs.h. */
438013df 18664
bec39cab
AC
18665int
18666main ()
18667{
438013df 18668int i;
bec39cab
AC
18669 ;
18670 return 0;
18671}
18672_ACEOF
18673rm -f conftest.$ac_objext conftest$ac_exeext
18674if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18675 (eval $ac_link) 2>conftest.er1
18676 ac_status=$?
18677 grep -v '^ *+' conftest.er1 >conftest.err
18678 rm -f conftest.er1
18679 cat conftest.err >&5
18680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18681 (exit $ac_status); } &&
b4e70030
JB
18682 { ac_try='test -z "$ac_c_werror_flag"
18683 || test ! -s conftest.err'
bec39cab
AC
18684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18685 (eval $ac_try) 2>&5
18686 ac_status=$?
18687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18688 (exit $ac_status); }; } &&
18689 { ac_try='test -s conftest$ac_exeext'
18690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18691 (eval $ac_try) 2>&5
18692 ac_status=$?
18693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18694 (exit $ac_status); }; }; then
438013df
AO
18695 :
18696else
bec39cab
AC
18697 echo "$as_me: failed program was:" >&5
18698sed 's/^/| /' conftest.$ac_ext >&5
18699
b4e70030 18700gdb_cv_bigtoc=
438013df 18701fi
bec39cab
AC
18702rm -f conftest.err conftest.$ac_objext \
18703 conftest$ac_exeext conftest.$ac_ext
ec76baa5 18704 LDFLAGS="${SAVE_LDFLAGS}"
438013df 18705
bec39cab 18706fi
b4e70030
JB
18707echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
18708echo "${ECHO_T}$gdb_cv_bigtoc" >&6
438013df
AO
18709 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
18710 ;;
18711esac
18712
c906108c
SS
18713
18714
18715if test ${build} = ${host} -a ${host} = ${target} ; then
18716 case ${host_os} in
18717 hpux*)
b4e70030
JB
18718 echo "$as_me:$LINENO: checking for HPUX/OSF thread support" >&5
18719echo $ECHO_N "checking for HPUX/OSF thread support... $ECHO_C" >&6
c906108c
SS
18720 if test -f /usr/include/dce/cma_config.h ; then
18721 if test "$GCC" = "yes" ; then
b4e70030
JB
18722 echo "$as_me:$LINENO: result: yes" >&5
18723echo "${ECHO_T}yes" >&6
60ca704f
SE
18724
18725cat >>confdefs.h <<\_ACEOF
c906108c 18726#define HAVE_HPUX_THREAD_SUPPORT 1
bec39cab 18727_ACEOF
c906108c 18728
3483b318 18729 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
18730 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
18731 else
b4e70030
JB
18732 echo "$as_me:$LINENO: result: no (suppressed because you are not using GCC)" >&5
18733echo "${ECHO_T}no (suppressed because you are not using GCC)" >&6
c906108c
SS
18734 fi
18735 else
b4e70030
JB
18736 echo "$as_me:$LINENO: result: no" >&5
18737echo "${ECHO_T}no" >&6
c906108c
SS
18738 fi
18739 ;;
18740 solaris*)
d92419e5
JB
18741 # See if thread_db library is around for Solaris thread debugging.
18742 # Note that we must explicitly test for version 1 of the library
18743 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
18744 # the same API.
b4e70030
JB
18745 echo "$as_me:$LINENO: checking for Solaris thread debugging library" >&5
18746echo $ECHO_N "checking for Solaris thread debugging library... $ECHO_C" >&6
c906108c 18747 if test -f /usr/lib/libthread_db.so.1 ; then
b4e70030
JB
18748 echo "$as_me:$LINENO: result: yes" >&5
18749echo "${ECHO_T}yes" >&6
60ca704f
SE
18750
18751cat >>confdefs.h <<\_ACEOF
c906108c 18752#define HAVE_THREAD_DB_LIB 1
bec39cab 18753_ACEOF
c906108c 18754
3483b318 18755 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 18756 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
bec39cab 18757
b4e70030
JB
18758echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
18759echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
bec39cab
AC
18760if test "${ac_cv_lib_dl_dlopen+set}" = set; then
18761 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18762else
bec39cab 18763 ac_check_lib_save_LIBS=$LIBS
c906108c 18764LIBS="-ldl $LIBS"
bec39cab
AC
18765cat >conftest.$ac_ext <<_ACEOF
18766/* confdefs.h. */
18767_ACEOF
18768cat confdefs.h >>conftest.$ac_ext
18769cat >>conftest.$ac_ext <<_ACEOF
18770/* end confdefs.h. */
18771
b4e70030 18772/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
18773#ifdef __cplusplus
18774extern "C"
18775#endif
b4e70030
JB
18776/* We use char because int might match the return type of a gcc2
18777 builtin and then its argument prototype would still apply. */
bec39cab
AC
18778char dlopen ();
18779int
18780main ()
18781{
b4e70030 18782dlopen ();
bec39cab
AC
18783 ;
18784 return 0;
18785}
18786_ACEOF
18787rm -f conftest.$ac_objext conftest$ac_exeext
18788if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18789 (eval $ac_link) 2>conftest.er1
18790 ac_status=$?
18791 grep -v '^ *+' conftest.er1 >conftest.err
18792 rm -f conftest.er1
18793 cat conftest.err >&5
18794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18795 (exit $ac_status); } &&
b4e70030
JB
18796 { ac_try='test -z "$ac_c_werror_flag"
18797 || test ! -s conftest.err'
bec39cab
AC
18798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18799 (eval $ac_try) 2>&5
18800 ac_status=$?
18801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18802 (exit $ac_status); }; } &&
18803 { ac_try='test -s conftest$ac_exeext'
18804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18805 (eval $ac_try) 2>&5
18806 ac_status=$?
18807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18808 (exit $ac_status); }; }; then
18809 ac_cv_lib_dl_dlopen=yes
18810else
18811 echo "$as_me: failed program was:" >&5
18812sed 's/^/| /' conftest.$ac_ext >&5
18813
b4e70030 18814ac_cv_lib_dl_dlopen=no
bec39cab
AC
18815fi
18816rm -f conftest.err conftest.$ac_objext \
18817 conftest$ac_exeext conftest.$ac_ext
18818LIBS=$ac_check_lib_save_LIBS
18819fi
b4e70030
JB
18820echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
18821echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
bec39cab
AC
18822if test $ac_cv_lib_dl_dlopen = yes; then
18823 cat >>confdefs.h <<_ACEOF
18824#define HAVE_LIBDL 1
18825_ACEOF
c906108c
SS
18826
18827 LIBS="-ldl $LIBS"
18828
c906108c
SS
18829fi
18830
18831 if test "$GCC" = "yes" ; then
18832 # The GNU linker requires the -export-dynamic option to make
18833 # all symbols visible in the dynamic symbol table.
18834 hold_ldflags=$LDFLAGS
b4e70030
JB
18835 echo "$as_me:$LINENO: checking for the ld -export-dynamic flag" >&5
18836echo $ECHO_N "checking for the ld -export-dynamic flag... $ECHO_C" >&6
c906108c 18837 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
bec39cab
AC
18838 cat >conftest.$ac_ext <<_ACEOF
18839/* confdefs.h. */
18840_ACEOF
18841cat confdefs.h >>conftest.$ac_ext
18842cat >>conftest.$ac_ext <<_ACEOF
18843/* end confdefs.h. */
c906108c 18844
bec39cab
AC
18845int
18846main ()
18847{
c906108c 18848int i;
bec39cab
AC
18849 ;
18850 return 0;
18851}
18852_ACEOF
18853rm -f conftest.$ac_objext conftest$ac_exeext
18854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18855 (eval $ac_link) 2>conftest.er1
18856 ac_status=$?
18857 grep -v '^ *+' conftest.er1 >conftest.err
18858 rm -f conftest.er1
18859 cat conftest.err >&5
18860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18861 (exit $ac_status); } &&
b4e70030
JB
18862 { ac_try='test -z "$ac_c_werror_flag"
18863 || test ! -s conftest.err'
bec39cab
AC
18864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18865 (eval $ac_try) 2>&5
18866 ac_status=$?
18867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18868 (exit $ac_status); }; } &&
18869 { ac_try='test -s conftest$ac_exeext'
18870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18871 (eval $ac_try) 2>&5
18872 ac_status=$?
18873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18874 (exit $ac_status); }; }; then
c906108c
SS
18875 found=yes
18876else
bec39cab
AC
18877 echo "$as_me: failed program was:" >&5
18878sed 's/^/| /' conftest.$ac_ext >&5
18879
b4e70030 18880found=no
c906108c 18881fi
bec39cab
AC
18882rm -f conftest.err conftest.$ac_objext \
18883 conftest$ac_exeext conftest.$ac_ext
c906108c 18884 LDFLAGS=$hold_ldflags
b4e70030
JB
18885 echo "$as_me:$LINENO: result: $found" >&5
18886echo "${ECHO_T}$found" >&6
c906108c
SS
18887 if test $found = yes; then
18888 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
18889 fi
18890 fi
18891 # Sun randomly tweaked the prototypes in <proc_service.h>
18892 # at one point.
b4e70030
JB
18893 echo "$as_me:$LINENO: checking if <proc_service.h> is old" >&5
18894echo $ECHO_N "checking if <proc_service.h> is old... $ECHO_C" >&6
bec39cab
AC
18895 if test "${gdb_cv_proc_service_is_old+set}" = set; then
18896 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18897else
bec39cab
AC
18898
18899 cat >conftest.$ac_ext <<_ACEOF
18900/* confdefs.h. */
18901_ACEOF
18902cat confdefs.h >>conftest.$ac_ext
18903cat >>conftest.$ac_ext <<_ACEOF
18904/* end confdefs.h. */
c906108c
SS
18905
18906 #include <proc_service.h>
18907 ps_err_e ps_pdwrite
18908 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 18909
bec39cab
AC
18910int
18911main ()
18912{
18913
18914 ;
18915 return 0;
18916}
18917_ACEOF
18918rm -f conftest.$ac_objext
18919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18920 (eval $ac_compile) 2>conftest.er1
18921 ac_status=$?
18922 grep -v '^ *+' conftest.er1 >conftest.err
18923 rm -f conftest.er1
18924 cat conftest.err >&5
18925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18926 (exit $ac_status); } &&
b4e70030
JB
18927 { ac_try='test -z "$ac_c_werror_flag"
18928 || test ! -s conftest.err'
bec39cab
AC
18929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18930 (eval $ac_try) 2>&5
18931 ac_status=$?
18932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18933 (exit $ac_status); }; } &&
18934 { ac_try='test -s conftest.$ac_objext'
18935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18936 (eval $ac_try) 2>&5
18937 ac_status=$?
18938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18939 (exit $ac_status); }; }; then
c906108c
SS
18940 gdb_cv_proc_service_is_old=no
18941else
bec39cab
AC
18942 echo "$as_me: failed program was:" >&5
18943sed 's/^/| /' conftest.$ac_ext >&5
18944
b4e70030 18945gdb_cv_proc_service_is_old=yes
c906108c 18946fi
bec39cab
AC
18947rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18948
c906108c
SS
18949fi
18950
b4e70030
JB
18951 echo "$as_me:$LINENO: result: $gdb_cv_proc_service_is_old" >&5
18952echo "${ECHO_T}$gdb_cv_proc_service_is_old" >&6
c906108c 18953 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f
SE
18954
18955cat >>confdefs.h <<\_ACEOF
c906108c 18956#define PROC_SERVICE_IS_OLD 1
bec39cab 18957_ACEOF
c906108c
SS
18958
18959 fi
18960 else
b4e70030
JB
18961 echo "$as_me:$LINENO: result: no" >&5
18962echo "${ECHO_T}no" >&6
c906108c
SS
18963 fi
18964 ;;
d92419e5 18965 aix*)
b4e70030
JB
18966 echo "$as_me:$LINENO: checking for AiX thread debugging library" >&5
18967echo $ECHO_N "checking for AiX thread debugging library... $ECHO_C" >&6
bec39cab
AC
18968 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then
18969 echo $ECHO_N "(cached) $ECHO_C" >&6
18970else
18971 cat >conftest.$ac_ext <<_ACEOF
18972/* confdefs.h. */
18973_ACEOF
18974cat confdefs.h >>conftest.$ac_ext
18975cat >>conftest.$ac_ext <<_ACEOF
18976/* end confdefs.h. */
d92419e5 18977#include <sys/pthdebug.h>
bec39cab
AC
18978int
18979main ()
18980{
d92419e5
JB
18981#ifndef PTHDB_VERSION_3
18982 #error
18983 #endif
bec39cab
AC
18984 ;
18985 return 0;
18986}
18987_ACEOF
18988rm -f conftest.$ac_objext
18989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18990 (eval $ac_compile) 2>conftest.er1
18991 ac_status=$?
18992 grep -v '^ *+' conftest.er1 >conftest.err
18993 rm -f conftest.er1
18994 cat conftest.err >&5
18995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18996 (exit $ac_status); } &&
b4e70030
JB
18997 { ac_try='test -z "$ac_c_werror_flag"
18998 || test ! -s conftest.err'
bec39cab
AC
18999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19000 (eval $ac_try) 2>&5
19001 ac_status=$?
19002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19003 (exit $ac_status); }; } &&
19004 { ac_try='test -s conftest.$ac_objext'
19005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19006 (eval $ac_try) 2>&5
19007 ac_status=$?
19008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19009 (exit $ac_status); }; }; then
d92419e5
JB
19010 gdb_cv_have_aix_thread_debug=yes
19011else
bec39cab
AC
19012 echo "$as_me: failed program was:" >&5
19013sed 's/^/| /' conftest.$ac_ext >&5
19014
b4e70030 19015gdb_cv_have_aix_thread_debug=no
d92419e5 19016fi
bec39cab 19017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
19018fi
19019
b4e70030
JB
19020 echo "$as_me:$LINENO: result: $gdb_cv_have_aix_thread_debug" >&5
19021echo "${ECHO_T}$gdb_cv_have_aix_thread_debug" >&6
d92419e5
JB
19022 if test $gdb_cv_have_aix_thread_debug = yes; then
19023 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 19024 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
19025 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
19026 fi
19027 ;;
c906108c 19028 esac
bec39cab 19029
c906108c
SS
19030fi
19031
3f47be5c 19032if test "x$ac_cv_header_thread_db_h" = "xyes"; then
b4e70030
JB
19033 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTALLOC" >&5
19034echo $ECHO_N "checking whether <thread_db.h> has TD_NOTALLOC... $ECHO_C" >&6
bec39cab
AC
19035if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then
19036 echo $ECHO_N "(cached) $ECHO_C" >&6
19037else
19038 cat >conftest.$ac_ext <<_ACEOF
19039/* confdefs.h. */
19040_ACEOF
19041cat confdefs.h >>conftest.$ac_ext
19042cat >>conftest.$ac_ext <<_ACEOF
19043/* end confdefs.h. */
3f47be5c 19044#include <thread_db.h>
bec39cab
AC
19045int
19046main ()
19047{
3f47be5c 19048int i = TD_NOTALLOC;
bec39cab
AC
19049 ;
19050 return 0;
19051}
19052_ACEOF
19053rm -f conftest.$ac_objext
19054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19055 (eval $ac_compile) 2>conftest.er1
19056 ac_status=$?
19057 grep -v '^ *+' conftest.er1 >conftest.err
19058 rm -f conftest.er1
19059 cat conftest.err >&5
19060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19061 (exit $ac_status); } &&
b4e70030
JB
19062 { ac_try='test -z "$ac_c_werror_flag"
19063 || test ! -s conftest.err'
bec39cab
AC
19064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19065 (eval $ac_try) 2>&5
19066 ac_status=$?
19067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19068 (exit $ac_status); }; } &&
19069 { ac_try='test -s conftest.$ac_objext'
19070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19071 (eval $ac_try) 2>&5
19072 ac_status=$?
19073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19074 (exit $ac_status); }; }; then
3f47be5c
EZ
19075 gdb_cv_thread_db_h_has_td_notalloc=yes
19076else
bec39cab
AC
19077 echo "$as_me: failed program was:" >&5
19078sed 's/^/| /' conftest.$ac_ext >&5
19079
b4e70030 19080gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 19081
3f47be5c 19082fi
bec39cab 19083rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 19084
bec39cab 19085fi
b4e70030
JB
19086echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
19087echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notalloc" >&6
59f80f10
DJ
19088 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_VERSION" >&5
19089echo $ECHO_N "checking whether <thread_db.h> has TD_VERSION... $ECHO_C" >&6
19090if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then
19091 echo $ECHO_N "(cached) $ECHO_C" >&6
19092else
19093 cat >conftest.$ac_ext <<_ACEOF
19094/* confdefs.h. */
19095_ACEOF
19096cat confdefs.h >>conftest.$ac_ext
19097cat >>conftest.$ac_ext <<_ACEOF
19098/* end confdefs.h. */
19099#include <thread_db.h>
19100int
19101main ()
19102{
19103int i = TD_VERSION;
19104 ;
19105 return 0;
19106}
19107_ACEOF
19108rm -f conftest.$ac_objext
19109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19110 (eval $ac_compile) 2>conftest.er1
19111 ac_status=$?
19112 grep -v '^ *+' conftest.er1 >conftest.err
19113 rm -f conftest.er1
19114 cat conftest.err >&5
19115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19116 (exit $ac_status); } &&
19117 { ac_try='test -z "$ac_c_werror_flag"
19118 || test ! -s conftest.err'
19119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19120 (eval $ac_try) 2>&5
19121 ac_status=$?
19122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19123 (exit $ac_status); }; } &&
19124 { ac_try='test -s conftest.$ac_objext'
19125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19126 (eval $ac_try) 2>&5
19127 ac_status=$?
19128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19129 (exit $ac_status); }; }; then
19130 gdb_cv_thread_db_h_has_td_version=yes
19131else
19132 echo "$as_me: failed program was:" >&5
19133sed 's/^/| /' conftest.$ac_ext >&5
19134
19135gdb_cv_thread_db_h_has_td_version=no
19136
19137fi
19138rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19139
19140fi
19141echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_version" >&5
19142echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_version" >&6
19143 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTLS" >&5
19144echo $ECHO_N "checking whether <thread_db.h> has TD_NOTLS... $ECHO_C" >&6
19145if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then
19146 echo $ECHO_N "(cached) $ECHO_C" >&6
19147else
19148 cat >conftest.$ac_ext <<_ACEOF
19149/* confdefs.h. */
19150_ACEOF
19151cat confdefs.h >>conftest.$ac_ext
19152cat >>conftest.$ac_ext <<_ACEOF
19153/* end confdefs.h. */
19154#include <thread_db.h>
19155int
19156main ()
19157{
19158int i = TD_NOTLS;
19159 ;
19160 return 0;
19161}
19162_ACEOF
19163rm -f conftest.$ac_objext
19164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19165 (eval $ac_compile) 2>conftest.er1
19166 ac_status=$?
19167 grep -v '^ *+' conftest.er1 >conftest.err
19168 rm -f conftest.er1
19169 cat conftest.err >&5
19170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19171 (exit $ac_status); } &&
19172 { ac_try='test -z "$ac_c_werror_flag"
19173 || test ! -s conftest.err'
19174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19175 (eval $ac_try) 2>&5
19176 ac_status=$?
19177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19178 (exit $ac_status); }; } &&
19179 { ac_try='test -s conftest.$ac_objext'
19180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19181 (eval $ac_try) 2>&5
19182 ac_status=$?
19183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19184 (exit $ac_status); }; }; then
19185 gdb_cv_thread_db_h_has_td_notls=yes
19186else
19187 echo "$as_me: failed program was:" >&5
19188sed 's/^/| /' conftest.$ac_ext >&5
19189
19190gdb_cv_thread_db_h_has_td_notls=no
19191
19192fi
19193rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19194
19195fi
19196echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notls" >&5
19197echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notls" >&6
3f47be5c
EZ
19198fi
19199if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab
AC
19200
19201cat >>confdefs.h <<\_ACEOF
3f47be5c 19202#define THREAD_DB_HAS_TD_NOTALLOC 1
bec39cab 19203_ACEOF
3f47be5c 19204
59f80f10
DJ
19205fi
19206if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
19207
19208cat >>confdefs.h <<\_ACEOF
19209#define THREAD_DB_HAS_TD_VERSION 1
19210_ACEOF
19211
19212fi
19213if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
19214
19215cat >>confdefs.h <<\_ACEOF
19216#define THREAD_DB_HAS_TD_NOTLS 1
19217_ACEOF
19218
3f47be5c
EZ
19219fi
19220
b757528f 19221if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
b4e70030
JB
19222 echo "$as_me:$LINENO: checking whether <sys/syscall.h> has __NR_tkill" >&5
19223echo $ECHO_N "checking whether <sys/syscall.h> has __NR_tkill... $ECHO_C" >&6
bec39cab
AC
19224if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then
19225 echo $ECHO_N "(cached) $ECHO_C" >&6
19226else
19227 cat >conftest.$ac_ext <<_ACEOF
19228/* confdefs.h. */
19229_ACEOF
19230cat confdefs.h >>conftest.$ac_ext
19231cat >>conftest.$ac_ext <<_ACEOF
19232/* end confdefs.h. */
b757528f 19233#include <sys/syscall.h>
bec39cab
AC
19234int
19235main ()
19236{
b757528f 19237int i = __NR_tkill;
bec39cab
AC
19238 ;
19239 return 0;
19240}
19241_ACEOF
19242rm -f conftest.$ac_objext
19243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19244 (eval $ac_compile) 2>conftest.er1
19245 ac_status=$?
19246 grep -v '^ *+' conftest.er1 >conftest.err
19247 rm -f conftest.er1
19248 cat conftest.err >&5
19249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19250 (exit $ac_status); } &&
b4e70030
JB
19251 { ac_try='test -z "$ac_c_werror_flag"
19252 || test ! -s conftest.err'
bec39cab
AC
19253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19254 (eval $ac_try) 2>&5
19255 ac_status=$?
19256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19257 (exit $ac_status); }; } &&
19258 { ac_try='test -s conftest.$ac_objext'
19259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19260 (eval $ac_try) 2>&5
19261 ac_status=$?
19262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19263 (exit $ac_status); }; }; then
b757528f
JJ
19264 gdb_cv_sys_syscall_h_has_tkill=yes
19265else
bec39cab
AC
19266 echo "$as_me: failed program was:" >&5
19267sed 's/^/| /' conftest.$ac_ext >&5
19268
b4e70030 19269gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 19270
b757528f 19271fi
bec39cab 19272rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 19273
bec39cab 19274fi
b4e70030
JB
19275echo "$as_me:$LINENO: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
19276echo "${ECHO_T}$gdb_cv_sys_syscall_h_has_tkill" >&6
b757528f
JJ
19277fi
19278if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab
AC
19279
19280cat >>confdefs.h <<\_ACEOF
b757528f 19281#define HAVE_TKILL_SYSCALL 1
bec39cab 19282_ACEOF
b757528f
JJ
19283
19284fi
19285
10568435
JK
19286echo "$as_me:$LINENO: checking whether ADDR_NO_RANDOMIZE is declared" >&5
19287echo $ECHO_N "checking whether ADDR_NO_RANDOMIZE is declared... $ECHO_C" >&6
19288if test "${ac_cv_have_decl_ADDR_NO_RANDOMIZE+set}" = set; then
19289 echo $ECHO_N "(cached) $ECHO_C" >&6
19290else
19291 cat >conftest.$ac_ext <<_ACEOF
19292/* confdefs.h. */
19293_ACEOF
19294cat confdefs.h >>conftest.$ac_ext
19295cat >>conftest.$ac_ext <<_ACEOF
19296/* end confdefs.h. */
19297#include <sys/personality.h>
19298
19299int
19300main ()
19301{
19302#ifndef ADDR_NO_RANDOMIZE
19303 char *p = (char *) ADDR_NO_RANDOMIZE;
19304#endif
19305
19306 ;
19307 return 0;
19308}
19309_ACEOF
19310rm -f conftest.$ac_objext
19311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19312 (eval $ac_compile) 2>conftest.er1
19313 ac_status=$?
19314 grep -v '^ *+' conftest.er1 >conftest.err
19315 rm -f conftest.er1
19316 cat conftest.err >&5
19317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19318 (exit $ac_status); } &&
19319 { ac_try='test -z "$ac_c_werror_flag"
19320 || test ! -s conftest.err'
19321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19322 (eval $ac_try) 2>&5
19323 ac_status=$?
19324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19325 (exit $ac_status); }; } &&
19326 { ac_try='test -s conftest.$ac_objext'
19327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19328 (eval $ac_try) 2>&5
19329 ac_status=$?
19330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19331 (exit $ac_status); }; }; then
19332 ac_cv_have_decl_ADDR_NO_RANDOMIZE=yes
19333else
19334 echo "$as_me: failed program was:" >&5
19335sed 's/^/| /' conftest.$ac_ext >&5
19336
19337ac_cv_have_decl_ADDR_NO_RANDOMIZE=no
19338fi
19339rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19340fi
19341echo "$as_me:$LINENO: result: $ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&5
19342echo "${ECHO_T}$ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&6
19343if test $ac_cv_have_decl_ADDR_NO_RANDOMIZE = yes; then
19344
19345cat >>confdefs.h <<_ACEOF
19346#define HAVE_DECL_ADDR_NO_RANDOMIZE 1
19347_ACEOF
19348
19349
19350else
19351 cat >>confdefs.h <<_ACEOF
19352#define HAVE_DECL_ADDR_NO_RANDOMIZE 0
19353_ACEOF
19354
19355
19356fi
19357
19358
19359
19360if test "$cross_compiling" = yes; then
19361 cat >conftest.$ac_ext <<_ACEOF
19362/* confdefs.h. */
19363_ACEOF
19364cat confdefs.h >>conftest.$ac_ext
19365cat >>conftest.$ac_ext <<_ACEOF
19366/* end confdefs.h. */
19367#include <sys/personality.h>
19368int
19369main ()
19370{
19371
19372# if !HAVE_DECL_ADDR_NO_RANDOMIZE
19373# define ADDR_NO_RANDOMIZE 0x0040000
19374# endif
19375 /* Test the flag could be set and stays set. */
19376 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19377 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19378 return 1
19379 ;
19380 return 0;
19381}
19382_ACEOF
19383rm -f conftest.$ac_objext conftest$ac_exeext
19384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19385 (eval $ac_link) 2>conftest.er1
19386 ac_status=$?
19387 grep -v '^ *+' conftest.er1 >conftest.err
19388 rm -f conftest.er1
19389 cat conftest.err >&5
19390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19391 (exit $ac_status); } &&
19392 { ac_try='test -z "$ac_c_werror_flag"
19393 || test ! -s conftest.err'
19394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19395 (eval $ac_try) 2>&5
19396 ac_status=$?
19397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19398 (exit $ac_status); }; } &&
19399 { ac_try='test -s conftest$ac_exeext'
19400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19401 (eval $ac_try) 2>&5
19402 ac_status=$?
19403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19404 (exit $ac_status); }; }; then
19405 have_personality=true
19406else
19407 echo "$as_me: failed program was:" >&5
19408sed 's/^/| /' conftest.$ac_ext >&5
19409
19410have_personality=false
19411fi
19412rm -f conftest.err conftest.$ac_objext \
19413 conftest$ac_exeext conftest.$ac_ext
19414else
19415 cat >conftest.$ac_ext <<_ACEOF
19416/* confdefs.h. */
19417_ACEOF
19418cat confdefs.h >>conftest.$ac_ext
19419cat >>conftest.$ac_ext <<_ACEOF
19420/* end confdefs.h. */
19421#include <sys/personality.h>
19422int
19423main ()
19424{
19425
19426# if !HAVE_DECL_ADDR_NO_RANDOMIZE
19427# define ADDR_NO_RANDOMIZE 0x0040000
19428# endif
19429 /* Test the flag could be set and stays set. */
19430 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19431 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19432 return 1
19433 ;
19434 return 0;
19435}
19436_ACEOF
19437rm -f conftest$ac_exeext
19438if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19439 (eval $ac_link) 2>&5
19440 ac_status=$?
19441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19442 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19444 (eval $ac_try) 2>&5
19445 ac_status=$?
19446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19447 (exit $ac_status); }; }; then
19448 have_personality=true
19449else
19450 echo "$as_me: program exited with status $ac_status" >&5
19451echo "$as_me: failed program was:" >&5
19452sed 's/^/| /' conftest.$ac_ext >&5
19453
19454( exit $ac_status )
19455have_personality=false
19456fi
19457rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19458fi
19459if $have_personality
19460then
19461
19462cat >>confdefs.h <<\_ACEOF
19463#define HAVE_PERSONALITY 1
19464_ACEOF
19465
19466fi
19467
fb40c209 19468
bec39cab 19469
b4e70030 19470# Check whether --with-sysroot or --without-sysroot was given.
030292b7 19471if test "${with_sysroot+set}" = set; then
b4e70030
JB
19472 withval="$with_sysroot"
19473
030292b7 19474 case ${with_sysroot} in
715d1656 19475 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
19476 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
19477 esac
19478
19479 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
19480
07abfebf
RS
19481 if test "x$prefix" = xNONE; then
19482 test_prefix=/usr/local
19483 else
19484 test_prefix=$prefix
19485 fi
aa28a74e 19486 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 19487 test_exec_prefix=$test_prefix
030292b7 19488 else
07abfebf 19489 test_exec_prefix=$exec_prefix
030292b7
DJ
19490 fi
19491 case ${TARGET_SYSTEM_ROOT} in
715d1656 19492 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
19493 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
19494 '${prefix}'|'${prefix}/'*|\
715d1656 19495 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
19496 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
19497 TARGET_SYSTEM_ROOT_DEFINE="$t"
19498 ;;
19499 esac
19500
19501else
bec39cab 19502
030292b7
DJ
19503 TARGET_SYSTEM_ROOT=
19504 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
19505
b4e70030 19506fi;
030292b7
DJ
19507
19508
19509
16e7150e
JG
19510system_gdbinit=
19511
19512# Check whether --with-system-gdbinit or --without-system-gdbinit was given.
19513if test "${with_system_gdbinit+set}" = set; then
19514 withval="$with_system_gdbinit"
19515 system_gdbinit=${withval}
19516fi;
19517
19518
19519 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
19520 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19521 ac_define_dir=`eval echo $system_gdbinit`
19522 ac_define_dir=`eval echo $ac_define_dir`
19523
19524cat >>confdefs.h <<_ACEOF
19525#define SYSTEM_GDBINIT "$ac_define_dir"
19526_ACEOF
19527
19528
19529
19530if test "x$prefix" = xNONE; then
19531 test_prefix=$ac_default_prefix
19532else
19533 test_prefix=$prefix
19534fi
19535if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
19536 test_exec_prefix=$test_prefix
19537else
19538 test_exec_prefix=$exec_prefix
19539fi
19540case ${system_gdbinit} in
19541 "${test_prefix}"|"${test_prefix}/"*|\
19542 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
19543 '${prefix}'|'${prefix}/'*|\
19544 '${exec_prefix}'|'${exec_prefix}/'*)
19545
19546cat >>confdefs.h <<\_ACEOF
19547#define SYSTEM_GDBINIT_RELOCATABLE 1
19548_ACEOF
19549
19550 ;;
19551esac
19552
b4e70030 19553# Check whether --enable-werror or --disable-werror was given.
094a342e 19554if test "${enable_werror+set}" = set; then
b4e70030
JB
19555 enableval="$enable_werror"
19556 case "${enableval}" in
094a342e
MK
19557 yes | y) ERROR_ON_WARNING="yes" ;;
19558 no | n) ERROR_ON_WARNING="no" ;;
19559 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
19560echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
19561 { (exit 1); exit 1; }; } ;;
19562 esac
b4e70030 19563fi;
094a342e
MK
19564
19565# Enable -Werror by default when using gcc
19566if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
19567 ERROR_ON_WARNING=yes
19568fi
19569
19570WERROR_CFLAGS=""
19571if test "${ERROR_ON_WARNING}" = yes ; then
19572 WERROR_CFLAGS="-Werror"
19573fi
19574
aa79a185
DJ
19575# The entries after -Wno-pointer-sign are disabled warnings which may
19576# be enabled in the future, which can not currently be used to build
19577# GDB.
19578# NOTE: If you change this list, remember to update
3b851bce 19579# gdb/doc/gdbint.texinfo.
aa79a185
DJ
19580build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
19581-Wformat-nonliteral -Wno-pointer-sign \
58b38ee2 19582-Wno-unused -Wno-switch -Wno-char-subscripts"
a3b362c4 19583
3526781e
DJ
19584# Enable -Wno-format by default when using gcc on mingw since many
19585# GCC versions complain about %I64.
19586case "${host}" in
19587 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
19588esac
19589
b4e70030 19590# Check whether --enable-build-warnings or --disable-build-warnings was given.
c906108c 19591if test "${enable_build_warnings+set}" = set; then
b4e70030
JB
19592 enableval="$enable_build_warnings"
19593 case "${enableval}" in
c906108c
SS
19594 yes) ;;
19595 no) build_warnings="-w";;
19596 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
19597 build_warnings="${build_warnings} ${t}";;
19598 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
19599 build_warnings="${t} ${build_warnings}";;
19600 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
19601esac
d4f3574e 19602if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 19603 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 19604fi
b4e70030 19605fi; # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
3b851bce 19606if test "${enable_gdb_build_warnings+set}" = set; then
b4e70030
JB
19607 enableval="$enable_gdb_build_warnings"
19608 case "${enableval}" in
3b851bce
AC
19609 yes) ;;
19610 no) build_warnings="-w";;
19611 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
19612 build_warnings="${build_warnings} ${t}";;
19613 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
19614 build_warnings="${t} ${build_warnings}";;
19615 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
19616esac
19617if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
19618 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
19619fi
b4e70030 19620fi; WARN_CFLAGS=""
c906108c
SS
19621if test "x${build_warnings}" != x -a "x$GCC" = xyes
19622then
b4e70030
JB
19623 echo "$as_me:$LINENO: checking compiler warning flags" >&5
19624echo $ECHO_N "checking compiler warning flags... $ECHO_C" >&6
746a987d
AC
19625 # Separate out the -Werror flag as some files just cannot be
19626 # compiled with it enabled.
19627 for w in ${build_warnings}; do
19628 case $w in
19629 -Werr*) WERROR_CFLAGS=-Werror ;;
19630 *) # Check that GCC accepts it
4536bbc6
AC
19631 saved_CFLAGS="$CFLAGS"
19632 CFLAGS="$CFLAGS $w"
bec39cab
AC
19633 cat >conftest.$ac_ext <<_ACEOF
19634/* confdefs.h. */
19635_ACEOF
19636cat confdefs.h >>conftest.$ac_ext
19637cat >>conftest.$ac_ext <<_ACEOF
19638/* end confdefs.h. */
4536bbc6 19639
bec39cab
AC
19640int
19641main ()
19642{
4536bbc6 19643
bec39cab
AC
19644 ;
19645 return 0;
19646}
19647_ACEOF
19648rm -f conftest.$ac_objext
19649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19650 (eval $ac_compile) 2>conftest.er1
19651 ac_status=$?
19652 grep -v '^ *+' conftest.er1 >conftest.err
19653 rm -f conftest.er1
19654 cat conftest.err >&5
19655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19656 (exit $ac_status); } &&
b4e70030
JB
19657 { ac_try='test -z "$ac_c_werror_flag"
19658 || test ! -s conftest.err'
bec39cab
AC
19659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19660 (eval $ac_try) 2>&5
19661 ac_status=$?
19662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19663 (exit $ac_status); }; } &&
19664 { ac_try='test -s conftest.$ac_objext'
19665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19666 (eval $ac_try) 2>&5
19667 ac_status=$?
19668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19669 (exit $ac_status); }; }; then
4536bbc6
AC
19670 WARN_CFLAGS="${WARN_CFLAGS} $w"
19671else
bec39cab
AC
19672 echo "$as_me: failed program was:" >&5
19673sed 's/^/| /' conftest.$ac_ext >&5
19674
4536bbc6 19675fi
bec39cab 19676rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 19677 CFLAGS="$saved_CFLAGS"
746a987d
AC
19678 esac
19679 done
aa79a185
DJ
19680 echo "$as_me:$LINENO: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
19681echo "${ECHO_T}${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6
c906108c
SS
19682fi
19683
19684
104c1213 19685
7a292a7a 19686# In the Cygwin environment, we need some additional flags.
b4e70030
JB
19687echo "$as_me:$LINENO: checking for cygwin" >&5
19688echo $ECHO_N "checking for cygwin... $ECHO_C" >&6
bec39cab
AC
19689if test "${gdb_cv_os_cygwin+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. */
7a292a7a
SS
19698
19699#if defined (__CYGWIN__) || defined (__CYGWIN32__)
19700lose
19701#endif
bec39cab 19702_ACEOF
7a292a7a 19703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 19704 $EGREP "lose" >/dev/null 2>&1; then
7a292a7a
SS
19705 gdb_cv_os_cygwin=yes
19706else
7a292a7a
SS
19707 gdb_cv_os_cygwin=no
19708fi
19709rm -f conftest*
19710
19711fi
b4e70030
JB
19712echo "$as_me:$LINENO: result: $gdb_cv_os_cygwin" >&5
19713echo "${ECHO_T}$gdb_cv_os_cygwin" >&6
7a292a7a 19714
aff38e61 19715
3eb25fda 19716SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 19717case ${host} in
95cbc983
AC
19718 *go32* ) SER_HARDWIRE=ser-go32.o ;;
19719 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 19720 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
19721esac
19722
19723
cd0fc7c3
SS
19724# libreadline needs libuser32.a in a cygwin environment
19725WIN32LIBS=
19726if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
19727 WIN32LIBS="-luser32"
19728 case "${target}" in
19729 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
19730 ;;
19731 esac
cd0fc7c3 19732fi
c906108c 19733
b4505029
MM
19734# The ser-tcp.c module requires sockets.
19735case ${host} in
19736 *mingw32*)
19737
19738cat >>confdefs.h <<\_ACEOF
19739#define USE_WIN32API 1
19740_ACEOF
19741
19742 WIN32LIBS="$WIN32LIBS -lws2_32"
19743 ;;
19744esac
19745
7a292a7a 19746
31d99776
DJ
19747# Add ELF support to GDB, but only if BFD includes ELF support.
19748OLD_CFLAGS=$CFLAGS
19749OLD_LDFLAGS=$LDFLAGS
19750OLD_LIBS=$LIBS
cab58a69 19751CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 19752LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 19753intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
0f72fb1c 19754LIBS="-lbfd -liberty $intl $LIBS"
31d99776
DJ
19755echo "$as_me:$LINENO: checking for ELF support in BFD" >&5
19756echo $ECHO_N "checking for ELF support in BFD... $ECHO_C" >&6
19757if test "${gdb_cv_var_elf+set}" = set; then
19758 echo $ECHO_N "(cached) $ECHO_C" >&6
19759else
19760 cat >conftest.$ac_ext <<_ACEOF
19761/* confdefs.h. */
19762_ACEOF
19763cat confdefs.h >>conftest.$ac_ext
19764cat >>conftest.$ac_ext <<_ACEOF
19765/* end confdefs.h. */
19766#include <stdlib.h>
19767#include "bfd.h"
19768#include "elf-bfd.h"
19769
19770int
19771main ()
19772{
19773bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
19774 ;
19775 return 0;
19776}
19777_ACEOF
19778rm -f conftest.$ac_objext conftest$ac_exeext
19779if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19780 (eval $ac_link) 2>conftest.er1
19781 ac_status=$?
19782 grep -v '^ *+' conftest.er1 >conftest.err
19783 rm -f conftest.er1
19784 cat conftest.err >&5
19785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19786 (exit $ac_status); } &&
19787 { ac_try='test -z "$ac_c_werror_flag"
19788 || test ! -s conftest.err'
19789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19790 (eval $ac_try) 2>&5
19791 ac_status=$?
19792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19793 (exit $ac_status); }; } &&
19794 { ac_try='test -s conftest$ac_exeext'
19795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19796 (eval $ac_try) 2>&5
19797 ac_status=$?
19798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19799 (exit $ac_status); }; }; then
19800 gdb_cv_var_elf=yes
19801else
19802 echo "$as_me: failed program was:" >&5
19803sed 's/^/| /' conftest.$ac_ext >&5
19804
19805gdb_cv_var_elf=no
19806fi
19807rm -f conftest.err conftest.$ac_objext \
19808 conftest$ac_exeext conftest.$ac_ext
19809fi
19810echo "$as_me:$LINENO: result: $gdb_cv_var_elf" >&5
19811echo "${ECHO_T}$gdb_cv_var_elf" >&6
19812if test $gdb_cv_var_elf = yes; then
19813 CONFIG_OBS="$CONFIG_OBS elfread.o"
19814
19815cat >>confdefs.h <<\_ACEOF
19816#define HAVE_ELF 1
19817_ACEOF
19818
19819fi
19820CFLAGS=$OLD_CFLAGS
19821LDFLAGS=$OLD_LDFLAGS
19822LIBS=$OLD_LIBS
19823
121ce6e5
DJ
19824# Add any host-specific objects to GDB.
19825CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
19826
3fc11d3e
JM
19827LIBGUI="../libgui/src/libgui.a"
19828GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
19829
19830
7a292a7a 19831
3fc11d3e
JM
19832WIN32LDAPP=
19833
19834
19835
d91670b9 19836case "${host}" in
686a5eed 19837*-*-cygwin* | *-*-mingw* )
d91670b9
CV
19838 configdir="win"
19839 ;;
19840*)
19841 configdir="unix"
19842 ;;
19843esac
3fc11d3e
JM
19844
19845GDBTKLIBS=
19846if test "${enable_gdbtk}" = "yes"; then
19847
d1c3b63a
KS
19848 # Gdbtk must have an absolute path to srcdir in order to run
19849 # properly when not installed.
19850 here=`pwd`
19851 cd ${srcdir}
19852 GDBTK_SRC_DIR=`pwd`
19853 cd $here
19854
bec39cab 19855
5062cc19
KS
19856 #
19857 # Ok, lets find the tcl configuration
19858 # First, look for one uninstalled.
19859 # the alternative search directory is invoked by --with-tcl
19860 #
3fc11d3e 19861
5062cc19
KS
19862 if test x"${no_tcl}" = x ; then
19863 # we reset no_tcl in case something fails here
19864 no_tcl=true
bec39cab 19865
5062cc19
KS
19866# Check whether --with-tcl or --without-tcl was given.
19867if test "${with_tcl+set}" = set; then
19868 withval="$with_tcl"
b4e70030
JB
19869 with_tclconfig=${withval}
19870fi;
5062cc19 19871 echo "$as_me:$LINENO: checking for Tcl configuration" >&5
b4e70030 19872echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
5062cc19 19873 if test "${ac_cv_c_tclconfig+set}" = set; then
bec39cab 19874 echo $ECHO_N "(cached) $ECHO_C" >&6
3fc11d3e 19875else
bec39cab 19876
3fc11d3e 19877
5062cc19
KS
19878 # First check to see if --with-tcl was specified.
19879 case "${host}" in
19880 *-*-cygwin*) platDir="win" ;;
19881 *) platDir="unix" ;;
19882 esac
19883 if test x"${with_tclconfig}" != x ; then
19884 if test -f "${with_tclconfig}/tclConfig.sh" ; then
19885 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
19886 else
19887 { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
bec39cab
AC
19888echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
19889 { (exit 1); exit 1; }; }
5062cc19
KS
19890 fi
19891 fi
19892
19893 # then check for a private Tcl installation
19894 if test x"${ac_cv_c_tclconfig}" = x ; then
19895 for i in \
19896 ../tcl \
19897 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
19898 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
19899 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
19900 ../../tcl \
19901 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
19902 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
19903 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
19904 ../../../tcl \
19905 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
19906 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
19907 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
19908 if test -f "$i/$platDir/tclConfig.sh" ; then
19909 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
19910 break
19911 fi
19912 done
19913 fi
19914
19915 # on Darwin, check in Framework installation locations
19916 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
19917 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
19918 `ls -d /Library/Frameworks 2>/dev/null` \
19919 `ls -d /Network/Library/Frameworks 2>/dev/null` \
19920 `ls -d /System/Library/Frameworks 2>/dev/null` \
19921 ; do
19922 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
19923 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
19924 break
19925 fi
19926 done
19927 fi
19928
19929 # check in a few common install locations
19930 if test x"${ac_cv_c_tclconfig}" = x ; then
19931 for i in `ls -d ${libdir} 2>/dev/null` \
19932 `ls -d ${exec_prefix}/lib 2>/dev/null` \
19933 `ls -d ${prefix}/lib 2>/dev/null` \
19934 `ls -d /usr/local/lib 2>/dev/null` \
19935 `ls -d /usr/contrib/lib 2>/dev/null` \
19936 `ls -d /usr/lib 2>/dev/null` \
19937 ; do
19938 if test -f "$i/tclConfig.sh" ; then
19939 ac_cv_c_tclconfig=`(cd $i; pwd)`
19940 break
19941 fi
19942 done
19943 fi
3fc11d3e 19944
5062cc19
KS
19945 # check in a few other private locations
19946 if test x"${ac_cv_c_tclconfig}" = x ; then
19947 for i in \
19948 ${srcdir}/../tcl \
19949 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
19950 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
19951 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
19952 if test -f "$i/$platDir/tclConfig.sh" ; then
19953 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
19954 break
19955 fi
19956 done
19957 fi
bec39cab 19958
3fc11d3e
JM
19959fi
19960
5062cc19
KS
19961
19962 if test x"${ac_cv_c_tclconfig}" = x ; then
19963 TCL_BIN_DIR="# no Tcl configs found"
19964 { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
bec39cab 19965echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
19966 else
19967 no_tcl=
19968 TCL_BIN_DIR=${ac_cv_c_tclconfig}
19969 echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
19970echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
19971 fi
19972 fi
3fc11d3e 19973
bec39cab 19974
85541719
DE
19975 # If $no_tk is nonempty, then we can't do Tk, and there is no
19976 # point to doing Tcl.
bec39cab 19977
5062cc19
KS
19978 #
19979 # Ok, lets find the tk configuration
19980 # First, look for one uninstalled.
19981 # the alternative search directory is invoked by --with-tk
19982 #
3fc11d3e 19983
5062cc19
KS
19984 if test x"${no_tk}" = x ; then
19985 # we reset no_tk in case something fails here
19986 no_tk=true
bec39cab 19987
5062cc19
KS
19988# Check whether --with-tk or --without-tk was given.
19989if test "${with_tk+set}" = set; then
19990 withval="$with_tk"
19991 with_tkconfig=${withval}
b4e70030 19992fi;
5062cc19
KS
19993 echo "$as_me:$LINENO: checking for Tk configuration" >&5
19994echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6
19995 if test "${ac_cv_c_tkconfig+set}" = set; then
bec39cab
AC
19996 echo $ECHO_N "(cached) $ECHO_C" >&6
19997else
3fc11d3e
JM
19998
19999
5062cc19
KS
20000 # First check to see if --with-tkconfig was specified.
20001 if test x"${with_tkconfig}" != x ; then
20002 if test -f "${with_tkconfig}/tkConfig.sh" ; then
20003 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
20004 else
20005 { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
20006echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
bec39cab 20007 { (exit 1); exit 1; }; }
5062cc19
KS
20008 fi
20009 fi
3fc11d3e 20010
5062cc19
KS
20011 # then check for a private Tk library
20012 case "${host}" in
20013 *-*-cygwin*) platDir="win" ;;
20014 *) platDir="unix" ;;
20015 esac
20016 if test x"${ac_cv_c_tkconfig}" = x ; then
20017 for i in \
20018 ../tk \
20019 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20020 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
20021 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
20022 ../../tk \
20023 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20024 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
20025 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
20026 ../../../tk \
20027 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20028 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
20029 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
20030 if test -f "$i/$platDir/tkConfig.sh" ; then
20031 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20032 break
20033 fi
20034 done
20035 fi
20036
20037 # on Darwin, check in Framework installation locations
20038 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
20039 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
20040 `ls -d /Library/Frameworks 2>/dev/null` \
20041 `ls -d /Network/Library/Frameworks 2>/dev/null` \
20042 `ls -d /System/Library/Frameworks 2>/dev/null` \
20043 ; do
20044 if test -f "$i/Tk.framework/tkConfig.sh" ; then
20045 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
20046 break
20047 fi
20048 done
20049 fi
20050
20051 # check in a few common install locations
20052 if test x"${ac_cv_c_tkconfig}" = x ; then
20053 for i in `ls -d ${libdir} 2>/dev/null` \
20054 `ls -d ${exec_prefix}/lib 2>/dev/null` \
20055 `ls -d ${prefix}/lib 2>/dev/null` \
20056 `ls -d /usr/local/lib 2>/dev/null` \
20057 `ls -d /usr/contrib/lib 2>/dev/null` \
20058 `ls -d /usr/lib 2>/dev/null` \
20059 ; do
20060 if test -f "$i/tkConfig.sh" ; then
20061 ac_cv_c_tkconfig=`(cd $i; pwd)`
20062 break
20063 fi
20064 done
20065 fi
20066 # check in a few other private locations
20067 if test x"${ac_cv_c_tkconfig}" = x ; then
20068 for i in \
20069 ${srcdir}/../tk \
20070 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20071 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
20072 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
20073 if test -f "$i/$platDir/tkConfig.sh" ; then
20074 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20075 break
20076 fi
20077 done
20078 fi
3fc11d3e 20079
3fc11d3e
JM
20080fi
20081
20082
5062cc19
KS
20083 if test x"${ac_cv_c_tkconfig}" = x ; then
20084 TK_BIN_DIR="# no Tk configs found"
20085 { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
20086echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
20087 else
20088 no_tk=
20089 TK_BIN_DIR=${ac_cv_c_tkconfig}
20090 echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
20091echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6
20092 fi
3fc11d3e 20093 fi
dd2504ab 20094
dd2504ab 20095
85541719
DE
20096 if test -z "${no_tcl}" -a -z "${no_tk}"; then
20097
20098 echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
20099echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
20100
20101 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
20102 echo "$as_me:$LINENO: result: loading" >&5
20103echo "${ECHO_T}loading" >&6
20104 . ${TCL_BIN_DIR}/tclConfig.sh
20105 else
20106 echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
20107echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
20108 fi
20109
20110 # eval is required to do the TCL_DBGX substitution
20111 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
20112 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
20113
20114 # If the TCL_BIN_DIR is the build directory (not the install directory),
20115 # then set the common variable name to the value of the build variables.
20116 # For example, the variable TCL_LIB_SPEC will be set to the value
20117 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
20118 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
20119 # installed and uninstalled version of Tcl.
20120 if test -f "${TCL_BIN_DIR}/Makefile" ; then
20121 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
20122 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
20123 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
20124 elif test "`uname -s`" = "Darwin"; then
20125 # If Tcl was built as a framework, attempt to use the libraries
20126 # from the framework at the given location so that linking works
20127 # against Tcl.framework installed in an arbitary location.
20128 case ${TCL_DEFS} in
20129 *TCL_FRAMEWORK*)
20130 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
20131 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
20132 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
20133 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
20134 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
20135 break
20136 fi
20137 done
20138 fi
20139 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
20140 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
20141 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
20142 fi
20143 ;;
20144 esac
20145 fi
20146
20147 # eval is required to do the TCL_DBGX substitution
20148 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
20149 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
20150 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
20151 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167 # Check for in-tree tcl
20168 here=`pwd`
20169 cd ${srcdir}/..
20170 topdir=`pwd`
20171 cd ${here}
20172
20173 intree="no"
20174 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
20175 intree="yes"
20176 fi
20177
20178 # Find Tcl private headers
20179 if test x"${intree}" = xno; then
20180
20181 echo "$as_me:$LINENO: checking for Tcl private headers" >&5
20182echo $ECHO_N "checking for Tcl private headers... $ECHO_C" >&6
20183 private_dir=""
20184 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
20185 if test -f ${dir}/tclInt.h ; then
20186 private_dir=${dir}
20187 fi
20188
20189 if test x"${private_dir}" = x; then
20190 { { echo "$as_me:$LINENO: error: could not find private Tcl headers" >&5
20191echo "$as_me: error: could not find private Tcl headers" >&2;}
20192 { (exit 1); exit 1; }; }
20193 else
20194 TCL_PRIVATE_INCLUDE="-I${private_dir}"
20195 echo "$as_me:$LINENO: result: ${private_dir}" >&5
20196echo "${ECHO_T}${private_dir}" >&6
20197 fi
20198
20199 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
20200 TCL_LIBRARY="${TCL_LIB_SPEC}"
20201 TCL_DEPS=""
20202 else
20203 # If building tcl in the same src tree, private headers
20204 # are not needed, but we need to be sure to use the right
20205 # headers library
20206 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
20207 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
20208 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
20209 fi
20210
20211
20212
20213
20214
5062cc19
KS
20215 echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
20216echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6
dd2504ab 20217
5062cc19
KS
20218 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
20219 echo "$as_me:$LINENO: result: loading" >&5
20220echo "${ECHO_T}loading" >&6
20221 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 20222 else
5062cc19
KS
20223 echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
20224echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
3fc11d3e 20225 fi
bec39cab 20226
5062cc19
KS
20227 # eval is required to do the TK_DBGX substitution
20228 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
20229 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
20230
20231 # If the TK_BIN_DIR is the build directory (not the install directory),
20232 # then set the common variable name to the value of the build variables.
20233 # For example, the variable TK_LIB_SPEC will be set to the value
20234 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
20235 # instead of TK_BUILD_LIB_SPEC since it will work with both an
20236 # installed and uninstalled version of Tcl.
85541719 20237 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
20238 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
20239 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
20240 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
20241 elif test "`uname -s`" = "Darwin"; then
20242 # If Tk was built as a framework, attempt to use the libraries
20243 # from the framework at the given location so that linking works
20244 # against Tk.framework installed in an arbitary location.
20245 case ${TK_DEFS} in
20246 *TK_FRAMEWORK*)
85541719 20247 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
20248 for i in "`cd ${TK_BIN_DIR}; pwd`" \
20249 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
20250 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
20251 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
20252 break
20253 fi
20254 done
20255 fi
85541719 20256 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
20257 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
20258 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
20259 fi
20260 ;;
20261 esac
3fc11d3e
JM
20262 fi
20263
5062cc19
KS
20264 # eval is required to do the TK_DBGX substitution
20265 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
20266 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
20267 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
20268 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 20269
3fc11d3e
JM
20270
20271
bec39cab
AC
20272
20273
20274
20275
20276
20277
20278
3fc11d3e 20279
3fc11d3e 20280
bec39cab 20281
bec39cab 20282
85541719
DE
20283 # Check for in-tree Tk
20284 intree="no"
20285 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
20286 intree="yes"
20287 fi
3fc11d3e 20288
85541719
DE
20289 # Find Tk private headers
20290 if test x"${intree}" = xno; then
3fc11d3e 20291
5062cc19
KS
20292 echo "$as_me:$LINENO: checking for Tk private headers" >&5
20293echo $ECHO_N "checking for Tk private headers... $ECHO_C" >&6
20294 private_dir=""
20295 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
20296 if test -f ${dir}/tkInt.h; then
20297 private_dir=${dir}
3fc11d3e 20298 fi
bec39cab 20299
5062cc19
KS
20300 if test x"${private_dir}" = x; then
20301 { { echo "$as_me:$LINENO: error: could not find Tk private headers" >&5
20302echo "$as_me: error: could not find Tk private headers" >&2;}
20303 { (exit 1); exit 1; }; }
3fc11d3e 20304 else
5062cc19
KS
20305 TK_PRIVATE_INCLUDE="-I${private_dir}"
20306 echo "$as_me:$LINENO: result: ${private_dir}" >&5
20307echo "${ECHO_T}${private_dir}" >&6
3fc11d3e 20308 fi
3fc11d3e 20309
85541719
DE
20310 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
20311 TK_LIBRARY=${TK_LIB_SPEC}
20312 TK_DEPS=""
20313 else
20314 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
20315 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
20316 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
20317 fi
3fc11d3e
JM
20318
20319
3fc11d3e
JM
20320
20321
3fc11d3e 20322
85541719 20323 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 20324
85541719
DE
20325 # Include some libraries that Tcl and Tk want.
20326 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
20327 # Yes, the ordering seems wrong here. But it isn't.
20328 # TK_LIBS is the list of libraries that need to be linked
20329 # after Tcl/Tk. Note that this isn't put into LIBS. If it
20330 # were in LIBS then any link tests after this point would
20331 # try to include things like `$(LIBGUI)', which wouldn't work.
20332 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 20333
85541719
DE
20334 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
20335 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
20336 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
20337 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
20338 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
20339 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
20340 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 20341
85541719
DE
20342 if test x$gdb_cv_os_cygwin = xyes; then
20343 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
20344 WIN32LDAPP="-Wl,--subsystem,console"
20345 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 20346 fi
ffc6a242 20347
b4e70030
JB
20348
20349
20350subdirs="$subdirs gdbtk"
3ace7edb 20351
85541719 20352 fi
3fc11d3e
JM
20353fi
20354
20355
20356
20357
20358
20359
20360
20361
b4e70030
JB
20362echo "$as_me:$LINENO: checking for X" >&5
20363echo $ECHO_N "checking for X... $ECHO_C" >&6
bec39cab 20364
c906108c 20365
b4e70030 20366# Check whether --with-x or --without-x was given.
c906108c 20367if test "${with_x+set}" = set; then
b4e70030 20368 withval="$with_x"
c906108c 20369
b4e70030 20370fi;
c906108c
SS
20371# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20372if test "x$with_x" = xno; then
20373 # The user explicitly disabled X.
20374 have_x=disabled
20375else
20376 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20377 # Both variables are already set.
20378 have_x=yes
20379 else
bec39cab
AC
20380 if test "${ac_cv_have_x+set}" = set; then
20381 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
20382else
20383 # One or both of the vars are not set, and there is no cached value.
bec39cab 20384ac_x_includes=no ac_x_libraries=no
b4e70030 20385rm -fr conftest.dir
bec39cab
AC
20386if mkdir conftest.dir; then
20387 cd conftest.dir
c906108c 20388 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
bec39cab 20389 cat >Imakefile <<'_ACEOF'
c906108c
SS
20390acfindx:
20391 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
bec39cab 20392_ACEOF
b4e70030 20393 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c
SS
20394 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20395 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
20396 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20397 for ac_extension in a so sl; do
20398 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
bec39cab
AC
20399 test -f $ac_im_libdir/libX11.$ac_extension; then
20400 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
20401 fi
20402 done
20403 # Screen out bogus values from the imake configuration. They are
20404 # bogus both because they are the default anyway, and because
20405 # using them would break gcc on systems where it needs fixed includes.
bec39cab 20406 case $ac_im_incroot in
b4e70030 20407 /usr/include) ;;
bec39cab 20408 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 20409 esac
bec39cab 20410 case $ac_im_usrlibdir in
c906108c 20411 /usr/lib | /lib) ;;
bec39cab 20412 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
20413 esac
20414 fi
20415 cd ..
b4e70030 20416 rm -fr conftest.dir
c906108c
SS
20417fi
20418
bec39cab
AC
20419# Standard set of common directories for X headers.
20420# Check X11 before X11Rn because it is often a symlink to the current release.
20421ac_x_header_dirs='
20422/usr/X11/include
20423/usr/X11R6/include
20424/usr/X11R5/include
20425/usr/X11R4/include
20426
20427/usr/include/X11
20428/usr/include/X11R6
20429/usr/include/X11R5
20430/usr/include/X11R4
20431
20432/usr/local/X11/include
20433/usr/local/X11R6/include
20434/usr/local/X11R5/include
20435/usr/local/X11R4/include
20436
20437/usr/local/include/X11
20438/usr/local/include/X11R6
20439/usr/local/include/X11R5
20440/usr/local/include/X11R4
20441
20442/usr/X386/include
20443/usr/x386/include
20444/usr/XFree86/include/X11
20445
20446/usr/include
20447/usr/local/include
20448/usr/unsupported/include
20449/usr/athena/include
20450/usr/local/x11r5/include
20451/usr/lpp/Xamples/include
20452
20453/usr/openwin/include
20454/usr/openwin/share/include'
20455
20456if test "$ac_x_includes" = no; then
59f80f10 20457 # Guess where to find include files, by looking for Intrinsic.h.
c906108c 20458 # First, try using that file with no special directory specified.
bec39cab
AC
20459 cat >conftest.$ac_ext <<_ACEOF
20460/* confdefs.h. */
20461_ACEOF
20462cat confdefs.h >>conftest.$ac_ext
20463cat >>conftest.$ac_ext <<_ACEOF
20464/* end confdefs.h. */
59f80f10 20465#include <X11/Intrinsic.h>
bec39cab
AC
20466_ACEOF
20467if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20468 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20469 ac_status=$?
20470 grep -v '^ *+' conftest.er1 >conftest.err
20471 rm -f conftest.er1
20472 cat conftest.err >&5
20473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20474 (exit $ac_status); } >/dev/null; then
20475 if test -s conftest.err; then
20476 ac_cpp_err=$ac_c_preproc_warn_flag
20477 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20478 else
20479 ac_cpp_err=
20480 fi
20481else
20482 ac_cpp_err=yes
20483fi
20484if test -z "$ac_cpp_err"; then
c906108c
SS
20485 # We can compile using X headers with no special include directory.
20486ac_x_includes=
20487else
bec39cab
AC
20488 echo "$as_me: failed program was:" >&5
20489sed 's/^/| /' conftest.$ac_ext >&5
20490
20491 for ac_dir in $ac_x_header_dirs; do
59f80f10 20492 if test -r "$ac_dir/X11/Intrinsic.h"; then
bec39cab
AC
20493 ac_x_includes=$ac_dir
20494 break
20495 fi
20496done
c906108c 20497fi
bec39cab
AC
20498rm -f conftest.err conftest.$ac_ext
20499fi # $ac_x_includes = no
c906108c 20500
bec39cab 20501if test "$ac_x_libraries" = no; then
c906108c 20502 # Check for the libraries.
c906108c
SS
20503 # See if we find them without any special options.
20504 # Don't add to $LIBS permanently.
bec39cab 20505 ac_save_LIBS=$LIBS
4e8d927d 20506 LIBS="-lXt $LIBS"
bec39cab
AC
20507 cat >conftest.$ac_ext <<_ACEOF
20508/* confdefs.h. */
20509_ACEOF
20510cat confdefs.h >>conftest.$ac_ext
20511cat >>conftest.$ac_ext <<_ACEOF
20512/* end confdefs.h. */
59f80f10 20513#include <X11/Intrinsic.h>
bec39cab
AC
20514int
20515main ()
20516{
59f80f10 20517XtMalloc (0)
bec39cab
AC
20518 ;
20519 return 0;
20520}
20521_ACEOF
20522rm -f conftest.$ac_objext conftest$ac_exeext
20523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20524 (eval $ac_link) 2>conftest.er1
20525 ac_status=$?
20526 grep -v '^ *+' conftest.er1 >conftest.err
20527 rm -f conftest.er1
20528 cat conftest.err >&5
20529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20530 (exit $ac_status); } &&
b4e70030
JB
20531 { ac_try='test -z "$ac_c_werror_flag"
20532 || test ! -s conftest.err'
bec39cab
AC
20533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20534 (eval $ac_try) 2>&5
20535 ac_status=$?
20536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20537 (exit $ac_status); }; } &&
20538 { ac_try='test -s conftest$ac_exeext'
20539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20540 (eval $ac_try) 2>&5
20541 ac_status=$?
20542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20543 (exit $ac_status); }; }; then
20544 LIBS=$ac_save_LIBS
c906108c
SS
20545# We can link X programs with no special library path.
20546ac_x_libraries=
20547else
bec39cab
AC
20548 echo "$as_me: failed program was:" >&5
20549sed 's/^/| /' conftest.$ac_ext >&5
20550
b4e70030 20551LIBS=$ac_save_LIBS
bec39cab 20552for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 20553do
bec39cab 20554 # Don't even attempt the hair of trying to link an X program!
c906108c 20555 for ac_extension in a so sl; do
b4e70030 20556 if test -r $ac_dir/libXt.$ac_extension; then
c906108c
SS
20557 ac_x_libraries=$ac_dir
20558 break 2
20559 fi
20560 done
20561done
20562fi
bec39cab
AC
20563rm -f conftest.err conftest.$ac_objext \
20564 conftest$ac_exeext conftest.$ac_ext
20565fi # $ac_x_libraries = no
c906108c 20566
bec39cab 20567if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
c906108c
SS
20568 # Didn't find X anywhere. Cache the known absence of X.
20569 ac_cv_have_x="have_x=no"
20570else
20571 # Record where we found X for the cache.
20572 ac_cv_have_x="have_x=yes \
bec39cab 20573 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
c906108c
SS
20574fi
20575fi
bec39cab 20576
c906108c
SS
20577 fi
20578 eval "$ac_cv_have_x"
20579fi # $with_x != no
20580
20581if test "$have_x" != yes; then
b4e70030
JB
20582 echo "$as_me:$LINENO: result: $have_x" >&5
20583echo "${ECHO_T}$have_x" >&6
c906108c
SS
20584 no_x=yes
20585else
20586 # If each of the values was on the command line, it overrides each guess.
20587 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
20588 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
20589 # Update the cache value to reflect the command line values.
20590 ac_cv_have_x="have_x=yes \
20591 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
b4e70030
JB
20592 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
20593echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
c906108c
SS
20594fi
20595
20596
bec39cab 20597# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 20598# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
20599# This code just checks for a few cases where we'd like to ignore those
20600# definitions, even when they're present in the '.mt' file. These cases
20601# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 20602# not part of the source tree.
7a292a7a 20603#
b4e70030 20604# Check whether --enable-sim or --disable-sim was given.
7a292a7a 20605if test "${enable_sim+set}" = set; then
b4e70030
JB
20606 enableval="$enable_sim"
20607 echo "enable_sim = $enable_sim";
7a292a7a
SS
20608 echo "enableval = ${enableval}";
20609 case "${enableval}" in
20610 yes) ignore_sim=false ;;
20611 no) ignore_sim=true ;;
20612 *) ignore_sim=false ;;
20613 esac
20614else
20615 ignore_sim=false
b4e70030 20616fi;
7a292a7a
SS
20617
20618if test ! -d "${srcdir}/../sim"; then
20619 ignore_sim=true
20620fi
20621
9b624dbe
UW
20622SIM=
20623SIM_OBS=
20624if test "${ignore_sim}" = "false"; then
20625 if test x"${gdb_sim}" != x ; then
20626 SIM="${gdb_sim}"
20627 SIM_OBS="remote-sim.o"
60ca704f
SE
20628
20629cat >>confdefs.h <<\_ACEOF
7a292a7a 20630#define WITH_SIM 1
bec39cab 20631_ACEOF
7a292a7a 20632
9b624dbe 20633 fi
7a292a7a
SS
20634fi
20635
20636
20637
c906108c
SS
20638
20639
20640
20641
20642
20643
dfcd3bfb 20644
e56ac5c3
AC
20645
20646
b3a90332
AC
20647
20648
c35f4ffc 20649# List of host floatformats.
bec39cab
AC
20650
20651cat >>confdefs.h <<_ACEOF
c35f4ffc 20652#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 20653_ACEOF
c35f4ffc 20654
bec39cab
AC
20655
20656cat >>confdefs.h <<_ACEOF
c35f4ffc 20657#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
20658_ACEOF
20659
c35f4ffc 20660
bec39cab 20661cat >>confdefs.h <<_ACEOF
c35f4ffc 20662#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 20663_ACEOF
c35f4ffc
AC
20664
20665
c906108c
SS
20666# target_subdir is used by the testsuite to find the target libraries.
20667target_subdir=
20668if test "${host}" != "${target}"; then
20669 target_subdir="${target_alias}/"
20670fi
20671
20672
20673frags=
771b4502 20674if test "${gdb_native}" = "yes"; then
0dad8a66
MK
20675 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
20676 if test ! -f ${host_makefile_frag}; then
bec39cab
AC
20677 { { echo "$as_me:$LINENO: error: \"*** Gdb does not support native target ${host}\"" >&5
20678echo "$as_me: error: \"*** Gdb does not support native target ${host}\"" >&2;}
20679 { (exit 1); exit 1; }; }
0dad8a66
MK
20680 fi
20681 frags="$frags $host_makefile_frag"
20682else
20683 host_makefile_frag=/dev/null
c906108c 20684fi
c906108c 20685
c906108c
SS
20686
20687
20688
771b4502 20689if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
20690# We pick this up from the host configuration file (.mh) because we
20691# do not have a native configuration Makefile fragment.
c906108c
SS
20692nativefile=`sed -n '
20693s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
20694' ${host_makefile_frag}`
c906108c
SS
20695fi
20696
20697
b00a8037 20698if test x"${gdb_osabi}" != x ; then
bec39cab
AC
20699
20700cat >>confdefs.h <<_ACEOF
b00a8037 20701#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 20702_ACEOF
b00a8037
DJ
20703
20704fi
20705
8dcde887 20706# Enable multi-ice-gdb-server.
b4e70030 20707# Check whether --enable-multi-ice or --disable-multi-ice was given.
8dcde887 20708if test "${enable_multi_ice+set}" = set; then
b4e70030
JB
20709 enableval="$enable_multi_ice"
20710 case $enableval in
8dcde887
MK
20711 yes | no)
20712 ;;
bec39cab
AC
20713 *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-multi-ice" >&5
20714echo "$as_me: error: bad value $enableval for --enable-multi-ice" >&2;}
20715 { (exit 1); exit 1; }; } ;;
8dcde887 20716 esac
b4e70030 20717fi;
4e8d927d 20718if test "x$enable_multi_ice" = xyes; then
b4e70030
JB
20719
20720
20721subdirs="$subdirs multi-ice"
3ace7edb 20722
a85f51e7
DJ
20723fi
20724
a13e2c95
UW
20725# We only build gdbserver automatically in a native configuration.
20726if test "$gdb_native" = "yes"; then
b4e70030
JB
20727 echo "$as_me:$LINENO: checking whether gdbserver is supported on this host" >&5
20728echo $ECHO_N "checking whether gdbserver is supported on this host... $ECHO_C" >&6
8dcde887 20729 if test "x$build_gdbserver" = xyes; then
b4e70030
JB
20730 echo "$as_me:$LINENO: result: yes" >&5
20731echo "${ECHO_T}yes" >&6
20732
20733
20734subdirs="$subdirs gdbserver"
3ace7edb 20735
8dcde887 20736 else
b4e70030
JB
20737 echo "$as_me:$LINENO: result: no" >&5
20738echo "${ECHO_T}no" >&6
8dcde887
MK
20739 fi
20740fi
20741
db985757 20742# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 20743# to an empty version.
c906108c
SS
20744
20745files=
20746links=
5a2402b8 20747
c906108c 20748rm -f nm.h
5a2402b8 20749nm_h=""
c906108c 20750if test "${nativefile}" != ""; then
5a2402b8 20751 nm_h=nm.h
0f475e27
AC
20752 case "${nativefile}" in
20753 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
20754 * ) GDB_NM_FILE="${nativefile}"
20755 esac
5a2402b8
AC
20756 files="${files} ${GDB_NM_FILE}"
20757 links="${links} nm.h"
60ca704f
SE
20758
20759cat >>confdefs.h <<_ACEOF
b78960be 20760#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 20761_ACEOF
5a2402b8 20762
c906108c 20763fi
5a2402b8
AC
20764
20765
bec39cab
AC
20766ac_sources="$files"
20767ac_dests="$links"
20768while test -n "$ac_sources"; do
20769 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
20770 set $ac_sources; ac_source=$1; shift; ac_sources=$*
20771 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
20772done
b4e70030 20773 ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
20774
20775
c906108c
SS
20776
20777
c906108c 20778
c906108c 20779
bec39cab
AC
20780cat >>confdefs.h <<\_ACEOF
20781#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
20782_ACEOF
c906108c 20783
234b45d4 20784
234b45d4
KB
20785
20786
20787
b4e70030 20788# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
234b45d4 20789if test "${with_libiconv_prefix+set}" = set; then
b4e70030
JB
20790 withval="$with_libiconv_prefix"
20791
234b45d4
KB
20792 for dir in `echo "$withval" | tr : ' '`; do
20793 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
20794 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
20795 done
234b45d4 20796
b4e70030 20797fi;
234b45d4 20798
b4e70030
JB
20799 echo "$as_me:$LINENO: checking for iconv" >&5
20800echo $ECHO_N "checking for iconv... $ECHO_C" >&6
bec39cab
AC
20801if test "${am_cv_func_iconv+set}" = set; then
20802 echo $ECHO_N "(cached) $ECHO_C" >&6
234b45d4 20803else
bec39cab 20804
234b45d4
KB
20805 am_cv_func_iconv="no, consider installing GNU libiconv"
20806 am_cv_lib_iconv=no
bec39cab
AC
20807 cat >conftest.$ac_ext <<_ACEOF
20808/* confdefs.h. */
20809_ACEOF
20810cat confdefs.h >>conftest.$ac_ext
20811cat >>conftest.$ac_ext <<_ACEOF
20812/* end confdefs.h. */
234b45d4
KB
20813#include <stdlib.h>
20814#include <iconv.h>
bec39cab
AC
20815int
20816main ()
20817{
234b45d4
KB
20818iconv_t cd = iconv_open("","");
20819 iconv(cd,NULL,NULL,NULL,NULL);
20820 iconv_close(cd);
bec39cab
AC
20821 ;
20822 return 0;
20823}
20824_ACEOF
20825rm -f conftest.$ac_objext conftest$ac_exeext
20826if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20827 (eval $ac_link) 2>conftest.er1
20828 ac_status=$?
20829 grep -v '^ *+' conftest.er1 >conftest.err
20830 rm -f conftest.er1
20831 cat conftest.err >&5
20832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20833 (exit $ac_status); } &&
b4e70030
JB
20834 { ac_try='test -z "$ac_c_werror_flag"
20835 || test ! -s conftest.err'
bec39cab
AC
20836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20837 (eval $ac_try) 2>&5
20838 ac_status=$?
20839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20840 (exit $ac_status); }; } &&
20841 { ac_try='test -s conftest$ac_exeext'
20842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20843 (eval $ac_try) 2>&5
20844 ac_status=$?
20845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20846 (exit $ac_status); }; }; then
234b45d4
KB
20847 am_cv_func_iconv=yes
20848else
bec39cab
AC
20849 echo "$as_me: failed program was:" >&5
20850sed 's/^/| /' conftest.$ac_ext >&5
20851
234b45d4 20852fi
bec39cab
AC
20853rm -f conftest.err conftest.$ac_objext \
20854 conftest$ac_exeext conftest.$ac_ext
234b45d4
KB
20855 if test "$am_cv_func_iconv" != yes; then
20856 am_save_LIBS="$LIBS"
20857 LIBS="$LIBS -liconv"
bec39cab
AC
20858 cat >conftest.$ac_ext <<_ACEOF
20859/* confdefs.h. */
20860_ACEOF
20861cat confdefs.h >>conftest.$ac_ext
20862cat >>conftest.$ac_ext <<_ACEOF
20863/* end confdefs.h. */
234b45d4
KB
20864#include <stdlib.h>
20865#include <iconv.h>
bec39cab
AC
20866int
20867main ()
20868{
234b45d4
KB
20869iconv_t cd = iconv_open("","");
20870 iconv(cd,NULL,NULL,NULL,NULL);
20871 iconv_close(cd);
bec39cab
AC
20872 ;
20873 return 0;
20874}
20875_ACEOF
20876rm -f conftest.$ac_objext conftest$ac_exeext
20877if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20878 (eval $ac_link) 2>conftest.er1
20879 ac_status=$?
20880 grep -v '^ *+' conftest.er1 >conftest.err
20881 rm -f conftest.er1
20882 cat conftest.err >&5
20883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20884 (exit $ac_status); } &&
b4e70030
JB
20885 { ac_try='test -z "$ac_c_werror_flag"
20886 || test ! -s conftest.err'
bec39cab
AC
20887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20888 (eval $ac_try) 2>&5
20889 ac_status=$?
20890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20891 (exit $ac_status); }; } &&
20892 { ac_try='test -s conftest$ac_exeext'
20893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20894 (eval $ac_try) 2>&5
20895 ac_status=$?
20896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20897 (exit $ac_status); }; }; then
234b45d4
KB
20898 am_cv_lib_iconv=yes
20899 am_cv_func_iconv=yes
20900else
bec39cab
AC
20901 echo "$as_me: failed program was:" >&5
20902sed 's/^/| /' conftest.$ac_ext >&5
20903
234b45d4 20904fi
bec39cab
AC
20905rm -f conftest.err conftest.$ac_objext \
20906 conftest$ac_exeext conftest.$ac_ext
234b45d4
KB
20907 LIBS="$am_save_LIBS"
20908 fi
bec39cab
AC
20909
20910fi
b4e70030
JB
20911echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
20912echo "${ECHO_T}$am_cv_func_iconv" >&6
bec39cab
AC
20913 if test "$am_cv_func_iconv" = yes; then
20914
20915cat >>confdefs.h <<\_ACEOF
20916#define HAVE_ICONV 1
20917_ACEOF
20918
b4e70030
JB
20919 echo "$as_me:$LINENO: checking for iconv declaration" >&5
20920echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
bec39cab
AC
20921 if test "${am_cv_proto_iconv+set}" = set; then
20922 echo $ECHO_N "(cached) $ECHO_C" >&6
20923else
20924
20925 cat >conftest.$ac_ext <<_ACEOF
20926/* confdefs.h. */
20927_ACEOF
20928cat confdefs.h >>conftest.$ac_ext
20929cat >>conftest.$ac_ext <<_ACEOF
20930/* end confdefs.h. */
20931
20932#include <stdlib.h>
20933#include <iconv.h>
20934extern
20935#ifdef __cplusplus
20936"C"
20937#endif
20938#if defined(__STDC__) || defined(__cplusplus)
20939size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
20940#else
20941size_t iconv();
20942#endif
20943
20944int
20945main ()
20946{
20947
20948 ;
20949 return 0;
20950}
20951_ACEOF
20952rm -f conftest.$ac_objext
20953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20954 (eval $ac_compile) 2>conftest.er1
20955 ac_status=$?
20956 grep -v '^ *+' conftest.er1 >conftest.err
20957 rm -f conftest.er1
20958 cat conftest.err >&5
20959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20960 (exit $ac_status); } &&
b4e70030
JB
20961 { ac_try='test -z "$ac_c_werror_flag"
20962 || test ! -s conftest.err'
bec39cab
AC
20963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20964 (eval $ac_try) 2>&5
20965 ac_status=$?
20966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20967 (exit $ac_status); }; } &&
20968 { ac_try='test -s conftest.$ac_objext'
20969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20970 (eval $ac_try) 2>&5
20971 ac_status=$?
20972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20973 (exit $ac_status); }; }; then
20974 am_cv_proto_iconv_arg1=""
20975else
20976 echo "$as_me: failed program was:" >&5
20977sed 's/^/| /' conftest.$ac_ext >&5
20978
b4e70030 20979am_cv_proto_iconv_arg1="const"
bec39cab
AC
20980fi
20981rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20982 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);"
20983fi
20984
20985 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
b4e70030 20986 echo "$as_me:$LINENO: result: ${ac_t:-
bec39cab
AC
20987 }$am_cv_proto_iconv" >&5
20988echo "${ECHO_T}${ac_t:-
b4e70030 20989 }$am_cv_proto_iconv" >&6
bec39cab
AC
20990
20991cat >>confdefs.h <<_ACEOF
20992#define ICONV_CONST $am_cv_proto_iconv_arg1
20993_ACEOF
20994
20995 fi
20996 LIBICONV=
20997 if test "$am_cv_lib_iconv" = yes; then
20998 LIBICONV="-liconv"
20999 fi
21000
21001
21002
e28b3332 21003 ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
b4e70030 21004 ac_config_commands="$ac_config_commands default"
bec39cab
AC
21005cat >confcache <<\_ACEOF
21006# This file is a shell script that caches the results of configure
21007# tests run on this system so they can be shared between configure
21008# scripts and configure runs, see configure's option --config-cache.
21009# It is not useful on other systems. If it contains results you don't
21010# want to keep, you may remove or edit it.
21011#
21012# config.status only pays attention to the cache file if you give it
21013# the --recheck option to rerun configure.
21014#
21015# `ac_cv_env_foo' variables (set or unset) will be overridden when
21016# loading this file, other *unset* `ac_cv_foo' will be assigned the
21017# following values.
21018
21019_ACEOF
21020
21021# The following way of writing the cache mishandles newlines in values,
21022# but we know of no workaround that is simple, portable, and efficient.
b4e70030 21023# So, don't put newlines in cache variables' values.
bec39cab
AC
21024# Ultrix sh set writes to stderr and can't be redirected directly,
21025# and sets the high bit in the cache file unless we assign to the vars.
b4e70030 21026{
bec39cab 21027 (set) 2>&1 |
b4e70030
JB
21028 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21029 *ac_space=\ *)
bec39cab
AC
21030 # `set' does not quote correctly, so add quotes (double-quote
21031 # substitution turns \\\\ into \\, and sed turns \\ into \).
21032 sed -n \
21033 "s/'/'\\\\''/g;
21034 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b4e70030 21035 ;;
bec39cab
AC
21036 *)
21037 # `set' quotes correctly as required by POSIX, so do not add quotes.
b4e70030
JB
21038 sed -n \
21039 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 21040 ;;
b4e70030
JB
21041 esac;
21042} |
bec39cab
AC
21043 sed '
21044 t clear
b4e70030 21045 : clear
bec39cab
AC
21046 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21047 t end
b4e70030
JB
21048 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21049 : end' >>confcache
bec39cab
AC
21050if diff $cache_file confcache >/dev/null 2>&1; then :; else
21051 if test -w $cache_file; then
b4e70030 21052 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
bec39cab
AC
21053 cat confcache >$cache_file
21054 else
b4e70030 21055 echo "not updating unwritable cache $cache_file"
bec39cab
AC
21056 fi
21057fi
21058rm -f confcache
21059
21060test "x$prefix" = xNONE && prefix=$ac_default_prefix
21061# Let make expand exec_prefix.
21062test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21063
b4e70030
JB
21064# VPATH may cause trouble with some makes, so we remove $(srcdir),
21065# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21066# trailing colons and then remove the whole line if VPATH becomes empty
21067# (actually we leave an empty line to preserve line numbers).
21068if test "x$srcdir" = x.; then
21069 ac_vpsub='/^[ ]*VPATH[ ]*=/{
21070s/:*\$(srcdir):*/:/;
21071s/:*\${srcdir}:*/:/;
21072s/:*@srcdir@:*/:/;
21073s/^\([^=]*=[ ]*\):*/\1/;
21074s/:*$//;
21075s/^[^=]*=[ ]*$//;
21076}'
21077fi
21078
bec39cab
AC
21079DEFS=-DHAVE_CONFIG_H
21080
21081ac_libobjs=
21082ac_ltlibobjs=
21083for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21084 # 1. Remove the extension, and $U if already installed.
b4e70030
JB
21085 ac_i=`echo "$ac_i" |
21086 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
21087 # 2. Add them.
21088 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21089 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
bec39cab
AC
21090done
21091LIBOBJS=$ac_libobjs
21092
21093LTLIBOBJS=$ac_ltlibobjs
21094
21095
85981d60
AC
21096if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
21097 { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
21098Usually this means the macro was only invoked conditionally." >&5
21099echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
21100Usually this means the macro was only invoked conditionally." >&2;}
21101 { (exit 1); exit 1; }; }
21102fi
a417dc56
RW
21103if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
21104 { { echo "$as_me:$LINENO: error: conditional \"GMAKE\" was never defined.
21105Usually this means the macro was only invoked conditionally." >&5
21106echo "$as_me: error: conditional \"GMAKE\" was never defined.
21107Usually this means the macro was only invoked conditionally." >&2;}
21108 { (exit 1); exit 1; }; }
21109fi
783e057b
DJ
21110if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
21111 { { echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21112Usually this means the macro was only invoked conditionally." >&5
21113echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21114Usually this means the macro was only invoked conditionally." >&2;}
21115 { (exit 1); exit 1; }; }
21116fi
21117
21118 gl_libobjs=
21119 gl_ltlibobjs=
21120 if test -n "$gl_LIBOBJS"; then
21121 # Remove the extension.
21122 sed_drop_objext='s/\.o$//;s/\.obj$//'
21123 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21124 gl_libobjs="$gl_libobjs $i.$ac_objext"
21125 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
21126 done
21127 fi
21128 gl_LIBOBJS=$gl_libobjs
21129
21130 gl_LTLIBOBJS=$gl_ltlibobjs
21131
21132
21133
21134 gltests_libobjs=
21135 gltests_ltlibobjs=
21136 if test -n "$gltests_LIBOBJS"; then
21137 # Remove the extension.
21138 sed_drop_objext='s/\.o$//;s/\.obj$//'
21139 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21140 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
21141 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
21142 done
21143 fi
21144 gltests_LIBOBJS=$gltests_libobjs
21145
21146 gltests_LTLIBOBJS=$gltests_ltlibobjs
21147
21148
e28b3332
DJ
21149if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
21150 { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
21151Usually this means the macro was only invoked conditionally." >&5
21152echo "$as_me: error: conditional \"AMDEP\" was never defined.
21153Usually this means the macro was only invoked conditionally." >&2;}
21154 { (exit 1); exit 1; }; }
21155fi
21156if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
21157 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
21158Usually this means the macro was only invoked conditionally." >&5
21159echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
21160Usually this means the macro was only invoked conditionally." >&2;}
21161 { (exit 1); exit 1; }; }
21162fi
bec39cab
AC
21163
21164: ${CONFIG_STATUS=./config.status}
21165ac_clean_files_save=$ac_clean_files
21166ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21167{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21168echo "$as_me: creating $CONFIG_STATUS" >&6;}
21169cat >$CONFIG_STATUS <<_ACEOF
21170#! $SHELL
21171# Generated by $as_me.
21172# Run this file to recreate the current configuration.
21173# Compiler output produced by configure, useful for debugging
21174# configure, is in config.log if it exists.
21175
21176debug=false
21177ac_cs_recheck=false
21178ac_cs_silent=false
21179SHELL=\${CONFIG_SHELL-$SHELL}
21180_ACEOF
21181
21182cat >>$CONFIG_STATUS <<\_ACEOF
21183## --------------------- ##
21184## M4sh Initialization. ##
21185## --------------------- ##
21186
21187# Be Bourne compatible
21188if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21189 emulate sh
21190 NULLCMD=:
21191 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21192 # is contrary to our usage. Disable this feature.
21193 alias -g '${1+"$@"}'='"$@"'
b4e70030
JB
21194elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21195 set -o posix
bec39cab
AC
21196fi
21197DUALCASE=1; export DUALCASE # for MKS sh
21198
21199# Support unset when possible.
21200if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21201 as_unset=unset
21202else
21203 as_unset=false
21204fi
21205
21206
21207# Work around bugs in pre-3.0 UWIN ksh.
b4e70030 21208$as_unset ENV MAIL MAILPATH
bec39cab
AC
21209PS1='$ '
21210PS2='> '
21211PS4='+ '
21212
21213# NLS nuisances.
21214for as_var in \
21215 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21216 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21217 LC_TELEPHONE LC_TIME
21218do
21219 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
21220 eval $as_var=C; export $as_var
21221 else
b4e70030 21222 $as_unset $as_var
bec39cab
AC
21223 fi
21224done
21225
21226# Required to use basename.
b4e70030 21227if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
21228 as_expr=expr
21229else
21230 as_expr=false
21231fi
21232
b4e70030 21233if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
bec39cab
AC
21234 as_basename=basename
21235else
21236 as_basename=false
21237fi
21238
21239
21240# Name of the executable.
b4e70030 21241as_me=`$as_basename "$0" ||
bec39cab
AC
21242$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21243 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
21244 X"$0" : 'X\(/\)$' \| \
21245 . : '\(.\)' 2>/dev/null ||
bec39cab 21246echo X/"$0" |
b4e70030
JB
21247 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21248 /^X\/\(\/\/\)$/{ s//\1/; q; }
21249 /^X\/\(\/\).*/{ s//\1/; q; }
21250 s/.*/./; q'`
bec39cab 21251
b4e70030
JB
21252
21253# PATH needs CR, and LINENO needs CR and PATH.
21254# Avoid depending upon Character Ranges.
21255as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21256as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21257as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21258as_cr_digits='0123456789'
21259as_cr_alnum=$as_cr_Letters$as_cr_digits
21260
21261# The user is always right.
21262if test "${PATH_SEPARATOR+set}" != set; then
21263 echo "#! /bin/sh" >conf$$.sh
21264 echo "exit 0" >>conf$$.sh
21265 chmod +x conf$$.sh
21266 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
21267 PATH_SEPARATOR=';'
21268 else
21269 PATH_SEPARATOR=:
21270 fi
21271 rm -f conf$$.sh
21272fi
bec39cab
AC
21273
21274
b4e70030
JB
21275 as_lineno_1=$LINENO
21276 as_lineno_2=$LINENO
21277 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21278 test "x$as_lineno_1" != "x$as_lineno_2" &&
21279 test "x$as_lineno_3" = "x$as_lineno_2" || {
21280 # Find who we are. Look in the path if we contain no path at all
21281 # relative or not.
21282 case $0 in
21283 *[\\/]* ) as_myself=$0 ;;
21284 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21285for as_dir in $PATH
21286do
21287 IFS=$as_save_IFS
21288 test -z "$as_dir" && as_dir=.
21289 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21290done
bec39cab 21291
b4e70030
JB
21292 ;;
21293 esac
21294 # We did not find ourselves, most probably we were run as `sh COMMAND'
21295 # in which case we are not to be found in the path.
21296 if test "x$as_myself" = x; then
21297 as_myself=$0
21298 fi
21299 if test ! -f "$as_myself"; then
21300 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21301echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21302 { (exit 1); exit 1; }; }
21303 fi
21304 case $CONFIG_SHELL in
21305 '')
21306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21307for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21308do
21309 IFS=$as_save_IFS
21310 test -z "$as_dir" && as_dir=.
21311 for as_base in sh bash ksh sh5; do
21312 case $as_dir in
21313 /*)
21314 if ("$as_dir/$as_base" -c '
bec39cab
AC
21315 as_lineno_1=$LINENO
21316 as_lineno_2=$LINENO
b4e70030 21317 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
bec39cab 21318 test "x$as_lineno_1" != "x$as_lineno_2" &&
b4e70030
JB
21319 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
21320 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21321 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
21322 CONFIG_SHELL=$as_dir/$as_base
21323 export CONFIG_SHELL
21324 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21325 fi;;
21326 esac
21327 done
21328done
21329;;
21330 esac
bec39cab
AC
21331
21332 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21333 # uniformly replaced by the line number. The first 'sed' inserts a
b4e70030
JB
21334 # line-number line before each line; the second 'sed' does the real
21335 # work. The second script uses 'N' to pair each line-number line
21336 # with the numbered line, and appends trailing '-' during
21337 # substitution so that $LINENO is not a special case at line end.
bec39cab 21338 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b4e70030
JB
21339 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
21340 sed '=' <$as_myself |
bec39cab
AC
21341 sed '
21342 N
b4e70030
JB
21343 s,$,-,
21344 : loop
21345 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
bec39cab 21346 t loop
b4e70030
JB
21347 s,-$,,
21348 s,^['$as_cr_digits']*\n,,
bec39cab 21349 ' >$as_me.lineno &&
b4e70030
JB
21350 chmod +x $as_me.lineno ||
21351 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21352echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
bec39cab
AC
21353 { (exit 1); exit 1; }; }
21354
21355 # Don't try to exec as it changes $[0], causing all sort of problems
21356 # (the dirname of $[0] is not the place where we might find the
b4e70030
JB
21357 # original and so on. Autoconf is especially sensible to this).
21358 . ./$as_me.lineno
bec39cab
AC
21359 # Exit status is that of the last command.
21360 exit
21361}
21362
21363
b4e70030
JB
21364case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21365 *c*,-n*) ECHO_N= ECHO_C='
21366' ECHO_T=' ' ;;
21367 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21368 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
bec39cab
AC
21369esac
21370
b4e70030 21371if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
21372 as_expr=expr
21373else
21374 as_expr=false
21375fi
21376
21377rm -f conf$$ conf$$.exe conf$$.file
21378echo >conf$$.file
21379if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030
JB
21380 # We could just check for DJGPP; but this test a) works b) is more generic
21381 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21382 if test -f conf$$.exe; then
21383 # Don't use ln at all; we don't have any links
bec39cab 21384 as_ln_s='cp -p'
b4e70030
JB
21385 else
21386 as_ln_s='ln -s'
21387 fi
bec39cab
AC
21388elif ln conf$$.file conf$$ 2>/dev/null; then
21389 as_ln_s=ln
21390else
21391 as_ln_s='cp -p'
21392fi
b4e70030 21393rm -f conf$$ conf$$.exe conf$$.file
bec39cab
AC
21394
21395if mkdir -p . 2>/dev/null; then
21396 as_mkdir_p=:
21397else
21398 test -d ./-p && rmdir ./-p
21399 as_mkdir_p=false
21400fi
21401
b4e70030 21402as_executable_p="test -f"
bec39cab
AC
21403
21404# Sed expression to map a string onto a valid CPP name.
21405as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21406
21407# Sed expression to map a string onto a valid variable name.
21408as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21409
21410
b4e70030
JB
21411# IFS
21412# We need space, tab and new line, in precisely that order.
21413as_nl='
21414'
21415IFS=" $as_nl"
21416
21417# CDPATH.
21418$as_unset CDPATH
21419
bec39cab
AC
21420exec 6>&1
21421
b4e70030 21422# Open the log real soon, to keep \$[0] and so on meaningful, and to
bec39cab 21423# report actual input values of CONFIG_FILES etc. instead of their
b4e70030
JB
21424# values after options handling. Logging --version etc. is OK.
21425exec 5>>config.log
21426{
21427 echo
21428 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21429## Running $as_me. ##
21430_ASBOX
21431} >&5
21432cat >&5 <<_CSEOF
21433
bec39cab 21434This file was extended by $as_me, which was
b4e70030 21435generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
21436
21437 CONFIG_FILES = $CONFIG_FILES
21438 CONFIG_HEADERS = $CONFIG_HEADERS
21439 CONFIG_LINKS = $CONFIG_LINKS
21440 CONFIG_COMMANDS = $CONFIG_COMMANDS
21441 $ $0 $@
21442
b4e70030
JB
21443_CSEOF
21444echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21445echo >&5
bec39cab
AC
21446_ACEOF
21447
21448# Files that config.status was made for.
b4e70030
JB
21449if test -n "$ac_config_files"; then
21450 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21451fi
234b45d4 21452
b4e70030
JB
21453if test -n "$ac_config_headers"; then
21454 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21455fi
21456
21457if test -n "$ac_config_links"; then
21458 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21459fi
21460
21461if test -n "$ac_config_commands"; then
21462 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21463fi
234b45d4 21464
bec39cab 21465cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030 21466
bec39cab
AC
21467ac_cs_usage="\
21468\`$as_me' instantiates files from templates according to the
21469current configuration.
234b45d4 21470
bec39cab 21471Usage: $0 [OPTIONS] [FILE]...
234b45d4 21472
bec39cab
AC
21473 -h, --help print this help, then exit
21474 -V, --version print version number, then exit
21475 -q, --quiet do not print progress messages
21476 -d, --debug don't remove temporary files
21477 --recheck update $as_me by reconfiguring in the same conditions
21478 --file=FILE[:TEMPLATE]
21479 instantiate the configuration file FILE
21480 --header=FILE[:TEMPLATE]
21481 instantiate the configuration header FILE
234b45d4 21482
bec39cab
AC
21483Configuration files:
21484$config_files
234b45d4 21485
bec39cab
AC
21486Configuration headers:
21487$config_headers
234b45d4 21488
bec39cab
AC
21489Configuration links:
21490$config_links
234b45d4 21491
bec39cab
AC
21492Configuration commands:
21493$config_commands
21494
21495Report bugs to <bug-autoconf@gnu.org>."
4e8d927d 21496_ACEOF
b4e70030 21497
bec39cab
AC
21498cat >>$CONFIG_STATUS <<_ACEOF
21499ac_cs_version="\\
21500config.status
b4e70030 21501configured by $0, generated by GNU Autoconf 2.59,
bec39cab
AC
21502 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21503
b4e70030 21504Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
21505This config.status script is free software; the Free Software Foundation
21506gives unlimited permission to copy, distribute and modify it."
b4e70030
JB
21507srcdir=$srcdir
21508INSTALL="$INSTALL"
bec39cab
AC
21509_ACEOF
21510
21511cat >>$CONFIG_STATUS <<\_ACEOF
21512# If no file are specified by the user, then we need to provide default
21513# value. By we need to know if files were specified by the user.
21514ac_need_defaults=:
21515while test $# != 0
21516do
21517 case $1 in
21518 --*=*)
b4e70030
JB
21519 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21520 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
bec39cab 21521 ac_shift=:
c906108c 21522 ;;
b4e70030 21523 -*)
bec39cab
AC
21524 ac_option=$1
21525 ac_optarg=$2
21526 ac_shift=shift
c906108c 21527 ;;
b4e70030
JB
21528 *) # This is not an option, so the user has probably given explicit
21529 # arguments.
21530 ac_option=$1
21531 ac_need_defaults=false;;
bec39cab 21532 esac
c906108c 21533
bec39cab
AC
21534 case $ac_option in
21535 # Handling of the options.
b4e70030
JB
21536_ACEOF
21537cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
21538 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21539 ac_cs_recheck=: ;;
b4e70030
JB
21540 --version | --vers* | -V )
21541 echo "$ac_cs_version"; exit 0 ;;
21542 --he | --h)
21543 # Conflict between --help and --header
21544 { { echo "$as_me:$LINENO: error: ambiguous option: $1
21545Try \`$0 --help' for more information." >&5
21546echo "$as_me: error: ambiguous option: $1
21547Try \`$0 --help' for more information." >&2;}
21548 { (exit 1); exit 1; }; };;
21549 --help | --hel | -h )
21550 echo "$ac_cs_usage"; exit 0 ;;
21551 --debug | --d* | -d )
bec39cab
AC
21552 debug=: ;;
21553 --file | --fil | --fi | --f )
21554 $ac_shift
21555 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
21556 ac_need_defaults=false;;
21557 --header | --heade | --head | --hea )
21558 $ac_shift
21559 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
21560 ac_need_defaults=false;;
21561 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21562 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21563 ac_cs_silent=: ;;
c906108c 21564
bec39cab 21565 # This is an error.
b4e70030
JB
21566 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21567Try \`$0 --help' for more information." >&5
21568echo "$as_me: error: unrecognized option: $1
21569Try \`$0 --help' for more information." >&2;}
bec39cab 21570 { (exit 1); exit 1; }; } ;;
c906108c 21571
b4e70030 21572 *) ac_config_targets="$ac_config_targets $1" ;;
c906108c 21573
bec39cab
AC
21574 esac
21575 shift
21576done
c906108c 21577
bec39cab 21578ac_configure_extra_args=
c906108c 21579
bec39cab
AC
21580if $ac_cs_silent; then
21581 exec 6>/dev/null
21582 ac_configure_extra_args="$ac_configure_extra_args --silent"
21583fi
c906108c 21584
bec39cab
AC
21585_ACEOF
21586cat >>$CONFIG_STATUS <<_ACEOF
21587if \$ac_cs_recheck; then
b4e70030
JB
21588 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21589 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
bec39cab
AC
21590fi
21591
21592_ACEOF
21593
21594cat >>$CONFIG_STATUS <<_ACEOF
c906108c 21595#
b4e70030 21596# INIT-COMMANDS section.
c906108c 21597#
c906108c 21598
a417dc56 21599ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 21600AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 21601
bec39cab 21602gdb_host_cpu=$gdb_host_cpu
bec39cab
AC
21603nativefile=$nativefile
21604
21605
21606_ACEOF
21607
4e8d927d 21608
b4e70030
JB
21609
21610cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab 21611for ac_config_target in $ac_config_targets
c906108c 21612do
b4e70030
JB
21613 case "$ac_config_target" in
21614 # Handling of arguments.
21615 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21616 ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
e28b3332 21617 "gnulib/Makefile" ) CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
b4e70030 21618 "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
a417dc56 21619 "depdir" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
e28b3332 21620 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
b4e70030
JB
21621 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21622 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
bec39cab
AC
21623 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21624echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21625 { (exit 1); exit 1; }; };;
c906108c
SS
21626 esac
21627done
21628
bec39cab
AC
21629# If the user did not use the arguments to specify the items to instantiate,
21630# then the envvar interface is used. Set only those that are not.
21631# We use the long form for the default assignment because of an extremely
21632# bizarre bug on SunOS 4.1.3.
21633if $ac_need_defaults; then
21634 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21635 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21636 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
21637 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21638fi
21639
b4e70030
JB
21640# Have a temporary directory for convenience. Make it in the build tree
21641# simply because there is no reason to put it here, and in addition,
21642# creating and moving files from /tmp can sometimes cause problems.
21643# Create a temporary directory, and hook for its removal unless debugging.
21644$debug ||
21645{
21646 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21647 trap '{ (exit 1); exit 1; }' 1 2 13 15
21648}
4e8d927d 21649
b4e70030 21650# Create a (secure) tmp directory for tmp files.
4e8d927d 21651
b4e70030
JB
21652{
21653 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
21654 test -n "$tmp" && test -d "$tmp"
21655} ||
21656{
21657 tmp=./confstat$$-$RANDOM
21658 (umask 077 && mkdir $tmp)
21659} ||
21660{
21661 echo "$me: cannot create a temporary directory in ." >&2
21662 { (exit 1); exit 1; }
21663}
4e8d927d 21664
b4e70030 21665_ACEOF
4e8d927d 21666
b4e70030 21667cat >>$CONFIG_STATUS <<_ACEOF
4e8d927d 21668
b4e70030
JB
21669#
21670# CONFIG_FILES section.
21671#
4e8d927d 21672
b4e70030
JB
21673# No need to generate the scripts if there are no CONFIG_FILES.
21674# This happens for instance when ./config.status config.h
21675if test -n "\$CONFIG_FILES"; then
21676 # Protect against being on the right side of a sed subst in config.status.
21677 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21678 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21679s,@SHELL@,$SHELL,;t t
21680s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21681s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21682s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21683s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21684s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21685s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21686s,@exec_prefix@,$exec_prefix,;t t
21687s,@prefix@,$prefix,;t t
21688s,@program_transform_name@,$program_transform_name,;t t
21689s,@bindir@,$bindir,;t t
21690s,@sbindir@,$sbindir,;t t
21691s,@libexecdir@,$libexecdir,;t t
21692s,@datadir@,$datadir,;t t
21693s,@sysconfdir@,$sysconfdir,;t t
21694s,@sharedstatedir@,$sharedstatedir,;t t
21695s,@localstatedir@,$localstatedir,;t t
21696s,@libdir@,$libdir,;t t
21697s,@includedir@,$includedir,;t t
21698s,@oldincludedir@,$oldincludedir,;t t
21699s,@infodir@,$infodir,;t t
21700s,@mandir@,$mandir,;t t
21701s,@build_alias@,$build_alias,;t t
21702s,@host_alias@,$host_alias,;t t
21703s,@target_alias@,$target_alias,;t t
21704s,@DEFS@,$DEFS,;t t
21705s,@ECHO_C@,$ECHO_C,;t t
21706s,@ECHO_N@,$ECHO_N,;t t
21707s,@ECHO_T@,$ECHO_T,;t t
21708s,@LIBS@,$LIBS,;t t
21709s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
21710s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
21711s,@MAINT@,$MAINT,;t t
21712s,@CC@,$CC,;t t
21713s,@CFLAGS@,$CFLAGS,;t t
21714s,@LDFLAGS@,$LDFLAGS,;t t
21715s,@CPPFLAGS@,$CPPFLAGS,;t t
21716s,@ac_ct_CC@,$ac_ct_CC,;t t
21717s,@EXEEXT@,$EXEEXT,;t t
21718s,@OBJEXT@,$OBJEXT,;t t
21719s,@CPP@,$CPP,;t t
21720s,@EGREP@,$EGREP,;t t
783e057b
DJ
21721s,@RANLIB@,$RANLIB,;t t
21722s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
b4e70030
JB
21723s,@build@,$build,;t t
21724s,@build_cpu@,$build_cpu,;t t
21725s,@build_vendor@,$build_vendor,;t t
21726s,@build_os@,$build_os,;t t
21727s,@host@,$host,;t t
21728s,@host_cpu@,$host_cpu,;t t
21729s,@host_vendor@,$host_vendor,;t t
21730s,@host_os@,$host_os,;t t
21731s,@target@,$target,;t t
21732s,@target_cpu@,$target_cpu,;t t
21733s,@target_vendor@,$target_vendor,;t t
21734s,@target_os@,$target_os,;t t
a417dc56
RW
21735s,@am__leading_dot@,$am__leading_dot,;t t
21736s,@DEPDIR@,$DEPDIR,;t t
21737s,@CCDEPMODE@,$CCDEPMODE,;t t
21738s,@MAKE@,$MAKE,;t t
21739s,@GMAKE_TRUE@,$GMAKE_TRUE,;t t
21740s,@GMAKE_FALSE@,$GMAKE_FALSE,;t t
21741s,@SET_MAKE@,$SET_MAKE,;t t
b4e70030 21742s,@USE_NLS@,$USE_NLS,;t t
20e95c23
DJ
21743s,@LIBINTL@,$LIBINTL,;t t
21744s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
21745s,@INCINTL@,$INCINTL,;t t
b4e70030 21746s,@XGETTEXT@,$XGETTEXT,;t t
20e95c23
DJ
21747s,@GMSGFMT@,$GMSGFMT,;t t
21748s,@POSUB@,$POSUB,;t t
b4e70030 21749s,@CATALOGS@,$CATALOGS,;t t
b4e70030 21750s,@DATADIRNAME@,$DATADIRNAME,;t t
b4e70030 21751s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20e95c23
DJ
21752s,@GENCAT@,$GENCAT,;t t
21753s,@CATOBJEXT@,$CATOBJEXT,;t t
b4e70030 21754s,@localedir@,$localedir,;t t
783e057b
DJ
21755s,@GL_COND_LIBTOOL_TRUE@,$GL_COND_LIBTOOL_TRUE,;t t
21756s,@GL_COND_LIBTOOL_FALSE@,$GL_COND_LIBTOOL_FALSE,;t t
21757s,@GNULIB_MEMMEM@,$GNULIB_MEMMEM,;t t
21758s,@GNULIB_MEMPCPY@,$GNULIB_MEMPCPY,;t t
21759s,@GNULIB_MEMRCHR@,$GNULIB_MEMRCHR,;t t
21760s,@GNULIB_STPCPY@,$GNULIB_STPCPY,;t t
21761s,@GNULIB_STPNCPY@,$GNULIB_STPNCPY,;t t
21762s,@GNULIB_STRCHRNUL@,$GNULIB_STRCHRNUL,;t t
21763s,@GNULIB_STRDUP@,$GNULIB_STRDUP,;t t
21764s,@GNULIB_STRNDUP@,$GNULIB_STRNDUP,;t t
21765s,@GNULIB_STRNLEN@,$GNULIB_STRNLEN,;t t
21766s,@GNULIB_STRPBRK@,$GNULIB_STRPBRK,;t t
21767s,@GNULIB_STRSEP@,$GNULIB_STRSEP,;t t
21768s,@GNULIB_STRSTR@,$GNULIB_STRSTR,;t t
21769s,@GNULIB_STRCASESTR@,$GNULIB_STRCASESTR,;t t
21770s,@GNULIB_STRTOK_R@,$GNULIB_STRTOK_R,;t t
21771s,@GNULIB_MBSLEN@,$GNULIB_MBSLEN,;t t
21772s,@GNULIB_MBSNLEN@,$GNULIB_MBSNLEN,;t t
21773s,@GNULIB_MBSCHR@,$GNULIB_MBSCHR,;t t
21774s,@GNULIB_MBSRCHR@,$GNULIB_MBSRCHR,;t t
21775s,@GNULIB_MBSSTR@,$GNULIB_MBSSTR,;t t
21776s,@GNULIB_MBSCASECMP@,$GNULIB_MBSCASECMP,;t t
21777s,@GNULIB_MBSNCASECMP@,$GNULIB_MBSNCASECMP,;t t
21778s,@GNULIB_MBSPCASECMP@,$GNULIB_MBSPCASECMP,;t t
21779s,@GNULIB_MBSCASESTR@,$GNULIB_MBSCASESTR,;t t
21780s,@GNULIB_MBSCSPN@,$GNULIB_MBSCSPN,;t t
21781s,@GNULIB_MBSPBRK@,$GNULIB_MBSPBRK,;t t
21782s,@GNULIB_MBSSPN@,$GNULIB_MBSSPN,;t t
21783s,@GNULIB_MBSSEP@,$GNULIB_MBSSEP,;t t
21784s,@GNULIB_MBSTOK_R@,$GNULIB_MBSTOK_R,;t t
21785s,@GNULIB_STRERROR@,$GNULIB_STRERROR,;t t
21786s,@GNULIB_STRSIGNAL@,$GNULIB_STRSIGNAL,;t t
21787s,@HAVE_DECL_MEMMEM@,$HAVE_DECL_MEMMEM,;t t
21788s,@HAVE_MEMPCPY@,$HAVE_MEMPCPY,;t t
21789s,@HAVE_DECL_MEMRCHR@,$HAVE_DECL_MEMRCHR,;t t
21790s,@HAVE_STPCPY@,$HAVE_STPCPY,;t t
21791s,@HAVE_STPNCPY@,$HAVE_STPNCPY,;t t
21792s,@HAVE_STRCHRNUL@,$HAVE_STRCHRNUL,;t t
21793s,@HAVE_DECL_STRDUP@,$HAVE_DECL_STRDUP,;t t
21794s,@HAVE_STRNDUP@,$HAVE_STRNDUP,;t t
21795s,@HAVE_DECL_STRNDUP@,$HAVE_DECL_STRNDUP,;t t
21796s,@HAVE_DECL_STRNLEN@,$HAVE_DECL_STRNLEN,;t t
21797s,@HAVE_STRPBRK@,$HAVE_STRPBRK,;t t
21798s,@HAVE_STRSEP@,$HAVE_STRSEP,;t t
21799s,@HAVE_STRCASESTR@,$HAVE_STRCASESTR,;t t
21800s,@HAVE_DECL_STRTOK_R@,$HAVE_DECL_STRTOK_R,;t t
21801s,@HAVE_DECL_STRERROR@,$HAVE_DECL_STRERROR,;t t
21802s,@HAVE_DECL_STRSIGNAL@,$HAVE_DECL_STRSIGNAL,;t t
21803s,@REPLACE_STRERROR@,$REPLACE_STRERROR,;t t
21804s,@REPLACE_STRSIGNAL@,$REPLACE_STRSIGNAL,;t t
21805s,@REPLACE_MEMMEM@,$REPLACE_MEMMEM,;t t
21806s,@REPLACE_STRCASESTR@,$REPLACE_STRCASESTR,;t t
21807s,@REPLACE_STRSTR@,$REPLACE_STRSTR,;t t
21808s,@HAVE_LONG_LONG_INT@,$HAVE_LONG_LONG_INT,;t t
21809s,@HAVE_UNSIGNED_LONG_LONG_INT@,$HAVE_UNSIGNED_LONG_LONG_INT,;t t
21810s,@HAVE_INTTYPES_H@,$HAVE_INTTYPES_H,;t t
21811s,@HAVE_SYS_TYPES_H@,$HAVE_SYS_TYPES_H,;t t
21812s,@INCLUDE_NEXT@,$INCLUDE_NEXT,;t t
21813s,@NEXT_STDINT_H@,$NEXT_STDINT_H,;t t
21814s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
21815s,@HAVE_SYS_INTTYPES_H@,$HAVE_SYS_INTTYPES_H,;t t
21816s,@HAVE_SYS_BITYPES_H@,$HAVE_SYS_BITYPES_H,;t t
21817s,@BITSIZEOF_PTRDIFF_T@,$BITSIZEOF_PTRDIFF_T,;t t
21818s,@BITSIZEOF_SIG_ATOMIC_T@,$BITSIZEOF_SIG_ATOMIC_T,;t t
21819s,@BITSIZEOF_SIZE_T@,$BITSIZEOF_SIZE_T,;t t
21820s,@BITSIZEOF_WCHAR_T@,$BITSIZEOF_WCHAR_T,;t t
21821s,@BITSIZEOF_WINT_T@,$BITSIZEOF_WINT_T,;t t
21822s,@HAVE_SIGNED_SIG_ATOMIC_T@,$HAVE_SIGNED_SIG_ATOMIC_T,;t t
21823s,@HAVE_SIGNED_WCHAR_T@,$HAVE_SIGNED_WCHAR_T,;t t
21824s,@HAVE_SIGNED_WINT_T@,$HAVE_SIGNED_WINT_T,;t t
21825s,@PTRDIFF_T_SUFFIX@,$PTRDIFF_T_SUFFIX,;t t
21826s,@SIG_ATOMIC_T_SUFFIX@,$SIG_ATOMIC_T_SUFFIX,;t t
21827s,@SIZE_T_SUFFIX@,$SIZE_T_SUFFIX,;t t
21828s,@WCHAR_T_SUFFIX@,$WCHAR_T_SUFFIX,;t t
21829s,@WINT_T_SUFFIX@,$WINT_T_SUFFIX,;t t
21830s,@STDINT_H@,$STDINT_H,;t t
21831s,@NEXT_STRING_H@,$NEXT_STRING_H,;t t
21832s,@GNULIB_WCWIDTH@,$GNULIB_WCWIDTH,;t t
21833s,@HAVE_DECL_WCWIDTH@,$HAVE_DECL_WCWIDTH,;t t
21834s,@REPLACE_WCWIDTH@,$REPLACE_WCWIDTH,;t t
21835s,@WCHAR_H@,$WCHAR_H,;t t
21836s,@HAVE_WCHAR_H@,$HAVE_WCHAR_H,;t t
21837s,@NEXT_WCHAR_H@,$NEXT_WCHAR_H,;t t
21838s,@LIBGNU_LIBDEPS@,$LIBGNU_LIBDEPS,;t t
21839s,@LIBGNU_LTLIBDEPS@,$LIBGNU_LTLIBDEPS,;t t
d5af19ba 21840s,@GNULIB_STDINT_H@,$GNULIB_STDINT_H,;t t
b4e70030 21841s,@PACKAGE@,$PACKAGE,;t t
b4e70030
JB
21842s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21843s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21844s,@INSTALL_DATA@,$INSTALL_DATA,;t t
e28b3332 21845s,@CYGPATH_W@,$CYGPATH_W,;t t
d57a3c85 21846s,@PYTHON2_4@,$PYTHON2_4,;t t
e28b3332
DJ
21847s,@ACLOCAL@,$ACLOCAL,;t t
21848s,@AUTOCONF@,$AUTOCONF,;t t
21849s,@AUTOMAKE@,$AUTOMAKE,;t t
21850s,@AUTOHEADER@,$AUTOHEADER,;t t
21851s,@MAKEINFO@,$MAKEINFO,;t t
21852s,@install_sh@,$install_sh,;t t
21853s,@STRIP@,$STRIP,;t t
21854s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
21855s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
21856s,@mkdir_p@,$mkdir_p,;t t
21857s,@AWK@,$AWK,;t t
e28b3332
DJ
21858s,@AMTAR@,$AMTAR,;t t
21859s,@am__tar@,$am__tar,;t t
21860s,@am__untar@,$am__untar,;t t
e28b3332
DJ
21861s,@am__include@,$am__include,;t t
21862s,@am__quote@,$am__quote,;t t
21863s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
21864s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
21865s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
e28b3332
DJ
21866s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
21867s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
21868s,@subdirs@,$subdirs,;t t
21869s,@TARGET_OBS@,$TARGET_OBS,;t t
c16158bc
JM
21870s,@PKGVERSION@,$PKGVERSION,;t t
21871s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
21872s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
b4e70030
JB
21873s,@LN_S@,$LN_S,;t t
21874s,@YACC@,$YACC,;t t
21875s,@AR@,$AR,;t t
21876s,@ac_ct_AR@,$ac_ct_AR,;t t
21877s,@DLLTOOL@,$DLLTOOL,;t t
21878s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
21879s,@WINDRES@,$WINDRES,;t t
21880s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t
21881s,@MIG@,$MIG,;t t
21882s,@ac_ct_MIG@,$ac_ct_MIG,;t t
6a30b0a5
AS
21883s,@READLINE@,$READLINE,;t t
21884s,@READLINE_DEPS@,$READLINE_DEPS,;t t
21885s,@READLINE_CFLAGS@,$READLINE_CFLAGS,;t t
3841debe
DJ
21886s,@HAVE_LIBEXPAT@,$HAVE_LIBEXPAT,;t t
21887s,@LIBEXPAT@,$LIBEXPAT,;t t
21888s,@LTLIBEXPAT@,$LTLIBEXPAT,;t t
d57a3c85 21889s,@PYTHON_CFLAGS@,$PYTHON_CFLAGS,;t t
20e95c23 21890s,@ALLOCA@,$ALLOCA,;t t
b4e70030
JB
21891s,@CONFIG_LDFLAGS@,$CONFIG_LDFLAGS,;t t
21892s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
21893s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
21894s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
21895s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t
21896s,@SER_HARDWIRE@,$SER_HARDWIRE,;t t
21897s,@WIN32LIBS@,$WIN32LIBS,;t t
21898s,@LIBGUI@,$LIBGUI,;t t
21899s,@GUI_CFLAGS_X@,$GUI_CFLAGS_X,;t t
21900s,@WIN32LDAPP@,$WIN32LDAPP,;t t
21901s,@TCL_VERSION@,$TCL_VERSION,;t t
5062cc19
KS
21902s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
21903s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
21904s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
21905s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
21906s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
b4e70030 21907s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
5062cc19
KS
21908s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
21909s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
21910s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
21911s,@TCL_INCLUDE@,$TCL_INCLUDE,;t t
21912s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
21913s,@TCL_DEPS@,$TCL_DEPS,;t t
b4e70030 21914s,@TK_VERSION@,$TK_VERSION,;t t
5062cc19
KS
21915s,@TK_BIN_DIR@,$TK_BIN_DIR,;t t
21916s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t
21917s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
21918s,@TK_LIB_FLAG@,$TK_LIB_FLAG,;t t
b4e70030 21919s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
5062cc19
KS
21920s,@TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t
21921s,@TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t
21922s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t
21923s,@TK_INCLUDE@,$TK_INCLUDE,;t t
21924s,@TK_LIBRARY@,$TK_LIBRARY,;t t
21925s,@TK_DEPS@,$TK_DEPS,;t t
21926s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t
b4e70030
JB
21927s,@X_CFLAGS@,$X_CFLAGS,;t t
21928s,@X_LDFLAGS@,$X_LDFLAGS,;t t
21929s,@X_LIBS@,$X_LIBS,;t t
b4e70030
JB
21930s,@GDBTKLIBS@,$GDBTKLIBS,;t t
21931s,@GDBTK_CFLAGS@,$GDBTK_CFLAGS,;t t
21932s,@GDBTK_SRC_DIR@,$GDBTK_SRC_DIR,;t t
9b624dbe
UW
21933s,@SIM@,$SIM,;t t
21934s,@SIM_OBS@,$SIM_OBS,;t t
b4e70030
JB
21935s,@ENABLE_CFLAGS@,$ENABLE_CFLAGS,;t t
21936s,@PROFILE_CFLAGS@,$PROFILE_CFLAGS,;t t
21937s,@CONFIG_OBS@,$CONFIG_OBS,;t t
21938s,@CONFIG_DEPS@,$CONFIG_DEPS,;t t
21939s,@CONFIG_SRCS@,$CONFIG_SRCS,;t t
21940s,@CONFIG_ALL@,$CONFIG_ALL,;t t
21941s,@CONFIG_CLEAN@,$CONFIG_CLEAN,;t t
21942s,@CONFIG_INSTALL@,$CONFIG_INSTALL,;t t
21943s,@CONFIG_UNINSTALL@,$CONFIG_UNINSTALL,;t t
21944s,@target_subdir@,$target_subdir,;t t
21945s,@frags@,$frags,;t t
b4e70030
JB
21946s,@nm_h@,$nm_h,;t t
21947s,@LIBICONV@,$LIBICONV,;t t
21948s,@LIBOBJS@,$LIBOBJS,;t t
21949s,@LTLIBOBJS@,$LTLIBOBJS,;t t
783e057b
DJ
21950s,@gl_LIBOBJS@,$gl_LIBOBJS,;t t
21951s,@gl_LTLIBOBJS@,$gl_LTLIBOBJS,;t t
21952s,@gltests_LIBOBJS@,$gltests_LIBOBJS,;t t
21953s,@gltests_LTLIBOBJS@,$gltests_LTLIBOBJS,;t t
b4e70030
JB
21954/@host_makefile_frag@/r $host_makefile_frag
21955s,@host_makefile_frag@,,;t t
b4e70030
JB
21956CEOF
21957
21958_ACEOF
21959
21960 cat >>$CONFIG_STATUS <<\_ACEOF
21961 # Split the substitutions into bite-sized pieces for seds with
21962 # small command number limits, like on Digital OSF/1 and HP-UX.
21963 ac_max_sed_lines=48
21964 ac_sed_frag=1 # Number of current file.
21965 ac_beg=1 # First line for current file.
21966 ac_end=$ac_max_sed_lines # Line after last line for current file.
21967 ac_more_lines=:
21968 ac_sed_cmds=
21969 while $ac_more_lines; do
21970 if test $ac_beg -gt 1; then
21971 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21972 else
21973 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
4e8d927d 21974 fi
b4e70030
JB
21975 if test ! -s $tmp/subs.frag; then
21976 ac_more_lines=false
21977 else
21978 # The purpose of the label and of the branching condition is to
21979 # speed up the sed processing (if there are no `@' at all, there
21980 # is no need to browse any of the substitutions).
21981 # These are the two extra sed commands mentioned above.
21982 (echo ':t
21983 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21984 if test -z "$ac_sed_cmds"; then
21985 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21986 else
21987 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21988 fi
21989 ac_sed_frag=`expr $ac_sed_frag + 1`
21990 ac_beg=$ac_end
21991 ac_end=`expr $ac_end + $ac_max_sed_lines`
21992 fi
21993 done
21994 if test -z "$ac_sed_cmds"; then
21995 ac_sed_cmds=cat
21996 fi
21997fi # test -n "$CONFIG_FILES"
4e8d927d 21998
b4e70030
JB
21999_ACEOF
22000cat >>$CONFIG_STATUS <<\_ACEOF
22001for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22002 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22003 case $ac_file in
22004 - | *:- | *:-:* ) # input from stdin
22005 cat >$tmp/stdin
22006 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22007 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22008 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22009 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22010 * ) ac_file_in=$ac_file.in ;;
c906108c
SS
22011 esac
22012
b4e70030
JB
22013 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22014 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
bec39cab
AC
22015$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22016 X"$ac_file" : 'X\(//\)[^/]' \| \
22017 X"$ac_file" : 'X\(//\)$' \| \
b4e70030
JB
22018 X"$ac_file" : 'X\(/\)' \| \
22019 . : '\(.\)' 2>/dev/null ||
bec39cab 22020echo X"$ac_file" |
b4e70030
JB
22021 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22022 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22023 /^X\(\/\/\)$/{ s//\1/; q; }
22024 /^X\(\/\).*/{ s//\1/; q; }
22025 s/.*/./; q'`
22026 { if $as_mkdir_p; then
22027 mkdir -p "$ac_dir"
22028 else
22029 as_dir="$ac_dir"
bec39cab 22030 as_dirs=
b4e70030
JB
22031 while test ! -d "$as_dir"; do
22032 as_dirs="$as_dir $as_dirs"
22033 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
22034$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22035 X"$as_dir" : 'X\(//\)[^/]' \| \
22036 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
22037 X"$as_dir" : 'X\(/\)' \| \
22038 . : '\(.\)' 2>/dev/null ||
bec39cab 22039echo X"$as_dir" |
b4e70030
JB
22040 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22041 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22042 /^X\(\/\/\)$/{ s//\1/; q; }
22043 /^X\(\/\).*/{ s//\1/; q; }
22044 s/.*/./; q'`
bec39cab 22045 done
b4e70030
JB
22046 test ! -n "$as_dirs" || mkdir $as_dirs
22047 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22048echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 22049 { (exit 1); exit 1; }; }; }
b4e70030 22050
bec39cab
AC
22051 ac_builddir=.
22052
b4e70030 22053if test "$ac_dir" != .; then
bec39cab 22054 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
22055 # A "../" for each directory in $ac_dir_suffix.
22056 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22057else
22058 ac_dir_suffix= ac_top_builddir=
22059fi
bec39cab
AC
22060
22061case $srcdir in
b4e70030 22062 .) # No --srcdir option. We are building in place.
bec39cab 22063 ac_srcdir=.
b4e70030
JB
22064 if test -z "$ac_top_builddir"; then
22065 ac_top_srcdir=.
22066 else
22067 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22068 fi ;;
22069 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 22070 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
22071 ac_top_srcdir=$srcdir ;;
22072 *) # Relative path.
22073 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22074 ac_top_srcdir=$ac_top_builddir$srcdir ;;
bec39cab
AC
22075esac
22076
b4e70030
JB
22077# Do not use `cd foo && pwd` to compute absolute paths, because
22078# the directories may not exist.
22079case `pwd` in
22080.) ac_abs_builddir="$ac_dir";;
22081*)
22082 case "$ac_dir" in
22083 .) ac_abs_builddir=`pwd`;;
22084 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22085 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22086 esac;;
22087esac
22088case $ac_abs_builddir in
22089.) ac_abs_top_builddir=${ac_top_builddir}.;;
22090*)
22091 case ${ac_top_builddir}. in
22092 .) ac_abs_top_builddir=$ac_abs_builddir;;
22093 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22094 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22095 esac;;
22096esac
22097case $ac_abs_builddir in
22098.) ac_abs_srcdir=$ac_srcdir;;
22099*)
22100 case $ac_srcdir in
22101 .) ac_abs_srcdir=$ac_abs_builddir;;
22102 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22103 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22104 esac;;
22105esac
22106case $ac_abs_builddir in
22107.) ac_abs_top_srcdir=$ac_top_srcdir;;
22108*)
22109 case $ac_top_srcdir in
22110 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22111 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22112 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22113 esac;;
22114esac
c906108c 22115
c906108c 22116
bec39cab
AC
22117 case $INSTALL in
22118 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
b4e70030 22119 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
c906108c 22120 esac
121ce6e5 22121
b4e70030
JB
22122 if test x"$ac_file" != x-; then
22123 { echo "$as_me:$LINENO: creating $ac_file" >&5
22124echo "$as_me: creating $ac_file" >&6;}
22125 rm -f "$ac_file"
22126 fi
22127 # Let's still pretend it is `configure' which instantiates (i.e., don't
22128 # use $as_me), people would be surprised to read:
22129 # /* config.h. Generated by config.status. */
22130 if test x"$ac_file" = x-; then
22131 configure_input=
22132 else
22133 configure_input="$ac_file. "
22134 fi
22135 configure_input=$configure_input"Generated from `echo $ac_file_in |
22136 sed 's,.*/,,'` by configure."
22137
22138 # First look for the input files in the build tree, otherwise in the
22139 # src tree.
22140 ac_file_inputs=`IFS=:
22141 for f in $ac_file_in; do
22142 case $f in
22143 -) echo $tmp/stdin ;;
22144 [\\/$]*)
22145 # Absolute (can't be DOS-style, as IFS=:)
22146 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22147echo "$as_me: error: cannot find input file: $f" >&2;}
22148 { (exit 1); exit 1; }; }
22149 echo "$f";;
22150 *) # Relative
22151 if test -f "$f"; then
22152 # Build tree
22153 echo "$f"
22154 elif test -f "$srcdir/$f"; then
22155 # Source tree
22156 echo "$srcdir/$f"
22157 else
22158 # /dev/null tree
22159 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22160echo "$as_me: error: cannot find input file: $f" >&2;}
22161 { (exit 1); exit 1; }; }
22162 fi;;
22163 esac
22164 done` || { (exit 1); exit 1; }
4e8d927d 22165_ACEOF
bec39cab
AC
22166cat >>$CONFIG_STATUS <<_ACEOF
22167 sed "$ac_vpsub
22168$extrasub
22169_ACEOF
22170cat >>$CONFIG_STATUS <<\_ACEOF
22171:t
22172/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b4e70030
JB
22173s,@configure_input@,$configure_input,;t t
22174s,@srcdir@,$ac_srcdir,;t t
22175s,@abs_srcdir@,$ac_abs_srcdir,;t t
22176s,@top_srcdir@,$ac_top_srcdir,;t t
22177s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22178s,@builddir@,$ac_builddir,;t t
22179s,@abs_builddir@,$ac_abs_builddir,;t t
22180s,@top_builddir@,$ac_top_builddir,;t t
22181s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22182s,@INSTALL@,$ac_INSTALL,;t t
22183" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22184 rm -f $tmp/stdin
22185 if test x"$ac_file" != x-; then
22186 mv $tmp/out $ac_file
22187 else
22188 cat $tmp/out
22189 rm -f $tmp/out
22190 fi
22191
22192done
22193_ACEOF
22194cat >>$CONFIG_STATUS <<\_ACEOF
22195
22196#
22197# CONFIG_HEADER section.
22198#
22199
22200# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22201# NAME is the cpp macro being defined and VALUE is the value it is being given.
22202#
22203# ac_d sets the value in "#define NAME VALUE" lines.
22204ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22205ac_dB='[ ].*$,\1#\2'
22206ac_dC=' '
22207ac_dD=',;t'
22208# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22209ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
22210ac_uB='$,\1#\2define\3'
22211ac_uC=' '
22212ac_uD=',;t'
22213
22214for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22215 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
bec39cab 22216 case $ac_file in
b4e70030
JB
22217 - | *:- | *:-:* ) # input from stdin
22218 cat >$tmp/stdin
22219 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22220 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22221 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22222 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22223 * ) ac_file_in=$ac_file.in ;;
c906108c 22224 esac
b4e70030
JB
22225
22226 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22227echo "$as_me: creating $ac_file" >&6;}
22228
22229 # First look for the input files in the build tree, otherwise in the
22230 # src tree.
22231 ac_file_inputs=`IFS=:
22232 for f in $ac_file_in; do
22233 case $f in
22234 -) echo $tmp/stdin ;;
22235 [\\/$]*)
22236 # Absolute (can't be DOS-style, as IFS=:)
22237 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22238echo "$as_me: error: cannot find input file: $f" >&2;}
22239 { (exit 1); exit 1; }; }
22240 # Do quote $f, to prevent DOS paths from being IFS'd.
22241 echo "$f";;
22242 *) # Relative
22243 if test -f "$f"; then
22244 # Build tree
22245 echo "$f"
22246 elif test -f "$srcdir/$f"; then
22247 # Source tree
22248 echo "$srcdir/$f"
22249 else
22250 # /dev/null tree
22251 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22252echo "$as_me: error: cannot find input file: $f" >&2;}
22253 { (exit 1); exit 1; }; }
22254 fi;;
22255 esac
22256 done` || { (exit 1); exit 1; }
22257 # Remove the trailing spaces.
22258 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
22259
22260_ACEOF
22261
22262# Transform confdefs.h into two sed scripts, `conftest.defines' and
22263# `conftest.undefs', that substitutes the proper values into
22264# config.h.in to produce config.h. The first handles `#define'
22265# templates, and the second `#undef' templates.
22266# And first: Protect against being on the right side of a sed subst in
22267# config.status. Protect against being in an unquoted here document
22268# in config.status.
22269rm -f conftest.defines conftest.undefs
22270# Using a here document instead of a string reduces the quoting nightmare.
22271# Putting comments in sed scripts is not portable.
22272#
22273# `end' is used to avoid that the second main sed command (meant for
22274# 0-ary CPP macros) applies to n-ary macro definitions.
22275# See the Autoconf documentation for `clear'.
22276cat >confdef2sed.sed <<\_ACEOF
22277s/[\\&,]/\\&/g
22278s,[\\$`],\\&,g
22279t clear
22280: clear
22281s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
22282t end
22283s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
22284: end
22285_ACEOF
22286# If some macros were called several times there might be several times
22287# the same #defines, which is useless. Nevertheless, we may not want to
22288# sort them, since we want the *last* AC-DEFINE to be honored.
22289uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22290sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22291rm -f confdef2sed.sed
22292
22293# This sed command replaces #undef with comments. This is necessary, for
c906108c
SS
22294# example, in the case of _POSIX_SOURCE, which is predefined and required
22295# on some systems where configure will not decide to define it.
b4e70030
JB
22296cat >>conftest.undefs <<\_ACEOF
22297s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
22298_ACEOF
22299
22300# Break up conftest.defines because some shells have a limit on the size
22301# of here documents, and old seds have small limits too (100 cmds).
22302echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
22303echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
22304echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22305echo ' :' >>$CONFIG_STATUS
22306rm -f conftest.tail
22307while grep . conftest.defines >/dev/null
bec39cab 22308do
b4e70030
JB
22309 # Write a limited-size here document to $tmp/defines.sed.
22310 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22311 # Speed up: don't consider the non `#define' lines.
22312 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
22313 # Work around the forget-to-reset-the-flag bug.
22314 echo 't clr' >>$CONFIG_STATUS
22315 echo ': clr' >>$CONFIG_STATUS
22316 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
bec39cab 22317 echo 'CEOF
b4e70030
JB
22318 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22319 rm -f $tmp/in
22320 mv $tmp/out $tmp/in
22321' >>$CONFIG_STATUS
22322 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
bec39cab
AC
22323 rm -f conftest.defines
22324 mv conftest.tail conftest.defines
22325done
b4e70030
JB
22326rm -f conftest.defines
22327echo ' fi # grep' >>$CONFIG_STATUS
22328echo >>$CONFIG_STATUS
22329
22330# Break up conftest.undefs because some shells have a limit on the size
22331# of here documents, and old seds have small limits too (100 cmds).
22332echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22333rm -f conftest.tail
22334while grep . conftest.undefs >/dev/null
22335do
22336 # Write a limited-size here document to $tmp/undefs.sed.
22337 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22338 # Speed up: don't consider the non `#undef'
22339 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
22340 # Work around the forget-to-reset-the-flag bug.
22341 echo 't clr' >>$CONFIG_STATUS
22342 echo ': clr' >>$CONFIG_STATUS
22343 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22344 echo 'CEOF
22345 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22346 rm -f $tmp/in
22347 mv $tmp/out $tmp/in
22348' >>$CONFIG_STATUS
22349 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22350 rm -f conftest.undefs
22351 mv conftest.tail conftest.undefs
22352done
22353rm -f conftest.undefs
bec39cab
AC
22354
22355cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030
JB
22356 # Let's still pretend it is `configure' which instantiates (i.e., don't
22357 # use $as_me), people would be surprised to read:
22358 # /* config.h. Generated by config.status. */
22359 if test x"$ac_file" = x-; then
22360 echo "/* Generated by configure. */" >$tmp/config.h
22361 else
22362 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
22363 fi
22364 cat $tmp/in >>$tmp/config.h
22365 rm -f $tmp/in
bec39cab 22366 if test x"$ac_file" != x-; then
b4e70030 22367 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
bec39cab
AC
22368 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22369echo "$as_me: $ac_file is unchanged" >&6;}
22370 else
b4e70030
JB
22371 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22372$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22373 X"$ac_file" : 'X\(//\)[^/]' \| \
22374 X"$ac_file" : 'X\(//\)$' \| \
22375 X"$ac_file" : 'X\(/\)' \| \
22376 . : '\(.\)' 2>/dev/null ||
22377echo X"$ac_file" |
22378 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22379 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22380 /^X\(\/\/\)$/{ s//\1/; q; }
22381 /^X\(\/\).*/{ s//\1/; q; }
22382 s/.*/./; q'`
22383 { if $as_mkdir_p; then
22384 mkdir -p "$ac_dir"
22385 else
22386 as_dir="$ac_dir"
22387 as_dirs=
22388 while test ! -d "$as_dir"; do
22389 as_dirs="$as_dir $as_dirs"
22390 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22391$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22392 X"$as_dir" : 'X\(//\)[^/]' \| \
22393 X"$as_dir" : 'X\(//\)$' \| \
22394 X"$as_dir" : 'X\(/\)' \| \
22395 . : '\(.\)' 2>/dev/null ||
22396echo X"$as_dir" |
22397 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22398 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22399 /^X\(\/\/\)$/{ s//\1/; q; }
22400 /^X\(\/\).*/{ s//\1/; q; }
22401 s/.*/./; q'`
22402 done
22403 test ! -n "$as_dirs" || mkdir $as_dirs
22404 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22405echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22406 { (exit 1); exit 1; }; }; }
22407
bec39cab 22408 rm -f $ac_file
b4e70030 22409 mv $tmp/config.h $ac_file
bec39cab
AC
22410 fi
22411 else
b4e70030
JB
22412 cat $tmp/config.h
22413 rm -f $tmp/config.h
bec39cab 22414 fi
e28b3332
DJ
22415# Compute $ac_file's index in $config_headers.
22416_am_stamp_count=1
22417for _am_header in $config_headers :; do
22418 case $_am_header in
22419 $ac_file | $ac_file:* )
22420 break ;;
22421 * )
22422 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
22423 esac
22424done
22425echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
22426$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22427 X$ac_file : 'X\(//\)[^/]' \| \
22428 X$ac_file : 'X\(//\)$' \| \
22429 X$ac_file : 'X\(/\)' \| \
22430 . : '\(.\)' 2>/dev/null ||
22431echo X$ac_file |
22432 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22433 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22434 /^X\(\/\/\)$/{ s//\1/; q; }
22435 /^X\(\/\).*/{ s//\1/; q; }
22436 s/.*/./; q'`/stamp-h$_am_stamp_count
b4e70030
JB
22437done
22438_ACEOF
22439cat >>$CONFIG_STATUS <<\_ACEOF
22440
22441#
22442# CONFIG_LINKS section.
22443#
22444
22445for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
22446 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22447 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c906108c 22448
b4e70030
JB
22449 { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
22450echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
c906108c
SS
22451
22452 if test ! -r $srcdir/$ac_source; then
bec39cab
AC
22453 { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
22454echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
22455 { (exit 1); exit 1; }; }
c906108c 22456 fi
b4e70030
JB
22457 rm -f $ac_dest
22458
22459 # Make relative symlinks.
22460 ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
22461$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22462 X"$ac_dest" : 'X\(//\)[^/]' \| \
22463 X"$ac_dest" : 'X\(//\)$' \| \
22464 X"$ac_dest" : 'X\(/\)' \| \
22465 . : '\(.\)' 2>/dev/null ||
22466echo X"$ac_dest" |
22467 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22468 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22469 /^X\(\/\/\)$/{ s//\1/; q; }
22470 /^X\(\/\).*/{ s//\1/; q; }
22471 s/.*/./; q'`
22472 { if $as_mkdir_p; then
22473 mkdir -p "$ac_dest_dir"
22474 else
22475 as_dir="$ac_dest_dir"
22476 as_dirs=
22477 while test ! -d "$as_dir"; do
22478 as_dirs="$as_dir $as_dirs"
22479 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22480$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22481 X"$as_dir" : 'X\(//\)[^/]' \| \
22482 X"$as_dir" : 'X\(//\)$' \| \
22483 X"$as_dir" : 'X\(/\)' \| \
22484 . : '\(.\)' 2>/dev/null ||
22485echo X"$as_dir" |
22486 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22487 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22488 /^X\(\/\/\)$/{ s//\1/; q; }
22489 /^X\(\/\).*/{ s//\1/; q; }
22490 s/.*/./; q'`
22491 done
22492 test ! -n "$as_dirs" || mkdir $as_dirs
22493 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
22494echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
22495 { (exit 1); exit 1; }; }; }
22496
22497 ac_builddir=.
22498
22499if test "$ac_dest_dir" != .; then
22500 ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
22501 # A "../" for each directory in $ac_dir_suffix.
22502 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22503else
22504 ac_dir_suffix= ac_top_builddir=
22505fi
22506
22507case $srcdir in
22508 .) # No --srcdir option. We are building in place.
22509 ac_srcdir=.
22510 if test -z "$ac_top_builddir"; then
22511 ac_top_srcdir=.
22512 else
22513 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22514 fi ;;
22515 [\\/]* | ?:[\\/]* ) # Absolute path.
22516 ac_srcdir=$srcdir$ac_dir_suffix;
22517 ac_top_srcdir=$srcdir ;;
22518 *) # Relative path.
22519 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22520 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22521esac
22522
22523# Do not use `cd foo && pwd` to compute absolute paths, because
22524# the directories may not exist.
22525case `pwd` in
22526.) ac_abs_builddir="$ac_dest_dir";;
22527*)
22528 case "$ac_dest_dir" in
22529 .) ac_abs_builddir=`pwd`;;
22530 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
22531 *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
22532 esac;;
22533esac
22534case $ac_abs_builddir in
22535.) ac_abs_top_builddir=${ac_top_builddir}.;;
22536*)
22537 case ${ac_top_builddir}. in
22538 .) ac_abs_top_builddir=$ac_abs_builddir;;
22539 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22540 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22541 esac;;
22542esac
22543case $ac_abs_builddir in
22544.) ac_abs_srcdir=$ac_srcdir;;
22545*)
22546 case $ac_srcdir in
22547 .) ac_abs_srcdir=$ac_abs_builddir;;
22548 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22549 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22550 esac;;
22551esac
22552case $ac_abs_builddir in
22553.) ac_abs_top_srcdir=$ac_top_srcdir;;
22554*)
22555 case $ac_top_srcdir in
22556 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22557 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22558 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22559 esac;;
22560esac
22561
bec39cab
AC
22562
22563 case $srcdir in
22564 [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
b4e70030 22565 *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
c906108c 22566 esac
b4e70030
JB
22567
22568 # Try a symlink, then a hard link, then a copy.
22569 ln -s $ac_rel_source $ac_dest 2>/dev/null ||
22570 ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
22571 cp -p $srcdir/$ac_source $ac_dest ||
22572 { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
22573echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
bec39cab 22574 { (exit 1); exit 1; }; }
b4e70030
JB
22575done
22576_ACEOF
22577cat >>$CONFIG_STATUS <<\_ACEOF
22578
22579#
22580# CONFIG_COMMANDS section.
22581#
22582for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22583 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22584 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22585 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
22586$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22587 X"$ac_dest" : 'X\(//\)[^/]' \| \
22588 X"$ac_dest" : 'X\(//\)$' \| \
22589 X"$ac_dest" : 'X\(/\)' \| \
22590 . : '\(.\)' 2>/dev/null ||
22591echo X"$ac_dest" |
22592 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22593 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22594 /^X\(\/\/\)$/{ s//\1/; q; }
22595 /^X\(\/\).*/{ s//\1/; q; }
22596 s/.*/./; q'`
22597 { if $as_mkdir_p; then
22598 mkdir -p "$ac_dir"
22599 else
22600 as_dir="$ac_dir"
22601 as_dirs=
22602 while test ! -d "$as_dir"; do
22603 as_dirs="$as_dir $as_dirs"
22604 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22605$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22606 X"$as_dir" : 'X\(//\)[^/]' \| \
22607 X"$as_dir" : 'X\(//\)$' \| \
22608 X"$as_dir" : 'X\(/\)' \| \
22609 . : '\(.\)' 2>/dev/null ||
22610echo X"$as_dir" |
22611 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22612 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22613 /^X\(\/\/\)$/{ s//\1/; q; }
22614 /^X\(\/\).*/{ s//\1/; q; }
22615 s/.*/./; q'`
22616 done
22617 test ! -n "$as_dirs" || mkdir $as_dirs
22618 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22619echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22620 { (exit 1); exit 1; }; }; }
22621
22622 ac_builddir=.
22623
22624if test "$ac_dir" != .; then
22625 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22626 # A "../" for each directory in $ac_dir_suffix.
22627 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22628else
22629 ac_dir_suffix= ac_top_builddir=
22630fi
22631
22632case $srcdir in
22633 .) # No --srcdir option. We are building in place.
22634 ac_srcdir=.
22635 if test -z "$ac_top_builddir"; then
22636 ac_top_srcdir=.
22637 else
22638 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22639 fi ;;
22640 [\\/]* | ?:[\\/]* ) # Absolute path.
22641 ac_srcdir=$srcdir$ac_dir_suffix;
22642 ac_top_srcdir=$srcdir ;;
22643 *) # Relative path.
22644 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22645 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22646esac
22647
22648# Do not use `cd foo && pwd` to compute absolute paths, because
22649# the directories may not exist.
22650case `pwd` in
22651.) ac_abs_builddir="$ac_dir";;
22652*)
22653 case "$ac_dir" in
22654 .) ac_abs_builddir=`pwd`;;
22655 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22656 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22657 esac;;
22658esac
22659case $ac_abs_builddir in
22660.) ac_abs_top_builddir=${ac_top_builddir}.;;
22661*)
22662 case ${ac_top_builddir}. in
22663 .) ac_abs_top_builddir=$ac_abs_builddir;;
22664 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22665 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22666 esac;;
22667esac
22668case $ac_abs_builddir in
22669.) ac_abs_srcdir=$ac_srcdir;;
22670*)
22671 case $ac_srcdir in
22672 .) ac_abs_srcdir=$ac_abs_builddir;;
22673 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22674 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22675 esac;;
22676esac
22677case $ac_abs_builddir in
22678.) ac_abs_top_srcdir=$ac_top_srcdir;;
22679*)
22680 case $ac_top_srcdir in
22681 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22682 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22683 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22684 esac;;
22685esac
bec39cab 22686
bec39cab 22687
b4e70030
JB
22688 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
22689echo "$as_me: executing $ac_dest commands" >&6;}
22690 case $ac_dest in
a417dc56 22691 depdir ) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
e28b3332
DJ
22692 depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
22693 # Strip MF so we end up with the name of the file.
22694 mf=`echo "$mf" | sed -e 's/:.*$//'`
22695 # Check whether this is an Automake generated Makefile or not.
22696 # We used to match only the files named `Makefile.in', but
22697 # some people rename them; so instead we look at the file content.
22698 # Grep'ing the first line is not enough: some people post-process
22699 # each Makefile.in and add a new line on top of each file to say so.
22700 # So let's grep whole file.
22701 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
22702 dirpart=`(dirname "$mf") 2>/dev/null ||
22703$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22704 X"$mf" : 'X\(//\)[^/]' \| \
22705 X"$mf" : 'X\(//\)$' \| \
22706 X"$mf" : 'X\(/\)' \| \
22707 . : '\(.\)' 2>/dev/null ||
22708echo X"$mf" |
22709 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22710 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22711 /^X\(\/\/\)$/{ s//\1/; q; }
22712 /^X\(\/\).*/{ s//\1/; q; }
22713 s/.*/./; q'`
22714 else
22715 continue
22716 fi
22717 # Extract the definition of DEPDIR, am__include, and am__quote
22718 # from the Makefile without running `make'.
22719 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
22720 test -z "$DEPDIR" && continue
22721 am__include=`sed -n 's/^am__include = //p' < "$mf"`
22722 test -z "am__include" && continue
22723 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
22724 # When using ansi2knr, U may be empty or an underscore; expand it
22725 U=`sed -n 's/^U = //p' < "$mf"`
22726 # Find all dependency output files, they are included files with
22727 # $(DEPDIR) in their names. We invoke sed twice because it is the
22728 # simplest approach to changing $(DEPDIR) to its actual value in the
22729 # expansion.
22730 for file in `sed -n "
22731 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
22732 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
22733 # Make sure the directory exists.
22734 test -f "$dirpart/$file" && continue
22735 fdir=`(dirname "$file") 2>/dev/null ||
22736$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22737 X"$file" : 'X\(//\)[^/]' \| \
22738 X"$file" : 'X\(//\)$' \| \
22739 X"$file" : 'X\(/\)' \| \
22740 . : '\(.\)' 2>/dev/null ||
22741echo X"$file" |
22742 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22743 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22744 /^X\(\/\/\)$/{ s//\1/; q; }
22745 /^X\(\/\).*/{ s//\1/; q; }
22746 s/.*/./; q'`
22747 { if $as_mkdir_p; then
22748 mkdir -p $dirpart/$fdir
22749 else
22750 as_dir=$dirpart/$fdir
22751 as_dirs=
22752 while test ! -d "$as_dir"; do
22753 as_dirs="$as_dir $as_dirs"
22754 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22755$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22756 X"$as_dir" : 'X\(//\)[^/]' \| \
22757 X"$as_dir" : 'X\(//\)$' \| \
22758 X"$as_dir" : 'X\(/\)' \| \
22759 . : '\(.\)' 2>/dev/null ||
22760echo X"$as_dir" |
22761 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22762 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22763 /^X\(\/\/\)$/{ s//\1/; q; }
22764 /^X\(\/\).*/{ s//\1/; q; }
22765 s/.*/./; q'`
22766 done
22767 test ! -n "$as_dirs" || mkdir $as_dirs
22768 fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
22769echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
22770 { (exit 1); exit 1; }; }; }
22771
22772 # echo "creating $dirpart/$file"
22773 echo '# dummy' > "$dirpart/$file"
22774 done
22775done
4e8d927d 22776 ;;
b4e70030 22777 default )
c906108c 22778
db985757 22779sed -e '/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
c906108c
SS
22780mv -f Makefile.tmp Makefile
22781
2acceee2 22782
c906108c
SS
22783case x$CONFIG_HEADERS in
22784xconfig.h:config.in)
22785echo > stamp-h ;;
22786esac
bec39cab
AC
22787 ;;
22788 esac
b4e70030
JB
22789done
22790_ACEOF
c906108c 22791
b4e70030 22792cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
22793
22794{ (exit 0); exit 0; }
22795_ACEOF
c906108c 22796chmod +x $CONFIG_STATUS
bec39cab
AC
22797ac_clean_files=$ac_clean_files_save
22798
22799
22800# configure is writing to config.log, and then calls config.status.
22801# config.status does its own redirection, appending to config.log.
22802# Unfortunately, on DOS this fails, as config.log is still kept open
22803# by configure, so config.status won't be able to write to it; its
22804# output is simply discarded. So we exec the FD to /dev/null,
22805# effectively closing config.log, so it can be properly (re)opened and
22806# appended to by config.status. When coming back to configure, we
22807# need to make the FD available again.
22808if test "$no_create" != yes; then
22809 ac_cs_success=:
22810 ac_config_status_args=
22811 test "$silent" = yes &&
22812 ac_config_status_args="$ac_config_status_args --quiet"
22813 exec 5>/dev/null
22814 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22815 exec 5>>config.log
22816 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22817 # would make configure fail if this is the last instruction.
22818 $ac_cs_success || { (exit 1); exit 1; }
22819fi
c906108c 22820
bec39cab 22821#
fdc59709 22822# CONFIG_SUBDIRS section, as fixed in confsubdir.m4.
bec39cab 22823#
c906108c
SS
22824if test "$no_recursion" != yes; then
22825
22826 # Remove --cache-file and --srcdir arguments so they do not pile up.
22827 ac_sub_configure_args=
22828 ac_prev=
fdc59709
PB
22829 eval "set x $ac_configure_args"
22830 shift
22831 for ac_arg
22832 do
c906108c
SS
22833 if test -n "$ac_prev"; then
22834 ac_prev=
22835 continue
22836 fi
bec39cab 22837 case $ac_arg in
c906108c
SS
22838 -cache-file | --cache-file | --cache-fil | --cache-fi \
22839 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
22840 ac_prev=cache_file ;;
22841 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
22842 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
22843 | --c=*)
22844 ;;
22845 --config-cache | -C)
c906108c
SS
22846 ;;
22847 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
22848 ac_prev=srcdir ;;
22849 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
22850 ;;
bec39cab
AC
22851 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
22852 ac_prev=prefix ;;
22853 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
22854 ;;
fdc59709
PB
22855 *)
22856 case $ac_arg in
22857 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
22858 esac
22859 ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
c906108c
SS
22860 esac
22861 done
22862
bec39cab
AC
22863 # Always prepend --prefix to ensure using the same prefix
22864 # in subdir configurations.
fdc59709
PB
22865 ac_arg="--prefix=$prefix"
22866 case $ac_arg in
22867 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
22868 esac
22869 ac_sub_configure_args="$ac_arg $ac_sub_configure_args"
bec39cab 22870
b4e70030 22871 ac_popdir=`pwd`
bec39cab 22872 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
22873
22874 # Do not complain, so a configure script can configure whichever
22875 # parts of a large source tree are present.
fdc59709 22876 test -d "$srcdir/$ac_dir" || continue
c906108c 22877
b4e70030
JB
22878 { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
22879echo "$as_me: configuring in $ac_dir" >&6;}
22880 { if $as_mkdir_p; then
22881 mkdir -p "$ac_dir"
22882 else
22883 as_dir="$ac_dir"
bec39cab 22884 as_dirs=
b4e70030
JB
22885 while test ! -d "$as_dir"; do
22886 as_dirs="$as_dir $as_dirs"
22887 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
22888$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22889 X"$as_dir" : 'X\(//\)[^/]' \| \
22890 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
22891 X"$as_dir" : 'X\(/\)' \| \
22892 . : '\(.\)' 2>/dev/null ||
bec39cab 22893echo X"$as_dir" |
b4e70030
JB
22894 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22895 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22896 /^X\(\/\/\)$/{ s//\1/; q; }
22897 /^X\(\/\).*/{ s//\1/; q; }
22898 s/.*/./; q'`
bec39cab 22899 done
b4e70030
JB
22900 test ! -n "$as_dirs" || mkdir $as_dirs
22901 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22902echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 22903 { (exit 1); exit 1; }; }; }
b4e70030 22904
bec39cab
AC
22905 ac_builddir=.
22906
b4e70030 22907if test "$ac_dir" != .; then
bec39cab 22908 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
22909 # A "../" for each directory in $ac_dir_suffix.
22910 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22911else
22912 ac_dir_suffix= ac_top_builddir=
22913fi
bec39cab
AC
22914
22915case $srcdir in
b4e70030 22916 .) # No --srcdir option. We are building in place.
bec39cab 22917 ac_srcdir=.
b4e70030
JB
22918 if test -z "$ac_top_builddir"; then
22919 ac_top_srcdir=.
22920 else
22921 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22922 fi ;;
22923 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 22924 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
22925 ac_top_srcdir=$srcdir ;;
22926 *) # Relative path.
22927 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22928 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22929esac
22930
22931# Do not use `cd foo && pwd` to compute absolute paths, because
22932# the directories may not exist.
22933case `pwd` in
22934.) ac_abs_builddir="$ac_dir";;
22935*)
22936 case "$ac_dir" in
22937 .) ac_abs_builddir=`pwd`;;
22938 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22939 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22940 esac;;
22941esac
22942case $ac_abs_builddir in
22943.) ac_abs_top_builddir=${ac_top_builddir}.;;
22944*)
22945 case ${ac_top_builddir}. in
22946 .) ac_abs_top_builddir=$ac_abs_builddir;;
22947 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22948 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22949 esac;;
22950esac
22951case $ac_abs_builddir in
22952.) ac_abs_srcdir=$ac_srcdir;;
22953*)
22954 case $ac_srcdir in
22955 .) ac_abs_srcdir=$ac_abs_builddir;;
22956 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22957 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22958 esac;;
22959esac
22960case $ac_abs_builddir in
22961.) ac_abs_top_srcdir=$ac_top_srcdir;;
22962*)
22963 case $ac_top_srcdir in
22964 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22965 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22966 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22967 esac;;
bec39cab 22968esac
c906108c 22969
c906108c 22970
fdc59709 22971 cd "$ac_dir"
c906108c
SS
22972
22973 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
22974 if test -f "$ac_srcdir/configure.gnu"; then
22975 ac_sub_configure=$ac_srcdir/configure.gnu
22976 elif test -f "$ac_srcdir/configure"; then
22977 ac_sub_configure=$ac_srcdir/configure
22978 elif test -f "$ac_srcdir/configure.in"; then
22979 # This should be Cygnus configure.
22980 ac_sub_configure=$ac_aux_dir/configure
c906108c 22981 else
bec39cab
AC
22982 { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
22983echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
22984 ac_sub_configure=
22985 fi
22986
22987 # The recursion is here.
22988 if test -n "$ac_sub_configure"; then
c906108c 22989 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
22990 case $cache_file in
22991 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
b4e70030
JB
22992 *) # Relative path.
22993 ac_sub_cache_file=$ac_top_builddir$cache_file ;;
c906108c 22994 esac
c906108c 22995
fdc59709
PB
22996 { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
22997echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 22998 # The eval makes quoting arguments work.
fdc59709
PB
22999 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
23000 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
bec39cab
AC
23001 { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
23002echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
23003 { (exit 1); exit 1; }; }
c906108c
SS
23004 fi
23005
fdc59709 23006 cd "$ac_popdir"
c906108c
SS
23007 done
23008fi
23009
23010
23011exit 0
This page took 2.109202 seconds and 4 git commands to generate.