gdb:
[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"
89a34d1b 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 datarootdir docdir htmldir pdfdir 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
a1220294
TT
867 --enable-targets=TARGETS
868 alternative target configurations
c0993dbe 869 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
870 --disable-gdbcli disable command-line interface (CLI)
871 --disable-gdbmi disable machine-interface (MI)
872 --enable-tui enable full-screen terminal user interface (TUI)
873 --enable-gdbtk enable gdbtk graphical user interface (GUI)
874 --enable-profiling enable profiling of GDB
3841debe 875 --disable-rpath do not hardcode runtime library paths
a1220294 876 --enable-werror treat compile warnings as errors
32c1c914 877 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 878 --enable-gdb-build-warnings
32c1c914 879 enable GDB specific build-time compiler warnings if
a1220294 880 gcc is used
32c1c914 881 --enable-sim link gdb with simulator
bec39cab
AC
882 --enable-multi-ice build the multi-ice-gdb-server
883
884Optional Packages:
885 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
886 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 887 --with-separate-debug-dir=PATH
32c1c914 888 look for global separate debug info in this path
a1220294 889 LIBDIR/debug
29b0e8a2 890 --with-relocated-sources=PATH
32c1c914
TT
891 automatically relocate this path for source files
892 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
893 --with-curses use the curses library instead of the termcap
894 library
c16158bc
JM
895 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
896 --with-bugurl=URL Direct users to URL to report a bug
a1220294
TT
897 --with-libiconv-prefix=DIR
898 search for libiconv in DIR/include and DIR/lib
6a30b0a5 899 --with-system-readline use installed readline library
5c39566f 900 --with-expat include expat support (auto/yes/no)
3841debe
DJ
901 --with-gnu-ld assume the C compiler uses GNU ld default=no
902 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
903 --without-libexpat-prefix don't search for libexpat in includedir and libdir
d57a3c85 904 --with-python include python support (auto/yes/no/<path>)
a1220294
TT
905 --without-included-regex
906 don't use included regex; this is the default on
907 systems with version 2 of the GNU C library (use
908 with caution on other system)
32c1c914
TT
909 --with-sysroot[=DIR]
910 search for usr/lib et al within DIR
a1220294 911 --with-system-gdbinit=FILE
32c1c914 912 automatically load a system-wide gdbinit file
5062cc19
KS
913 --with-tcl directory containing tcl configuration (tclConfig.sh)
914 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 915 --with-x use the X Window System
26e251b6
JM
916 --with-datarootdir use datarootdir as the data root directory.
917 --with-docdir install documentation in this directory.
918 --with-pdfdir install pdf in this directory.
919 --with-htmldir install html in this directory.
bec39cab
AC
920
921Some influential environment variables:
922 CC C compiler command
923 CFLAGS C compiler flags
924 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
925 nonstandard directory <lib dir>
b4e70030
JB
926 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
927 headers in a nonstandard directory <include dir>
bec39cab
AC
928 CPP C preprocessor
929
930Use these variables to override the choices made by `configure' or to help
931it to find libraries and programs with nonstandard names/locations.
932
933_ACEOF
934fi
935
936if test "$ac_init_help" = "recursive"; then
937 # If there are subdirs, report their specific --help.
b4e70030 938 ac_popdir=`pwd`
bec39cab
AC
939 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
940 test -d $ac_dir || continue
941 ac_builddir=.
942
b4e70030 943if test "$ac_dir" != .; then
bec39cab 944 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
945 # A "../" for each directory in $ac_dir_suffix.
946 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
947else
948 ac_dir_suffix= ac_top_builddir=
949fi
bec39cab
AC
950
951case $srcdir in
b4e70030 952 .) # No --srcdir option. We are building in place.
bec39cab 953 ac_srcdir=.
b4e70030
JB
954 if test -z "$ac_top_builddir"; then
955 ac_top_srcdir=.
956 else
957 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
958 fi ;;
959 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 960 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
961 ac_top_srcdir=$srcdir ;;
962 *) # Relative path.
963 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
964 ac_top_srcdir=$ac_top_builddir$srcdir ;;
965esac
966
967# Do not use `cd foo && pwd` to compute absolute paths, because
968# the directories may not exist.
969case `pwd` in
970.) ac_abs_builddir="$ac_dir";;
971*)
972 case "$ac_dir" in
973 .) ac_abs_builddir=`pwd`;;
974 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
975 *) ac_abs_builddir=`pwd`/"$ac_dir";;
976 esac;;
977esac
978case $ac_abs_builddir in
979.) ac_abs_top_builddir=${ac_top_builddir}.;;
980*)
981 case ${ac_top_builddir}. in
982 .) ac_abs_top_builddir=$ac_abs_builddir;;
983 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
984 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
985 esac;;
986esac
987case $ac_abs_builddir in
988.) ac_abs_srcdir=$ac_srcdir;;
989*)
990 case $ac_srcdir in
991 .) ac_abs_srcdir=$ac_abs_builddir;;
992 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
993 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
994 esac;;
995esac
996case $ac_abs_builddir in
997.) ac_abs_top_srcdir=$ac_top_srcdir;;
998*)
999 case $ac_top_srcdir in
1000 .) ac_abs_top_srcdir=$ac_abs_builddir;;
1001 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1002 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1003 esac;;
bec39cab
AC
1004esac
1005
b4e70030
JB
1006 cd $ac_dir
1007 # Check for guested configure; otherwise get Cygnus style configure.
bec39cab 1008 if test -f $ac_srcdir/configure.gnu; then
b4e70030 1009 echo
bec39cab
AC
1010 $SHELL $ac_srcdir/configure.gnu --help=recursive
1011 elif test -f $ac_srcdir/configure; then
b4e70030 1012 echo
bec39cab 1013 $SHELL $ac_srcdir/configure --help=recursive
b4e70030
JB
1014 elif test -f $ac_srcdir/configure.ac ||
1015 test -f $ac_srcdir/configure.in; then
1016 echo
1017 $ac_configure --help
3ace7edb 1018 else
bec39cab 1019 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b4e70030
JB
1020 fi
1021 cd $ac_popdir
bec39cab
AC
1022 done
1023fi
1024
b4e70030 1025test -n "$ac_init_help" && exit 0
bec39cab
AC
1026if $ac_init_version; then
1027 cat <<\_ACEOF
1028
b4e70030 1029Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
1030This configure script is free software; the Free Software Foundation
1031gives unlimited permission to copy, distribute and modify it.
1032_ACEOF
b4e70030 1033 exit 0
bec39cab 1034fi
b4e70030
JB
1035exec 5>config.log
1036cat >&5 <<_ACEOF
bec39cab
AC
1037This file contains any messages produced by compilers while
1038running configure, to aid debugging if configure makes a mistake.
1039
1040It was created by $as_me, which was
b4e70030 1041generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
1042
1043 $ $0 $@
1044
1045_ACEOF
1046{
1047cat <<_ASUNAME
1048## --------- ##
1049## Platform. ##
1050## --------- ##
1051
1052hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1053uname -m = `(uname -m) 2>/dev/null || echo unknown`
1054uname -r = `(uname -r) 2>/dev/null || echo unknown`
1055uname -s = `(uname -s) 2>/dev/null || echo unknown`
1056uname -v = `(uname -v) 2>/dev/null || echo unknown`
1057
1058/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1059/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1060
1061/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1062/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1063/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b4e70030 1064hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
bec39cab
AC
1065/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1066/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1067/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1068
1069_ASUNAME
1070
1071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1072for as_dir in $PATH
1073do
1074 IFS=$as_save_IFS
1075 test -z "$as_dir" && as_dir=.
1076 echo "PATH: $as_dir"
1077done
1078
1079} >&5
1080
1081cat >&5 <<_ACEOF
1082
1083
1084## ----------- ##
1085## Core tests. ##
1086## ----------- ##
1087
1088_ACEOF
1089
1090
1091# Keep a trace of the command line.
1092# Strip out --no-create and --no-recursion so they do not pile up.
1093# Strip out --silent because we don't want to record it for future runs.
1094# Also quote any args containing shell meta-characters.
1095# Make two passes to allow for proper duplicate-argument suppression.
1096ac_configure_args=
1097ac_configure_args0=
1098ac_configure_args1=
1099ac_sep=
1100ac_must_keep_next=false
1101for ac_pass in 1 2
1102do
1103 for ac_arg
1104 do
1105 case $ac_arg in
1106 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1107 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1108 | -silent | --silent | --silen | --sile | --sil)
1109 continue ;;
b4e70030 1110 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
bec39cab
AC
1111 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1112 esac
1113 case $ac_pass in
1114 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1115 2)
1116 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1117 if test $ac_must_keep_next = true; then
1118 ac_must_keep_next=false # Got value, back to normal.
1119 else
1120 case $ac_arg in
1121 *=* | --config-cache | -C | -disable-* | --disable-* \
1122 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1123 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1124 | -with-* | --with-* | -without-* | --without-* | --x)
1125 case "$ac_configure_args0 " in
1126 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1127 esac
1128 ;;
1129 -* ) ac_must_keep_next=true ;;
1130 esac
1131 fi
1132 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1133 # Get rid of the leading space.
1134 ac_sep=" "
1135 ;;
1136 esac
1137 done
1138done
1139$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1140$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1141
1142# When interrupted or exit'd, cleanup temporary files, and complete
1143# config.log. We remove comments because anyway the quotes in there
1144# would cause problems or look ugly.
b4e70030
JB
1145# WARNING: Be sure not to use single quotes in there, as some shells,
1146# such as our DU 5.0 friend, will then `close' the trap.
bec39cab
AC
1147trap 'exit_status=$?
1148 # Save into config.log some information that might help in debugging.
1149 {
1150 echo
1151
1152 cat <<\_ASBOX
1153## ---------------- ##
1154## Cache variables. ##
1155## ---------------- ##
1156_ASBOX
1157 echo
1158 # The following way of writing the cache mishandles newlines in values,
b4e70030 1159{
bec39cab 1160 (set) 2>&1 |
b4e70030
JB
1161 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1162 *ac_space=\ *)
bec39cab 1163 sed -n \
b4e70030
JB
1164 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1165 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1166 ;;
bec39cab 1167 *)
b4e70030
JB
1168 sed -n \
1169 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 1170 ;;
b4e70030
JB
1171 esac;
1172}
bec39cab
AC
1173 echo
1174
1175 cat <<\_ASBOX
1176## ----------------- ##
1177## Output variables. ##
1178## ----------------- ##
1179_ASBOX
1180 echo
1181 for ac_var in $ac_subst_vars
1182 do
b4e70030
JB
1183 eval ac_val=$`echo $ac_var`
1184 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1185 done | sort
1186 echo
1187
1188 if test -n "$ac_subst_files"; then
1189 cat <<\_ASBOX
b4e70030
JB
1190## ------------- ##
1191## Output files. ##
1192## ------------- ##
bec39cab
AC
1193_ASBOX
1194 echo
1195 for ac_var in $ac_subst_files
1196 do
b4e70030
JB
1197 eval ac_val=$`echo $ac_var`
1198 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1199 done | sort
1200 echo
1201 fi
1202
1203 if test -s confdefs.h; then
1204 cat <<\_ASBOX
1205## ----------- ##
1206## confdefs.h. ##
1207## ----------- ##
1208_ASBOX
1209 echo
b4e70030 1210 sed "/^$/d" confdefs.h | sort
bec39cab 1211 echo
3ace7edb 1212 fi
bec39cab
AC
1213 test "$ac_signal" != 0 &&
1214 echo "$as_me: caught signal $ac_signal"
1215 echo "$as_me: exit $exit_status"
1216 } >&5
b4e70030
JB
1217 rm -f core *.core &&
1218 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
bec39cab 1219 exit $exit_status
b4e70030 1220 ' 0
bec39cab
AC
1221for ac_signal in 1 2 13 15; do
1222 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1223done
1224ac_signal=0
1225
1226# confdefs.h avoids OS command line length limits that DEFS can exceed.
b4e70030
JB
1227rm -rf conftest* confdefs.h
1228# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1229echo >confdefs.h
bec39cab
AC
1230
1231# Predefined preprocessor variables.
1232
1233cat >>confdefs.h <<_ACEOF
1234#define PACKAGE_NAME "$PACKAGE_NAME"
1235_ACEOF
1236
1237
1238cat >>confdefs.h <<_ACEOF
1239#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1240_ACEOF
1241
1242
1243cat >>confdefs.h <<_ACEOF
1244#define PACKAGE_VERSION "$PACKAGE_VERSION"
1245_ACEOF
1246
1247
1248cat >>confdefs.h <<_ACEOF
1249#define PACKAGE_STRING "$PACKAGE_STRING"
1250_ACEOF
1251
1252
1253cat >>confdefs.h <<_ACEOF
1254#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1255_ACEOF
1256
1257
1258# Let the site file select an alternate cache file if it wants to.
1259# Prefer explicitly selected file to automatically selected ones.
b4e70030
JB
1260if test -z "$CONFIG_SITE"; then
1261 if test "x$prefix" != xNONE; then
1262 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1263 else
1264 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1265 fi
c906108c 1266fi
b4e70030 1267for ac_site_file in $CONFIG_SITE; do
c906108c 1268 if test -r "$ac_site_file"; then
bec39cab
AC
1269 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1270echo "$as_me: loading site script $ac_site_file" >&6;}
1271 sed 's/^/| /' "$ac_site_file" >&5
c906108c
SS
1272 . "$ac_site_file"
1273 fi
1274done
1275
1276if test -r "$cache_file"; then
bec39cab
AC
1277 # Some versions of bash will fail to source /dev/null (special
1278 # files actually), so we avoid doing that.
1279 if test -f "$cache_file"; then
1280 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1281echo "$as_me: loading cache $cache_file" >&6;}
1282 case $cache_file in
1283 [\\/]* | ?:[\\/]* ) . $cache_file;;
1284 *) . ./$cache_file;;
1285 esac
1286 fi
c906108c 1287else
bec39cab
AC
1288 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1289echo "$as_me: creating cache $cache_file" >&6;}
1290 >$cache_file
1291fi
1292
1293# Check that the precious variables saved in the cache have kept the same
1294# value.
1295ac_cache_corrupted=false
b4e70030
JB
1296for ac_var in `(set) 2>&1 |
1297 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
bec39cab
AC
1298 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1299 eval ac_new_set=\$ac_env_${ac_var}_set
b4e70030
JB
1300 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1301 eval ac_new_val="\$ac_env_${ac_var}_value"
bec39cab
AC
1302 case $ac_old_set,$ac_new_set in
1303 set,)
1304 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1305echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1306 ac_cache_corrupted=: ;;
1307 ,set)
1308 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1309echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1310 ac_cache_corrupted=: ;;
1311 ,);;
1312 *)
1313 if test "x$ac_old_val" != "x$ac_new_val"; then
fdc59709
PB
1314 # differences in whitespace do not lead to failure.
1315 ac_old_val_w=`echo x $ac_old_val`
1316 ac_new_val_w=`echo x $ac_new_val`
1317 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1318 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
bec39cab 1319echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
fdc59709
PB
1320 ac_cache_corrupted=:
1321 else
1322 { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1323echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1324 eval $ac_var=\$ac_old_val
1325 fi
1326 { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1327echo "$as_me: former value: \`$ac_old_val'" >&2;}
1328 { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1329echo "$as_me: current value: \`$ac_new_val'" >&2;}
bec39cab
AC
1330 fi;;
1331 esac
1332 # Pass precious variables to config.status.
1333 if test "$ac_new_set" = set; then
1334 case $ac_new_val in
b4e70030
JB
1335 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1336 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
1337 *) ac_arg=$ac_var=$ac_new_val ;;
1338 esac
1339 case " $ac_configure_args " in
1340 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1341 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1342 esac
1343 fi
1344done
1345if $ac_cache_corrupted; then
d5af19ba
DJ
1346 { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1347echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1348 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1349echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1350 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1351echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1352 { (exit 1); exit 1; }; }
c906108c
SS
1353fi
1354
b4e70030
JB
1355ac_ext=c
1356ac_cpp='$CPP $CPPFLAGS'
1357ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1358ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1359ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c
SS
1360
1361
783e057b
DJ
1362gl_header_list="$gl_header_list stdint.h"
1363gl_header_list="$gl_header_list wchar.h"
1364gl_header_list="$gl_header_list string.h"
bec39cab
AC
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
bec39cab 1381
d5af19ba
DJ
1382
1383
1384
b4e70030
JB
1385 ac_config_headers="$ac_config_headers config.h:config.in"
1386
1387echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1388echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
1389 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
413ccac7 1390if test "${enable_maintainer_mode+set}" = set; then
b4e70030
JB
1391 enableval="$enable_maintainer_mode"
1392 USE_MAINTAINER_MODE=$enableval
413ccac7
AC
1393else
1394 USE_MAINTAINER_MODE=no
b4e70030
JB
1395fi;
1396 echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
1397echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
413ccac7 1398
413ccac7
AC
1399
1400if test $USE_MAINTAINER_MODE = yes; then
1401 MAINTAINER_MODE_TRUE=
1402 MAINTAINER_MODE_FALSE='#'
1403else
1404 MAINTAINER_MODE_TRUE='#'
1405 MAINTAINER_MODE_FALSE=
1406fi
85981d60 1407
413ccac7 1408 MAINT=$MAINTAINER_MODE_TRUE
413ccac7 1409
c906108c 1410
bec39cab
AC
1411
1412ac_ext=c
1413ac_cpp='$CPP $CPPFLAGS'
1414ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1415ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1416ac_compiler_gnu=$ac_cv_c_compiler_gnu
1417if test -n "$ac_tool_prefix"; then
1418 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1419set dummy ${ac_tool_prefix}gcc; ac_word=$2
b4e70030
JB
1420echo "$as_me:$LINENO: checking for $ac_word" >&5
1421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1422if test "${ac_cv_prog_CC+set}" = set; then
1423 echo $ECHO_N "(cached) $ECHO_C" >&6
1424else
1425 if test -n "$CC"; then
1426 ac_cv_prog_CC="$CC" # Let the user override the test.
1427else
1428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1429for as_dir in $PATH
1430do
1431 IFS=$as_save_IFS
1432 test -z "$as_dir" && as_dir=.
1433 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1434 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1435 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1437 break 2
1438 fi
1439done
1440done
1441
1442fi
1443fi
1444CC=$ac_cv_prog_CC
1445if test -n "$CC"; then
b4e70030
JB
1446 echo "$as_me:$LINENO: result: $CC" >&5
1447echo "${ECHO_T}$CC" >&6
bec39cab 1448else
b4e70030
JB
1449 echo "$as_me:$LINENO: result: no" >&5
1450echo "${ECHO_T}no" >&6
bec39cab
AC
1451fi
1452
1453fi
1454if test -z "$ac_cv_prog_CC"; then
1455 ac_ct_CC=$CC
1456 # Extract the first word of "gcc", so it can be a program name with args.
c906108c 1457set dummy gcc; ac_word=$2
b4e70030
JB
1458echo "$as_me:$LINENO: checking for $ac_word" >&5
1459echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1460if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1461 echo $ECHO_N "(cached) $ECHO_C" >&6
1462else
1463 if test -n "$ac_ct_CC"; then
1464 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1465else
1466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1467for as_dir in $PATH
1468do
1469 IFS=$as_save_IFS
1470 test -z "$as_dir" && as_dir=.
1471 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1472 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1473 ac_cv_prog_ac_ct_CC="gcc"
1474 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1475 break 2
1476 fi
1477done
1478done
1479
1480fi
1481fi
1482ac_ct_CC=$ac_cv_prog_ac_ct_CC
1483if test -n "$ac_ct_CC"; then
b4e70030
JB
1484 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1485echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1486else
b4e70030
JB
1487 echo "$as_me:$LINENO: result: no" >&5
1488echo "${ECHO_T}no" >&6
bec39cab
AC
1489fi
1490
b4e70030 1491 CC=$ac_ct_CC
bec39cab
AC
1492else
1493 CC="$ac_cv_prog_CC"
1494fi
1495
1496if test -z "$CC"; then
b4e70030
JB
1497 if test -n "$ac_tool_prefix"; then
1498 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
bec39cab 1499set dummy ${ac_tool_prefix}cc; ac_word=$2
b4e70030
JB
1500echo "$as_me:$LINENO: checking for $ac_word" >&5
1501echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1502if test "${ac_cv_prog_CC+set}" = set; then
1503 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1504else
1505 if test -n "$CC"; then
1506 ac_cv_prog_CC="$CC" # Let the user override the test.
1507else
bec39cab
AC
1508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1509for as_dir in $PATH
1510do
1511 IFS=$as_save_IFS
1512 test -z "$as_dir" && as_dir=.
1513 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1514 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1515 ac_cv_prog_CC="${ac_tool_prefix}cc"
1516 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1517 break 2
1518 fi
1519done
1520done
1521
c906108c
SS
1522fi
1523fi
bec39cab 1524CC=$ac_cv_prog_CC
c906108c 1525if test -n "$CC"; then
b4e70030
JB
1526 echo "$as_me:$LINENO: result: $CC" >&5
1527echo "${ECHO_T}$CC" >&6
c906108c 1528else
b4e70030
JB
1529 echo "$as_me:$LINENO: result: no" >&5
1530echo "${ECHO_T}no" >&6
c906108c
SS
1531fi
1532
b4e70030
JB
1533fi
1534if test -z "$ac_cv_prog_CC"; then
1535 ac_ct_CC=$CC
1536 # Extract the first word of "cc", so it can be a program name with args.
1537set dummy cc; ac_word=$2
1538echo "$as_me:$LINENO: checking for $ac_word" >&5
1539echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1540if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1541 echo $ECHO_N "(cached) $ECHO_C" >&6
1542else
1543 if test -n "$ac_ct_CC"; then
1544 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1545else
1546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1547for as_dir in $PATH
1548do
1549 IFS=$as_save_IFS
1550 test -z "$as_dir" && as_dir=.
1551 for ac_exec_ext in '' $ac_executable_extensions; do
1552 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1553 ac_cv_prog_ac_ct_CC="cc"
1554 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1555 break 2
4e8d927d 1556 fi
b4e70030
JB
1557done
1558done
1559
1560fi
1561fi
1562ac_ct_CC=$ac_cv_prog_ac_ct_CC
1563if test -n "$ac_ct_CC"; then
1564 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1565echo "${ECHO_T}$ac_ct_CC" >&6
1566else
1567 echo "$as_me:$LINENO: result: no" >&5
1568echo "${ECHO_T}no" >&6
1569fi
1570
1571 CC=$ac_ct_CC
1572else
1573 CC="$ac_cv_prog_CC"
1574fi
1575
bec39cab 1576fi
c906108c
SS
1577if test -z "$CC"; then
1578 # Extract the first word of "cc", so it can be a program name with args.
1579set dummy cc; ac_word=$2
b4e70030
JB
1580echo "$as_me:$LINENO: checking for $ac_word" >&5
1581echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1582if test "${ac_cv_prog_CC+set}" = set; then
1583 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1584else
1585 if test -n "$CC"; then
1586 ac_cv_prog_CC="$CC" # Let the user override the test.
1587else
c906108c 1588 ac_prog_rejected=no
bec39cab
AC
1589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1590for as_dir in $PATH
1591do
1592 IFS=$as_save_IFS
1593 test -z "$as_dir" && as_dir=.
1594 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1595 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1596 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1597 ac_prog_rejected=yes
1598 continue
1599 fi
1600 ac_cv_prog_CC="cc"
1601 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1602 break 2
1603 fi
1604done
1605done
1606
c906108c
SS
1607if test $ac_prog_rejected = yes; then
1608 # We found a bogon in the path, so make sure we never use it.
1609 set dummy $ac_cv_prog_CC
1610 shift
bec39cab 1611 if test $# != 0; then
c906108c
SS
1612 # We chose a different compiler from the bogus one.
1613 # However, it has the same basename, so the bogon will be chosen
1614 # first if we set CC to just the basename; use the full file name.
1615 shift
bec39cab 1616 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
1617 fi
1618fi
1619fi
1620fi
bec39cab 1621CC=$ac_cv_prog_CC
c906108c 1622if test -n "$CC"; then
b4e70030
JB
1623 echo "$as_me:$LINENO: result: $CC" >&5
1624echo "${ECHO_T}$CC" >&6
c906108c 1625else
b4e70030
JB
1626 echo "$as_me:$LINENO: result: no" >&5
1627echo "${ECHO_T}no" >&6
c906108c
SS
1628fi
1629
bec39cab
AC
1630fi
1631if test -z "$CC"; then
1632 if test -n "$ac_tool_prefix"; then
b4e70030 1633 for ac_prog in cl
bec39cab
AC
1634 do
1635 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1636set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b4e70030
JB
1637echo "$as_me:$LINENO: checking for $ac_word" >&5
1638echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1639if test "${ac_cv_prog_CC+set}" = set; then
1640 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1641else
1642 if test -n "$CC"; then
1643 ac_cv_prog_CC="$CC" # Let the user override the test.
1644else
bec39cab
AC
1645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1646for as_dir in $PATH
1647do
1648 IFS=$as_save_IFS
1649 test -z "$as_dir" && as_dir=.
1650 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1651 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1652 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1653 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1654 break 2
1655 fi
1656done
1657done
1658
c906108c
SS
1659fi
1660fi
bec39cab 1661CC=$ac_cv_prog_CC
c906108c 1662if test -n "$CC"; then
b4e70030
JB
1663 echo "$as_me:$LINENO: result: $CC" >&5
1664echo "${ECHO_T}$CC" >&6
c906108c 1665else
b4e70030
JB
1666 echo "$as_me:$LINENO: result: no" >&5
1667echo "${ECHO_T}no" >&6
c906108c 1668fi
bec39cab
AC
1669
1670 test -n "$CC" && break
1671 done
1672fi
1673if test -z "$CC"; then
1674 ac_ct_CC=$CC
b4e70030 1675 for ac_prog in cl
bec39cab
AC
1676do
1677 # Extract the first word of "$ac_prog", so it can be a program name with args.
1678set dummy $ac_prog; ac_word=$2
b4e70030
JB
1679echo "$as_me:$LINENO: checking for $ac_word" >&5
1680echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1681if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1682 echo $ECHO_N "(cached) $ECHO_C" >&6
1683else
1684 if test -n "$ac_ct_CC"; then
1685 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1686else
1687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1688for as_dir in $PATH
1689do
1690 IFS=$as_save_IFS
1691 test -z "$as_dir" && as_dir=.
1692 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1693 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1694 ac_cv_prog_ac_ct_CC="$ac_prog"
1695 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1696 break 2
c906108c 1697 fi
bec39cab
AC
1698done
1699done
1700
1701fi
1702fi
1703ac_ct_CC=$ac_cv_prog_ac_ct_CC
1704if test -n "$ac_ct_CC"; then
b4e70030
JB
1705 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1706echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1707else
b4e70030
JB
1708 echo "$as_me:$LINENO: result: no" >&5
1709echo "${ECHO_T}no" >&6
c906108c
SS
1710fi
1711
bec39cab
AC
1712 test -n "$ac_ct_CC" && break
1713done
c906108c 1714
b4e70030 1715 CC=$ac_ct_CC
bec39cab
AC
1716fi
1717
1718fi
1719
1720
d5af19ba
DJ
1721test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1722echo "$as_me: error: in \`$ac_pwd':" >&2;}
1723{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
bec39cab
AC
1724See \`config.log' for more details." >&5
1725echo "$as_me: error: no acceptable C compiler found in \$PATH
1726See \`config.log' for more details." >&2;}
d5af19ba 1727 { (exit 1); exit 1; }; }; }
bec39cab
AC
1728
1729# Provide some information about the compiler.
b4e70030
JB
1730echo "$as_me:$LINENO:" \
1731 "checking for C compiler version" >&5
bec39cab 1732ac_compiler=`set X $ac_compile; echo $2`
b4e70030
JB
1733{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1734 (eval $ac_compiler --version </dev/null >&5) 2>&5
bec39cab
AC
1735 ac_status=$?
1736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1737 (exit $ac_status); }
b4e70030
JB
1738{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1739 (eval $ac_compiler -v </dev/null >&5) 2>&5
bec39cab
AC
1740 ac_status=$?
1741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1742 (exit $ac_status); }
b4e70030
JB
1743{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1744 (eval $ac_compiler -V </dev/null >&5) 2>&5
bec39cab
AC
1745 ac_status=$?
1746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1747 (exit $ac_status); }
1748
1749cat >conftest.$ac_ext <<_ACEOF
1750/* confdefs.h. */
1751_ACEOF
1752cat confdefs.h >>conftest.$ac_ext
1753cat >>conftest.$ac_ext <<_ACEOF
1754/* end confdefs.h. */
1755
1756int
1757main ()
1758{
1759
1760 ;
1761 return 0;
1762}
1763_ACEOF
1764ac_clean_files_save=$ac_clean_files
b4e70030 1765ac_clean_files="$ac_clean_files a.out a.exe b.out"
bec39cab
AC
1766# Try to create an executable without -o first, disregard a.out.
1767# It will help us diagnose broken compilers, and finding out an intuition
1768# of exeext.
b4e70030
JB
1769echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1770echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
bec39cab
AC
1771ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1772if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1773 (eval $ac_link_default) 2>&5
1774 ac_status=$?
1775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1776 (exit $ac_status); }; then
b4e70030
JB
1777 # Find the output, starting from the most likely. This scheme is
1778# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1779# resort.
1780
1781# Be careful to initialize this variable, since it used to be cached.
1782# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1783ac_cv_exeext=
1784# b.out is created by i960 compilers.
1785for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
bec39cab
AC
1786do
1787 test -f "$ac_file" || continue
1788 case $ac_file in
b4e70030
JB
1789 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1790 ;;
1791 conftest.$ac_ext )
1792 # This is the source file.
1793 ;;
1794 [ab].out )
1795 # We found the default executable, but exeext='' is most
1796 # certainly right.
1797 break;;
1798 *.* )
1799 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1800 # FIXME: I believe we export ac_cv_exeext for Libtool,
1801 # but it would be cool to find out if it's true. Does anybody
1802 # maintain Libtool? --akim.
1803 export ac_cv_exeext
1804 break;;
1805 * )
1806 break;;
bec39cab
AC
1807 esac
1808done
1809else
1810 echo "$as_me: failed program was:" >&5
1811sed 's/^/| /' conftest.$ac_ext >&5
1812
d5af19ba
DJ
1813{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1814echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1815{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1816See \`config.log' for more details." >&5
1817echo "$as_me: error: C compiler cannot create executables
1818See \`config.log' for more details." >&2;}
d5af19ba 1819 { (exit 77); exit 77; }; }; }
bec39cab
AC
1820fi
1821
b4e70030
JB
1822ac_exeext=$ac_cv_exeext
1823echo "$as_me:$LINENO: result: $ac_file" >&5
1824echo "${ECHO_T}$ac_file" >&6
1825
1826# Check the compiler produces executables we can run. If not, either
bec39cab 1827# the compiler is broken, or we cross compile.
b4e70030
JB
1828echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1829echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
bec39cab
AC
1830# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1831# If not cross compiling, check that we can run a simple program.
1832if test "$cross_compiling" != yes; then
1833 if { ac_try='./$ac_file'
1834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1835 (eval $ac_try) 2>&5
1836 ac_status=$?
1837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1838 (exit $ac_status); }; }; then
1839 cross_compiling=no
c906108c 1840 else
bec39cab
AC
1841 if test "$cross_compiling" = maybe; then
1842 cross_compiling=yes
1843 else
d5af19ba
DJ
1844 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1845echo "$as_me: error: in \`$ac_pwd':" >&2;}
1846{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
bec39cab
AC
1847If you meant to cross compile, use \`--host'.
1848See \`config.log' for more details." >&5
1849echo "$as_me: error: cannot run C compiled programs.
1850If you meant to cross compile, use \`--host'.
1851See \`config.log' for more details." >&2;}
d5af19ba 1852 { (exit 1); exit 1; }; }; }
bec39cab 1853 fi
c906108c 1854 fi
bec39cab 1855fi
b4e70030
JB
1856echo "$as_me:$LINENO: result: yes" >&5
1857echo "${ECHO_T}yes" >&6
bec39cab 1858
b4e70030
JB
1859rm -f a.out a.exe conftest$ac_cv_exeext b.out
1860ac_clean_files=$ac_clean_files_save
1861# Check the compiler produces executables we can run. If not, either
1862# the compiler is broken, or we cross compile.
1863echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1864echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1865echo "$as_me:$LINENO: result: $cross_compiling" >&5
1866echo "${ECHO_T}$cross_compiling" >&6
4e8d927d 1867
b4e70030
JB
1868echo "$as_me:$LINENO: checking for suffix of executables" >&5
1869echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1870if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
bec39cab
AC
1871 (eval $ac_link) 2>&5
1872 ac_status=$?
1873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1874 (exit $ac_status); }; then
b4e70030
JB
1875 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1876# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1877# work properly (i.e., refer to `conftest.exe'), while it won't with
1878# `rm'.
1879for ac_file in conftest.exe conftest conftest.*; do
1880 test -f "$ac_file" || continue
1881 case $ac_file in
1882 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1883 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1884 export ac_cv_exeext
1885 break;;
1886 * ) break;;
1887 esac
1888done
c906108c 1889else
d5af19ba
DJ
1890 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1891echo "$as_me: error: in \`$ac_pwd':" >&2;}
1892{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
bec39cab
AC
1893See \`config.log' for more details." >&5
1894echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1895See \`config.log' for more details." >&2;}
d5af19ba 1896 { (exit 1); exit 1; }; }; }
c906108c 1897fi
c906108c 1898
b4e70030
JB
1899rm -f conftest$ac_cv_exeext
1900echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1901echo "${ECHO_T}$ac_cv_exeext" >&6
c906108c 1902
b4e70030 1903rm -f conftest.$ac_ext
bec39cab
AC
1904EXEEXT=$ac_cv_exeext
1905ac_exeext=$EXEEXT
b4e70030
JB
1906echo "$as_me:$LINENO: checking for suffix of object files" >&5
1907echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
bec39cab
AC
1908if test "${ac_cv_objext+set}" = set; then
1909 echo $ECHO_N "(cached) $ECHO_C" >&6
1910else
b4e70030
JB
1911 cat >conftest.$ac_ext <<_ACEOF
1912/* confdefs.h. */
1913_ACEOF
1914cat confdefs.h >>conftest.$ac_ext
1915cat >>conftest.$ac_ext <<_ACEOF
1916/* end confdefs.h. */
1917
1918int
1919main ()
1920{
1921
1922 ;
1923 return 0;
1924}
1925_ACEOF
1926rm -f conftest.o conftest.obj
bec39cab
AC
1927if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1928 (eval $ac_compile) 2>&5
1929 ac_status=$?
1930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1931 (exit $ac_status); }; then
b4e70030 1932 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
bec39cab 1933 case $ac_file in
b4e70030 1934 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
bec39cab
AC
1935 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1936 break;;
1937 esac
1938done
c906108c 1939else
bec39cab
AC
1940 echo "$as_me: failed program was:" >&5
1941sed 's/^/| /' conftest.$ac_ext >&5
1942
d5af19ba
DJ
1943{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1944echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1945{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1946See \`config.log' for more details." >&5
1947echo "$as_me: error: cannot compute suffix of object files: cannot compile
1948See \`config.log' for more details." >&2;}
d5af19ba 1949 { (exit 1); exit 1; }; }; }
c906108c
SS
1950fi
1951
b4e70030 1952rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 1953fi
b4e70030
JB
1954echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1955echo "${ECHO_T}$ac_cv_objext" >&6
bec39cab
AC
1956OBJEXT=$ac_cv_objext
1957ac_objext=$OBJEXT
b4e70030
JB
1958echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1959echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
bec39cab
AC
1960if test "${ac_cv_c_compiler_gnu+set}" = set; then
1961 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 1962else
bec39cab
AC
1963 cat >conftest.$ac_ext <<_ACEOF
1964/* confdefs.h. */
1965_ACEOF
1966cat confdefs.h >>conftest.$ac_ext
1967cat >>conftest.$ac_ext <<_ACEOF
1968/* end confdefs.h. */
1969
1970int
1971main ()
1972{
1973#ifndef __GNUC__
1974 choke me
1975#endif
1976
1977 ;
1978 return 0;
1979}
1980_ACEOF
1981rm -f conftest.$ac_objext
1982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1983 (eval $ac_compile) 2>conftest.er1
1984 ac_status=$?
1985 grep -v '^ *+' conftest.er1 >conftest.err
1986 rm -f conftest.er1
1987 cat conftest.err >&5
1988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1989 (exit $ac_status); } &&
b4e70030
JB
1990 { ac_try='test -z "$ac_c_werror_flag"
1991 || test ! -s conftest.err'
bec39cab
AC
1992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1993 (eval $ac_try) 2>&5
1994 ac_status=$?
1995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1996 (exit $ac_status); }; } &&
1997 { ac_try='test -s conftest.$ac_objext'
1998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1999 (eval $ac_try) 2>&5
2000 ac_status=$?
2001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2002 (exit $ac_status); }; }; then
2003 ac_compiler_gnu=yes
2004else
2005 echo "$as_me: failed program was:" >&5
2006sed 's/^/| /' conftest.$ac_ext >&5
2007
b4e70030 2008ac_compiler_gnu=no
bec39cab
AC
2009fi
2010rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2011ac_cv_c_compiler_gnu=$ac_compiler_gnu
2012
2013fi
b4e70030
JB
2014echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2015echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
bec39cab
AC
2016GCC=`test $ac_compiler_gnu = yes && echo yes`
2017ac_test_CFLAGS=${CFLAGS+set}
2018ac_save_CFLAGS=$CFLAGS
b4e70030
JB
2019CFLAGS="-g"
2020echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2021echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
bec39cab
AC
2022if test "${ac_cv_prog_cc_g+set}" = set; then
2023 echo $ECHO_N "(cached) $ECHO_C" >&6
2024else
b4e70030 2025 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
2026/* confdefs.h. */
2027_ACEOF
2028cat confdefs.h >>conftest.$ac_ext
2029cat >>conftest.$ac_ext <<_ACEOF
2030/* end confdefs.h. */
2031
2032int
2033main ()
2034{
2035
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040rm -f conftest.$ac_objext
2041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2042 (eval $ac_compile) 2>conftest.er1
2043 ac_status=$?
2044 grep -v '^ *+' conftest.er1 >conftest.err
2045 rm -f conftest.er1
2046 cat conftest.err >&5
2047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2048 (exit $ac_status); } &&
b4e70030
JB
2049 { ac_try='test -z "$ac_c_werror_flag"
2050 || test ! -s conftest.err'
bec39cab
AC
2051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2052 (eval $ac_try) 2>&5
2053 ac_status=$?
2054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2055 (exit $ac_status); }; } &&
2056 { ac_try='test -s conftest.$ac_objext'
2057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2058 (eval $ac_try) 2>&5
2059 ac_status=$?
2060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2061 (exit $ac_status); }; }; then
c906108c
SS
2062 ac_cv_prog_cc_g=yes
2063else
bec39cab
AC
2064 echo "$as_me: failed program was:" >&5
2065sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2066
b4e70030 2067ac_cv_prog_cc_g=no
4e8d927d 2068fi
bec39cab
AC
2069rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2070fi
b4e70030
JB
2071echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2072echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c906108c 2073if test "$ac_test_CFLAGS" = set; then
bec39cab 2074 CFLAGS=$ac_save_CFLAGS
c906108c
SS
2075elif test $ac_cv_prog_cc_g = yes; then
2076 if test "$GCC" = yes; then
2077 CFLAGS="-g -O2"
2078 else
2079 CFLAGS="-g"
2080 fi
2081else
2082 if test "$GCC" = yes; then
2083 CFLAGS="-O2"
2084 else
2085 CFLAGS=
2086 fi
2087fi
b4e70030
JB
2088echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2089echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2090if test "${ac_cv_prog_cc_stdc+set}" = set; then
bec39cab
AC
2091 echo $ECHO_N "(cached) $ECHO_C" >&6
2092else
b4e70030 2093 ac_cv_prog_cc_stdc=no
bec39cab
AC
2094ac_save_CC=$CC
2095cat >conftest.$ac_ext <<_ACEOF
2096/* confdefs.h. */
2097_ACEOF
2098cat confdefs.h >>conftest.$ac_ext
2099cat >>conftest.$ac_ext <<_ACEOF
2100/* end confdefs.h. */
c906108c
SS
2101#include <stdarg.h>
2102#include <stdio.h>
2103#include <sys/types.h>
2104#include <sys/stat.h>
2105/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2106struct buf { int x; };
2107FILE * (*rcsopen) (struct buf *, struct stat *, int);
2108static char *e (p, i)
2109 char **p;
2110 int i;
2111{
2112 return p[i];
2113}
2114static char *f (char * (*g) (char **, int), char **p, ...)
2115{
2116 char *s;
2117 va_list v;
2118 va_start (v,p);
2119 s = g (p, va_arg (v,int));
2120 va_end (v);
2121 return s;
2122}
bec39cab
AC
2123
2124/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2125 function prototypes and stuff, but not '\xHH' hex character constants.
2126 These don't provoke an error unfortunately, instead are silently treated
b4e70030 2127 as 'x'. The following induces an error, until -std1 is added to get
bec39cab
AC
2128 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2129 array size at least. It's necessary to write '\x00'==0 to get something
b4e70030 2130 that's true only with -std1. */
bec39cab
AC
2131int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2132
c906108c
SS
2133int test (int i, double x);
2134struct s1 {int (*f) (int a);};
2135struct s2 {int (*f) (double a);};
2136int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2137int argc;
2138char **argv;
bec39cab
AC
2139int
2140main ()
2141{
c906108c 2142return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
2143 ;
2144 return 0;
2145}
2146_ACEOF
b4e70030
JB
2147# Don't try gcc -ansi; that turns off useful extensions and
2148# breaks some systems' header files.
2149# AIX -qlanglvl=ansi
2150# Ultrix and OSF/1 -std1
2151# HP-UX 10.20 and later -Ae
2152# HP-UX older versions -Aa -D_HPUX_SOURCE
2153# SVR4 -Xc -D__EXTENSIONS__
2154for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
2155do
2156 CC="$ac_save_CC $ac_arg"
2157 rm -f conftest.$ac_objext
2158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2159 (eval $ac_compile) 2>conftest.er1
2160 ac_status=$?
2161 grep -v '^ *+' conftest.er1 >conftest.err
2162 rm -f conftest.er1
2163 cat conftest.err >&5
2164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2165 (exit $ac_status); } &&
b4e70030
JB
2166 { ac_try='test -z "$ac_c_werror_flag"
2167 || test ! -s conftest.err'
bec39cab
AC
2168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2169 (eval $ac_try) 2>&5
2170 ac_status=$?
2171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2172 (exit $ac_status); }; } &&
2173 { ac_try='test -s conftest.$ac_objext'
2174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2175 (eval $ac_try) 2>&5
2176 ac_status=$?
2177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178 (exit $ac_status); }; }; then
b4e70030
JB
2179 ac_cv_prog_cc_stdc=$ac_arg
2180break
c906108c 2181else
bec39cab
AC
2182 echo "$as_me: failed program was:" >&5
2183sed 's/^/| /' conftest.$ac_ext >&5
2184
c906108c 2185fi
bec39cab 2186rm -f conftest.err conftest.$ac_objext
c906108c 2187done
b4e70030 2188rm -f conftest.$ac_ext conftest.$ac_objext
bec39cab 2189CC=$ac_save_CC
c906108c
SS
2190
2191fi
b4e70030
JB
2192
2193case "x$ac_cv_prog_cc_stdc" in
2194 x|xno)
2195 echo "$as_me:$LINENO: result: none needed" >&5
2196echo "${ECHO_T}none needed" >&6 ;;
bec39cab 2197 *)
b4e70030
JB
2198 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2199echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2200 CC="$CC $ac_cv_prog_cc_stdc" ;;
c906108c
SS
2201esac
2202
b4e70030
JB
2203# Some people use a C++ compiler to compile C. Since we use `exit',
2204# in C++ we need to declare it. In case someone uses the same compiler
2205# for both compiling C and C++ we need to have the C++ compiler decide
2206# the declaration of exit, since it's the most demanding environment.
2207cat >conftest.$ac_ext <<_ACEOF
2208#ifndef __cplusplus
2209 choke me
2210#endif
2211_ACEOF
2212rm -f conftest.$ac_objext
2213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2214 (eval $ac_compile) 2>conftest.er1
2215 ac_status=$?
2216 grep -v '^ *+' conftest.er1 >conftest.err
2217 rm -f conftest.er1
2218 cat conftest.err >&5
2219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2220 (exit $ac_status); } &&
2221 { ac_try='test -z "$ac_c_werror_flag"
2222 || test ! -s conftest.err'
2223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2224 (eval $ac_try) 2>&5
2225 ac_status=$?
2226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2227 (exit $ac_status); }; } &&
2228 { ac_try='test -s conftest.$ac_objext'
2229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2230 (eval $ac_try) 2>&5
2231 ac_status=$?
2232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2233 (exit $ac_status); }; }; then
2234 for ac_declaration in \
2235 '' \
2236 'extern "C" void std::exit (int) throw (); using std::exit;' \
2237 'extern "C" void std::exit (int); using std::exit;' \
2238 'extern "C" void exit (int) throw ();' \
2239 'extern "C" void exit (int);' \
2240 'void exit (int);'
2241do
2242 cat >conftest.$ac_ext <<_ACEOF
2243/* confdefs.h. */
2244_ACEOF
2245cat confdefs.h >>conftest.$ac_ext
2246cat >>conftest.$ac_ext <<_ACEOF
2247/* end confdefs.h. */
2248$ac_declaration
2249#include <stdlib.h>
2250int
2251main ()
2252{
2253exit (42);
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258rm -f conftest.$ac_objext
2259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2260 (eval $ac_compile) 2>conftest.er1
2261 ac_status=$?
2262 grep -v '^ *+' conftest.er1 >conftest.err
2263 rm -f conftest.er1
2264 cat conftest.err >&5
2265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2266 (exit $ac_status); } &&
2267 { ac_try='test -z "$ac_c_werror_flag"
2268 || test ! -s conftest.err'
2269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2270 (eval $ac_try) 2>&5
2271 ac_status=$?
2272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2273 (exit $ac_status); }; } &&
2274 { ac_try='test -s conftest.$ac_objext'
2275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2276 (eval $ac_try) 2>&5
2277 ac_status=$?
2278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2279 (exit $ac_status); }; }; then
2280 :
2281else
2282 echo "$as_me: failed program was:" >&5
2283sed 's/^/| /' conftest.$ac_ext >&5
2284
2285continue
2286fi
2287rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2288 cat >conftest.$ac_ext <<_ACEOF
2289/* confdefs.h. */
2290_ACEOF
2291cat confdefs.h >>conftest.$ac_ext
2292cat >>conftest.$ac_ext <<_ACEOF
2293/* end confdefs.h. */
2294$ac_declaration
2295int
2296main ()
2297{
2298exit (42);
2299 ;
2300 return 0;
2301}
2302_ACEOF
2303rm -f conftest.$ac_objext
2304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2305 (eval $ac_compile) 2>conftest.er1
2306 ac_status=$?
2307 grep -v '^ *+' conftest.er1 >conftest.err
2308 rm -f conftest.er1
2309 cat conftest.err >&5
2310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2311 (exit $ac_status); } &&
2312 { ac_try='test -z "$ac_c_werror_flag"
2313 || test ! -s conftest.err'
2314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2315 (eval $ac_try) 2>&5
2316 ac_status=$?
2317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2318 (exit $ac_status); }; } &&
2319 { ac_try='test -s conftest.$ac_objext'
2320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2321 (eval $ac_try) 2>&5
2322 ac_status=$?
2323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2324 (exit $ac_status); }; }; then
2325 break
2326else
2327 echo "$as_me: failed program was:" >&5
2328sed 's/^/| /' conftest.$ac_ext >&5
2329
2330fi
2331rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2332done
2333rm -f conftest*
2334if test -n "$ac_declaration"; then
2335 echo '#ifdef __cplusplus' >>confdefs.h
2336 echo $ac_declaration >>confdefs.h
2337 echo '#endif' >>confdefs.h
2338fi
2339
2340else
2341 echo "$as_me: failed program was:" >&5
2342sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2343
b4e70030
JB
2344fi
2345rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
2346ac_ext=c
2347ac_cpp='$CPP $CPPFLAGS'
2348ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2349ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2350ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 2351
60ca704f 2352
bec39cab
AC
2353cat >>confdefs.h <<\_ACEOF
2354#define _GNU_SOURCE 1
2355_ACEOF
c906108c
SS
2356
2357
8bb2c122 2358
bec39cab
AC
2359ac_ext=c
2360ac_cpp='$CPP $CPPFLAGS'
2361ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2362ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2363ac_compiler_gnu=$ac_cv_c_compiler_gnu
b4e70030
JB
2364echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2365echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
bec39cab
AC
2366# On Suns, sometimes $CPP names a directory.
2367if test -n "$CPP" && test -d "$CPP"; then
2368 CPP=
8bb2c122 2369fi
bec39cab
AC
2370if test -z "$CPP"; then
2371 if test "${ac_cv_prog_CPP+set}" = set; then
2372 echo $ECHO_N "(cached) $ECHO_C" >&6
2373else
2374 # Double quotes because CPP needs to be expanded
2375 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2376 do
2377 ac_preproc_ok=false
2378for ac_c_preproc_warn_flag in '' yes
2379do
2380 # Use a header file that comes with gcc, so configuring glibc
2381 # with a fresh cross-compiler works.
2382 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2383 # <limits.h> exists even on freestanding compilers.
2384 # On the NeXT, cc -E runs the code through the compiler's parser,
2385 # not just through cpp. "Syntax error" is here to catch this case.
2386 cat >conftest.$ac_ext <<_ACEOF
2387/* confdefs.h. */
2388_ACEOF
2389cat confdefs.h >>conftest.$ac_ext
2390cat >>conftest.$ac_ext <<_ACEOF
2391/* end confdefs.h. */
2392#ifdef __STDC__
2393# include <limits.h>
2394#else
2395# include <assert.h>
2396#endif
2397 Syntax error
2398_ACEOF
2399if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2400 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2401 ac_status=$?
2402 grep -v '^ *+' conftest.er1 >conftest.err
2403 rm -f conftest.er1
2404 cat conftest.err >&5
2405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2406 (exit $ac_status); } >/dev/null; then
2407 if test -s conftest.err; then
2408 ac_cpp_err=$ac_c_preproc_warn_flag
2409 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2410 else
2411 ac_cpp_err=
2412 fi
8bb2c122 2413else
bec39cab 2414 ac_cpp_err=yes
8bb2c122 2415fi
bec39cab
AC
2416if test -z "$ac_cpp_err"; then
2417 :
8bb2c122 2418else
bec39cab
AC
2419 echo "$as_me: failed program was:" >&5
2420sed 's/^/| /' conftest.$ac_ext >&5
2421
2422 # Broken: fails on valid input.
2423continue
2424fi
2425rm -f conftest.err conftest.$ac_ext
2426
b4e70030 2427 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2428 # can be detected and how.
2429 cat >conftest.$ac_ext <<_ACEOF
2430/* confdefs.h. */
2431_ACEOF
2432cat confdefs.h >>conftest.$ac_ext
2433cat >>conftest.$ac_ext <<_ACEOF
2434/* end confdefs.h. */
2435#include <ac_nonexistent.h>
2436_ACEOF
2437if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2438 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2439 ac_status=$?
2440 grep -v '^ *+' conftest.er1 >conftest.err
2441 rm -f conftest.er1
2442 cat conftest.err >&5
2443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2444 (exit $ac_status); } >/dev/null; then
2445 if test -s conftest.err; then
2446 ac_cpp_err=$ac_c_preproc_warn_flag
2447 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2448 else
2449 ac_cpp_err=
2450 fi
8bb2c122 2451else
bec39cab 2452 ac_cpp_err=yes
8bb2c122 2453fi
bec39cab
AC
2454if test -z "$ac_cpp_err"; then
2455 # Broken: success on invalid input.
2456continue
8bb2c122 2457else
bec39cab
AC
2458 echo "$as_me: failed program was:" >&5
2459sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 2460
bec39cab
AC
2461 # Passes both tests.
2462ac_preproc_ok=:
2463break
8bb2c122 2464fi
bec39cab 2465rm -f conftest.err conftest.$ac_ext
8bb2c122 2466
bec39cab
AC
2467done
2468# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2469rm -f conftest.err conftest.$ac_ext
2470if $ac_preproc_ok; then
2471 break
2472fi
8bb2c122 2473
bec39cab
AC
2474 done
2475 ac_cv_prog_CPP=$CPP
ddc9cd0f 2476
c906108c 2477fi
bec39cab
AC
2478 CPP=$ac_cv_prog_CPP
2479else
2480 ac_cv_prog_CPP=$CPP
c906108c 2481fi
b4e70030
JB
2482echo "$as_me:$LINENO: result: $CPP" >&5
2483echo "${ECHO_T}$CPP" >&6
bec39cab
AC
2484ac_preproc_ok=false
2485for ac_c_preproc_warn_flag in '' yes
2486do
2487 # Use a header file that comes with gcc, so configuring glibc
2488 # with a fresh cross-compiler works.
2489 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2490 # <limits.h> exists even on freestanding compilers.
2491 # On the NeXT, cc -E runs the code through the compiler's parser,
2492 # not just through cpp. "Syntax error" is here to catch this case.
2493 cat >conftest.$ac_ext <<_ACEOF
2494/* confdefs.h. */
2495_ACEOF
2496cat confdefs.h >>conftest.$ac_ext
2497cat >>conftest.$ac_ext <<_ACEOF
2498/* end confdefs.h. */
2499#ifdef __STDC__
2500# include <limits.h>
2501#else
2502# include <assert.h>
2503#endif
2504 Syntax error
2505_ACEOF
2506if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2507 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2508 ac_status=$?
2509 grep -v '^ *+' conftest.er1 >conftest.err
2510 rm -f conftest.er1
2511 cat conftest.err >&5
2512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2513 (exit $ac_status); } >/dev/null; then
2514 if test -s conftest.err; then
2515 ac_cpp_err=$ac_c_preproc_warn_flag
2516 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2517 else
2518 ac_cpp_err=
2519 fi
c906108c 2520else
bec39cab 2521 ac_cpp_err=yes
c906108c 2522fi
bec39cab
AC
2523if test -z "$ac_cpp_err"; then
2524 :
c906108c 2525else
bec39cab
AC
2526 echo "$as_me: failed program was:" >&5
2527sed 's/^/| /' conftest.$ac_ext >&5
2528
2529 # Broken: fails on valid input.
2530continue
2531fi
2532rm -f conftest.err conftest.$ac_ext
2533
b4e70030 2534 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2535 # can be detected and how.
2536 cat >conftest.$ac_ext <<_ACEOF
2537/* confdefs.h. */
2538_ACEOF
2539cat confdefs.h >>conftest.$ac_ext
2540cat >>conftest.$ac_ext <<_ACEOF
2541/* end confdefs.h. */
2542#include <ac_nonexistent.h>
2543_ACEOF
2544if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2545 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2546 ac_status=$?
2547 grep -v '^ *+' conftest.er1 >conftest.err
2548 rm -f conftest.er1
2549 cat conftest.err >&5
2550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2551 (exit $ac_status); } >/dev/null; then
2552 if test -s conftest.err; then
2553 ac_cpp_err=$ac_c_preproc_warn_flag
2554 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2555 else
2556 ac_cpp_err=
2557 fi
c906108c 2558else
bec39cab 2559 ac_cpp_err=yes
c906108c 2560fi
bec39cab
AC
2561if test -z "$ac_cpp_err"; then
2562 # Broken: success on invalid input.
2563continue
c906108c 2564else
bec39cab
AC
2565 echo "$as_me: failed program was:" >&5
2566sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2567
bec39cab
AC
2568 # Passes both tests.
2569ac_preproc_ok=:
2570break
c906108c 2571fi
bec39cab 2572rm -f conftest.err conftest.$ac_ext
c906108c 2573
bec39cab
AC
2574done
2575# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2576rm -f conftest.err conftest.$ac_ext
2577if $ac_preproc_ok; then
c906108c
SS
2578 :
2579else
d5af19ba
DJ
2580 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2581echo "$as_me: error: in \`$ac_pwd':" >&2;}
2582{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
bec39cab
AC
2583See \`config.log' for more details." >&5
2584echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2585See \`config.log' for more details." >&2;}
d5af19ba 2586 { (exit 1); exit 1; }; }; }
c906108c 2587fi
c906108c 2588
bec39cab
AC
2589ac_ext=c
2590ac_cpp='$CPP $CPPFLAGS'
2591ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2592ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2593ac_compiler_gnu=$ac_cv_c_compiler_gnu
2594
2595
b4e70030
JB
2596echo "$as_me:$LINENO: checking for egrep" >&5
2597echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2598if test "${ac_cv_prog_egrep+set}" = set; then
4e8d927d
DJ
2599 echo $ECHO_N "(cached) $ECHO_C" >&6
2600else
b4e70030
JB
2601 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2602 then ac_cv_prog_egrep='grep -E'
2603 else ac_cv_prog_egrep='egrep'
bec39cab 2604 fi
4e8d927d 2605fi
b4e70030
JB
2606echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2607echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2608 EGREP=$ac_cv_prog_egrep
c906108c 2609
bec39cab
AC
2610
2611
b4e70030
JB
2612echo "$as_me:$LINENO: checking for AIX" >&5
2613echo $ECHO_N "checking for AIX... $ECHO_C" >&6
bec39cab
AC
2614cat >conftest.$ac_ext <<_ACEOF
2615/* confdefs.h. */
2616_ACEOF
2617cat confdefs.h >>conftest.$ac_ext
2618cat >>conftest.$ac_ext <<_ACEOF
2619/* end confdefs.h. */
2620#ifdef _AIX
2621 yes
2622#endif
2623
2624_ACEOF
c906108c 2625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 2626 $EGREP "yes" >/dev/null 2>&1; then
b4e70030
JB
2627 echo "$as_me:$LINENO: result: yes" >&5
2628echo "${ECHO_T}yes" >&6
bec39cab
AC
2629cat >>confdefs.h <<\_ACEOF
2630#define _ALL_SOURCE 1
2631_ACEOF
2632
c906108c 2633else
b4e70030
JB
2634 echo "$as_me:$LINENO: result: no" >&5
2635echo "${ECHO_T}no" >&6
c906108c
SS
2636fi
2637rm -f conftest*
2638
c906108c 2639
b4e70030
JB
2640echo "$as_me:$LINENO: checking for library containing strerror" >&5
2641echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
bec39cab
AC
2642if test "${ac_cv_search_strerror+set}" = set; then
2643 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2644else
bec39cab 2645 ac_func_search_save_LIBS=$LIBS
b4e70030 2646ac_cv_search_strerror=no
bec39cab
AC
2647cat >conftest.$ac_ext <<_ACEOF
2648/* confdefs.h. */
2649_ACEOF
2650cat confdefs.h >>conftest.$ac_ext
2651cat >>conftest.$ac_ext <<_ACEOF
2652/* end confdefs.h. */
c906108c 2653
b4e70030 2654/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
2655#ifdef __cplusplus
2656extern "C"
2657#endif
b4e70030
JB
2658/* We use char because int might match the return type of a gcc2
2659 builtin and then its argument prototype would still apply. */
bec39cab
AC
2660char strerror ();
2661int
2662main ()
2663{
b4e70030 2664strerror ();
bec39cab
AC
2665 ;
2666 return 0;
2667}
2668_ACEOF
b4e70030 2669rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
2670if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2671 (eval $ac_link) 2>conftest.er1
2672 ac_status=$?
2673 grep -v '^ *+' conftest.er1 >conftest.err
2674 rm -f conftest.er1
2675 cat conftest.err >&5
2676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2677 (exit $ac_status); } &&
b4e70030
JB
2678 { ac_try='test -z "$ac_c_werror_flag"
2679 || test ! -s conftest.err'
bec39cab
AC
2680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2681 (eval $ac_try) 2>&5
2682 ac_status=$?
2683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2684 (exit $ac_status); }; } &&
2685 { ac_try='test -s conftest$ac_exeext'
2686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2687 (eval $ac_try) 2>&5
2688 ac_status=$?
2689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2690 (exit $ac_status); }; }; then
b4e70030 2691 ac_cv_search_strerror="none required"
c906108c 2692else
bec39cab
AC
2693 echo "$as_me: failed program was:" >&5
2694sed 's/^/| /' conftest.$ac_ext >&5
c906108c
SS
2695
2696fi
bec39cab 2697rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
2698 conftest$ac_exeext conftest.$ac_ext
2699if test "$ac_cv_search_strerror" = no; then
2700 for ac_lib in cposix; do
2701 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
2702 cat >conftest.$ac_ext <<_ACEOF
2703/* confdefs.h. */
2704_ACEOF
2705cat confdefs.h >>conftest.$ac_ext
2706cat >>conftest.$ac_ext <<_ACEOF
2707/* end confdefs.h. */
2708
2709/* Override any gcc2 internal prototype to avoid an error. */
2710#ifdef __cplusplus
2711extern "C"
2712#endif
2713/* We use char because int might match the return type of a gcc2
2714 builtin and then its argument prototype would still apply. */
2715char strerror ();
2716int
2717main ()
2718{
2719strerror ();
2720 ;
2721 return 0;
2722}
2723_ACEOF
2724rm -f conftest.$ac_objext conftest$ac_exeext
2725if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2726 (eval $ac_link) 2>conftest.er1
2727 ac_status=$?
2728 grep -v '^ *+' conftest.er1 >conftest.err
2729 rm -f conftest.er1
2730 cat conftest.err >&5
2731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2732 (exit $ac_status); } &&
2733 { ac_try='test -z "$ac_c_werror_flag"
2734 || test ! -s conftest.err'
2735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2736 (eval $ac_try) 2>&5
2737 ac_status=$?
2738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739 (exit $ac_status); }; } &&
2740 { ac_try='test -s conftest$ac_exeext'
2741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2742 (eval $ac_try) 2>&5
2743 ac_status=$?
2744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2745 (exit $ac_status); }; }; then
2746 ac_cv_search_strerror="-l$ac_lib"
2747break
4e8d927d 2748else
b4e70030
JB
2749 echo "$as_me: failed program was:" >&5
2750sed 's/^/| /' conftest.$ac_ext >&5
2751
2752fi
2753rm -f conftest.err conftest.$ac_objext \
2754 conftest$ac_exeext conftest.$ac_ext
2755 done
c906108c 2756fi
bec39cab 2757LIBS=$ac_func_search_save_LIBS
c906108c 2758fi
b4e70030
JB
2759echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
2760echo "${ECHO_T}$ac_cv_search_strerror" >&6
2761if test "$ac_cv_search_strerror" != no; then
2762 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
bec39cab 2763
c906108c
SS
2764fi
2765
783e057b
DJ
2766if test -n "$ac_tool_prefix"; then
2767 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2768set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2769echo "$as_me:$LINENO: checking for $ac_word" >&5
2770echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2771if test "${ac_cv_prog_RANLIB+set}" = set; then
2772 echo $ECHO_N "(cached) $ECHO_C" >&6
2773else
2774 if test -n "$RANLIB"; then
2775 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2776else
2777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2778for as_dir in $PATH
2779do
2780 IFS=$as_save_IFS
2781 test -z "$as_dir" && as_dir=.
2782 for ac_exec_ext in '' $ac_executable_extensions; do
2783 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2784 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2785 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2786 break 2
2787 fi
2788done
2789done
c906108c 2790
783e057b
DJ
2791fi
2792fi
2793RANLIB=$ac_cv_prog_RANLIB
2794if test -n "$RANLIB"; then
2795 echo "$as_me:$LINENO: result: $RANLIB" >&5
2796echo "${ECHO_T}$RANLIB" >&6
2797else
2798 echo "$as_me:$LINENO: result: no" >&5
2799echo "${ECHO_T}no" >&6
2800fi
bec39cab 2801
783e057b
DJ
2802fi
2803if test -z "$ac_cv_prog_RANLIB"; then
2804 ac_ct_RANLIB=$RANLIB
2805 # Extract the first word of "ranlib", so it can be a program name with args.
2806set dummy ranlib; ac_word=$2
2807echo "$as_me:$LINENO: checking for $ac_word" >&5
2808echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2809if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
bec39cab 2810 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2811else
783e057b
DJ
2812 if test -n "$ac_ct_RANLIB"; then
2813 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2814else
2815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2816for as_dir in $PATH
bec39cab 2817do
783e057b
DJ
2818 IFS=$as_save_IFS
2819 test -z "$as_dir" && as_dir=.
2820 for ac_exec_ext in '' $ac_executable_extensions; do
2821 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2822 ac_cv_prog_ac_ct_RANLIB="ranlib"
2823 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2824 break 2
2825 fi
2826done
2827done
2828
2829 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2830fi
2831fi
2832ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2833if test -n "$ac_ct_RANLIB"; then
2834 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2835echo "${ECHO_T}$ac_ct_RANLIB" >&6
2836else
2837 echo "$as_me:$LINENO: result: no" >&5
2838echo "${ECHO_T}no" >&6
2839fi
2840
2841 RANLIB=$ac_ct_RANLIB
2842else
2843 RANLIB="$ac_cv_prog_RANLIB"
2844fi
2845
2846echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2847echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2848if test "${ac_cv_header_stdc+set}" = set; then
2849 echo $ECHO_N "(cached) $ECHO_C" >&6
2850else
bec39cab
AC
2851 cat >conftest.$ac_ext <<_ACEOF
2852/* confdefs.h. */
2853_ACEOF
2854cat confdefs.h >>conftest.$ac_ext
2855cat >>conftest.$ac_ext <<_ACEOF
2856/* end confdefs.h. */
783e057b 2857#include <stdlib.h>
bec39cab 2858#include <stdarg.h>
783e057b
DJ
2859#include <string.h>
2860#include <float.h>
c906108c 2861
bec39cab
AC
2862int
2863main ()
2864{
c906108c 2865
bec39cab
AC
2866 ;
2867 return 0;
2868}
2869_ACEOF
2870rm -f conftest.$ac_objext
2871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2872 (eval $ac_compile) 2>conftest.er1
2873 ac_status=$?
2874 grep -v '^ *+' conftest.er1 >conftest.err
2875 rm -f conftest.er1
2876 cat conftest.err >&5
2877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2878 (exit $ac_status); } &&
b4e70030
JB
2879 { ac_try='test -z "$ac_c_werror_flag"
2880 || test ! -s conftest.err'
bec39cab
AC
2881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2882 (eval $ac_try) 2>&5
2883 ac_status=$?
2884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2885 (exit $ac_status); }; } &&
2886 { ac_try='test -s conftest.$ac_objext'
2887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2888 (eval $ac_try) 2>&5
2889 ac_status=$?
2890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2891 (exit $ac_status); }; }; then
783e057b 2892 ac_cv_header_stdc=yes
c906108c 2893else
bec39cab
AC
2894 echo "$as_me: failed program was:" >&5
2895sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2896
783e057b 2897ac_cv_header_stdc=no
c906108c 2898fi
bec39cab 2899rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 2900
783e057b
DJ
2901if test $ac_cv_header_stdc = yes; then
2902 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2903 cat >conftest.$ac_ext <<_ACEOF
2904/* confdefs.h. */
2905_ACEOF
2906cat confdefs.h >>conftest.$ac_ext
2907cat >>conftest.$ac_ext <<_ACEOF
2908/* end confdefs.h. */
2909#include <string.h>
c906108c 2910
783e057b
DJ
2911_ACEOF
2912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2913 $EGREP "memchr" >/dev/null 2>&1; then
2914 :
c906108c 2915else
783e057b 2916 ac_cv_header_stdc=no
c906108c 2917fi
783e057b 2918rm -f conftest*
c906108c
SS
2919
2920fi
2921
783e057b
DJ
2922if test $ac_cv_header_stdc = yes; then
2923 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2924 cat >conftest.$ac_ext <<_ACEOF
2925/* confdefs.h. */
2926_ACEOF
2927cat confdefs.h >>conftest.$ac_ext
2928cat >>conftest.$ac_ext <<_ACEOF
2929/* end confdefs.h. */
2930#include <stdlib.h>
bec39cab 2931
783e057b
DJ
2932_ACEOF
2933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2934 $EGREP "free" >/dev/null 2>&1; then
2935 :
bec39cab 2936else
783e057b 2937 ac_cv_header_stdc=no
bec39cab 2938fi
783e057b 2939rm -f conftest*
bec39cab
AC
2940
2941fi
bec39cab 2942
783e057b
DJ
2943if test $ac_cv_header_stdc = yes; then
2944 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2945 if test "$cross_compiling" = yes; then
2946 :
bec39cab 2947else
783e057b
DJ
2948 cat >conftest.$ac_ext <<_ACEOF
2949/* confdefs.h. */
2950_ACEOF
2951cat confdefs.h >>conftest.$ac_ext
2952cat >>conftest.$ac_ext <<_ACEOF
2953/* end confdefs.h. */
2954#include <ctype.h>
2955#if ((' ' & 0x0FF) == 0x020)
2956# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2957# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2958#else
2959# define ISLOWER(c) \
2960 (('a' <= (c) && (c) <= 'i') \
2961 || ('j' <= (c) && (c) <= 'r') \
2962 || ('s' <= (c) && (c) <= 'z'))
2963# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2964#endif
2965
2966#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2967int
2968main ()
2969{
2970 int i;
2971 for (i = 0; i < 256; i++)
2972 if (XOR (islower (i), ISLOWER (i))
2973 || toupper (i) != TOUPPER (i))
2974 exit(2);
2975 exit (0);
2976}
2977_ACEOF
2978rm -f conftest$ac_exeext
2979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2980 (eval $ac_link) 2>&5
2981 ac_status=$?
2982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2983 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2985 (eval $ac_try) 2>&5
2986 ac_status=$?
2987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2988 (exit $ac_status); }; }; then
2989 :
2990else
2991 echo "$as_me: program exited with status $ac_status" >&5
2992echo "$as_me: failed program was:" >&5
2993sed 's/^/| /' conftest.$ac_ext >&5
2994
2995( exit $ac_status )
2996ac_cv_header_stdc=no
2997fi
2998rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2999fi
3000fi
3001fi
3002echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3003echo "${ECHO_T}$ac_cv_header_stdc" >&6
3004if test $ac_cv_header_stdc = yes; then
3005
3006cat >>confdefs.h <<\_ACEOF
3007#define STDC_HEADERS 1
3008_ACEOF
3009
3010fi
3011
3012# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3023 inttypes.h stdint.h unistd.h
3024do
3025as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3026echo "$as_me:$LINENO: checking for $ac_header" >&5
3027echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3028if eval "test \"\${$as_ac_Header+set}\" = set"; then
3029 echo $ECHO_N "(cached) $ECHO_C" >&6
3030else
3031 cat >conftest.$ac_ext <<_ACEOF
3032/* confdefs.h. */
3033_ACEOF
3034cat confdefs.h >>conftest.$ac_ext
3035cat >>conftest.$ac_ext <<_ACEOF
3036/* end confdefs.h. */
3037$ac_includes_default
3038
3039#include <$ac_header>
3040_ACEOF
3041rm -f conftest.$ac_objext
3042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3043 (eval $ac_compile) 2>conftest.er1
3044 ac_status=$?
3045 grep -v '^ *+' conftest.er1 >conftest.err
3046 rm -f conftest.er1
3047 cat conftest.err >&5
3048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3049 (exit $ac_status); } &&
3050 { ac_try='test -z "$ac_c_werror_flag"
3051 || test ! -s conftest.err'
3052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3053 (eval $ac_try) 2>&5
3054 ac_status=$?
3055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3056 (exit $ac_status); }; } &&
3057 { ac_try='test -s conftest.$ac_objext'
3058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3059 (eval $ac_try) 2>&5
3060 ac_status=$?
3061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3062 (exit $ac_status); }; }; then
3063 eval "$as_ac_Header=yes"
3064else
3065 echo "$as_me: failed program was:" >&5
3066sed 's/^/| /' conftest.$ac_ext >&5
3067
3068eval "$as_ac_Header=no"
3069fi
3070rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3071fi
3072echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3073echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3074if test `eval echo '${'$as_ac_Header'}'` = yes; then
3075 cat >>confdefs.h <<_ACEOF
3076#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3077_ACEOF
3078
3079fi
3080
3081done
3082
3083
3084
3085 if test "${ac_cv_header_minix_config_h+set}" = set; then
3086 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3087echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3088if test "${ac_cv_header_minix_config_h+set}" = set; then
3089 echo $ECHO_N "(cached) $ECHO_C" >&6
3090fi
3091echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3092echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3093else
3094 # Is the header compilable?
3095echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3096echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3097cat >conftest.$ac_ext <<_ACEOF
3098/* confdefs.h. */
3099_ACEOF
3100cat confdefs.h >>conftest.$ac_ext
3101cat >>conftest.$ac_ext <<_ACEOF
3102/* end confdefs.h. */
3103$ac_includes_default
3104#include <minix/config.h>
3105_ACEOF
3106rm -f conftest.$ac_objext
3107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3108 (eval $ac_compile) 2>conftest.er1
3109 ac_status=$?
3110 grep -v '^ *+' conftest.er1 >conftest.err
3111 rm -f conftest.er1
3112 cat conftest.err >&5
3113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3114 (exit $ac_status); } &&
3115 { ac_try='test -z "$ac_c_werror_flag"
3116 || test ! -s conftest.err'
3117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3118 (eval $ac_try) 2>&5
3119 ac_status=$?
3120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3121 (exit $ac_status); }; } &&
3122 { ac_try='test -s conftest.$ac_objext'
3123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3124 (eval $ac_try) 2>&5
3125 ac_status=$?
3126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3127 (exit $ac_status); }; }; then
3128 ac_header_compiler=yes
3129else
3130 echo "$as_me: failed program was:" >&5
3131sed 's/^/| /' conftest.$ac_ext >&5
3132
3133ac_header_compiler=no
3134fi
3135rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3136echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3137echo "${ECHO_T}$ac_header_compiler" >&6
3138
3139# Is the header present?
3140echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3141echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3142cat >conftest.$ac_ext <<_ACEOF
3143/* confdefs.h. */
3144_ACEOF
3145cat confdefs.h >>conftest.$ac_ext
3146cat >>conftest.$ac_ext <<_ACEOF
3147/* end confdefs.h. */
3148#include <minix/config.h>
3149_ACEOF
3150if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3151 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3152 ac_status=$?
3153 grep -v '^ *+' conftest.er1 >conftest.err
3154 rm -f conftest.er1
3155 cat conftest.err >&5
3156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3157 (exit $ac_status); } >/dev/null; then
3158 if test -s conftest.err; then
3159 ac_cpp_err=$ac_c_preproc_warn_flag
3160 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3161 else
3162 ac_cpp_err=
3163 fi
3164else
3165 ac_cpp_err=yes
3166fi
3167if test -z "$ac_cpp_err"; then
3168 ac_header_preproc=yes
3169else
3170 echo "$as_me: failed program was:" >&5
3171sed 's/^/| /' conftest.$ac_ext >&5
3172
3173 ac_header_preproc=no
3174fi
3175rm -f conftest.err conftest.$ac_ext
3176echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3177echo "${ECHO_T}$ac_header_preproc" >&6
3178
3179# So? What about this header?
3180case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3181 yes:no: )
3182 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3183echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3184 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
3185echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
3186 ac_header_preproc=yes
3187 ;;
3188 no:yes:* )
3189 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3190echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3191 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3192echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3193 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
3194echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
3195 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
3196echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
3197 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3198echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3199 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
3200echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
3201 (
3202 cat <<\_ASBOX
3203## ------------------------------------------ ##
3204## Report this to the AC_PACKAGE_NAME lists. ##
3205## ------------------------------------------ ##
3206_ASBOX
3207 ) |
3208 sed "s/^/$as_me: WARNING: /" >&2
3209 ;;
3210esac
3211echo "$as_me:$LINENO: checking for minix/config.h" >&5
3212echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3213if test "${ac_cv_header_minix_config_h+set}" = set; then
3214 echo $ECHO_N "(cached) $ECHO_C" >&6
3215else
3216 ac_cv_header_minix_config_h=$ac_header_preproc
3217fi
3218echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3219echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3220
3221fi
3222if test $ac_cv_header_minix_config_h = yes; then
3223 MINIX=yes
3224else
3225 MINIX=
3226fi
3227
3228
3229 if test "$MINIX" = yes; then
3230
3231cat >>confdefs.h <<\_ACEOF
3232#define _POSIX_SOURCE 1
3233_ACEOF
3234
3235
3236cat >>confdefs.h <<\_ACEOF
3237#define _POSIX_1_SOURCE 2
3238_ACEOF
3239
3240
3241cat >>confdefs.h <<\_ACEOF
3242#define _MINIX 1
3243_ACEOF
3244
3245 fi
3246
3247
3248
3249 echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
3250echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
3251if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
3252 echo $ECHO_N "(cached) $ECHO_C" >&6
3253else
3254 cat >conftest.$ac_ext <<_ACEOF
3255/* confdefs.h. */
3256_ACEOF
3257cat confdefs.h >>conftest.$ac_ext
3258cat >>conftest.$ac_ext <<_ACEOF
3259/* end confdefs.h. */
3260
3261# define __EXTENSIONS__ 1
3262 $ac_includes_default
3263int
3264main ()
3265{
3266
3267 ;
3268 return 0;
3269}
3270_ACEOF
3271rm -f conftest.$ac_objext
3272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3273 (eval $ac_compile) 2>conftest.er1
3274 ac_status=$?
3275 grep -v '^ *+' conftest.er1 >conftest.err
3276 rm -f conftest.er1
3277 cat conftest.err >&5
3278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3279 (exit $ac_status); } &&
3280 { ac_try='test -z "$ac_c_werror_flag"
3281 || test ! -s conftest.err'
3282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3283 (eval $ac_try) 2>&5
3284 ac_status=$?
3285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3286 (exit $ac_status); }; } &&
3287 { ac_try='test -s conftest.$ac_objext'
3288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3289 (eval $ac_try) 2>&5
3290 ac_status=$?
3291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3292 (exit $ac_status); }; }; then
3293 ac_cv_safe_to_define___extensions__=yes
3294else
3295 echo "$as_me: failed program was:" >&5
3296sed 's/^/| /' conftest.$ac_ext >&5
3297
3298ac_cv_safe_to_define___extensions__=no
3299fi
3300rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3301fi
3302echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
3303echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
3304 test $ac_cv_safe_to_define___extensions__ = yes &&
3305 cat >>confdefs.h <<\_ACEOF
3306#define __EXTENSIONS__ 1
3307_ACEOF
3308
3309 cat >>confdefs.h <<\_ACEOF
3310#define _ALL_SOURCE 1
3311_ACEOF
3312
3313 cat >>confdefs.h <<\_ACEOF
3314#define _GNU_SOURCE 1
3315_ACEOF
3316
3317 cat >>confdefs.h <<\_ACEOF
3318#define _POSIX_PTHREAD_SEMANTICS 1
3319_ACEOF
3320
3321 cat >>confdefs.h <<\_ACEOF
3322#define _TANDEM_SOURCE 1
3323_ACEOF
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5
3335echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
3336if test "${am_cv_prog_cc_stdc+set}" = set; then
3337 echo $ECHO_N "(cached) $ECHO_C" >&6
3338else
3339 am_cv_prog_cc_stdc=no
3340ac_save_CC="$CC"
3341# Don't try gcc -ansi; that turns off useful extensions and
3342# breaks some systems' header files.
3343# AIX -qlanglvl=ansi
3344# Ultrix and OSF/1 -std1
3345# HP-UX 10.20 and later -Ae
3346# HP-UX older versions -Aa -D_HPUX_SOURCE
3347# SVR4 -Xc -D__EXTENSIONS__
3348for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3349do
3350 CC="$ac_save_CC $ac_arg"
3351 cat >conftest.$ac_ext <<_ACEOF
3352/* confdefs.h. */
3353_ACEOF
3354cat confdefs.h >>conftest.$ac_ext
3355cat >>conftest.$ac_ext <<_ACEOF
3356/* end confdefs.h. */
3357#include <stdarg.h>
3358#include <stdio.h>
3359#include <sys/types.h>
3360#include <sys/stat.h>
3361/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3362struct buf { int x; };
3363FILE * (*rcsopen) (struct buf *, struct stat *, int);
3364static char *e (p, i)
3365 char **p;
3366 int i;
3367{
3368 return p[i];
3369}
3370static char *f (char * (*g) (char **, int), char **p, ...)
3371{
3372 char *s;
3373 va_list v;
3374 va_start (v,p);
3375 s = g (p, va_arg (v,int));
3376 va_end (v);
3377 return s;
3378}
3379int test (int i, double x);
3380struct s1 {int (*f) (int a);};
3381struct s2 {int (*f) (double a);};
3382int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3383int argc;
3384char **argv;
3385
3386int
3387main ()
3388{
3389
3390return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3391
3392 ;
3393 return 0;
3394}
3395_ACEOF
3396rm -f conftest.$ac_objext
3397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3398 (eval $ac_compile) 2>conftest.er1
3399 ac_status=$?
3400 grep -v '^ *+' conftest.er1 >conftest.err
3401 rm -f conftest.er1
3402 cat conftest.err >&5
3403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3404 (exit $ac_status); } &&
3405 { ac_try='test -z "$ac_c_werror_flag"
3406 || test ! -s conftest.err'
3407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3408 (eval $ac_try) 2>&5
3409 ac_status=$?
3410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3411 (exit $ac_status); }; } &&
3412 { ac_try='test -s conftest.$ac_objext'
3413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3414 (eval $ac_try) 2>&5
3415 ac_status=$?
3416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3417 (exit $ac_status); }; }; then
3418 am_cv_prog_cc_stdc="$ac_arg"; break
3419else
3420 echo "$as_me: failed program was:" >&5
3421sed 's/^/| /' conftest.$ac_ext >&5
3422
3423fi
3424rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3425done
3426CC="$ac_save_CC"
3427
3428fi
3429
3430if test -z "$am_cv_prog_cc_stdc"; then
3431 echo "$as_me:$LINENO: result: none needed" >&5
3432echo "${ECHO_T}none needed" >&6
3433else
3434 echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5
3435echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6
3436fi
3437case "x$am_cv_prog_cc_stdc" in
3438 x|xno) ;;
3439 *) CC="$CC $am_cv_prog_cc_stdc" ;;
3440esac
3441
3442
3443ac_aux_dir=
3444for ac_dir in .. $srcdir/..; do
3445 if test -f $ac_dir/install-sh; then
3446 ac_aux_dir=$ac_dir
3447 ac_install_sh="$ac_aux_dir/install-sh -c"
3448 break
3449 elif test -f $ac_dir/install.sh; then
3450 ac_aux_dir=$ac_dir
3451 ac_install_sh="$ac_aux_dir/install.sh -c"
3452 break
3453 elif test -f $ac_dir/shtool; then
3454 ac_aux_dir=$ac_dir
3455 ac_install_sh="$ac_aux_dir/shtool install -c"
3456 break
3457 fi
3458done
3459if test -z "$ac_aux_dir"; then
3460 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5
3461echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;}
3462 { (exit 1); exit 1; }; }
3463fi
3464ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3465ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3466ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
3467
3468# Make sure we can run config.sub.
3469$ac_config_sub sun4 >/dev/null 2>&1 ||
3470 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
3471echo "$as_me: error: cannot run $ac_config_sub" >&2;}
3472 { (exit 1); exit 1; }; }
3473
3474echo "$as_me:$LINENO: checking build system type" >&5
3475echo $ECHO_N "checking build system type... $ECHO_C" >&6
3476if test "${ac_cv_build+set}" = set; then
3477 echo $ECHO_N "(cached) $ECHO_C" >&6
3478else
3479 ac_cv_build_alias=$build_alias
3480test -z "$ac_cv_build_alias" &&
3481 ac_cv_build_alias=`$ac_config_guess`
3482test -z "$ac_cv_build_alias" &&
3483 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
3484echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
3485 { (exit 1); exit 1; }; }
3486ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
3487 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
3488echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
3489 { (exit 1); exit 1; }; }
3490
3491fi
3492echo "$as_me:$LINENO: result: $ac_cv_build" >&5
3493echo "${ECHO_T}$ac_cv_build" >&6
3494build=$ac_cv_build
3495build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3496build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3497build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3498
3499
3500echo "$as_me:$LINENO: checking host system type" >&5
3501echo $ECHO_N "checking host system type... $ECHO_C" >&6
3502if test "${ac_cv_host+set}" = set; then
3503 echo $ECHO_N "(cached) $ECHO_C" >&6
3504else
3505 ac_cv_host_alias=$host_alias
3506test -z "$ac_cv_host_alias" &&
3507 ac_cv_host_alias=$ac_cv_build_alias
3508ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
3509 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
3510echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
3511 { (exit 1); exit 1; }; }
3512
3513fi
3514echo "$as_me:$LINENO: result: $ac_cv_host" >&5
3515echo "${ECHO_T}$ac_cv_host" >&6
3516host=$ac_cv_host
3517host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3518host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3519host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3520
3521
3522echo "$as_me:$LINENO: checking target system type" >&5
3523echo $ECHO_N "checking target system type... $ECHO_C" >&6
3524if test "${ac_cv_target+set}" = set; then
3525 echo $ECHO_N "(cached) $ECHO_C" >&6
3526else
3527 ac_cv_target_alias=$target_alias
3528test "x$ac_cv_target_alias" = "x" &&
b4e70030
JB
3529 ac_cv_target_alias=$ac_cv_host_alias
3530ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
3531 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
3532echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
bec39cab
AC
3533 { (exit 1); exit 1; }; }
3534
3535fi
783e057b
DJ
3536echo "$as_me:$LINENO: result: $ac_cv_target" >&5
3537echo "${ECHO_T}$ac_cv_target" >&6
3538target=$ac_cv_target
3539target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3540target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3541target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3542
3543
3544# The aliases save the names the user supplied, while $host etc.
3545# will get canonicalized.
3546test -n "$target_alias" &&
3547 test "$program_prefix$program_suffix$program_transform_name" = \
3548 NONENONEs,x,x, &&
3549 program_prefix=${target_alias}-
3550
a417dc56
RW
3551# Dependency checking.
3552rm -rf .tst 2>/dev/null
3553mkdir .tst 2>/dev/null
3554if test -d .tst; then
3555 am__leading_dot=.
3556else
3557 am__leading_dot=_
3558fi
3559rmdir .tst 2>/dev/null
3560
3561DEPDIR="${am__leading_dot}deps"
3562
3563 ac_config_commands="$ac_config_commands depdir"
3564
3565
3566depcc="$CC" am_compiler_list=
3567
3568am_depcomp=$ac_aux_dir/depcomp
3569echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
3570echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
3571if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
3572 echo $ECHO_N "(cached) $ECHO_C" >&6
3573else
3574 if test -f "$am_depcomp"; then
3575 # We make a subdir and do the tests there. Otherwise we can end up
3576 # making bogus files that we don't know about and never remove. For
3577 # instance it was reported that on HP-UX the gcc test will end up
3578 # making a dummy file named `D' -- because `-MD' means `put the output
3579 # in D'.
3580 mkdir conftest.dir
3581 # Copy depcomp to subdir because otherwise we won't find it if we're
3582 # using a relative directory.
3583 cp "$am_depcomp" conftest.dir
3584 cd conftest.dir
3585 # We will build objects and dependencies in a subdirectory because
3586 # it helps to detect inapplicable dependency modes. For instance
3587 # both Tru64's cc and ICC support -MD to output dependencies as a
3588 # side effect of compilation, but ICC will put the dependencies in
3589 # the current directory while Tru64 will put them in the object
3590 # directory.
3591 mkdir sub
3592
3593 am_cv_CC_dependencies_compiler_type=none
3594 if test "$am_compiler_list" = ""; then
3595 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3596 fi
3597 for depmode in $am_compiler_list; do
3598 if test $depmode = none; then break; fi
3599
3600 echo "$as_me:$LINENO: trying $depmode" >&5
3601 # Setup a source with many dependencies, because some compilers
3602 # like to wrap large dependency lists on column 80 (with \), and
3603 # we should not choose a depcomp mode which is confused by this.
3604 #
3605 # We need to recreate these files for each test, as the compiler may
3606 # overwrite some of them when testing with obscure command lines.
3607 # This happens at least with the AIX C compiler.
3608 : > sub/conftest.c
3609 for i in 1 2 3 4 5 6; do
3610 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3611 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3612 # Solaris 8's {/usr,}/bin/sh.
3613 touch sub/conftst$i.h
3614 done
3615 echo "include sub/conftest.Po" > confmf
3616
3617 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3618 # mode. It turns out that the SunPro C++ compiler does not properly
3619 # handle `-M -o', and we need to detect this.
3620 depcmd="depmode=$depmode \
3621 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
3622 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3623 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
3624 echo "| $depcmd" | sed -e 's/ */ /g' >&5
3625 if env $depcmd > conftest.err 2>&1 &&
3626 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
3627 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
3628 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
3629 # icc doesn't choke on unknown options, it will just issue warnings
3630 # or remarks (even with -Werror). So we grep stderr for any message
3631 # that says an option was ignored or not supported.
3632 # When given -MP, icc 7.0 and 7.1 complain thusly:
3633 # icc: Command line warning: ignoring option '-M'; no argument required
3634 # The diagnosis changed in icc 8.0:
3635 # icc: Command line remark: option '-MP' not supported
3636 if (grep 'ignoring option' conftest.err ||
3637 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3638 am_cv_CC_dependencies_compiler_type=$depmode
3639 echo "$as_me:$LINENO: success" >&5
3640 break
3641 fi
3642 fi
3643 echo "$as_me:$LINENO: failure, diagnostics are:" >&5
3644 sed -e 's/^/| /' < conftest.err >&5
3645 done
3646
3647 cd ..
3648 rm -rf conftest.dir
3649else
3650 am_cv_CC_dependencies_compiler_type=none
3651fi
3652
3653fi
3654echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3655echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
3656if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
3657then { { echo "$as_me:$LINENO: error: no usable dependency style found" >&5
3658echo "$as_me: error: no usable dependency style found" >&2;}
3659 { (exit 1); exit 1; }; }
3660else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3661
3662fi
3663
3664
3665# Check for the 'make' the user wants to use.
3666for ac_prog in make
3667do
3668 # Extract the first word of "$ac_prog", so it can be a program name with args.
3669set dummy $ac_prog; ac_word=$2
3670echo "$as_me:$LINENO: checking for $ac_word" >&5
3671echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3672if test "${ac_cv_prog_MAKE+set}" = set; then
3673 echo $ECHO_N "(cached) $ECHO_C" >&6
3674else
3675 if test -n "$MAKE"; then
3676 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
3677else
3678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3679for as_dir in $PATH
3680do
3681 IFS=$as_save_IFS
3682 test -z "$as_dir" && as_dir=.
3683 for ac_exec_ext in '' $ac_executable_extensions; do
3684 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3685 ac_cv_prog_MAKE="$ac_prog"
3686 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3687 break 2
3688 fi
3689done
3690done
3691
3692fi
3693fi
3694MAKE=$ac_cv_prog_MAKE
3695if test -n "$MAKE"; then
3696 echo "$as_me:$LINENO: result: $MAKE" >&5
3697echo "${ECHO_T}$MAKE" >&6
3698else
3699 echo "$as_me:$LINENO: result: no" >&5
3700echo "${ECHO_T}no" >&6
3701fi
3702
3703 test -n "$MAKE" && break
3704done
3705
3706MAKE_IS_GNU=
3707case "`$MAKE --version 2>&1 | sed 1q`" in
3708 *GNU*)
3709 MAKE_IS_GNU=yes
3710 ;;
3711esac
3712
3713
3714if test "$MAKE_IS_GNU" = yes; then
3715 GMAKE_TRUE=
3716 GMAKE_FALSE='#'
3717else
3718 GMAKE_TRUE='#'
3719 GMAKE_FALSE=
3720fi
3721
3722echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3723echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3724set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3725if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3726 echo $ECHO_N "(cached) $ECHO_C" >&6
3727else
3728 cat >conftest.make <<\_ACEOF
3729all:
3730 @echo 'ac_maketemp="$(MAKE)"'
3731_ACEOF
3732# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3733eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3734if test -n "$ac_maketemp"; then
3735 eval ac_cv_prog_make_${ac_make}_set=yes
3736else
3737 eval ac_cv_prog_make_${ac_make}_set=no
3738fi
3739rm -f conftest.make
3740fi
3741if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3742 echo "$as_me:$LINENO: result: yes" >&5
3743echo "${ECHO_T}yes" >&6
3744 SET_MAKE=
3745else
3746 echo "$as_me:$LINENO: result: no" >&5
3747echo "${ECHO_T}no" >&6
3748 SET_MAKE="MAKE=${MAKE-make}"
3749fi
3750
3751
783e057b
DJ
3752
3753CONFIG_OBS=
3754CONFIG_DEPS=
3755CONFIG_SRCS=
3756ENABLE_CFLAGS=
3757
3758CONFIG_ALL=
3759CONFIG_CLEAN=
3760CONFIG_INSTALL=
3761CONFIG_UNINSTALL=
3762
3763# If we haven't got the data from the intl directory,
3764# assume NLS is disabled.
3765USE_NLS=no
3766LIBINTL=
3767LIBINTL_DEP=
3768INCINTL=
3769XGETTEXT=
3770GMSGFMT=
3771POSUB=
3772
3773if test -f ../intl/config.intl; then
3774 . ../intl/config.intl
3775fi
3776echo "$as_me:$LINENO: checking whether NLS is requested" >&5
3777echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
3778if test x"$USE_NLS" != xyes; then
3779 echo "$as_me:$LINENO: result: no" >&5
3780echo "${ECHO_T}no" >&6
3781else
3782 echo "$as_me:$LINENO: result: yes" >&5
3783echo "${ECHO_T}yes" >&6
3784
3785cat >>confdefs.h <<\_ACEOF
3786#define ENABLE_NLS 1
3787_ACEOF
3788
3789
3790 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
3791echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
3792 # Look for .po and .gmo files in the source directory.
3793 CATALOGS=
3794 XLINGUAS=
3795 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
3796 # If there aren't any .gmo files the shell will give us the
3797 # literal string "../path/to/srcdir/po/*.gmo" which has to be
3798 # weeded out.
3799 case "$cat" in *\**)
3800 continue;;
3801 esac
3802 # The quadruple backslash is collapsed to a double backslash
3803 # by the backticks, then collapsed again by the double quotes,
3804 # leaving us with one backslash in the sed expression (right
3805 # before the dot that mustn't act as a wildcard).
3806 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
3807 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
3808 # The user is allowed to set LINGUAS to a list of languages to
3809 # install catalogs for. If it's empty that means "all of them."
3810 if test "x$LINGUAS" = x; then
3811 CATALOGS="$CATALOGS $cat"
3812 XLINGUAS="$XLINGUAS $lang"
3813 else
3814 case "$LINGUAS" in *$lang*)
3815 CATALOGS="$CATALOGS $cat"
3816 XLINGUAS="$XLINGUAS $lang"
3817 ;;
3818 esac
3819 fi
3820 done
3821 LINGUAS="$XLINGUAS"
3822 echo "$as_me:$LINENO: result: $LINGUAS" >&5
3823echo "${ECHO_T}$LINGUAS" >&6
3824
3825
3826 DATADIRNAME=share
3827
3828 INSTOBJEXT=.mo
3829
3830 GENCAT=gencat
3831
3832 CATOBJEXT=.gmo
3833
3834fi
3835
3836localedir='${datadir}/locale'
3837
3838
3839if test x"$USE_NLS" = xyes; then
3840 CONFIG_ALL="$CONFIG_ALL all-po"
3841 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
3842 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
3843 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
3844fi
3845
3846
3847 GNULIB_MEMMEM=0;
3848 GNULIB_MEMPCPY=0;
3849 GNULIB_MEMRCHR=0;
3850 GNULIB_STPCPY=0;
3851 GNULIB_STPNCPY=0;
3852 GNULIB_STRCHRNUL=0;
3853 GNULIB_STRDUP=0;
3854 GNULIB_STRNDUP=0;
3855 GNULIB_STRNLEN=0;
3856 GNULIB_STRPBRK=0;
3857 GNULIB_STRSEP=0;
3858 GNULIB_STRSTR=0;
3859 GNULIB_STRCASESTR=0;
3860 GNULIB_STRTOK_R=0;
3861 GNULIB_MBSLEN=0;
3862 GNULIB_MBSNLEN=0;
3863 GNULIB_MBSCHR=0;
3864 GNULIB_MBSRCHR=0;
3865 GNULIB_MBSSTR=0;
3866 GNULIB_MBSCASECMP=0;
3867 GNULIB_MBSNCASECMP=0;
3868 GNULIB_MBSPCASECMP=0;
3869 GNULIB_MBSCASESTR=0;
3870 GNULIB_MBSCSPN=0;
3871 GNULIB_MBSPBRK=0;
3872 GNULIB_MBSSPN=0;
3873 GNULIB_MBSSEP=0;
3874 GNULIB_MBSTOK_R=0;
3875 GNULIB_STRERROR=0;
3876 GNULIB_STRSIGNAL=0;
3877 HAVE_DECL_MEMMEM=1;
3878 HAVE_MEMPCPY=1;
3879 HAVE_DECL_MEMRCHR=1;
3880 HAVE_STPCPY=1;
3881 HAVE_STPNCPY=1;
3882 HAVE_STRCHRNUL=1;
3883 HAVE_DECL_STRDUP=1;
3884 HAVE_STRNDUP=1;
3885 HAVE_DECL_STRNDUP=1;
3886 HAVE_DECL_STRNLEN=1;
3887 HAVE_STRPBRK=1;
3888 HAVE_STRSEP=1;
3889 HAVE_STRCASESTR=1;
3890 HAVE_DECL_STRTOK_R=1;
3891 HAVE_DECL_STRERROR=1;
3892 HAVE_DECL_STRSIGNAL=1;
3893 REPLACE_STRERROR=0;
3894 REPLACE_STRSIGNAL=0;
3895 REPLACE_MEMMEM=0;
3896 REPLACE_STRCASESTR=0;
3897 REPLACE_STRSTR=0;
3898
3899
3900 echo "$as_me:$LINENO: checking whether memmem is declared" >&5
3901echo $ECHO_N "checking whether memmem is declared... $ECHO_C" >&6
3902if test "${ac_cv_have_decl_memmem+set}" = set; then
3903 echo $ECHO_N "(cached) $ECHO_C" >&6
3904else
3905 cat >conftest.$ac_ext <<_ACEOF
3906/* confdefs.h. */
3907_ACEOF
3908cat confdefs.h >>conftest.$ac_ext
3909cat >>conftest.$ac_ext <<_ACEOF
3910/* end confdefs.h. */
3911$ac_includes_default
3912int
3913main ()
3914{
3915#ifndef memmem
3916 char *p = (char *) memmem;
3917#endif
3918
3919 ;
3920 return 0;
3921}
3922_ACEOF
3923rm -f conftest.$ac_objext
3924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3925 (eval $ac_compile) 2>conftest.er1
3926 ac_status=$?
3927 grep -v '^ *+' conftest.er1 >conftest.err
3928 rm -f conftest.er1
3929 cat conftest.err >&5
3930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3931 (exit $ac_status); } &&
3932 { ac_try='test -z "$ac_c_werror_flag"
3933 || test ! -s conftest.err'
3934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3935 (eval $ac_try) 2>&5
3936 ac_status=$?
3937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3938 (exit $ac_status); }; } &&
3939 { ac_try='test -s conftest.$ac_objext'
3940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3941 (eval $ac_try) 2>&5
3942 ac_status=$?
3943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3944 (exit $ac_status); }; }; then
3945 ac_cv_have_decl_memmem=yes
3946else
3947 echo "$as_me: failed program was:" >&5
3948sed 's/^/| /' conftest.$ac_ext >&5
3949
3950ac_cv_have_decl_memmem=no
3951fi
3952rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3953fi
3954echo "$as_me:$LINENO: result: $ac_cv_have_decl_memmem" >&5
3955echo "${ECHO_T}$ac_cv_have_decl_memmem" >&6
3956if test $ac_cv_have_decl_memmem = yes; then
3957
3958cat >>confdefs.h <<_ACEOF
3959#define HAVE_DECL_MEMMEM 1
3960_ACEOF
3961
3962
3963else
3964 cat >>confdefs.h <<_ACEOF
3965#define HAVE_DECL_MEMMEM 0
3966_ACEOF
3967
3968
3969fi
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985for ac_func in memmem
3986do
3987as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3988echo "$as_me:$LINENO: checking for $ac_func" >&5
3989echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3990if eval "test \"\${$as_ac_var+set}\" = set"; then
3991 echo $ECHO_N "(cached) $ECHO_C" >&6
3992else
3993 cat >conftest.$ac_ext <<_ACEOF
3994/* confdefs.h. */
3995_ACEOF
3996cat confdefs.h >>conftest.$ac_ext
3997cat >>conftest.$ac_ext <<_ACEOF
3998/* end confdefs.h. */
3999/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4000 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4001#define $ac_func innocuous_$ac_func
4002
4003/* System header to define __stub macros and hopefully few prototypes,
4004 which can conflict with char $ac_func (); below.
4005 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4006 <limits.h> exists even on freestanding compilers. */
4007
4008#ifdef __STDC__
4009# include <limits.h>
4010#else
4011# include <assert.h>
4012#endif
4013
4014#undef $ac_func
4015
4016/* Override any gcc2 internal prototype to avoid an error. */
4017#ifdef __cplusplus
4018extern "C"
4019{
4020#endif
4021/* We use char because int might match the return type of a gcc2
4022 builtin and then its argument prototype would still apply. */
4023char $ac_func ();
4024/* The GNU C library defines this for functions which it implements
4025 to always fail with ENOSYS. Some functions are actually named
4026 something starting with __ and the normal name is an alias. */
4027#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4028choke me
4029#else
4030char (*f) () = $ac_func;
4031#endif
4032#ifdef __cplusplus
4033}
4034#endif
4035
4036int
4037main ()
4038{
4039return f != $ac_func;
4040 ;
4041 return 0;
4042}
4043_ACEOF
4044rm -f conftest.$ac_objext conftest$ac_exeext
4045if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4046 (eval $ac_link) 2>conftest.er1
4047 ac_status=$?
4048 grep -v '^ *+' conftest.er1 >conftest.err
4049 rm -f conftest.er1
4050 cat conftest.err >&5
4051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4052 (exit $ac_status); } &&
4053 { ac_try='test -z "$ac_c_werror_flag"
4054 || test ! -s conftest.err'
4055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4056 (eval $ac_try) 2>&5
4057 ac_status=$?
4058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4059 (exit $ac_status); }; } &&
4060 { ac_try='test -s conftest$ac_exeext'
4061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4062 (eval $ac_try) 2>&5
4063 ac_status=$?
4064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4065 (exit $ac_status); }; }; then
4066 eval "$as_ac_var=yes"
4067else
4068 echo "$as_me: failed program was:" >&5
4069sed 's/^/| /' conftest.$ac_ext >&5
4070
4071eval "$as_ac_var=no"
4072fi
4073rm -f conftest.err conftest.$ac_objext \
4074 conftest$ac_exeext conftest.$ac_ext
4075fi
4076echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4077echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4078if test `eval echo '${'$as_ac_var'}'` = yes; then
4079 cat >>confdefs.h <<_ACEOF
4080#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4081_ACEOF
4082
4083else
4084
4085 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4086
4087fi
4088done
4089
4090
4091
4092 :
4093
4094
4095
4096
4097
4098 if test $ac_cv_have_decl_memmem = no; then
4099 HAVE_DECL_MEMMEM=0
4100 fi
4101 :
4102
4103
4104 echo "$as_me:$LINENO: checking for long long int" >&5
4105echo $ECHO_N "checking for long long int... $ECHO_C" >&6
4106if test "${ac_cv_type_long_long_int+set}" = set; then
4107 echo $ECHO_N "(cached) $ECHO_C" >&6
4108else
4109 cat >conftest.$ac_ext <<_ACEOF
4110
4111 /* confdefs.h. */
4112_ACEOF
4113cat confdefs.h >>conftest.$ac_ext
4114cat >>conftest.$ac_ext <<_ACEOF
4115/* end confdefs.h. */
4116/* For now, do not test the preprocessor; as of 2007 there are too many
4117 implementations with broken preprocessors. Perhaps this can
4118 be revisited in 2012. In the meantime, code should not expect
4119 #if to work with literals wider than 32 bits. */
4120 /* Test literals. */
4121 long long int ll = 9223372036854775807ll;
4122 long long int nll = -9223372036854775807LL;
4123 unsigned long long int ull = 18446744073709551615ULL;
4124 /* Test constant expressions. */
4125 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4126 ? 1 : -1)];
4127 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4128 ? 1 : -1)];
4129 int i = 63;
4130int
4131main ()
4132{
4133/* Test availability of runtime routines for shift and division. */
4134 long long int llmax = 9223372036854775807ll;
4135 unsigned long long int ullmax = 18446744073709551615ull;
4136 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4137 | (llmax / ll) | (llmax % ll)
4138 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4139 | (ullmax / ull) | (ullmax % ull));
4140 ;
4141 return 0;
4142}
4143
4144_ACEOF
4145rm -f conftest.$ac_objext conftest$ac_exeext
4146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4147 (eval $ac_link) 2>conftest.er1
4148 ac_status=$?
4149 grep -v '^ *+' conftest.er1 >conftest.err
4150 rm -f conftest.er1
4151 cat conftest.err >&5
4152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4153 (exit $ac_status); } &&
4154 { ac_try='test -z "$ac_c_werror_flag"
4155 || test ! -s conftest.err'
4156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4157 (eval $ac_try) 2>&5
4158 ac_status=$?
4159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4160 (exit $ac_status); }; } &&
4161 { ac_try='test -s conftest$ac_exeext'
4162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4163 (eval $ac_try) 2>&5
4164 ac_status=$?
4165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4166 (exit $ac_status); }; }; then
4167 if test "$cross_compiling" = yes; then
4168 ac_cv_type_long_long_int=yes
4169else
4170 cat >conftest.$ac_ext <<_ACEOF
4171/* confdefs.h. */
4172_ACEOF
4173cat confdefs.h >>conftest.$ac_ext
4174cat >>conftest.$ac_ext <<_ACEOF
4175/* end confdefs.h. */
4176#include <limits.h>
4177 #ifndef LLONG_MAX
4178 # define HALF \
4179 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4180 # define LLONG_MAX (HALF - 1 + HALF)
4181 #endif
4182int
4183main ()
4184{
4185long long int n = 1;
4186 int i;
4187 for (i = 0; ; i++)
4188 {
4189 long long int m = n << i;
4190 if (m >> i != n)
4191 return 1;
4192 if (LLONG_MAX / 2 < m)
4193 break;
4194 }
4195 return 0;
4196 ;
4197 return 0;
4198}
4199_ACEOF
4200rm -f conftest$ac_exeext
4201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4202 (eval $ac_link) 2>&5
4203 ac_status=$?
4204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4205 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4207 (eval $ac_try) 2>&5
4208 ac_status=$?
4209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4210 (exit $ac_status); }; }; then
4211 ac_cv_type_long_long_int=yes
4212else
4213 echo "$as_me: program exited with status $ac_status" >&5
4214echo "$as_me: failed program was:" >&5
4215sed 's/^/| /' conftest.$ac_ext >&5
4216
4217( exit $ac_status )
4218ac_cv_type_long_long_int=no
4219fi
4220rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4221fi
4222else
4223 echo "$as_me: failed program was:" >&5
4224sed 's/^/| /' conftest.$ac_ext >&5
4225
4226ac_cv_type_long_long_int=no
4227fi
4228rm -f conftest.err conftest.$ac_objext \
4229 conftest$ac_exeext conftest.$ac_ext
4230fi
4231echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
4232echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
4233 if test $ac_cv_type_long_long_int = yes; then
4234
4235cat >>confdefs.h <<\_ACEOF
4236#define HAVE_LONG_LONG_INT 1
4237_ACEOF
4238
4239 fi
4240
4241
4242 echo "$as_me:$LINENO: checking for unsigned long long int" >&5
4243echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6
4244if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
4245 echo $ECHO_N "(cached) $ECHO_C" >&6
4246else
4247 cat >conftest.$ac_ext <<_ACEOF
4248
4249 /* confdefs.h. */
4250_ACEOF
4251cat confdefs.h >>conftest.$ac_ext
4252cat >>conftest.$ac_ext <<_ACEOF
4253/* end confdefs.h. */
4254/* For now, do not test the preprocessor; as of 2007 there are too many
4255 implementations with broken preprocessors. Perhaps this can
4256 be revisited in 2012. In the meantime, code should not expect
4257 #if to work with literals wider than 32 bits. */
4258 /* Test literals. */
4259 long long int ll = 9223372036854775807ll;
4260 long long int nll = -9223372036854775807LL;
4261 unsigned long long int ull = 18446744073709551615ULL;
4262 /* Test constant expressions. */
4263 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4264 ? 1 : -1)];
4265 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4266 ? 1 : -1)];
4267 int i = 63;
4268int
4269main ()
4270{
4271/* Test availability of runtime routines for shift and division. */
4272 long long int llmax = 9223372036854775807ll;
4273 unsigned long long int ullmax = 18446744073709551615ull;
4274 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4275 | (llmax / ll) | (llmax % ll)
4276 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4277 | (ullmax / ull) | (ullmax % ull));
4278 ;
4279 return 0;
4280}
4281
4282_ACEOF
4283rm -f conftest.$ac_objext conftest$ac_exeext
4284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4285 (eval $ac_link) 2>conftest.er1
4286 ac_status=$?
4287 grep -v '^ *+' conftest.er1 >conftest.err
4288 rm -f conftest.er1
4289 cat conftest.err >&5
4290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4291 (exit $ac_status); } &&
4292 { ac_try='test -z "$ac_c_werror_flag"
4293 || test ! -s conftest.err'
4294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4295 (eval $ac_try) 2>&5
4296 ac_status=$?
4297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4298 (exit $ac_status); }; } &&
4299 { ac_try='test -s conftest$ac_exeext'
4300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4301 (eval $ac_try) 2>&5
4302 ac_status=$?
4303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4304 (exit $ac_status); }; }; then
4305 ac_cv_type_unsigned_long_long_int=yes
4306else
4307 echo "$as_me: failed program was:" >&5
4308sed 's/^/| /' conftest.$ac_ext >&5
4309
4310ac_cv_type_unsigned_long_long_int=no
4311fi
4312rm -f conftest.err conftest.$ac_objext \
4313 conftest$ac_exeext conftest.$ac_ext
4314fi
4315echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
4316echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6
4317 if test $ac_cv_type_unsigned_long_long_int = yes; then
4318
4319cat >>confdefs.h <<\_ACEOF
4320#define HAVE_UNSIGNED_LONG_LONG_INT 1
4321_ACEOF
4322
4323 fi
4324
4325
4326
4327 echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5
4328echo $ECHO_N "checking whether the preprocessor supports include_next... $ECHO_C" >&6
4329if test "${gl_cv_have_include_next+set}" = set; then
4330 echo $ECHO_N "(cached) $ECHO_C" >&6
4331else
4332 rm -rf conftestd1 conftestd2
4333 mkdir conftestd1 conftestd2
4334 cat <<EOF > conftestd1/conftest.h
4335#define DEFINED_IN_CONFTESTD1
4336#include_next <conftest.h>
4337#ifdef DEFINED_IN_CONFTESTD2
4338int foo;
4339#else
4340#error "include_next doesn't work"
4341#endif
4342EOF
4343 cat <<EOF > conftestd2/conftest.h
4344#ifndef DEFINED_IN_CONFTESTD1
4345#error "include_next test doesn't work"
4346#endif
4347#define DEFINED_IN_CONFTESTD2
4348EOF
4349 save_CPPFLAGS="$CPPFLAGS"
4350 CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
4351 cat >conftest.$ac_ext <<_ACEOF
4352#include <conftest.h>
4353_ACEOF
4354rm -f conftest.$ac_objext
4355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4356 (eval $ac_compile) 2>conftest.er1
4357 ac_status=$?
4358 grep -v '^ *+' conftest.er1 >conftest.err
4359 rm -f conftest.er1
4360 cat conftest.err >&5
4361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4362 (exit $ac_status); } &&
4363 { ac_try='test -z "$ac_c_werror_flag"
4364 || test ! -s conftest.err'
4365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4366 (eval $ac_try) 2>&5
4367 ac_status=$?
4368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4369 (exit $ac_status); }; } &&
4370 { ac_try='test -s conftest.$ac_objext'
4371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4372 (eval $ac_try) 2>&5
4373 ac_status=$?
4374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4375 (exit $ac_status); }; }; then
4376 gl_cv_have_include_next=yes
4377else
4378 echo "$as_me: failed program was:" >&5
4379sed 's/^/| /' conftest.$ac_ext >&5
4380
4381gl_cv_have_include_next=no
4382fi
4383rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4384 CPPFLAGS="$save_CPPFLAGS"
4385 rm -rf conftestd1 conftestd2
4386
4387fi
4388echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5
4389echo "${ECHO_T}$gl_cv_have_include_next" >&6
4390 if test $gl_cv_have_include_next = yes; then
4391
4392
4393cat >>confdefs.h <<\_ACEOF
4394#define HAVE_INCLUDE_NEXT 1
4395_ACEOF
4396
4397
4398 INCLUDE_NEXT=include_next
4399 else
4400 INCLUDE_NEXT=include
4401 fi
4402
4403
4404
4405
4406
4407
4408
4409for ac_header in $gl_header_list
4410do
4411as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4412if eval "test \"\${$as_ac_Header+set}\" = set"; then
4413 echo "$as_me:$LINENO: checking for $ac_header" >&5
4414echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4415if eval "test \"\${$as_ac_Header+set}\" = set"; then
4416 echo $ECHO_N "(cached) $ECHO_C" >&6
4417fi
4418echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4419echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4420else
4421 # Is the header compilable?
4422echo "$as_me:$LINENO: checking $ac_header usability" >&5
4423echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4424cat >conftest.$ac_ext <<_ACEOF
4425/* confdefs.h. */
4426_ACEOF
4427cat confdefs.h >>conftest.$ac_ext
4428cat >>conftest.$ac_ext <<_ACEOF
4429/* end confdefs.h. */
4430$ac_includes_default
4431#include <$ac_header>
4432_ACEOF
4433rm -f conftest.$ac_objext
4434if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4435 (eval $ac_compile) 2>conftest.er1
4436 ac_status=$?
4437 grep -v '^ *+' conftest.er1 >conftest.err
4438 rm -f conftest.er1
4439 cat conftest.err >&5
4440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4441 (exit $ac_status); } &&
4442 { ac_try='test -z "$ac_c_werror_flag"
4443 || test ! -s conftest.err'
4444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4445 (eval $ac_try) 2>&5
4446 ac_status=$?
4447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4448 (exit $ac_status); }; } &&
4449 { ac_try='test -s conftest.$ac_objext'
4450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4451 (eval $ac_try) 2>&5
4452 ac_status=$?
4453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4454 (exit $ac_status); }; }; then
4455 ac_header_compiler=yes
4456else
4457 echo "$as_me: failed program was:" >&5
4458sed 's/^/| /' conftest.$ac_ext >&5
4459
4460ac_header_compiler=no
4461fi
4462rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4463echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4464echo "${ECHO_T}$ac_header_compiler" >&6
4465
4466# Is the header present?
4467echo "$as_me:$LINENO: checking $ac_header presence" >&5
4468echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4469cat >conftest.$ac_ext <<_ACEOF
4470/* confdefs.h. */
4471_ACEOF
4472cat confdefs.h >>conftest.$ac_ext
4473cat >>conftest.$ac_ext <<_ACEOF
4474/* end confdefs.h. */
4475#include <$ac_header>
4476_ACEOF
4477if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4478 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4479 ac_status=$?
4480 grep -v '^ *+' conftest.er1 >conftest.err
4481 rm -f conftest.er1
4482 cat conftest.err >&5
4483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484 (exit $ac_status); } >/dev/null; then
4485 if test -s conftest.err; then
4486 ac_cpp_err=$ac_c_preproc_warn_flag
4487 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4488 else
4489 ac_cpp_err=
4490 fi
4491else
4492 ac_cpp_err=yes
4493fi
4494if test -z "$ac_cpp_err"; then
4495 ac_header_preproc=yes
4496else
4497 echo "$as_me: failed program was:" >&5
4498sed 's/^/| /' conftest.$ac_ext >&5
4499
4500 ac_header_preproc=no
4501fi
4502rm -f conftest.err conftest.$ac_ext
4503echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4504echo "${ECHO_T}$ac_header_preproc" >&6
4505
4506# So? What about this header?
4507case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4508 yes:no: )
4509 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4510echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4511 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4512echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4513 ac_header_preproc=yes
4514 ;;
4515 no:yes:* )
4516 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4517echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4518 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4519echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4520 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4521echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4522 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4523echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4524 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4525echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4526 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4527echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4528 (
4529 cat <<\_ASBOX
4530## ------------------------------------------ ##
4531## Report this to the AC_PACKAGE_NAME lists. ##
4532## ------------------------------------------ ##
4533_ASBOX
4534 ) |
4535 sed "s/^/$as_me: WARNING: /" >&2
4536 ;;
4537esac
4538echo "$as_me:$LINENO: checking for $ac_header" >&5
4539echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4540if eval "test \"\${$as_ac_Header+set}\" = set"; then
4541 echo $ECHO_N "(cached) $ECHO_C" >&6
4542else
4543 eval "$as_ac_Header=\$ac_header_preproc"
4544fi
4545echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4546echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4547
4548fi
4549if test `eval echo '${'$as_ac_Header'}'` = yes; then
4550 cat >>confdefs.h <<_ACEOF
4551#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4552_ACEOF
4553
4554fi
4555
4556done
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
4570echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6
4571if test "${ac_cv_c_restrict+set}" = set; then
4572 echo $ECHO_N "(cached) $ECHO_C" >&6
4573else
4574 ac_cv_c_restrict=no
4575 # The order here caters to the fact that C++ does not require restrict.
4576 for ac_kw in __restrict __restrict__ _Restrict restrict; do
4577 cat >conftest.$ac_ext <<_ACEOF
4578/* confdefs.h. */
4579_ACEOF
4580cat confdefs.h >>conftest.$ac_ext
4581cat >>conftest.$ac_ext <<_ACEOF
4582/* end confdefs.h. */
4583typedef int * int_ptr;
4584 int foo (int_ptr $ac_kw ip) {
4585 return ip[0];
4586 }
4587int
4588main ()
4589{
4590int s[1];
4591 int * $ac_kw t = s;
4592 t[0] = 0;
4593 return foo(t)
4594 ;
4595 return 0;
4596}
4597_ACEOF
4598rm -f conftest.$ac_objext
4599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4600 (eval $ac_compile) 2>conftest.er1
4601 ac_status=$?
4602 grep -v '^ *+' conftest.er1 >conftest.err
4603 rm -f conftest.er1
4604 cat conftest.err >&5
4605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4606 (exit $ac_status); } &&
4607 { ac_try='test -z "$ac_c_werror_flag"
4608 || test ! -s conftest.err'
4609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4610 (eval $ac_try) 2>&5
4611 ac_status=$?
4612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4613 (exit $ac_status); }; } &&
4614 { ac_try='test -s conftest.$ac_objext'
4615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4616 (eval $ac_try) 2>&5
4617 ac_status=$?
4618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4619 (exit $ac_status); }; }; then
4620 ac_cv_c_restrict=$ac_kw
4621else
4622 echo "$as_me: failed program was:" >&5
4623sed 's/^/| /' conftest.$ac_ext >&5
4624
4625fi
4626rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4627 test "$ac_cv_c_restrict" != no && break
4628 done
4629
4630fi
4631echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5
4632echo "${ECHO_T}$ac_cv_c_restrict" >&6
4633
4634
4635 case $ac_cv_c_restrict in
4636 restrict) ;;
4637 no) cat >>confdefs.h <<\_ACEOF
4638#define restrict
4639_ACEOF
4640 ;;
4641 *) cat >>confdefs.h <<_ACEOF
4642#define restrict $ac_cv_c_restrict
4643_ACEOF
4644 ;;
4645 esac
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659 :
4660
4661
4662
4663
4664
4665
4666
4667 if test $gl_cv_have_include_next = yes; then
4668 gl_cv_next_string_h='<'string.h'>'
4669 else
4670 echo "$as_me:$LINENO: checking absolute name of <string.h>" >&5
4671echo $ECHO_N "checking absolute name of <string.h>... $ECHO_C" >&6
4672if test "${gl_cv_next_string_h+set}" = set; then
4673 echo $ECHO_N "(cached) $ECHO_C" >&6
4674else
4675
4676 if test $ac_cv_header_string_h = yes; then
4677 cat >conftest.$ac_ext <<_ACEOF
4678/* confdefs.h. */
4679_ACEOF
4680cat confdefs.h >>conftest.$ac_ext
4681cat >>conftest.$ac_ext <<_ACEOF
4682/* end confdefs.h. */
4683#include <string.h>
4684
4685_ACEOF
4686 gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4687 sed -n '\#/string.h#{
4688 s#.*"\(.*/string.h\)".*#\1#
4689 s#^/[^/]#//&#
4690 p
4691 q
4692 }'`'"'
4693 else
4694 gl_cv_next_string_h='<'string.h'>'
4695 fi
4696
4697fi
4698echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5
4699echo "${ECHO_T}$gl_cv_next_string_h" >&6
4700 fi
4701 NEXT_STRING_H=$gl_cv_next_string_h
4702
4703
4704
4705
4706
4707 GNULIB_WCWIDTH=0;
4708 HAVE_DECL_WCWIDTH=1;
4709 REPLACE_WCWIDTH=0;
4710 WCHAR_H=
4711
4712
4713
4714
4715
4716if false; then
4717 GL_COND_LIBTOOL_TRUE=
4718 GL_COND_LIBTOOL_FALSE='#'
4719else
4720 GL_COND_LIBTOOL_TRUE='#'
4721 GL_COND_LIBTOOL_FALSE=
4722fi
4723
4724 gl_cond_libtool=false
4725 gl_libdeps=
4726 gl_ltlibdeps=
4727
4728
4729
4730 gl_source_base='gnulib'
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740for ac_func in memchr
4741do
4742as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4743echo "$as_me:$LINENO: checking for $ac_func" >&5
4744echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4745if eval "test \"\${$as_ac_var+set}\" = set"; then
4746 echo $ECHO_N "(cached) $ECHO_C" >&6
4747else
4748 cat >conftest.$ac_ext <<_ACEOF
4749/* confdefs.h. */
4750_ACEOF
4751cat confdefs.h >>conftest.$ac_ext
4752cat >>conftest.$ac_ext <<_ACEOF
4753/* end confdefs.h. */
4754/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4755 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4756#define $ac_func innocuous_$ac_func
4757
4758/* System header to define __stub macros and hopefully few prototypes,
4759 which can conflict with char $ac_func (); below.
4760 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4761 <limits.h> exists even on freestanding compilers. */
4762
4763#ifdef __STDC__
4764# include <limits.h>
4765#else
4766# include <assert.h>
4767#endif
4768
4769#undef $ac_func
4770
4771/* Override any gcc2 internal prototype to avoid an error. */
4772#ifdef __cplusplus
4773extern "C"
4774{
4775#endif
4776/* We use char because int might match the return type of a gcc2
4777 builtin and then its argument prototype would still apply. */
4778char $ac_func ();
4779/* The GNU C library defines this for functions which it implements
4780 to always fail with ENOSYS. Some functions are actually named
4781 something starting with __ and the normal name is an alias. */
4782#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4783choke me
4784#else
4785char (*f) () = $ac_func;
4786#endif
4787#ifdef __cplusplus
4788}
4789#endif
4790
4791int
4792main ()
4793{
4794return f != $ac_func;
4795 ;
4796 return 0;
4797}
4798_ACEOF
4799rm -f conftest.$ac_objext conftest$ac_exeext
4800if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4801 (eval $ac_link) 2>conftest.er1
4802 ac_status=$?
4803 grep -v '^ *+' conftest.er1 >conftest.err
4804 rm -f conftest.er1
4805 cat conftest.err >&5
4806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4807 (exit $ac_status); } &&
4808 { ac_try='test -z "$ac_c_werror_flag"
4809 || test ! -s conftest.err'
4810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4811 (eval $ac_try) 2>&5
4812 ac_status=$?
4813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4814 (exit $ac_status); }; } &&
4815 { ac_try='test -s conftest$ac_exeext'
4816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4817 (eval $ac_try) 2>&5
4818 ac_status=$?
4819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4820 (exit $ac_status); }; }; then
4821 eval "$as_ac_var=yes"
4822else
4823 echo "$as_me: failed program was:" >&5
4824sed 's/^/| /' conftest.$ac_ext >&5
4825
4826eval "$as_ac_var=no"
4827fi
4828rm -f conftest.err conftest.$ac_objext \
4829 conftest$ac_exeext conftest.$ac_ext
4830fi
4831echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4832echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4833if test `eval echo '${'$as_ac_var'}'` = yes; then
4834 cat >>confdefs.h <<_ACEOF
4835#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4836_ACEOF
4837
4838else
4839
4840 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4841
4842fi
4843done
4844
4845
4846 if test $ac_cv_func_memchr = no; then
4847
4848
4849for ac_header in bp-sym.h
4850do
4851as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4852if eval "test \"\${$as_ac_Header+set}\" = set"; then
4853 echo "$as_me:$LINENO: checking for $ac_header" >&5
4854echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4855if eval "test \"\${$as_ac_Header+set}\" = set"; then
4856 echo $ECHO_N "(cached) $ECHO_C" >&6
4857fi
4858echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4859echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4860else
4861 # Is the header compilable?
4862echo "$as_me:$LINENO: checking $ac_header usability" >&5
4863echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4864cat >conftest.$ac_ext <<_ACEOF
4865/* confdefs.h. */
4866_ACEOF
4867cat confdefs.h >>conftest.$ac_ext
4868cat >>conftest.$ac_ext <<_ACEOF
4869/* end confdefs.h. */
4870$ac_includes_default
4871#include <$ac_header>
4872_ACEOF
4873rm -f conftest.$ac_objext
4874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4875 (eval $ac_compile) 2>conftest.er1
4876 ac_status=$?
4877 grep -v '^ *+' conftest.er1 >conftest.err
4878 rm -f conftest.er1
4879 cat conftest.err >&5
4880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4881 (exit $ac_status); } &&
4882 { ac_try='test -z "$ac_c_werror_flag"
4883 || test ! -s conftest.err'
4884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4885 (eval $ac_try) 2>&5
4886 ac_status=$?
4887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4888 (exit $ac_status); }; } &&
4889 { ac_try='test -s conftest.$ac_objext'
4890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4891 (eval $ac_try) 2>&5
4892 ac_status=$?
4893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4894 (exit $ac_status); }; }; then
4895 ac_header_compiler=yes
4896else
4897 echo "$as_me: failed program was:" >&5
4898sed 's/^/| /' conftest.$ac_ext >&5
4899
4900ac_header_compiler=no
4901fi
4902rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4903echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4904echo "${ECHO_T}$ac_header_compiler" >&6
4905
4906# Is the header present?
4907echo "$as_me:$LINENO: checking $ac_header presence" >&5
4908echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4909cat >conftest.$ac_ext <<_ACEOF
4910/* confdefs.h. */
4911_ACEOF
4912cat confdefs.h >>conftest.$ac_ext
4913cat >>conftest.$ac_ext <<_ACEOF
4914/* end confdefs.h. */
4915#include <$ac_header>
4916_ACEOF
4917if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4918 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4919 ac_status=$?
4920 grep -v '^ *+' conftest.er1 >conftest.err
4921 rm -f conftest.er1
4922 cat conftest.err >&5
4923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4924 (exit $ac_status); } >/dev/null; then
4925 if test -s conftest.err; then
4926 ac_cpp_err=$ac_c_preproc_warn_flag
4927 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4928 else
4929 ac_cpp_err=
4930 fi
4931else
4932 ac_cpp_err=yes
4933fi
4934if test -z "$ac_cpp_err"; then
4935 ac_header_preproc=yes
4936else
4937 echo "$as_me: failed program was:" >&5
4938sed 's/^/| /' conftest.$ac_ext >&5
4939
4940 ac_header_preproc=no
4941fi
4942rm -f conftest.err conftest.$ac_ext
4943echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4944echo "${ECHO_T}$ac_header_preproc" >&6
4945
4946# So? What about this header?
4947case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4948 yes:no: )
4949 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4950echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4951 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4952echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4953 ac_header_preproc=yes
4954 ;;
4955 no:yes:* )
4956 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4957echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4958 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4959echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4960 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4961echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4962 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4963echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4964 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4965echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4966 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4967echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4968 (
4969 cat <<\_ASBOX
4970## ------------------------------------------ ##
4971## Report this to the AC_PACKAGE_NAME lists. ##
4972## ------------------------------------------ ##
4973_ASBOX
4974 ) |
4975 sed "s/^/$as_me: WARNING: /" >&2
4976 ;;
4977esac
4978echo "$as_me:$LINENO: checking for $ac_header" >&5
4979echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4980if eval "test \"\${$as_ac_Header+set}\" = set"; then
4981 echo $ECHO_N "(cached) $ECHO_C" >&6
4982else
4983 eval "$as_ac_Header=\$ac_header_preproc"
4984fi
4985echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4986echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4987
4988fi
4989if test `eval echo '${'$as_ac_Header'}'` = yes; then
4990 cat >>confdefs.h <<_ACEOF
4991#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4992_ACEOF
4993
4994fi
4995
4996done
4997
4998
4999 fi
5000
5001
5002 echo "$as_me:$LINENO: checking for working memcmp" >&5
5003echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
5004if test "${ac_cv_func_memcmp_working+set}" = set; then
5005 echo $ECHO_N "(cached) $ECHO_C" >&6
5006else
5007 if test "$cross_compiling" = yes; then
5008 ac_cv_func_memcmp_working=no
5009else
5010 cat >conftest.$ac_ext <<_ACEOF
5011/* confdefs.h. */
5012_ACEOF
5013cat confdefs.h >>conftest.$ac_ext
5014cat >>conftest.$ac_ext <<_ACEOF
5015/* end confdefs.h. */
5016$ac_includes_default
5017int
5018main ()
5019{
5020
5021 /* Some versions of memcmp are not 8-bit clean. */
5022 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
5023 if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
5024 exit (1);
5025
5026 /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
5027 or more and with at least one buffer not starting on a 4-byte boundary.
5028 William Lewis provided this test program. */
5029 {
5030 char foo[21];
5031 char bar[21];
5032 int i;
5033 for (i = 0; i < 4; i++)
5034 {
5035 char *a = foo + i;
5036 char *b = bar + i;
5037 strcpy (a, "--------01111111");
5038 strcpy (b, "--------10000000");
5039 if (memcmp (a, b, 16) >= 0)
5040 exit (1);
5041 }
5042 exit (0);
5043 }
5044
5045 ;
5046 return 0;
5047}
5048_ACEOF
5049rm -f conftest$ac_exeext
5050if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5051 (eval $ac_link) 2>&5
5052 ac_status=$?
5053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5054 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5056 (eval $ac_try) 2>&5
5057 ac_status=$?
5058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5059 (exit $ac_status); }; }; then
5060 ac_cv_func_memcmp_working=yes
5061else
5062 echo "$as_me: program exited with status $ac_status" >&5
5063echo "$as_me: failed program was:" >&5
5064sed 's/^/| /' conftest.$ac_ext >&5
5065
5066( exit $ac_status )
5067ac_cv_func_memcmp_working=no
5068fi
5069rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5070fi
5071fi
5072echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
5073echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
5074test $ac_cv_func_memcmp_working = no &&
5075
5076
5077
5078
5079
5080
5081 gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext"
5082
5083
5084 if test $ac_cv_func_memcmp_working = no; then
5085
5086cat >>confdefs.h <<\_ACEOF
5087#define memcmp rpl_memcmp
5088_ACEOF
5089
5090 :
5091 fi
5092
5093
5094
5095 if test $ac_cv_have_decl_memmem = yes; then
5096 echo "$as_me:$LINENO: checking whether memmem works in linear time" >&5
5097echo $ECHO_N "checking whether memmem works in linear time... $ECHO_C" >&6
5098if test "${gl_cv_func_memmem_works+set}" = set; then
5099 echo $ECHO_N "(cached) $ECHO_C" >&6
5100else
5101 if test "$cross_compiling" = yes; then
5102 gl_cv_func_memmem_works="guessing no"
5103else
5104 cat >conftest.$ac_ext <<_ACEOF
5105/* confdefs.h. */
5106_ACEOF
5107cat confdefs.h >>conftest.$ac_ext
5108cat >>conftest.$ac_ext <<_ACEOF
5109/* end confdefs.h. */
5110
5111#include <string.h> /* for memmem */
5112#include <stdlib.h> /* for malloc */
5113#include <unistd.h> /* for alarm */
5114
5115int
5116main ()
5117{
5118size_t m = 1000000;
5119 char *haystack = (char *) malloc (2 * m + 1);
5120 char *needle = (char *) malloc (m + 1);
5121 void *result = 0;
5122 /* Failure to compile this test due to missing alarm is okay,
5123 since all such platforms (mingw) also lack memmem. */
5124 alarm (5);
5125 /* Check for quadratic performance. */
5126 if (haystack && needle)
5127 {
5128 memset (haystack, 'A', 2 * m);
5129 haystack[2 * m] = 'B';
5130 memset (needle, 'A', m);
5131 needle[m] = 'B';
5132 result = memmem (haystack, 2 * m + 1, needle, m + 1);
5133 }
5134 /* Check for empty needle behavior. */
5135 return !result || !memmem ("a", 1, 0, 0);
5136 ;
5137 return 0;
5138}
5139_ACEOF
5140rm -f conftest$ac_exeext
5141if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5142 (eval $ac_link) 2>&5
5143 ac_status=$?
5144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5145 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5147 (eval $ac_try) 2>&5
5148 ac_status=$?
5149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5150 (exit $ac_status); }; }; then
5151 gl_cv_func_memmem_works=yes
5152else
5153 echo "$as_me: program exited with status $ac_status" >&5
5154echo "$as_me: failed program was:" >&5
5155sed 's/^/| /' conftest.$ac_ext >&5
5156
5157( exit $ac_status )
5158gl_cv_func_memmem_works=no
5159fi
5160rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5161fi
5162fi
5163echo "$as_me:$LINENO: result: $gl_cv_func_memmem_works" >&5
5164echo "${ECHO_T}$gl_cv_func_memmem_works" >&6
5165 if test "$gl_cv_func_memmem_works" != yes; then
5166 REPLACE_MEMMEM=1
5167
5168
5169
5170
5171
5172
5173
5174 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
5175
5176 fi
5177 fi
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191for ac_func in memmem
5192do
5193as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5194echo "$as_me:$LINENO: checking for $ac_func" >&5
5195echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5196if eval "test \"\${$as_ac_var+set}\" = set"; then
5197 echo $ECHO_N "(cached) $ECHO_C" >&6
5198else
5199 cat >conftest.$ac_ext <<_ACEOF
5200/* confdefs.h. */
5201_ACEOF
5202cat confdefs.h >>conftest.$ac_ext
5203cat >>conftest.$ac_ext <<_ACEOF
5204/* end confdefs.h. */
5205/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5206 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5207#define $ac_func innocuous_$ac_func
5208
5209/* System header to define __stub macros and hopefully few prototypes,
5210 which can conflict with char $ac_func (); below.
5211 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5212 <limits.h> exists even on freestanding compilers. */
5213
5214#ifdef __STDC__
5215# include <limits.h>
5216#else
5217# include <assert.h>
5218#endif
5219
5220#undef $ac_func
5221
5222/* Override any gcc2 internal prototype to avoid an error. */
5223#ifdef __cplusplus
5224extern "C"
5225{
5226#endif
5227/* We use char because int might match the return type of a gcc2
5228 builtin and then its argument prototype would still apply. */
5229char $ac_func ();
5230/* The GNU C library defines this for functions which it implements
5231 to always fail with ENOSYS. Some functions are actually named
5232 something starting with __ and the normal name is an alias. */
5233#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5234choke me
5235#else
5236char (*f) () = $ac_func;
5237#endif
5238#ifdef __cplusplus
5239}
5240#endif
5241
5242int
5243main ()
5244{
5245return f != $ac_func;
5246 ;
5247 return 0;
5248}
5249_ACEOF
5250rm -f conftest.$ac_objext conftest$ac_exeext
5251if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5252 (eval $ac_link) 2>conftest.er1
5253 ac_status=$?
5254 grep -v '^ *+' conftest.er1 >conftest.err
5255 rm -f conftest.er1
5256 cat conftest.err >&5
5257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5258 (exit $ac_status); } &&
5259 { ac_try='test -z "$ac_c_werror_flag"
5260 || test ! -s conftest.err'
5261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5262 (eval $ac_try) 2>&5
5263 ac_status=$?
5264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5265 (exit $ac_status); }; } &&
5266 { ac_try='test -s conftest$ac_exeext'
5267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5268 (eval $ac_try) 2>&5
5269 ac_status=$?
5270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5271 (exit $ac_status); }; }; then
5272 eval "$as_ac_var=yes"
5273else
5274 echo "$as_me: failed program was:" >&5
5275sed 's/^/| /' conftest.$ac_ext >&5
5276
5277eval "$as_ac_var=no"
5278fi
5279rm -f conftest.err conftest.$ac_objext \
5280 conftest$ac_exeext conftest.$ac_ext
5281fi
5282echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5283echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5284if test `eval echo '${'$as_ac_var'}'` = yes; then
5285 cat >>confdefs.h <<_ACEOF
5286#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5287_ACEOF
5288
5289else
5290
5291 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5292
5293fi
5294done
5295
5296
5297
5298 :
5299
5300
5301
5302
5303
5304 if test $ac_cv_have_decl_memmem = no; then
5305 HAVE_DECL_MEMMEM=0
5306 fi
5307 :
5308
5309
5310
5311 GNULIB_MEMMEM=1
5312
5313
5314
5315
5316 if test $ac_cv_type_long_long_int = yes; then
5317 HAVE_LONG_LONG_INT=1
5318 else
5319 HAVE_LONG_LONG_INT=0
5320 fi
5321
5322
5323 if test $ac_cv_type_unsigned_long_long_int = yes; then
5324 HAVE_UNSIGNED_LONG_LONG_INT=1
5325 else
5326 HAVE_UNSIGNED_LONG_LONG_INT=0
5327 fi
5328
5329
5330 if test $ac_cv_header_inttypes_h = yes; then
5331 HAVE_INTTYPES_H=1
5332 else
5333 HAVE_INTTYPES_H=0
5334 fi
5335
5336
5337 if test $ac_cv_header_sys_types_h = yes; then
5338 HAVE_SYS_TYPES_H=1
5339 else
5340 HAVE_SYS_TYPES_H=0
5341 fi
5342
5343
5344
5345
5346
5347 :
5348
5349
5350
5351
5352
5353
5354
5355 if test $gl_cv_have_include_next = yes; then
5356 gl_cv_next_stdint_h='<'stdint.h'>'
5357 else
5358 echo "$as_me:$LINENO: checking absolute name of <stdint.h>" >&5
5359echo $ECHO_N "checking absolute name of <stdint.h>... $ECHO_C" >&6
5360if test "${gl_cv_next_stdint_h+set}" = set; then
5361 echo $ECHO_N "(cached) $ECHO_C" >&6
5362else
5363
5364 if test $ac_cv_header_stdint_h = yes; then
5365 cat >conftest.$ac_ext <<_ACEOF
5366/* confdefs.h. */
5367_ACEOF
5368cat confdefs.h >>conftest.$ac_ext
5369cat >>conftest.$ac_ext <<_ACEOF
5370/* end confdefs.h. */
5371#include <stdint.h>
5372
5373_ACEOF
5374 gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5375 sed -n '\#/stdint.h#{
5376 s#.*"\(.*/stdint.h\)".*#\1#
5377 s#^/[^/]#//&#
5378 p
5379 q
5380 }'`'"'
5381 else
5382 gl_cv_next_stdint_h='<'stdint.h'>'
5383 fi
5384
5385fi
5386echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5
5387echo "${ECHO_T}$gl_cv_next_stdint_h" >&6
5388 fi
5389 NEXT_STDINT_H=$gl_cv_next_stdint_h
5390
5391
5392
5393 if test $ac_cv_header_stdint_h = yes; then
5394 HAVE_STDINT_H=1
5395 else
5396 HAVE_STDINT_H=0
5397 fi
5398
5399
5400 if test $ac_cv_header_stdint_h = yes; then
5401 echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5
5402echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6
5403if test "${gl_cv_header_working_stdint_h+set}" = set; then
5404 echo $ECHO_N "(cached) $ECHO_C" >&6
5405else
5406 gl_cv_header_working_stdint_h=no
5407 cat >conftest.$ac_ext <<_ACEOF
5408
5409 /* confdefs.h. */
5410_ACEOF
5411cat confdefs.h >>conftest.$ac_ext
5412cat >>conftest.$ac_ext <<_ACEOF
5413/* end confdefs.h. */
5414
5415#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
5416#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
5417#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5418#include <stdint.h>
5419/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
5420#if !(defined WCHAR_MIN && defined WCHAR_MAX)
5421#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
5422#endif
5423
5424
5425 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5426 included before <wchar.h>. */
5427 #include <stddef.h>
5428 #include <signal.h>
5429 #if HAVE_WCHAR_H
5430 # include <stdio.h>
5431 # include <time.h>
5432 # include <wchar.h>
5433 #endif
5434
5435
5436#ifdef INT8_MAX
5437int8_t a1 = INT8_MAX;
5438int8_t a1min = INT8_MIN;
5439#endif
5440#ifdef INT16_MAX
5441int16_t a2 = INT16_MAX;
5442int16_t a2min = INT16_MIN;
5443#endif
5444#ifdef INT32_MAX
5445int32_t a3 = INT32_MAX;
5446int32_t a3min = INT32_MIN;
5447#endif
5448#ifdef INT64_MAX
5449int64_t a4 = INT64_MAX;
5450int64_t a4min = INT64_MIN;
5451#endif
5452#ifdef UINT8_MAX
5453uint8_t b1 = UINT8_MAX;
5454#else
5455typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
5456#endif
5457#ifdef UINT16_MAX
5458uint16_t b2 = UINT16_MAX;
5459#endif
5460#ifdef UINT32_MAX
5461uint32_t b3 = UINT32_MAX;
5462#endif
5463#ifdef UINT64_MAX
5464uint64_t b4 = UINT64_MAX;
5465#endif
5466int_least8_t c1 = INT8_C (0x7f);
5467int_least8_t c1max = INT_LEAST8_MAX;
5468int_least8_t c1min = INT_LEAST8_MIN;
5469int_least16_t c2 = INT16_C (0x7fff);
5470int_least16_t c2max = INT_LEAST16_MAX;
5471int_least16_t c2min = INT_LEAST16_MIN;
5472int_least32_t c3 = INT32_C (0x7fffffff);
5473int_least32_t c3max = INT_LEAST32_MAX;
5474int_least32_t c3min = INT_LEAST32_MIN;
5475int_least64_t c4 = INT64_C (0x7fffffffffffffff);
5476int_least64_t c4max = INT_LEAST64_MAX;
5477int_least64_t c4min = INT_LEAST64_MIN;
5478uint_least8_t d1 = UINT8_C (0xff);
5479uint_least8_t d1max = UINT_LEAST8_MAX;
5480uint_least16_t d2 = UINT16_C (0xffff);
5481uint_least16_t d2max = UINT_LEAST16_MAX;
5482uint_least32_t d3 = UINT32_C (0xffffffff);
5483uint_least32_t d3max = UINT_LEAST32_MAX;
5484uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
5485uint_least64_t d4max = UINT_LEAST64_MAX;
5486int_fast8_t e1 = INT_FAST8_MAX;
5487int_fast8_t e1min = INT_FAST8_MIN;
5488int_fast16_t e2 = INT_FAST16_MAX;
5489int_fast16_t e2min = INT_FAST16_MIN;
5490int_fast32_t e3 = INT_FAST32_MAX;
5491int_fast32_t e3min = INT_FAST32_MIN;
5492int_fast64_t e4 = INT_FAST64_MAX;
5493int_fast64_t e4min = INT_FAST64_MIN;
5494uint_fast8_t f1 = UINT_FAST8_MAX;
5495uint_fast16_t f2 = UINT_FAST16_MAX;
5496uint_fast32_t f3 = UINT_FAST32_MAX;
5497uint_fast64_t f4 = UINT_FAST64_MAX;
5498#ifdef INTPTR_MAX
5499intptr_t g = INTPTR_MAX;
5500intptr_t gmin = INTPTR_MIN;
5501#endif
5502#ifdef UINTPTR_MAX
5503uintptr_t h = UINTPTR_MAX;
5504#endif
5505intmax_t i = INTMAX_MAX;
5506uintmax_t j = UINTMAX_MAX;
5507
5508#include <limits.h> /* for CHAR_BIT */
5509#define TYPE_MINIMUM(t) \
5510 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
5511#define TYPE_MAXIMUM(t) \
5512 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
5513struct s {
5514 int check_PTRDIFF:
5515 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
5516 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
5517 ? 1 : -1;
5518 /* Detect bug in FreeBSD 6.0 / ia64. */
5519 int check_SIG_ATOMIC:
5520 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
5521 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
5522 ? 1 : -1;
5523 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
5524 int check_WCHAR:
5525 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
5526 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
5527 ? 1 : -1;
5528 /* Detect bug in mingw. */
5529 int check_WINT:
5530 WINT_MIN == TYPE_MINIMUM (wint_t)
5531 && WINT_MAX == TYPE_MAXIMUM (wint_t)
5532 ? 1 : -1;
5533
5534 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
5535 int check_UINT8_C:
5536 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
5537 int check_UINT16_C:
5538 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
5539
5540 /* Detect bugs in OpenBSD 3.9 stdint.h. */
5541#ifdef UINT8_MAX
5542 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
5543#endif
5544#ifdef UINT16_MAX
5545 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
5546#endif
5547#ifdef UINT32_MAX
5548 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
5549#endif
5550#ifdef UINT64_MAX
5551 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
5552#endif
5553 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
5554 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
5555 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
5556 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
5557 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
5558 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
5559 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
5560 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
5561 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
5562 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
5563 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
5564};
5565
5566int
5567main ()
5568{
5569
5570 ;
5571 return 0;
5572}
5573_ACEOF
5574rm -f conftest.$ac_objext
5575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5576 (eval $ac_compile) 2>conftest.er1
5577 ac_status=$?
5578 grep -v '^ *+' conftest.er1 >conftest.err
5579 rm -f conftest.er1
5580 cat conftest.err >&5
5581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5582 (exit $ac_status); } &&
5583 { ac_try='test -z "$ac_c_werror_flag"
5584 || test ! -s conftest.err'
5585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5586 (eval $ac_try) 2>&5
5587 ac_status=$?
5588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5589 (exit $ac_status); }; } &&
5590 { ac_try='test -s conftest.$ac_objext'
5591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5592 (eval $ac_try) 2>&5
5593 ac_status=$?
5594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5595 (exit $ac_status); }; }; then
5596 gl_cv_header_working_stdint_h=yes
5597else
5598 echo "$as_me: failed program was:" >&5
5599sed 's/^/| /' conftest.$ac_ext >&5
5600
5601fi
5602rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5603fi
5604echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5
5605echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6
5606 fi
5607 if test "$gl_cv_header_working_stdint_h" = yes; then
5608 STDINT_H=
5609 else
5610
5611
5612for ac_header in sys/inttypes.h sys/bitypes.h
5613do
5614as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5615if eval "test \"\${$as_ac_Header+set}\" = set"; then
5616 echo "$as_me:$LINENO: checking for $ac_header" >&5
5617echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5618if eval "test \"\${$as_ac_Header+set}\" = set"; then
5619 echo $ECHO_N "(cached) $ECHO_C" >&6
5620fi
5621echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5622echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5623else
5624 # Is the header compilable?
5625echo "$as_me:$LINENO: checking $ac_header usability" >&5
5626echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5627cat >conftest.$ac_ext <<_ACEOF
5628/* confdefs.h. */
5629_ACEOF
5630cat confdefs.h >>conftest.$ac_ext
5631cat >>conftest.$ac_ext <<_ACEOF
5632/* end confdefs.h. */
5633$ac_includes_default
5634#include <$ac_header>
5635_ACEOF
5636rm -f conftest.$ac_objext
5637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5638 (eval $ac_compile) 2>conftest.er1
5639 ac_status=$?
5640 grep -v '^ *+' conftest.er1 >conftest.err
5641 rm -f conftest.er1
5642 cat conftest.err >&5
5643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5644 (exit $ac_status); } &&
5645 { ac_try='test -z "$ac_c_werror_flag"
5646 || test ! -s conftest.err'
5647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5648 (eval $ac_try) 2>&5
5649 ac_status=$?
5650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5651 (exit $ac_status); }; } &&
5652 { ac_try='test -s conftest.$ac_objext'
5653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5654 (eval $ac_try) 2>&5
5655 ac_status=$?
5656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5657 (exit $ac_status); }; }; then
5658 ac_header_compiler=yes
5659else
5660 echo "$as_me: failed program was:" >&5
5661sed 's/^/| /' conftest.$ac_ext >&5
5662
5663ac_header_compiler=no
5664fi
5665rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5666echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5667echo "${ECHO_T}$ac_header_compiler" >&6
5668
5669# Is the header present?
5670echo "$as_me:$LINENO: checking $ac_header presence" >&5
5671echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5672cat >conftest.$ac_ext <<_ACEOF
5673/* confdefs.h. */
5674_ACEOF
5675cat confdefs.h >>conftest.$ac_ext
5676cat >>conftest.$ac_ext <<_ACEOF
5677/* end confdefs.h. */
5678#include <$ac_header>
5679_ACEOF
5680if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5681 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5682 ac_status=$?
5683 grep -v '^ *+' conftest.er1 >conftest.err
5684 rm -f conftest.er1
5685 cat conftest.err >&5
5686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5687 (exit $ac_status); } >/dev/null; then
5688 if test -s conftest.err; then
5689 ac_cpp_err=$ac_c_preproc_warn_flag
5690 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5691 else
5692 ac_cpp_err=
5693 fi
5694else
5695 ac_cpp_err=yes
5696fi
5697if test -z "$ac_cpp_err"; then
5698 ac_header_preproc=yes
5699else
5700 echo "$as_me: failed program was:" >&5
5701sed 's/^/| /' conftest.$ac_ext >&5
5702
5703 ac_header_preproc=no
5704fi
5705rm -f conftest.err conftest.$ac_ext
5706echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5707echo "${ECHO_T}$ac_header_preproc" >&6
5708
5709# So? What about this header?
5710case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5711 yes:no: )
5712 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5713echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5714 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5715echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5716 ac_header_preproc=yes
5717 ;;
5718 no:yes:* )
5719 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5720echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5721 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5722echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5723 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5724echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5725 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5726echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5727 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5728echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5729 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5730echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5731 (
5732 cat <<\_ASBOX
5733## ------------------------------------------ ##
5734## Report this to the AC_PACKAGE_NAME lists. ##
5735## ------------------------------------------ ##
5736_ASBOX
5737 ) |
5738 sed "s/^/$as_me: WARNING: /" >&2
5739 ;;
5740esac
5741echo "$as_me:$LINENO: checking for $ac_header" >&5
5742echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5743if eval "test \"\${$as_ac_Header+set}\" = set"; then
5744 echo $ECHO_N "(cached) $ECHO_C" >&6
5745else
5746 eval "$as_ac_Header=\$ac_header_preproc"
5747fi
5748echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5749echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5750
5751fi
5752if test `eval echo '${'$as_ac_Header'}'` = yes; then
5753 cat >>confdefs.h <<_ACEOF
5754#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5755_ACEOF
5756
5757fi
5758
5759done
5760
5761 if test $ac_cv_header_sys_inttypes_h = yes; then
5762 HAVE_SYS_INTTYPES_H=1
5763 else
5764 HAVE_SYS_INTTYPES_H=0
5765 fi
5766
5767 if test $ac_cv_header_sys_bitypes_h = yes; then
5768 HAVE_SYS_BITYPES_H=1
5769 else
5770 HAVE_SYS_BITYPES_H=0
5771 fi
5772
5773
5774
5775 :
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
5791 echo "$as_me:$LINENO: checking for bit size of $gltype" >&5
5792echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6
5793if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\" = set"; then
5794 echo $ECHO_N "(cached) $ECHO_C" >&6
5795else
5796 if test "$cross_compiling" = yes; then
5797 # Depending upon the size, compute the lo and hi bounds.
5798cat >conftest.$ac_ext <<_ACEOF
5799/* confdefs.h. */
5800_ACEOF
5801cat confdefs.h >>conftest.$ac_ext
5802cat >>conftest.$ac_ext <<_ACEOF
5803/* end confdefs.h. */
5804
5805 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5806 included before <wchar.h>. */
5807 #include <stddef.h>
5808 #include <signal.h>
5809 #if HAVE_WCHAR_H
5810 # include <stdio.h>
5811 # include <time.h>
5812 # include <wchar.h>
5813 #endif
5814
5815#include <limits.h>
5816int
5817main ()
5818{
5819static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)];
5820test_array [0] = 0
5821
5822 ;
5823 return 0;
5824}
5825_ACEOF
5826rm -f conftest.$ac_objext
5827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5828 (eval $ac_compile) 2>conftest.er1
5829 ac_status=$?
5830 grep -v '^ *+' conftest.er1 >conftest.err
5831 rm -f conftest.er1
5832 cat conftest.err >&5
5833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5834 (exit $ac_status); } &&
5835 { ac_try='test -z "$ac_c_werror_flag"
5836 || test ! -s conftest.err'
5837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5838 (eval $ac_try) 2>&5
5839 ac_status=$?
5840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5841 (exit $ac_status); }; } &&
5842 { ac_try='test -s conftest.$ac_objext'
5843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5844 (eval $ac_try) 2>&5
5845 ac_status=$?
5846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5847 (exit $ac_status); }; }; then
5848 ac_lo=0 ac_mid=0
5849 while :; do
5850 cat >conftest.$ac_ext <<_ACEOF
5851/* confdefs.h. */
5852_ACEOF
5853cat confdefs.h >>conftest.$ac_ext
5854cat >>conftest.$ac_ext <<_ACEOF
5855/* end confdefs.h. */
5856
5857 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5858 included before <wchar.h>. */
5859 #include <stddef.h>
5860 #include <signal.h>
5861 #if HAVE_WCHAR_H
5862 # include <stdio.h>
5863 # include <time.h>
5864 # include <wchar.h>
5865 #endif
5866
5867#include <limits.h>
5868int
5869main ()
5870{
5871static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
5872test_array [0] = 0
5873
5874 ;
5875 return 0;
5876}
5877_ACEOF
5878rm -f conftest.$ac_objext
5879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5880 (eval $ac_compile) 2>conftest.er1
5881 ac_status=$?
5882 grep -v '^ *+' conftest.er1 >conftest.err
5883 rm -f conftest.er1
5884 cat conftest.err >&5
5885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5886 (exit $ac_status); } &&
5887 { ac_try='test -z "$ac_c_werror_flag"
5888 || test ! -s conftest.err'
5889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5890 (eval $ac_try) 2>&5
5891 ac_status=$?
5892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5893 (exit $ac_status); }; } &&
5894 { ac_try='test -s conftest.$ac_objext'
5895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5896 (eval $ac_try) 2>&5
5897 ac_status=$?
5898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5899 (exit $ac_status); }; }; then
5900 ac_hi=$ac_mid; break
5901else
5902 echo "$as_me: failed program was:" >&5
5903sed 's/^/| /' conftest.$ac_ext >&5
5904
5905ac_lo=`expr $ac_mid + 1`
5906 if test $ac_lo -le $ac_mid; then
5907 ac_lo= ac_hi=
5908 break
5909 fi
5910 ac_mid=`expr 2 '*' $ac_mid + 1`
5911fi
5912rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5913 done
5914else
5915 echo "$as_me: failed program was:" >&5
5916sed 's/^/| /' conftest.$ac_ext >&5
5917
5918cat >conftest.$ac_ext <<_ACEOF
5919/* confdefs.h. */
5920_ACEOF
5921cat confdefs.h >>conftest.$ac_ext
5922cat >>conftest.$ac_ext <<_ACEOF
5923/* end confdefs.h. */
5924
5925 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5926 included before <wchar.h>. */
5927 #include <stddef.h>
5928 #include <signal.h>
5929 #if HAVE_WCHAR_H
5930 # include <stdio.h>
5931 # include <time.h>
5932 # include <wchar.h>
5933 #endif
5934
5935#include <limits.h>
5936int
5937main ()
5938{
5939static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)];
5940test_array [0] = 0
5941
5942 ;
5943 return 0;
5944}
5945_ACEOF
5946rm -f conftest.$ac_objext
5947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5948 (eval $ac_compile) 2>conftest.er1
5949 ac_status=$?
5950 grep -v '^ *+' conftest.er1 >conftest.err
5951 rm -f conftest.er1
5952 cat conftest.err >&5
5953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5954 (exit $ac_status); } &&
5955 { ac_try='test -z "$ac_c_werror_flag"
5956 || test ! -s conftest.err'
5957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5958 (eval $ac_try) 2>&5
5959 ac_status=$?
5960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5961 (exit $ac_status); }; } &&
5962 { ac_try='test -s conftest.$ac_objext'
5963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5964 (eval $ac_try) 2>&5
5965 ac_status=$?
5966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5967 (exit $ac_status); }; }; then
5968 ac_hi=-1 ac_mid=-1
5969 while :; do
5970 cat >conftest.$ac_ext <<_ACEOF
5971/* confdefs.h. */
5972_ACEOF
5973cat confdefs.h >>conftest.$ac_ext
5974cat >>conftest.$ac_ext <<_ACEOF
5975/* end confdefs.h. */
5976
5977 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5978 included before <wchar.h>. */
5979 #include <stddef.h>
5980 #include <signal.h>
5981 #if HAVE_WCHAR_H
5982 # include <stdio.h>
5983 # include <time.h>
5984 # include <wchar.h>
5985 #endif
5986
5987#include <limits.h>
5988int
5989main ()
5990{
5991static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)];
5992test_array [0] = 0
5993
5994 ;
5995 return 0;
5996}
5997_ACEOF
5998rm -f conftest.$ac_objext
5999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6000 (eval $ac_compile) 2>conftest.er1
6001 ac_status=$?
6002 grep -v '^ *+' conftest.er1 >conftest.err
6003 rm -f conftest.er1
6004 cat conftest.err >&5
6005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6006 (exit $ac_status); } &&
6007 { ac_try='test -z "$ac_c_werror_flag"
6008 || test ! -s conftest.err'
6009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6010 (eval $ac_try) 2>&5
6011 ac_status=$?
6012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6013 (exit $ac_status); }; } &&
6014 { ac_try='test -s conftest.$ac_objext'
6015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6016 (eval $ac_try) 2>&5
6017 ac_status=$?
6018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6019 (exit $ac_status); }; }; then
6020 ac_lo=$ac_mid; break
6021else
6022 echo "$as_me: failed program was:" >&5
6023sed 's/^/| /' conftest.$ac_ext >&5
6024
6025ac_hi=`expr '(' $ac_mid ')' - 1`
6026 if test $ac_mid -le $ac_hi; then
6027 ac_lo= ac_hi=
6028 break
6029 fi
6030 ac_mid=`expr 2 '*' $ac_mid`
6031fi
6032rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6033 done
6034else
6035 echo "$as_me: failed program was:" >&5
6036sed 's/^/| /' conftest.$ac_ext >&5
6037
6038ac_lo= ac_hi=
6039fi
6040rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6041fi
6042rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6043# Binary search between lo and hi bounds.
6044while test "x$ac_lo" != "x$ac_hi"; do
6045 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6046 cat >conftest.$ac_ext <<_ACEOF
6047/* confdefs.h. */
6048_ACEOF
6049cat confdefs.h >>conftest.$ac_ext
6050cat >>conftest.$ac_ext <<_ACEOF
6051/* end confdefs.h. */
6052
6053 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6054 included before <wchar.h>. */
6055 #include <stddef.h>
6056 #include <signal.h>
6057 #if HAVE_WCHAR_H
6058 # include <stdio.h>
6059 # include <time.h>
6060 # include <wchar.h>
6061 #endif
6062
6063#include <limits.h>
6064int
6065main ()
6066{
6067static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
6068test_array [0] = 0
6069
6070 ;
6071 return 0;
6072}
6073_ACEOF
6074rm -f conftest.$ac_objext
6075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6076 (eval $ac_compile) 2>conftest.er1
6077 ac_status=$?
6078 grep -v '^ *+' conftest.er1 >conftest.err
6079 rm -f conftest.er1
6080 cat conftest.err >&5
6081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6082 (exit $ac_status); } &&
6083 { ac_try='test -z "$ac_c_werror_flag"
6084 || test ! -s conftest.err'
6085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6086 (eval $ac_try) 2>&5
6087 ac_status=$?
6088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6089 (exit $ac_status); }; } &&
6090 { ac_try='test -s conftest.$ac_objext'
6091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6092 (eval $ac_try) 2>&5
6093 ac_status=$?
6094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6095 (exit $ac_status); }; }; then
6096 ac_hi=$ac_mid
6097else
6098 echo "$as_me: failed program was:" >&5
6099sed 's/^/| /' conftest.$ac_ext >&5
6100
6101ac_lo=`expr '(' $ac_mid ')' + 1`
6102fi
6103rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6104done
6105case $ac_lo in
6106?*) result=$ac_lo;;
6107'') result=unknown ;;
6108esac
6109else
6110 if test "$cross_compiling" = yes; then
d5af19ba
DJ
6111 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6112echo "$as_me: error: in \`$ac_pwd':" >&2;}
6113{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
783e057b
DJ
6114See \`config.log' for more details." >&5
6115echo "$as_me: error: cannot run test program while cross compiling
6116See \`config.log' for more details." >&2;}
d5af19ba 6117 { (exit 1); exit 1; }; }; }
783e057b
DJ
6118else
6119 cat >conftest.$ac_ext <<_ACEOF
6120/* confdefs.h. */
6121_ACEOF
6122cat confdefs.h >>conftest.$ac_ext
6123cat >>conftest.$ac_ext <<_ACEOF
6124/* end confdefs.h. */
6125
6126 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6127 included before <wchar.h>. */
6128 #include <stddef.h>
6129 #include <signal.h>
6130 #if HAVE_WCHAR_H
6131 # include <stdio.h>
6132 # include <time.h>
6133 # include <wchar.h>
6134 #endif
6135
6136#include <limits.h>
6137long longval () { return sizeof ($gltype) * CHAR_BIT; }
6138unsigned long ulongval () { return sizeof ($gltype) * CHAR_BIT; }
6139#include <stdio.h>
6140#include <stdlib.h>
6141int
6142main ()
6143{
6144
6145 FILE *f = fopen ("conftest.val", "w");
6146 if (! f)
6147 exit (1);
6148 if ((sizeof ($gltype) * CHAR_BIT) < 0)
6149 {
6150 long i = longval ();
6151 if (i != (sizeof ($gltype) * CHAR_BIT))
6152 exit (1);
6153 fprintf (f, "%ld\n", i);
6154 }
6155 else
6156 {
6157 unsigned long i = ulongval ();
6158 if (i != (sizeof ($gltype) * CHAR_BIT))
6159 exit (1);
6160 fprintf (f, "%lu\n", i);
6161 }
6162 exit (ferror (f) || fclose (f) != 0);
6163
6164 ;
6165 return 0;
6166}
6167_ACEOF
6168rm -f conftest$ac_exeext
6169if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6170 (eval $ac_link) 2>&5
6171 ac_status=$?
6172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6175 (eval $ac_try) 2>&5
6176 ac_status=$?
6177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6178 (exit $ac_status); }; }; then
6179 result=`cat conftest.val`
6180else
6181 echo "$as_me: program exited with status $ac_status" >&5
6182echo "$as_me: failed program was:" >&5
6183sed 's/^/| /' conftest.$ac_ext >&5
6184
6185( exit $ac_status )
6186result=unknown
6187fi
6188rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6189fi
6190fi
6191rm -f conftest.val
6192 eval gl_cv_bitsizeof_${gltype}=\$result
c906108c 6193
783e057b
DJ
6194fi
6195echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&5
6196echo "${ECHO_T}`eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&6
6197 eval result=\$gl_cv_bitsizeof_${gltype}
6198 if test $result = unknown; then
6199 result=0
6200 fi
6201 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6202 cat >>confdefs.h <<_ACEOF
6203#define BITSIZEOF_${GLTYPE} $result
6204_ACEOF
c906108c 6205
783e057b
DJ
6206 eval BITSIZEOF_${GLTYPE}=\$result
6207 done
c906108c 6208
c906108c 6209
c906108c 6210
bec39cab 6211
3841debe 6212
783e057b
DJ
6213
6214
6215 for gltype in sig_atomic_t wchar_t wint_t ; do
6216 echo "$as_me:$LINENO: checking whether $gltype is signed" >&5
6217echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6
6218if eval "test \"\${gl_cv_type_${gltype}_signed+set}\" = set"; then
6219 echo $ECHO_N "(cached) $ECHO_C" >&6
6220else
6221 cat >conftest.$ac_ext <<_ACEOF
6222/* confdefs.h. */
6223_ACEOF
6224cat confdefs.h >>conftest.$ac_ext
6225cat >>conftest.$ac_ext <<_ACEOF
6226/* end confdefs.h. */
6227
6228 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6229 included before <wchar.h>. */
6230 #include <stddef.h>
6231 #include <signal.h>
6232 #if HAVE_WCHAR_H
6233 # include <stdio.h>
6234 # include <time.h>
6235 # include <wchar.h>
6236 #endif
6237
6238 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6239int
6240main ()
6241{
6242
6243 ;
6244 return 0;
6245}
6246_ACEOF
6247rm -f conftest.$ac_objext
6248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6249 (eval $ac_compile) 2>conftest.er1
6250 ac_status=$?
6251 grep -v '^ *+' conftest.er1 >conftest.err
6252 rm -f conftest.er1
6253 cat conftest.err >&5
6254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6255 (exit $ac_status); } &&
6256 { ac_try='test -z "$ac_c_werror_flag"
6257 || test ! -s conftest.err'
6258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6259 (eval $ac_try) 2>&5
6260 ac_status=$?
6261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6262 (exit $ac_status); }; } &&
6263 { ac_try='test -s conftest.$ac_objext'
6264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6265 (eval $ac_try) 2>&5
6266 ac_status=$?
6267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6268 (exit $ac_status); }; }; then
6269 result=yes
6270else
6271 echo "$as_me: failed program was:" >&5
6272sed 's/^/| /' conftest.$ac_ext >&5
6273
6274result=no
20e95c23 6275fi
783e057b
DJ
6276rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6277 eval gl_cv_type_${gltype}_signed=\$result
6278
6279fi
6280echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&5
6281echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&6
6282 eval result=\$gl_cv_type_${gltype}_signed
6283 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6284 if test "$result" = yes; then
6285 cat >>confdefs.h <<_ACEOF
6286#define HAVE_SIGNED_${GLTYPE} 1
6287_ACEOF
6288
6289 eval HAVE_SIGNED_${GLTYPE}=1
6290 else
6291 eval HAVE_SIGNED_${GLTYPE}=0
6292 fi
6293 done
6294
6295
6296 gl_cv_type_ptrdiff_t_signed=yes
6297 gl_cv_type_size_t_signed=no
6298
6299
6300
6301
6302
6303
6304
6305 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
6306 echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5
6307echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6
6308if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\" = set"; then
6309 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 6310else
783e057b
DJ
6311 eval gl_cv_type_${gltype}_suffix=no
6312 eval result=\$gl_cv_type_${gltype}_signed
6313 if test "$result" = yes; then
6314 glsufu=
6315 else
6316 glsufu=u
6317 fi
6318 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6319 case $glsuf in
6320 '') gltype1='int';;
6321 l) gltype1='long int';;
6322 ll) gltype1='long long int';;
6323 i64) gltype1='__int64';;
6324 u) gltype1='unsigned int';;
6325 ul) gltype1='unsigned long int';;
6326 ull) gltype1='unsigned long long int';;
6327 ui64)gltype1='unsigned __int64';;
6328 esac
6329 cat >conftest.$ac_ext <<_ACEOF
6330/* confdefs.h. */
6331_ACEOF
6332cat confdefs.h >>conftest.$ac_ext
6333cat >>conftest.$ac_ext <<_ACEOF
6334/* end confdefs.h. */
6335
6336 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6337 included before <wchar.h>. */
6338 #include <stddef.h>
6339 #include <signal.h>
6340 #if HAVE_WCHAR_H
6341 # include <stdio.h>
6342 # include <time.h>
6343 # include <wchar.h>
6344 #endif
6345
6346 extern $gltype foo;
6347 extern $gltype1 foo;
6348int
6349main ()
6350{
6351
6352 ;
6353 return 0;
6354}
6355_ACEOF
6356rm -f conftest.$ac_objext
6357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6358 (eval $ac_compile) 2>conftest.er1
6359 ac_status=$?
6360 grep -v '^ *+' conftest.er1 >conftest.err
6361 rm -f conftest.er1
6362 cat conftest.err >&5
6363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6364 (exit $ac_status); } &&
6365 { ac_try='test -z "$ac_c_werror_flag"
6366 || test ! -s conftest.err'
6367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6368 (eval $ac_try) 2>&5
6369 ac_status=$?
6370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6371 (exit $ac_status); }; } &&
6372 { ac_try='test -s conftest.$ac_objext'
6373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6374 (eval $ac_try) 2>&5
6375 ac_status=$?
6376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6377 (exit $ac_status); }; }; then
6378 eval gl_cv_type_${gltype}_suffix=\$glsuf
6379else
6380 echo "$as_me: failed program was:" >&5
6381sed 's/^/| /' conftest.$ac_ext >&5
6382
6383fi
6384rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6385 eval result=\$gl_cv_type_${gltype}_suffix
6386 test "$result" != no && break
6387 done
6388fi
6389echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&5
6390echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&6
6391 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6392 eval result=\$gl_cv_type_${gltype}_suffix
6393 test "$result" = no && result=
6394 eval ${GLTYPE}_SUFFIX=\$result
6395 cat >>confdefs.h <<_ACEOF
6396#define ${GLTYPE}_SUFFIX $result
6397_ACEOF
6398
6399 done
6400
6401
6402
6403 STDINT_H=stdint.h
6404 fi
6405
6406
6407
6408
6409
6410
6411
6412 echo "$as_me:$LINENO: checking whether <wchar.h> is standalone" >&5
6413echo $ECHO_N "checking whether <wchar.h> is standalone... $ECHO_C" >&6
6414if test "${gl_cv_header_wchar_h_standalone+set}" = set; then
6415 echo $ECHO_N "(cached) $ECHO_C" >&6
6416else
6417 cat >conftest.$ac_ext <<_ACEOF
6418#include <wchar.h>
6419wchar_t w;
6420_ACEOF
6421rm -f conftest.$ac_objext
6422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6423 (eval $ac_compile) 2>conftest.er1
6424 ac_status=$?
6425 grep -v '^ *+' conftest.er1 >conftest.err
6426 rm -f conftest.er1
6427 cat conftest.err >&5
6428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6429 (exit $ac_status); } &&
6430 { ac_try='test -z "$ac_c_werror_flag"
6431 || test ! -s conftest.err'
6432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6433 (eval $ac_try) 2>&5
6434 ac_status=$?
6435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6436 (exit $ac_status); }; } &&
6437 { ac_try='test -s conftest.$ac_objext'
6438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6439 (eval $ac_try) 2>&5
6440 ac_status=$?
6441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6442 (exit $ac_status); }; }; then
6443 gl_cv_header_wchar_h_standalone=yes
6444else
6445 echo "$as_me: failed program was:" >&5
6446sed 's/^/| /' conftest.$ac_ext >&5
6447
6448gl_cv_header_wchar_h_standalone=no
6449fi
6450rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6451fi
6452echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5
6453echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6
6454 if test $gl_cv_header_wchar_h_standalone != yes; then
6455 WCHAR_H=wchar.h
6456 fi
6457
6458
6459 :
6460
6461
6462
6463
6464
6465 if test $ac_cv_header_wchar_h = yes; then
6466 HAVE_WCHAR_H=1
6467 else
6468 HAVE_WCHAR_H=0
6469 fi
6470
6471
6472
6473
6474 :
6475
6476
6477
6478
6479
6480
6481
6482 if test $gl_cv_have_include_next = yes; then
6483 gl_cv_next_wchar_h='<'wchar.h'>'
6484 else
6485 echo "$as_me:$LINENO: checking absolute name of <wchar.h>" >&5
6486echo $ECHO_N "checking absolute name of <wchar.h>... $ECHO_C" >&6
6487if test "${gl_cv_next_wchar_h+set}" = set; then
6488 echo $ECHO_N "(cached) $ECHO_C" >&6
6489else
6490
6491 if test $ac_cv_header_wchar_h = yes; then
6492 cat >conftest.$ac_ext <<_ACEOF
6493/* confdefs.h. */
6494_ACEOF
6495cat confdefs.h >>conftest.$ac_ext
6496cat >>conftest.$ac_ext <<_ACEOF
6497/* end confdefs.h. */
6498#include <wchar.h>
6499
6500_ACEOF
6501 gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6502 sed -n '\#/wchar.h#{
6503 s#.*"\(.*/wchar.h\)".*#\1#
6504 s#^/[^/]#//&#
6505 p
6506 q
6507 }'`'"'
6508 else
6509 gl_cv_next_wchar_h='<'wchar.h'>'
6510 fi
6511
6512fi
6513echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5
6514echo "${ECHO_T}$gl_cv_next_wchar_h" >&6
6515 fi
6516 NEXT_WCHAR_H=$gl_cv_next_wchar_h
6517
c906108c 6518
c906108c 6519
c906108c 6520
c906108c 6521
c906108c 6522
c906108c 6523
c906108c 6524
783e057b
DJ
6525 gltests_libdeps=
6526 gltests_ltlibdeps=
20e95c23 6527
20e95c23 6528
20e95c23 6529
783e057b 6530 gl_source_base='tests'
c906108c 6531
bec39cab 6532
bec39cab 6533
783e057b
DJ
6534
6535 LIBGNU_LIBDEPS="$gl_libdeps"
6536
6537 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
6538
6539
e28b3332 6540
d5af19ba
DJ
6541# For Makefile dependencies.
6542GNULIB_STDINT_H=
6543if test x"$STDINT_H" != x; then
6544 GNULIB_STDINT_H=gnulib/$STDINT_H
6545fi
6546
6547
bec39cab
AC
6548PACKAGE=gdb
6549
6550cat >>confdefs.h <<_ACEOF
6551#define PACKAGE "$PACKAGE"
6552_ACEOF
6553
6554
6555
e28b3332
DJ
6556# GDB does not use automake, but gnulib does. This line lets us
6557# generate its Makefile.in.
6558am__api_version="1.9"
6559# Find a good install program. We prefer a C program (faster),
6560# so one script is as good as another. But avoid the broken or
6561# incompatible versions:
6562# SysV /etc/install, /usr/sbin/install
6563# SunOS /usr/etc/install
6564# IRIX /sbin/install
6565# AIX /bin/install
6566# AmigaOS /C/install, which installs bootblocks on floppy discs
6567# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6568# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6569# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6570# OS/2's system install, which has a completely different semantic
6571# ./install, which can be erroneously created by make from ./install.sh.
85541719 6572# Reject install programs that cannot install multiple files.
e28b3332
DJ
6573echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
6574echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
6575if test -z "$INSTALL"; then
6576if test "${ac_cv_path_install+set}" = set; then
6577 echo $ECHO_N "(cached) $ECHO_C" >&6
6578else
6579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6580for as_dir in $PATH
6581do
6582 IFS=$as_save_IFS
6583 test -z "$as_dir" && as_dir=.
6584 # Account for people who put trailing slashes in PATH elements.
6585case $as_dir/ in
6586 ./ | .// | /cC/* | \
6587 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6588 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
6589 /usr/ucb/* ) ;;
6590 *)
6591 # OSF1 and SCO ODT 3.0 have their own names for install.
6592 # Don't use installbsd from OSF since it installs stuff as root
6593 # by default.
6594 for ac_prog in ginstall scoinst install; do
6595 for ac_exec_ext in '' $ac_executable_extensions; do
6596 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6597 if test $ac_prog = install &&
6598 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6599 # AIX install. It has an incompatible calling convention.
6600 :
6601 elif test $ac_prog = install &&
6602 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6603 # program-specific install script used by HP pwplus--don't use.
6604 :
6605 else
85541719
DE
6606 rm -rf conftest.one conftest.two conftest.dir
6607 echo one > conftest.one
6608 echo two > conftest.two
6609 mkdir conftest.dir
6610 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6611 test -s conftest.one && test -s conftest.two &&
6612 test -s conftest.dir/conftest.one &&
6613 test -s conftest.dir/conftest.two
6614 then
6615 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6616 break 3
6617 fi
e28b3332
DJ
6618 fi
6619 fi
6620 done
6621 done
6622 ;;
6623esac
6624done
6625
85541719 6626rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
6627
6628fi
6629 if test "${ac_cv_path_install+set}" = set; then
6630 INSTALL=$ac_cv_path_install
6631 else
85541719
DE
6632 # As a last resort, use the slow shell script. Don't cache a
6633 # value for INSTALL within a source directory, because that will
e28b3332 6634 # break other packages using the cache if that directory is
85541719 6635 # removed, or if the value is a relative name.
e28b3332
DJ
6636 INSTALL=$ac_install_sh
6637 fi
6638fi
6639echo "$as_me:$LINENO: result: $INSTALL" >&5
6640echo "${ECHO_T}$INSTALL" >&6
6641
6642# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6643# It thinks the first close brace ends the variable substitution.
6644test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6645
6646test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6647
6648test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6649
6650echo "$as_me:$LINENO: checking whether build environment is sane" >&5
6651echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
6652# Just in case
6653sleep 1
6654echo timestamp > conftest.file
6655# Do `set' in a subshell so we don't clobber the current shell's
6656# arguments. Must try -L first in case configure is actually a
6657# symlink; some systems play weird games with the mod time of symlinks
6658# (eg FreeBSD returns the mod time of the symlink's containing
6659# directory).
6660if (
6661 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6662 if test "$*" = "X"; then
6663 # -L didn't work.
6664 set X `ls -t $srcdir/configure conftest.file`
6665 fi
6666 rm -f conftest.file
6667 if test "$*" != "X $srcdir/configure conftest.file" \
6668 && test "$*" != "X conftest.file $srcdir/configure"; then
6669
6670 # If neither matched, then we have a broken ls. This can happen
6671 # if, for instance, CONFIG_SHELL is bash and it inherits a
6672 # broken ls alias from the environment. This has actually
6673 # happened. Such a system could not be considered "sane".
6674 { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
6675alias in your environment" >&5
6676echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
6677alias in your environment" >&2;}
6678 { (exit 1); exit 1; }; }
6679 fi
6680
6681 test "$2" = conftest.file
6682 )
6683then
6684 # Ok.
6685 :
6686else
6687 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
6688Check your system clock" >&5
6689echo "$as_me: error: newly created file is older than distributed files!
6690Check your system clock" >&2;}
6691 { (exit 1); exit 1; }; }
6692fi
6693echo "$as_me:$LINENO: result: yes" >&5
6694echo "${ECHO_T}yes" >&6
6695test "$program_prefix" != NONE &&
6696 program_transform_name="s,^,$program_prefix,;$program_transform_name"
6697# Use a double $ so make ignores it.
6698test "$program_suffix" != NONE &&
6699 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
6700# Double any \ or $. echo might interpret backslashes.
6701# By default was `s,x,x', remove it if useless.
6702cat <<\_ACEOF >conftest.sed
6703s/[\\$]/&&/g;s/;s,x,x,$//
6704_ACEOF
6705program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
6706rm conftest.sed
6707
6708# expand $ac_aux_dir to an absolute path
6709am_aux_dir=`cd $ac_aux_dir && pwd`
6710
6711test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6712# Use eval to expand $SHELL
6713if eval "$MISSING --run true"; then
6714 am_missing_run="$MISSING --run "
6715else
6716 am_missing_run=
6717 { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
6718echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
6719fi
6720
6721if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6722 # We used to keeping the `.' as first argument, in order to
6723 # allow $(mkdir_p) to be used without argument. As in
6724 # $(mkdir_p) $(somedir)
6725 # where $(somedir) is conditionally defined. However this is wrong
6726 # for two reasons:
6727 # 1. if the package is installed by a user who cannot write `.'
6728 # make install will fail,
6729 # 2. the above comment should most certainly read
6730 # $(mkdir_p) $(DESTDIR)$(somedir)
6731 # so it does not work when $(somedir) is undefined and
6732 # $(DESTDIR) is not.
6733 # To support the latter case, we have to write
6734 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6735 # so the `.' trick is pointless.
6736 mkdir_p='mkdir -p --'
6737else
6738 # On NextStep and OpenStep, the `mkdir' command does not
6739 # recognize any option. It will interpret all options as
6740 # directories to create, and then abort because `.' already
6741 # exists.
6742 for d in ./-p ./--version;
6743 do
6744 test -d $d && rmdir $d
6745 done
6746 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6747 if test -f "$ac_aux_dir/mkinstalldirs"; then
6748 mkdir_p='$(mkinstalldirs)'
6749 else
6750 mkdir_p='$(install_sh) -d'
6751 fi
6752fi
6753
6754for ac_prog in gawk mawk nawk awk
6755do
6756 # Extract the first word of "$ac_prog", so it can be a program name with args.
6757set dummy $ac_prog; ac_word=$2
6758echo "$as_me:$LINENO: checking for $ac_word" >&5
6759echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6760if test "${ac_cv_prog_AWK+set}" = set; then
6761 echo $ECHO_N "(cached) $ECHO_C" >&6
6762else
6763 if test -n "$AWK"; then
6764 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6765else
6766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6767for as_dir in $PATH
6768do
6769 IFS=$as_save_IFS
6770 test -z "$as_dir" && as_dir=.
6771 for ac_exec_ext in '' $ac_executable_extensions; do
6772 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6773 ac_cv_prog_AWK="$ac_prog"
6774 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6775 break 2
6776 fi
6777done
6778done
6779
6780fi
6781fi
6782AWK=$ac_cv_prog_AWK
6783if test -n "$AWK"; then
6784 echo "$as_me:$LINENO: result: $AWK" >&5
6785echo "${ECHO_T}$AWK" >&6
6786else
6787 echo "$as_me:$LINENO: result: no" >&5
6788echo "${ECHO_T}no" >&6
6789fi
6790
6791 test -n "$AWK" && break
6792done
6793
e28b3332
DJ
6794 ac_config_commands="$ac_config_commands depfiles"
6795
6796
6797am_make=${MAKE-make}
6798cat > confinc << 'END'
6799am__doit:
6800 @echo done
6801.PHONY: am__doit
6802END
6803# If we don't find an include directive, just comment out the code.
6804echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
6805echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
6806am__include="#"
6807am__quote=
6808_am_result=none
6809# First try GNU make style include.
6810echo "include confinc" > confmf
6811# We grep out `Entering directory' and `Leaving directory'
6812# messages which can occur if `w' ends up in MAKEFLAGS.
6813# In particular we don't look at `^make:' because GNU make might
6814# be invoked under some other name (usually "gmake"), in which
6815# case it prints its new name instead of `make'.
6816if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6817 am__include=include
6818 am__quote=
6819 _am_result=GNU
6820fi
6821# Now try BSD make style include.
6822if test "$am__include" = "#"; then
6823 echo '.include "confinc"' > confmf
6824 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6825 am__include=.include
6826 am__quote="\""
6827 _am_result=BSD
6828 fi
6829fi
6830
6831
6832echo "$as_me:$LINENO: result: $_am_result" >&5
6833echo "${ECHO_T}$_am_result" >&6
6834rm -f confinc confmf
6835
6836# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
6837if test "${enable_dependency_tracking+set}" = set; then
6838 enableval="$enable_dependency_tracking"
6839
6840fi;
6841if test "x$enable_dependency_tracking" != xno; then
6842 am_depcomp="$ac_aux_dir/depcomp"
6843 AMDEPBACKSLASH='\'
6844fi
6845
6846
6847if test "x$enable_dependency_tracking" != xno; then
6848 AMDEP_TRUE=
6849 AMDEP_FALSE='#'
6850else
6851 AMDEP_TRUE='#'
6852 AMDEP_FALSE=
6853fi
6854
6855
6856
6857# test to see if srcdir already configured
6858if test "`cd $srcdir && pwd`" != "`pwd`" &&
6859 test -f $srcdir/config.status; then
6860 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
6861echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
6862 { (exit 1); exit 1; }; }
6863fi
6864
6865# test whether we have cygpath
6866if test -z "$CYGPATH_W"; then
6867 if (cygpath --version) >/dev/null 2>/dev/null; then
6868 CYGPATH_W='cygpath -w'
6869 else
6870 CYGPATH_W=echo
6871 fi
6872fi
6873
6874
6875# Define the identity of the package.
6876 PACKAGE=gdb
6877 VERSION=UNUSED-VERSION
6878
6879
6880# Some tools Automake needs.
6881
6882ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6883
6884
6885AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6886
6887
6888AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6889
6890
6891AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6892
6893
6894MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6895
6896install_sh=${install_sh-"$am_aux_dir/install-sh"}
6897
6898# Installed binaries are usually stripped using `strip' when the user
6899# run `make install-strip'. However `strip' might not be the right
6900# tool to use in cross-compilation environments, therefore Automake
6901# will honor the `STRIP' environment variable to overrule this program.
6902if test "$cross_compiling" != no; then
6903 if test -n "$ac_tool_prefix"; then
6904 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6905set dummy ${ac_tool_prefix}strip; ac_word=$2
6906echo "$as_me:$LINENO: checking for $ac_word" >&5
6907echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6908if test "${ac_cv_prog_STRIP+set}" = set; then
6909 echo $ECHO_N "(cached) $ECHO_C" >&6
6910else
6911 if test -n "$STRIP"; then
6912 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6913else
6914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6915for as_dir in $PATH
6916do
6917 IFS=$as_save_IFS
6918 test -z "$as_dir" && as_dir=.
6919 for ac_exec_ext in '' $ac_executable_extensions; do
6920 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6921 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6922 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6923 break 2
6924 fi
6925done
6926done
6927
6928fi
6929fi
6930STRIP=$ac_cv_prog_STRIP
6931if test -n "$STRIP"; then
6932 echo "$as_me:$LINENO: result: $STRIP" >&5
6933echo "${ECHO_T}$STRIP" >&6
6934else
6935 echo "$as_me:$LINENO: result: no" >&5
6936echo "${ECHO_T}no" >&6
6937fi
6938
6939fi
6940if test -z "$ac_cv_prog_STRIP"; then
6941 ac_ct_STRIP=$STRIP
6942 # Extract the first word of "strip", so it can be a program name with args.
6943set dummy strip; ac_word=$2
6944echo "$as_me:$LINENO: checking for $ac_word" >&5
6945echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6946if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6947 echo $ECHO_N "(cached) $ECHO_C" >&6
6948else
6949 if test -n "$ac_ct_STRIP"; then
6950 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6951else
6952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6953for as_dir in $PATH
6954do
6955 IFS=$as_save_IFS
6956 test -z "$as_dir" && as_dir=.
6957 for ac_exec_ext in '' $ac_executable_extensions; do
6958 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6959 ac_cv_prog_ac_ct_STRIP="strip"
6960 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6961 break 2
6962 fi
6963done
6964done
6965
6966 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
6967fi
6968fi
6969ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6970if test -n "$ac_ct_STRIP"; then
6971 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6972echo "${ECHO_T}$ac_ct_STRIP" >&6
6973else
6974 echo "$as_me:$LINENO: result: no" >&5
6975echo "${ECHO_T}no" >&6
6976fi
6977
6978 STRIP=$ac_ct_STRIP
6979else
6980 STRIP="$ac_cv_prog_STRIP"
6981fi
6982
6983fi
6984INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
6985
6986# We need awk for the "check" target. The system "awk" is bad on
6987# some platforms.
6988# Always define AMTAR for backward compatibility.
6989
6990AMTAR=${AMTAR-"${am_missing_run}tar"}
6991
6992am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
6993
6994
6995
6996
6997depcc="$CC" am_compiler_list=
6998
6999echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
7000echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
7001if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
7002 echo $ECHO_N "(cached) $ECHO_C" >&6
7003else
7004 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7005 # We make a subdir and do the tests there. Otherwise we can end up
7006 # making bogus files that we don't know about and never remove. For
7007 # instance it was reported that on HP-UX the gcc test will end up
7008 # making a dummy file named `D' -- because `-MD' means `put the output
7009 # in D'.
7010 mkdir conftest.dir
7011 # Copy depcomp to subdir because otherwise we won't find it if we're
7012 # using a relative directory.
7013 cp "$am_depcomp" conftest.dir
7014 cd conftest.dir
7015 # We will build objects and dependencies in a subdirectory because
7016 # it helps to detect inapplicable dependency modes. For instance
7017 # both Tru64's cc and ICC support -MD to output dependencies as a
7018 # side effect of compilation, but ICC will put the dependencies in
7019 # the current directory while Tru64 will put them in the object
7020 # directory.
7021 mkdir sub
7022
7023 am_cv_CC_dependencies_compiler_type=none
7024 if test "$am_compiler_list" = ""; then
7025 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7026 fi
7027 for depmode in $am_compiler_list; do
7028 # Setup a source with many dependencies, because some compilers
7029 # like to wrap large dependency lists on column 80 (with \), and
7030 # we should not choose a depcomp mode which is confused by this.
7031 #
7032 # We need to recreate these files for each test, as the compiler may
7033 # overwrite some of them when testing with obscure command lines.
7034 # This happens at least with the AIX C compiler.
7035 : > sub/conftest.c
7036 for i in 1 2 3 4 5 6; do
7037 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7038 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7039 # Solaris 8's {/usr,}/bin/sh.
7040 touch sub/conftst$i.h
7041 done
7042 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7043
7044 case $depmode in
7045 nosideeffect)
7046 # after this tag, mechanisms are not by side-effect, so they'll
7047 # only be used when explicitly requested
7048 if test "x$enable_dependency_tracking" = xyes; then
7049 continue
7050 else
7051 break
7052 fi
7053 ;;
7054 none) break ;;
7055 esac
7056 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7057 # mode. It turns out that the SunPro C++ compiler does not properly
7058 # handle `-M -o', and we need to detect this.
7059 if depmode=$depmode \
7060 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7061 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7062 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7063 >/dev/null 2>conftest.err &&
7064 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7065 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7066 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7067 # icc doesn't choke on unknown options, it will just issue warnings
7068 # or remarks (even with -Werror). So we grep stderr for any message
7069 # that says an option was ignored or not supported.
7070 # When given -MP, icc 7.0 and 7.1 complain thusly:
7071 # icc: Command line warning: ignoring option '-M'; no argument required
7072 # The diagnosis changed in icc 8.0:
7073 # icc: Command line remark: option '-MP' not supported
7074 if (grep 'ignoring option' conftest.err ||
7075 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7076 am_cv_CC_dependencies_compiler_type=$depmode
7077 break
7078 fi
7079 fi
7080 done
7081
7082 cd ..
7083 rm -rf conftest.dir
7084else
7085 am_cv_CC_dependencies_compiler_type=none
7086fi
7087
7088fi
7089echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
7090echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
7091CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7092
7093
7094
7095if
7096 test "x$enable_dependency_tracking" != xno \
7097 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7098 am__fastdepCC_TRUE=
7099 am__fastdepCC_FALSE='#'
7100else
7101 am__fastdepCC_TRUE='#'
7102 am__fastdepCC_FALSE=
7103fi
7104
7105
7106
7107
bec39cab
AC
7108debugdir=${libdir}/debug
7109
7110
b4e70030 7111# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
bec39cab 7112if test "${with_separate_debug_dir+set}" = set; then
783e057b
DJ
7113 withval="$with_separate_debug_dir"
7114 debugdir="${withval}"
7115fi;
20e95c23 7116
20e95c23 7117
783e057b
DJ
7118 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7119 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7120 ac_define_dir=`eval echo $debugdir`
7121 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7122
783e057b
DJ
7123cat >>confdefs.h <<_ACEOF
7124#define DEBUGDIR "$ac_define_dir"
20e95c23 7125_ACEOF
20e95c23 7126
20e95c23 7127
783e057b 7128#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
20e95c23 7129
783e057b
DJ
7130if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7131 if test "x$prefix" = xNONE; then
7132 test_prefix=/usr/local
7133 else
7134 test_prefix=$prefix
7135 fi
20e95c23 7136else
783e057b 7137 test_prefix=$exec_prefix
20e95c23 7138fi
783e057b
DJ
7139case ${debugdir} in
7140"${test_prefix}"|"${test_prefix}/"*|\
7141'${exec_prefix}'|'${exec_prefix}/'*)
20e95c23
DJ
7142
7143cat >>confdefs.h <<\_ACEOF
783e057b 7144#define DEBUGDIR_RELOCATABLE 1
20e95c23
DJ
7145_ACEOF
7146
783e057b
DJ
7147 ;;
7148esac
7149
20e95c23 7150
29b0e8a2
JM
7151# Check whether --with-relocated-sources or --without-relocated-sources was given.
7152if test "${with_relocated_sources+set}" = set; then
7153 withval="$with_relocated_sources"
7154 reloc_srcdir="${withval}"
7155
7156 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7157 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7158 ac_define_dir=`eval echo $reloc_srcdir`
7159 ac_define_dir=`eval echo $ac_define_dir`
7160
7161cat >>confdefs.h <<_ACEOF
7162#define RELOC_SRCDIR "$ac_define_dir"
7163_ACEOF
7164
7165
7166
7167fi;
7168
7169
20e95c23 7170
783e057b 7171subdirs="$subdirs doc testsuite"
20e95c23
DJ
7172
7173
783e057b
DJ
7174# Check whether to support alternative target configurations
7175# Check whether --enable-targets or --disable-targets was given.
7176if test "${enable_targets+set}" = set; then
7177 enableval="$enable_targets"
7178 case "${enableval}" in
7179 yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
7180echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
7181 { (exit 1); exit 1; }; }
7182 ;;
7183 no) enable_targets= ;;
7184 *) enable_targets=$enableval ;;
7185esac
7186fi;
20e95c23 7187
783e057b
DJ
7188# Check whether to enable 64-bit support on 32-bit hosts
7189# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
7190if test "${enable_64_bit_bfd+set}" = set; then
7191 enableval="$enable_64_bit_bfd"
7192 case "${enableval}" in
7193 yes) want64=true ;;
7194 no) want64=false ;;
7195 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
7196echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
7197 { (exit 1); exit 1; }; } ;;
7198esac
7199else
7200 want64=false
7201fi;
7202# Provide defaults for some variables set by the per-host and per-target
7203# configuration.
7204gdb_host_obs=posix-hdep.o
20e95c23 7205
783e057b
DJ
7206if test "${target}" = "${host}"; then
7207 gdb_native=yes
7208else
7209 gdb_native=no
7210fi
20e95c23 7211
783e057b 7212. $srcdir/configure.host
20e95c23 7213
783e057b 7214# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 7215
783e057b
DJ
7216TARGET_OBS=
7217all_targets=
20e95c23 7218
783e057b 7219for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 7220do
783e057b
DJ
7221 if test "$targ_alias" = "all"; then
7222 all_targets=true
7223 else
7224 # Canonicalize the secondary target names.
7225 result=`$ac_config_sub $targ_alias 2>/dev/null`
7226 if test -n "$result"; then
7227 targ=$result
7228 else
7229 targ=$targ_alias
7230 fi
20e95c23 7231
783e057b 7232 . ${srcdir}/configure.tgt
20e95c23 7233
783e057b
DJ
7234 # Target-specific object files
7235 for i in ${gdb_target_obs}; do
7236 case " $TARGET_OBS " in
7237 *" ${i} "*) ;;
7238 *)
7239 TARGET_OBS="$TARGET_OBS ${i}"
7240 ;;
7241 esac
7242 done
20e95c23 7243
783e057b
DJ
7244 # Check whether this target needs 64-bit CORE_ADDR
7245 if test x${want64} = xfalse; then
7246 . ${srcdir}/../bfd/config.bfd
7247 fi
7248 fi
20e95c23
DJ
7249done
7250
783e057b
DJ
7251if test x${all_targets} = xtrue; then
7252
7253 # We want all 64-bit targets if we either:
7254 # - run on a 64-bit host or
7255 # - already require 64-bit support for some other target or
7256 # - the --enable-64-bit-bfd option was supplied
7257 # Otherwise we only support all 32-bit targets.
7258 #
7259 # NOTE: This test must be in sync with the corresponding
7260 # tests in BFD!
20e95c23 7261
783e057b
DJ
7262 if test x${want64} = xfalse; then
7263 echo "$as_me:$LINENO: checking for long" >&5
c0993dbe
UW
7264echo $ECHO_N "checking for long... $ECHO_C" >&6
7265if test "${ac_cv_type_long+set}" = set; then
7266 echo $ECHO_N "(cached) $ECHO_C" >&6
7267else
7268 cat >conftest.$ac_ext <<_ACEOF
7269/* confdefs.h. */
7270_ACEOF
7271cat confdefs.h >>conftest.$ac_ext
7272cat >>conftest.$ac_ext <<_ACEOF
7273/* end confdefs.h. */
7274$ac_includes_default
7275int
7276main ()
7277{
7278if ((long *) 0)
7279 return 0;
7280if (sizeof (long))
7281 return 0;
7282 ;
7283 return 0;
7284}
7285_ACEOF
7286rm -f conftest.$ac_objext
7287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7288 (eval $ac_compile) 2>conftest.er1
7289 ac_status=$?
7290 grep -v '^ *+' conftest.er1 >conftest.err
7291 rm -f conftest.er1
7292 cat conftest.err >&5
7293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7294 (exit $ac_status); } &&
7295 { ac_try='test -z "$ac_c_werror_flag"
7296 || test ! -s conftest.err'
7297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7298 (eval $ac_try) 2>&5
7299 ac_status=$?
7300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7301 (exit $ac_status); }; } &&
7302 { ac_try='test -s conftest.$ac_objext'
7303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7304 (eval $ac_try) 2>&5
7305 ac_status=$?
7306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7307 (exit $ac_status); }; }; then
7308 ac_cv_type_long=yes
7309else
7310 echo "$as_me: failed program was:" >&5
7311sed 's/^/| /' conftest.$ac_ext >&5
7312
7313ac_cv_type_long=no
7314fi
7315rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7316fi
7317echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7318echo "${ECHO_T}$ac_cv_type_long" >&6
7319
7320echo "$as_me:$LINENO: checking size of long" >&5
7321echo $ECHO_N "checking size of long... $ECHO_C" >&6
7322if test "${ac_cv_sizeof_long+set}" = set; then
7323 echo $ECHO_N "(cached) $ECHO_C" >&6
7324else
7325 if test "$ac_cv_type_long" = yes; then
7326 # The cast to unsigned long works around a bug in the HP C Compiler
7327 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7328 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7329 # This bug is HP SR number 8606223364.
7330 if test "$cross_compiling" = yes; then
7331 # Depending upon the size, compute the lo and hi bounds.
7332cat >conftest.$ac_ext <<_ACEOF
7333/* confdefs.h. */
7334_ACEOF
7335cat confdefs.h >>conftest.$ac_ext
7336cat >>conftest.$ac_ext <<_ACEOF
7337/* end confdefs.h. */
7338$ac_includes_default
7339int
7340main ()
7341{
7342static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
7343test_array [0] = 0
7344
7345 ;
7346 return 0;
7347}
7348_ACEOF
7349rm -f conftest.$ac_objext
7350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7351 (eval $ac_compile) 2>conftest.er1
7352 ac_status=$?
7353 grep -v '^ *+' conftest.er1 >conftest.err
7354 rm -f conftest.er1
7355 cat conftest.err >&5
7356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7357 (exit $ac_status); } &&
7358 { ac_try='test -z "$ac_c_werror_flag"
7359 || test ! -s conftest.err'
7360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7361 (eval $ac_try) 2>&5
7362 ac_status=$?
7363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7364 (exit $ac_status); }; } &&
7365 { ac_try='test -s conftest.$ac_objext'
7366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7367 (eval $ac_try) 2>&5
7368 ac_status=$?
7369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7370 (exit $ac_status); }; }; then
7371 ac_lo=0 ac_mid=0
7372 while :; do
7373 cat >conftest.$ac_ext <<_ACEOF
7374/* confdefs.h. */
7375_ACEOF
7376cat confdefs.h >>conftest.$ac_ext
7377cat >>conftest.$ac_ext <<_ACEOF
7378/* end confdefs.h. */
7379$ac_includes_default
7380int
7381main ()
7382{
7383static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7384test_array [0] = 0
7385
7386 ;
7387 return 0;
7388}
7389_ACEOF
7390rm -f conftest.$ac_objext
7391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7392 (eval $ac_compile) 2>conftest.er1
7393 ac_status=$?
7394 grep -v '^ *+' conftest.er1 >conftest.err
7395 rm -f conftest.er1
7396 cat conftest.err >&5
7397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7398 (exit $ac_status); } &&
7399 { ac_try='test -z "$ac_c_werror_flag"
7400 || test ! -s conftest.err'
7401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7402 (eval $ac_try) 2>&5
7403 ac_status=$?
7404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7405 (exit $ac_status); }; } &&
7406 { ac_try='test -s conftest.$ac_objext'
7407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7408 (eval $ac_try) 2>&5
7409 ac_status=$?
7410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7411 (exit $ac_status); }; }; then
7412 ac_hi=$ac_mid; break
7413else
7414 echo "$as_me: failed program was:" >&5
7415sed 's/^/| /' conftest.$ac_ext >&5
7416
7417ac_lo=`expr $ac_mid + 1`
7418 if test $ac_lo -le $ac_mid; then
7419 ac_lo= ac_hi=
7420 break
7421 fi
7422 ac_mid=`expr 2 '*' $ac_mid + 1`
7423fi
7424rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7425 done
7426else
7427 echo "$as_me: failed program was:" >&5
7428sed 's/^/| /' conftest.$ac_ext >&5
7429
7430cat >conftest.$ac_ext <<_ACEOF
7431/* confdefs.h. */
7432_ACEOF
7433cat confdefs.h >>conftest.$ac_ext
7434cat >>conftest.$ac_ext <<_ACEOF
7435/* end confdefs.h. */
7436$ac_includes_default
7437int
7438main ()
7439{
7440static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
7441test_array [0] = 0
7442
7443 ;
7444 return 0;
7445}
7446_ACEOF
7447rm -f conftest.$ac_objext
7448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7449 (eval $ac_compile) 2>conftest.er1
7450 ac_status=$?
7451 grep -v '^ *+' conftest.er1 >conftest.err
7452 rm -f conftest.er1
7453 cat conftest.err >&5
7454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7455 (exit $ac_status); } &&
7456 { ac_try='test -z "$ac_c_werror_flag"
7457 || test ! -s conftest.err'
7458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7459 (eval $ac_try) 2>&5
7460 ac_status=$?
7461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7462 (exit $ac_status); }; } &&
7463 { ac_try='test -s conftest.$ac_objext'
7464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7465 (eval $ac_try) 2>&5
7466 ac_status=$?
7467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7468 (exit $ac_status); }; }; then
7469 ac_hi=-1 ac_mid=-1
7470 while :; do
7471 cat >conftest.$ac_ext <<_ACEOF
7472/* confdefs.h. */
7473_ACEOF
7474cat confdefs.h >>conftest.$ac_ext
7475cat >>conftest.$ac_ext <<_ACEOF
7476/* end confdefs.h. */
7477$ac_includes_default
7478int
7479main ()
7480{
7481static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
7482test_array [0] = 0
7483
7484 ;
7485 return 0;
7486}
7487_ACEOF
7488rm -f conftest.$ac_objext
7489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7490 (eval $ac_compile) 2>conftest.er1
7491 ac_status=$?
7492 grep -v '^ *+' conftest.er1 >conftest.err
7493 rm -f conftest.er1
7494 cat conftest.err >&5
7495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7496 (exit $ac_status); } &&
7497 { ac_try='test -z "$ac_c_werror_flag"
7498 || test ! -s conftest.err'
7499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7500 (eval $ac_try) 2>&5
7501 ac_status=$?
7502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7503 (exit $ac_status); }; } &&
7504 { ac_try='test -s conftest.$ac_objext'
7505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7506 (eval $ac_try) 2>&5
7507 ac_status=$?
7508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7509 (exit $ac_status); }; }; then
7510 ac_lo=$ac_mid; break
7511else
7512 echo "$as_me: failed program was:" >&5
7513sed 's/^/| /' conftest.$ac_ext >&5
7514
7515ac_hi=`expr '(' $ac_mid ')' - 1`
7516 if test $ac_mid -le $ac_hi; then
7517 ac_lo= ac_hi=
7518 break
7519 fi
7520 ac_mid=`expr 2 '*' $ac_mid`
7521fi
7522rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7523 done
7524else
7525 echo "$as_me: failed program was:" >&5
7526sed 's/^/| /' conftest.$ac_ext >&5
7527
7528ac_lo= ac_hi=
7529fi
7530rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7531fi
7532rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7533# Binary search between lo and hi bounds.
7534while test "x$ac_lo" != "x$ac_hi"; do
7535 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7536 cat >conftest.$ac_ext <<_ACEOF
7537/* confdefs.h. */
7538_ACEOF
7539cat confdefs.h >>conftest.$ac_ext
7540cat >>conftest.$ac_ext <<_ACEOF
7541/* end confdefs.h. */
7542$ac_includes_default
7543int
7544main ()
7545{
7546static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7547test_array [0] = 0
7548
7549 ;
7550 return 0;
7551}
7552_ACEOF
7553rm -f conftest.$ac_objext
7554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7555 (eval $ac_compile) 2>conftest.er1
7556 ac_status=$?
7557 grep -v '^ *+' conftest.er1 >conftest.err
7558 rm -f conftest.er1
7559 cat conftest.err >&5
7560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7561 (exit $ac_status); } &&
7562 { ac_try='test -z "$ac_c_werror_flag"
7563 || test ! -s conftest.err'
7564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7565 (eval $ac_try) 2>&5
7566 ac_status=$?
7567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7568 (exit $ac_status); }; } &&
7569 { ac_try='test -s conftest.$ac_objext'
7570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7571 (eval $ac_try) 2>&5
7572 ac_status=$?
7573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7574 (exit $ac_status); }; }; then
7575 ac_hi=$ac_mid
7576else
7577 echo "$as_me: failed program was:" >&5
7578sed 's/^/| /' conftest.$ac_ext >&5
7579
7580ac_lo=`expr '(' $ac_mid ')' + 1`
7581fi
7582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7583done
7584case $ac_lo in
7585?*) ac_cv_sizeof_long=$ac_lo;;
d5af19ba
DJ
7586'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7587echo "$as_me: error: in \`$ac_pwd':" >&2;}
7588{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
c0993dbe
UW
7589See \`config.log' for more details." >&5
7590echo "$as_me: error: cannot compute sizeof (long), 77
7591See \`config.log' for more details." >&2;}
d5af19ba 7592 { (exit 1); exit 1; }; }; } ;;
c0993dbe
UW
7593esac
7594else
7595 if test "$cross_compiling" = yes; then
d5af19ba
DJ
7596 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7597echo "$as_me: error: in \`$ac_pwd':" >&2;}
7598{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
c0993dbe
UW
7599See \`config.log' for more details." >&5
7600echo "$as_me: error: cannot run test program while cross compiling
7601See \`config.log' for more details." >&2;}
d5af19ba 7602 { (exit 1); exit 1; }; }; }
c0993dbe
UW
7603else
7604 cat >conftest.$ac_ext <<_ACEOF
7605/* confdefs.h. */
7606_ACEOF
7607cat confdefs.h >>conftest.$ac_ext
7608cat >>conftest.$ac_ext <<_ACEOF
7609/* end confdefs.h. */
7610$ac_includes_default
7611long longval () { return (long) (sizeof (long)); }
7612unsigned long ulongval () { return (long) (sizeof (long)); }
7613#include <stdio.h>
7614#include <stdlib.h>
7615int
7616main ()
7617{
7618
7619 FILE *f = fopen ("conftest.val", "w");
7620 if (! f)
7621 exit (1);
7622 if (((long) (sizeof (long))) < 0)
7623 {
7624 long i = longval ();
7625 if (i != ((long) (sizeof (long))))
7626 exit (1);
7627 fprintf (f, "%ld\n", i);
7628 }
7629 else
7630 {
7631 unsigned long i = ulongval ();
7632 if (i != ((long) (sizeof (long))))
7633 exit (1);
7634 fprintf (f, "%lu\n", i);
7635 }
7636 exit (ferror (f) || fclose (f) != 0);
7637
7638 ;
7639 return 0;
7640}
7641_ACEOF
7642rm -f conftest$ac_exeext
7643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7644 (eval $ac_link) 2>&5
7645 ac_status=$?
7646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7647 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7649 (eval $ac_try) 2>&5
7650 ac_status=$?
7651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7652 (exit $ac_status); }; }; then
7653 ac_cv_sizeof_long=`cat conftest.val`
7654else
7655 echo "$as_me: program exited with status $ac_status" >&5
7656echo "$as_me: failed program was:" >&5
7657sed 's/^/| /' conftest.$ac_ext >&5
7658
7659( exit $ac_status )
d5af19ba
DJ
7660{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7661echo "$as_me: error: in \`$ac_pwd':" >&2;}
c0993dbe
UW
7662{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7663See \`config.log' for more details." >&5
7664echo "$as_me: error: cannot compute sizeof (long), 77
7665See \`config.log' for more details." >&2;}
d5af19ba 7666 { (exit 1); exit 1; }; }; }
c0993dbe
UW
7667fi
7668rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7669fi
7670fi
7671rm -f conftest.val
7672else
7673 ac_cv_sizeof_long=0
7674fi
7675fi
7676echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7677echo "${ECHO_T}$ac_cv_sizeof_long" >&6
7678cat >>confdefs.h <<_ACEOF
7679#define SIZEOF_LONG $ac_cv_sizeof_long
7680_ACEOF
7681
7682
7683 if test "x${ac_cv_sizeof_long}" = "x8"; then
7684 want64=true
7685 fi
7686 fi
7687 if test x${want64} = xtrue; then
7688 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
7689 else
7690 TARGET_OBS='$(ALL_TARGET_OBS)'
7691 fi
7692fi
7693
7694
7695
7696# For other settings, only the main target counts.
7697gdb_sim=
7698gdb_osabi=
7699build_gdbserver=
7700targ=$target; . ${srcdir}/configure.tgt
7701
7702# Fetch the default architecture and default target vector from BFD.
7703targ=$target; . $srcdir/../bfd/config.bfd
7704
7705# We only want the first architecture, so strip off the others if
7706# there is more than one.
7707targ_archs=`echo $targ_archs | sed 's/ .*//'`
7708
7709if test "x$targ_archs" != x; then
7710
7711cat >>confdefs.h <<_ACEOF
7712#define DEFAULT_BFD_ARCH $targ_archs
7713_ACEOF
7714
7715fi
7716if test "x$targ_defvec" != x; then
7717
7718cat >>confdefs.h <<_ACEOF
7719#define DEFAULT_BFD_VEC $targ_defvec
7720_ACEOF
7721
7722fi
7723
c0993dbe
UW
7724# The CLI cannot be disabled yet, but may be in the future.
7725
7726# Enable CLI.
7727# Check whether --enable-gdbcli or --disable-gdbcli was given.
7728if test "${enable_gdbcli+set}" = set; then
7729 enableval="$enable_gdbcli"
7730 case $enableval in
7731 yes)
7732 ;;
7733 no)
7734 { { echo "$as_me:$LINENO: error: the command-line interface cannot be disabled yet" >&5
7735echo "$as_me: error: the command-line interface cannot be disabled yet" >&2;}
7736 { (exit 1); exit 1; }; } ;;
7737 *)
7738 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbcli" >&5
7739echo "$as_me: error: bad value $enableval for --enable-gdbcli" >&2;}
7740 { (exit 1); exit 1; }; } ;;
7741 esac
7742else
7743 enable_gdbcli=yes
7744fi;
7745if test x"$enable_gdbcli" = xyes; then
7746 if test -d $srcdir/cli; then
7747 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
7748 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
7749 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
7750 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
7751 fi
7752fi
7753
7754# Enable MI.
7755# Check whether --enable-gdbmi or --disable-gdbmi was given.
7756if test "${enable_gdbmi+set}" = set; then
7757 enableval="$enable_gdbmi"
7758 case $enableval in
7759 yes | no)
7760 ;;
7761 *)
7762 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbmi" >&5
7763echo "$as_me: error: bad value $enableval for --enable-gdbmi" >&2;}
7764 { (exit 1); exit 1; }; } ;;
7765 esac
7766else
7767 enable_gdbmi=yes
7768fi;
7769if test x"$enable_gdbmi" = xyes; then
7770 if test -d $srcdir/mi; then
7771 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
7772 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
7773 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
7774 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
7775 fi
7776fi
7777
7778# Enable TUI.
7779# Check whether --enable-tui or --disable-tui was given.
7780if test "${enable_tui+set}" = set; then
7781 enableval="$enable_tui"
7782 case $enableval in
3ca64bd3 7783 yes | no | auto)
c0993dbe
UW
7784 ;;
7785 *)
7786 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tui" >&5
7787echo "$as_me: error: bad value $enableval for --enable-tui" >&2;}
7788 { (exit 1); exit 1; }; } ;;
7789 esac
7790else
3ca64bd3 7791 enable_tui=auto
c0993dbe
UW
7792fi;
7793
7794# Enable gdbtk.
7795# Check whether --enable-gdbtk or --disable-gdbtk was given.
7796if test "${enable_gdbtk+set}" = set; then
7797 enableval="$enable_gdbtk"
7798 case $enableval in
7799 yes | no)
7800 ;;
7801 *)
7802 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbtk" >&5
7803echo "$as_me: error: bad value $enableval for --enable-gdbtk" >&2;}
7804 { (exit 1); exit 1; }; } ;;
7805 esac
7806else
5062cc19 7807 if test -d $srcdir/gdbtk; then
c0993dbe
UW
7808 enable_gdbtk=yes
7809 else
7810 enable_gdbtk=no
7811 fi
7812fi;
7813# We unconditionally disable gdbtk tests on selected platforms.
7814case $host_os in
7815 go32* | windows*)
7816 { echo "$as_me:$LINENO: WARNING: gdbtk isn't supported on $host; disabling" >&5
7817echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
7818 enable_gdbtk=no ;;
7819esac
7820
7821# Libunwind support.
bec39cab 7822
b4e70030 7823# Check whether --with-libunwind or --without-libunwind was given.
bec39cab 7824if test "${with_libunwind+set}" = set; then
b4e70030
JB
7825 withval="$with_libunwind"
7826 case "${withval}" in
bec39cab
AC
7827 yes) enable_libunwind=yes ;;
7828 no) enable_libunwind=no ;;
7829 *) { { echo "$as_me:$LINENO: error: bad value ${withval} for GDB with-libunwind option" >&5
7830echo "$as_me: error: bad value ${withval} for GDB with-libunwind option" >&2;}
7831 { (exit 1); exit 1; }; } ;;
7832esac
7833else
7834
7835
a9322a30
TT
7836
7837for ac_header in libunwind.h libunwind-ia64.h
bec39cab
AC
7838do
7839as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7840if eval "test \"\${$as_ac_Header+set}\" = set"; then
7841 echo "$as_me:$LINENO: checking for $ac_header" >&5
7842echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7843if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7844 echo $ECHO_N "(cached) $ECHO_C" >&6
7845fi
b4e70030
JB
7846echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7847echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7848else
7849 # Is the header compilable?
b4e70030
JB
7850echo "$as_me:$LINENO: checking $ac_header usability" >&5
7851echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7852cat >conftest.$ac_ext <<_ACEOF
7853/* confdefs.h. */
7854_ACEOF
7855cat confdefs.h >>conftest.$ac_ext
7856cat >>conftest.$ac_ext <<_ACEOF
7857/* end confdefs.h. */
7858$ac_includes_default
7859#include <$ac_header>
7860_ACEOF
7861rm -f conftest.$ac_objext
7862if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7863 (eval $ac_compile) 2>conftest.er1
7864 ac_status=$?
7865 grep -v '^ *+' conftest.er1 >conftest.err
7866 rm -f conftest.er1
7867 cat conftest.err >&5
7868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7869 (exit $ac_status); } &&
b4e70030
JB
7870 { ac_try='test -z "$ac_c_werror_flag"
7871 || test ! -s conftest.err'
bec39cab
AC
7872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7873 (eval $ac_try) 2>&5
7874 ac_status=$?
7875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7876 (exit $ac_status); }; } &&
7877 { ac_try='test -s conftest.$ac_objext'
7878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7879 (eval $ac_try) 2>&5
7880 ac_status=$?
7881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7882 (exit $ac_status); }; }; then
7883 ac_header_compiler=yes
7884else
7885 echo "$as_me: failed program was:" >&5
7886sed 's/^/| /' conftest.$ac_ext >&5
7887
b4e70030 7888ac_header_compiler=no
bec39cab
AC
7889fi
7890rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
7891echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7892echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
7893
7894# Is the header present?
b4e70030
JB
7895echo "$as_me:$LINENO: checking $ac_header presence" >&5
7896echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
7897cat >conftest.$ac_ext <<_ACEOF
7898/* confdefs.h. */
7899_ACEOF
7900cat confdefs.h >>conftest.$ac_ext
7901cat >>conftest.$ac_ext <<_ACEOF
7902/* end confdefs.h. */
7903#include <$ac_header>
7904_ACEOF
7905if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7906 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7907 ac_status=$?
7908 grep -v '^ *+' conftest.er1 >conftest.err
7909 rm -f conftest.er1
7910 cat conftest.err >&5
7911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7912 (exit $ac_status); } >/dev/null; then
7913 if test -s conftest.err; then
7914 ac_cpp_err=$ac_c_preproc_warn_flag
7915 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7916 else
7917 ac_cpp_err=
7918 fi
7919else
7920 ac_cpp_err=yes
7921fi
7922if test -z "$ac_cpp_err"; then
7923 ac_header_preproc=yes
7924else
7925 echo "$as_me: failed program was:" >&5
7926sed 's/^/| /' conftest.$ac_ext >&5
7927
7928 ac_header_preproc=no
7929fi
7930rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7931echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7932echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
7933
7934# So? What about this header?
7935case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7936 yes:no: )
7937 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7938echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7939 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7940echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7941 ac_header_preproc=yes
7942 ;;
7943 no:yes:* )
7944 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7945echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7946 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7947echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7948 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7949echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7950 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7951echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7952 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7953echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7954 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7955echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
7956 (
7957 cat <<\_ASBOX
7958## ------------------------------------------ ##
7959## Report this to the AC_PACKAGE_NAME lists. ##
7960## ------------------------------------------ ##
7961_ASBOX
7962 ) |
7963 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
7964 ;;
7965esac
b4e70030
JB
7966echo "$as_me:$LINENO: checking for $ac_header" >&5
7967echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7968if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7969 echo $ECHO_N "(cached) $ECHO_C" >&6
7970else
7971 eval "$as_ac_Header=\$ac_header_preproc"
7972fi
b4e70030
JB
7973echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7974echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7975
7976fi
7977if test `eval echo '${'$as_ac_Header'}'` = yes; then
7978 cat >>confdefs.h <<_ACEOF
7979#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7980_ACEOF
7981
7982fi
7983
7984done
7985
a9322a30
TT
7986 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
7987 enable_libunwind=yes;
7988 fi
7989
7990fi;
7991
7992if test x"$enable_libunwind" = xyes; then
7993
bec39cab 7994
a9322a30 7995for ac_header in libunwind.h libunwind-ia64.h
bec39cab
AC
7996do
7997as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7998if eval "test \"\${$as_ac_Header+set}\" = set"; then
7999 echo "$as_me:$LINENO: checking for $ac_header" >&5
8000echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8001if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8002 echo $ECHO_N "(cached) $ECHO_C" >&6
8003fi
b4e70030
JB
8004echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8005echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8006else
8007 # Is the header compilable?
b4e70030
JB
8008echo "$as_me:$LINENO: checking $ac_header usability" >&5
8009echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
8010cat >conftest.$ac_ext <<_ACEOF
8011/* confdefs.h. */
8012_ACEOF
8013cat confdefs.h >>conftest.$ac_ext
8014cat >>conftest.$ac_ext <<_ACEOF
8015/* end confdefs.h. */
8016$ac_includes_default
8017#include <$ac_header>
8018_ACEOF
8019rm -f conftest.$ac_objext
8020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8021 (eval $ac_compile) 2>conftest.er1
8022 ac_status=$?
8023 grep -v '^ *+' conftest.er1 >conftest.err
8024 rm -f conftest.er1
8025 cat conftest.err >&5
8026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8027 (exit $ac_status); } &&
b4e70030
JB
8028 { ac_try='test -z "$ac_c_werror_flag"
8029 || test ! -s conftest.err'
bec39cab
AC
8030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8031 (eval $ac_try) 2>&5
8032 ac_status=$?
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); }; } &&
8035 { ac_try='test -s conftest.$ac_objext'
8036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8037 (eval $ac_try) 2>&5
8038 ac_status=$?
8039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8040 (exit $ac_status); }; }; then
8041 ac_header_compiler=yes
8042else
8043 echo "$as_me: failed program was:" >&5
8044sed 's/^/| /' conftest.$ac_ext >&5
8045
b4e70030 8046ac_header_compiler=no
bec39cab
AC
8047fi
8048rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8049echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8050echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8051
8052# Is the header present?
b4e70030
JB
8053echo "$as_me:$LINENO: checking $ac_header presence" >&5
8054echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8055cat >conftest.$ac_ext <<_ACEOF
8056/* confdefs.h. */
8057_ACEOF
8058cat confdefs.h >>conftest.$ac_ext
8059cat >>conftest.$ac_ext <<_ACEOF
8060/* end confdefs.h. */
8061#include <$ac_header>
8062_ACEOF
8063if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8064 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8065 ac_status=$?
8066 grep -v '^ *+' conftest.er1 >conftest.err
8067 rm -f conftest.er1
8068 cat conftest.err >&5
8069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8070 (exit $ac_status); } >/dev/null; then
8071 if test -s conftest.err; then
8072 ac_cpp_err=$ac_c_preproc_warn_flag
8073 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8074 else
8075 ac_cpp_err=
8076 fi
8077else
8078 ac_cpp_err=yes
8079fi
8080if test -z "$ac_cpp_err"; then
8081 ac_header_preproc=yes
8082else
8083 echo "$as_me: failed program was:" >&5
8084sed 's/^/| /' conftest.$ac_ext >&5
8085
8086 ac_header_preproc=no
8087fi
8088rm -f conftest.err conftest.$ac_ext
b4e70030
JB
8089echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8090echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
8091
8092# So? What about this header?
8093case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8094 yes:no: )
8095 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8096echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8097 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8098echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8099 ac_header_preproc=yes
8100 ;;
8101 no:yes:* )
8102 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8103echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8104 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8105echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8106 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8107echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8108 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8109echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8110 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8111echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8112 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8113echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8114 (
8115 cat <<\_ASBOX
8116## ------------------------------------------ ##
8117## Report this to the AC_PACKAGE_NAME lists. ##
8118## ------------------------------------------ ##
8119_ASBOX
8120 ) |
8121 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8122 ;;
8123esac
b4e70030
JB
8124echo "$as_me:$LINENO: checking for $ac_header" >&5
8125echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8126if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8127 echo $ECHO_N "(cached) $ECHO_C" >&6
8128else
8129 eval "$as_ac_Header=\$ac_header_preproc"
8130fi
b4e70030
JB
8131echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8132echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8133
8134fi
8135if test `eval echo '${'$as_ac_Header'}'` = yes; then
8136 cat >>confdefs.h <<_ACEOF
8137#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8138_ACEOF
8139
8140fi
8141
8142done
8143
bec39cab 8144
a9322a30
TT
8145cat >>confdefs.h <<\_ACEOF
8146#define HAVE_LIBUNWIND 1
8147_ACEOF
8148
8149 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8150 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8151 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8152fi
8153
cb01cfba
JB
8154opt_curses=no
8155
8156# Check whether --with-curses or --without-curses was given.
8157if test "${with_curses+set}" = set; then
8158 withval="$with_curses"
8159 opt_curses=$withval
8160fi;
8161
76a39ba7 8162prefer_curses=no
cb01cfba 8163if test "$opt_curses" = "yes"; then
76a39ba7 8164 prefer_curses=yes
cb01cfba
JB
8165fi
8166
a9322a30
TT
8167# Profiling support.
8168# Check whether --enable-profiling or --disable-profiling was given.
8169if test "${enable_profiling+set}" = set; then
8170 enableval="$enable_profiling"
8171 case $enableval in
8172 yes | no)
8173 ;;
8174 *)
8175 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-profile" >&5
8176echo "$as_me: error: bad value $enableval for --enable-profile" >&2;}
8177 { (exit 1); exit 1; }; } ;;
8178 esac
8179else
8180 enable_profiling=no
b4e70030 8181fi;
bec39cab 8182
bec39cab 8183
a9322a30
TT
8184
8185for ac_func in monstartup _mcleanup
bec39cab 8186do
a9322a30
TT
8187as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8188echo "$as_me:$LINENO: checking for $ac_func" >&5
8189echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8190if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 8191 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8192else
a9322a30 8193 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8194/* confdefs.h. */
8195_ACEOF
8196cat confdefs.h >>conftest.$ac_ext
8197cat >>conftest.$ac_ext <<_ACEOF
8198/* end confdefs.h. */
a9322a30
TT
8199/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8200 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8201#define $ac_func innocuous_$ac_func
8202
8203/* System header to define __stub macros and hopefully few prototypes,
8204 which can conflict with char $ac_func (); below.
8205 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8206 <limits.h> exists even on freestanding compilers. */
8207
8208#ifdef __STDC__
8209# include <limits.h>
8210#else
8211# include <assert.h>
8212#endif
8213
8214#undef $ac_func
8215
8216/* Override any gcc2 internal prototype to avoid an error. */
8217#ifdef __cplusplus
8218extern "C"
8219{
8220#endif
8221/* We use char because int might match the return type of a gcc2
8222 builtin and then its argument prototype would still apply. */
8223char $ac_func ();
8224/* The GNU C library defines this for functions which it implements
8225 to always fail with ENOSYS. Some functions are actually named
8226 something starting with __ and the normal name is an alias. */
8227#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8228choke me
8229#else
8230char (*f) () = $ac_func;
8231#endif
8232#ifdef __cplusplus
8233}
8234#endif
8235
8236int
8237main ()
8238{
8239return f != $ac_func;
8240 ;
8241 return 0;
8242}
bec39cab 8243_ACEOF
a9322a30
TT
8244rm -f conftest.$ac_objext conftest$ac_exeext
8245if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8246 (eval $ac_link) 2>conftest.er1
bec39cab
AC
8247 ac_status=$?
8248 grep -v '^ *+' conftest.er1 >conftest.err
8249 rm -f conftest.er1
8250 cat conftest.err >&5
8251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8252 (exit $ac_status); } &&
b4e70030
JB
8253 { ac_try='test -z "$ac_c_werror_flag"
8254 || test ! -s conftest.err'
bec39cab
AC
8255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8256 (eval $ac_try) 2>&5
8257 ac_status=$?
8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8259 (exit $ac_status); }; } &&
a9322a30 8260 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
8261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8262 (eval $ac_try) 2>&5
8263 ac_status=$?
8264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8265 (exit $ac_status); }; }; then
a9322a30 8266 eval "$as_ac_var=yes"
bec39cab
AC
8267else
8268 echo "$as_me: failed program was:" >&5
8269sed 's/^/| /' conftest.$ac_ext >&5
8270
a9322a30 8271eval "$as_ac_var=no"
bec39cab 8272fi
a9322a30
TT
8273rm -f conftest.err conftest.$ac_objext \
8274 conftest$ac_exeext conftest.$ac_ext
bec39cab 8275fi
a9322a30
TT
8276echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8277echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8278if test `eval echo '${'$as_ac_var'}'` = yes; then
bec39cab 8279 cat >>confdefs.h <<_ACEOF
a9322a30 8280#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab
AC
8281_ACEOF
8282
8283fi
bec39cab
AC
8284done
8285
a9322a30
TT
8286echo "$as_me:$LINENO: checking for _etext" >&5
8287echo $ECHO_N "checking for _etext... $ECHO_C" >&6
8288if test "${ac_cv_var__etext+set}" = set; then
bec39cab 8289 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8290else
a9322a30 8291 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8292/* confdefs.h. */
8293_ACEOF
8294cat confdefs.h >>conftest.$ac_ext
8295cat >>conftest.$ac_ext <<_ACEOF
8296/* end confdefs.h. */
a9322a30
TT
8297#include <stdlib.h>
8298extern char _etext;
8299
8300int
8301main ()
8302{
8303free (&_etext);
8304 ;
8305 return 0;
8306}
bec39cab 8307_ACEOF
a9322a30
TT
8308rm -f conftest.$ac_objext conftest$ac_exeext
8309if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8310 (eval $ac_link) 2>conftest.er1
bec39cab
AC
8311 ac_status=$?
8312 grep -v '^ *+' conftest.er1 >conftest.err
8313 rm -f conftest.er1
8314 cat conftest.err >&5
8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8316 (exit $ac_status); } &&
b4e70030
JB
8317 { ac_try='test -z "$ac_c_werror_flag"
8318 || test ! -s conftest.err'
bec39cab
AC
8319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8320 (eval $ac_try) 2>&5
8321 ac_status=$?
8322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8323 (exit $ac_status); }; } &&
a9322a30 8324 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
8325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8326 (eval $ac_try) 2>&5
8327 ac_status=$?
8328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8329 (exit $ac_status); }; }; then
a9322a30 8330 ac_cv_var__etext=yes
bec39cab
AC
8331else
8332 echo "$as_me: failed program was:" >&5
8333sed 's/^/| /' conftest.$ac_ext >&5
8334
a9322a30 8335ac_cv_var__etext=no
bec39cab 8336fi
a9322a30
TT
8337rm -f conftest.err conftest.$ac_objext \
8338 conftest$ac_exeext conftest.$ac_ext
bec39cab 8339fi
a9322a30
TT
8340echo "$as_me:$LINENO: result: $ac_cv_var__etext" >&5
8341echo "${ECHO_T}$ac_cv_var__etext" >&6
8342if test $ac_cv_var__etext = yes; then
60ca704f
SE
8343
8344cat >>confdefs.h <<\_ACEOF
a9322a30 8345#define HAVE__ETEXT 1
bec39cab
AC
8346_ACEOF
8347
bec39cab 8348fi
a9322a30
TT
8349echo "$as_me:$LINENO: checking for etext" >&5
8350echo $ECHO_N "checking for etext... $ECHO_C" >&6
8351if test "${ac_cv_var_etext+set}" = set; then
bec39cab
AC
8352 echo $ECHO_N "(cached) $ECHO_C" >&6
8353else
8354 cat >conftest.$ac_ext <<_ACEOF
8355/* confdefs.h. */
8356_ACEOF
8357cat confdefs.h >>conftest.$ac_ext
8358cat >>conftest.$ac_ext <<_ACEOF
8359/* end confdefs.h. */
a9322a30
TT
8360#include <stdlib.h>
8361extern char etext;
bec39cab
AC
8362
8363int
8364main ()
8365{
a9322a30 8366free (&etext);
bec39cab
AC
8367 ;
8368 return 0;
8369}
8370_ACEOF
8371rm -f conftest.$ac_objext conftest$ac_exeext
8372if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8373 (eval $ac_link) 2>conftest.er1
8374 ac_status=$?
8375 grep -v '^ *+' conftest.er1 >conftest.err
8376 rm -f conftest.er1
8377 cat conftest.err >&5
8378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8379 (exit $ac_status); } &&
b4e70030
JB
8380 { ac_try='test -z "$ac_c_werror_flag"
8381 || test ! -s conftest.err'
bec39cab
AC
8382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8383 (eval $ac_try) 2>&5
8384 ac_status=$?
8385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8386 (exit $ac_status); }; } &&
8387 { ac_try='test -s conftest$ac_exeext'
8388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8389 (eval $ac_try) 2>&5
8390 ac_status=$?
8391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8392 (exit $ac_status); }; }; then
a9322a30 8393 ac_cv_var_etext=yes
bec39cab
AC
8394else
8395 echo "$as_me: failed program was:" >&5
8396sed 's/^/| /' conftest.$ac_ext >&5
8397
a9322a30 8398ac_cv_var_etext=no
bec39cab
AC
8399fi
8400rm -f conftest.err conftest.$ac_objext \
8401 conftest$ac_exeext conftest.$ac_ext
8402fi
a9322a30
TT
8403echo "$as_me:$LINENO: result: $ac_cv_var_etext" >&5
8404echo "${ECHO_T}$ac_cv_var_etext" >&6
8405if test $ac_cv_var_etext = yes; then
8406
8407cat >>confdefs.h <<\_ACEOF
8408#define HAVE_ETEXT 1
bec39cab
AC
8409_ACEOF
8410
8411fi
a9322a30
TT
8412if test "$enable_profiling" = yes ; then
8413 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
8414 { { echo "$as_me:$LINENO: error: --enable-profiling requires monstartup and _mcleanup" >&5
8415echo "$as_me: error: --enable-profiling requires monstartup and _mcleanup" >&2;}
8416 { (exit 1); exit 1; }; }
8417 fi
8418 PROFILE_CFLAGS=-pg
8419 OLD_CFLAGS="$CFLAGS"
8420 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8421
a9322a30
TT
8422 echo "$as_me:$LINENO: checking whether $CC supports -pg" >&5
8423echo $ECHO_N "checking whether $CC supports -pg... $ECHO_C" >&6
8424if test "${ac_cv_cc_supports_pg+set}" = set; then
bec39cab
AC
8425 echo $ECHO_N "(cached) $ECHO_C" >&6
8426else
8427 cat >conftest.$ac_ext <<_ACEOF
8428/* confdefs.h. */
8429_ACEOF
8430cat confdefs.h >>conftest.$ac_ext
8431cat >>conftest.$ac_ext <<_ACEOF
8432/* end confdefs.h. */
bec39cab
AC
8433
8434int
8435main ()
8436{
a9322a30 8437int x;
bec39cab
AC
8438 ;
8439 return 0;
8440}
8441_ACEOF
a9322a30
TT
8442rm -f conftest.$ac_objext
8443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8444 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
8445 ac_status=$?
8446 grep -v '^ *+' conftest.er1 >conftest.err
8447 rm -f conftest.er1
8448 cat conftest.err >&5
8449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8450 (exit $ac_status); } &&
b4e70030
JB
8451 { ac_try='test -z "$ac_c_werror_flag"
8452 || test ! -s conftest.err'
bec39cab
AC
8453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8454 (eval $ac_try) 2>&5
8455 ac_status=$?
8456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8457 (exit $ac_status); }; } &&
a9322a30 8458 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
8459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8460 (eval $ac_try) 2>&5
8461 ac_status=$?
8462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8463 (exit $ac_status); }; }; then
a9322a30 8464 ac_cv_cc_supports_pg=yes
bec39cab
AC
8465else
8466 echo "$as_me: failed program was:" >&5
8467sed 's/^/| /' conftest.$ac_ext >&5
8468
a9322a30 8469ac_cv_cc_supports_pg=no
bec39cab 8470fi
a9322a30 8471rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8472fi
a9322a30
TT
8473echo "$as_me:$LINENO: result: $ac_cv_cc_supports_pg" >&5
8474echo "${ECHO_T}$ac_cv_cc_supports_pg" >&6
bec39cab 8475
a9322a30
TT
8476 if test $ac_cv_cc_supports_pg = no; then
8477 { { echo "$as_me:$LINENO: error: --enable-profiling requires a compiler which supports -pg" >&5
8478echo "$as_me: error: --enable-profiling requires a compiler which supports -pg" >&2;}
8479 { (exit 1); exit 1; }; }
8480 fi
bec39cab 8481
a9322a30 8482 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8483fi
8484
c16158bc
JM
8485
8486
8487# Check whether --with-pkgversion or --without-pkgversion was given.
8488if test "${with_pkgversion+set}" = set; then
8489 withval="$with_pkgversion"
8490 case "$withval" in
8491 yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
8492echo "$as_me: error: package version not specified" >&2;}
8493 { (exit 1); exit 1; }; } ;;
8494 no) PKGVERSION= ;;
8495 *) PKGVERSION="($withval) " ;;
8496 esac
8497else
8498 PKGVERSION="(GDB) "
8499
8500fi;
8501
8502
8503
8504
8505# Check whether --with-bugurl or --without-bugurl was given.
8506if test "${with_bugurl+set}" = set; then
8507 withval="$with_bugurl"
8508 case "$withval" in
8509 yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
8510echo "$as_me: error: bug URL not specified" >&2;}
8511 { (exit 1); exit 1; }; } ;;
8512 no) BUGURL=
8513 ;;
8514 *) BUGURL="$withval"
8515 ;;
8516 esac
8517else
8518 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8519
8520fi;
8521 case ${BUGURL} in
8522 "")
8523 REPORT_BUGS_TO=
8524 REPORT_BUGS_TEXI=
8525 ;;
8526 *)
8527 REPORT_BUGS_TO="<$BUGURL>"
8528 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8529 ;;
8530 esac;
8531
8532
8533
8534
8535cat >>confdefs.h <<_ACEOF
8536#define PKGVERSION "$PKGVERSION"
8537_ACEOF
8538
8539
8540cat >>confdefs.h <<_ACEOF
8541#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8542_ACEOF
8543
8544
bec39cab
AC
8545# --------------------- #
8546# Checks for programs. #
8547# --------------------- #
8548
8549for ac_prog in gawk mawk nawk awk
8550do
8551 # Extract the first word of "$ac_prog", so it can be a program name with args.
8552set dummy $ac_prog; ac_word=$2
b4e70030
JB
8553echo "$as_me:$LINENO: checking for $ac_word" >&5
8554echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8555if test "${ac_cv_prog_AWK+set}" = set; then
8556 echo $ECHO_N "(cached) $ECHO_C" >&6
8557else
8558 if test -n "$AWK"; then
8559 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8560else
8561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8562for as_dir in $PATH
8563do
8564 IFS=$as_save_IFS
8565 test -z "$as_dir" && as_dir=.
8566 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8567 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8568 ac_cv_prog_AWK="$ac_prog"
8569 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8570 break 2
8571 fi
8572done
8573done
8574
8575fi
8576fi
8577AWK=$ac_cv_prog_AWK
8578if test -n "$AWK"; then
b4e70030
JB
8579 echo "$as_me:$LINENO: result: $AWK" >&5
8580echo "${ECHO_T}$AWK" >&6
bec39cab 8581else
b4e70030
JB
8582 echo "$as_me:$LINENO: result: no" >&5
8583echo "${ECHO_T}no" >&6
bec39cab
AC
8584fi
8585
8586 test -n "$AWK" && break
8587done
8588
8589# Find a good install program. We prefer a C program (faster),
8590# so one script is as good as another. But avoid the broken or
8591# incompatible versions:
8592# SysV /etc/install, /usr/sbin/install
8593# SunOS /usr/etc/install
8594# IRIX /sbin/install
8595# AIX /bin/install
8596# AmigaOS /C/install, which installs bootblocks on floppy discs
8597# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8598# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8599# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8600# OS/2's system install, which has a completely different semantic
8601# ./install, which can be erroneously created by make from ./install.sh.
85541719 8602# Reject install programs that cannot install multiple files.
b4e70030
JB
8603echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
8604echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
bec39cab
AC
8605if test -z "$INSTALL"; then
8606if test "${ac_cv_path_install+set}" = set; then
8607 echo $ECHO_N "(cached) $ECHO_C" >&6
8608else
8609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8610for as_dir in $PATH
8611do
8612 IFS=$as_save_IFS
8613 test -z "$as_dir" && as_dir=.
8614 # Account for people who put trailing slashes in PATH elements.
8615case $as_dir/ in
8616 ./ | .// | /cC/* | \
8617 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8618 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
8619 /usr/ucb/* ) ;;
c906108c 8620 *)
bec39cab
AC
8621 # OSF1 and SCO ODT 3.0 have their own names for install.
8622 # Don't use installbsd from OSF since it installs stuff as root
8623 # by default.
8624 for ac_prog in ginstall scoinst install; do
8625 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8626 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
bec39cab
AC
8627 if test $ac_prog = install &&
8628 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8629 # AIX install. It has an incompatible calling convention.
8630 :
8631 elif test $ac_prog = install &&
8632 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8633 # program-specific install script used by HP pwplus--don't use.
8634 :
8635 else
85541719
DE
8636 rm -rf conftest.one conftest.two conftest.dir
8637 echo one > conftest.one
8638 echo two > conftest.two
8639 mkdir conftest.dir
8640 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
8641 test -s conftest.one && test -s conftest.two &&
8642 test -s conftest.dir/conftest.one &&
8643 test -s conftest.dir/conftest.two
8644 then
8645 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8646 break 3
8647 fi
bec39cab
AC
8648 fi
8649 fi
8650 done
8651 done
8652 ;;
c906108c 8653esac
bec39cab
AC
8654done
8655
85541719 8656rm -rf conftest.one conftest.two conftest.dir
bec39cab
AC
8657
8658fi
8659 if test "${ac_cv_path_install+set}" = set; then
8660 INSTALL=$ac_cv_path_install
8661 else
85541719
DE
8662 # As a last resort, use the slow shell script. Don't cache a
8663 # value for INSTALL within a source directory, because that will
bec39cab 8664 # break other packages using the cache if that directory is
85541719 8665 # removed, or if the value is a relative name.
bec39cab
AC
8666 INSTALL=$ac_install_sh
8667 fi
8668fi
b4e70030
JB
8669echo "$as_me:$LINENO: result: $INSTALL" >&5
8670echo "${ECHO_T}$INSTALL" >&6
bec39cab
AC
8671
8672# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8673# It thinks the first close brace ends the variable substitution.
8674test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8675
8676test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8677
8678test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8679
b4e70030
JB
8680echo "$as_me:$LINENO: checking whether ln -s works" >&5
8681echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
bec39cab
AC
8682LN_S=$as_ln_s
8683if test "$LN_S" = "ln -s"; then
b4e70030
JB
8684 echo "$as_me:$LINENO: result: yes" >&5
8685echo "${ECHO_T}yes" >&6
bec39cab 8686else
b4e70030
JB
8687 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
8688echo "${ECHO_T}no, using $LN_S" >&6
bec39cab
AC
8689fi
8690
8691if test -n "$ac_tool_prefix"; then
8692 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8693set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b4e70030
JB
8694echo "$as_me:$LINENO: checking for $ac_word" >&5
8695echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8696if test "${ac_cv_prog_RANLIB+set}" = set; then
8697 echo $ECHO_N "(cached) $ECHO_C" >&6
8698else
8699 if test -n "$RANLIB"; then
8700 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8701else
8702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703for as_dir in $PATH
8704do
8705 IFS=$as_save_IFS
8706 test -z "$as_dir" && as_dir=.
8707 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8708 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8709 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8710 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8711 break 2
8712 fi
8713done
8714done
8715
8716fi
8717fi
8718RANLIB=$ac_cv_prog_RANLIB
8719if test -n "$RANLIB"; then
b4e70030
JB
8720 echo "$as_me:$LINENO: result: $RANLIB" >&5
8721echo "${ECHO_T}$RANLIB" >&6
bec39cab 8722else
b4e70030
JB
8723 echo "$as_me:$LINENO: result: no" >&5
8724echo "${ECHO_T}no" >&6
bec39cab
AC
8725fi
8726
8727fi
8728if test -z "$ac_cv_prog_RANLIB"; then
8729 ac_ct_RANLIB=$RANLIB
8730 # Extract the first word of "ranlib", so it can be a program name with args.
8731set dummy ranlib; ac_word=$2
b4e70030
JB
8732echo "$as_me:$LINENO: checking for $ac_word" >&5
8733echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8734if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8735 echo $ECHO_N "(cached) $ECHO_C" >&6
8736else
8737 if test -n "$ac_ct_RANLIB"; then
8738 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8739else
8740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8741for as_dir in $PATH
8742do
8743 IFS=$as_save_IFS
8744 test -z "$as_dir" && as_dir=.
8745 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8746 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8747 ac_cv_prog_ac_ct_RANLIB="ranlib"
8748 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8749 break 2
8750 fi
8751done
8752done
8753
b4e70030 8754 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
bec39cab
AC
8755fi
8756fi
8757ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8758if test -n "$ac_ct_RANLIB"; then
b4e70030
JB
8759 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8760echo "${ECHO_T}$ac_ct_RANLIB" >&6
bec39cab 8761else
b4e70030
JB
8762 echo "$as_me:$LINENO: result: no" >&5
8763echo "${ECHO_T}no" >&6
bec39cab
AC
8764fi
8765
b4e70030 8766 RANLIB=$ac_ct_RANLIB
bec39cab
AC
8767else
8768 RANLIB="$ac_cv_prog_RANLIB"
8769fi
8770
8771for ac_prog in 'bison -y' byacc
8772do
8773 # Extract the first word of "$ac_prog", so it can be a program name with args.
8774set dummy $ac_prog; ac_word=$2
b4e70030
JB
8775echo "$as_me:$LINENO: checking for $ac_word" >&5
8776echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8777if test "${ac_cv_prog_YACC+set}" = set; then
8778 echo $ECHO_N "(cached) $ECHO_C" >&6
8779else
8780 if test -n "$YACC"; then
8781 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8782else
8783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8784for as_dir in $PATH
8785do
8786 IFS=$as_save_IFS
8787 test -z "$as_dir" && as_dir=.
8788 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8789 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8790 ac_cv_prog_YACC="$ac_prog"
8791 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8792 break 2
8793 fi
8794done
8795done
8796
8797fi
8798fi
8799YACC=$ac_cv_prog_YACC
8800if test -n "$YACC"; then
b4e70030
JB
8801 echo "$as_me:$LINENO: result: $YACC" >&5
8802echo "${ECHO_T}$YACC" >&6
bec39cab 8803else
b4e70030
JB
8804 echo "$as_me:$LINENO: result: no" >&5
8805echo "${ECHO_T}no" >&6
bec39cab
AC
8806fi
8807
8808 test -n "$YACC" && break
8809done
8810test -n "$YACC" || YACC="yacc"
8811
8812
8813if test -n "$ac_tool_prefix"; then
8814 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8815set dummy ${ac_tool_prefix}ar; ac_word=$2
b4e70030
JB
8816echo "$as_me:$LINENO: checking for $ac_word" >&5
8817echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8818if test "${ac_cv_prog_AR+set}" = set; then
8819 echo $ECHO_N "(cached) $ECHO_C" >&6
8820else
8821 if test -n "$AR"; then
8822 ac_cv_prog_AR="$AR" # Let the user override the test.
8823else
8824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8825for as_dir in $PATH
8826do
8827 IFS=$as_save_IFS
8828 test -z "$as_dir" && as_dir=.
8829 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8830 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8831 ac_cv_prog_AR="${ac_tool_prefix}ar"
8832 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8833 break 2
8834 fi
8835done
8836done
8837
8838fi
8839fi
8840AR=$ac_cv_prog_AR
8841if test -n "$AR"; then
b4e70030
JB
8842 echo "$as_me:$LINENO: result: $AR" >&5
8843echo "${ECHO_T}$AR" >&6
bec39cab 8844else
b4e70030
JB
8845 echo "$as_me:$LINENO: result: no" >&5
8846echo "${ECHO_T}no" >&6
bec39cab
AC
8847fi
8848
8849fi
8850if test -z "$ac_cv_prog_AR"; then
8851 ac_ct_AR=$AR
8852 # Extract the first word of "ar", so it can be a program name with args.
8853set dummy ar; ac_word=$2
b4e70030
JB
8854echo "$as_me:$LINENO: checking for $ac_word" >&5
8855echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8856if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
8857 echo $ECHO_N "(cached) $ECHO_C" >&6
8858else
8859 if test -n "$ac_ct_AR"; then
8860 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8861else
8862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8863for as_dir in $PATH
8864do
8865 IFS=$as_save_IFS
8866 test -z "$as_dir" && as_dir=.
8867 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8868 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8869 ac_cv_prog_ac_ct_AR="ar"
8870 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8871 break 2
8872 fi
8873done
8874done
8875
8876fi
8877fi
8878ac_ct_AR=$ac_cv_prog_ac_ct_AR
8879if test -n "$ac_ct_AR"; then
b4e70030
JB
8880 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
8881echo "${ECHO_T}$ac_ct_AR" >&6
bec39cab 8882else
b4e70030
JB
8883 echo "$as_me:$LINENO: result: no" >&5
8884echo "${ECHO_T}no" >&6
bec39cab
AC
8885fi
8886
b4e70030 8887 AR=$ac_ct_AR
bec39cab
AC
8888else
8889 AR="$ac_cv_prog_AR"
8890fi
8891
8892if test -n "$ac_tool_prefix"; then
8893 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8894set dummy ${ac_tool_prefix}dlltool; ac_word=$2
b4e70030
JB
8895echo "$as_me:$LINENO: checking for $ac_word" >&5
8896echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8897if test "${ac_cv_prog_DLLTOOL+set}" = set; then
8898 echo $ECHO_N "(cached) $ECHO_C" >&6
8899else
8900 if test -n "$DLLTOOL"; then
8901 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8902else
8903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8904for as_dir in $PATH
8905do
8906 IFS=$as_save_IFS
8907 test -z "$as_dir" && as_dir=.
8908 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8909 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8910 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8911 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8912 break 2
8913 fi
8914done
8915done
8916
8917fi
8918fi
8919DLLTOOL=$ac_cv_prog_DLLTOOL
8920if test -n "$DLLTOOL"; then
b4e70030
JB
8921 echo "$as_me:$LINENO: result: $DLLTOOL" >&5
8922echo "${ECHO_T}$DLLTOOL" >&6
bec39cab 8923else
b4e70030
JB
8924 echo "$as_me:$LINENO: result: no" >&5
8925echo "${ECHO_T}no" >&6
bec39cab
AC
8926fi
8927
8928fi
8929if test -z "$ac_cv_prog_DLLTOOL"; then
8930 ac_ct_DLLTOOL=$DLLTOOL
8931 # Extract the first word of "dlltool", so it can be a program name with args.
8932set dummy dlltool; ac_word=$2
b4e70030
JB
8933echo "$as_me:$LINENO: checking for $ac_word" >&5
8934echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8935if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
8936 echo $ECHO_N "(cached) $ECHO_C" >&6
8937else
8938 if test -n "$ac_ct_DLLTOOL"; then
8939 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8940else
8941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8942for as_dir in $PATH
8943do
8944 IFS=$as_save_IFS
8945 test -z "$as_dir" && as_dir=.
8946 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8947 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8948 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8949 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8950 break 2
8951 fi
8952done
8953done
8954
8955fi
8956fi
8957ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8958if test -n "$ac_ct_DLLTOOL"; then
b4e70030
JB
8959 echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
8960echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
bec39cab 8961else
b4e70030
JB
8962 echo "$as_me:$LINENO: result: no" >&5
8963echo "${ECHO_T}no" >&6
bec39cab
AC
8964fi
8965
b4e70030 8966 DLLTOOL=$ac_ct_DLLTOOL
bec39cab
AC
8967else
8968 DLLTOOL="$ac_cv_prog_DLLTOOL"
8969fi
8970
8971if test -n "$ac_tool_prefix"; then
8972 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8973set dummy ${ac_tool_prefix}windres; ac_word=$2
b4e70030
JB
8974echo "$as_me:$LINENO: checking for $ac_word" >&5
8975echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8976if test "${ac_cv_prog_WINDRES+set}" = set; then
8977 echo $ECHO_N "(cached) $ECHO_C" >&6
8978else
8979 if test -n "$WINDRES"; then
8980 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8981else
8982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8983for as_dir in $PATH
8984do
8985 IFS=$as_save_IFS
8986 test -z "$as_dir" && as_dir=.
8987 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8988 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8989 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
8990 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8991 break 2
8992 fi
8993done
8994done
8995
8996fi
8997fi
8998WINDRES=$ac_cv_prog_WINDRES
8999if test -n "$WINDRES"; then
b4e70030
JB
9000 echo "$as_me:$LINENO: result: $WINDRES" >&5
9001echo "${ECHO_T}$WINDRES" >&6
bec39cab 9002else
b4e70030
JB
9003 echo "$as_me:$LINENO: result: no" >&5
9004echo "${ECHO_T}no" >&6
bec39cab
AC
9005fi
9006
9007fi
9008if test -z "$ac_cv_prog_WINDRES"; then
9009 ac_ct_WINDRES=$WINDRES
9010 # Extract the first word of "windres", so it can be a program name with args.
9011set dummy windres; ac_word=$2
b4e70030
JB
9012echo "$as_me:$LINENO: checking for $ac_word" >&5
9013echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9014if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
9015 echo $ECHO_N "(cached) $ECHO_C" >&6
9016else
9017 if test -n "$ac_ct_WINDRES"; then
9018 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9019else
9020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9021for as_dir in $PATH
9022do
9023 IFS=$as_save_IFS
9024 test -z "$as_dir" && as_dir=.
9025 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9026 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9027 ac_cv_prog_ac_ct_WINDRES="windres"
9028 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9029 break 2
9030 fi
9031done
9032done
9033
9034fi
9035fi
9036ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9037if test -n "$ac_ct_WINDRES"; then
b4e70030
JB
9038 echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
9039echo "${ECHO_T}$ac_ct_WINDRES" >&6
bec39cab 9040else
b4e70030
JB
9041 echo "$as_me:$LINENO: result: no" >&5
9042echo "${ECHO_T}no" >&6
c906108c 9043fi
bec39cab 9044
b4e70030 9045 WINDRES=$ac_ct_WINDRES
c906108c 9046else
bec39cab 9047 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
9048fi
9049
bec39cab
AC
9050
9051# Needed for GNU/Hurd.
9052if test -n "$ac_tool_prefix"; then
9053 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
9054set dummy ${ac_tool_prefix}mig; ac_word=$2
b4e70030
JB
9055echo "$as_me:$LINENO: checking for $ac_word" >&5
9056echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9057if test "${ac_cv_prog_MIG+set}" = set; then
9058 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 9059else
bec39cab
AC
9060 if test -n "$MIG"; then
9061 ac_cv_prog_MIG="$MIG" # Let the user override the test.
9062else
9063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9064for as_dir in $PATH
9065do
9066 IFS=$as_save_IFS
9067 test -z "$as_dir" && as_dir=.
9068 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9069 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9070 ac_cv_prog_MIG="${ac_tool_prefix}mig"
9071 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9072 break 2
9073 fi
9074done
9075done
9076
c906108c 9077fi
bec39cab
AC
9078fi
9079MIG=$ac_cv_prog_MIG
9080if test -n "$MIG"; then
b4e70030
JB
9081 echo "$as_me:$LINENO: result: $MIG" >&5
9082echo "${ECHO_T}$MIG" >&6
c906108c 9083else
b4e70030
JB
9084 echo "$as_me:$LINENO: result: no" >&5
9085echo "${ECHO_T}no" >&6
c906108c
SS
9086fi
9087
bec39cab
AC
9088fi
9089if test -z "$ac_cv_prog_MIG"; then
9090 ac_ct_MIG=$MIG
9091 # Extract the first word of "mig", so it can be a program name with args.
9092set dummy mig; ac_word=$2
b4e70030
JB
9093echo "$as_me:$LINENO: checking for $ac_word" >&5
9094echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9095if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then
9096 echo $ECHO_N "(cached) $ECHO_C" >&6
9097else
9098 if test -n "$ac_ct_MIG"; then
9099 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
9100else
9101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9102for as_dir in $PATH
9103do
9104 IFS=$as_save_IFS
9105 test -z "$as_dir" && as_dir=.
9106 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9107 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9108 ac_cv_prog_ac_ct_MIG="mig"
9109 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9110 break 2
9111 fi
9112done
9113done
c906108c 9114
bec39cab
AC
9115fi
9116fi
9117ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9118if test -n "$ac_ct_MIG"; then
b4e70030
JB
9119 echo "$as_me:$LINENO: result: $ac_ct_MIG" >&5
9120echo "${ECHO_T}$ac_ct_MIG" >&6
bec39cab 9121else
b4e70030
JB
9122 echo "$as_me:$LINENO: result: no" >&5
9123echo "${ECHO_T}no" >&6
bec39cab 9124fi
c906108c 9125
b4e70030 9126 MIG=$ac_ct_MIG
bec39cab
AC
9127else
9128 MIG="$ac_cv_prog_MIG"
9129fi
c906108c 9130
c906108c 9131
bec39cab
AC
9132# ---------------------- #
9133# Checks for libraries. #
9134# ---------------------- #
c906108c 9135
bec39cab 9136# We might need to link with -lm; most simulators need it.
c906108c 9137
b4e70030
JB
9138echo "$as_me:$LINENO: checking for main in -lm" >&5
9139echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
bec39cab
AC
9140if test "${ac_cv_lib_m_main+set}" = set; then
9141 echo $ECHO_N "(cached) $ECHO_C" >&6
9142else
9143 ac_check_lib_save_LIBS=$LIBS
9144LIBS="-lm $LIBS"
9145cat >conftest.$ac_ext <<_ACEOF
9146/* confdefs.h. */
9147_ACEOF
9148cat confdefs.h >>conftest.$ac_ext
9149cat >>conftest.$ac_ext <<_ACEOF
9150/* end confdefs.h. */
c906108c 9151
c906108c 9152
bec39cab
AC
9153int
9154main ()
9155{
b4e70030 9156main ();
bec39cab
AC
9157 ;
9158 return 0;
9159}
9160_ACEOF
9161rm -f conftest.$ac_objext conftest$ac_exeext
9162if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9163 (eval $ac_link) 2>conftest.er1
9164 ac_status=$?
9165 grep -v '^ *+' conftest.er1 >conftest.err
9166 rm -f conftest.er1
9167 cat conftest.err >&5
9168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9169 (exit $ac_status); } &&
b4e70030
JB
9170 { ac_try='test -z "$ac_c_werror_flag"
9171 || test ! -s conftest.err'
bec39cab
AC
9172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9173 (eval $ac_try) 2>&5
9174 ac_status=$?
9175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); }; } &&
9177 { ac_try='test -s conftest$ac_exeext'
9178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9179 (eval $ac_try) 2>&5
9180 ac_status=$?
9181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9182 (exit $ac_status); }; }; then
9183 ac_cv_lib_m_main=yes
9184else
9185 echo "$as_me: failed program was:" >&5
9186sed 's/^/| /' conftest.$ac_ext >&5
9187
b4e70030 9188ac_cv_lib_m_main=no
bec39cab
AC
9189fi
9190rm -f conftest.err conftest.$ac_objext \
9191 conftest$ac_exeext conftest.$ac_ext
9192LIBS=$ac_check_lib_save_LIBS
9193fi
b4e70030
JB
9194echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
9195echo "${ECHO_T}$ac_cv_lib_m_main" >&6
bec39cab
AC
9196if test $ac_cv_lib_m_main = yes; then
9197 cat >>confdefs.h <<_ACEOF
9198#define HAVE_LIBM 1
9199_ACEOF
9200
9201 LIBS="-lm $LIBS"
c906108c 9202
c906108c 9203fi
bec39cab
AC
9204
9205
9206# We need to link with -lw to get `wctype' on Solaris before Solaris
9207# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9208# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9209# is known to have this problem). Therefore we avoid libw if we can.
b4e70030
JB
9210echo "$as_me:$LINENO: checking for wctype" >&5
9211echo $ECHO_N "checking for wctype... $ECHO_C" >&6
bec39cab
AC
9212if test "${ac_cv_func_wctype+set}" = set; then
9213 echo $ECHO_N "(cached) $ECHO_C" >&6
9214else
9215 cat >conftest.$ac_ext <<_ACEOF
9216/* confdefs.h. */
9217_ACEOF
9218cat confdefs.h >>conftest.$ac_ext
9219cat >>conftest.$ac_ext <<_ACEOF
9220/* end confdefs.h. */
9221/* Define wctype to an innocuous variant, in case <limits.h> declares wctype.
9222 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9223#define wctype innocuous_wctype
9224
9225/* System header to define __stub macros and hopefully few prototypes,
9226 which can conflict with char wctype (); below.
9227 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9228 <limits.h> exists even on freestanding compilers. */
9229
9230#ifdef __STDC__
9231# include <limits.h>
9232#else
9233# include <assert.h>
9234#endif
9235
9236#undef wctype
9237
b4e70030 9238/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9239#ifdef __cplusplus
9240extern "C"
b4e70030 9241{
bec39cab 9242#endif
b4e70030
JB
9243/* We use char because int might match the return type of a gcc2
9244 builtin and then its argument prototype would still apply. */
bec39cab
AC
9245char wctype ();
9246/* The GNU C library defines this for functions which it implements
9247 to always fail with ENOSYS. Some functions are actually named
9248 something starting with __ and the normal name is an alias. */
b4e70030 9249#if defined (__stub_wctype) || defined (__stub___wctype)
bec39cab 9250choke me
b4e70030
JB
9251#else
9252char (*f) () = wctype;
9253#endif
9254#ifdef __cplusplus
9255}
bec39cab
AC
9256#endif
9257
9258int
9259main ()
9260{
b4e70030 9261return f != wctype;
bec39cab
AC
9262 ;
9263 return 0;
9264}
9265_ACEOF
9266rm -f conftest.$ac_objext conftest$ac_exeext
9267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9268 (eval $ac_link) 2>conftest.er1
9269 ac_status=$?
9270 grep -v '^ *+' conftest.er1 >conftest.err
9271 rm -f conftest.er1
9272 cat conftest.err >&5
9273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9274 (exit $ac_status); } &&
b4e70030
JB
9275 { ac_try='test -z "$ac_c_werror_flag"
9276 || test ! -s conftest.err'
bec39cab
AC
9277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9278 (eval $ac_try) 2>&5
9279 ac_status=$?
9280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9281 (exit $ac_status); }; } &&
9282 { ac_try='test -s conftest$ac_exeext'
9283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9284 (eval $ac_try) 2>&5
9285 ac_status=$?
9286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9287 (exit $ac_status); }; }; then
9288 ac_cv_func_wctype=yes
9289else
9290 echo "$as_me: failed program was:" >&5
9291sed 's/^/| /' conftest.$ac_ext >&5
9292
b4e70030 9293ac_cv_func_wctype=no
bec39cab
AC
9294fi
9295rm -f conftest.err conftest.$ac_objext \
9296 conftest$ac_exeext conftest.$ac_ext
9297fi
b4e70030
JB
9298echo "$as_me:$LINENO: result: $ac_cv_func_wctype" >&5
9299echo "${ECHO_T}$ac_cv_func_wctype" >&6
bec39cab
AC
9300if test $ac_cv_func_wctype = yes; then
9301 :
c906108c 9302else
c906108c 9303
b4e70030
JB
9304echo "$as_me:$LINENO: checking for wctype in -lw" >&5
9305echo $ECHO_N "checking for wctype in -lw... $ECHO_C" >&6
bec39cab
AC
9306if test "${ac_cv_lib_w_wctype+set}" = set; then
9307 echo $ECHO_N "(cached) $ECHO_C" >&6
9308else
9309 ac_check_lib_save_LIBS=$LIBS
9310LIBS="-lw $LIBS"
9311cat >conftest.$ac_ext <<_ACEOF
9312/* confdefs.h. */
9313_ACEOF
9314cat confdefs.h >>conftest.$ac_ext
9315cat >>conftest.$ac_ext <<_ACEOF
9316/* end confdefs.h. */
c906108c 9317
b4e70030 9318/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9319#ifdef __cplusplus
9320extern "C"
9321#endif
b4e70030
JB
9322/* We use char because int might match the return type of a gcc2
9323 builtin and then its argument prototype would still apply. */
bec39cab
AC
9324char wctype ();
9325int
9326main ()
9327{
b4e70030 9328wctype ();
bec39cab
AC
9329 ;
9330 return 0;
9331}
9332_ACEOF
9333rm -f conftest.$ac_objext conftest$ac_exeext
9334if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9335 (eval $ac_link) 2>conftest.er1
9336 ac_status=$?
9337 grep -v '^ *+' conftest.er1 >conftest.err
9338 rm -f conftest.er1
9339 cat conftest.err >&5
9340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9341 (exit $ac_status); } &&
b4e70030
JB
9342 { ac_try='test -z "$ac_c_werror_flag"
9343 || test ! -s conftest.err'
bec39cab
AC
9344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9345 (eval $ac_try) 2>&5
9346 ac_status=$?
9347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9348 (exit $ac_status); }; } &&
9349 { ac_try='test -s conftest$ac_exeext'
9350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9351 (eval $ac_try) 2>&5
9352 ac_status=$?
9353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9354 (exit $ac_status); }; }; then
9355 ac_cv_lib_w_wctype=yes
9356else
9357 echo "$as_me: failed program was:" >&5
9358sed 's/^/| /' conftest.$ac_ext >&5
9359
b4e70030 9360ac_cv_lib_w_wctype=no
bec39cab
AC
9361fi
9362rm -f conftest.err conftest.$ac_objext \
9363 conftest$ac_exeext conftest.$ac_ext
9364LIBS=$ac_check_lib_save_LIBS
9365fi
b4e70030
JB
9366echo "$as_me:$LINENO: result: $ac_cv_lib_w_wctype" >&5
9367echo "${ECHO_T}$ac_cv_lib_w_wctype" >&6
bec39cab
AC
9368if test $ac_cv_lib_w_wctype = yes; then
9369 cat >>confdefs.h <<_ACEOF
9370#define HAVE_LIBW 1
9371_ACEOF
c906108c 9372
bec39cab 9373 LIBS="-lw $LIBS"
c906108c 9374
bec39cab 9375fi
c906108c 9376
bec39cab 9377fi
c906108c 9378
ddc9cd0f 9379
bec39cab 9380# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
b4e70030
JB
9381echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
9382echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
bec39cab
AC
9383if test "${ac_cv_search_gethostbyname+set}" = set; then
9384 echo $ECHO_N "(cached) $ECHO_C" >&6
9385else
9386 ac_func_search_save_LIBS=$LIBS
b4e70030 9387ac_cv_search_gethostbyname=no
bec39cab
AC
9388cat >conftest.$ac_ext <<_ACEOF
9389/* confdefs.h. */
9390_ACEOF
9391cat confdefs.h >>conftest.$ac_ext
9392cat >>conftest.$ac_ext <<_ACEOF
9393/* end confdefs.h. */
ddc9cd0f 9394
b4e70030 9395/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9396#ifdef __cplusplus
9397extern "C"
9398#endif
b4e70030
JB
9399/* We use char because int might match the return type of a gcc2
9400 builtin and then its argument prototype would still apply. */
bec39cab
AC
9401char gethostbyname ();
9402int
9403main ()
9404{
b4e70030 9405gethostbyname ();
bec39cab
AC
9406 ;
9407 return 0;
9408}
9409_ACEOF
b4e70030 9410rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9411if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9412 (eval $ac_link) 2>conftest.er1
9413 ac_status=$?
9414 grep -v '^ *+' conftest.er1 >conftest.err
9415 rm -f conftest.er1
9416 cat conftest.err >&5
9417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9418 (exit $ac_status); } &&
b4e70030
JB
9419 { ac_try='test -z "$ac_c_werror_flag"
9420 || test ! -s conftest.err'
bec39cab
AC
9421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9422 (eval $ac_try) 2>&5
9423 ac_status=$?
9424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9425 (exit $ac_status); }; } &&
9426 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
b4e70030 9432 ac_cv_search_gethostbyname="none required"
bec39cab
AC
9433else
9434 echo "$as_me: failed program was:" >&5
9435sed 's/^/| /' conftest.$ac_ext >&5
ddc9cd0f 9436
bec39cab
AC
9437fi
9438rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
9439 conftest$ac_exeext conftest.$ac_ext
9440if test "$ac_cv_search_gethostbyname" = no; then
9441 for ac_lib in nsl; do
9442 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9443 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
9444/* confdefs.h. */
9445_ACEOF
9446cat confdefs.h >>conftest.$ac_ext
9447cat >>conftest.$ac_ext <<_ACEOF
9448/* end confdefs.h. */
ddc9cd0f 9449
b4e70030 9450/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9451#ifdef __cplusplus
9452extern "C"
9453#endif
b4e70030
JB
9454/* We use char because int might match the return type of a gcc2
9455 builtin and then its argument prototype would still apply. */
9456char gethostbyname ();
bec39cab
AC
9457int
9458main ()
9459{
b4e70030 9460gethostbyname ();
bec39cab
AC
9461 ;
9462 return 0;
9463}
9464_ACEOF
b4e70030 9465rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9466if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9467 (eval $ac_link) 2>conftest.er1
9468 ac_status=$?
9469 grep -v '^ *+' conftest.er1 >conftest.err
9470 rm -f conftest.er1
9471 cat conftest.err >&5
9472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9473 (exit $ac_status); } &&
b4e70030
JB
9474 { ac_try='test -z "$ac_c_werror_flag"
9475 || test ! -s conftest.err'
bec39cab
AC
9476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9477 (eval $ac_try) 2>&5
9478 ac_status=$?
9479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9480 (exit $ac_status); }; } &&
9481 { ac_try='test -s conftest$ac_exeext'
9482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9483 (eval $ac_try) 2>&5
9484 ac_status=$?
9485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9486 (exit $ac_status); }; }; then
b4e70030
JB
9487 ac_cv_search_gethostbyname="-l$ac_lib"
9488break
bec39cab
AC
9489else
9490 echo "$as_me: failed program was:" >&5
9491sed 's/^/| /' conftest.$ac_ext >&5
9492
9493fi
9494rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
9495 conftest$ac_exeext conftest.$ac_ext
9496 done
bec39cab
AC
9497fi
9498LIBS=$ac_func_search_save_LIBS
9499fi
b4e70030
JB
9500echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
9501echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
9502if test "$ac_cv_search_gethostbyname" != no; then
9503 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
96baa820 9504
bec39cab 9505fi
96baa820 9506
c906108c 9507
b4e70030
JB
9508# Some systems (e.g. Solaris) have `socketpair' in libsocket.
9509echo "$as_me:$LINENO: checking for library containing socketpair" >&5
9510echo $ECHO_N "checking for library containing socketpair... $ECHO_C" >&6
9511if test "${ac_cv_search_socketpair+set}" = set; then
9512 echo $ECHO_N "(cached) $ECHO_C" >&6
9513else
9514 ac_func_search_save_LIBS=$LIBS
9515ac_cv_search_socketpair=no
9516cat >conftest.$ac_ext <<_ACEOF
9517/* confdefs.h. */
9518_ACEOF
9519cat confdefs.h >>conftest.$ac_ext
9520cat >>conftest.$ac_ext <<_ACEOF
9521/* end confdefs.h. */
9522
9523/* Override any gcc2 internal prototype to avoid an error. */
9524#ifdef __cplusplus
9525extern "C"
9526#endif
9527/* We use char because int might match the return type of a gcc2
9528 builtin and then its argument prototype would still apply. */
9529char socketpair ();
9530int
9531main ()
9532{
9533socketpair ();
9534 ;
9535 return 0;
9536}
9537_ACEOF
9538rm -f conftest.$ac_objext conftest$ac_exeext
9539if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9540 (eval $ac_link) 2>conftest.er1
9541 ac_status=$?
9542 grep -v '^ *+' conftest.er1 >conftest.err
9543 rm -f conftest.er1
9544 cat conftest.err >&5
9545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9546 (exit $ac_status); } &&
9547 { ac_try='test -z "$ac_c_werror_flag"
9548 || test ! -s conftest.err'
9549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9550 (eval $ac_try) 2>&5
9551 ac_status=$?
9552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9553 (exit $ac_status); }; } &&
9554 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
9560 ac_cv_search_socketpair="none required"
9561else
9562 echo "$as_me: failed program was:" >&5
9563sed 's/^/| /' conftest.$ac_ext >&5
9564
9565fi
9566rm -f conftest.err conftest.$ac_objext \
9567 conftest$ac_exeext conftest.$ac_ext
9568if test "$ac_cv_search_socketpair" = no; then
9569 for ac_lib in socket; do
9570 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9571 cat >conftest.$ac_ext <<_ACEOF
9572/* confdefs.h. */
9573_ACEOF
9574cat confdefs.h >>conftest.$ac_ext
9575cat >>conftest.$ac_ext <<_ACEOF
9576/* end confdefs.h. */
9577
9578/* Override any gcc2 internal prototype to avoid an error. */
9579#ifdef __cplusplus
9580extern "C"
9581#endif
9582/* We use char because int might match the return type of a gcc2
9583 builtin and then its argument prototype would still apply. */
9584char socketpair ();
9585int
9586main ()
9587{
9588socketpair ();
9589 ;
9590 return 0;
9591}
9592_ACEOF
9593rm -f conftest.$ac_objext conftest$ac_exeext
9594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9595 (eval $ac_link) 2>conftest.er1
9596 ac_status=$?
9597 grep -v '^ *+' conftest.er1 >conftest.err
9598 rm -f conftest.er1
9599 cat conftest.err >&5
9600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9601 (exit $ac_status); } &&
9602 { ac_try='test -z "$ac_c_werror_flag"
9603 || test ! -s conftest.err'
9604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9605 (eval $ac_try) 2>&5
9606 ac_status=$?
9607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9608 (exit $ac_status); }; } &&
9609 { ac_try='test -s conftest$ac_exeext'
9610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9611 (eval $ac_try) 2>&5
9612 ac_status=$?
9613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9614 (exit $ac_status); }; }; then
9615 ac_cv_search_socketpair="-l$ac_lib"
9616break
9617else
9618 echo "$as_me: failed program was:" >&5
9619sed 's/^/| /' conftest.$ac_ext >&5
9620
9621fi
9622rm -f conftest.err conftest.$ac_objext \
9623 conftest$ac_exeext conftest.$ac_ext
9624 done
9625fi
9626LIBS=$ac_func_search_save_LIBS
9627fi
9628echo "$as_me:$LINENO: result: $ac_cv_search_socketpair" >&5
9629echo "${ECHO_T}$ac_cv_search_socketpair" >&6
9630if test "$ac_cv_search_socketpair" != no; then
9631 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
9632
9633fi
9634
9635
233a11ab
CS
9636# Link in zlib if we can. This allows us to read compressed debug sections.
9637echo "$as_me:$LINENO: checking for library containing zlibVersion" >&5
9638echo $ECHO_N "checking for library containing zlibVersion... $ECHO_C" >&6
9639if test "${ac_cv_search_zlibVersion+set}" = set; then
9640 echo $ECHO_N "(cached) $ECHO_C" >&6
9641else
9642 ac_func_search_save_LIBS=$LIBS
9643ac_cv_search_zlibVersion=no
9644cat >conftest.$ac_ext <<_ACEOF
9645/* confdefs.h. */
9646_ACEOF
9647cat confdefs.h >>conftest.$ac_ext
9648cat >>conftest.$ac_ext <<_ACEOF
9649/* end confdefs.h. */
9650
9651/* Override any gcc2 internal prototype to avoid an error. */
9652#ifdef __cplusplus
9653extern "C"
9654#endif
9655/* We use char because int might match the return type of a gcc2
9656 builtin and then its argument prototype would still apply. */
9657char zlibVersion ();
9658int
9659main ()
9660{
9661zlibVersion ();
9662 ;
9663 return 0;
9664}
9665_ACEOF
9666rm -f conftest.$ac_objext conftest$ac_exeext
9667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9668 (eval $ac_link) 2>conftest.er1
9669 ac_status=$?
9670 grep -v '^ *+' conftest.er1 >conftest.err
9671 rm -f conftest.er1
9672 cat conftest.err >&5
9673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9674 (exit $ac_status); } &&
9675 { ac_try='test -z "$ac_c_werror_flag"
9676 || test ! -s conftest.err'
9677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9678 (eval $ac_try) 2>&5
9679 ac_status=$?
9680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9681 (exit $ac_status); }; } &&
9682 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
9688 ac_cv_search_zlibVersion="none required"
9689else
9690 echo "$as_me: failed program was:" >&5
9691sed 's/^/| /' conftest.$ac_ext >&5
9692
9693fi
9694rm -f conftest.err conftest.$ac_objext \
9695 conftest$ac_exeext conftest.$ac_ext
9696if test "$ac_cv_search_zlibVersion" = no; then
9697 for ac_lib in z; do
9698 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9699 cat >conftest.$ac_ext <<_ACEOF
9700/* confdefs.h. */
9701_ACEOF
9702cat confdefs.h >>conftest.$ac_ext
9703cat >>conftest.$ac_ext <<_ACEOF
9704/* end confdefs.h. */
9705
9706/* Override any gcc2 internal prototype to avoid an error. */
9707#ifdef __cplusplus
9708extern "C"
9709#endif
9710/* We use char because int might match the return type of a gcc2
9711 builtin and then its argument prototype would still apply. */
9712char zlibVersion ();
9713int
9714main ()
9715{
9716zlibVersion ();
9717 ;
9718 return 0;
9719}
9720_ACEOF
9721rm -f conftest.$ac_objext conftest$ac_exeext
9722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9723 (eval $ac_link) 2>conftest.er1
9724 ac_status=$?
9725 grep -v '^ *+' conftest.er1 >conftest.err
9726 rm -f conftest.er1
9727 cat conftest.err >&5
9728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9729 (exit $ac_status); } &&
9730 { ac_try='test -z "$ac_c_werror_flag"
9731 || test ! -s conftest.err'
9732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9733 (eval $ac_try) 2>&5
9734 ac_status=$?
9735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9736 (exit $ac_status); }; } &&
9737 { ac_try='test -s conftest$ac_exeext'
9738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9739 (eval $ac_try) 2>&5
9740 ac_status=$?
9741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9742 (exit $ac_status); }; }; then
9743 ac_cv_search_zlibVersion="-l$ac_lib"
9744break
9745else
9746 echo "$as_me: failed program was:" >&5
9747sed 's/^/| /' conftest.$ac_ext >&5
9748
9749fi
9750rm -f conftest.err conftest.$ac_objext \
9751 conftest$ac_exeext conftest.$ac_ext
9752 done
9753fi
9754LIBS=$ac_func_search_save_LIBS
9755fi
9756echo "$as_me:$LINENO: result: $ac_cv_search_zlibVersion" >&5
9757echo "${ECHO_T}$ac_cv_search_zlibVersion" >&6
9758if test "$ac_cv_search_zlibVersion" != no; then
9759 test "$ac_cv_search_zlibVersion" = "none required" || LIBS="$ac_cv_search_zlibVersion $LIBS"
9760
9761for ac_header in zlib.h
9762do
9763as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9764if eval "test \"\${$as_ac_Header+set}\" = set"; then
9765 echo "$as_me:$LINENO: checking for $ac_header" >&5
9766echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9767if eval "test \"\${$as_ac_Header+set}\" = set"; then
9768 echo $ECHO_N "(cached) $ECHO_C" >&6
9769fi
9770echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9771echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9772else
9773 # Is the header compilable?
9774echo "$as_me:$LINENO: checking $ac_header usability" >&5
9775echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9776cat >conftest.$ac_ext <<_ACEOF
9777/* confdefs.h. */
9778_ACEOF
9779cat confdefs.h >>conftest.$ac_ext
9780cat >>conftest.$ac_ext <<_ACEOF
9781/* end confdefs.h. */
9782$ac_includes_default
9783#include <$ac_header>
9784_ACEOF
9785rm -f conftest.$ac_objext
9786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9787 (eval $ac_compile) 2>conftest.er1
9788 ac_status=$?
9789 grep -v '^ *+' conftest.er1 >conftest.err
9790 rm -f conftest.er1
9791 cat conftest.err >&5
9792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9793 (exit $ac_status); } &&
9794 { ac_try='test -z "$ac_c_werror_flag"
9795 || test ! -s conftest.err'
9796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9797 (eval $ac_try) 2>&5
9798 ac_status=$?
9799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9800 (exit $ac_status); }; } &&
9801 { ac_try='test -s conftest.$ac_objext'
9802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9803 (eval $ac_try) 2>&5
9804 ac_status=$?
9805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9806 (exit $ac_status); }; }; then
9807 ac_header_compiler=yes
9808else
9809 echo "$as_me: failed program was:" >&5
9810sed 's/^/| /' conftest.$ac_ext >&5
9811
9812ac_header_compiler=no
9813fi
9814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9815echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9816echo "${ECHO_T}$ac_header_compiler" >&6
9817
9818# Is the header present?
9819echo "$as_me:$LINENO: checking $ac_header presence" >&5
9820echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9821cat >conftest.$ac_ext <<_ACEOF
9822/* confdefs.h. */
9823_ACEOF
9824cat confdefs.h >>conftest.$ac_ext
9825cat >>conftest.$ac_ext <<_ACEOF
9826/* end confdefs.h. */
9827#include <$ac_header>
9828_ACEOF
9829if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9830 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9831 ac_status=$?
9832 grep -v '^ *+' conftest.er1 >conftest.err
9833 rm -f conftest.er1
9834 cat conftest.err >&5
9835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9836 (exit $ac_status); } >/dev/null; then
9837 if test -s conftest.err; then
9838 ac_cpp_err=$ac_c_preproc_warn_flag
9839 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9840 else
9841 ac_cpp_err=
9842 fi
9843else
9844 ac_cpp_err=yes
9845fi
9846if test -z "$ac_cpp_err"; then
9847 ac_header_preproc=yes
9848else
9849 echo "$as_me: failed program was:" >&5
9850sed 's/^/| /' conftest.$ac_ext >&5
9851
9852 ac_header_preproc=no
9853fi
9854rm -f conftest.err conftest.$ac_ext
9855echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9856echo "${ECHO_T}$ac_header_preproc" >&6
9857
9858# So? What about this header?
9859case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9860 yes:no: )
9861 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9862echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9863 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9864echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9865 ac_header_preproc=yes
9866 ;;
9867 no:yes:* )
9868 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9869echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9870 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9871echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9872 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9873echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9874 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9875echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9876 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9877echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9878 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9879echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9880 (
9881 cat <<\_ASBOX
9882## ------------------------------------------ ##
9883## Report this to the AC_PACKAGE_NAME lists. ##
9884## ------------------------------------------ ##
9885_ASBOX
9886 ) |
9887 sed "s/^/$as_me: WARNING: /" >&2
9888 ;;
9889esac
9890echo "$as_me:$LINENO: checking for $ac_header" >&5
9891echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9892if eval "test \"\${$as_ac_Header+set}\" = set"; then
9893 echo $ECHO_N "(cached) $ECHO_C" >&6
9894else
9895 eval "$as_ac_Header=\$ac_header_preproc"
9896fi
9897echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9898echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9899
9900fi
9901if test `eval echo '${'$as_ac_Header'}'` = yes; then
9902 cat >>confdefs.h <<_ACEOF
9903#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9904_ACEOF
9905
9906fi
9907
9908done
9909
9910fi
9911
9912
77f120bf
JB
9913# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
9914echo "$as_me:$LINENO: checking for library containing dlgetmodinfo" >&5
9915echo $ECHO_N "checking for library containing dlgetmodinfo... $ECHO_C" >&6
9916if test "${ac_cv_search_dlgetmodinfo+set}" = set; then
bec39cab
AC
9917 echo $ECHO_N "(cached) $ECHO_C" >&6
9918else
9919 ac_func_search_save_LIBS=$LIBS
77f120bf 9920ac_cv_search_dlgetmodinfo=no
bec39cab
AC
9921cat >conftest.$ac_ext <<_ACEOF
9922/* confdefs.h. */
9923_ACEOF
9924cat confdefs.h >>conftest.$ac_ext
9925cat >>conftest.$ac_ext <<_ACEOF
9926/* end confdefs.h. */
c906108c 9927
b4e70030 9928/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9929#ifdef __cplusplus
9930extern "C"
9931#endif
b4e70030
JB
9932/* We use char because int might match the return type of a gcc2
9933 builtin and then its argument prototype would still apply. */
77f120bf 9934char dlgetmodinfo ();
bec39cab
AC
9935int
9936main ()
9937{
77f120bf 9938dlgetmodinfo ();
bec39cab
AC
9939 ;
9940 return 0;
9941}
9942_ACEOF
b4e70030 9943rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9945 (eval $ac_link) 2>conftest.er1
9946 ac_status=$?
9947 grep -v '^ *+' conftest.er1 >conftest.err
9948 rm -f conftest.er1
9949 cat conftest.err >&5
9950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9951 (exit $ac_status); } &&
b4e70030
JB
9952 { ac_try='test -z "$ac_c_werror_flag"
9953 || test ! -s conftest.err'
bec39cab
AC
9954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9955 (eval $ac_try) 2>&5
9956 ac_status=$?
9957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9958 (exit $ac_status); }; } &&
9959 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
77f120bf 9965 ac_cv_search_dlgetmodinfo="none required"
bec39cab
AC
9966else
9967 echo "$as_me: failed program was:" >&5
9968sed 's/^/| /' conftest.$ac_ext >&5
1ba607ad
AC
9969
9970fi
bec39cab 9971rm -f conftest.err conftest.$ac_objext \
b4e70030 9972 conftest$ac_exeext conftest.$ac_ext
77f120bf
JB
9973if test "$ac_cv_search_dlgetmodinfo" = no; then
9974 for ac_lib in dl xpdl; do
b4e70030
JB
9975 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9976 cat >conftest.$ac_ext <<_ACEOF
9977/* confdefs.h. */
9978_ACEOF
9979cat confdefs.h >>conftest.$ac_ext
9980cat >>conftest.$ac_ext <<_ACEOF
9981/* end confdefs.h. */
9982
9983/* Override any gcc2 internal prototype to avoid an error. */
9984#ifdef __cplusplus
9985extern "C"
9986#endif
9987/* We use char because int might match the return type of a gcc2
9988 builtin and then its argument prototype would still apply. */
77f120bf 9989char dlgetmodinfo ();
b4e70030
JB
9990int
9991main ()
9992{
77f120bf 9993dlgetmodinfo ();
b4e70030
JB
9994 ;
9995 return 0;
9996}
9997_ACEOF
9998rm -f conftest.$ac_objext conftest$ac_exeext
9999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10000 (eval $ac_link) 2>conftest.er1
10001 ac_status=$?
10002 grep -v '^ *+' conftest.er1 >conftest.err
10003 rm -f conftest.er1
10004 cat conftest.err >&5
10005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10006 (exit $ac_status); } &&
10007 { ac_try='test -z "$ac_c_werror_flag"
10008 || test ! -s conftest.err'
10009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10010 (eval $ac_try) 2>&5
10011 ac_status=$?
10012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10013 (exit $ac_status); }; } &&
10014 { ac_try='test -s conftest$ac_exeext'
10015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10016 (eval $ac_try) 2>&5
10017 ac_status=$?
10018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10019 (exit $ac_status); }; }; then
77f120bf 10020 ac_cv_search_dlgetmodinfo="-l$ac_lib"
b4e70030 10021break
4e8d927d 10022else
b4e70030
JB
10023 echo "$as_me: failed program was:" >&5
10024sed 's/^/| /' conftest.$ac_ext >&5
10025
10026fi
10027rm -f conftest.err conftest.$ac_objext \
10028 conftest$ac_exeext conftest.$ac_ext
10029 done
1ba607ad 10030fi
bec39cab
AC
10031LIBS=$ac_func_search_save_LIBS
10032fi
77f120bf
JB
10033echo "$as_me:$LINENO: result: $ac_cv_search_dlgetmodinfo" >&5
10034echo "${ECHO_T}$ac_cv_search_dlgetmodinfo" >&6
10035if test "$ac_cv_search_dlgetmodinfo" != no; then
10036 test "$ac_cv_search_dlgetmodinfo" = "none required" || LIBS="$ac_cv_search_dlgetmodinfo $LIBS"
c906108c 10037
8bb2c122 10038fi
8bb2c122 10039
8bb2c122 10040
77f120bf 10041
77f120bf 10042
6c7a06a3
TT
10043
10044# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10045if test "${with_libiconv_prefix+set}" = set; then
10046 withval="$with_libiconv_prefix"
10047
10048 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
10049 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
10050 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
10051 done
10052
10053fi;
10054
10055 BUILD_LIBICONV_LIBDIR="-L../libiconv/lib/.libs -L../libiconv/lib/_libs"
10056 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
10057
10058 echo "$as_me:$LINENO: checking for iconv" >&5
10059echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10060if test "${am_cv_func_iconv+set}" = set; then
d542061a
UW
10061 echo $ECHO_N "(cached) $ECHO_C" >&6
10062else
6c7a06a3
TT
10063
10064 am_cv_func_iconv="no, consider installing GNU libiconv"
10065 am_cv_lib_iconv=no
10066 am_cv_use_build_libiconv=no
94ae1714 10067 # First, try to find iconv in libc.
6c7a06a3 10068 cat >conftest.$ac_ext <<_ACEOF
d542061a
UW
10069/* confdefs.h. */
10070_ACEOF
10071cat confdefs.h >>conftest.$ac_ext
10072cat >>conftest.$ac_ext <<_ACEOF
10073/* end confdefs.h. */
6c7a06a3
TT
10074#include <stdlib.h>
10075#include <iconv.h>
d542061a
UW
10076int
10077main ()
10078{
6c7a06a3
TT
10079iconv_t cd = iconv_open("","");
10080 iconv(cd,NULL,NULL,NULL,NULL);
10081 iconv_close(cd);
d542061a
UW
10082 ;
10083 return 0;
10084}
10085_ACEOF
10086rm -f conftest.$ac_objext conftest$ac_exeext
10087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10088 (eval $ac_link) 2>conftest.er1
10089 ac_status=$?
10090 grep -v '^ *+' conftest.er1 >conftest.err
10091 rm -f conftest.er1
10092 cat conftest.err >&5
10093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10094 (exit $ac_status); } &&
10095 { ac_try='test -z "$ac_c_werror_flag"
10096 || test ! -s conftest.err'
10097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10098 (eval $ac_try) 2>&5
10099 ac_status=$?
10100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10101 (exit $ac_status); }; } &&
10102 { ac_try='test -s conftest$ac_exeext'
10103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10104 (eval $ac_try) 2>&5
10105 ac_status=$?
10106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10107 (exit $ac_status); }; }; then
6c7a06a3 10108 am_cv_func_iconv=yes
d542061a
UW
10109else
10110 echo "$as_me: failed program was:" >&5
10111sed 's/^/| /' conftest.$ac_ext >&5
10112
10113fi
10114rm -f conftest.err conftest.$ac_objext \
10115 conftest$ac_exeext conftest.$ac_ext
94ae1714
TT
10116
10117 # If iconv was not in libc, try -liconv. In this case, arrange to
10118 # look in the libiconv prefix, if it was specified by the user.
6c7a06a3 10119 if test "$am_cv_func_iconv" != yes; then
94ae1714 10120 am_save_CPPFLAGS="$CPPFLAGS"
6c7a06a3 10121 am_save_LIBS="$LIBS"
94ae1714
TT
10122 if test -n "$LIBICONV_INCLUDE"; then
10123 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10124 LIBS="$LIBS $LIBICONV_LIBDIR"
10125 fi
6c7a06a3
TT
10126 LIBS="$LIBS -liconv"
10127 cat >conftest.$ac_ext <<_ACEOF
d542061a
UW
10128/* confdefs.h. */
10129_ACEOF
10130cat confdefs.h >>conftest.$ac_ext
10131cat >>conftest.$ac_ext <<_ACEOF
10132/* end confdefs.h. */
6c7a06a3
TT
10133#include <stdlib.h>
10134#include <iconv.h>
d542061a
UW
10135int
10136main ()
10137{
6c7a06a3
TT
10138iconv_t cd = iconv_open("","");
10139 iconv(cd,NULL,NULL,NULL,NULL);
10140 iconv_close(cd);
d542061a
UW
10141 ;
10142 return 0;
10143}
10144_ACEOF
10145rm -f conftest.$ac_objext conftest$ac_exeext
10146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10147 (eval $ac_link) 2>conftest.er1
10148 ac_status=$?
10149 grep -v '^ *+' conftest.er1 >conftest.err
10150 rm -f conftest.er1
10151 cat conftest.err >&5
10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153 (exit $ac_status); } &&
10154 { ac_try='test -z "$ac_c_werror_flag"
10155 || test ! -s conftest.err'
10156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10157 (eval $ac_try) 2>&5
10158 ac_status=$?
10159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10160 (exit $ac_status); }; } &&
10161 { ac_try='test -s conftest$ac_exeext'
10162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10163 (eval $ac_try) 2>&5
10164 ac_status=$?
10165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10166 (exit $ac_status); }; }; then
6c7a06a3
TT
10167 am_cv_lib_iconv=yes
10168 am_cv_func_iconv=yes
d542061a
UW
10169else
10170 echo "$as_me: failed program was:" >&5
10171sed 's/^/| /' conftest.$ac_ext >&5
10172
10173fi
10174rm -f conftest.err conftest.$ac_objext \
10175 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10176 LIBS="$am_save_LIBS"
94ae1714 10177 CPPFLAGS="$am_save_CPPFLAGS"
77f120bf 10178 fi
94ae1714
TT
10179
10180 # If that didn't work, try to find libiconv in the build tree.
6c7a06a3
TT
10181 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
10182 am_save_LIBS="$LIBS"
10183 am_save_CPPFLAGS="$CPPFLAGS"
10184 LIBS="$LIBS $BUILD_LIBICONV_LIBDIR -liconv"
10185 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
10186 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
10187/* confdefs.h. */
10188_ACEOF
10189cat confdefs.h >>conftest.$ac_ext
10190cat >>conftest.$ac_ext <<_ACEOF
10191/* end confdefs.h. */
6c7a06a3
TT
10192#include <stdlib.h>
10193#include <iconv.h>
bec39cab
AC
10194int
10195main ()
10196{
6c7a06a3
TT
10197iconv_t cd = iconv_open("","");
10198 iconv(cd,NULL,NULL,NULL,NULL);
10199 iconv_close(cd);
bec39cab
AC
10200 ;
10201 return 0;
10202}
10203_ACEOF
b4e70030 10204rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
10205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10206 (eval $ac_link) 2>conftest.er1
10207 ac_status=$?
10208 grep -v '^ *+' conftest.er1 >conftest.err
10209 rm -f conftest.er1
10210 cat conftest.err >&5
10211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10212 (exit $ac_status); } &&
b4e70030
JB
10213 { ac_try='test -z "$ac_c_werror_flag"
10214 || test ! -s conftest.err'
bec39cab
AC
10215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10216 (eval $ac_try) 2>&5
10217 ac_status=$?
10218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10219 (exit $ac_status); }; } &&
10220 { ac_try='test -s conftest$ac_exeext'
10221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10222 (eval $ac_try) 2>&5
10223 ac_status=$?
10224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10225 (exit $ac_status); }; }; then
94ae1714
TT
10226 am_cv_use_build_libiconv=yes
10227 am_cv_lib_iconv=yes
6c7a06a3 10228 am_cv_func_iconv=yes
627af7ea 10229else
bec39cab
AC
10230 echo "$as_me: failed program was:" >&5
10231sed 's/^/| /' conftest.$ac_ext >&5
627af7ea 10232
627af7ea 10233fi
bec39cab 10234rm -f conftest.err conftest.$ac_objext \
b4e70030 10235 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10236 LIBS="$am_save_LIBS"
fc3b640d 10237 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
10238 fi
10239
10240fi
10241echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
10242echo "${ECHO_T}$am_cv_func_iconv" >&6
94ae1714
TT
10243
10244 # Set the various flags based on the cache variables. We can't rely
10245 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
10246 LIBICONV=
10247 if test "$am_cv_lib_iconv" = yes; then
10248 LIBICONV="-liconv"
94ae1714
TT
10249 else
10250 LIBICONV_LIBDIR=
10251 LIBICONV_INCLUDE=
fc3b640d
TT
10252 fi
10253 if test "$am_cv_use_build_libiconv" = yes; then
10254 LIBICONV_LIBDIR="$BUILD_LIBICONV_LIBDIR"
10255 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
10256 fi
10257 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10258 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 10259
6c7a06a3
TT
10260 if test "$am_cv_func_iconv" = yes; then
10261
10262cat >>confdefs.h <<\_ACEOF
10263#define HAVE_ICONV 1
10264_ACEOF
10265
10266 echo "$as_me:$LINENO: checking for iconv declaration" >&5
10267echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
10268 if test "${am_cv_proto_iconv+set}" = set; then
10269 echo $ECHO_N "(cached) $ECHO_C" >&6
10270else
10271
10272 cat >conftest.$ac_ext <<_ACEOF
b4e70030
JB
10273/* confdefs.h. */
10274_ACEOF
10275cat confdefs.h >>conftest.$ac_ext
10276cat >>conftest.$ac_ext <<_ACEOF
10277/* end confdefs.h. */
10278
6c7a06a3
TT
10279#include <stdlib.h>
10280#include <iconv.h>
10281extern
b4e70030 10282#ifdef __cplusplus
6c7a06a3 10283"C"
b4e70030 10284#endif
6c7a06a3
TT
10285#if defined(__STDC__) || defined(__cplusplus)
10286size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10287#else
10288size_t iconv();
10289#endif
10290
b4e70030
JB
10291int
10292main ()
10293{
6c7a06a3 10294
b4e70030
JB
10295 ;
10296 return 0;
10297}
10298_ACEOF
6c7a06a3
TT
10299rm -f conftest.$ac_objext
10300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10301 (eval $ac_compile) 2>conftest.er1
b4e70030
JB
10302 ac_status=$?
10303 grep -v '^ *+' conftest.er1 >conftest.err
10304 rm -f conftest.er1
10305 cat conftest.err >&5
10306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10307 (exit $ac_status); } &&
10308 { ac_try='test -z "$ac_c_werror_flag"
10309 || test ! -s conftest.err'
10310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10311 (eval $ac_try) 2>&5
10312 ac_status=$?
10313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10314 (exit $ac_status); }; } &&
6c7a06a3 10315 { ac_try='test -s conftest.$ac_objext'
b4e70030
JB
10316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10317 (eval $ac_try) 2>&5
10318 ac_status=$?
10319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10320 (exit $ac_status); }; }; then
6c7a06a3 10321 am_cv_proto_iconv_arg1=""
4e8d927d 10322else
b4e70030
JB
10323 echo "$as_me: failed program was:" >&5
10324sed 's/^/| /' conftest.$ac_ext >&5
10325
6c7a06a3 10326am_cv_proto_iconv_arg1="const"
b4e70030 10327fi
6c7a06a3
TT
10328rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10329 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);"
10330fi
10331
10332 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10333 echo "$as_me:$LINENO: result: ${ac_t:-
10334 }$am_cv_proto_iconv" >&5
10335echo "${ECHO_T}${ac_t:-
10336 }$am_cv_proto_iconv" >&6
10337
10338cat >>confdefs.h <<_ACEOF
10339#define ICONV_CONST $am_cv_proto_iconv_arg1
10340_ACEOF
10341
10342 fi
6c7a06a3
TT
10343
10344
10345# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
10346# There is a very specific comment in /usr/include/curses.h explaining that
10347# termcap routines built into libcurses must not be used.
10348#
10349# The symptoms we observed so far is GDB unexpectedly changing
10350# the terminal settings when tgetent is called - this is particularly
10351# visible as the output is missing carriage returns, and so rapidly
10352# becomes very hard to read.
10353#
10354# The readline configure script has already decided that libtermcap
10355# was enough for its purposes, and so decided to build readline using
10356# libtermcap. Since the TUI mode requires curses, building GDB with
10357# TUI enabled results in both libraries to be used at the same time,
10358# which is not allowed. This basically means that GDB with TUI is
10359# broken on alpha-osf.
10360
10361case $host_os in
10362 alpha*-*-osf* )
10363 if "$enable_tui" = "yes"; then
10364 { { echo "$as_me:$LINENO: error: Building GDB with TUI mode is not supported on this host" >&5
10365echo "$as_me: error: Building GDB with TUI mode is not supported on this host" >&2;}
10366 { (exit 1); exit 1; }; }
10367 fi
10368 if "$enable_tui" = "auto"; then
10369 enable_tui=no
10370 fi
10371 ;;
10372esac
10373
cb01cfba 10374# For the TUI, we need enhanced curses functionality.
bd8a8e1b 10375if test x"$enable_tui" != xno; then
cb01cfba
JB
10376 prefer_curses=yes
10377fi
10378
10379curses_found=no
10380if test x"$prefer_curses" = xyes; then
10381 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
10382 # curses library because the latter might not provide all the
10383 # functionality we need. However, this leads to problems on systems
10384 # where the linker searches /usr/local/lib, but the compiler doesn't
10385 # search /usr/local/include, if ncurses is installed in /usr/local. A
10386 # default installation of ncurses on alpha*-dec-osf* will lead to such
10387 # a situation.
10388 echo "$as_me:$LINENO: checking for library containing waddstr" >&5
6c7a06a3
TT
10389echo $ECHO_N "checking for library containing waddstr... $ECHO_C" >&6
10390if test "${ac_cv_search_waddstr+set}" = set; then
10391 echo $ECHO_N "(cached) $ECHO_C" >&6
10392else
10393 ac_func_search_save_LIBS=$LIBS
10394ac_cv_search_waddstr=no
10395cat >conftest.$ac_ext <<_ACEOF
10396/* confdefs.h. */
10397_ACEOF
10398cat confdefs.h >>conftest.$ac_ext
10399cat >>conftest.$ac_ext <<_ACEOF
10400/* end confdefs.h. */
10401
10402/* Override any gcc2 internal prototype to avoid an error. */
10403#ifdef __cplusplus
10404extern "C"
10405#endif
10406/* We use char because int might match the return type of a gcc2
10407 builtin and then its argument prototype would still apply. */
10408char waddstr ();
10409int
10410main ()
10411{
10412waddstr ();
10413 ;
10414 return 0;
10415}
10416_ACEOF
10417rm -f conftest.$ac_objext conftest$ac_exeext
10418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10419 (eval $ac_link) 2>conftest.er1
10420 ac_status=$?
10421 grep -v '^ *+' conftest.er1 >conftest.err
10422 rm -f conftest.er1
10423 cat conftest.err >&5
10424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10425 (exit $ac_status); } &&
10426 { ac_try='test -z "$ac_c_werror_flag"
10427 || test ! -s conftest.err'
10428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10429 (eval $ac_try) 2>&5
10430 ac_status=$?
10431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10432 (exit $ac_status); }; } &&
10433 { ac_try='test -s conftest$ac_exeext'
10434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10435 (eval $ac_try) 2>&5
10436 ac_status=$?
10437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10438 (exit $ac_status); }; }; then
10439 ac_cv_search_waddstr="none required"
10440else
10441 echo "$as_me: failed program was:" >&5
10442sed 's/^/| /' conftest.$ac_ext >&5
10443
10444fi
10445rm -f conftest.err conftest.$ac_objext \
10446 conftest$ac_exeext conftest.$ac_ext
10447if test "$ac_cv_search_waddstr" = no; then
10448 for ac_lib in ncurses cursesX curses; do
10449 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10450 cat >conftest.$ac_ext <<_ACEOF
10451/* confdefs.h. */
10452_ACEOF
10453cat confdefs.h >>conftest.$ac_ext
10454cat >>conftest.$ac_ext <<_ACEOF
10455/* end confdefs.h. */
10456
10457/* Override any gcc2 internal prototype to avoid an error. */
10458#ifdef __cplusplus
10459extern "C"
10460#endif
10461/* We use char because int might match the return type of a gcc2
10462 builtin and then its argument prototype would still apply. */
10463char waddstr ();
10464int
10465main ()
10466{
10467waddstr ();
10468 ;
10469 return 0;
10470}
10471_ACEOF
10472rm -f conftest.$ac_objext conftest$ac_exeext
10473if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10474 (eval $ac_link) 2>conftest.er1
10475 ac_status=$?
10476 grep -v '^ *+' conftest.er1 >conftest.err
10477 rm -f conftest.er1
10478 cat conftest.err >&5
10479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10480 (exit $ac_status); } &&
10481 { ac_try='test -z "$ac_c_werror_flag"
10482 || test ! -s conftest.err'
10483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10484 (eval $ac_try) 2>&5
10485 ac_status=$?
10486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10487 (exit $ac_status); }; } &&
10488 { ac_try='test -s conftest$ac_exeext'
10489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10490 (eval $ac_try) 2>&5
10491 ac_status=$?
10492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10493 (exit $ac_status); }; }; then
10494 ac_cv_search_waddstr="-l$ac_lib"
10495break
10496else
10497 echo "$as_me: failed program was:" >&5
10498sed 's/^/| /' conftest.$ac_ext >&5
10499
10500fi
10501rm -f conftest.err conftest.$ac_objext \
10502 conftest$ac_exeext conftest.$ac_ext
10503 done
10504fi
10505LIBS=$ac_func_search_save_LIBS
10506fi
10507echo "$as_me:$LINENO: result: $ac_cv_search_waddstr" >&5
10508echo "${ECHO_T}$ac_cv_search_waddstr" >&6
10509if test "$ac_cv_search_waddstr" != no; then
10510 test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
10511
10512fi
10513
10514
cb01cfba
JB
10515 if test "$ac_cv_search_waddstr" != no; then
10516 curses_found=yes
10517 fi
10518fi
10519
10520# Check whether we should enable the TUI, but only do so if we really
10521# can.
10522if test x"$enable_tui" != xno; then
10523 if test -d $srcdir/tui; then
10524 if test "$curses_found" != no; then
6c7a06a3
TT
10525 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
10526 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
10527 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
10528 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
10529 CONFIG_ALL="${CONFIG_ALL} all-tui"
10530 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
10531 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
10532 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
10533 else
10534 if test x"$enable_tui" = xyes; then
10535 { { echo "$as_me:$LINENO: error: no enhanced curses library found; disable TUI" >&5
10536echo "$as_me: error: no enhanced curses library found; disable TUI" >&2;}
10537 { (exit 1); exit 1; }; }
10538 else
10539 { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
10540echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
10541 fi
10542 fi
10543 fi
10544fi
10545
10546# Since GDB uses Readline, we need termcap functionality. In many
10547# cases this will be provided by the curses library, but some systems
10548# have a seperate termcap library, or no curses library at all.
10549
10550case $host_os in
10551 cygwin*)
10552 if test -d $srcdir/libtermcap; then
10553 LIBS="../libtermcap/libtermcap.a $LIBS"
10554 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
10555 fi ;;
10556 go32* | *djgpp*)
10557 ac_cv_search_tgetent="none required"
10558 ;;
10559 *mingw32*)
10560 ac_cv_search_tgetent="none required"
10561 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
10562 ;;
10563esac
10564
10565# These are the libraries checked by Readline.
10566echo "$as_me:$LINENO: checking for library containing tgetent" >&5
10567echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6
10568if test "${ac_cv_search_tgetent+set}" = set; then
10569 echo $ECHO_N "(cached) $ECHO_C" >&6
10570else
10571 ac_func_search_save_LIBS=$LIBS
10572ac_cv_search_tgetent=no
10573cat >conftest.$ac_ext <<_ACEOF
10574/* confdefs.h. */
10575_ACEOF
10576cat confdefs.h >>conftest.$ac_ext
10577cat >>conftest.$ac_ext <<_ACEOF
10578/* end confdefs.h. */
10579
10580/* Override any gcc2 internal prototype to avoid an error. */
10581#ifdef __cplusplus
10582extern "C"
10583#endif
10584/* We use char because int might match the return type of a gcc2
10585 builtin and then its argument prototype would still apply. */
10586char tgetent ();
10587int
10588main ()
10589{
10590tgetent ();
10591 ;
10592 return 0;
10593}
10594_ACEOF
10595rm -f conftest.$ac_objext conftest$ac_exeext
10596if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10597 (eval $ac_link) 2>conftest.er1
10598 ac_status=$?
10599 grep -v '^ *+' conftest.er1 >conftest.err
10600 rm -f conftest.er1
10601 cat conftest.err >&5
10602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10603 (exit $ac_status); } &&
10604 { ac_try='test -z "$ac_c_werror_flag"
10605 || test ! -s conftest.err'
10606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10607 (eval $ac_try) 2>&5
10608 ac_status=$?
10609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10610 (exit $ac_status); }; } &&
10611 { ac_try='test -s conftest$ac_exeext'
10612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10613 (eval $ac_try) 2>&5
10614 ac_status=$?
10615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10616 (exit $ac_status); }; }; then
10617 ac_cv_search_tgetent="none required"
10618else
10619 echo "$as_me: failed program was:" >&5
10620sed 's/^/| /' conftest.$ac_ext >&5
10621
10622fi
10623rm -f conftest.err conftest.$ac_objext \
10624 conftest$ac_exeext conftest.$ac_ext
10625if test "$ac_cv_search_tgetent" = no; then
10626 for ac_lib in termcap tinfo curses ncurses; do
10627 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10628 cat >conftest.$ac_ext <<_ACEOF
10629/* confdefs.h. */
10630_ACEOF
10631cat confdefs.h >>conftest.$ac_ext
10632cat >>conftest.$ac_ext <<_ACEOF
10633/* end confdefs.h. */
10634
10635/* Override any gcc2 internal prototype to avoid an error. */
10636#ifdef __cplusplus
10637extern "C"
10638#endif
10639/* We use char because int might match the return type of a gcc2
10640 builtin and then its argument prototype would still apply. */
10641char tgetent ();
10642int
10643main ()
10644{
10645tgetent ();
10646 ;
10647 return 0;
10648}
10649_ACEOF
10650rm -f conftest.$ac_objext conftest$ac_exeext
10651if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10652 (eval $ac_link) 2>conftest.er1
10653 ac_status=$?
10654 grep -v '^ *+' conftest.er1 >conftest.err
10655 rm -f conftest.er1
10656 cat conftest.err >&5
10657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658 (exit $ac_status); } &&
10659 { ac_try='test -z "$ac_c_werror_flag"
10660 || test ! -s conftest.err'
10661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10662 (eval $ac_try) 2>&5
10663 ac_status=$?
10664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10665 (exit $ac_status); }; } &&
10666 { ac_try='test -s conftest$ac_exeext'
10667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10668 (eval $ac_try) 2>&5
10669 ac_status=$?
10670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10671 (exit $ac_status); }; }; then
10672 ac_cv_search_tgetent="-l$ac_lib"
10673break
10674else
10675 echo "$as_me: failed program was:" >&5
10676sed 's/^/| /' conftest.$ac_ext >&5
10677
10678fi
10679rm -f conftest.err conftest.$ac_objext \
10680 conftest$ac_exeext conftest.$ac_ext
10681 done
10682fi
10683LIBS=$ac_func_search_save_LIBS
10684fi
10685echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5
10686echo "${ECHO_T}$ac_cv_search_tgetent" >&6
10687if test "$ac_cv_search_tgetent" != no; then
10688 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
10689
06825bd1
MK
10690fi
10691
06825bd1 10692
bec39cab
AC
10693if test "$ac_cv_search_tgetent" = no; then
10694 { { echo "$as_me:$LINENO: error: no termcap library found" >&5
10695echo "$as_me: error: no termcap library found" >&2;}
10696 { (exit 1); exit 1; }; }
8ee53726
MK
10697fi
10698
3841debe 10699
6a30b0a5
AS
10700# Check whether --with-system-readline or --without-system-readline was given.
10701if test "${with_system_readline+set}" = set; then
10702 withval="$with_system_readline"
10703
10704fi;
10705
10706if test "$with_system_readline" = yes; then
10707 READLINE=-lreadline
10708 READLINE_DEPS=
10709 READLINE_CFLAGS=
10710else
10711 READLINE='$(READLINE_DIR)/libreadline.a'
10712 READLINE_DEPS='$(READLINE)'
10713 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
10714fi
10715
10716
10717
10718
10719
5c39566f
DJ
10720# Check whether --with-expat or --without-expat was given.
10721if test "${with_expat+set}" = set; then
10722 withval="$with_expat"
10723
10724else
10725 with_expat=auto
10726fi;
10727echo "$as_me:$LINENO: checking whether to use expat" >&5
10728echo $ECHO_N "checking whether to use expat... $ECHO_C" >&6
10729echo "$as_me:$LINENO: result: $with_expat" >&5
10730echo "${ECHO_T}$with_expat" >&6
10731
10732if test "${with_expat}" = no; then
10733 { echo "$as_me:$LINENO: WARNING: expat support disabled; some features may be unavailable." >&5
10734echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
10735 HAVE_LIBEXPAT=no
10736else
10737
3841debe
DJ
10738 if test "X$prefix" = "XNONE"; then
10739 acl_final_prefix="$ac_default_prefix"
10740 else
10741 acl_final_prefix="$prefix"
10742 fi
10743 if test "X$exec_prefix" = "XNONE"; then
10744 acl_final_exec_prefix='${prefix}'
10745 else
10746 acl_final_exec_prefix="$exec_prefix"
10747 fi
10748 acl_save_prefix="$prefix"
10749 prefix="$acl_final_prefix"
10750 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10751 prefix="$acl_save_prefix"
10752
10753
10754# Check whether --with-gnu-ld or --without-gnu-ld was given.
10755if test "${with_gnu_ld+set}" = set; then
10756 withval="$with_gnu_ld"
10757 test "$withval" = no || with_gnu_ld=yes
10758else
10759 with_gnu_ld=no
10760fi;
10761# Prepare PATH_SEPARATOR.
10762# The user is always right.
10763if test "${PATH_SEPARATOR+set}" != set; then
10764 echo "#! /bin/sh" >conf$$.sh
10765 echo "exit 0" >>conf$$.sh
10766 chmod +x conf$$.sh
10767 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10768 PATH_SEPARATOR=';'
10769 else
10770 PATH_SEPARATOR=:
10771 fi
10772 rm -f conf$$.sh
10773fi
10774ac_prog=ld
10775if test "$GCC" = yes; then
10776 # Check if gcc -print-prog-name=ld gives a path.
10777 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10778echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10779 case $host in
10780 *-*-mingw*)
10781 # gcc leaves a trailing carriage return which upsets mingw
10782 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10783 *)
10784 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10785 esac
10786 case $ac_prog in
10787 # Accept absolute paths.
10788 [\\/]* | [A-Za-z]:[\\/]*)
10789 re_direlt='/[^/][^/]*/\.\./'
10790 # Canonicalize the path of ld
10791 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10792 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10793 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10794 done
10795 test -z "$LD" && LD="$ac_prog"
10796 ;;
10797 "")
10798 # If it fails, then pretend we aren't using GCC.
10799 ac_prog=ld
10800 ;;
10801 *)
10802 # If it is relative, then search for the first ld in PATH.
10803 with_gnu_ld=unknown
10804 ;;
10805 esac
10806elif test "$with_gnu_ld" = yes; then
10807 echo "$as_me:$LINENO: checking for GNU ld" >&5
10808echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
10809else
10810 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10811echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
10812fi
10813if test "${acl_cv_path_LD+set}" = set; then
10814 echo $ECHO_N "(cached) $ECHO_C" >&6
10815else
10816 if test -z "$LD"; then
10817 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10818 for ac_dir in $PATH; do
10819 test -z "$ac_dir" && ac_dir=.
10820 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10821 acl_cv_path_LD="$ac_dir/$ac_prog"
10822 # Check to see if the program is GNU ld. I'd rather use --version,
10823 # but apparently some GNU ld's only accept -v.
10824 # Break only if it was the GNU/non-GNU ld that we prefer.
10825 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10826 test "$with_gnu_ld" != no && break
10827 else
10828 test "$with_gnu_ld" != yes && break
10829 fi
10830 fi
10831 done
10832 IFS="$ac_save_ifs"
10833else
10834 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10835fi
10836fi
10837
10838LD="$acl_cv_path_LD"
10839if test -n "$LD"; then
10840 echo "$as_me:$LINENO: result: $LD" >&5
10841echo "${ECHO_T}$LD" >&6
10842else
10843 echo "$as_me:$LINENO: result: no" >&5
10844echo "${ECHO_T}no" >&6
10845fi
10846test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10847echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10848 { (exit 1); exit 1; }; }
10849echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10850echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10851if test "${acl_cv_prog_gnu_ld+set}" = set; then
10852 echo $ECHO_N "(cached) $ECHO_C" >&6
10853else
10854 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10855if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10856 acl_cv_prog_gnu_ld=yes
10857else
10858 acl_cv_prog_gnu_ld=no
10859fi
10860fi
10861echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10862echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10863with_gnu_ld=$acl_cv_prog_gnu_ld
10864
10865
10866
10867 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10868echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10869if test "${acl_cv_rpath+set}" = set; then
10870 echo $ECHO_N "(cached) $ECHO_C" >&6
10871else
10872
10873 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10874 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10875 . ./conftest.sh
10876 rm -f ./conftest.sh
10877 acl_cv_rpath=done
10878
10879fi
10880echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10881echo "${ECHO_T}$acl_cv_rpath" >&6
10882 wl="$acl_cv_wl"
10883 libext="$acl_cv_libext"
10884 shlibext="$acl_cv_shlibext"
10885 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10886 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10887 hardcode_direct="$acl_cv_hardcode_direct"
10888 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10889 # Check whether --enable-rpath or --disable-rpath was given.
10890if test "${enable_rpath+set}" = set; then
10891 enableval="$enable_rpath"
10892 :
10893else
10894 enable_rpath=yes
10895fi;
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905 use_additional=yes
10906
10907 acl_save_prefix="$prefix"
10908 prefix="$acl_final_prefix"
10909 acl_save_exec_prefix="$exec_prefix"
10910 exec_prefix="$acl_final_exec_prefix"
10911
10912 eval additional_includedir=\"$includedir\"
10913 eval additional_libdir=\"$libdir\"
10914
10915 exec_prefix="$acl_save_exec_prefix"
10916 prefix="$acl_save_prefix"
10917
10918
10919# Check whether --with-libexpat-prefix or --without-libexpat-prefix was given.
10920if test "${with_libexpat_prefix+set}" = set; then
10921 withval="$with_libexpat_prefix"
10922
10923 if test "X$withval" = "Xno"; then
10924 use_additional=no
10925 else
10926 if test "X$withval" = "X"; then
10927
10928 acl_save_prefix="$prefix"
10929 prefix="$acl_final_prefix"
10930 acl_save_exec_prefix="$exec_prefix"
10931 exec_prefix="$acl_final_exec_prefix"
10932
10933 eval additional_includedir=\"$includedir\"
10934 eval additional_libdir=\"$libdir\"
10935
10936 exec_prefix="$acl_save_exec_prefix"
10937 prefix="$acl_save_prefix"
10938
10939 else
10940 additional_includedir="$withval/include"
10941 additional_libdir="$withval/lib"
10942 fi
10943 fi
10944
10945fi;
10946 LIBEXPAT=
10947 LTLIBEXPAT=
10948 INCEXPAT=
10949 rpathdirs=
10950 ltrpathdirs=
10951 names_already_handled=
10952 names_next_round='expat '
10953 while test -n "$names_next_round"; do
10954 names_this_round="$names_next_round"
10955 names_next_round=
10956 for name in $names_this_round; do
10957 already_handled=
10958 for n in $names_already_handled; do
10959 if test "$n" = "$name"; then
10960 already_handled=yes
10961 break
10962 fi
10963 done
10964 if test -z "$already_handled"; then
10965 names_already_handled="$names_already_handled $name"
10966 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10967 eval value=\"\$HAVE_LIB$uppername\"
10968 if test -n "$value"; then
10969 if test "$value" = yes; then
10970 eval value=\"\$LIB$uppername\"
10971 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10972 eval value=\"\$LTLIB$uppername\"
10973 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10974 else
10975 :
10976 fi
10977 else
10978 found_dir=
10979 found_la=
10980 found_so=
10981 found_a=
10982 if test $use_additional = yes; then
10983 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10984 found_dir="$additional_libdir"
10985 found_so="$additional_libdir/lib$name.$shlibext"
10986 if test -f "$additional_libdir/lib$name.la"; then
10987 found_la="$additional_libdir/lib$name.la"
10988 fi
10989 else
10990 if test -f "$additional_libdir/lib$name.$libext"; then
10991 found_dir="$additional_libdir"
10992 found_a="$additional_libdir/lib$name.$libext"
10993 if test -f "$additional_libdir/lib$name.la"; then
10994 found_la="$additional_libdir/lib$name.la"
10995 fi
10996 fi
10997 fi
10998 fi
10999 if test "X$found_dir" = "X"; then
11000 for x in $LDFLAGS $LTLIBEXPAT; do
11001
11002 acl_save_prefix="$prefix"
11003 prefix="$acl_final_prefix"
11004 acl_save_exec_prefix="$exec_prefix"
11005 exec_prefix="$acl_final_exec_prefix"
11006 eval x=\"$x\"
11007 exec_prefix="$acl_save_exec_prefix"
11008 prefix="$acl_save_prefix"
11009
11010 case "$x" in
11011 -L*)
11012 dir=`echo "X$x" | sed -e 's/^X-L//'`
11013 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11014 found_dir="$dir"
11015 found_so="$dir/lib$name.$shlibext"
11016 if test -f "$dir/lib$name.la"; then
11017 found_la="$dir/lib$name.la"
11018 fi
11019 else
11020 if test -f "$dir/lib$name.$libext"; then
11021 found_dir="$dir"
11022 found_a="$dir/lib$name.$libext"
11023 if test -f "$dir/lib$name.la"; then
11024 found_la="$dir/lib$name.la"
11025 fi
11026 fi
11027 fi
11028 ;;
11029 esac
11030 if test "X$found_dir" != "X"; then
11031 break
11032 fi
11033 done
11034 fi
11035 if test "X$found_dir" != "X"; then
11036 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
11037 if test "X$found_so" != "X"; then
11038 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11039 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11040 else
11041 haveit=
11042 for x in $ltrpathdirs; do
11043 if test "X$x" = "X$found_dir"; then
11044 haveit=yes
11045 break
11046 fi
11047 done
11048 if test -z "$haveit"; then
11049 ltrpathdirs="$ltrpathdirs $found_dir"
11050 fi
11051 if test "$hardcode_direct" = yes; then
11052 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11053 else
11054 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11055 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11056 haveit=
11057 for x in $rpathdirs; do
11058 if test "X$x" = "X$found_dir"; then
11059 haveit=yes
11060 break
11061 fi
11062 done
11063 if test -z "$haveit"; then
11064 rpathdirs="$rpathdirs $found_dir"
11065 fi
11066 else
11067 haveit=
11068 for x in $LDFLAGS $LIBEXPAT; do
11069
11070 acl_save_prefix="$prefix"
11071 prefix="$acl_final_prefix"
11072 acl_save_exec_prefix="$exec_prefix"
11073 exec_prefix="$acl_final_exec_prefix"
11074 eval x=\"$x\"
11075 exec_prefix="$acl_save_exec_prefix"
11076 prefix="$acl_save_prefix"
11077
11078 if test "X$x" = "X-L$found_dir"; then
11079 haveit=yes
11080 break
11081 fi
11082 done
11083 if test -z "$haveit"; then
11084 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
11085 fi
11086 if test "$hardcode_minus_L" != no; then
11087 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11088 else
11089 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11090 fi
11091 fi
11092 fi
11093 fi
11094 else
11095 if test "X$found_a" != "X"; then
11096 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
11097 else
11098 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
11099 fi
11100 fi
11101 additional_includedir=
11102 case "$found_dir" in
11103 */lib | */lib/)
11104 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11105 additional_includedir="$basedir/include"
11106 ;;
11107 esac
11108 if test "X$additional_includedir" != "X"; then
11109 if test "X$additional_includedir" != "X/usr/include"; then
11110 haveit=
11111 if test "X$additional_includedir" = "X/usr/local/include"; then
11112 if test -n "$GCC"; then
11113 case $host_os in
11114 linux*) haveit=yes;;
11115 esac
11116 fi
11117 fi
11118 if test -z "$haveit"; then
11119 for x in $CPPFLAGS $INCEXPAT; do
11120
11121 acl_save_prefix="$prefix"
11122 prefix="$acl_final_prefix"
11123 acl_save_exec_prefix="$exec_prefix"
11124 exec_prefix="$acl_final_exec_prefix"
11125 eval x=\"$x\"
11126 exec_prefix="$acl_save_exec_prefix"
11127 prefix="$acl_save_prefix"
11128
11129 if test "X$x" = "X-I$additional_includedir"; then
11130 haveit=yes
11131 break
11132 fi
11133 done
11134 if test -z "$haveit"; then
11135 if test -d "$additional_includedir"; then
11136 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
11137 fi
11138 fi
11139 fi
11140 fi
11141 fi
11142 if test -n "$found_la"; then
11143 save_libdir="$libdir"
11144 case "$found_la" in
11145 */* | *\\*) . "$found_la" ;;
11146 *) . "./$found_la" ;;
11147 esac
11148 libdir="$save_libdir"
11149 for dep in $dependency_libs; do
11150 case "$dep" in
11151 -L*)
11152 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11153 if test "X$additional_libdir" != "X/usr/lib"; then
11154 haveit=
11155 if test "X$additional_libdir" = "X/usr/local/lib"; then
11156 if test -n "$GCC"; then
11157 case $host_os in
11158 linux*) haveit=yes;;
11159 esac
11160 fi
11161 fi
11162 if test -z "$haveit"; then
11163 haveit=
11164 for x in $LDFLAGS $LIBEXPAT; do
11165
11166 acl_save_prefix="$prefix"
11167 prefix="$acl_final_prefix"
11168 acl_save_exec_prefix="$exec_prefix"
11169 exec_prefix="$acl_final_exec_prefix"
11170 eval x=\"$x\"
11171 exec_prefix="$acl_save_exec_prefix"
11172 prefix="$acl_save_prefix"
11173
11174 if test "X$x" = "X-L$additional_libdir"; then
11175 haveit=yes
11176 break
11177 fi
11178 done
11179 if test -z "$haveit"; then
11180 if test -d "$additional_libdir"; then
11181 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
11182 fi
11183 fi
11184 haveit=
11185 for x in $LDFLAGS $LTLIBEXPAT; do
11186
11187 acl_save_prefix="$prefix"
11188 prefix="$acl_final_prefix"
11189 acl_save_exec_prefix="$exec_prefix"
11190 exec_prefix="$acl_final_exec_prefix"
11191 eval x=\"$x\"
11192 exec_prefix="$acl_save_exec_prefix"
11193 prefix="$acl_save_prefix"
11194
11195 if test "X$x" = "X-L$additional_libdir"; then
11196 haveit=yes
11197 break
11198 fi
11199 done
11200 if test -z "$haveit"; then
11201 if test -d "$additional_libdir"; then
11202 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
11203 fi
11204 fi
11205 fi
11206 fi
11207 ;;
11208 -R*)
11209 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11210 if test "$enable_rpath" != no; then
11211 haveit=
11212 for x in $rpathdirs; do
11213 if test "X$x" = "X$dir"; then
11214 haveit=yes
11215 break
11216 fi
11217 done
11218 if test -z "$haveit"; then
11219 rpathdirs="$rpathdirs $dir"
11220 fi
11221 haveit=
11222 for x in $ltrpathdirs; do
11223 if test "X$x" = "X$dir"; then
11224 haveit=yes
11225 break
11226 fi
11227 done
11228 if test -z "$haveit"; then
11229 ltrpathdirs="$ltrpathdirs $dir"
11230 fi
11231 fi
11232 ;;
11233 -l*)
11234 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11235 ;;
11236 *.la)
11237 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11238 ;;
11239 *)
11240 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
11241 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
11242 ;;
11243 esac
11244 done
11245 fi
11246 else
11247 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11248 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
11249 fi
11250 fi
11251 fi
11252 done
11253 done
11254 if test "X$rpathdirs" != "X"; then
11255 if test -n "$hardcode_libdir_separator"; then
11256 alldirs=
11257 for found_dir in $rpathdirs; do
11258 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11259 done
11260 acl_save_libdir="$libdir"
11261 libdir="$alldirs"
11262 eval flag=\"$hardcode_libdir_flag_spec\"
11263 libdir="$acl_save_libdir"
11264 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
11265 else
11266 for found_dir in $rpathdirs; do
11267 acl_save_libdir="$libdir"
11268 libdir="$found_dir"
11269 eval flag=\"$hardcode_libdir_flag_spec\"
11270 libdir="$acl_save_libdir"
11271 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
11272 done
11273 fi
11274 fi
11275 if test "X$ltrpathdirs" != "X"; then
11276 for found_dir in $ltrpathdirs; do
11277 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
11278 done
11279 fi
11280
11281
11282 ac_save_CPPFLAGS="$CPPFLAGS"
11283
11284 for element in $INCEXPAT; do
11285 haveit=
11286 for x in $CPPFLAGS; do
11287
11288 acl_save_prefix="$prefix"
11289 prefix="$acl_final_prefix"
11290 acl_save_exec_prefix="$exec_prefix"
11291 exec_prefix="$acl_final_exec_prefix"
11292 eval x=\"$x\"
11293 exec_prefix="$acl_save_exec_prefix"
11294 prefix="$acl_save_prefix"
11295
11296 if test "X$x" = "X$element"; then
11297 haveit=yes
11298 break
11299 fi
11300 done
11301 if test -z "$haveit"; then
11302 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11303 fi
11304 done
11305
11306
11307 echo "$as_me:$LINENO: checking for libexpat" >&5
11308echo $ECHO_N "checking for libexpat... $ECHO_C" >&6
11309if test "${ac_cv_libexpat+set}" = set; then
11310 echo $ECHO_N "(cached) $ECHO_C" >&6
11311else
11312
11313 ac_save_LIBS="$LIBS"
11314 LIBS="$LIBS $LIBEXPAT"
11315 cat >conftest.$ac_ext <<_ACEOF
11316/* confdefs.h. */
11317_ACEOF
11318cat confdefs.h >>conftest.$ac_ext
11319cat >>conftest.$ac_ext <<_ACEOF
11320/* end confdefs.h. */
11321#include "expat.h"
11322int
11323main ()
11324{
11325XML_Parser p = XML_ParserCreate (0);
11326 ;
11327 return 0;
11328}
11329_ACEOF
11330rm -f conftest.$ac_objext conftest$ac_exeext
11331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11332 (eval $ac_link) 2>conftest.er1
11333 ac_status=$?
11334 grep -v '^ *+' conftest.er1 >conftest.err
11335 rm -f conftest.er1
11336 cat conftest.err >&5
11337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11338 (exit $ac_status); } &&
11339 { ac_try='test -z "$ac_c_werror_flag"
11340 || test ! -s conftest.err'
11341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11342 (eval $ac_try) 2>&5
11343 ac_status=$?
11344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11345 (exit $ac_status); }; } &&
11346 { ac_try='test -s conftest$ac_exeext'
11347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11348 (eval $ac_try) 2>&5
11349 ac_status=$?
11350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11351 (exit $ac_status); }; }; then
11352 ac_cv_libexpat=yes
11353else
11354 echo "$as_me: failed program was:" >&5
11355sed 's/^/| /' conftest.$ac_ext >&5
11356
11357ac_cv_libexpat=no
11358fi
11359rm -f conftest.err conftest.$ac_objext \
11360 conftest$ac_exeext conftest.$ac_ext
11361 LIBS="$ac_save_LIBS"
11362
11363fi
11364echo "$as_me:$LINENO: result: $ac_cv_libexpat" >&5
11365echo "${ECHO_T}$ac_cv_libexpat" >&6
11366 if test "$ac_cv_libexpat" = yes; then
11367 HAVE_LIBEXPAT=yes
11368
11369cat >>confdefs.h <<\_ACEOF
11370#define HAVE_LIBEXPAT 1
11371_ACEOF
11372
11373 echo "$as_me:$LINENO: checking how to link with libexpat" >&5
11374echo $ECHO_N "checking how to link with libexpat... $ECHO_C" >&6
11375 echo "$as_me:$LINENO: result: $LIBEXPAT" >&5
11376echo "${ECHO_T}$LIBEXPAT" >&6
11377 else
11378 HAVE_LIBEXPAT=no
11379 CPPFLAGS="$ac_save_CPPFLAGS"
11380 LIBEXPAT=
11381 LTLIBEXPAT=
11382 fi
11383
11384
11385
11386
11387
11388
5c39566f
DJ
11389 if test "$HAVE_LIBEXPAT" != yes; then
11390 if test "$with_expat" = yes; then
11391 { { echo "$as_me:$LINENO: error: expat is missing or unusable" >&5
11392echo "$as_me: error: expat is missing or unusable" >&2;}
11393 { (exit 1); exit 1; }; }
11394 else
11395 { echo "$as_me:$LINENO: WARNING: expat is missing or unusable; some features may be unavailable." >&5
11396echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
11397 fi
11398 else
11399 save_LIBS=$LIBS
11400 LIBS="$LIBS $LIBEXPAT"
ca4ca11e
DJ
11401
11402for ac_func in XML_StopParser
11403do
11404as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11405echo "$as_me:$LINENO: checking for $ac_func" >&5
11406echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11407if eval "test \"\${$as_ac_var+set}\" = set"; then
11408 echo $ECHO_N "(cached) $ECHO_C" >&6
11409else
11410 cat >conftest.$ac_ext <<_ACEOF
11411/* confdefs.h. */
11412_ACEOF
11413cat confdefs.h >>conftest.$ac_ext
11414cat >>conftest.$ac_ext <<_ACEOF
11415/* end confdefs.h. */
11416/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11417 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11418#define $ac_func innocuous_$ac_func
11419
11420/* System header to define __stub macros and hopefully few prototypes,
11421 which can conflict with char $ac_func (); below.
11422 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11423 <limits.h> exists even on freestanding compilers. */
11424
11425#ifdef __STDC__
11426# include <limits.h>
11427#else
11428# include <assert.h>
11429#endif
11430
11431#undef $ac_func
11432
11433/* Override any gcc2 internal prototype to avoid an error. */
11434#ifdef __cplusplus
11435extern "C"
11436{
11437#endif
11438/* We use char because int might match the return type of a gcc2
11439 builtin and then its argument prototype would still apply. */
11440char $ac_func ();
11441/* The GNU C library defines this for functions which it implements
11442 to always fail with ENOSYS. Some functions are actually named
11443 something starting with __ and the normal name is an alias. */
11444#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11445choke me
11446#else
11447char (*f) () = $ac_func;
11448#endif
11449#ifdef __cplusplus
11450}
11451#endif
11452
11453int
11454main ()
11455{
11456return f != $ac_func;
11457 ;
11458 return 0;
11459}
11460_ACEOF
11461rm -f conftest.$ac_objext conftest$ac_exeext
11462if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11463 (eval $ac_link) 2>conftest.er1
11464 ac_status=$?
11465 grep -v '^ *+' conftest.er1 >conftest.err
11466 rm -f conftest.er1
11467 cat conftest.err >&5
11468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11469 (exit $ac_status); } &&
11470 { ac_try='test -z "$ac_c_werror_flag"
11471 || test ! -s conftest.err'
11472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11473 (eval $ac_try) 2>&5
11474 ac_status=$?
11475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11476 (exit $ac_status); }; } &&
11477 { ac_try='test -s conftest$ac_exeext'
11478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11479 (eval $ac_try) 2>&5
11480 ac_status=$?
11481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11482 (exit $ac_status); }; }; then
11483 eval "$as_ac_var=yes"
11484else
11485 echo "$as_me: failed program was:" >&5
11486sed 's/^/| /' conftest.$ac_ext >&5
11487
11488eval "$as_ac_var=no"
11489fi
11490rm -f conftest.err conftest.$ac_objext \
11491 conftest$ac_exeext conftest.$ac_ext
11492fi
11493echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11494echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11495if test `eval echo '${'$as_ac_var'}'` = yes; then
11496 cat >>confdefs.h <<_ACEOF
11497#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11498_ACEOF
11499
11500fi
11501done
11502
5c39566f
DJ
11503 LIBS=$save_LIBS
11504 fi
3841debe
DJ
11505fi
11506
d57a3c85
TJB
11507
11508
11509
11510# Check whether --with-python or --without-python was given.
11511if test "${with_python+set}" = set; then
11512 withval="$with_python"
11513
11514else
11515 with_python=auto
11516fi;
11517echo "$as_me:$LINENO: checking whether to use python" >&5
11518echo $ECHO_N "checking whether to use python... $ECHO_C" >&6
11519echo "$as_me:$LINENO: result: $with_python" >&5
11520echo "${ECHO_T}$with_python" >&6
11521
11522if test "${with_python}" = no; then
11523 { echo "$as_me:$LINENO: WARNING: python support disabled; some features may be unavailable." >&5
11524echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11525 have_libpython=no
11526else
11527 case "${with_python}" in
11528 yes | auto)
11529 # Leave as empty, use defaults.
11530 python_includes=
11531 python_libs=
11532 ;;
11533 /*)
11534 python_includes="-I${with_python}/include"
11535 python_libs="-L${with_python}/lib"
11536 ;;
11537 *)
11538 { { echo "$as_me:$LINENO: error: invalid value for --with-python" >&5
11539echo "$as_me: error: invalid value for --with-python" >&2;}
11540 { (exit 1); exit 1; }; }
11541 ;;
11542 esac
11543
11544 save_CPPFLAGS=$CPPFLAGS
11545 CPPFLAGS="$CPPFLAGS ${python_includes}"
11546 save_LIBS=$LIBS
11547 LIBS="$LIBS ${python_libs}"
11548 have_libpython=no
11549 if test "${have_libpython}" = no; then
11550
11551 version=python2.6
11552
11553
11554 HAVE_LIBPYTHON2_6=no
11555 echo "$as_me:$LINENO: checking for ${version}" >&5
11556echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11557 save_LIBS=$LIBS
11558 LIBS="$LIBS -l${version}"
11559 cat >conftest.$ac_ext <<_ACEOF
11560/* confdefs.h. */
11561_ACEOF
11562cat confdefs.h >>conftest.$ac_ext
11563cat >>conftest.$ac_ext <<_ACEOF
11564/* end confdefs.h. */
11565#include "${version}/Python.h"
11566int
11567main ()
11568{
11569Py_Initialize ();
11570 ;
11571 return 0;
11572}
11573_ACEOF
11574rm -f conftest.$ac_objext conftest$ac_exeext
11575if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11576 (eval $ac_link) 2>conftest.er1
11577 ac_status=$?
11578 grep -v '^ *+' conftest.er1 >conftest.err
11579 rm -f conftest.er1
11580 cat conftest.err >&5
11581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11582 (exit $ac_status); } &&
11583 { ac_try='test -z "$ac_c_werror_flag"
11584 || test ! -s conftest.err'
11585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11586 (eval $ac_try) 2>&5
11587 ac_status=$?
11588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11589 (exit $ac_status); }; } &&
11590 { ac_try='test -s conftest$ac_exeext'
11591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11592 (eval $ac_try) 2>&5
11593 ac_status=$?
11594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11595 (exit $ac_status); }; }; then
11596 HAVE_LIBPYTHON2_6=yes
11597 have_libpython=yes
11598else
11599 echo "$as_me: failed program was:" >&5
11600sed 's/^/| /' conftest.$ac_ext >&5
11601
11602LIBS=$save_LIBS
11603fi
11604rm -f conftest.err conftest.$ac_objext \
11605 conftest$ac_exeext conftest.$ac_ext
11606 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_6" >&5
11607echo "${ECHO_T}$HAVE_LIBPYTHON2_6" >&6
11608
11609 if test "${HAVE_LIBPYTHON2_6}" = yes; then
11610
11611cat >>confdefs.h <<\_ACEOF
11612#define HAVE_LIBPYTHON2_6 1
11613_ACEOF
11614
11615 fi
11616 fi
11617 if test ${have_libpython} = no; then
11618
11619 version=python2.5
11620
11621
11622 HAVE_LIBPYTHON2_5=no
11623 echo "$as_me:$LINENO: checking for ${version}" >&5
11624echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11625 save_LIBS=$LIBS
11626 LIBS="$LIBS -l${version}"
11627 cat >conftest.$ac_ext <<_ACEOF
11628/* confdefs.h. */
11629_ACEOF
11630cat confdefs.h >>conftest.$ac_ext
11631cat >>conftest.$ac_ext <<_ACEOF
11632/* end confdefs.h. */
11633#include "${version}/Python.h"
11634int
11635main ()
11636{
11637Py_Initialize ();
11638 ;
11639 return 0;
11640}
11641_ACEOF
11642rm -f conftest.$ac_objext conftest$ac_exeext
11643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11644 (eval $ac_link) 2>conftest.er1
11645 ac_status=$?
11646 grep -v '^ *+' conftest.er1 >conftest.err
11647 rm -f conftest.er1
11648 cat conftest.err >&5
11649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11650 (exit $ac_status); } &&
11651 { ac_try='test -z "$ac_c_werror_flag"
11652 || test ! -s conftest.err'
11653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11654 (eval $ac_try) 2>&5
11655 ac_status=$?
11656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11657 (exit $ac_status); }; } &&
11658 { ac_try='test -s conftest$ac_exeext'
11659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11660 (eval $ac_try) 2>&5
11661 ac_status=$?
11662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11663 (exit $ac_status); }; }; then
11664 HAVE_LIBPYTHON2_5=yes
11665 have_libpython=yes
11666else
11667 echo "$as_me: failed program was:" >&5
11668sed 's/^/| /' conftest.$ac_ext >&5
11669
11670LIBS=$save_LIBS
11671fi
11672rm -f conftest.err conftest.$ac_objext \
11673 conftest$ac_exeext conftest.$ac_ext
11674 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_5" >&5
11675echo "${ECHO_T}$HAVE_LIBPYTHON2_5" >&6
11676
11677 if test "${HAVE_LIBPYTHON2_5}" = yes; then
11678
11679cat >>confdefs.h <<\_ACEOF
11680#define HAVE_LIBPYTHON2_5 1
11681_ACEOF
11682
11683 fi
11684 fi
11685 if test ${have_libpython} = no; then
11686
11687 version=python2.4
11688
11689
11690 HAVE_LIBPYTHON2_4=no
11691 echo "$as_me:$LINENO: checking for ${version}" >&5
11692echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11693 save_LIBS=$LIBS
11694 LIBS="$LIBS -l${version}"
11695 cat >conftest.$ac_ext <<_ACEOF
11696/* confdefs.h. */
11697_ACEOF
11698cat confdefs.h >>conftest.$ac_ext
11699cat >>conftest.$ac_ext <<_ACEOF
11700/* end confdefs.h. */
11701#include "${version}/Python.h"
11702int
11703main ()
11704{
11705Py_Initialize ();
11706 ;
11707 return 0;
11708}
11709_ACEOF
11710rm -f conftest.$ac_objext conftest$ac_exeext
11711if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11712 (eval $ac_link) 2>conftest.er1
11713 ac_status=$?
11714 grep -v '^ *+' conftest.er1 >conftest.err
11715 rm -f conftest.er1
11716 cat conftest.err >&5
11717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11718 (exit $ac_status); } &&
11719 { ac_try='test -z "$ac_c_werror_flag"
11720 || test ! -s conftest.err'
11721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11722 (eval $ac_try) 2>&5
11723 ac_status=$?
11724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11725 (exit $ac_status); }; } &&
11726 { ac_try='test -s conftest$ac_exeext'
11727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11728 (eval $ac_try) 2>&5
11729 ac_status=$?
11730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11731 (exit $ac_status); }; }; then
11732 HAVE_LIBPYTHON2_4=yes
11733 have_libpython=yes
11734else
11735 echo "$as_me: failed program was:" >&5
11736sed 's/^/| /' conftest.$ac_ext >&5
11737
11738LIBS=$save_LIBS
11739fi
11740rm -f conftest.err conftest.$ac_objext \
11741 conftest$ac_exeext conftest.$ac_ext
11742 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_4" >&5
11743echo "${ECHO_T}$HAVE_LIBPYTHON2_4" >&6
11744
11745 if test "${HAVE_LIBPYTHON2_4}" = yes; then
11746
11747cat >>confdefs.h <<\_ACEOF
11748#define HAVE_LIBPYTHON2_4 1
11749_ACEOF
11750
11751 fi
11752 fi
11753 if test ${have_libpython} = no; then
11754 case "${with_python}" in
11755 yes)
11756 { { echo "$as_me:$LINENO: error: python is missing or unusable" >&5
11757echo "$as_me: error: python is missing or unusable" >&2;}
11758 { (exit 1); exit 1; }; }
11759 ;;
11760 auto)
11761 { echo "$as_me:$LINENO: WARNING: python is missing or unusable; some features may be unavailable." >&5
11762echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11763 ;;
11764 *)
11765 { { echo "$as_me:$LINENO: error: no usable python found at ${with_python}" >&5
11766echo "$as_me: error: no usable python found at ${with_python}" >&2;}
11767 { (exit 1); exit 1; }; }
11768 ;;
11769 esac
11770 CPPFLAGS=$save_CPPFLAGS
11771 LIBS=$save_LIBS
11772 fi
11773fi
11774
11775if test "${have_libpython}" = yes; then
11776
11777cat >>confdefs.h <<\_ACEOF
11778#define HAVE_PYTHON 1
11779_ACEOF
11780
11781 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11782 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11783 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11784 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11785
11786 # Flags needed to compile Python code (taken from python-config --cflags).
11787 # We cannot call python-config directly because it will output whatever was
11788 # used when compiling the Python interpreter itself, including flags which
11789 # would make the python-related objects be compiled differently from the
11790 # rest of GDB (e.g., -O2 and -fPIC).
11791 if test "${GCC}" = yes; then
11792 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11793 fi
11794
11795 if test "x${tentative_python_cflags}" != x; then
11796 echo "$as_me:$LINENO: checking compiler flags for python code" >&5
11797echo $ECHO_N "checking compiler flags for python code... $ECHO_C" >&6
11798 for flag in ${tentative_python_cflags}; do
11799 # Check that the compiler accepts it
11800 saved_CFLAGS="$CFLAGS"
11801 CFLAGS="$CFLAGS $flag"
11802 cat >conftest.$ac_ext <<_ACEOF
11803/* confdefs.h. */
11804_ACEOF
11805cat confdefs.h >>conftest.$ac_ext
11806cat >>conftest.$ac_ext <<_ACEOF
11807/* end confdefs.h. */
11808
11809int
11810main ()
11811{
11812
11813 ;
11814 return 0;
11815}
11816_ACEOF
11817rm -f conftest.$ac_objext
11818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11819 (eval $ac_compile) 2>conftest.er1
11820 ac_status=$?
11821 grep -v '^ *+' conftest.er1 >conftest.err
11822 rm -f conftest.er1
11823 cat conftest.err >&5
11824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11825 (exit $ac_status); } &&
11826 { ac_try='test -z "$ac_c_werror_flag"
11827 || test ! -s conftest.err'
11828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11829 (eval $ac_try) 2>&5
11830 ac_status=$?
11831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11832 (exit $ac_status); }; } &&
11833 { ac_try='test -s conftest.$ac_objext'
11834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11835 (eval $ac_try) 2>&5
11836 ac_status=$?
11837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11838 (exit $ac_status); }; }; then
11839 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11840else
11841 echo "$as_me: failed program was:" >&5
11842sed 's/^/| /' conftest.$ac_ext >&5
11843
11844fi
11845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11846 CFLAGS="$saved_CFLAGS"
11847 done
11848 echo "$as_me:$LINENO: result: ${PYTHON_CFLAGS}" >&5
11849echo "${ECHO_T}${PYTHON_CFLAGS}" >&6
11850 fi
11851else
a08702d6 11852 # Even if Python support is not compiled in, we need to have these files
d57a3c85 11853 # included in order to recognize the GDB command "python".
a08702d6
TJB
11854 CONFIG_OBS="$CONFIG_OBS python.o python-value.o"
11855 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c"
d57a3c85
TJB
11856fi
11857
11858
bec39cab
AC
11859# ------------------------- #
11860# Checks for header files. #
11861# ------------------------- #
8ee53726 11862
0e5d83e3 11863
bec39cab
AC
11864
11865
11866
11867
11868ac_header_dirent=no
11869for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11870 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
b4e70030
JB
11871echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
11872echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11873if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
11874 echo $ECHO_N "(cached) $ECHO_C" >&6
11875else
11876 cat >conftest.$ac_ext <<_ACEOF
11877/* confdefs.h. */
11878_ACEOF
11879cat confdefs.h >>conftest.$ac_ext
11880cat >>conftest.$ac_ext <<_ACEOF
11881/* end confdefs.h. */
11882#include <sys/types.h>
0e5d83e3 11883#include <$ac_hdr>
bec39cab
AC
11884
11885int
11886main ()
11887{
11888if ((DIR *) 0)
11889return 0;
11890 ;
11891 return 0;
11892}
11893_ACEOF
11894rm -f conftest.$ac_objext
11895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11896 (eval $ac_compile) 2>conftest.er1
11897 ac_status=$?
11898 grep -v '^ *+' conftest.er1 >conftest.err
11899 rm -f conftest.er1
11900 cat conftest.err >&5
11901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11902 (exit $ac_status); } &&
b4e70030
JB
11903 { ac_try='test -z "$ac_c_werror_flag"
11904 || test ! -s conftest.err'
bec39cab
AC
11905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11906 (eval $ac_try) 2>&5
11907 ac_status=$?
11908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11909 (exit $ac_status); }; } &&
11910 { ac_try='test -s conftest.$ac_objext'
11911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11912 (eval $ac_try) 2>&5
11913 ac_status=$?
11914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11915 (exit $ac_status); }; }; then
11916 eval "$as_ac_Header=yes"
11917else
11918 echo "$as_me: failed program was:" >&5
11919sed 's/^/| /' conftest.$ac_ext >&5
11920
b4e70030 11921eval "$as_ac_Header=no"
bec39cab
AC
11922fi
11923rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11924fi
b4e70030
JB
11925echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11926echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
11927if test `eval echo '${'$as_ac_Header'}'` = yes; then
11928 cat >>confdefs.h <<_ACEOF
11929#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11930_ACEOF
11931
11932ac_header_dirent=$ac_hdr; break
0e5d83e3 11933fi
0e5d83e3 11934
bec39cab
AC
11935done
11936# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11937if test $ac_header_dirent = dirent.h; then
b4e70030
JB
11938 echo "$as_me:$LINENO: checking for library containing opendir" >&5
11939echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
11940if test "${ac_cv_search_opendir+set}" = set; then
11941 echo $ECHO_N "(cached) $ECHO_C" >&6
11942else
11943 ac_func_search_save_LIBS=$LIBS
b4e70030 11944ac_cv_search_opendir=no
bec39cab
AC
11945cat >conftest.$ac_ext <<_ACEOF
11946/* confdefs.h. */
11947_ACEOF
11948cat confdefs.h >>conftest.$ac_ext
11949cat >>conftest.$ac_ext <<_ACEOF
11950/* end confdefs.h. */
0e5d83e3 11951
b4e70030 11952/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
11953#ifdef __cplusplus
11954extern "C"
11955#endif
b4e70030
JB
11956/* We use char because int might match the return type of a gcc2
11957 builtin and then its argument prototype would still apply. */
bec39cab
AC
11958char opendir ();
11959int
11960main ()
11961{
b4e70030 11962opendir ();
bec39cab
AC
11963 ;
11964 return 0;
11965}
11966_ACEOF
b4e70030 11967rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
11968if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11969 (eval $ac_link) 2>conftest.er1
11970 ac_status=$?
11971 grep -v '^ *+' conftest.er1 >conftest.err
11972 rm -f conftest.er1
11973 cat conftest.err >&5
11974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11975 (exit $ac_status); } &&
b4e70030
JB
11976 { ac_try='test -z "$ac_c_werror_flag"
11977 || test ! -s conftest.err'
bec39cab
AC
11978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11979 (eval $ac_try) 2>&5
11980 ac_status=$?
11981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11982 (exit $ac_status); }; } &&
11983 { ac_try='test -s conftest$ac_exeext'
11984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11985 (eval $ac_try) 2>&5
11986 ac_status=$?
11987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11988 (exit $ac_status); }; }; then
b4e70030 11989 ac_cv_search_opendir="none required"
bec39cab
AC
11990else
11991 echo "$as_me: failed program was:" >&5
11992sed 's/^/| /' conftest.$ac_ext >&5
11993
11994fi
bec39cab 11995rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
11996 conftest$ac_exeext conftest.$ac_ext
11997if test "$ac_cv_search_opendir" = no; then
11998 for ac_lib in dir; do
11999 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12000 cat >conftest.$ac_ext <<_ACEOF
12001/* confdefs.h. */
12002_ACEOF
12003cat confdefs.h >>conftest.$ac_ext
12004cat >>conftest.$ac_ext <<_ACEOF
12005/* end confdefs.h. */
12006
12007/* Override any gcc2 internal prototype to avoid an error. */
12008#ifdef __cplusplus
12009extern "C"
12010#endif
12011/* We use char because int might match the return type of a gcc2
12012 builtin and then its argument prototype would still apply. */
12013char opendir ();
12014int
12015main ()
12016{
12017opendir ();
12018 ;
12019 return 0;
12020}
12021_ACEOF
12022rm -f conftest.$ac_objext conftest$ac_exeext
12023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12024 (eval $ac_link) 2>conftest.er1
12025 ac_status=$?
12026 grep -v '^ *+' conftest.er1 >conftest.err
12027 rm -f conftest.er1
12028 cat conftest.err >&5
12029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12030 (exit $ac_status); } &&
12031 { ac_try='test -z "$ac_c_werror_flag"
12032 || test ! -s conftest.err'
12033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12034 (eval $ac_try) 2>&5
12035 ac_status=$?
12036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12037 (exit $ac_status); }; } &&
12038 { ac_try='test -s conftest$ac_exeext'
12039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12040 (eval $ac_try) 2>&5
12041 ac_status=$?
12042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12043 (exit $ac_status); }; }; then
12044 ac_cv_search_opendir="-l$ac_lib"
12045break
4e8d927d 12046else
b4e70030
JB
12047 echo "$as_me: failed program was:" >&5
12048sed 's/^/| /' conftest.$ac_ext >&5
12049
12050fi
12051rm -f conftest.err conftest.$ac_objext \
12052 conftest$ac_exeext conftest.$ac_ext
12053 done
0e5d83e3 12054fi
bec39cab 12055LIBS=$ac_func_search_save_LIBS
0e5d83e3 12056fi
b4e70030
JB
12057echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
12058echo "${ECHO_T}$ac_cv_search_opendir" >&6
12059if test "$ac_cv_search_opendir" != no; then
12060 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
0e5d83e3 12061
0e5d83e3
JJ
12062fi
12063
d28f9cdf 12064else
b4e70030
JB
12065 echo "$as_me:$LINENO: checking for library containing opendir" >&5
12066echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
12067if test "${ac_cv_search_opendir+set}" = set; then
12068 echo $ECHO_N "(cached) $ECHO_C" >&6
12069else
12070 ac_func_search_save_LIBS=$LIBS
b4e70030 12071ac_cv_search_opendir=no
bec39cab
AC
12072cat >conftest.$ac_ext <<_ACEOF
12073/* confdefs.h. */
12074_ACEOF
12075cat confdefs.h >>conftest.$ac_ext
12076cat >>conftest.$ac_ext <<_ACEOF
12077/* end confdefs.h. */
d28f9cdf 12078
b4e70030 12079/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
12080#ifdef __cplusplus
12081extern "C"
d28f9cdf 12082#endif
b4e70030
JB
12083/* We use char because int might match the return type of a gcc2
12084 builtin and then its argument prototype would still apply. */
bec39cab
AC
12085char opendir ();
12086int
12087main ()
12088{
b4e70030 12089opendir ();
bec39cab
AC
12090 ;
12091 return 0;
12092}
12093_ACEOF
b4e70030 12094rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
12095if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12096 (eval $ac_link) 2>conftest.er1
12097 ac_status=$?
12098 grep -v '^ *+' conftest.er1 >conftest.err
12099 rm -f conftest.er1
12100 cat conftest.err >&5
12101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12102 (exit $ac_status); } &&
b4e70030
JB
12103 { ac_try='test -z "$ac_c_werror_flag"
12104 || test ! -s conftest.err'
bec39cab
AC
12105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12106 (eval $ac_try) 2>&5
12107 ac_status=$?
12108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12109 (exit $ac_status); }; } &&
12110 { ac_try='test -s conftest$ac_exeext'
12111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12112 (eval $ac_try) 2>&5
12113 ac_status=$?
12114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115 (exit $ac_status); }; }; then
b4e70030 12116 ac_cv_search_opendir="none required"
d28f9cdf 12117else
bec39cab
AC
12118 echo "$as_me: failed program was:" >&5
12119sed 's/^/| /' conftest.$ac_ext >&5
12120
d28f9cdf 12121fi
bec39cab 12122rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
12123 conftest$ac_exeext conftest.$ac_ext
12124if test "$ac_cv_search_opendir" = no; then
12125 for ac_lib in x; do
12126 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12127 cat >conftest.$ac_ext <<_ACEOF
12128/* confdefs.h. */
12129_ACEOF
12130cat confdefs.h >>conftest.$ac_ext
12131cat >>conftest.$ac_ext <<_ACEOF
12132/* end confdefs.h. */
12133
12134/* Override any gcc2 internal prototype to avoid an error. */
12135#ifdef __cplusplus
12136extern "C"
12137#endif
12138/* We use char because int might match the return type of a gcc2
12139 builtin and then its argument prototype would still apply. */
12140char opendir ();
12141int
12142main ()
12143{
12144opendir ();
12145 ;
12146 return 0;
12147}
12148_ACEOF
12149rm -f conftest.$ac_objext conftest$ac_exeext
12150if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12151 (eval $ac_link) 2>conftest.er1
12152 ac_status=$?
12153 grep -v '^ *+' conftest.er1 >conftest.err
12154 rm -f conftest.er1
12155 cat conftest.err >&5
12156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12157 (exit $ac_status); } &&
12158 { ac_try='test -z "$ac_c_werror_flag"
12159 || test ! -s conftest.err'
12160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12161 (eval $ac_try) 2>&5
12162 ac_status=$?
12163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12164 (exit $ac_status); }; } &&
12165 { ac_try='test -s conftest$ac_exeext'
12166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12167 (eval $ac_try) 2>&5
12168 ac_status=$?
12169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12170 (exit $ac_status); }; }; then
12171 ac_cv_search_opendir="-l$ac_lib"
12172break
4e8d927d 12173else
b4e70030
JB
12174 echo "$as_me: failed program was:" >&5
12175sed 's/^/| /' conftest.$ac_ext >&5
12176
12177fi
12178rm -f conftest.err conftest.$ac_objext \
12179 conftest$ac_exeext conftest.$ac_ext
12180 done
bec39cab
AC
12181fi
12182LIBS=$ac_func_search_save_LIBS
d28f9cdf 12183fi
b4e70030
JB
12184echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
12185echo "${ECHO_T}$ac_cv_search_opendir" >&6
12186if test "$ac_cv_search_opendir" != no; then
12187 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
d28f9cdf 12188
d28f9cdf
DJ
12189fi
12190
bec39cab 12191fi
b0b1c2c0 12192
b4e70030
JB
12193echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
12194echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
bec39cab
AC
12195if test "${ac_cv_header_stat_broken+set}" = set; then
12196 echo $ECHO_N "(cached) $ECHO_C" >&6
b0b1c2c0 12197else
bec39cab
AC
12198 cat >conftest.$ac_ext <<_ACEOF
12199/* confdefs.h. */
12200_ACEOF
12201cat confdefs.h >>conftest.$ac_ext
12202cat >>conftest.$ac_ext <<_ACEOF
12203/* end confdefs.h. */
12204#include <sys/types.h>
12205#include <sys/stat.h>
b0b1c2c0 12206
b4e70030 12207#if defined(S_ISBLK) && defined(S_IFDIR)
bec39cab
AC
12208# if S_ISBLK (S_IFDIR)
12209You lose.
12210# endif
12211#endif
b0b1c2c0 12212
b4e70030 12213#if defined(S_ISBLK) && defined(S_IFCHR)
bec39cab
AC
12214# if S_ISBLK (S_IFCHR)
12215You lose.
12216# endif
12217#endif
d28f9cdf 12218
b4e70030 12219#if defined(S_ISLNK) && defined(S_IFREG)
bec39cab
AC
12220# if S_ISLNK (S_IFREG)
12221You lose.
12222# endif
12223#endif
d28f9cdf 12224
b4e70030 12225#if defined(S_ISSOCK) && defined(S_IFREG)
bec39cab
AC
12226# if S_ISSOCK (S_IFREG)
12227You lose.
12228# endif
12229#endif
12230
12231_ACEOF
12232if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12233 $EGREP "You lose" >/dev/null 2>&1; then
12234 ac_cv_header_stat_broken=yes
d28f9cdf 12235else
bec39cab 12236 ac_cv_header_stat_broken=no
d28f9cdf
DJ
12237fi
12238rm -f conftest*
d28f9cdf 12239
d28f9cdf 12240fi
b4e70030
JB
12241echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
12242echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
bec39cab 12243if test $ac_cv_header_stat_broken = yes; then
d28f9cdf 12244
bec39cab
AC
12245cat >>confdefs.h <<\_ACEOF
12246#define STAT_MACROS_BROKEN 1
12247_ACEOF
8bb2c122 12248
7a292a7a 12249fi
bec39cab 12250
b4e70030
JB
12251echo "$as_me:$LINENO: checking for ANSI C header files" >&5
12252echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
bec39cab
AC
12253if test "${ac_cv_header_stdc+set}" = set; then
12254 echo $ECHO_N "(cached) $ECHO_C" >&6
7a292a7a 12255else
bec39cab
AC
12256 cat >conftest.$ac_ext <<_ACEOF
12257/* confdefs.h. */
12258_ACEOF
12259cat confdefs.h >>conftest.$ac_ext
12260cat >>conftest.$ac_ext <<_ACEOF
12261/* end confdefs.h. */
12262#include <stdlib.h>
12263#include <stdarg.h>
12264#include <string.h>
12265#include <float.h>
7a292a7a 12266
bec39cab
AC
12267int
12268main ()
12269{
7a292a7a 12270
bec39cab
AC
12271 ;
12272 return 0;
12273}
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
12297 ac_cv_header_stdc=yes
c906108c 12298else
bec39cab
AC
12299 echo "$as_me: failed program was:" >&5
12300sed 's/^/| /' conftest.$ac_ext >&5
c906108c 12301
b4e70030 12302ac_cv_header_stdc=no
c906108c 12303fi
bec39cab 12304rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12305
bec39cab
AC
12306if test $ac_cv_header_stdc = yes; then
12307 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12308 cat >conftest.$ac_ext <<_ACEOF
12309/* confdefs.h. */
12310_ACEOF
12311cat confdefs.h >>conftest.$ac_ext
12312cat >>conftest.$ac_ext <<_ACEOF
12313/* end confdefs.h. */
12314#include <string.h>
c906108c 12315
bec39cab
AC
12316_ACEOF
12317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12318 $EGREP "memchr" >/dev/null 2>&1; then
12319 :
8bb2c122 12320else
bec39cab 12321 ac_cv_header_stdc=no
8bb2c122 12322fi
bec39cab
AC
12323rm -f conftest*
12324
c906108c
SS
12325fi
12326
bec39cab
AC
12327if test $ac_cv_header_stdc = yes; then
12328 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12329 cat >conftest.$ac_ext <<_ACEOF
12330/* confdefs.h. */
12331_ACEOF
12332cat confdefs.h >>conftest.$ac_ext
12333cat >>conftest.$ac_ext <<_ACEOF
12334/* end confdefs.h. */
12335#include <stdlib.h>
12336
12337_ACEOF
12338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12339 $EGREP "free" >/dev/null 2>&1; then
12340 :
c906108c 12341else
bec39cab 12342 ac_cv_header_stdc=no
c906108c 12343fi
bec39cab
AC
12344rm -f conftest*
12345
c906108c
SS
12346fi
12347
bec39cab
AC
12348if test $ac_cv_header_stdc = yes; then
12349 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12350 if test "$cross_compiling" = yes; then
12351 :
c906108c 12352else
bec39cab
AC
12353 cat >conftest.$ac_ext <<_ACEOF
12354/* confdefs.h. */
12355_ACEOF
12356cat confdefs.h >>conftest.$ac_ext
12357cat >>conftest.$ac_ext <<_ACEOF
12358/* end confdefs.h. */
12359#include <ctype.h>
12360#if ((' ' & 0x0FF) == 0x020)
12361# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12362# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12363#else
12364# define ISLOWER(c) \
12365 (('a' <= (c) && (c) <= 'i') \
12366 || ('j' <= (c) && (c) <= 'r') \
12367 || ('s' <= (c) && (c) <= 'z'))
12368# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12369#endif
12370
12371#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12372int
12373main ()
12374{
12375 int i;
12376 for (i = 0; i < 256; i++)
12377 if (XOR (islower (i), ISLOWER (i))
12378 || toupper (i) != TOUPPER (i))
b4e70030
JB
12379 exit(2);
12380 exit (0);
bec39cab
AC
12381}
12382_ACEOF
12383rm -f conftest$ac_exeext
12384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12385 (eval $ac_link) 2>&5
12386 ac_status=$?
12387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12388 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12390 (eval $ac_try) 2>&5
12391 ac_status=$?
12392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12393 (exit $ac_status); }; }; then
12394 :
12395else
12396 echo "$as_me: program exited with status $ac_status" >&5
12397echo "$as_me: failed program was:" >&5
12398sed 's/^/| /' conftest.$ac_ext >&5
12399
12400( exit $ac_status )
12401ac_cv_header_stdc=no
c906108c 12402fi
b4e70030 12403rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 12404fi
c906108c 12405fi
bec39cab 12406fi
b4e70030
JB
12407echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
12408echo "${ECHO_T}$ac_cv_header_stdc" >&6
bec39cab 12409if test $ac_cv_header_stdc = yes; then
c906108c 12410
bec39cab
AC
12411cat >>confdefs.h <<\_ACEOF
12412#define STDC_HEADERS 1
12413_ACEOF
c906108c 12414
bec39cab 12415fi
8bb2c122 12416
a9322a30
TT
12417# elf_hp.h is for HP/UX 64-bit shared library support.
12418# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
12419# unconditionally, so what's the point in checking these?
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
bec39cab 12437
a9322a30
TT
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
a8111142 12454
a9322a30
TT
12455
12456
12457for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12458 thread_db.h gnu/libc-version.h signal.h stddef.h \
12459 stdlib.h string.h memory.h strings.h sys/fault.h \
12460 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12461 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12462 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
12463 sys/types.h sys/wait.h wait.h termios.h termio.h \
a8111142 12464 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.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
c906108c 12546else
bec39cab 12547 ac_cpp_err=yes
c906108c 12548fi
bec39cab
AC
12549if test -z "$ac_cpp_err"; then
12550 ac_header_preproc=yes
c906108c 12551else
bec39cab
AC
12552 echo "$as_me: failed program was:" >&5
12553sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 12554
bec39cab
AC
12555 ac_header_preproc=no
12556fi
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
c906108c 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
95ca63c4 12597else
bec39cab 12598 eval "$as_ac_Header=\$ac_header_preproc"
95ca63c4 12599fi
b4e70030
JB
12600echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12601echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 12602
95ca63c4 12603fi
bec39cab
AC
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
12608
95ca63c4
CF
12609fi
12610
bec39cab 12611done
95ca63c4
CF
12612
12613
7cb9022a 12614for ac_header in link.h
bec39cab
AC
12615do
12616as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12617echo "$as_me:$LINENO: checking for $ac_header" >&5
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
7cb9022a 12622 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12623/* confdefs.h. */
12624_ACEOF
12625cat confdefs.h >>conftest.$ac_ext
12626cat >>conftest.$ac_ext <<_ACEOF
12627/* end confdefs.h. */
7cb9022a
MK
12628#if HAVE_SYS_TYPES_H
12629# include <sys/types.h>
12630#endif
12631#if HAVE_NLIST_H
12632# include <nlist.h>
12633#endif
12634
12635
bec39cab
AC
12636#include <$ac_header>
12637_ACEOF
12638rm -f conftest.$ac_objext
12639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12640 (eval $ac_compile) 2>conftest.er1
12641 ac_status=$?
12642 grep -v '^ *+' conftest.er1 >conftest.err
12643 rm -f conftest.er1
12644 cat conftest.err >&5
12645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12646 (exit $ac_status); } &&
b4e70030
JB
12647 { ac_try='test -z "$ac_c_werror_flag"
12648 || test ! -s conftest.err'
bec39cab
AC
12649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12650 (eval $ac_try) 2>&5
12651 ac_status=$?
12652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12653 (exit $ac_status); }; } &&
12654 { ac_try='test -s conftest.$ac_objext'
12655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12656 (eval $ac_try) 2>&5
12657 ac_status=$?
12658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12659 (exit $ac_status); }; }; then
7cb9022a 12660 eval "$as_ac_Header=yes"
bec39cab
AC
12661else
12662 echo "$as_me: failed program was:" >&5
12663sed 's/^/| /' conftest.$ac_ext >&5
12664
b4e70030 12665eval "$as_ac_Header=no"
bec39cab
AC
12666fi
12667rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12668fi
b4e70030
JB
12669echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12670echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12671if test `eval echo '${'$as_ac_Header'}'` = yes; then
12672 cat >>confdefs.h <<_ACEOF
12673#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12674_ACEOF
95ca63c4 12675
bec39cab 12676fi
95ca63c4 12677
bec39cab 12678done
95ca63c4 12679
c906108c 12680
a9322a30 12681for ac_header in sys/proc.h
bec39cab
AC
12682do
12683as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a9322a30 12684echo "$as_me:$LINENO: checking for $ac_header" >&5
b4e70030
JB
12685echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12686if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12687 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12688else
a9322a30 12689 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12690/* confdefs.h. */
12691_ACEOF
12692cat confdefs.h >>conftest.$ac_ext
12693cat >>conftest.$ac_ext <<_ACEOF
12694/* end confdefs.h. */
a9322a30
TT
12695#if HAVE_SYS_PARAM_H
12696# include <sys/param.h>
12697#endif
12698
12699
bec39cab
AC
12700#include <$ac_header>
12701_ACEOF
12702rm -f conftest.$ac_objext
12703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12704 (eval $ac_compile) 2>conftest.er1
12705 ac_status=$?
12706 grep -v '^ *+' conftest.er1 >conftest.err
12707 rm -f conftest.er1
12708 cat conftest.err >&5
12709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12710 (exit $ac_status); } &&
b4e70030
JB
12711 { ac_try='test -z "$ac_c_werror_flag"
12712 || test ! -s conftest.err'
bec39cab
AC
12713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12714 (eval $ac_try) 2>&5
12715 ac_status=$?
12716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12717 (exit $ac_status); }; } &&
12718 { ac_try='test -s conftest.$ac_objext'
12719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12720 (eval $ac_try) 2>&5
12721 ac_status=$?
12722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12723 (exit $ac_status); }; }; then
a9322a30 12724 eval "$as_ac_Header=yes"
bec39cab
AC
12725else
12726 echo "$as_me: failed program was:" >&5
12727sed 's/^/| /' conftest.$ac_ext >&5
12728
a9322a30 12729eval "$as_ac_Header=no"
bec39cab
AC
12730fi
12731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12732fi
12733echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12734echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12735if test `eval echo '${'$as_ac_Header'}'` = yes; then
12736 cat >>confdefs.h <<_ACEOF
12737#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12738_ACEOF
bec39cab 12739
a9322a30
TT
12740fi
12741
12742done
12743
12744
12745for ac_header in sys/user.h
12746do
12747as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12748echo "$as_me:$LINENO: checking for $ac_header" >&5
12749echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12750if eval "test \"\${$as_ac_Header+set}\" = set"; then
12751 echo $ECHO_N "(cached) $ECHO_C" >&6
12752else
12753 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12754/* confdefs.h. */
12755_ACEOF
12756cat confdefs.h >>conftest.$ac_ext
12757cat >>conftest.$ac_ext <<_ACEOF
12758/* end confdefs.h. */
a9322a30
TT
12759#if HAVE_SYS_PARAM_H
12760# include <sys/param.h>
12761#endif
12762
12763
bec39cab
AC
12764#include <$ac_header>
12765_ACEOF
a9322a30
TT
12766rm -f conftest.$ac_objext
12767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12768 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
12769 ac_status=$?
12770 grep -v '^ *+' conftest.er1 >conftest.err
12771 rm -f conftest.er1
12772 cat conftest.err >&5
12773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
12774 (exit $ac_status); } &&
12775 { ac_try='test -z "$ac_c_werror_flag"
12776 || test ! -s conftest.err'
12777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12778 (eval $ac_try) 2>&5
12779 ac_status=$?
12780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12781 (exit $ac_status); }; } &&
12782 { ac_try='test -s conftest.$ac_objext'
12783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12784 (eval $ac_try) 2>&5
12785 ac_status=$?
12786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12787 (exit $ac_status); }; }; then
12788 eval "$as_ac_Header=yes"
bec39cab
AC
12789else
12790 echo "$as_me: failed program was:" >&5
12791sed 's/^/| /' conftest.$ac_ext >&5
12792
a9322a30 12793eval "$as_ac_Header=no"
75c6e08a 12794fi
a9322a30
TT
12795rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12796fi
12797echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12798echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12799if test `eval echo '${'$as_ac_Header'}'` = yes; then
12800 cat >>confdefs.h <<_ACEOF
12801#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12802_ACEOF
bec39cab 12803
bec39cab 12804fi
bec39cab 12805
a9322a30
TT
12806done
12807
12808
12809# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
12810# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
12811# think that we don't have <curses.h> if we're using GCC.
12812case $host_os in
12813 solaris2.[789])
12814 if test "$GCC" = yes; then
12815
12816cat >>confdefs.h <<\_ACEOF
12817#define _MSE_INT_H 1
bec39cab 12818_ACEOF
75c6e08a 12819
a9322a30
TT
12820 fi ;;
12821esac
12822
75c6e08a
MK
12823
12824
12825
9a156167 12826
a9322a30 12827for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
bec39cab
AC
12828do
12829as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12830if eval "test \"\${$as_ac_Header+set}\" = set"; then
12831 echo "$as_me:$LINENO: checking for $ac_header" >&5
12832echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12833if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
12834 echo $ECHO_N "(cached) $ECHO_C" >&6
12835fi
b4e70030
JB
12836echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12837echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12838else
12839 # Is the header compilable?
b4e70030
JB
12840echo "$as_me:$LINENO: checking $ac_header usability" >&5
12841echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
12842cat >conftest.$ac_ext <<_ACEOF
12843/* confdefs.h. */
12844_ACEOF
12845cat confdefs.h >>conftest.$ac_ext
12846cat >>conftest.$ac_ext <<_ACEOF
12847/* end confdefs.h. */
12848$ac_includes_default
12849#include <$ac_header>
12850_ACEOF
12851rm -f conftest.$ac_objext
12852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12853 (eval $ac_compile) 2>conftest.er1
12854 ac_status=$?
12855 grep -v '^ *+' conftest.er1 >conftest.err
12856 rm -f conftest.er1
12857 cat conftest.err >&5
12858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12859 (exit $ac_status); } &&
b4e70030
JB
12860 { ac_try='test -z "$ac_c_werror_flag"
12861 || test ! -s conftest.err'
bec39cab
AC
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); }; } &&
12867 { ac_try='test -s conftest.$ac_objext'
12868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12869 (eval $ac_try) 2>&5
12870 ac_status=$?
12871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12872 (exit $ac_status); }; }; then
12873 ac_header_compiler=yes
12874else
12875 echo "$as_me: failed program was:" >&5
12876sed 's/^/| /' conftest.$ac_ext >&5
12877
b4e70030 12878ac_header_compiler=no
bec39cab
AC
12879fi
12880rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
12881echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12882echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
12883
12884# Is the header present?
b4e70030
JB
12885echo "$as_me:$LINENO: checking $ac_header presence" >&5
12886echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
12887cat >conftest.$ac_ext <<_ACEOF
12888/* confdefs.h. */
12889_ACEOF
12890cat confdefs.h >>conftest.$ac_ext
12891cat >>conftest.$ac_ext <<_ACEOF
12892/* end confdefs.h. */
12893#include <$ac_header>
12894_ACEOF
12895if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12896 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12897 ac_status=$?
12898 grep -v '^ *+' conftest.er1 >conftest.err
12899 rm -f conftest.er1
12900 cat conftest.err >&5
12901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12902 (exit $ac_status); } >/dev/null; then
12903 if test -s conftest.err; then
12904 ac_cpp_err=$ac_c_preproc_warn_flag
12905 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12906 else
12907 ac_cpp_err=
12908 fi
9a156167 12909else
bec39cab 12910 ac_cpp_err=yes
9a156167 12911fi
bec39cab
AC
12912if test -z "$ac_cpp_err"; then
12913 ac_header_preproc=yes
12914else
12915 echo "$as_me: failed program was:" >&5
12916sed 's/^/| /' conftest.$ac_ext >&5
9a156167 12917
bec39cab 12918 ac_header_preproc=no
9a156167 12919fi
bec39cab 12920rm -f conftest.err conftest.$ac_ext
b4e70030
JB
12921echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12922echo "${ECHO_T}$ac_header_preproc" >&6
9a156167 12923
bec39cab
AC
12924# So? What about this header?
12925case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12926 yes:no: )
12927 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12928echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12929 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12930echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12931 ac_header_preproc=yes
12932 ;;
12933 no:yes:* )
12934 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12935echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12936 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12937echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12938 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12939echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12940 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12941echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12942 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12943echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12944 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12945echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
12946 (
12947 cat <<\_ASBOX
12948## ------------------------------------------ ##
12949## Report this to the AC_PACKAGE_NAME lists. ##
12950## ------------------------------------------ ##
12951_ASBOX
12952 ) |
12953 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
12954 ;;
12955esac
b4e70030
JB
12956echo "$as_me:$LINENO: checking for $ac_header" >&5
12957echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12958if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12959 echo $ECHO_N "(cached) $ECHO_C" >&6
9a156167 12960else
bec39cab 12961 eval "$as_ac_Header=\$ac_header_preproc"
9a156167 12962fi
b4e70030
JB
12963echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12964echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9a156167 12965
bec39cab
AC
12966fi
12967if test `eval echo '${'$as_ac_Header'}'` = yes; then
12968 cat >>confdefs.h <<_ACEOF
12969#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12970_ACEOF
9a156167 12971
bec39cab 12972fi
9a156167 12973
bec39cab 12974done
9a156167 12975
9a156167 12976
a9322a30 12977for ac_header in term.h
bec39cab
AC
12978do
12979as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a9322a30 12980echo "$as_me:$LINENO: checking for $ac_header" >&5
b4e70030
JB
12981echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12982if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12983 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12984else
a9322a30 12985 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12986/* confdefs.h. */
12987_ACEOF
12988cat confdefs.h >>conftest.$ac_ext
12989cat >>conftest.$ac_ext <<_ACEOF
436868fb 12990/* end confdefs.h. */
a9322a30
TT
12991#if HAVE_CURSES_H
12992# include <curses.h>
12993#endif
12994
12995
436868fb
DP
12996#include <$ac_header>
12997_ACEOF
12998rm -f conftest.$ac_objext
12999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13000 (eval $ac_compile) 2>conftest.er1
13001 ac_status=$?
13002 grep -v '^ *+' conftest.er1 >conftest.err
13003 rm -f conftest.er1
13004 cat conftest.err >&5
13005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13006 (exit $ac_status); } &&
13007 { ac_try='test -z "$ac_c_werror_flag"
13008 || test ! -s conftest.err'
13009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13010 (eval $ac_try) 2>&5
13011 ac_status=$?
13012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13013 (exit $ac_status); }; } &&
13014 { ac_try='test -s conftest.$ac_objext'
13015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13016 (eval $ac_try) 2>&5
13017 ac_status=$?
13018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13019 (exit $ac_status); }; }; then
a9322a30 13020 eval "$as_ac_Header=yes"
436868fb
DP
13021else
13022 echo "$as_me: failed program was:" >&5
13023sed 's/^/| /' conftest.$ac_ext >&5
13024
a9322a30 13025eval "$as_ac_Header=no"
436868fb
DP
13026fi
13027rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13028fi
13029echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13030echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13031if test `eval echo '${'$as_ac_Header'}'` = yes; then
13032 cat >>confdefs.h <<_ACEOF
13033#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13034_ACEOF
436868fb 13035
a9322a30
TT
13036fi
13037
13038done
13039
13040
13041# ------------------------- #
13042# Checks for declarations. #
13043# ------------------------- #
13044
13045echo "$as_me:$LINENO: checking whether free is declared" >&5
13046echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
13047if test "${ac_cv_have_decl_free+set}" = set; then
13048 echo $ECHO_N "(cached) $ECHO_C" >&6
13049else
13050 cat >conftest.$ac_ext <<_ACEOF
436868fb
DP
13051/* confdefs.h. */
13052_ACEOF
13053cat confdefs.h >>conftest.$ac_ext
13054cat >>conftest.$ac_ext <<_ACEOF
13055/* end confdefs.h. */
a9322a30
TT
13056$ac_includes_default
13057int
13058main ()
13059{
13060#ifndef free
13061 char *p = (char *) free;
13062#endif
13063
13064 ;
13065 return 0;
13066}
436868fb 13067_ACEOF
a9322a30
TT
13068rm -f conftest.$ac_objext
13069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13070 (eval $ac_compile) 2>conftest.er1
436868fb
DP
13071 ac_status=$?
13072 grep -v '^ *+' conftest.er1 >conftest.err
13073 rm -f conftest.er1
13074 cat conftest.err >&5
13075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13076 (exit $ac_status); } &&
13077 { ac_try='test -z "$ac_c_werror_flag"
13078 || test ! -s conftest.err'
13079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13080 (eval $ac_try) 2>&5
13081 ac_status=$?
13082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13083 (exit $ac_status); }; } &&
13084 { ac_try='test -s conftest.$ac_objext'
13085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13086 (eval $ac_try) 2>&5
13087 ac_status=$?
13088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13089 (exit $ac_status); }; }; then
13090 ac_cv_have_decl_free=yes
436868fb
DP
13091else
13092 echo "$as_me: failed program was:" >&5
13093sed 's/^/| /' conftest.$ac_ext >&5
13094
a9322a30 13095ac_cv_have_decl_free=no
436868fb 13096fi
a9322a30 13097rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
436868fb 13098fi
a9322a30
TT
13099echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
13100echo "${ECHO_T}$ac_cv_have_decl_free" >&6
13101if test $ac_cv_have_decl_free = yes; then
436868fb 13102
a9322a30
TT
13103cat >>confdefs.h <<_ACEOF
13104#define HAVE_DECL_FREE 1
436868fb
DP
13105_ACEOF
13106
436868fb 13107
a9322a30
TT
13108else
13109 cat >>confdefs.h <<_ACEOF
13110#define HAVE_DECL_FREE 0
13111_ACEOF
436868fb
DP
13112
13113
436868fb 13114fi
a9322a30
TT
13115echo "$as_me:$LINENO: checking whether malloc is declared" >&5
13116echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
13117if test "${ac_cv_have_decl_malloc+set}" = set; then
13118 echo $ECHO_N "(cached) $ECHO_C" >&6
436868fb 13119else
a9322a30 13120 cat >conftest.$ac_ext <<_ACEOF
436868fb
DP
13121/* confdefs.h. */
13122_ACEOF
13123cat confdefs.h >>conftest.$ac_ext
13124cat >>conftest.$ac_ext <<_ACEOF
bec39cab
AC
13125/* end confdefs.h. */
13126$ac_includes_default
a9322a30
TT
13127int
13128main ()
13129{
13130#ifndef malloc
13131 char *p = (char *) malloc;
13132#endif
13133
13134 ;
13135 return 0;
13136}
bec39cab
AC
13137_ACEOF
13138rm -f conftest.$ac_objext
13139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13140 (eval $ac_compile) 2>conftest.er1
13141 ac_status=$?
13142 grep -v '^ *+' conftest.er1 >conftest.err
13143 rm -f conftest.er1
13144 cat conftest.err >&5
13145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13146 (exit $ac_status); } &&
b4e70030
JB
13147 { ac_try='test -z "$ac_c_werror_flag"
13148 || test ! -s conftest.err'
bec39cab
AC
13149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13150 (eval $ac_try) 2>&5
13151 ac_status=$?
13152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13153 (exit $ac_status); }; } &&
13154 { ac_try='test -s conftest.$ac_objext'
13155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13156 (eval $ac_try) 2>&5
13157 ac_status=$?
13158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13159 (exit $ac_status); }; }; then
a9322a30 13160 ac_cv_have_decl_malloc=yes
bec39cab
AC
13161else
13162 echo "$as_me: failed program was:" >&5
13163sed 's/^/| /' conftest.$ac_ext >&5
13164
a9322a30 13165ac_cv_have_decl_malloc=no
bec39cab
AC
13166fi
13167rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13168fi
13169echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
13170echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
13171if test $ac_cv_have_decl_malloc = yes; then
bec39cab 13172
a9322a30
TT
13173cat >>confdefs.h <<_ACEOF
13174#define HAVE_DECL_MALLOC 1
bec39cab 13175_ACEOF
9a156167 13176
9a156167
MK
13177
13178else
bec39cab 13179 cat >>confdefs.h <<_ACEOF
a9322a30 13180#define HAVE_DECL_MALLOC 0
bec39cab 13181_ACEOF
9a156167 13182
c890192f 13183
bec39cab 13184fi
a9322a30
TT
13185echo "$as_me:$LINENO: checking whether realloc is declared" >&5
13186echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
13187if test "${ac_cv_have_decl_realloc+set}" = set; then
13188 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13189else
a9322a30 13190 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13191/* confdefs.h. */
13192_ACEOF
13193cat confdefs.h >>conftest.$ac_ext
13194cat >>conftest.$ac_ext <<_ACEOF
13195/* end confdefs.h. */
13196$ac_includes_default
a9322a30
TT
13197int
13198main ()
13199{
13200#ifndef realloc
13201 char *p = (char *) realloc;
13202#endif
13203
13204 ;
13205 return 0;
13206}
bec39cab
AC
13207_ACEOF
13208rm -f conftest.$ac_objext
13209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13210 (eval $ac_compile) 2>conftest.er1
13211 ac_status=$?
13212 grep -v '^ *+' conftest.er1 >conftest.err
13213 rm -f conftest.er1
13214 cat conftest.err >&5
13215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13216 (exit $ac_status); } &&
b4e70030
JB
13217 { ac_try='test -z "$ac_c_werror_flag"
13218 || test ! -s conftest.err'
bec39cab
AC
13219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13220 (eval $ac_try) 2>&5
13221 ac_status=$?
13222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13223 (exit $ac_status); }; } &&
13224 { ac_try='test -s conftest.$ac_objext'
13225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13226 (eval $ac_try) 2>&5
13227 ac_status=$?
13228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13229 (exit $ac_status); }; }; then
a9322a30 13230 ac_cv_have_decl_realloc=yes
bec39cab
AC
13231else
13232 echo "$as_me: failed program was:" >&5
13233sed 's/^/| /' conftest.$ac_ext >&5
13234
a9322a30 13235ac_cv_have_decl_realloc=no
bec39cab
AC
13236fi
13237rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13238fi
13239echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
13240echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
13241if test $ac_cv_have_decl_realloc = yes; then
bec39cab 13242
a9322a30
TT
13243cat >>confdefs.h <<_ACEOF
13244#define HAVE_DECL_REALLOC 1
bec39cab 13245_ACEOF
bec39cab 13246
bec39cab 13247
c890192f 13248else
bec39cab 13249 cat >>confdefs.h <<_ACEOF
a9322a30 13250#define HAVE_DECL_REALLOC 0
bec39cab 13251_ACEOF
c890192f 13252
bec39cab 13253
bec39cab 13254fi
a9322a30
TT
13255echo "$as_me:$LINENO: checking whether strerror is declared" >&5
13256echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
13257if test "${ac_cv_have_decl_strerror+set}" = set; then
13258 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13259else
a9322a30 13260 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13261/* confdefs.h. */
13262_ACEOF
13263cat confdefs.h >>conftest.$ac_ext
13264cat >>conftest.$ac_ext <<_ACEOF
13265/* end confdefs.h. */
13266$ac_includes_default
a9322a30
TT
13267int
13268main ()
13269{
13270#ifndef strerror
13271 char *p = (char *) strerror;
13272#endif
13273
13274 ;
13275 return 0;
13276}
bec39cab
AC
13277_ACEOF
13278rm -f conftest.$ac_objext
13279if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13280 (eval $ac_compile) 2>conftest.er1
13281 ac_status=$?
13282 grep -v '^ *+' conftest.er1 >conftest.err
13283 rm -f conftest.er1
13284 cat conftest.err >&5
13285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13286 (exit $ac_status); } &&
b4e70030
JB
13287 { ac_try='test -z "$ac_c_werror_flag"
13288 || test ! -s conftest.err'
bec39cab
AC
13289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13290 (eval $ac_try) 2>&5
13291 ac_status=$?
13292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13293 (exit $ac_status); }; } &&
13294 { ac_try='test -s conftest.$ac_objext'
13295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13296 (eval $ac_try) 2>&5
13297 ac_status=$?
13298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13299 (exit $ac_status); }; }; then
a9322a30 13300 ac_cv_have_decl_strerror=yes
bec39cab
AC
13301else
13302 echo "$as_me: failed program was:" >&5
13303sed 's/^/| /' conftest.$ac_ext >&5
13304
a9322a30 13305ac_cv_have_decl_strerror=no
bec39cab
AC
13306fi
13307rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13308fi
13309echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
13310echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
13311if test $ac_cv_have_decl_strerror = yes; then
bec39cab 13312
a9322a30
TT
13313cat >>confdefs.h <<_ACEOF
13314#define HAVE_DECL_STRERROR 1
bec39cab 13315_ACEOF
bec39cab 13316
bec39cab 13317
9a156167 13318else
bec39cab 13319 cat >>confdefs.h <<_ACEOF
a9322a30 13320#define HAVE_DECL_STRERROR 0
bec39cab 13321_ACEOF
9a156167 13322
06825bd1 13323
bec39cab 13324fi
a9322a30
TT
13325echo "$as_me:$LINENO: checking whether strstr is declared" >&5
13326echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
13327if test "${ac_cv_have_decl_strstr+set}" = set; then
13328 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13329else
a9322a30 13330 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13331/* confdefs.h. */
13332_ACEOF
13333cat confdefs.h >>conftest.$ac_ext
13334cat >>conftest.$ac_ext <<_ACEOF
13335/* end confdefs.h. */
13336$ac_includes_default
a9322a30
TT
13337int
13338main ()
13339{
13340#ifndef strstr
13341 char *p = (char *) strstr;
13342#endif
13343
13344 ;
13345 return 0;
13346}
bec39cab
AC
13347_ACEOF
13348rm -f conftest.$ac_objext
13349if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13350 (eval $ac_compile) 2>conftest.er1
13351 ac_status=$?
13352 grep -v '^ *+' conftest.er1 >conftest.err
13353 rm -f conftest.er1
13354 cat conftest.err >&5
13355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13356 (exit $ac_status); } &&
b4e70030
JB
13357 { ac_try='test -z "$ac_c_werror_flag"
13358 || test ! -s conftest.err'
bec39cab
AC
13359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13360 (eval $ac_try) 2>&5
13361 ac_status=$?
13362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13363 (exit $ac_status); }; } &&
13364 { ac_try='test -s conftest.$ac_objext'
13365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13366 (eval $ac_try) 2>&5
13367 ac_status=$?
13368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13369 (exit $ac_status); }; }; then
a9322a30 13370 ac_cv_have_decl_strstr=yes
bec39cab
AC
13371else
13372 echo "$as_me: failed program was:" >&5
13373sed 's/^/| /' conftest.$ac_ext >&5
13374
a9322a30 13375ac_cv_have_decl_strstr=no
bec39cab
AC
13376fi
13377rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13378fi
13379echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
13380echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
13381if test $ac_cv_have_decl_strstr = yes; then
bec39cab 13382
a9322a30
TT
13383cat >>confdefs.h <<_ACEOF
13384#define HAVE_DECL_STRSTR 1
bec39cab 13385_ACEOF
bec39cab 13386
bec39cab 13387
bec39cab 13388else
bec39cab 13389 cat >>confdefs.h <<_ACEOF
a9322a30 13390#define HAVE_DECL_STRSTR 0
bec39cab 13391_ACEOF
06825bd1 13392
bec39cab 13393
bec39cab 13394fi
a9322a30
TT
13395echo "$as_me:$LINENO: checking whether getopt is declared" >&5
13396echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
13397if test "${ac_cv_have_decl_getopt+set}" = set; then
13398 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13399else
a9322a30 13400 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13401/* confdefs.h. */
13402_ACEOF
13403cat confdefs.h >>conftest.$ac_ext
13404cat >>conftest.$ac_ext <<_ACEOF
13405/* end confdefs.h. */
13406$ac_includes_default
a9322a30
TT
13407int
13408main ()
13409{
13410#ifndef getopt
13411 char *p = (char *) getopt;
13412#endif
13413
13414 ;
13415 return 0;
13416}
bec39cab
AC
13417_ACEOF
13418rm -f conftest.$ac_objext
13419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13420 (eval $ac_compile) 2>conftest.er1
13421 ac_status=$?
13422 grep -v '^ *+' conftest.er1 >conftest.err
13423 rm -f conftest.er1
13424 cat conftest.err >&5
13425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13426 (exit $ac_status); } &&
b4e70030
JB
13427 { ac_try='test -z "$ac_c_werror_flag"
13428 || test ! -s conftest.err'
bec39cab
AC
13429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13430 (eval $ac_try) 2>&5
13431 ac_status=$?
13432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13433 (exit $ac_status); }; } &&
13434 { ac_try='test -s conftest.$ac_objext'
13435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13436 (eval $ac_try) 2>&5
13437 ac_status=$?
13438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13439 (exit $ac_status); }; }; then
a9322a30 13440 ac_cv_have_decl_getopt=yes
bec39cab
AC
13441else
13442 echo "$as_me: failed program was:" >&5
13443sed 's/^/| /' conftest.$ac_ext >&5
13444
a9322a30 13445ac_cv_have_decl_getopt=no
bec39cab
AC
13446fi
13447rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13448fi
13449echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
13450echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
13451if test $ac_cv_have_decl_getopt = yes; then
bec39cab 13452
a9322a30
TT
13453cat >>confdefs.h <<_ACEOF
13454#define HAVE_DECL_GETOPT 1
bec39cab 13455_ACEOF
5ee754fc 13456
bec39cab 13457
5ee754fc 13458else
bec39cab 13459 cat >>confdefs.h <<_ACEOF
a9322a30 13460#define HAVE_DECL_GETOPT 0
bec39cab 13461_ACEOF
c906108c 13462
bec39cab 13463
bec39cab 13464fi
a9322a30
TT
13465echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
13466echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
13467if test "${ac_cv_have_decl_snprintf+set}" = set; then
13468 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13469else
a9322a30 13470 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
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{
13480#ifndef snprintf
13481 char *p = (char *) snprintf;
13482#endif
13483
13484 ;
13485 return 0;
13486}
bec39cab
AC
13487_ACEOF
13488rm -f conftest.$ac_objext
13489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13490 (eval $ac_compile) 2>conftest.er1
13491 ac_status=$?
13492 grep -v '^ *+' conftest.er1 >conftest.err
13493 rm -f conftest.er1
13494 cat conftest.err >&5
13495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13496 (exit $ac_status); } &&
b4e70030
JB
13497 { ac_try='test -z "$ac_c_werror_flag"
13498 || test ! -s conftest.err'
bec39cab
AC
13499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13500 (eval $ac_try) 2>&5
13501 ac_status=$?
13502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13503 (exit $ac_status); }; } &&
13504 { ac_try='test -s conftest.$ac_objext'
13505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13506 (eval $ac_try) 2>&5
13507 ac_status=$?
13508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13509 (exit $ac_status); }; }; then
a9322a30 13510 ac_cv_have_decl_snprintf=yes
bec39cab
AC
13511else
13512 echo "$as_me: failed program was:" >&5
13513sed 's/^/| /' conftest.$ac_ext >&5
13514
a9322a30 13515ac_cv_have_decl_snprintf=no
bec39cab
AC
13516fi
13517rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13518fi
13519echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
13520echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
13521if test $ac_cv_have_decl_snprintf = yes; then
bec39cab 13522
a9322a30
TT
13523cat >>confdefs.h <<_ACEOF
13524#define HAVE_DECL_SNPRINTF 1
bec39cab 13525_ACEOF
c906108c
SS
13526
13527
9608ab8b 13528else
bec39cab 13529 cat >>confdefs.h <<_ACEOF
a9322a30 13530#define HAVE_DECL_SNPRINTF 0
bec39cab 13531_ACEOF
5ee754fc 13532
5ee754fc 13533
bec39cab 13534fi
a9322a30
TT
13535echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
13536echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
13537if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
13538 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13539else
a9322a30 13540 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13541/* confdefs.h. */
13542_ACEOF
13543cat confdefs.h >>conftest.$ac_ext
13544cat >>conftest.$ac_ext <<_ACEOF
13545/* end confdefs.h. */
13546$ac_includes_default
a9322a30
TT
13547int
13548main ()
13549{
13550#ifndef vsnprintf
13551 char *p = (char *) vsnprintf;
13552#endif
13553
13554 ;
13555 return 0;
13556}
bec39cab
AC
13557_ACEOF
13558rm -f conftest.$ac_objext
13559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13560 (eval $ac_compile) 2>conftest.er1
13561 ac_status=$?
13562 grep -v '^ *+' conftest.er1 >conftest.err
13563 rm -f conftest.er1
13564 cat conftest.err >&5
13565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13566 (exit $ac_status); } &&
b4e70030
JB
13567 { ac_try='test -z "$ac_c_werror_flag"
13568 || test ! -s conftest.err'
bec39cab
AC
13569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13570 (eval $ac_try) 2>&5
13571 ac_status=$?
13572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13573 (exit $ac_status); }; } &&
13574 { ac_try='test -s conftest.$ac_objext'
13575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13576 (eval $ac_try) 2>&5
13577 ac_status=$?
13578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13579 (exit $ac_status); }; }; then
a9322a30 13580 ac_cv_have_decl_vsnprintf=yes
bec39cab
AC
13581else
13582 echo "$as_me: failed program was:" >&5
13583sed 's/^/| /' conftest.$ac_ext >&5
13584
a9322a30 13585ac_cv_have_decl_vsnprintf=no
bec39cab
AC
13586fi
13587rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13588fi
13589echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
13590echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
13591if test $ac_cv_have_decl_vsnprintf = yes; then
bec39cab 13592
a9322a30
TT
13593cat >>confdefs.h <<_ACEOF
13594#define HAVE_DECL_VSNPRINTF 1
bec39cab 13595_ACEOF
5ee754fc 13596
5ee754fc 13597
5ee754fc 13598else
bec39cab 13599 cat >>confdefs.h <<_ACEOF
a9322a30 13600#define HAVE_DECL_VSNPRINTF 0
bec39cab 13601_ACEOF
5ee754fc 13602
a9322a30 13603
5ee754fc
MK
13604fi
13605
bec39cab
AC
13606
13607
a8111142
TT
13608 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
13609echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
13610if test "${am_cv_val_LC_MESSAGES+set}" = set; then
13611 echo $ECHO_N "(cached) $ECHO_C" >&6
13612else
13613 cat >conftest.$ac_ext <<_ACEOF
13614/* confdefs.h. */
13615_ACEOF
13616cat confdefs.h >>conftest.$ac_ext
13617cat >>conftest.$ac_ext <<_ACEOF
13618/* end confdefs.h. */
13619#include <locale.h>
13620int
13621main ()
13622{
13623return LC_MESSAGES
13624 ;
13625 return 0;
13626}
13627_ACEOF
13628rm -f conftest.$ac_objext conftest$ac_exeext
13629if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13630 (eval $ac_link) 2>conftest.er1
13631 ac_status=$?
13632 grep -v '^ *+' conftest.er1 >conftest.err
13633 rm -f conftest.er1
13634 cat conftest.err >&5
13635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13636 (exit $ac_status); } &&
13637 { ac_try='test -z "$ac_c_werror_flag"
13638 || test ! -s conftest.err'
13639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13640 (eval $ac_try) 2>&5
13641 ac_status=$?
13642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13643 (exit $ac_status); }; } &&
13644 { ac_try='test -s conftest$ac_exeext'
13645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13646 (eval $ac_try) 2>&5
13647 ac_status=$?
13648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13649 (exit $ac_status); }; }; then
13650 am_cv_val_LC_MESSAGES=yes
13651else
13652 echo "$as_me: failed program was:" >&5
13653sed 's/^/| /' conftest.$ac_ext >&5
13654
13655am_cv_val_LC_MESSAGES=no
13656fi
13657rm -f conftest.err conftest.$ac_objext \
13658 conftest$ac_exeext conftest.$ac_ext
13659fi
13660echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
13661echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
13662 if test $am_cv_val_LC_MESSAGES = yes; then
13663
13664cat >>confdefs.h <<\_ACEOF
13665#define HAVE_LC_MESSAGES 1
13666_ACEOF
13667
13668 fi
13669
13670
a9322a30
TT
13671# ----------------------- #
13672# Checks for structures. #
13673# ----------------------- #
13674
13675echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13676echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13677if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
bec39cab 13678 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13679else
a9322a30 13680 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13681/* confdefs.h. */
13682_ACEOF
13683cat confdefs.h >>conftest.$ac_ext
13684cat >>conftest.$ac_ext <<_ACEOF
13685/* end confdefs.h. */
13686$ac_includes_default
a9322a30
TT
13687int
13688main ()
13689{
13690static struct stat ac_aggr;
13691if (ac_aggr.st_blocks)
13692return 0;
13693 ;
13694 return 0;
13695}
bec39cab
AC
13696_ACEOF
13697rm -f conftest.$ac_objext
13698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13699 (eval $ac_compile) 2>conftest.er1
13700 ac_status=$?
13701 grep -v '^ *+' conftest.er1 >conftest.err
13702 rm -f conftest.er1
13703 cat conftest.err >&5
13704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13705 (exit $ac_status); } &&
b4e70030
JB
13706 { ac_try='test -z "$ac_c_werror_flag"
13707 || test ! -s conftest.err'
bec39cab
AC
13708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13709 (eval $ac_try) 2>&5
13710 ac_status=$?
13711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13712 (exit $ac_status); }; } &&
13713 { ac_try='test -s conftest.$ac_objext'
13714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13715 (eval $ac_try) 2>&5
13716 ac_status=$?
13717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13718 (exit $ac_status); }; }; then
a9322a30 13719 ac_cv_member_struct_stat_st_blocks=yes
bec39cab
AC
13720else
13721 echo "$as_me: failed program was:" >&5
13722sed 's/^/| /' conftest.$ac_ext >&5
13723
bec39cab
AC
13724cat >conftest.$ac_ext <<_ACEOF
13725/* confdefs.h. */
13726_ACEOF
13727cat confdefs.h >>conftest.$ac_ext
13728cat >>conftest.$ac_ext <<_ACEOF
13729/* end confdefs.h. */
a9322a30
TT
13730$ac_includes_default
13731int
13732main ()
13733{
13734static struct stat ac_aggr;
13735if (sizeof ac_aggr.st_blocks)
13736return 0;
13737 ;
13738 return 0;
13739}
bec39cab 13740_ACEOF
a9322a30
TT
13741rm -f conftest.$ac_objext
13742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13743 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
13744 ac_status=$?
13745 grep -v '^ *+' conftest.er1 >conftest.err
13746 rm -f conftest.er1
13747 cat conftest.err >&5
13748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13749 (exit $ac_status); } &&
13750 { ac_try='test -z "$ac_c_werror_flag"
13751 || test ! -s conftest.err'
13752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13753 (eval $ac_try) 2>&5
13754 ac_status=$?
13755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13756 (exit $ac_status); }; } &&
13757 { ac_try='test -s conftest.$ac_objext'
13758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13759 (eval $ac_try) 2>&5
13760 ac_status=$?
13761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13762 (exit $ac_status); }; }; then
13763 ac_cv_member_struct_stat_st_blocks=yes
bec39cab
AC
13764else
13765 echo "$as_me: failed program was:" >&5
13766sed 's/^/| /' conftest.$ac_ext >&5
5ee754fc 13767
a9322a30 13768ac_cv_member_struct_stat_st_blocks=no
5ee754fc 13769fi
a9322a30 13770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13771fi
a9322a30 13772rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13773fi
a9322a30
TT
13774echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13775echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13776if test $ac_cv_member_struct_stat_st_blocks = yes; then
5ee754fc 13777
a9322a30
TT
13778cat >>confdefs.h <<_ACEOF
13779#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13780_ACEOF
5ee754fc 13781
5ee754fc 13782
bec39cab 13783fi
a9322a30
TT
13784echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13785echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13786if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13787 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13788else
a9322a30 13789 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13790/* confdefs.h. */
13791_ACEOF
13792cat confdefs.h >>conftest.$ac_ext
13793cat >>conftest.$ac_ext <<_ACEOF
13794/* end confdefs.h. */
13795$ac_includes_default
a9322a30
TT
13796int
13797main ()
13798{
13799static struct stat ac_aggr;
13800if (ac_aggr.st_blksize)
13801return 0;
13802 ;
13803 return 0;
13804}
bec39cab
AC
13805_ACEOF
13806rm -f conftest.$ac_objext
13807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13808 (eval $ac_compile) 2>conftest.er1
13809 ac_status=$?
13810 grep -v '^ *+' conftest.er1 >conftest.err
13811 rm -f conftest.er1
13812 cat conftest.err >&5
13813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13814 (exit $ac_status); } &&
b4e70030
JB
13815 { ac_try='test -z "$ac_c_werror_flag"
13816 || test ! -s conftest.err'
bec39cab
AC
13817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13818 (eval $ac_try) 2>&5
13819 ac_status=$?
13820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13821 (exit $ac_status); }; } &&
13822 { ac_try='test -s conftest.$ac_objext'
13823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13824 (eval $ac_try) 2>&5
13825 ac_status=$?
13826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13827 (exit $ac_status); }; }; then
a9322a30 13828 ac_cv_member_struct_stat_st_blksize=yes
bec39cab
AC
13829else
13830 echo "$as_me: failed program was:" >&5
13831sed 's/^/| /' conftest.$ac_ext >&5
13832
7eb368b3
NR
13833cat >conftest.$ac_ext <<_ACEOF
13834/* confdefs.h. */
13835_ACEOF
13836cat confdefs.h >>conftest.$ac_ext
13837cat >>conftest.$ac_ext <<_ACEOF
13838/* end confdefs.h. */
13839$ac_includes_default
a9322a30
TT
13840int
13841main ()
13842{
13843static struct stat ac_aggr;
13844if (sizeof ac_aggr.st_blksize)
13845return 0;
13846 ;
13847 return 0;
13848}
7eb368b3
NR
13849_ACEOF
13850rm -f conftest.$ac_objext
13851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13852 (eval $ac_compile) 2>conftest.er1
13853 ac_status=$?
13854 grep -v '^ *+' conftest.er1 >conftest.err
13855 rm -f conftest.er1
13856 cat conftest.err >&5
13857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13858 (exit $ac_status); } &&
13859 { ac_try='test -z "$ac_c_werror_flag"
13860 || test ! -s conftest.err'
13861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13862 (eval $ac_try) 2>&5
13863 ac_status=$?
13864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13865 (exit $ac_status); }; } &&
13866 { ac_try='test -s conftest.$ac_objext'
13867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13868 (eval $ac_try) 2>&5
13869 ac_status=$?
13870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13871 (exit $ac_status); }; }; then
a9322a30 13872 ac_cv_member_struct_stat_st_blksize=yes
7eb368b3
NR
13873else
13874 echo "$as_me: failed program was:" >&5
13875sed 's/^/| /' conftest.$ac_ext >&5
13876
a9322a30 13877ac_cv_member_struct_stat_st_blksize=no
7eb368b3
NR
13878fi
13879rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7eb368b3 13880fi
a9322a30 13881rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7eb368b3 13882fi
a9322a30
TT
13883echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13884echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13885if test $ac_cv_member_struct_stat_st_blksize = yes; then
7eb368b3 13886
a9322a30
TT
13887cat >>confdefs.h <<_ACEOF
13888#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
13889_ACEOF
13890
a9322a30 13891
7eb368b3
NR
13892fi
13893
7eb368b3 13894
a9322a30
TT
13895# ------------------ #
13896# Checks for types. #
13897# ------------------ #
7eb368b3 13898
a9322a30
TT
13899echo "$as_me:$LINENO: checking return type of signal handlers" >&5
13900echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13901if test "${ac_cv_type_signal+set}" = set; then
bec39cab 13902 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13903else
7cb9022a 13904 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13905/* confdefs.h. */
13906_ACEOF
13907cat confdefs.h >>conftest.$ac_ext
13908cat >>conftest.$ac_ext <<_ACEOF
13909/* end confdefs.h. */
a9322a30
TT
13910#include <sys/types.h>
13911#include <signal.h>
13912#ifdef signal
13913# undef signal
13914#endif
13915#ifdef __cplusplus
13916extern "C" void (*signal (int, void (*)(int)))(int);
13917#else
13918void (*signal ()) ();
7cb9022a
MK
13919#endif
13920
a9322a30
TT
13921int
13922main ()
13923{
13924int i;
13925 ;
13926 return 0;
13927}
bec39cab
AC
13928_ACEOF
13929rm -f conftest.$ac_objext
13930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13931 (eval $ac_compile) 2>conftest.er1
13932 ac_status=$?
13933 grep -v '^ *+' conftest.er1 >conftest.err
13934 rm -f conftest.er1
13935 cat conftest.err >&5
13936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13937 (exit $ac_status); } &&
b4e70030
JB
13938 { ac_try='test -z "$ac_c_werror_flag"
13939 || test ! -s conftest.err'
bec39cab
AC
13940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13941 (eval $ac_try) 2>&5
13942 ac_status=$?
13943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13944 (exit $ac_status); }; } &&
13945 { ac_try='test -s conftest.$ac_objext'
13946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13947 (eval $ac_try) 2>&5
13948 ac_status=$?
13949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13950 (exit $ac_status); }; }; then
a9322a30 13951 ac_cv_type_signal=void
bec39cab
AC
13952else
13953 echo "$as_me: failed program was:" >&5
13954sed 's/^/| /' conftest.$ac_ext >&5
13955
a9322a30 13956ac_cv_type_signal=int
bec39cab
AC
13957fi
13958rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13959fi
a9322a30
TT
13960echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
13961echo "${ECHO_T}$ac_cv_type_signal" >&6
bec39cab 13962
a9322a30
TT
13963cat >>confdefs.h <<_ACEOF
13964#define RETSIGTYPE $ac_cv_type_signal
13965_ACEOF
5ee754fc 13966
bec39cab 13967
a9322a30
TT
13968echo "$as_me:$LINENO: checking for socklen_t" >&5
13969echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
13970if test "${ac_cv_type_socklen_t+set}" = set; then
bec39cab 13971 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13972else
a9322a30 13973 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13974/* confdefs.h. */
13975_ACEOF
13976cat confdefs.h >>conftest.$ac_ext
13977cat >>conftest.$ac_ext <<_ACEOF
13978/* end confdefs.h. */
a9322a30
TT
13979#include <sys/types.h>
13980#include <sys/socket.h>
13981
13982
13983int
13984main ()
13985{
13986if ((socklen_t *) 0)
13987 return 0;
13988if (sizeof (socklen_t))
13989 return 0;
13990 ;
13991 return 0;
13992}
bec39cab
AC
13993_ACEOF
13994rm -f conftest.$ac_objext
13995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13996 (eval $ac_compile) 2>conftest.er1
13997 ac_status=$?
13998 grep -v '^ *+' conftest.er1 >conftest.err
13999 rm -f conftest.er1
14000 cat conftest.err >&5
14001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14002 (exit $ac_status); } &&
b4e70030
JB
14003 { ac_try='test -z "$ac_c_werror_flag"
14004 || test ! -s conftest.err'
bec39cab
AC
14005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14006 (eval $ac_try) 2>&5
14007 ac_status=$?
14008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14009 (exit $ac_status); }; } &&
14010 { ac_try='test -s conftest.$ac_objext'
14011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14012 (eval $ac_try) 2>&5
14013 ac_status=$?
14014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14015 (exit $ac_status); }; }; then
a9322a30 14016 ac_cv_type_socklen_t=yes
bec39cab
AC
14017else
14018 echo "$as_me: failed program was:" >&5
14019sed 's/^/| /' conftest.$ac_ext >&5
14020
a9322a30 14021ac_cv_type_socklen_t=no
bec39cab
AC
14022fi
14023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
14024fi
14025echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
14026echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
14027if test $ac_cv_type_socklen_t = yes; then
bec39cab 14028
a9322a30
TT
14029cat >>confdefs.h <<_ACEOF
14030#define HAVE_SOCKLEN_T 1
14031_ACEOF
14032
14033
14034fi
14035
14036
14037# ------------------------------------- #
14038# Checks for compiler characteristics. #
14039# ------------------------------------- #
14040
14041echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14042echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14043if test "${ac_cv_c_const+set}" = set; then
14044 echo $ECHO_N "(cached) $ECHO_C" >&6
14045else
14046 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14047/* confdefs.h. */
14048_ACEOF
14049cat confdefs.h >>conftest.$ac_ext
14050cat >>conftest.$ac_ext <<_ACEOF
14051/* end confdefs.h. */
a9322a30
TT
14052
14053int
14054main ()
14055{
14056/* FIXME: Include the comments suggested by Paul. */
14057#ifndef __cplusplus
14058 /* Ultrix mips cc rejects this. */
14059 typedef int charset[2];
14060 const charset x;
14061 /* SunOS 4.1.1 cc rejects this. */
14062 char const *const *ccp;
14063 char **p;
14064 /* NEC SVR4.0.2 mips cc rejects this. */
14065 struct point {int x, y;};
14066 static struct point const zero = {0,0};
14067 /* AIX XL C 1.02.0.0 rejects this.
14068 It does not let you subtract one const X* pointer from another in
14069 an arm of an if-expression whose if-part is not a constant
14070 expression */
14071 const char *g = "string";
14072 ccp = &g + (g ? g-g : 0);
14073 /* HPUX 7.0 cc rejects these. */
14074 ++ccp;
14075 p = (char**) ccp;
14076 ccp = (char const *const *) p;
14077 { /* SCO 3.2v4 cc rejects this. */
14078 char *t;
14079 char const *s = 0 ? (char *) 0 : (char const *) 0;
14080
14081 *t++ = 0;
14082 }
14083 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14084 int x[] = {25, 17};
14085 const int *foo = &x[0];
14086 ++foo;
14087 }
14088 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14089 typedef const int *iptr;
14090 iptr p = 0;
14091 ++p;
14092 }
14093 { /* AIX XL C 1.02.0.0 rejects this saying
14094 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14095 struct s { int j; const int *ap[3]; };
14096 struct s *b; b->j = 5;
14097 }
14098 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14099 const int foo = 10;
14100 }
14101#endif
14102
14103 ;
14104 return 0;
14105}
bec39cab 14106_ACEOF
a9322a30
TT
14107rm -f conftest.$ac_objext
14108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14109 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14110 ac_status=$?
14111 grep -v '^ *+' conftest.er1 >conftest.err
14112 rm -f conftest.er1
14113 cat conftest.err >&5
14114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
14115 (exit $ac_status); } &&
14116 { ac_try='test -z "$ac_c_werror_flag"
14117 || test ! -s conftest.err'
14118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14119 (eval $ac_try) 2>&5
14120 ac_status=$?
14121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14122 (exit $ac_status); }; } &&
14123 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
14129 ac_cv_c_const=yes
5ee754fc 14130else
bec39cab
AC
14131 echo "$as_me: failed program was:" >&5
14132sed 's/^/| /' conftest.$ac_ext >&5
14133
a9322a30 14134ac_cv_c_const=no
5ee754fc 14135fi
a9322a30 14136rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 14137fi
a9322a30
TT
14138echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14139echo "${ECHO_T}$ac_cv_c_const" >&6
14140if test $ac_cv_c_const = no; then
bec39cab 14141
a9322a30
TT
14142cat >>confdefs.h <<\_ACEOF
14143#define const
bec39cab
AC
14144_ACEOF
14145
5ee754fc 14146fi
bec39cab 14147
a9322a30
TT
14148echo "$as_me:$LINENO: checking for inline" >&5
14149echo $ECHO_N "checking for inline... $ECHO_C" >&6
14150if test "${ac_cv_c_inline+set}" = set; then
bec39cab 14151 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 14152else
a9322a30
TT
14153 ac_cv_c_inline=no
14154for ac_kw in inline __inline__ __inline; do
14155 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14156/* confdefs.h. */
14157_ACEOF
14158cat confdefs.h >>conftest.$ac_ext
14159cat >>conftest.$ac_ext <<_ACEOF
14160/* end confdefs.h. */
a9322a30
TT
14161#ifndef __cplusplus
14162typedef int foo_t;
14163static $ac_kw foo_t static_foo () {return 0; }
14164$ac_kw foo_t foo () {return 0; }
14165#endif
14166
bec39cab
AC
14167_ACEOF
14168rm -f conftest.$ac_objext
14169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14170 (eval $ac_compile) 2>conftest.er1
14171 ac_status=$?
14172 grep -v '^ *+' conftest.er1 >conftest.err
14173 rm -f conftest.er1
14174 cat conftest.err >&5
14175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14176 (exit $ac_status); } &&
b4e70030
JB
14177 { ac_try='test -z "$ac_c_werror_flag"
14178 || test ! -s conftest.err'
bec39cab
AC
14179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14180 (eval $ac_try) 2>&5
14181 ac_status=$?
14182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14183 (exit $ac_status); }; } &&
14184 { ac_try='test -s conftest.$ac_objext'
14185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14186 (eval $ac_try) 2>&5
14187 ac_status=$?
14188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14189 (exit $ac_status); }; }; then
a9322a30 14190 ac_cv_c_inline=$ac_kw; break
bec39cab
AC
14191else
14192 echo "$as_me: failed program was:" >&5
14193sed 's/^/| /' conftest.$ac_ext >&5
14194
bec39cab
AC
14195fi
14196rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 14197done
bec39cab 14198
5ee754fc 14199fi
a9322a30
TT
14200echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
14201echo "${ECHO_T}$ac_cv_c_inline" >&6
bec39cab 14202
5ee754fc 14203
a9322a30
TT
14204case $ac_cv_c_inline in
14205 inline | yes) ;;
14206 *)
14207 case $ac_cv_c_inline in
14208 no) ac_val=;;
14209 *) ac_val=$ac_cv_c_inline;;
14210 esac
14211 cat >>confdefs.h <<_ACEOF
14212#ifndef __cplusplus
14213#define inline $ac_val
14214#endif
14215_ACEOF
bec39cab
AC
14216 ;;
14217esac
bec39cab 14218
a9322a30
TT
14219echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
14220echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
14221if test "${ac_cv_c_bigendian+set}" = set; then
bec39cab 14222 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 14223else
a9322a30 14224 # See if sys/param.h defines the BYTE_ORDER macro.
bec39cab
AC
14225cat >conftest.$ac_ext <<_ACEOF
14226/* confdefs.h. */
14227_ACEOF
14228cat confdefs.h >>conftest.$ac_ext
14229cat >>conftest.$ac_ext <<_ACEOF
14230/* end confdefs.h. */
a9322a30
TT
14231#include <sys/types.h>
14232#include <sys/param.h>
14233
14234int
14235main ()
14236{
14237#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14238 bogus endian macros
14239#endif
14240
14241 ;
14242 return 0;
14243}
bec39cab
AC
14244_ACEOF
14245rm -f conftest.$ac_objext
14246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14247 (eval $ac_compile) 2>conftest.er1
14248 ac_status=$?
14249 grep -v '^ *+' conftest.er1 >conftest.err
14250 rm -f conftest.er1
14251 cat conftest.err >&5
14252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14253 (exit $ac_status); } &&
b4e70030
JB
14254 { ac_try='test -z "$ac_c_werror_flag"
14255 || test ! -s conftest.err'
bec39cab
AC
14256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14257 (eval $ac_try) 2>&5
14258 ac_status=$?
14259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14260 (exit $ac_status); }; } &&
14261 { ac_try='test -s conftest.$ac_objext'
14262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14263 (eval $ac_try) 2>&5
14264 ac_status=$?
14265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14266 (exit $ac_status); }; }; then
a9322a30 14267 # It does; now see whether it defined to BIG_ENDIAN or not.
bec39cab
AC
14268cat >conftest.$ac_ext <<_ACEOF
14269/* confdefs.h. */
14270_ACEOF
14271cat confdefs.h >>conftest.$ac_ext
14272cat >>conftest.$ac_ext <<_ACEOF
14273/* end confdefs.h. */
a9322a30
TT
14274#include <sys/types.h>
14275#include <sys/param.h>
14276
14277int
14278main ()
14279{
14280#if BYTE_ORDER != BIG_ENDIAN
14281 not big endian
14282#endif
14283
14284 ;
14285 return 0;
14286}
bec39cab 14287_ACEOF
a9322a30
TT
14288rm -f conftest.$ac_objext
14289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14290 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14291 ac_status=$?
14292 grep -v '^ *+' conftest.er1 >conftest.err
14293 rm -f conftest.er1
14294 cat conftest.err >&5
14295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
14296 (exit $ac_status); } &&
14297 { ac_try='test -z "$ac_c_werror_flag"
14298 || test ! -s conftest.err'
14299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14300 (eval $ac_try) 2>&5
14301 ac_status=$?
14302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14303 (exit $ac_status); }; } &&
14304 { ac_try='test -s conftest.$ac_objext'
14305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14306 (eval $ac_try) 2>&5
14307 ac_status=$?
14308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14309 (exit $ac_status); }; }; then
14310 ac_cv_c_bigendian=yes
5ee754fc 14311else
bec39cab
AC
14312 echo "$as_me: failed program was:" >&5
14313sed 's/^/| /' conftest.$ac_ext >&5
14314
a9322a30 14315ac_cv_c_bigendian=no
5ee754fc 14316fi
a9322a30 14317rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14318else
a9322a30
TT
14319 echo "$as_me: failed program was:" >&5
14320sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 14321
a9322a30
TT
14322# It does not; compile a test program.
14323if test "$cross_compiling" = yes; then
14324 # try to guess the endianness by grepping values into an object file
14325 ac_cv_c_bigendian=unknown
14326 cat >conftest.$ac_ext <<_ACEOF
14327/* confdefs.h. */
7eb368b3
NR
14328_ACEOF
14329cat confdefs.h >>conftest.$ac_ext
14330cat >>conftest.$ac_ext <<_ACEOF
14331/* end confdefs.h. */
a9322a30
TT
14332short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14333short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14334void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
14335short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14336short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14337void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
7eb368b3
NR
14338int
14339main ()
14340{
a9322a30 14341 _ascii (); _ebcdic ();
7eb368b3
NR
14342 ;
14343 return 0;
14344}
14345_ACEOF
a9322a30
TT
14346rm -f conftest.$ac_objext
14347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14348 (eval $ac_compile) 2>conftest.er1
7eb368b3
NR
14349 ac_status=$?
14350 grep -v '^ *+' conftest.er1 >conftest.err
14351 rm -f conftest.er1
14352 cat conftest.err >&5
14353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14354 (exit $ac_status); } &&
14355 { ac_try='test -z "$ac_c_werror_flag"
14356 || test ! -s conftest.err'
14357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14358 (eval $ac_try) 2>&5
14359 ac_status=$?
14360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14361 (exit $ac_status); }; } &&
a9322a30 14362 { ac_try='test -s conftest.$ac_objext'
7eb368b3
NR
14363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14364 (eval $ac_try) 2>&5
14365 ac_status=$?
14366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14367 (exit $ac_status); }; }; then
a9322a30
TT
14368 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
14369 ac_cv_c_bigendian=yes
14370fi
14371if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14372 if test "$ac_cv_c_bigendian" = unknown; then
14373 ac_cv_c_bigendian=no
14374 else
14375 # finding both strings is unlikely to happen, but who knows?
14376 ac_cv_c_bigendian=unknown
14377 fi
14378fi
7eb368b3
NR
14379else
14380 echo "$as_me: failed program was:" >&5
14381sed 's/^/| /' conftest.$ac_ext >&5
14382
7eb368b3 14383fi
a9322a30 14384rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
14385else
14386 cat >conftest.$ac_ext <<_ACEOF
14387/* confdefs.h. */
14388_ACEOF
14389cat confdefs.h >>conftest.$ac_ext
14390cat >>conftest.$ac_ext <<_ACEOF
14391/* end confdefs.h. */
d3ea6809
MM
14392int
14393main ()
14394{
a9322a30
TT
14395 /* Are we little or big endian? From Harbison&Steele. */
14396 union
14397 {
14398 long l;
14399 char c[sizeof (long)];
14400 } u;
14401 u.l = 1;
14402 exit (u.c[sizeof (long) - 1] == 1);
d3ea6809
MM
14403}
14404_ACEOF
a9322a30 14405rm -f conftest$ac_exeext
d3ea6809 14406if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30 14407 (eval $ac_link) 2>&5
d3ea6809
MM
14408 ac_status=$?
14409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30 14410 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3ea6809
MM
14411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14412 (eval $ac_try) 2>&5
14413 ac_status=$?
14414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14415 (exit $ac_status); }; }; then
a9322a30 14416 ac_cv_c_bigendian=no
d3ea6809 14417else
a9322a30
TT
14418 echo "$as_me: program exited with status $ac_status" >&5
14419echo "$as_me: failed program was:" >&5
d3ea6809
MM
14420sed 's/^/| /' conftest.$ac_ext >&5
14421
a9322a30
TT
14422( exit $ac_status )
14423ac_cv_c_bigendian=yes
d3ea6809 14424fi
a9322a30 14425rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d3ea6809 14426fi
d3ea6809 14427fi
a9322a30
TT
14428rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14429fi
14430echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
14431echo "${ECHO_T}$ac_cv_c_bigendian" >&6
14432case $ac_cv_c_bigendian in
14433 yes)
14434
14435cat >>confdefs.h <<\_ACEOF
14436#define WORDS_BIGENDIAN 1
14437_ACEOF
14438 ;;
14439 no)
14440 ;;
14441 *)
14442 { { echo "$as_me:$LINENO: error: unknown endianness
14443presetting ac_cv_c_bigendian=no (or yes) will help" >&5
14444echo "$as_me: error: unknown endianness
14445presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
14446 { (exit 1); exit 1; }; } ;;
14447esac
d3ea6809
MM
14448
14449
a9322a30
TT
14450# ------------------------------ #
14451# Checks for library functions. #
14452# ------------------------------ #
d3ea6809 14453
a9322a30
TT
14454# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14455# for constant arguments. Useless!
14456echo "$as_me:$LINENO: checking for working alloca.h" >&5
14457echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
14458if test "${ac_cv_working_alloca_h+set}" = set; then
d3ea6809
MM
14459 echo $ECHO_N "(cached) $ECHO_C" >&6
14460else
14461 cat >conftest.$ac_ext <<_ACEOF
14462/* confdefs.h. */
14463_ACEOF
14464cat confdefs.h >>conftest.$ac_ext
14465cat >>conftest.$ac_ext <<_ACEOF
14466/* end confdefs.h. */
a9322a30 14467#include <alloca.h>
bec39cab
AC
14468int
14469main ()
14470{
a9322a30 14471char *p = (char *) alloca (2 * sizeof (int));
bec39cab
AC
14472 ;
14473 return 0;
14474}
14475_ACEOF
14476rm -f conftest.$ac_objext conftest$ac_exeext
14477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14478 (eval $ac_link) 2>conftest.er1
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); }; } &&
14492 { ac_try='test -s conftest$ac_exeext'
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 14498 ac_cv_working_alloca_h=yes
bec39cab
AC
14499else
14500 echo "$as_me: failed program was:" >&5
14501sed 's/^/| /' conftest.$ac_ext >&5
14502
a9322a30 14503ac_cv_working_alloca_h=no
bec39cab
AC
14504fi
14505rm -f conftest.err conftest.$ac_objext \
14506 conftest$ac_exeext conftest.$ac_ext
14507fi
a9322a30
TT
14508echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14509echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
14510if test $ac_cv_working_alloca_h = yes; then
14511
14512cat >>confdefs.h <<\_ACEOF
14513#define HAVE_ALLOCA_H 1
bec39cab 14514_ACEOF
c906108c 14515
c906108c 14516fi
bec39cab 14517
a9322a30
TT
14518echo "$as_me:$LINENO: checking for alloca" >&5
14519echo $ECHO_N "checking for alloca... $ECHO_C" >&6
14520if test "${ac_cv_func_alloca_works+set}" = set; then
bec39cab
AC
14521 echo $ECHO_N "(cached) $ECHO_C" >&6
14522else
14523 cat >conftest.$ac_ext <<_ACEOF
14524/* confdefs.h. */
14525_ACEOF
14526cat confdefs.h >>conftest.$ac_ext
14527cat >>conftest.$ac_ext <<_ACEOF
14528/* end confdefs.h. */
a9322a30
TT
14529#ifdef __GNUC__
14530# define alloca __builtin_alloca
b4e70030 14531#else
a9322a30
TT
14532# ifdef _MSC_VER
14533# include <malloc.h>
14534# define alloca _alloca
14535# else
14536# if HAVE_ALLOCA_H
14537# include <alloca.h>
14538# else
14539# ifdef _AIX
14540 #pragma alloca
14541# else
14542# ifndef alloca /* predefined by HP cc +Olibcalls */
14543char *alloca ();
14544# endif
14545# endif
14546# endif
14547# endif
c906108c 14548#endif
97bf5e38 14549
bec39cab
AC
14550int
14551main ()
14552{
a9322a30 14553char *p = (char *) alloca (1);
bec39cab
AC
14554 ;
14555 return 0;
14556}
14557_ACEOF
14558rm -f conftest.$ac_objext conftest$ac_exeext
14559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14560 (eval $ac_link) 2>conftest.er1
14561 ac_status=$?
14562 grep -v '^ *+' conftest.er1 >conftest.err
14563 rm -f conftest.er1
14564 cat conftest.err >&5
14565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14566 (exit $ac_status); } &&
b4e70030
JB
14567 { ac_try='test -z "$ac_c_werror_flag"
14568 || test ! -s conftest.err'
bec39cab
AC
14569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14570 (eval $ac_try) 2>&5
14571 ac_status=$?
14572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14573 (exit $ac_status); }; } &&
14574 { ac_try='test -s conftest$ac_exeext'
14575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14576 (eval $ac_try) 2>&5
14577 ac_status=$?
14578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14579 (exit $ac_status); }; }; then
a9322a30 14580 ac_cv_func_alloca_works=yes
bec39cab
AC
14581else
14582 echo "$as_me: failed program was:" >&5
14583sed 's/^/| /' conftest.$ac_ext >&5
14584
a9322a30 14585ac_cv_func_alloca_works=no
bec39cab
AC
14586fi
14587rm -f conftest.err conftest.$ac_objext \
14588 conftest$ac_exeext conftest.$ac_ext
14589fi
a9322a30
TT
14590echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14591echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
14592
14593if test $ac_cv_func_alloca_works = yes; then
14594
14595cat >>confdefs.h <<\_ACEOF
14596#define HAVE_ALLOCA 1
bec39cab 14597_ACEOF
c906108c 14598
a9322a30
TT
14599else
14600 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14601# that cause trouble. Some versions do not even contain alloca or
14602# contain a buggy version. If you still want to use their alloca,
14603# use ar to extract alloca.o from them instead of compiling alloca.c.
14604
14605ALLOCA=alloca.$ac_objext
14606
14607cat >>confdefs.h <<\_ACEOF
14608#define C_ALLOCA 1
14609_ACEOF
c906108c 14610
bec39cab 14611
a9322a30
TT
14612echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14613echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
14614if test "${ac_cv_os_cray+set}" = set; then
14615 echo $ECHO_N "(cached) $ECHO_C" >&6
14616else
14617 cat >conftest.$ac_ext <<_ACEOF
14618/* confdefs.h. */
14619_ACEOF
14620cat confdefs.h >>conftest.$ac_ext
14621cat >>conftest.$ac_ext <<_ACEOF
14622/* end confdefs.h. */
14623#if defined(CRAY) && ! defined(CRAY2)
14624webecray
14625#else
14626wenotbecray
14627#endif
14628
14629_ACEOF
14630if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14631 $EGREP "webecray" >/dev/null 2>&1; then
14632 ac_cv_os_cray=yes
14633else
14634 ac_cv_os_cray=no
14635fi
14636rm -f conftest*
14637
14638fi
14639echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14640echo "${ECHO_T}$ac_cv_os_cray" >&6
14641if test $ac_cv_os_cray = yes; then
14642 for ac_func in _getb67 GETB67 getb67; do
14643 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14644echo "$as_me:$LINENO: checking for $ac_func" >&5
14645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14646if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
14647 echo $ECHO_N "(cached) $ECHO_C" >&6
14648else
14649 cat >conftest.$ac_ext <<_ACEOF
14650/* confdefs.h. */
14651_ACEOF
14652cat confdefs.h >>conftest.$ac_ext
14653cat >>conftest.$ac_ext <<_ACEOF
14654/* end confdefs.h. */
14655/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14656 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14657#define $ac_func innocuous_$ac_func
14658
97bf5e38 14659/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
14660 which can conflict with char $ac_func (); below.
14661 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14662 <limits.h> exists even on freestanding compilers. */
14663
14664#ifdef __STDC__
14665# include <limits.h>
14666#else
14667# include <assert.h>
14668#endif
c906108c 14669
bec39cab 14670#undef $ac_func
97bf5e38 14671
b4e70030 14672/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
14673#ifdef __cplusplus
14674extern "C"
b4e70030 14675{
bec39cab 14676#endif
b4e70030
JB
14677/* We use char because int might match the return type of a gcc2
14678 builtin and then its argument prototype would still apply. */
bec39cab 14679char $ac_func ();
97bf5e38
MK
14680/* The GNU C library defines this for functions which it implements
14681 to always fail with ENOSYS. Some functions are actually named
14682 something starting with __ and the normal name is an alias. */
b4e70030 14683#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
97bf5e38 14684choke me
b4e70030
JB
14685#else
14686char (*f) () = $ac_func;
14687#endif
14688#ifdef __cplusplus
14689}
c906108c 14690#endif
97bf5e38 14691
bec39cab
AC
14692int
14693main ()
14694{
b4e70030 14695return f != $ac_func;
bec39cab
AC
14696 ;
14697 return 0;
14698}
14699_ACEOF
14700rm -f conftest.$ac_objext conftest$ac_exeext
14701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14702 (eval $ac_link) 2>conftest.er1
14703 ac_status=$?
14704 grep -v '^ *+' conftest.er1 >conftest.err
14705 rm -f conftest.er1
14706 cat conftest.err >&5
14707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14708 (exit $ac_status); } &&
b4e70030
JB
14709 { ac_try='test -z "$ac_c_werror_flag"
14710 || test ! -s conftest.err'
bec39cab
AC
14711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14712 (eval $ac_try) 2>&5
14713 ac_status=$?
14714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14715 (exit $ac_status); }; } &&
14716 { ac_try='test -s conftest$ac_exeext'
14717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14718 (eval $ac_try) 2>&5
14719 ac_status=$?
14720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14721 (exit $ac_status); }; }; then
14722 eval "$as_ac_var=yes"
14723else
14724 echo "$as_me: failed program was:" >&5
14725sed 's/^/| /' conftest.$ac_ext >&5
14726
b4e70030 14727eval "$as_ac_var=no"
bec39cab
AC
14728fi
14729rm -f conftest.err conftest.$ac_objext \
14730 conftest$ac_exeext conftest.$ac_ext
14731fi
b4e70030
JB
14732echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14733echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab 14734if test `eval echo '${'$as_ac_var'}'` = yes; then
a9322a30
TT
14735
14736cat >>confdefs.h <<_ACEOF
14737#define CRAY_STACKSEG_END $ac_func
bec39cab 14738_ACEOF
c906108c 14739
a9322a30 14740 break
c906108c
SS
14741fi
14742
a9322a30
TT
14743 done
14744fi
bec39cab 14745
a9322a30
TT
14746echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14747echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
14748if test "${ac_cv_c_stack_direction+set}" = set; then
bec39cab 14749 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
14750else
14751 if test "$cross_compiling" = yes; then
14752 ac_cv_c_stack_direction=0
bec39cab
AC
14753else
14754 cat >conftest.$ac_ext <<_ACEOF
14755/* confdefs.h. */
14756_ACEOF
14757cat confdefs.h >>conftest.$ac_ext
14758cat >>conftest.$ac_ext <<_ACEOF
14759/* end confdefs.h. */
a9322a30
TT
14760int
14761find_stack_direction ()
b4e70030 14762{
a9322a30
TT
14763 static char *addr = 0;
14764 auto char dummy;
14765 if (addr == 0)
14766 {
14767 addr = &dummy;
14768 return find_stack_direction ();
14769 }
14770 else
14771 return (&dummy > addr) ? 1 : -1;
b4e70030 14772}
b757528f 14773
bec39cab
AC
14774int
14775main ()
14776{
a9322a30 14777 exit (find_stack_direction () < 0);
bec39cab
AC
14778}
14779_ACEOF
a9322a30 14780rm -f conftest$ac_exeext
bec39cab 14781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30
TT
14782 (eval $ac_link) 2>&5
14783 ac_status=$?
14784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14785 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14787 (eval $ac_try) 2>&5
14788 ac_status=$?
14789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14790 (exit $ac_status); }; }; then
14791 ac_cv_c_stack_direction=1
14792else
14793 echo "$as_me: program exited with status $ac_status" >&5
14794echo "$as_me: failed program was:" >&5
14795sed 's/^/| /' conftest.$ac_ext >&5
14796
14797( exit $ac_status )
14798ac_cv_c_stack_direction=-1
14799fi
14800rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14801fi
14802fi
14803echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14804echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
14805
14806cat >>confdefs.h <<_ACEOF
14807#define STACK_DIRECTION $ac_cv_c_stack_direction
14808_ACEOF
14809
14810
14811fi
14812
14813
14814
14815for ac_header in stdlib.h unistd.h
14816do
14817as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14818if eval "test \"\${$as_ac_Header+set}\" = set"; then
14819 echo "$as_me:$LINENO: checking for $ac_header" >&5
14820echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14821if eval "test \"\${$as_ac_Header+set}\" = set"; then
14822 echo $ECHO_N "(cached) $ECHO_C" >&6
14823fi
14824echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14825echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14826else
14827 # Is the header compilable?
14828echo "$as_me:$LINENO: checking $ac_header usability" >&5
14829echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14830cat >conftest.$ac_ext <<_ACEOF
14831/* confdefs.h. */
14832_ACEOF
14833cat confdefs.h >>conftest.$ac_ext
14834cat >>conftest.$ac_ext <<_ACEOF
14835/* end confdefs.h. */
14836$ac_includes_default
14837#include <$ac_header>
14838_ACEOF
14839rm -f conftest.$ac_objext
14840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14841 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14842 ac_status=$?
14843 grep -v '^ *+' conftest.er1 >conftest.err
14844 rm -f conftest.er1
14845 cat conftest.err >&5
14846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14847 (exit $ac_status); } &&
b4e70030
JB
14848 { ac_try='test -z "$ac_c_werror_flag"
14849 || test ! -s conftest.err'
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); }; } &&
a9322a30 14855 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
14856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14857 (eval $ac_try) 2>&5
14858 ac_status=$?
14859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14860 (exit $ac_status); }; }; then
a9322a30
TT
14861 ac_header_compiler=yes
14862else
14863 echo "$as_me: failed program was:" >&5
14864sed 's/^/| /' conftest.$ac_ext >&5
14865
14866ac_header_compiler=no
14867fi
14868rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14869echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14870echo "${ECHO_T}$ac_header_compiler" >&6
14871
14872# Is the header present?
14873echo "$as_me:$LINENO: checking $ac_header presence" >&5
14874echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14875cat >conftest.$ac_ext <<_ACEOF
14876/* confdefs.h. */
14877_ACEOF
14878cat confdefs.h >>conftest.$ac_ext
14879cat >>conftest.$ac_ext <<_ACEOF
14880/* end confdefs.h. */
14881#include <$ac_header>
14882_ACEOF
14883if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14884 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14885 ac_status=$?
14886 grep -v '^ *+' conftest.er1 >conftest.err
14887 rm -f conftest.er1
14888 cat conftest.err >&5
14889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14890 (exit $ac_status); } >/dev/null; then
14891 if test -s conftest.err; then
14892 ac_cpp_err=$ac_c_preproc_warn_flag
14893 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14894 else
14895 ac_cpp_err=
14896 fi
14897else
14898 ac_cpp_err=yes
14899fi
14900if test -z "$ac_cpp_err"; then
14901 ac_header_preproc=yes
bec39cab
AC
14902else
14903 echo "$as_me: failed program was:" >&5
14904sed 's/^/| /' conftest.$ac_ext >&5
14905
a9322a30
TT
14906 ac_header_preproc=no
14907fi
14908rm -f conftest.err conftest.$ac_ext
14909echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14910echo "${ECHO_T}$ac_header_preproc" >&6
14911
14912# So? What about this header?
14913case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14914 yes:no: )
14915 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14916echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14917 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14918echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14919 ac_header_preproc=yes
14920 ;;
14921 no:yes:* )
14922 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14923echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14924 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14925echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14926 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14927echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14928 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14929echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
14930 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14931echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14932 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14933echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14934 (
14935 cat <<\_ASBOX
14936## ------------------------------------------ ##
14937## Report this to the AC_PACKAGE_NAME lists. ##
14938## ------------------------------------------ ##
14939_ASBOX
14940 ) |
14941 sed "s/^/$as_me: WARNING: /" >&2
14942 ;;
14943esac
14944echo "$as_me:$LINENO: checking for $ac_header" >&5
14945echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14946if eval "test \"\${$as_ac_Header+set}\" = set"; then
14947 echo $ECHO_N "(cached) $ECHO_C" >&6
14948else
14949 eval "$as_ac_Header=\$ac_header_preproc"
bec39cab 14950fi
a9322a30
TT
14951echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14952echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14953
bec39cab 14954fi
a9322a30 14955if test `eval echo '${'$as_ac_Header'}'` = yes; then
bec39cab 14956 cat >>confdefs.h <<_ACEOF
a9322a30 14957#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 14958_ACEOF
b757528f 14959
b757528f 14960fi
bec39cab 14961
a9322a30 14962done
a3828db0 14963
83116857 14964
a9322a30 14965for ac_func in getpagesize
bcb3dc3d 14966do
bec39cab 14967as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14968echo "$as_me:$LINENO: checking for $ac_func" >&5
14969echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14970if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
14971 echo $ECHO_N "(cached) $ECHO_C" >&6
14972else
14973 cat >conftest.$ac_ext <<_ACEOF
14974/* confdefs.h. */
14975_ACEOF
14976cat confdefs.h >>conftest.$ac_ext
14977cat >>conftest.$ac_ext <<_ACEOF
14978/* end confdefs.h. */
14979/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14980 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14981#define $ac_func innocuous_$ac_func
14982
bcb3dc3d 14983/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
14984 which can conflict with char $ac_func (); below.
14985 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14986 <limits.h> exists even on freestanding compilers. */
14987
14988#ifdef __STDC__
14989# include <limits.h>
14990#else
14991# include <assert.h>
14992#endif
bcb3dc3d 14993
bec39cab 14994#undef $ac_func
bcb3dc3d 14995
b4e70030 14996/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
14997#ifdef __cplusplus
14998extern "C"
b4e70030 14999{
bec39cab 15000#endif
b4e70030
JB
15001/* We use char because int might match the return type of a gcc2
15002 builtin and then its argument prototype would still apply. */
bec39cab 15003char $ac_func ();
bcb3dc3d
MK
15004/* The GNU C library defines this for functions which it implements
15005 to always fail with ENOSYS. Some functions are actually named
15006 something starting with __ and the normal name is an alias. */
b4e70030 15007#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
bcb3dc3d 15008choke me
b4e70030
JB
15009#else
15010char (*f) () = $ac_func;
15011#endif
15012#ifdef __cplusplus
15013}
bcb3dc3d
MK
15014#endif
15015
bec39cab
AC
15016int
15017main ()
15018{
b4e70030 15019return f != $ac_func;
bec39cab
AC
15020 ;
15021 return 0;
15022}
15023_ACEOF
15024rm -f conftest.$ac_objext conftest$ac_exeext
15025if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15026 (eval $ac_link) 2>conftest.er1
15027 ac_status=$?
15028 grep -v '^ *+' conftest.er1 >conftest.err
15029 rm -f conftest.er1
15030 cat conftest.err >&5
15031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15032 (exit $ac_status); } &&
b4e70030
JB
15033 { ac_try='test -z "$ac_c_werror_flag"
15034 || test ! -s conftest.err'
bec39cab
AC
15035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15036 (eval $ac_try) 2>&5
15037 ac_status=$?
15038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15039 (exit $ac_status); }; } &&
15040 { ac_try='test -s conftest$ac_exeext'
15041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15042 (eval $ac_try) 2>&5
15043 ac_status=$?
15044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15045 (exit $ac_status); }; }; then
15046 eval "$as_ac_var=yes"
15047else
15048 echo "$as_me: failed program was:" >&5
15049sed 's/^/| /' conftest.$ac_ext >&5
15050
b4e70030 15051eval "$as_ac_var=no"
bec39cab
AC
15052fi
15053rm -f conftest.err conftest.$ac_objext \
15054 conftest$ac_exeext conftest.$ac_ext
15055fi
b4e70030
JB
15056echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15057echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
15058if test `eval echo '${'$as_ac_var'}'` = yes; then
15059 cat >>confdefs.h <<_ACEOF
15060#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15061_ACEOF
bcb3dc3d 15062
bcb3dc3d
MK
15063fi
15064done
15065
a9322a30
TT
15066echo "$as_me:$LINENO: checking for working mmap" >&5
15067echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
15068if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
bec39cab 15069 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
15070else
15071 if test "$cross_compiling" = yes; then
15072 ac_cv_func_mmap_fixed_mapped=no
bec39cab
AC
15073else
15074 cat >conftest.$ac_ext <<_ACEOF
15075/* confdefs.h. */
15076_ACEOF
15077cat confdefs.h >>conftest.$ac_ext
15078cat >>conftest.$ac_ext <<_ACEOF
15079/* end confdefs.h. */
a9322a30
TT
15080$ac_includes_default
15081/* malloc might have been renamed as rpl_malloc. */
15082#undef malloc
bec39cab 15083
a9322a30
TT
15084/* Thanks to Mike Haertel and Jim Avera for this test.
15085 Here is a matrix of mmap possibilities:
15086 mmap private not fixed
15087 mmap private fixed at somewhere currently unmapped
15088 mmap private fixed at somewhere already mapped
15089 mmap shared not fixed
15090 mmap shared fixed at somewhere currently unmapped
15091 mmap shared fixed at somewhere already mapped
15092 For private mappings, we should verify that changes cannot be read()
15093 back from the file, nor mmap's back from the file at a different
15094 address. (There have been systems where private was not correctly
15095 implemented like the infamous i386 svr4.0, and systems where the
15096 VM page cache was not coherent with the file system buffer cache
15097 like early versions of FreeBSD and possibly contemporary NetBSD.)
15098 For shared mappings, we should conversely verify that changes get
15099 propagated back to all the places they're supposed to be.
bec39cab 15100
a9322a30
TT
15101 Grep wants private fixed already mapped.
15102 The main things grep needs to know about mmap are:
15103 * does it exist and is it safe to write into the mmap'd area
15104 * how to use it (BSD variants) */
8b9cf735 15105
a9322a30
TT
15106#include <fcntl.h>
15107#include <sys/mman.h>
8b9cf735 15108
a9322a30
TT
15109#if !STDC_HEADERS && !HAVE_STDLIB_H
15110char *malloc ();
a3828db0
MK
15111#endif
15112
a9322a30
TT
15113/* This mess was copied from the GNU getpagesize.h. */
15114#if !HAVE_GETPAGESIZE
15115/* Assume that all systems that can run configure have sys/param.h. */
15116# if !HAVE_SYS_PARAM_H
15117# define HAVE_SYS_PARAM_H 1
15118# endif
15119
15120# ifdef _SC_PAGESIZE
15121# define getpagesize() sysconf(_SC_PAGESIZE)
15122# else /* no _SC_PAGESIZE */
15123# if HAVE_SYS_PARAM_H
15124# include <sys/param.h>
15125# ifdef EXEC_PAGESIZE
15126# define getpagesize() EXEC_PAGESIZE
15127# else /* no EXEC_PAGESIZE */
15128# ifdef NBPG
15129# define getpagesize() NBPG * CLSIZE
15130# ifndef CLSIZE
15131# define CLSIZE 1
15132# endif /* no CLSIZE */
15133# else /* no NBPG */
15134# ifdef NBPC
15135# define getpagesize() NBPC
15136# else /* no NBPC */
15137# ifdef PAGESIZE
15138# define getpagesize() PAGESIZE
15139# endif /* PAGESIZE */
15140# endif /* no NBPC */
15141# endif /* no NBPG */
15142# endif /* no EXEC_PAGESIZE */
15143# else /* no HAVE_SYS_PARAM_H */
15144# define getpagesize() 8192 /* punt totally */
15145# endif /* no HAVE_SYS_PARAM_H */
15146# endif /* no _SC_PAGESIZE */
15147
15148#endif /* no HAVE_GETPAGESIZE */
15149
bec39cab
AC
15150int
15151main ()
15152{
a9322a30
TT
15153 char *data, *data2, *data3;
15154 int i, pagesize;
15155 int fd;
15156
15157 pagesize = getpagesize ();
15158
15159 /* First, make a file with some known garbage in it. */
15160 data = (char *) malloc (pagesize);
15161 if (!data)
15162 exit (1);
15163 for (i = 0; i < pagesize; ++i)
15164 *(data + i) = rand ();
15165 umask (0);
15166 fd = creat ("conftest.mmap", 0600);
15167 if (fd < 0)
15168 exit (1);
15169 if (write (fd, data, pagesize) != pagesize)
15170 exit (1);
15171 close (fd);
15172
15173 /* Next, try to mmap the file at a fixed address which already has
15174 something else allocated at it. If we can, also make sure that
15175 we see the same garbage. */
15176 fd = open ("conftest.mmap", O_RDWR);
15177 if (fd < 0)
15178 exit (1);
15179 data2 = (char *) malloc (2 * pagesize);
15180 if (!data2)
15181 exit (1);
15182 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
15183 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
15184 MAP_PRIVATE | MAP_FIXED, fd, 0L))
15185 exit (1);
15186 for (i = 0; i < pagesize; ++i)
15187 if (*(data + i) != *(data2 + i))
15188 exit (1);
15189
15190 /* Finally, make sure that changes to the mapped area do not
15191 percolate back to the file as seen by read(). (This is a bug on
15192 some variants of i386 svr4.0.) */
15193 for (i = 0; i < pagesize; ++i)
15194 *(data2 + i) = *(data2 + i) + 1;
15195 data3 = (char *) malloc (pagesize);
15196 if (!data3)
15197 exit (1);
15198 if (read (fd, data3, pagesize) != pagesize)
15199 exit (1);
15200 for (i = 0; i < pagesize; ++i)
15201 if (*(data + i) != *(data3 + i))
15202 exit (1);
15203 close (fd);
15204 exit (0);
bec39cab
AC
15205}
15206_ACEOF
a9322a30 15207rm -f conftest$ac_exeext
a3828db0 15208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30 15209 (eval $ac_link) 2>&5
bec39cab
AC
15210 ac_status=$?
15211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30 15212 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
15213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15214 (eval $ac_try) 2>&5
15215 ac_status=$?
15216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15217 (exit $ac_status); }; }; then
a9322a30 15218 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 15219else
a9322a30
TT
15220 echo "$as_me: program exited with status $ac_status" >&5
15221echo "$as_me: failed program was:" >&5
bec39cab
AC
15222sed 's/^/| /' conftest.$ac_ext >&5
15223
a9322a30
TT
15224( exit $ac_status )
15225ac_cv_func_mmap_fixed_mapped=no
a3828db0 15226fi
a9322a30 15227rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a3828db0 15228fi
a9322a30
TT
15229fi
15230echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
15231echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
15232if test $ac_cv_func_mmap_fixed_mapped = yes; then
15233
15234cat >>confdefs.h <<\_ACEOF
15235#define HAVE_MMAP 1
a3828db0
MK
15236_ACEOF
15237
086ec9eb 15238fi
a9322a30 15239rm -f conftest.mmap
a3828db0 15240
a9322a30
TT
15241echo "$as_me:$LINENO: checking for pid_t" >&5
15242echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15243if test "${ac_cv_type_pid_t+set}" = set; then
a3828db0
MK
15244 echo $ECHO_N "(cached) $ECHO_C" >&6
15245else
15246 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15247/* confdefs.h. */
15248_ACEOF
15249cat confdefs.h >>conftest.$ac_ext
15250cat >>conftest.$ac_ext <<_ACEOF
15251/* end confdefs.h. */
a9322a30 15252$ac_includes_default
bec39cab
AC
15253int
15254main ()
15255{
a9322a30
TT
15256if ((pid_t *) 0)
15257 return 0;
15258if (sizeof (pid_t))
15259 return 0;
bec39cab
AC
15260 ;
15261 return 0;
15262}
15263_ACEOF
a9322a30
TT
15264rm -f conftest.$ac_objext
15265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15266 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
15267 ac_status=$?
15268 grep -v '^ *+' conftest.er1 >conftest.err
15269 rm -f conftest.er1
15270 cat conftest.err >&5
15271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15272 (exit $ac_status); } &&
b4e70030
JB
15273 { ac_try='test -z "$ac_c_werror_flag"
15274 || test ! -s conftest.err'
bec39cab
AC
15275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15276 (eval $ac_try) 2>&5
15277 ac_status=$?
15278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15279 (exit $ac_status); }; } &&
a9322a30 15280 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
15281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15282 (eval $ac_try) 2>&5
15283 ac_status=$?
15284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15285 (exit $ac_status); }; }; then
a9322a30 15286 ac_cv_type_pid_t=yes
086ec9eb 15287else
bec39cab
AC
15288 echo "$as_me: failed program was:" >&5
15289sed 's/^/| /' conftest.$ac_ext >&5
15290
a9322a30 15291ac_cv_type_pid_t=no
086ec9eb 15292fi
a9322a30 15293rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
086ec9eb 15294fi
a9322a30
TT
15295echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
15296echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15297if test $ac_cv_type_pid_t = yes; then
15298 :
15299else
15300
15301cat >>confdefs.h <<_ACEOF
15302#define pid_t int
bec39cab 15303_ACEOF
086ec9eb
MK
15304
15305fi
15306
a3828db0 15307
a9322a30
TT
15308
15309for ac_header in unistd.h vfork.h
a3828db0 15310do
a9322a30
TT
15311as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15312if eval "test \"\${$as_ac_Header+set}\" = set"; then
15313 echo "$as_me:$LINENO: checking for $ac_header" >&5
15314echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15315if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 15316 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
15317fi
15318echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15319echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 15320else
a9322a30
TT
15321 # Is the header compilable?
15322echo "$as_me:$LINENO: checking $ac_header usability" >&5
15323echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15324cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15325/* confdefs.h. */
15326_ACEOF
15327cat confdefs.h >>conftest.$ac_ext
15328cat >>conftest.$ac_ext <<_ACEOF
15329/* end confdefs.h. */
a9322a30
TT
15330$ac_includes_default
15331#include <$ac_header>
bec39cab 15332_ACEOF
a9322a30
TT
15333rm -f conftest.$ac_objext
15334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15335 (eval $ac_compile) 2>conftest.er1
bec39cab 15336 ac_status=$?
a3828db0
MK
15337 grep -v '^ *+' conftest.er1 >conftest.err
15338 rm -f conftest.er1
15339 cat conftest.err >&5
bec39cab 15340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 15341 (exit $ac_status); } &&
b4e70030
JB
15342 { ac_try='test -z "$ac_c_werror_flag"
15343 || test ! -s conftest.err'
a3828db0
MK
15344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15345 (eval $ac_try) 2>&5
15346 ac_status=$?
15347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15348 (exit $ac_status); }; } &&
a9322a30 15349 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
15350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15351 (eval $ac_try) 2>&5
15352 ac_status=$?
15353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15354 (exit $ac_status); }; }; then
a9322a30 15355 ac_header_compiler=yes
c906108c 15356else
a3828db0 15357 echo "$as_me: failed program was:" >&5
bec39cab
AC
15358sed 's/^/| /' conftest.$ac_ext >&5
15359
a9322a30 15360ac_header_compiler=no
97bf5e38 15361fi
a9322a30
TT
15362rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15363echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15364echo "${ECHO_T}$ac_header_compiler" >&6
15365
15366# Is the header present?
15367echo "$as_me:$LINENO: checking $ac_header presence" >&5
15368echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15369cat >conftest.$ac_ext <<_ACEOF
15370/* confdefs.h. */
15371_ACEOF
15372cat confdefs.h >>conftest.$ac_ext
15373cat >>conftest.$ac_ext <<_ACEOF
15374/* end confdefs.h. */
15375#include <$ac_header>
15376_ACEOF
15377if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15378 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15379 ac_status=$?
15380 grep -v '^ *+' conftest.er1 >conftest.err
15381 rm -f conftest.er1
15382 cat conftest.err >&5
15383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15384 (exit $ac_status); } >/dev/null; then
15385 if test -s conftest.err; then
15386 ac_cpp_err=$ac_c_preproc_warn_flag
15387 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15388 else
15389 ac_cpp_err=
15390 fi
15391else
15392 ac_cpp_err=yes
a3828db0 15393fi
a9322a30
TT
15394if test -z "$ac_cpp_err"; then
15395 ac_header_preproc=yes
15396else
15397 echo "$as_me: failed program was:" >&5
15398sed 's/^/| /' conftest.$ac_ext >&5
15399
15400 ac_header_preproc=no
15401fi
15402rm -f conftest.err conftest.$ac_ext
15403echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15404echo "${ECHO_T}$ac_header_preproc" >&6
15405
15406# So? What about this header?
15407case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15408 yes:no: )
15409 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15410echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15411 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15412echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15413 ac_header_preproc=yes
15414 ;;
15415 no:yes:* )
15416 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15417echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15418 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15419echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15420 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15421echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15422 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15423echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
15424 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15425echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15426 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15427echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15428 (
15429 cat <<\_ASBOX
15430## ------------------------------------------ ##
15431## Report this to the AC_PACKAGE_NAME lists. ##
15432## ------------------------------------------ ##
15433_ASBOX
15434 ) |
15435 sed "s/^/$as_me: WARNING: /" >&2
15436 ;;
15437esac
15438echo "$as_me:$LINENO: checking for $ac_header" >&5
15439echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15440if eval "test \"\${$as_ac_Header+set}\" = set"; then
15441 echo $ECHO_N "(cached) $ECHO_C" >&6
15442else
15443 eval "$as_ac_Header=\$ac_header_preproc"
15444fi
15445echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15446echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15447
15448fi
15449if test `eval echo '${'$as_ac_Header'}'` = yes; then
a3828db0 15450 cat >>confdefs.h <<_ACEOF
a9322a30 15451#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 15452_ACEOF
c906108c
SS
15453
15454fi
a9322a30 15455
a3828db0 15456done
c906108c 15457
a3828db0 15458
a9322a30
TT
15459
15460for ac_func in fork vfork
a3828db0
MK
15461do
15462as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15463echo "$as_me:$LINENO: checking for $ac_func" >&5
15464echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15465if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 15466 echo $ECHO_N "(cached) $ECHO_C" >&6
b83266a0 15467else
bec39cab
AC
15468 cat >conftest.$ac_ext <<_ACEOF
15469/* confdefs.h. */
15470_ACEOF
15471cat confdefs.h >>conftest.$ac_ext
15472cat >>conftest.$ac_ext <<_ACEOF
15473/* end confdefs.h. */
a3828db0
MK
15474/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15475 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15476#define $ac_func innocuous_$ac_func
b83266a0 15477
a3828db0
MK
15478/* System header to define __stub macros and hopefully few prototypes,
15479 which can conflict with char $ac_func (); below.
15480 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15481 <limits.h> exists even on freestanding compilers. */
15482
15483#ifdef __STDC__
15484# include <limits.h>
15485#else
15486# include <assert.h>
15487#endif
15488
15489#undef $ac_func
15490
b4e70030 15491/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
15492#ifdef __cplusplus
15493extern "C"
b4e70030 15494{
a3828db0 15495#endif
b4e70030
JB
15496/* We use char because int might match the return type of a gcc2
15497 builtin and then its argument prototype would still apply. */
a3828db0
MK
15498char $ac_func ();
15499/* The GNU C library defines this for functions which it implements
15500 to always fail with ENOSYS. Some functions are actually named
15501 something starting with __ and the normal name is an alias. */
b4e70030 15502#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 15503choke me
b4e70030
JB
15504#else
15505char (*f) () = $ac_func;
15506#endif
15507#ifdef __cplusplus
15508}
a3828db0 15509#endif
97bf5e38 15510
bec39cab
AC
15511int
15512main ()
15513{
b4e70030 15514return f != $ac_func;
bec39cab
AC
15515 ;
15516 return 0;
15517}
15518_ACEOF
a3828db0
MK
15519rm -f conftest.$ac_objext conftest$ac_exeext
15520if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15521 (eval $ac_link) 2>conftest.er1
bec39cab
AC
15522 ac_status=$?
15523 grep -v '^ *+' conftest.er1 >conftest.err
15524 rm -f conftest.er1
15525 cat conftest.err >&5
15526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15527 (exit $ac_status); } &&
b4e70030
JB
15528 { ac_try='test -z "$ac_c_werror_flag"
15529 || test ! -s conftest.err'
bec39cab
AC
15530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15531 (eval $ac_try) 2>&5
15532 ac_status=$?
15533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15534 (exit $ac_status); }; } &&
a3828db0 15535 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
15536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15537 (eval $ac_try) 2>&5
15538 ac_status=$?
15539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15540 (exit $ac_status); }; }; then
a3828db0 15541 eval "$as_ac_var=yes"
b83266a0 15542else
bec39cab
AC
15543 echo "$as_me: failed program was:" >&5
15544sed 's/^/| /' conftest.$ac_ext >&5
15545
b4e70030 15546eval "$as_ac_var=no"
b83266a0 15547fi
a3828db0
MK
15548rm -f conftest.err conftest.$ac_objext \
15549 conftest$ac_exeext conftest.$ac_ext
b83266a0 15550fi
b4e70030
JB
15551echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15552echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
15553if test `eval echo '${'$as_ac_var'}'` = yes; then
15554 cat >>confdefs.h <<_ACEOF
15555#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 15556_ACEOF
b83266a0 15557
97bf5e38 15558fi
a3828db0 15559done
b83266a0 15560
a9322a30
TT
15561if test "x$ac_cv_func_fork" = xyes; then
15562 echo "$as_me:$LINENO: checking for working fork" >&5
15563echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15564if test "${ac_cv_func_fork_works+set}" = set; then
15565 echo $ECHO_N "(cached) $ECHO_C" >&6
15566else
15567 if test "$cross_compiling" = yes; then
15568 ac_cv_func_fork_works=cross
15569else
15570 cat >conftest.$ac_ext <<_ACEOF
15571/* By Ruediger Kuhlmann. */
15572 #include <sys/types.h>
15573 #if HAVE_UNISTD_H
15574 # include <unistd.h>
15575 #endif
15576 /* Some systems only have a dummy stub for fork() */
15577 int main ()
15578 {
15579 if (fork() < 0)
15580 exit (1);
15581 exit (0);
15582 }
15583_ACEOF
15584rm -f conftest$ac_exeext
15585if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15586 (eval $ac_link) 2>&5
15587 ac_status=$?
15588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15589 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15591 (eval $ac_try) 2>&5
15592 ac_status=$?
15593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15594 (exit $ac_status); }; }; then
15595 ac_cv_func_fork_works=yes
15596else
15597 echo "$as_me: program exited with status $ac_status" >&5
15598echo "$as_me: failed program was:" >&5
15599sed 's/^/| /' conftest.$ac_ext >&5
15600
15601( exit $ac_status )
15602ac_cv_func_fork_works=no
15603fi
15604rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15605fi
15606fi
15607echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
15608echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15609
15610else
15611 ac_cv_func_fork_works=$ac_cv_func_fork
15612fi
15613if test "x$ac_cv_func_fork_works" = xcross; then
15614 case $host in
15615 *-*-amigaos* | *-*-msdosdjgpp*)
15616 # Override, as these systems have only a dummy fork() stub
15617 ac_cv_func_fork_works=no
15618 ;;
15619 *)
15620 ac_cv_func_fork_works=yes
15621 ;;
15622 esac
15623 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15624echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15625fi
15626ac_cv_func_vfork_works=$ac_cv_func_vfork
15627if test "x$ac_cv_func_vfork" = xyes; then
15628 echo "$as_me:$LINENO: checking for working vfork" >&5
15629echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15630if test "${ac_cv_func_vfork_works+set}" = set; then
15631 echo $ECHO_N "(cached) $ECHO_C" >&6
15632else
15633 if test "$cross_compiling" = yes; then
15634 ac_cv_func_vfork_works=cross
15635else
15636 cat >conftest.$ac_ext <<_ACEOF
15637/* confdefs.h. */
15638_ACEOF
15639cat confdefs.h >>conftest.$ac_ext
15640cat >>conftest.$ac_ext <<_ACEOF
15641/* end confdefs.h. */
15642/* Thanks to Paul Eggert for this test. */
15643#include <stdio.h>
15644#include <stdlib.h>
15645#include <sys/types.h>
15646#include <sys/stat.h>
15647#include <sys/wait.h>
15648#if HAVE_UNISTD_H
15649# include <unistd.h>
15650#endif
15651#if HAVE_VFORK_H
15652# include <vfork.h>
15653#endif
15654/* On some sparc systems, changes by the child to local and incoming
15655 argument registers are propagated back to the parent. The compiler
15656 is told about this with #include <vfork.h>, but some compilers
15657 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15658 static variable whose address is put into a register that is
15659 clobbered by the vfork. */
15660static void
15661#ifdef __cplusplus
15662sparc_address_test (int arg)
15663# else
15664sparc_address_test (arg) int arg;
15665#endif
15666{
15667 static pid_t child;
15668 if (!child) {
15669 child = vfork ();
15670 if (child < 0) {
15671 perror ("vfork");
15672 _exit(2);
15673 }
15674 if (!child) {
15675 arg = getpid();
15676 write(-1, "", 0);
15677 _exit (arg);
15678 }
15679 }
15680}
15681
15682int
15683main ()
15684{
15685 pid_t parent = getpid ();
15686 pid_t child;
15687
15688 sparc_address_test (0);
15689
15690 child = vfork ();
15691
15692 if (child == 0) {
15693 /* Here is another test for sparc vfork register problems. This
15694 test uses lots of local variables, at least as many local
15695 variables as main has allocated so far including compiler
15696 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15697 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15698 reuse the register of parent for one of the local variables,
15699 since it will think that parent can't possibly be used any more
15700 in this routine. Assigning to the local variable will thus
15701 munge parent in the parent process. */
15702 pid_t
15703 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15704 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15705 /* Convince the compiler that p..p7 are live; otherwise, it might
15706 use the same hardware register for all 8 local variables. */
15707 if (p != p1 || p != p2 || p != p3 || p != p4
15708 || p != p5 || p != p6 || p != p7)
15709 _exit(1);
15710
15711 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15712 from child file descriptors. If the child closes a descriptor
15713 before it execs or exits, this munges the parent's descriptor
15714 as well. Test for this by closing stdout in the child. */
15715 _exit(close(fileno(stdout)) != 0);
15716 } else {
15717 int status;
15718 struct stat st;
15719
15720 while (wait(&status) != child)
15721 ;
15722 exit(
15723 /* Was there some problem with vforking? */
15724 child < 0
15725
15726 /* Did the child fail? (This shouldn't happen.) */
15727 || status
15728
15729 /* Did the vfork/compiler bug occur? */
15730 || parent != getpid()
15731
15732 /* Did the file descriptor bug occur? */
15733 || fstat(fileno(stdout), &st) != 0
15734 );
15735 }
15736}
15737_ACEOF
15738rm -f conftest$ac_exeext
15739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15740 (eval $ac_link) 2>&5
15741 ac_status=$?
15742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15743 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15745 (eval $ac_try) 2>&5
15746 ac_status=$?
15747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15748 (exit $ac_status); }; }; then
15749 ac_cv_func_vfork_works=yes
15750else
15751 echo "$as_me: program exited with status $ac_status" >&5
15752echo "$as_me: failed program was:" >&5
15753sed 's/^/| /' conftest.$ac_ext >&5
15754
15755( exit $ac_status )
15756ac_cv_func_vfork_works=no
15757fi
15758rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15759fi
15760fi
15761echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
15762echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15763
15764fi;
15765if test "x$ac_cv_func_fork_works" = xcross; then
15766 ac_cv_func_vfork_works=$ac_cv_func_vfork
15767 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15768echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15769fi
15770
15771if test "x$ac_cv_func_vfork_works" = xyes; then
15772
15773cat >>confdefs.h <<\_ACEOF
15774#define HAVE_WORKING_VFORK 1
15775_ACEOF
15776
15777else
15778
15779cat >>confdefs.h <<\_ACEOF
15780#define vfork fork
15781_ACEOF
15782
15783fi
15784if test "x$ac_cv_func_fork_works" = xyes; then
15785
15786cat >>confdefs.h <<\_ACEOF
15787#define HAVE_WORKING_FORK 1
15788_ACEOF
15789
15790fi
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
a3828db0 15809
fc3b640d 15810
732f6a93 15811
6c7a06a3 15812
a8111142 15813
a9322a30
TT
15814for ac_func in canonicalize_file_name realpath getrusage getuid \
15815 getgid poll pread64 sbrk setpgid setpgrp setsid \
15816 sigaction sigprocmask sigsetmask socketpair syscall \
732f6a93 15817 ttrace wborder setlocale iconvlist libiconvlist btowc
a3828db0
MK
15818do
15819as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15820echo "$as_me:$LINENO: checking for $ac_func" >&5
15821echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15822if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
15823 echo $ECHO_N "(cached) $ECHO_C" >&6
15824else
15825 cat >conftest.$ac_ext <<_ACEOF
15826/* confdefs.h. */
15827_ACEOF
15828cat confdefs.h >>conftest.$ac_ext
15829cat >>conftest.$ac_ext <<_ACEOF
15830/* end confdefs.h. */
a3828db0
MK
15831/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15832 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15833#define $ac_func innocuous_$ac_func
a4db0f07 15834
a3828db0
MK
15835/* System header to define __stub macros and hopefully few prototypes,
15836 which can conflict with char $ac_func (); below.
15837 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15838 <limits.h> exists even on freestanding compilers. */
15839
15840#ifdef __STDC__
15841# include <limits.h>
15842#else
15843# include <assert.h>
15844#endif
15845
15846#undef $ac_func
15847
b4e70030 15848/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
15849#ifdef __cplusplus
15850extern "C"
b4e70030 15851{
a3828db0 15852#endif
b4e70030
JB
15853/* We use char because int might match the return type of a gcc2
15854 builtin and then its argument prototype would still apply. */
a3828db0
MK
15855char $ac_func ();
15856/* The GNU C library defines this for functions which it implements
15857 to always fail with ENOSYS. Some functions are actually named
15858 something starting with __ and the normal name is an alias. */
b4e70030 15859#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 15860choke me
b4e70030
JB
15861#else
15862char (*f) () = $ac_func;
15863#endif
15864#ifdef __cplusplus
15865}
a3828db0 15866#endif
97bf5e38 15867
bec39cab
AC
15868int
15869main ()
15870{
6c7a06a3
TT
15871return f != $ac_func;
15872 ;
15873 return 0;
15874}
15875_ACEOF
15876rm -f conftest.$ac_objext conftest$ac_exeext
15877if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15878 (eval $ac_link) 2>conftest.er1
15879 ac_status=$?
15880 grep -v '^ *+' conftest.er1 >conftest.err
15881 rm -f conftest.er1
15882 cat conftest.err >&5
15883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15884 (exit $ac_status); } &&
15885 { ac_try='test -z "$ac_c_werror_flag"
15886 || test ! -s conftest.err'
15887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15888 (eval $ac_try) 2>&5
15889 ac_status=$?
15890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15891 (exit $ac_status); }; } &&
15892 { ac_try='test -s conftest$ac_exeext'
15893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15894 (eval $ac_try) 2>&5
15895 ac_status=$?
15896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15897 (exit $ac_status); }; }; then
15898 eval "$as_ac_var=yes"
15899else
15900 echo "$as_me: failed program was:" >&5
15901sed 's/^/| /' conftest.$ac_ext >&5
15902
15903eval "$as_ac_var=no"
15904fi
15905rm -f conftest.err conftest.$ac_objext \
15906 conftest$ac_exeext conftest.$ac_ext
15907fi
15908echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15909echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15910if test `eval echo '${'$as_ac_var'}'` = yes; then
15911 cat >>confdefs.h <<_ACEOF
15912#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15913_ACEOF
15914
15915fi
15916done
15917
15918
15919 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
15920echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
15921if test "${am_cv_langinfo_codeset+set}" = set; then
15922 echo $ECHO_N "(cached) $ECHO_C" >&6
15923else
15924 cat >conftest.$ac_ext <<_ACEOF
15925/* confdefs.h. */
15926_ACEOF
15927cat confdefs.h >>conftest.$ac_ext
15928cat >>conftest.$ac_ext <<_ACEOF
15929/* end confdefs.h. */
15930#include <langinfo.h>
15931int
15932main ()
15933{
15934char* cs = nl_langinfo(CODESET);
bec39cab
AC
15935 ;
15936 return 0;
15937}
15938_ACEOF
a3828db0
MK
15939rm -f conftest.$ac_objext conftest$ac_exeext
15940if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15941 (eval $ac_link) 2>conftest.er1
bec39cab
AC
15942 ac_status=$?
15943 grep -v '^ *+' conftest.er1 >conftest.err
15944 rm -f conftest.er1
15945 cat conftest.err >&5
15946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15947 (exit $ac_status); } &&
b4e70030
JB
15948 { ac_try='test -z "$ac_c_werror_flag"
15949 || test ! -s conftest.err'
bec39cab
AC
15950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15951 (eval $ac_try) 2>&5
15952 ac_status=$?
15953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15954 (exit $ac_status); }; } &&
a3828db0 15955 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
15956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15957 (eval $ac_try) 2>&5
15958 ac_status=$?
15959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15960 (exit $ac_status); }; }; then
6c7a06a3 15961 am_cv_langinfo_codeset=yes
a4db0f07 15962else
bec39cab
AC
15963 echo "$as_me: failed program was:" >&5
15964sed 's/^/| /' conftest.$ac_ext >&5
15965
6c7a06a3 15966am_cv_langinfo_codeset=no
a4db0f07 15967fi
a3828db0
MK
15968rm -f conftest.err conftest.$ac_objext \
15969 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 15970
a4db0f07 15971fi
6c7a06a3
TT
15972echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
15973echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
15974 if test $am_cv_langinfo_codeset = yes; then
15975
15976cat >>confdefs.h <<\_ACEOF
15977#define HAVE_LANGINFO_CODESET 1
bec39cab 15978_ACEOF
a4db0f07 15979
6c7a06a3 15980 fi
c906108c 15981
06825bd1 15982
a3828db0
MK
15983# Check the return and argument types of ptrace. No canned test for
15984# this, so roll our own.
15985gdb_ptrace_headers='
15986#if HAVE_SYS_TYPES_H
15987# include <sys/types.h>
15988#endif
15989#if HAVE_SYS_PTRACE_H
15990# include <sys/ptrace.h>
15991#endif
15992#if HAVE_UNISTD_H
15993# include <unistd.h>
15994#endif
15995'
15996# There is no point in checking if we don't have a prototype.
b4e70030
JB
15997echo "$as_me:$LINENO: checking whether ptrace is declared" >&5
15998echo $ECHO_N "checking whether ptrace is declared... $ECHO_C" >&6
a3828db0 15999if test "${ac_cv_have_decl_ptrace+set}" = set; then
bec39cab
AC
16000 echo $ECHO_N "(cached) $ECHO_C" >&6
16001else
16002 cat >conftest.$ac_ext <<_ACEOF
16003/* confdefs.h. */
16004_ACEOF
16005cat confdefs.h >>conftest.$ac_ext
16006cat >>conftest.$ac_ext <<_ACEOF
16007/* end confdefs.h. */
a3828db0
MK
16008$gdb_ptrace_headers
16009
bec39cab
AC
16010int
16011main ()
16012{
a3828db0
MK
16013#ifndef ptrace
16014 char *p = (char *) ptrace;
06825bd1 16015#endif
a3828db0 16016
bec39cab
AC
16017 ;
16018 return 0;
16019}
16020_ACEOF
16021rm -f conftest.$ac_objext
16022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16023 (eval $ac_compile) 2>conftest.er1
16024 ac_status=$?
16025 grep -v '^ *+' conftest.er1 >conftest.err
16026 rm -f conftest.er1
16027 cat conftest.err >&5
16028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16029 (exit $ac_status); } &&
b4e70030
JB
16030 { ac_try='test -z "$ac_c_werror_flag"
16031 || test ! -s conftest.err'
bec39cab
AC
16032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16033 (eval $ac_try) 2>&5
16034 ac_status=$?
16035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16036 (exit $ac_status); }; } &&
16037 { ac_try='test -s conftest.$ac_objext'
16038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16039 (eval $ac_try) 2>&5
16040 ac_status=$?
16041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16042 (exit $ac_status); }; }; then
a3828db0 16043 ac_cv_have_decl_ptrace=yes
06825bd1 16044else
bec39cab
AC
16045 echo "$as_me: failed program was:" >&5
16046sed 's/^/| /' conftest.$ac_ext >&5
16047
b4e70030 16048ac_cv_have_decl_ptrace=no
06825bd1 16049fi
bec39cab 16050rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 16051fi
b4e70030
JB
16052echo "$as_me:$LINENO: result: $ac_cv_have_decl_ptrace" >&5
16053echo "${ECHO_T}$ac_cv_have_decl_ptrace" >&6
a3828db0 16054if test $ac_cv_have_decl_ptrace = yes; then
06825bd1 16055
a3828db0
MK
16056cat >>confdefs.h <<_ACEOF
16057#define HAVE_DECL_PTRACE 1
16058_ACEOF
bec39cab 16059
bec39cab 16060
a3828db0
MK
16061else
16062 cat >>confdefs.h <<_ACEOF
16063#define HAVE_DECL_PTRACE 0
bec39cab 16064_ACEOF
06825bd1 16065
a3828db0
MK
16066
16067 : ${gdb_cv_func_ptrace_ret='int'}
16068 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
16069
06825bd1
MK
16070fi
16071
a3828db0 16072
064ef605
DJ
16073# Check return type. Varargs (used on GNU/Linux) conflict with the
16074# empty argument list, so check for that explicitly.
b4e70030
JB
16075echo "$as_me:$LINENO: checking return type of ptrace" >&5
16076echo $ECHO_N "checking return type of ptrace... $ECHO_C" >&6
a3828db0 16077if test "${gdb_cv_func_ptrace_ret+set}" = set; then
bec39cab
AC
16078 echo $ECHO_N "(cached) $ECHO_C" >&6
16079else
16080 cat >conftest.$ac_ext <<_ACEOF
16081/* confdefs.h. */
16082_ACEOF
16083cat confdefs.h >>conftest.$ac_ext
16084cat >>conftest.$ac_ext <<_ACEOF
16085/* end confdefs.h. */
a3828db0 16086$gdb_ptrace_headers
bec39cab
AC
16087int
16088main ()
16089{
064ef605
DJ
16090extern long ptrace (enum __ptrace_request, ...);
16091 ;
16092 return 0;
16093}
16094_ACEOF
16095rm -f conftest.$ac_objext
16096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16097 (eval $ac_compile) 2>conftest.er1
16098 ac_status=$?
16099 grep -v '^ *+' conftest.er1 >conftest.err
16100 rm -f conftest.er1
16101 cat conftest.err >&5
16102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16103 (exit $ac_status); } &&
16104 { ac_try='test -z "$ac_c_werror_flag"
16105 || test ! -s conftest.err'
16106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16107 (eval $ac_try) 2>&5
16108 ac_status=$?
16109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16110 (exit $ac_status); }; } &&
16111 { ac_try='test -s conftest.$ac_objext'
16112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16113 (eval $ac_try) 2>&5
16114 ac_status=$?
16115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16116 (exit $ac_status); }; }; then
16117 gdb_cv_func_ptrace_ret='long'
16118else
16119 echo "$as_me: failed program was:" >&5
16120sed 's/^/| /' conftest.$ac_ext >&5
16121
16122cat >conftest.$ac_ext <<_ACEOF
16123/* confdefs.h. */
16124_ACEOF
16125cat confdefs.h >>conftest.$ac_ext
16126cat >>conftest.$ac_ext <<_ACEOF
16127/* end confdefs.h. */
16128$gdb_ptrace_headers
16129int
16130main ()
16131{
a3828db0 16132extern int ptrace ();
bec39cab
AC
16133 ;
16134 return 0;
16135}
16136_ACEOF
16137rm -f conftest.$ac_objext
16138if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16139 (eval $ac_compile) 2>conftest.er1
16140 ac_status=$?
16141 grep -v '^ *+' conftest.er1 >conftest.err
16142 rm -f conftest.er1
16143 cat conftest.err >&5
16144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16145 (exit $ac_status); } &&
b4e70030
JB
16146 { ac_try='test -z "$ac_c_werror_flag"
16147 || test ! -s conftest.err'
bec39cab
AC
16148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16149 (eval $ac_try) 2>&5
16150 ac_status=$?
16151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16152 (exit $ac_status); }; } &&
16153 { ac_try='test -s conftest.$ac_objext'
16154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16155 (eval $ac_try) 2>&5
16156 ac_status=$?
16157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16158 (exit $ac_status); }; }; then
a3828db0 16159 gdb_cv_func_ptrace_ret='int'
70f9f479 16160else
bec39cab
AC
16161 echo "$as_me: failed program was:" >&5
16162sed 's/^/| /' conftest.$ac_ext >&5
16163
b4e70030 16164gdb_cv_func_ptrace_ret='long'
70f9f479 16165fi
bec39cab 16166rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 16167fi
064ef605
DJ
16168rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16169fi
b4e70030
JB
16170echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_ret" >&5
16171echo "${ECHO_T}$gdb_cv_func_ptrace_ret" >&6
bec39cab 16172
a3828db0
MK
16173cat >>confdefs.h <<_ACEOF
16174#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 16175_ACEOF
70f9f479 16176
a3828db0 16177# Check argument types.
b4e70030
JB
16178echo "$as_me:$LINENO: checking types of arguments for ptrace" >&5
16179echo $ECHO_N "checking types of arguments for ptrace... $ECHO_C" >&6
a3828db0 16180if test "${gdb_cv_func_ptrace_args+set}" = set; then
bec39cab
AC
16181 echo $ECHO_N "(cached) $ECHO_C" >&6
16182else
a3828db0 16183
064ef605
DJ
16184 cat >conftest.$ac_ext <<_ACEOF
16185/* confdefs.h. */
16186_ACEOF
16187cat confdefs.h >>conftest.$ac_ext
16188cat >>conftest.$ac_ext <<_ACEOF
16189/* end confdefs.h. */
16190$gdb_ptrace_headers
16191int
16192main ()
16193{
16194extern long ptrace (enum __ptrace_request, ...);
16195 ;
16196 return 0;
16197}
16198_ACEOF
16199rm -f conftest.$ac_objext
16200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16201 (eval $ac_compile) 2>conftest.er1
16202 ac_status=$?
16203 grep -v '^ *+' conftest.er1 >conftest.err
16204 rm -f conftest.er1
16205 cat conftest.err >&5
16206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16207 (exit $ac_status); } &&
16208 { ac_try='test -z "$ac_c_werror_flag"
16209 || test ! -s conftest.err'
16210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16211 (eval $ac_try) 2>&5
16212 ac_status=$?
16213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16214 (exit $ac_status); }; } &&
16215 { ac_try='test -s conftest.$ac_objext'
16216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16217 (eval $ac_try) 2>&5
16218 ac_status=$?
16219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16220 (exit $ac_status); }; }; then
16221 gdb_cv_func_ptrace_args='int,int,long,long'
16222else
16223 echo "$as_me: failed program was:" >&5
16224sed 's/^/| /' conftest.$ac_ext >&5
16225
16226
a3828db0
MK
16227for gdb_arg1 in 'int' 'long'; do
16228 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 16229 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0
MK
16230 for gdb_arg4 in 'int' 'long'; do
16231 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
16232/* confdefs.h. */
16233_ACEOF
16234cat confdefs.h >>conftest.$ac_ext
16235cat >>conftest.$ac_ext <<_ACEOF
16236/* end confdefs.h. */
a3828db0 16237$gdb_ptrace_headers
bec39cab
AC
16238int
16239main ()
16240{
a3828db0
MK
16241
16242extern $gdb_cv_func_ptrace_ret
16243 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
16244
bec39cab
AC
16245 ;
16246 return 0;
16247}
16248_ACEOF
16249rm -f conftest.$ac_objext
16250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16251 (eval $ac_compile) 2>conftest.er1
16252 ac_status=$?
16253 grep -v '^ *+' conftest.er1 >conftest.err
16254 rm -f conftest.er1
16255 cat conftest.err >&5
16256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16257 (exit $ac_status); } &&
b4e70030
JB
16258 { ac_try='test -z "$ac_c_werror_flag"
16259 || test ! -s conftest.err'
bec39cab
AC
16260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16261 (eval $ac_try) 2>&5
16262 ac_status=$?
16263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16264 (exit $ac_status); }; } &&
16265 { ac_try='test -s conftest.$ac_objext'
16266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16267 (eval $ac_try) 2>&5
16268 ac_status=$?
16269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16270 (exit $ac_status); }; }; then
a3828db0
MK
16271 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
16272 break 4;
5c7f2947 16273else
bec39cab
AC
16274 echo "$as_me: failed program was:" >&5
16275sed 's/^/| /' conftest.$ac_ext >&5
16276
5c7f2947 16277fi
bec39cab 16278rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
16279 for gdb_arg5 in 'int *' 'int' 'long'; do
16280 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
16281/* confdefs.h. */
16282_ACEOF
16283cat confdefs.h >>conftest.$ac_ext
16284cat >>conftest.$ac_ext <<_ACEOF
16285/* end confdefs.h. */
a3828db0 16286$gdb_ptrace_headers
bec39cab
AC
16287int
16288main ()
16289{
a3828db0
MK
16290
16291extern $gdb_cv_func_ptrace_ret
16292 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
16293
bec39cab
AC
16294 ;
16295 return 0;
16296}
16297_ACEOF
16298rm -f conftest.$ac_objext
16299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16300 (eval $ac_compile) 2>conftest.er1
16301 ac_status=$?
16302 grep -v '^ *+' conftest.er1 >conftest.err
16303 rm -f conftest.er1
16304 cat conftest.err >&5
16305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16306 (exit $ac_status); } &&
b4e70030
JB
16307 { ac_try='test -z "$ac_c_werror_flag"
16308 || test ! -s conftest.err'
bec39cab
AC
16309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16310 (eval $ac_try) 2>&5
16311 ac_status=$?
16312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16313 (exit $ac_status); }; } &&
16314 { ac_try='test -s conftest.$ac_objext'
16315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16316 (eval $ac_try) 2>&5
16317 ac_status=$?
16318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16319 (exit $ac_status); }; }; then
a3828db0
MK
16320
16321gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
16322 break 5;
78434e59 16323else
bec39cab
AC
16324 echo "$as_me: failed program was:" >&5
16325sed 's/^/| /' conftest.$ac_ext >&5
16326
78434e59 16327fi
bec39cab 16328rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
16329 done
16330 done
16331 done
16332 done
16333done
16334# Provide a safe default value.
16335: ${gdb_cv_func_ptrace_args='int,int,long,long'}
16336
064ef605
DJ
16337fi
16338rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 16339fi
b4e70030
JB
16340echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_args" >&5
16341echo "${ECHO_T}$gdb_cv_func_ptrace_args" >&6
a3828db0
MK
16342ac_save_IFS=$IFS; IFS=','
16343set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
16344IFS=$ac_save_IFS
16345shift
bec39cab 16346
a3828db0
MK
16347cat >>confdefs.h <<_ACEOF
16348#define PTRACE_TYPE_ARG3 $3
16349_ACEOF
16350
16351if test -n "$5"; then
16352
16353cat >>confdefs.h <<_ACEOF
16354#define PTRACE_TYPE_ARG5 $5
bec39cab 16355_ACEOF
78434e59
MK
16356
16357fi
16358
a3828db0 16359if test "$cross_compiling" = no; then
b4e70030
JB
16360 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
16361echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 16362if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 16363 echo $ECHO_N "(cached) $ECHO_C" >&6
a3828db0
MK
16364else
16365 if test "$cross_compiling" = yes; then
16366 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
16367echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
16368 { (exit 1); exit 1; }; }
bec39cab
AC
16369else
16370 cat >conftest.$ac_ext <<_ACEOF
16371/* confdefs.h. */
16372_ACEOF
16373cat confdefs.h >>conftest.$ac_ext
16374cat >>conftest.$ac_ext <<_ACEOF
16375/* end confdefs.h. */
b4e70030
JB
16376#if HAVE_UNISTD_H
16377# include <unistd.h>
16378#endif
16379
bec39cab
AC
16380int
16381main ()
16382{
a3828db0
MK
16383/* If this system has a BSD-style setpgrp which takes arguments,
16384 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
16385 exit successfully. */
b4e70030 16386 exit (setpgrp (1,1) == -1 ? 0 : 1);
bec39cab
AC
16387 ;
16388 return 0;
16389}
16390_ACEOF
a3828db0
MK
16391rm -f conftest$ac_exeext
16392if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16393 (eval $ac_link) 2>&5
bec39cab
AC
16394 ac_status=$?
16395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 16396 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
16397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16398 (eval $ac_try) 2>&5
16399 ac_status=$?
16400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16401 (exit $ac_status); }; }; then
a3828db0 16402 ac_cv_func_setpgrp_void=no
c906108c 16403else
a3828db0
MK
16404 echo "$as_me: program exited with status $ac_status" >&5
16405echo "$as_me: failed program was:" >&5
bec39cab
AC
16406sed 's/^/| /' conftest.$ac_ext >&5
16407
a3828db0
MK
16408( exit $ac_status )
16409ac_cv_func_setpgrp_void=yes
c906108c 16410fi
b4e70030 16411rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 16412fi
a3828db0 16413fi
b4e70030
JB
16414echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
16415echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0
MK
16416if test $ac_cv_func_setpgrp_void = yes; then
16417
16418cat >>confdefs.h <<\_ACEOF
16419#define SETPGRP_VOID 1
bec39cab 16420_ACEOF
97bf5e38
MK
16421
16422fi
a3828db0
MK
16423
16424else
b4e70030
JB
16425 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
16426echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 16427if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 16428 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 16429else
bec39cab
AC
16430 cat >conftest.$ac_ext <<_ACEOF
16431/* confdefs.h. */
16432_ACEOF
16433cat confdefs.h >>conftest.$ac_ext
16434cat >>conftest.$ac_ext <<_ACEOF
16435/* end confdefs.h. */
a3828db0
MK
16436
16437#include <unistd.h>
16438
bec39cab
AC
16439int
16440main ()
16441{
a3828db0
MK
16442
16443 if (setpgrp(1,1) == -1)
16444 exit (0);
16445 else
16446 exit (1);
16447
bec39cab
AC
16448 ;
16449 return 0;
16450}
16451_ACEOF
16452rm -f conftest.$ac_objext
16453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16454 (eval $ac_compile) 2>conftest.er1
16455 ac_status=$?
16456 grep -v '^ *+' conftest.er1 >conftest.err
16457 rm -f conftest.er1
16458 cat conftest.err >&5
16459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16460 (exit $ac_status); } &&
b4e70030
JB
16461 { ac_try='test -z "$ac_c_werror_flag"
16462 || test ! -s conftest.err'
bec39cab
AC
16463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16464 (eval $ac_try) 2>&5
16465 ac_status=$?
16466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16467 (exit $ac_status); }; } &&
16468 { ac_try='test -s conftest.$ac_objext'
16469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16470 (eval $ac_try) 2>&5
16471 ac_status=$?
16472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16473 (exit $ac_status); }; }; then
a3828db0 16474 ac_cv_func_setpgrp_void=no
c906108c 16475else
bec39cab
AC
16476 echo "$as_me: failed program was:" >&5
16477sed 's/^/| /' conftest.$ac_ext >&5
16478
b4e70030 16479ac_cv_func_setpgrp_void=yes
c906108c 16480fi
bec39cab 16481rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16482fi
b4e70030
JB
16483echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
16484echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0 16485if test $ac_cv_func_setpgrp_void = yes; then
bec39cab 16486 cat >>confdefs.h <<\_ACEOF
a3828db0 16487#define SETPGRP_VOID 1
bec39cab 16488_ACEOF
c3f6f71d 16489
a3828db0 16490fi
c906108c
SS
16491fi
16492
a3828db0
MK
16493# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
16494# since sigsetjmp might only be defined as a macro.
b4e70030
JB
16495echo "$as_me:$LINENO: checking for sigsetjmp" >&5
16496echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
a3828db0 16497if test "${gdb_cv_func_sigsetjmp+set}" = set; then
bec39cab
AC
16498 echo $ECHO_N "(cached) $ECHO_C" >&6
16499else
16500 cat >conftest.$ac_ext <<_ACEOF
16501/* confdefs.h. */
16502_ACEOF
16503cat confdefs.h >>conftest.$ac_ext
16504cat >>conftest.$ac_ext <<_ACEOF
16505/* end confdefs.h. */
a3828db0
MK
16506
16507#include <setjmp.h>
16508
bec39cab
AC
16509int
16510main ()
16511{
a3828db0 16512sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
16513 ;
16514 return 0;
16515}
16516_ACEOF
16517rm -f conftest.$ac_objext
16518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16519 (eval $ac_compile) 2>conftest.er1
16520 ac_status=$?
16521 grep -v '^ *+' conftest.er1 >conftest.err
16522 rm -f conftest.er1
16523 cat conftest.err >&5
16524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16525 (exit $ac_status); } &&
b4e70030
JB
16526 { ac_try='test -z "$ac_c_werror_flag"
16527 || test ! -s conftest.err'
bec39cab
AC
16528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16529 (eval $ac_try) 2>&5
16530 ac_status=$?
16531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16532 (exit $ac_status); }; } &&
16533 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
a3828db0 16539 gdb_cv_func_sigsetjmp=yes
c906108c 16540else
bec39cab
AC
16541 echo "$as_me: failed program was:" >&5
16542sed 's/^/| /' conftest.$ac_ext >&5
16543
b4e70030 16544gdb_cv_func_sigsetjmp=no
c906108c 16545fi
bec39cab 16546rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16547fi
b4e70030
JB
16548echo "$as_me:$LINENO: result: $gdb_cv_func_sigsetjmp" >&5
16549echo "${ECHO_T}$gdb_cv_func_sigsetjmp" >&6
a3828db0 16550if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 16551
a3828db0
MK
16552cat >>confdefs.h <<\_ACEOF
16553#define HAVE_SIGSETJMP 1
bec39cab 16554_ACEOF
c906108c 16555
97bf5e38 16556fi
c906108c 16557
a3828db0
MK
16558# Assume we'll default to using the included libiberty regex.
16559gdb_use_included_regex=yes
16560
16561# However, if the system regex is GNU regex, then default to *not*
16562# using the included regex.
b4e70030
JB
16563echo "$as_me:$LINENO: checking for GNU regex" >&5
16564echo $ECHO_N "checking for GNU regex... $ECHO_C" >&6
a3828db0 16565if test "${gdb_cv_have_gnu_regex+set}" = set; then
bec39cab
AC
16566 echo $ECHO_N "(cached) $ECHO_C" >&6
16567else
16568 cat >conftest.$ac_ext <<_ACEOF
16569/* confdefs.h. */
16570_ACEOF
16571cat confdefs.h >>conftest.$ac_ext
16572cat >>conftest.$ac_ext <<_ACEOF
16573/* end confdefs.h. */
a3828db0 16574#include <gnu-versions.h>
bec39cab
AC
16575int
16576main ()
16577{
a3828db0
MK
16578#define REGEX_INTERFACE_VERSION 1
16579#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
16580# error "Version mismatch"
16581#endif
bec39cab
AC
16582 ;
16583 return 0;
16584}
16585_ACEOF
16586rm -f conftest.$ac_objext
16587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16588 (eval $ac_compile) 2>conftest.er1
16589 ac_status=$?
16590 grep -v '^ *+' conftest.er1 >conftest.err
16591 rm -f conftest.er1
16592 cat conftest.err >&5
16593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16594 (exit $ac_status); } &&
b4e70030
JB
16595 { ac_try='test -z "$ac_c_werror_flag"
16596 || test ! -s conftest.err'
bec39cab
AC
16597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16598 (eval $ac_try) 2>&5
16599 ac_status=$?
16600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16601 (exit $ac_status); }; } &&
16602 { ac_try='test -s conftest.$ac_objext'
16603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16604 (eval $ac_try) 2>&5
16605 ac_status=$?
16606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16607 (exit $ac_status); }; }; then
a3828db0 16608 gdb_cv_have_gnu_regex=yes
c906108c 16609else
bec39cab
AC
16610 echo "$as_me: failed program was:" >&5
16611sed 's/^/| /' conftest.$ac_ext >&5
16612
b4e70030 16613gdb_cv_have_gnu_regex=no
c906108c 16614fi
bec39cab 16615rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16616fi
b4e70030
JB
16617echo "$as_me:$LINENO: result: $gdb_cv_have_gnu_regex" >&5
16618echo "${ECHO_T}$gdb_cv_have_gnu_regex" >&6
a3828db0
MK
16619if test $gdb_cv_have_gnu_regex = yes; then
16620 gdb_use_included_regex=no
16621fi
c906108c 16622
a3828db0 16623
b4e70030 16624# Check whether --with-included-regex or --without-included-regex was given.
a3828db0 16625if test "${with_included_regex+set}" = set; then
b4e70030
JB
16626 withval="$with_included_regex"
16627 gdb_with_regex=$withval
a3828db0
MK
16628else
16629 gdb_with_regex=$gdb_use_included_regex
b4e70030 16630fi;
a3828db0
MK
16631if test "$gdb_with_regex" = yes; then
16632
16633cat >>confdefs.h <<\_ACEOF
16634#define USE_INCLUDED_REGEX 1
bec39cab 16635_ACEOF
c906108c 16636
97bf5e38 16637fi
c906108c 16638
5c45e068 16639# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
b4e70030
JB
16640echo "$as_me:$LINENO: checking for struct thread.td_pcb" >&5
16641echo $ECHO_N "checking for struct thread.td_pcb... $ECHO_C" >&6
5c45e068 16642if test "${ac_cv_member_struct_thread_td_pcb+set}" = set; then
bec39cab
AC
16643 echo $ECHO_N "(cached) $ECHO_C" >&6
16644else
16645 cat >conftest.$ac_ext <<_ACEOF
16646/* confdefs.h. */
16647_ACEOF
16648cat confdefs.h >>conftest.$ac_ext
16649cat >>conftest.$ac_ext <<_ACEOF
16650/* end confdefs.h. */
a3828db0
MK
16651#include <sys/param.h>
16652#include <sys/proc.h>
5c45e068
MK
16653
16654
bec39cab
AC
16655int
16656main ()
16657{
5c45e068
MK
16658static struct thread ac_aggr;
16659if (ac_aggr.td_pcb)
16660return 0;
bec39cab
AC
16661 ;
16662 return 0;
16663}
16664_ACEOF
16665rm -f conftest.$ac_objext
16666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16667 (eval $ac_compile) 2>conftest.er1
16668 ac_status=$?
16669 grep -v '^ *+' conftest.er1 >conftest.err
16670 rm -f conftest.er1
16671 cat conftest.err >&5
16672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16673 (exit $ac_status); } &&
b4e70030
JB
16674 { ac_try='test -z "$ac_c_werror_flag"
16675 || test ! -s conftest.err'
bec39cab
AC
16676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16677 (eval $ac_try) 2>&5
16678 ac_status=$?
16679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16680 (exit $ac_status); }; } &&
16681 { ac_try='test -s conftest.$ac_objext'
16682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16683 (eval $ac_try) 2>&5
16684 ac_status=$?
16685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16686 (exit $ac_status); }; }; then
5c45e068 16687 ac_cv_member_struct_thread_td_pcb=yes
c906108c 16688else
bec39cab
AC
16689 echo "$as_me: failed program was:" >&5
16690sed 's/^/| /' conftest.$ac_ext >&5
16691
b4e70030 16692cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16693/* confdefs.h. */
16694_ACEOF
16695cat confdefs.h >>conftest.$ac_ext
16696cat >>conftest.$ac_ext <<_ACEOF
16697/* end confdefs.h. */
16698#include <sys/param.h>
16699#include <sys/proc.h>
16700
16701
16702int
16703main ()
16704{
16705static struct thread ac_aggr;
16706if (sizeof ac_aggr.td_pcb)
16707return 0;
16708 ;
16709 return 0;
16710}
16711_ACEOF
16712rm -f conftest.$ac_objext
16713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16714 (eval $ac_compile) 2>conftest.er1
16715 ac_status=$?
16716 grep -v '^ *+' conftest.er1 >conftest.err
16717 rm -f conftest.er1
16718 cat conftest.err >&5
16719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16720 (exit $ac_status); } &&
b4e70030
JB
16721 { ac_try='test -z "$ac_c_werror_flag"
16722 || test ! -s conftest.err'
5c45e068
MK
16723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16724 (eval $ac_try) 2>&5
16725 ac_status=$?
16726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16727 (exit $ac_status); }; } &&
16728 { ac_try='test -s conftest.$ac_objext'
16729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16730 (eval $ac_try) 2>&5
16731 ac_status=$?
16732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16733 (exit $ac_status); }; }; then
16734 ac_cv_member_struct_thread_td_pcb=yes
16735else
16736 echo "$as_me: failed program was:" >&5
16737sed 's/^/| /' conftest.$ac_ext >&5
16738
b4e70030 16739ac_cv_member_struct_thread_td_pcb=no
5c45e068
MK
16740fi
16741rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16742fi
bec39cab 16743rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16744fi
b4e70030
JB
16745echo "$as_me:$LINENO: result: $ac_cv_member_struct_thread_td_pcb" >&5
16746echo "${ECHO_T}$ac_cv_member_struct_thread_td_pcb" >&6
5c45e068 16747if test $ac_cv_member_struct_thread_td_pcb = yes; then
c906108c 16748
5c45e068 16749cat >>confdefs.h <<_ACEOF
a3828db0 16750#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 16751_ACEOF
c906108c 16752
5c45e068 16753
97bf5e38 16754fi
c906108c 16755
5c45e068 16756
a3828db0 16757# See if <sys/lwp.h> defines `struct lwp`.
b4e70030
JB
16758echo "$as_me:$LINENO: checking for struct lwp" >&5
16759echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
a3828db0 16760if test "${gdb_cv_struct_lwp+set}" = set; then
bec39cab
AC
16761 echo $ECHO_N "(cached) $ECHO_C" >&6
16762else
16763 cat >conftest.$ac_ext <<_ACEOF
16764/* confdefs.h. */
16765_ACEOF
16766cat confdefs.h >>conftest.$ac_ext
16767cat >>conftest.$ac_ext <<_ACEOF
16768/* end confdefs.h. */
a3828db0
MK
16769#include <sys/param.h>
16770#include <sys/lwp.h>
bec39cab
AC
16771int
16772main ()
16773{
a3828db0 16774struct lwp l;
bec39cab
AC
16775 ;
16776 return 0;
16777}
16778_ACEOF
16779rm -f conftest.$ac_objext
16780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16781 (eval $ac_compile) 2>conftest.er1
16782 ac_status=$?
16783 grep -v '^ *+' conftest.er1 >conftest.err
16784 rm -f conftest.er1
16785 cat conftest.err >&5
16786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16787 (exit $ac_status); } &&
b4e70030
JB
16788 { ac_try='test -z "$ac_c_werror_flag"
16789 || test ! -s conftest.err'
bec39cab
AC
16790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16791 (eval $ac_try) 2>&5
16792 ac_status=$?
16793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16794 (exit $ac_status); }; } &&
16795 { ac_try='test -s conftest.$ac_objext'
16796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16797 (eval $ac_try) 2>&5
16798 ac_status=$?
16799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16800 (exit $ac_status); }; }; then
a3828db0 16801 gdb_cv_struct_lwp=yes
c906108c 16802else
bec39cab
AC
16803 echo "$as_me: failed program was:" >&5
16804sed 's/^/| /' conftest.$ac_ext >&5
16805
b4e70030 16806gdb_cv_struct_lwp=no
c906108c 16807fi
bec39cab 16808rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16809fi
b4e70030
JB
16810echo "$as_me:$LINENO: result: $gdb_cv_struct_lwp" >&5
16811echo "${ECHO_T}$gdb_cv_struct_lwp" >&6
a3828db0 16812if test $gdb_cv_struct_lwp = yes; then
c906108c 16813
a3828db0
MK
16814cat >>confdefs.h <<\_ACEOF
16815#define HAVE_STRUCT_LWP 1
bec39cab 16816_ACEOF
c906108c 16817
97bf5e38 16818fi
c906108c 16819
a3828db0 16820# See if <machine/reg.h> degines `struct reg'.
b4e70030
JB
16821echo "$as_me:$LINENO: checking for struct reg in machine/reg.h" >&5
16822echo $ECHO_N "checking for struct reg in machine/reg.h... $ECHO_C" >&6
a3828db0 16823if test "${gdb_cv_struct_reg+set}" = set; then
bec39cab
AC
16824 echo $ECHO_N "(cached) $ECHO_C" >&6
16825else
16826 cat >conftest.$ac_ext <<_ACEOF
16827/* confdefs.h. */
16828_ACEOF
16829cat confdefs.h >>conftest.$ac_ext
16830cat >>conftest.$ac_ext <<_ACEOF
16831/* end confdefs.h. */
a3828db0
MK
16832#include <sys/types.h>
16833#include <machine/reg.h>
bec39cab
AC
16834int
16835main ()
16836{
a3828db0 16837struct reg r;
bec39cab
AC
16838 ;
16839 return 0;
16840}
16841_ACEOF
16842rm -f conftest.$ac_objext
16843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16844 (eval $ac_compile) 2>conftest.er1
16845 ac_status=$?
16846 grep -v '^ *+' conftest.er1 >conftest.err
16847 rm -f conftest.er1
16848 cat conftest.err >&5
16849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16850 (exit $ac_status); } &&
b4e70030
JB
16851 { ac_try='test -z "$ac_c_werror_flag"
16852 || test ! -s conftest.err'
bec39cab
AC
16853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16854 (eval $ac_try) 2>&5
16855 ac_status=$?
16856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16857 (exit $ac_status); }; } &&
16858 { ac_try='test -s conftest.$ac_objext'
16859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16860 (eval $ac_try) 2>&5
16861 ac_status=$?
16862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16863 (exit $ac_status); }; }; then
a3828db0 16864 gdb_cv_struct_reg=yes
27ca5dad 16865else
bec39cab
AC
16866 echo "$as_me: failed program was:" >&5
16867sed 's/^/| /' conftest.$ac_ext >&5
16868
b4e70030 16869gdb_cv_struct_reg=no
27ca5dad 16870fi
bec39cab 16871rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 16872fi
b4e70030
JB
16873echo "$as_me:$LINENO: result: $gdb_cv_struct_reg" >&5
16874echo "${ECHO_T}$gdb_cv_struct_reg" >&6
a3828db0 16875if test $gdb_cv_struct_reg = yes; then
bec39cab
AC
16876
16877cat >>confdefs.h <<\_ACEOF
a3828db0 16878#define HAVE_STRUCT_REG 1
bec39cab 16879_ACEOF
27ca5dad
MC
16880
16881fi
97bf5e38 16882
a3828db0
MK
16883# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
16884# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
b4e70030
JB
16885echo "$as_me:$LINENO: checking for struct reg.r_fs" >&5
16886echo $ECHO_N "checking for struct reg.r_fs... $ECHO_C" >&6
5c45e068 16887if test "${ac_cv_member_struct_reg_r_fs+set}" = set; then
bec39cab 16888 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16889else
bec39cab
AC
16890 cat >conftest.$ac_ext <<_ACEOF
16891/* confdefs.h. */
16892_ACEOF
16893cat confdefs.h >>conftest.$ac_ext
16894cat >>conftest.$ac_ext <<_ACEOF
16895/* end confdefs.h. */
a3828db0 16896#include <machine/reg.h>
5c45e068
MK
16897
16898int
16899main ()
16900{
16901static struct reg ac_aggr;
16902if (ac_aggr.r_fs)
16903return 0;
16904 ;
16905 return 0;
16906}
16907_ACEOF
16908rm -f conftest.$ac_objext
16909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16910 (eval $ac_compile) 2>conftest.er1
16911 ac_status=$?
16912 grep -v '^ *+' conftest.er1 >conftest.err
16913 rm -f conftest.er1
16914 cat conftest.err >&5
16915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16916 (exit $ac_status); } &&
b4e70030
JB
16917 { ac_try='test -z "$ac_c_werror_flag"
16918 || test ! -s conftest.err'
5c45e068
MK
16919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16920 (eval $ac_try) 2>&5
16921 ac_status=$?
16922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16923 (exit $ac_status); }; } &&
16924 { ac_try='test -s conftest.$ac_objext'
16925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16926 (eval $ac_try) 2>&5
16927 ac_status=$?
16928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16929 (exit $ac_status); }; }; then
16930 ac_cv_member_struct_reg_r_fs=yes
16931else
16932 echo "$as_me: failed program was:" >&5
16933sed 's/^/| /' conftest.$ac_ext >&5
16934
b4e70030 16935cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16936/* confdefs.h. */
16937_ACEOF
16938cat confdefs.h >>conftest.$ac_ext
16939cat >>conftest.$ac_ext <<_ACEOF
16940/* end confdefs.h. */
16941#include <machine/reg.h>
16942
bec39cab
AC
16943int
16944main ()
16945{
5c45e068
MK
16946static struct reg ac_aggr;
16947if (sizeof ac_aggr.r_fs)
16948return 0;
bec39cab
AC
16949 ;
16950 return 0;
16951}
16952_ACEOF
16953rm -f conftest.$ac_objext
16954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16955 (eval $ac_compile) 2>conftest.er1
16956 ac_status=$?
16957 grep -v '^ *+' conftest.er1 >conftest.err
16958 rm -f conftest.er1
16959 cat conftest.err >&5
16960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16961 (exit $ac_status); } &&
b4e70030
JB
16962 { ac_try='test -z "$ac_c_werror_flag"
16963 || test ! -s conftest.err'
bec39cab
AC
16964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16965 (eval $ac_try) 2>&5
16966 ac_status=$?
16967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16968 (exit $ac_status); }; } &&
16969 { ac_try='test -s conftest.$ac_objext'
16970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16971 (eval $ac_try) 2>&5
16972 ac_status=$?
16973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16974 (exit $ac_status); }; }; then
5c45e068 16975 ac_cv_member_struct_reg_r_fs=yes
3862412b 16976else
bec39cab
AC
16977 echo "$as_me: failed program was:" >&5
16978sed 's/^/| /' conftest.$ac_ext >&5
16979
b4e70030 16980ac_cv_member_struct_reg_r_fs=no
3862412b 16981fi
bec39cab 16982rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 16983fi
5c45e068
MK
16984rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16985fi
b4e70030
JB
16986echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_fs" >&5
16987echo "${ECHO_T}$ac_cv_member_struct_reg_r_fs" >&6
5c45e068
MK
16988if test $ac_cv_member_struct_reg_r_fs = yes; then
16989
16990cat >>confdefs.h <<_ACEOF
a3828db0 16991#define HAVE_STRUCT_REG_R_FS 1
bec39cab 16992_ACEOF
3862412b 16993
5c45e068 16994
97bf5e38 16995fi
b4e70030
JB
16996echo "$as_me:$LINENO: checking for struct reg.r_gs" >&5
16997echo $ECHO_N "checking for struct reg.r_gs... $ECHO_C" >&6
5c45e068 16998if test "${ac_cv_member_struct_reg_r_gs+set}" = set; then
bec39cab 16999 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17000else
bec39cab
AC
17001 cat >conftest.$ac_ext <<_ACEOF
17002/* confdefs.h. */
17003_ACEOF
17004cat confdefs.h >>conftest.$ac_ext
17005cat >>conftest.$ac_ext <<_ACEOF
17006/* end confdefs.h. */
a3828db0 17007#include <machine/reg.h>
5c45e068 17008
bec39cab
AC
17009int
17010main ()
17011{
5c45e068
MK
17012static struct reg ac_aggr;
17013if (ac_aggr.r_gs)
17014return 0;
bec39cab
AC
17015 ;
17016 return 0;
17017}
17018_ACEOF
17019rm -f conftest.$ac_objext
17020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17021 (eval $ac_compile) 2>conftest.er1
17022 ac_status=$?
17023 grep -v '^ *+' conftest.er1 >conftest.err
17024 rm -f conftest.er1
17025 cat conftest.err >&5
17026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17027 (exit $ac_status); } &&
b4e70030
JB
17028 { ac_try='test -z "$ac_c_werror_flag"
17029 || test ! -s conftest.err'
bec39cab
AC
17030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17031 (eval $ac_try) 2>&5
17032 ac_status=$?
17033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17034 (exit $ac_status); }; } &&
17035 { ac_try='test -s conftest.$ac_objext'
17036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17037 (eval $ac_try) 2>&5
17038 ac_status=$?
17039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17040 (exit $ac_status); }; }; then
5c45e068 17041 ac_cv_member_struct_reg_r_gs=yes
3862412b 17042else
bec39cab
AC
17043 echo "$as_me: failed program was:" >&5
17044sed 's/^/| /' conftest.$ac_ext >&5
17045
b4e70030 17046cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
17047/* confdefs.h. */
17048_ACEOF
17049cat confdefs.h >>conftest.$ac_ext
17050cat >>conftest.$ac_ext <<_ACEOF
17051/* end confdefs.h. */
17052#include <machine/reg.h>
17053
17054int
17055main ()
17056{
17057static struct reg ac_aggr;
17058if (sizeof ac_aggr.r_gs)
17059return 0;
17060 ;
17061 return 0;
17062}
17063_ACEOF
17064rm -f conftest.$ac_objext
17065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17066 (eval $ac_compile) 2>conftest.er1
17067 ac_status=$?
17068 grep -v '^ *+' conftest.er1 >conftest.err
17069 rm -f conftest.er1
17070 cat conftest.err >&5
17071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17072 (exit $ac_status); } &&
b4e70030
JB
17073 { ac_try='test -z "$ac_c_werror_flag"
17074 || test ! -s conftest.err'
5c45e068
MK
17075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17076 (eval $ac_try) 2>&5
17077 ac_status=$?
17078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17079 (exit $ac_status); }; } &&
17080 { ac_try='test -s conftest.$ac_objext'
17081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17082 (eval $ac_try) 2>&5
17083 ac_status=$?
17084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17085 (exit $ac_status); }; }; then
17086 ac_cv_member_struct_reg_r_gs=yes
17087else
17088 echo "$as_me: failed program was:" >&5
17089sed 's/^/| /' conftest.$ac_ext >&5
17090
b4e70030 17091ac_cv_member_struct_reg_r_gs=no
3862412b 17092fi
bec39cab 17093rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 17094fi
5c45e068
MK
17095rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17096fi
b4e70030
JB
17097echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_gs" >&5
17098echo "${ECHO_T}$ac_cv_member_struct_reg_r_gs" >&6
5c45e068
MK
17099if test $ac_cv_member_struct_reg_r_gs = yes; then
17100
17101cat >>confdefs.h <<_ACEOF
a3828db0 17102#define HAVE_STRUCT_REG_R_GS 1
bec39cab 17103_ACEOF
3862412b 17104
5c45e068 17105
97bf5e38 17106fi
3862412b 17107
5c45e068 17108
a3828db0 17109# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
b4e70030
JB
17110echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
17111echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
a3828db0 17112if test "${gdb_cv_have_ptrace_getregs+set}" = set; then
bec39cab 17113 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 17114else
bec39cab
AC
17115 cat >conftest.$ac_ext <<_ACEOF
17116/* confdefs.h. */
17117_ACEOF
17118cat confdefs.h >>conftest.$ac_ext
17119cat >>conftest.$ac_ext <<_ACEOF
17120/* end confdefs.h. */
a3828db0 17121#include <sys/ptrace.h>
bec39cab
AC
17122int
17123main ()
17124{
a3828db0 17125PTRACE_GETREGS;
bec39cab
AC
17126 ;
17127 return 0;
17128}
17129_ACEOF
17130rm -f conftest.$ac_objext
17131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17132 (eval $ac_compile) 2>conftest.er1
17133 ac_status=$?
17134 grep -v '^ *+' conftest.er1 >conftest.err
17135 rm -f conftest.er1
17136 cat conftest.err >&5
17137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17138 (exit $ac_status); } &&
b4e70030
JB
17139 { ac_try='test -z "$ac_c_werror_flag"
17140 || test ! -s conftest.err'
bec39cab
AC
17141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17142 (eval $ac_try) 2>&5
17143 ac_status=$?
17144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17145 (exit $ac_status); }; } &&
17146 { ac_try='test -s conftest.$ac_objext'
17147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17148 (eval $ac_try) 2>&5
17149 ac_status=$?
17150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17151 (exit $ac_status); }; }; then
a3828db0 17152 gdb_cv_have_ptrace_getregs=yes
451928c5 17153else
bec39cab
AC
17154 echo "$as_me: failed program was:" >&5
17155sed 's/^/| /' conftest.$ac_ext >&5
17156
b4e70030 17157gdb_cv_have_ptrace_getregs=no
451928c5 17158fi
bec39cab 17159rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
17160fi
17161
b4e70030
JB
17162echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getregs" >&5
17163echo "${ECHO_T}$gdb_cv_have_ptrace_getregs" >&6
a3828db0 17164if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f
SE
17165
17166cat >>confdefs.h <<\_ACEOF
a3828db0 17167#define HAVE_PTRACE_GETREGS 1
bec39cab 17168_ACEOF
451928c5 17169
97bf5e38 17170fi
451928c5 17171
a3828db0 17172# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
b4e70030
JB
17173echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5
17174echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6
a3828db0 17175if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then
bec39cab 17176 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 17177else
bec39cab
AC
17178 cat >conftest.$ac_ext <<_ACEOF
17179/* confdefs.h. */
17180_ACEOF
17181cat confdefs.h >>conftest.$ac_ext
17182cat >>conftest.$ac_ext <<_ACEOF
17183/* end confdefs.h. */
a3828db0 17184#include <sys/ptrace.h>
bec39cab
AC
17185int
17186main ()
17187{
a3828db0 17188PTRACE_GETFPXREGS;
bec39cab
AC
17189 ;
17190 return 0;
17191}
17192_ACEOF
17193rm -f conftest.$ac_objext
17194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17195 (eval $ac_compile) 2>conftest.er1
17196 ac_status=$?
17197 grep -v '^ *+' conftest.er1 >conftest.err
17198 rm -f conftest.er1
17199 cat conftest.err >&5
17200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17201 (exit $ac_status); } &&
b4e70030
JB
17202 { ac_try='test -z "$ac_c_werror_flag"
17203 || test ! -s conftest.err'
bec39cab
AC
17204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17205 (eval $ac_try) 2>&5
17206 ac_status=$?
17207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17208 (exit $ac_status); }; } &&
17209 { ac_try='test -s conftest.$ac_objext'
17210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17211 (eval $ac_try) 2>&5
17212 ac_status=$?
17213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17214 (exit $ac_status); }; }; then
a3828db0 17215 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 17216else
bec39cab
AC
17217 echo "$as_me: failed program was:" >&5
17218sed 's/^/| /' conftest.$ac_ext >&5
17219
b4e70030 17220gdb_cv_have_ptrace_getfpxregs=no
451928c5 17221fi
bec39cab 17222rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
17223fi
17224
b4e70030
JB
17225echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getfpxregs" >&5
17226echo "${ECHO_T}$gdb_cv_have_ptrace_getfpxregs" >&6
a3828db0 17227if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f
SE
17228
17229cat >>confdefs.h <<\_ACEOF
a3828db0 17230#define HAVE_PTRACE_GETFPXREGS 1
bec39cab 17231_ACEOF
451928c5 17232
97bf5e38 17233fi
451928c5 17234
a3828db0 17235# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
b4e70030
JB
17236echo "$as_me:$LINENO: checking for PT_GETDBREGS" >&5
17237echo $ECHO_N "checking for PT_GETDBREGS... $ECHO_C" >&6
a3828db0 17238if test "${gdb_cv_have_pt_getdbregs+set}" = set; then
bec39cab 17239 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17240else
bec39cab
AC
17241 cat >conftest.$ac_ext <<_ACEOF
17242/* confdefs.h. */
17243_ACEOF
17244cat confdefs.h >>conftest.$ac_ext
17245cat >>conftest.$ac_ext <<_ACEOF
17246/* end confdefs.h. */
a3828db0
MK
17247#include <sys/types.h>
17248#include <sys/ptrace.h>
bec39cab
AC
17249int
17250main ()
17251{
a3828db0 17252PT_GETDBREGS;
bec39cab
AC
17253 ;
17254 return 0;
17255}
17256_ACEOF
17257rm -f conftest.$ac_objext
17258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17259 (eval $ac_compile) 2>conftest.er1
17260 ac_status=$?
17261 grep -v '^ *+' conftest.er1 >conftest.err
17262 rm -f conftest.er1
17263 cat conftest.err >&5
17264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17265 (exit $ac_status); } &&
b4e70030
JB
17266 { ac_try='test -z "$ac_c_werror_flag"
17267 || test ! -s conftest.err'
bec39cab
AC
17268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17269 (eval $ac_try) 2>&5
17270 ac_status=$?
17271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17272 (exit $ac_status); }; } &&
17273 { ac_try='test -s conftest.$ac_objext'
17274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17275 (eval $ac_try) 2>&5
17276 ac_status=$?
17277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17278 (exit $ac_status); }; }; then
a3828db0 17279 gdb_cv_have_pt_getdbregs=yes
3862412b 17280else
bec39cab
AC
17281 echo "$as_me: failed program was:" >&5
17282sed 's/^/| /' conftest.$ac_ext >&5
17283
b4e70030 17284gdb_cv_have_pt_getdbregs=no
3862412b 17285fi
bec39cab 17286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
17287fi
17288
b4e70030
JB
17289echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getdbregs" >&5
17290echo "${ECHO_T}$gdb_cv_have_pt_getdbregs" >&6
a3828db0 17291if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f
SE
17292
17293cat >>confdefs.h <<\_ACEOF
a3828db0 17294#define HAVE_PT_GETDBREGS 1
bec39cab 17295_ACEOF
3862412b 17296
97bf5e38 17297fi
3862412b 17298
a3828db0 17299# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
b4e70030
JB
17300echo "$as_me:$LINENO: checking for PT_GETXMMREGS" >&5
17301echo $ECHO_N "checking for PT_GETXMMREGS... $ECHO_C" >&6
a3828db0 17302if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then
bec39cab 17303 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17304else
bec39cab
AC
17305 cat >conftest.$ac_ext <<_ACEOF
17306/* confdefs.h. */
17307_ACEOF
17308cat confdefs.h >>conftest.$ac_ext
17309cat >>conftest.$ac_ext <<_ACEOF
17310/* end confdefs.h. */
a3828db0
MK
17311#include <sys/types.h>
17312#include <sys/ptrace.h>
bec39cab
AC
17313int
17314main ()
17315{
a3828db0 17316PT_GETXMMREGS;
bec39cab
AC
17317 ;
17318 return 0;
17319}
17320_ACEOF
17321rm -f conftest.$ac_objext
17322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17323 (eval $ac_compile) 2>conftest.er1
17324 ac_status=$?
17325 grep -v '^ *+' conftest.er1 >conftest.err
17326 rm -f conftest.er1
17327 cat conftest.err >&5
17328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17329 (exit $ac_status); } &&
b4e70030
JB
17330 { ac_try='test -z "$ac_c_werror_flag"
17331 || test ! -s conftest.err'
bec39cab
AC
17332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17333 (eval $ac_try) 2>&5
17334 ac_status=$?
17335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17336 (exit $ac_status); }; } &&
17337 { ac_try='test -s conftest.$ac_objext'
17338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17339 (eval $ac_try) 2>&5
17340 ac_status=$?
17341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17342 (exit $ac_status); }; }; then
a3828db0 17343 gdb_cv_have_pt_getxmmregs=yes
3862412b 17344else
bec39cab
AC
17345 echo "$as_me: failed program was:" >&5
17346sed 's/^/| /' conftest.$ac_ext >&5
17347
b4e70030 17348gdb_cv_have_pt_getxmmregs=no
3862412b 17349fi
bec39cab 17350rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
17351fi
17352
b4e70030
JB
17353echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getxmmregs" >&5
17354echo "${ECHO_T}$gdb_cv_have_pt_getxmmregs" >&6
a3828db0 17355if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f
SE
17356
17357cat >>confdefs.h <<\_ACEOF
a3828db0 17358#define HAVE_PT_GETXMMREGS 1
bec39cab 17359_ACEOF
3862412b 17360
97bf5e38 17361fi
3862412b 17362
eb368090 17363# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
17364
17365if test "${target}" = "${host}"; then
17366 case "${host}" in
97bf5e38 17367 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f
SE
17368
17369cat >>confdefs.h <<\_ACEOF
97bf5e38 17370#define NEW_PROC_API 1
bec39cab 17371_ACEOF
97bf5e38
MK
17372
17373 ;;
c162e8c9 17374 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f
SE
17375
17376cat >>confdefs.h <<\_ACEOF
97bf5e38 17377#define NEW_PROC_API 1
bec39cab 17378_ACEOF
c960c18f
AC
17379
17380 ;;
17381 mips-sgi-irix5*)
17382 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f
SE
17383
17384cat >>confdefs.h <<\_ACEOF
c960c18f 17385#define _KMEMUSER 1
bec39cab 17386_ACEOF
97bf5e38
MK
17387
17388 ;;
17389 esac
17390fi
17391
17392if test "$ac_cv_header_sys_procfs_h" = yes; then
b4e70030
JB
17393 echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5
17394echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17395 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then
17396 echo $ECHO_N "(cached) $ECHO_C" >&6
17397else
17398 cat >conftest.$ac_ext <<_ACEOF
17399/* confdefs.h. */
17400_ACEOF
17401cat confdefs.h >>conftest.$ac_ext
17402cat >>conftest.$ac_ext <<_ACEOF
17403/* end confdefs.h. */
596c9d4b
KB
17404
17405#define _SYSCALL32
17406#include <sys/procfs.h>
bec39cab
AC
17407int
17408main ()
17409{
97bf5e38 17410pstatus_t avar
bec39cab
AC
17411 ;
17412 return 0;
17413}
17414_ACEOF
17415rm -f conftest.$ac_objext
17416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17417 (eval $ac_compile) 2>conftest.er1
17418 ac_status=$?
17419 grep -v '^ *+' conftest.er1 >conftest.err
17420 rm -f conftest.er1
17421 cat conftest.err >&5
17422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17423 (exit $ac_status); } &&
b4e70030
JB
17424 { ac_try='test -z "$ac_c_werror_flag"
17425 || test ! -s conftest.err'
bec39cab
AC
17426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17427 (eval $ac_try) 2>&5
17428 ac_status=$?
17429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17430 (exit $ac_status); }; } &&
17431 { ac_try='test -s conftest.$ac_objext'
17432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17433 (eval $ac_try) 2>&5
17434 ac_status=$?
17435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17436 (exit $ac_status); }; }; then
97bf5e38 17437 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 17438else
bec39cab
AC
17439 echo "$as_me: failed program was:" >&5
17440sed 's/^/| /' conftest.$ac_ext >&5
17441
b4e70030 17442bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 17443
596c9d4b 17444fi
bec39cab 17445rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17446fi
17447
97bf5e38 17448 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab
AC
17449
17450cat >>confdefs.h <<\_ACEOF
97bf5e38 17451#define HAVE_PSTATUS_T 1
bec39cab 17452_ACEOF
596c9d4b
KB
17453
17454 fi
b4e70030
JB
17455 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
17456echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6
596c9d4b 17457
b4e70030
JB
17458 echo "$as_me:$LINENO: checking for prrun_t in sys/procfs.h" >&5
17459echo $ECHO_N "checking for prrun_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17460 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then
17461 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 17462else
bec39cab
AC
17463 cat >conftest.$ac_ext <<_ACEOF
17464/* confdefs.h. */
17465_ACEOF
17466cat confdefs.h >>conftest.$ac_ext
17467cat >>conftest.$ac_ext <<_ACEOF
17468/* end confdefs.h. */
596c9d4b
KB
17469
17470#define _SYSCALL32
17471#include <sys/procfs.h>
bec39cab
AC
17472int
17473main ()
17474{
97bf5e38 17475prrun_t avar
bec39cab
AC
17476 ;
17477 return 0;
17478}
17479_ACEOF
17480rm -f conftest.$ac_objext
17481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17482 (eval $ac_compile) 2>conftest.er1
17483 ac_status=$?
17484 grep -v '^ *+' conftest.er1 >conftest.err
17485 rm -f conftest.er1
17486 cat conftest.err >&5
17487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17488 (exit $ac_status); } &&
b4e70030
JB
17489 { ac_try='test -z "$ac_c_werror_flag"
17490 || test ! -s conftest.err'
bec39cab
AC
17491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17492 (eval $ac_try) 2>&5
17493 ac_status=$?
17494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17495 (exit $ac_status); }; } &&
17496 { ac_try='test -s conftest.$ac_objext'
17497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17498 (eval $ac_try) 2>&5
17499 ac_status=$?
17500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17501 (exit $ac_status); }; }; then
97bf5e38 17502 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 17503else
bec39cab
AC
17504 echo "$as_me: failed program was:" >&5
17505sed 's/^/| /' conftest.$ac_ext >&5
17506
b4e70030 17507bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 17508
596c9d4b 17509fi
bec39cab 17510rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17511fi
17512
97bf5e38 17513 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab
AC
17514
17515cat >>confdefs.h <<\_ACEOF
97bf5e38 17516#define HAVE_PRRUN_T 1
bec39cab 17517_ACEOF
596c9d4b
KB
17518
17519 fi
b4e70030
JB
17520 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
17521echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prrun_t" >&6
596c9d4b 17522
b4e70030
JB
17523 echo "$as_me:$LINENO: checking for gregset_t in sys/procfs.h" >&5
17524echo $ECHO_N "checking for gregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17525 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then
17526 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 17527else
bec39cab
AC
17528 cat >conftest.$ac_ext <<_ACEOF
17529/* confdefs.h. */
17530_ACEOF
17531cat confdefs.h >>conftest.$ac_ext
17532cat >>conftest.$ac_ext <<_ACEOF
17533/* end confdefs.h. */
596c9d4b
KB
17534
17535#define _SYSCALL32
17536#include <sys/procfs.h>
bec39cab
AC
17537int
17538main ()
17539{
97bf5e38 17540gregset_t avar
bec39cab
AC
17541 ;
17542 return 0;
17543}
17544_ACEOF
17545rm -f conftest.$ac_objext
17546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17547 (eval $ac_compile) 2>conftest.er1
17548 ac_status=$?
17549 grep -v '^ *+' conftest.er1 >conftest.err
17550 rm -f conftest.er1
17551 cat conftest.err >&5
17552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17553 (exit $ac_status); } &&
b4e70030
JB
17554 { ac_try='test -z "$ac_c_werror_flag"
17555 || test ! -s conftest.err'
bec39cab
AC
17556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17557 (eval $ac_try) 2>&5
17558 ac_status=$?
17559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17560 (exit $ac_status); }; } &&
17561 { ac_try='test -s conftest.$ac_objext'
17562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17563 (eval $ac_try) 2>&5
17564 ac_status=$?
17565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17566 (exit $ac_status); }; }; then
97bf5e38 17567 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 17568else
bec39cab
AC
17569 echo "$as_me: failed program was:" >&5
17570sed 's/^/| /' conftest.$ac_ext >&5
17571
b4e70030 17572bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 17573
596c9d4b 17574fi
bec39cab 17575rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17576fi
17577
97bf5e38 17578 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab
AC
17579
17580cat >>confdefs.h <<\_ACEOF
97bf5e38 17581#define HAVE_GREGSET_T 1
bec39cab 17582_ACEOF
596c9d4b
KB
17583
17584 fi
b4e70030
JB
17585 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
17586echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_gregset_t" >&6
451928c5 17587
b4e70030
JB
17588 echo "$as_me:$LINENO: checking for fpregset_t in sys/procfs.h" >&5
17589echo $ECHO_N "checking for fpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17590 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then
17591 echo $ECHO_N "(cached) $ECHO_C" >&6
d84dd0c5 17592else
bec39cab
AC
17593 cat >conftest.$ac_ext <<_ACEOF
17594/* confdefs.h. */
17595_ACEOF
17596cat confdefs.h >>conftest.$ac_ext
17597cat >>conftest.$ac_ext <<_ACEOF
17598/* end confdefs.h. */
97bf5e38
MK
17599
17600#define _SYSCALL32
d84dd0c5 17601#include <sys/procfs.h>
bec39cab
AC
17602int
17603main ()
17604{
97bf5e38 17605fpregset_t avar
bec39cab
AC
17606 ;
17607 return 0;
17608}
17609_ACEOF
17610rm -f conftest.$ac_objext
17611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17612 (eval $ac_compile) 2>conftest.er1
17613 ac_status=$?
17614 grep -v '^ *+' conftest.er1 >conftest.err
17615 rm -f conftest.er1
17616 cat conftest.err >&5
17617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17618 (exit $ac_status); } &&
b4e70030
JB
17619 { ac_try='test -z "$ac_c_werror_flag"
17620 || test ! -s conftest.err'
bec39cab
AC
17621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17622 (eval $ac_try) 2>&5
17623 ac_status=$?
17624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17625 (exit $ac_status); }; } &&
17626 { ac_try='test -s conftest.$ac_objext'
17627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17628 (eval $ac_try) 2>&5
17629 ac_status=$?
17630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17631 (exit $ac_status); }; }; then
97bf5e38 17632 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 17633else
bec39cab
AC
17634 echo "$as_me: failed program was:" >&5
17635sed 's/^/| /' conftest.$ac_ext >&5
17636
b4e70030 17637bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 17638
d84dd0c5 17639fi
bec39cab 17640rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
17641fi
17642
97bf5e38 17643 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab
AC
17644
17645cat >>confdefs.h <<\_ACEOF
97bf5e38 17646#define HAVE_FPREGSET_T 1
bec39cab 17647_ACEOF
d84dd0c5 17648
97bf5e38 17649 fi
b4e70030
JB
17650 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
17651echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_fpregset_t" >&6
d84dd0c5 17652
b4e70030
JB
17653 echo "$as_me:$LINENO: checking for prgregset_t in sys/procfs.h" >&5
17654echo $ECHO_N "checking for prgregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17655 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then
17656 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17657else
bec39cab
AC
17658 cat >conftest.$ac_ext <<_ACEOF
17659/* confdefs.h. */
17660_ACEOF
17661cat confdefs.h >>conftest.$ac_ext
17662cat >>conftest.$ac_ext <<_ACEOF
17663/* end confdefs.h. */
c906108c 17664
97bf5e38
MK
17665#define _SYSCALL32
17666#include <sys/procfs.h>
bec39cab
AC
17667int
17668main ()
17669{
97bf5e38 17670prgregset_t avar
bec39cab
AC
17671 ;
17672 return 0;
17673}
17674_ACEOF
17675rm -f conftest.$ac_objext
17676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17677 (eval $ac_compile) 2>conftest.er1
17678 ac_status=$?
17679 grep -v '^ *+' conftest.er1 >conftest.err
17680 rm -f conftest.er1
17681 cat conftest.err >&5
17682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17683 (exit $ac_status); } &&
b4e70030
JB
17684 { ac_try='test -z "$ac_c_werror_flag"
17685 || test ! -s conftest.err'
bec39cab
AC
17686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17687 (eval $ac_try) 2>&5
17688 ac_status=$?
17689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17690 (exit $ac_status); }; } &&
17691 { ac_try='test -s conftest.$ac_objext'
17692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17693 (eval $ac_try) 2>&5
17694 ac_status=$?
17695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17696 (exit $ac_status); }; }; then
97bf5e38 17697 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 17698else
bec39cab
AC
17699 echo "$as_me: failed program was:" >&5
17700sed 's/^/| /' conftest.$ac_ext >&5
17701
b4e70030 17702bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 17703
c906108c 17704fi
bec39cab 17705rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17706fi
17707
97bf5e38 17708 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab
AC
17709
17710cat >>confdefs.h <<\_ACEOF
97bf5e38 17711#define HAVE_PRGREGSET_T 1
bec39cab 17712_ACEOF
c906108c 17713
97bf5e38 17714 fi
b4e70030
JB
17715 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
17716echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset_t" >&6
c906108c 17717
b4e70030
JB
17718 echo "$as_me:$LINENO: checking for prfpregset_t in sys/procfs.h" >&5
17719echo $ECHO_N "checking for prfpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17720 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then
17721 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17722else
bec39cab
AC
17723 cat >conftest.$ac_ext <<_ACEOF
17724/* confdefs.h. */
17725_ACEOF
17726cat confdefs.h >>conftest.$ac_ext
17727cat >>conftest.$ac_ext <<_ACEOF
17728/* end confdefs.h. */
97bf5e38
MK
17729
17730#define _SYSCALL32
17731#include <sys/procfs.h>
bec39cab
AC
17732int
17733main ()
17734{
97bf5e38 17735prfpregset_t avar
bec39cab
AC
17736 ;
17737 return 0;
17738}
17739_ACEOF
17740rm -f conftest.$ac_objext
17741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17742 (eval $ac_compile) 2>conftest.er1
17743 ac_status=$?
17744 grep -v '^ *+' conftest.er1 >conftest.err
17745 rm -f conftest.er1
17746 cat conftest.err >&5
17747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17748 (exit $ac_status); } &&
b4e70030
JB
17749 { ac_try='test -z "$ac_c_werror_flag"
17750 || test ! -s conftest.err'
bec39cab
AC
17751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17752 (eval $ac_try) 2>&5
17753 ac_status=$?
17754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17755 (exit $ac_status); }; } &&
17756 { ac_try='test -s conftest.$ac_objext'
17757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17758 (eval $ac_try) 2>&5
17759 ac_status=$?
17760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17761 (exit $ac_status); }; }; then
97bf5e38 17762 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 17763else
bec39cab
AC
17764 echo "$as_me: failed program was:" >&5
17765sed 's/^/| /' conftest.$ac_ext >&5
17766
b4e70030 17767bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 17768
d45fe813 17769fi
bec39cab 17770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17771fi
17772
97bf5e38 17773 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab
AC
17774
17775cat >>confdefs.h <<\_ACEOF
97bf5e38 17776#define HAVE_PRFPREGSET_T 1
bec39cab 17777_ACEOF
d45fe813 17778
97bf5e38 17779 fi
b4e70030
JB
17780 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
17781echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6
d45fe813 17782
b4e70030
JB
17783 echo "$as_me:$LINENO: checking for prgregset32_t in sys/procfs.h" >&5
17784echo $ECHO_N "checking for prgregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17785 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then
17786 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17787else
bec39cab
AC
17788 cat >conftest.$ac_ext <<_ACEOF
17789/* confdefs.h. */
17790_ACEOF
17791cat confdefs.h >>conftest.$ac_ext
17792cat >>conftest.$ac_ext <<_ACEOF
17793/* end confdefs.h. */
97bf5e38
MK
17794
17795#define _SYSCALL32
17796#include <sys/procfs.h>
bec39cab
AC
17797int
17798main ()
17799{
97bf5e38 17800prgregset32_t avar
bec39cab
AC
17801 ;
17802 return 0;
17803}
17804_ACEOF
17805rm -f conftest.$ac_objext
17806if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17807 (eval $ac_compile) 2>conftest.er1
17808 ac_status=$?
17809 grep -v '^ *+' conftest.er1 >conftest.err
17810 rm -f conftest.er1
17811 cat conftest.err >&5
17812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17813 (exit $ac_status); } &&
b4e70030
JB
17814 { ac_try='test -z "$ac_c_werror_flag"
17815 || test ! -s conftest.err'
bec39cab
AC
17816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17817 (eval $ac_try) 2>&5
17818 ac_status=$?
17819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17820 (exit $ac_status); }; } &&
17821 { ac_try='test -s conftest.$ac_objext'
17822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17823 (eval $ac_try) 2>&5
17824 ac_status=$?
17825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17826 (exit $ac_status); }; }; then
97bf5e38 17827 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 17828else
bec39cab
AC
17829 echo "$as_me: failed program was:" >&5
17830sed 's/^/| /' conftest.$ac_ext >&5
17831
b4e70030 17832bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 17833
d45fe813 17834fi
bec39cab 17835rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17836fi
17837
97bf5e38 17838 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab
AC
17839
17840cat >>confdefs.h <<\_ACEOF
97bf5e38 17841#define HAVE_PRGREGSET32_T 1
bec39cab 17842_ACEOF
d45fe813 17843
97bf5e38 17844 fi
b4e70030
JB
17845 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
17846echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6
d45fe813 17847
b4e70030
JB
17848 echo "$as_me:$LINENO: checking for prfpregset32_t in sys/procfs.h" >&5
17849echo $ECHO_N "checking for prfpregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17850 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then
17851 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17852else
bec39cab
AC
17853 cat >conftest.$ac_ext <<_ACEOF
17854/* confdefs.h. */
17855_ACEOF
17856cat confdefs.h >>conftest.$ac_ext
17857cat >>conftest.$ac_ext <<_ACEOF
17858/* end confdefs.h. */
97bf5e38
MK
17859
17860#define _SYSCALL32
17861#include <sys/procfs.h>
bec39cab
AC
17862int
17863main ()
17864{
97bf5e38 17865prfpregset32_t avar
bec39cab
AC
17866 ;
17867 return 0;
17868}
17869_ACEOF
17870rm -f conftest.$ac_objext
17871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17872 (eval $ac_compile) 2>conftest.er1
17873 ac_status=$?
17874 grep -v '^ *+' conftest.er1 >conftest.err
17875 rm -f conftest.er1
17876 cat conftest.err >&5
17877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17878 (exit $ac_status); } &&
b4e70030
JB
17879 { ac_try='test -z "$ac_c_werror_flag"
17880 || test ! -s conftest.err'
bec39cab
AC
17881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17882 (eval $ac_try) 2>&5
17883 ac_status=$?
17884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17885 (exit $ac_status); }; } &&
17886 { ac_try='test -s conftest.$ac_objext'
17887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17888 (eval $ac_try) 2>&5
17889 ac_status=$?
17890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17891 (exit $ac_status); }; }; then
97bf5e38 17892 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 17893else
bec39cab
AC
17894 echo "$as_me: failed program was:" >&5
17895sed 's/^/| /' conftest.$ac_ext >&5
17896
b4e70030 17897bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 17898
d45fe813 17899fi
bec39cab 17900rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17901fi
17902
97bf5e38 17903 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab
AC
17904
17905cat >>confdefs.h <<\_ACEOF
97bf5e38 17906#define HAVE_PRFPREGSET32_T 1
bec39cab 17907_ACEOF
d45fe813 17908
97bf5e38 17909 fi
b4e70030
JB
17910 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
17911echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6
d45fe813 17912
b4e70030
JB
17913 echo "$as_me:$LINENO: checking for lwpid_t in sys/procfs.h" >&5
17914echo $ECHO_N "checking for lwpid_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17915 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then
17916 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17917else
bec39cab
AC
17918 cat >conftest.$ac_ext <<_ACEOF
17919/* confdefs.h. */
17920_ACEOF
17921cat confdefs.h >>conftest.$ac_ext
17922cat >>conftest.$ac_ext <<_ACEOF
17923/* end confdefs.h. */
97bf5e38 17924
d45fe813 17925#define _SYSCALL32
97bf5e38 17926#include <sys/procfs.h>
bec39cab
AC
17927int
17928main ()
17929{
97bf5e38 17930lwpid_t avar
bec39cab
AC
17931 ;
17932 return 0;
17933}
17934_ACEOF
17935rm -f conftest.$ac_objext
17936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17937 (eval $ac_compile) 2>conftest.er1
17938 ac_status=$?
17939 grep -v '^ *+' conftest.er1 >conftest.err
17940 rm -f conftest.er1
17941 cat conftest.err >&5
17942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17943 (exit $ac_status); } &&
b4e70030
JB
17944 { ac_try='test -z "$ac_c_werror_flag"
17945 || test ! -s conftest.err'
bec39cab
AC
17946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17947 (eval $ac_try) 2>&5
17948 ac_status=$?
17949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17950 (exit $ac_status); }; } &&
17951 { ac_try='test -s conftest.$ac_objext'
17952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17953 (eval $ac_try) 2>&5
17954 ac_status=$?
17955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17956 (exit $ac_status); }; }; then
97bf5e38 17957 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 17958else
bec39cab
AC
17959 echo "$as_me: failed program was:" >&5
17960sed 's/^/| /' conftest.$ac_ext >&5
17961
b4e70030 17962bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 17963
d45fe813 17964fi
bec39cab 17965rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17966fi
17967
97bf5e38 17968 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab
AC
17969
17970cat >>confdefs.h <<\_ACEOF
97bf5e38 17971#define HAVE_LWPID_T 1
bec39cab 17972_ACEOF
d45fe813 17973
97bf5e38 17974 fi
b4e70030
JB
17975 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
17976echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpid_t" >&6
c906108c 17977
b4e70030
JB
17978 echo "$as_me:$LINENO: checking for psaddr_t in sys/procfs.h" >&5
17979echo $ECHO_N "checking for psaddr_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17980 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then
17981 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17982else
bec39cab
AC
17983 cat >conftest.$ac_ext <<_ACEOF
17984/* confdefs.h. */
17985_ACEOF
17986cat confdefs.h >>conftest.$ac_ext
17987cat >>conftest.$ac_ext <<_ACEOF
17988/* end confdefs.h. */
c906108c 17989
97bf5e38
MK
17990#define _SYSCALL32
17991#include <sys/procfs.h>
bec39cab
AC
17992int
17993main ()
17994{
97bf5e38 17995psaddr_t avar
bec39cab
AC
17996 ;
17997 return 0;
17998}
17999_ACEOF
18000rm -f conftest.$ac_objext
18001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18002 (eval $ac_compile) 2>conftest.er1
18003 ac_status=$?
18004 grep -v '^ *+' conftest.er1 >conftest.err
18005 rm -f conftest.er1
18006 cat conftest.err >&5
18007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18008 (exit $ac_status); } &&
b4e70030
JB
18009 { ac_try='test -z "$ac_c_werror_flag"
18010 || test ! -s conftest.err'
bec39cab
AC
18011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18012 (eval $ac_try) 2>&5
18013 ac_status=$?
18014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18015 (exit $ac_status); }; } &&
18016 { ac_try='test -s conftest.$ac_objext'
18017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18018 (eval $ac_try) 2>&5
18019 ac_status=$?
18020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18021 (exit $ac_status); }; }; then
97bf5e38 18022 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 18023else
bec39cab
AC
18024 echo "$as_me: failed program was:" >&5
18025sed 's/^/| /' conftest.$ac_ext >&5
18026
b4e70030 18027bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 18028
c906108c 18029fi
bec39cab 18030rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18031fi
18032
97bf5e38 18033 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab
AC
18034
18035cat >>confdefs.h <<\_ACEOF
97bf5e38 18036#define HAVE_PSADDR_T 1
bec39cab 18037_ACEOF
c906108c 18038
97bf5e38 18039 fi
b4e70030
JB
18040 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
18041echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psaddr_t" >&6
c906108c 18042
b4e70030
JB
18043 echo "$as_me:$LINENO: checking for prsysent_t in sys/procfs.h" >&5
18044echo $ECHO_N "checking for prsysent_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18045 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then
18046 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18047else
bec39cab
AC
18048 cat >conftest.$ac_ext <<_ACEOF
18049/* confdefs.h. */
18050_ACEOF
18051cat confdefs.h >>conftest.$ac_ext
18052cat >>conftest.$ac_ext <<_ACEOF
18053/* end confdefs.h. */
c906108c 18054
97bf5e38
MK
18055#define _SYSCALL32
18056#include <sys/procfs.h>
bec39cab
AC
18057int
18058main ()
18059{
97bf5e38 18060prsysent_t avar
bec39cab
AC
18061 ;
18062 return 0;
18063}
18064_ACEOF
18065rm -f conftest.$ac_objext
18066if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18067 (eval $ac_compile) 2>conftest.er1
18068 ac_status=$?
18069 grep -v '^ *+' conftest.er1 >conftest.err
18070 rm -f conftest.er1
18071 cat conftest.err >&5
18072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18073 (exit $ac_status); } &&
b4e70030
JB
18074 { ac_try='test -z "$ac_c_werror_flag"
18075 || test ! -s conftest.err'
bec39cab
AC
18076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18077 (eval $ac_try) 2>&5
18078 ac_status=$?
18079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18080 (exit $ac_status); }; } &&
18081 { ac_try='test -s conftest.$ac_objext'
18082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18083 (eval $ac_try) 2>&5
18084 ac_status=$?
18085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18086 (exit $ac_status); }; }; then
97bf5e38 18087 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 18088else
bec39cab
AC
18089 echo "$as_me: failed program was:" >&5
18090sed 's/^/| /' conftest.$ac_ext >&5
18091
b4e70030 18092bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 18093
c906108c 18094fi
bec39cab 18095rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18096fi
18097
97bf5e38 18098 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab
AC
18099
18100cat >>confdefs.h <<\_ACEOF
97bf5e38 18101#define HAVE_PRSYSENT_T 1
bec39cab 18102_ACEOF
c906108c 18103
97bf5e38 18104 fi
b4e70030
JB
18105 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
18106echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prsysent_t" >&6
c906108c 18107
b4e70030
JB
18108 echo "$as_me:$LINENO: checking for pr_sigset_t in sys/procfs.h" >&5
18109echo $ECHO_N "checking for pr_sigset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18110 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then
18111 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18112else
bec39cab
AC
18113 cat >conftest.$ac_ext <<_ACEOF
18114/* confdefs.h. */
18115_ACEOF
18116cat confdefs.h >>conftest.$ac_ext
18117cat >>conftest.$ac_ext <<_ACEOF
18118/* end confdefs.h. */
c906108c 18119
97bf5e38
MK
18120#define _SYSCALL32
18121#include <sys/procfs.h>
bec39cab
AC
18122int
18123main ()
18124{
97bf5e38 18125pr_sigset_t avar
bec39cab
AC
18126 ;
18127 return 0;
18128}
18129_ACEOF
18130rm -f conftest.$ac_objext
18131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18132 (eval $ac_compile) 2>conftest.er1
18133 ac_status=$?
18134 grep -v '^ *+' conftest.er1 >conftest.err
18135 rm -f conftest.er1
18136 cat conftest.err >&5
18137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18138 (exit $ac_status); } &&
b4e70030
JB
18139 { ac_try='test -z "$ac_c_werror_flag"
18140 || test ! -s conftest.err'
bec39cab
AC
18141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18142 (eval $ac_try) 2>&5
18143 ac_status=$?
18144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18145 (exit $ac_status); }; } &&
18146 { ac_try='test -s conftest.$ac_objext'
18147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18148 (eval $ac_try) 2>&5
18149 ac_status=$?
18150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18151 (exit $ac_status); }; }; then
97bf5e38 18152 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 18153else
bec39cab
AC
18154 echo "$as_me: failed program was:" >&5
18155sed 's/^/| /' conftest.$ac_ext >&5
18156
b4e70030 18157bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 18158
c906108c 18159fi
bec39cab 18160rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18161fi
18162
97bf5e38 18163 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab
AC
18164
18165cat >>confdefs.h <<\_ACEOF
97bf5e38 18166#define HAVE_PR_SIGSET_T 1
bec39cab 18167_ACEOF
c906108c 18168
97bf5e38 18169 fi
b4e70030
JB
18170 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
18171echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6
c906108c 18172
b4e70030
JB
18173 echo "$as_me:$LINENO: checking for pr_sigaction64_t in sys/procfs.h" >&5
18174echo $ECHO_N "checking for pr_sigaction64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18175 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then
18176 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18177else
bec39cab
AC
18178 cat >conftest.$ac_ext <<_ACEOF
18179/* confdefs.h. */
18180_ACEOF
18181cat confdefs.h >>conftest.$ac_ext
18182cat >>conftest.$ac_ext <<_ACEOF
18183/* end confdefs.h. */
c906108c 18184
97bf5e38
MK
18185#define _SYSCALL32
18186#include <sys/procfs.h>
bec39cab
AC
18187int
18188main ()
18189{
97bf5e38 18190pr_sigaction64_t avar
bec39cab
AC
18191 ;
18192 return 0;
18193}
18194_ACEOF
18195rm -f conftest.$ac_objext
18196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18197 (eval $ac_compile) 2>conftest.er1
18198 ac_status=$?
18199 grep -v '^ *+' conftest.er1 >conftest.err
18200 rm -f conftest.er1
18201 cat conftest.err >&5
18202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18203 (exit $ac_status); } &&
b4e70030
JB
18204 { ac_try='test -z "$ac_c_werror_flag"
18205 || test ! -s conftest.err'
bec39cab
AC
18206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18207 (eval $ac_try) 2>&5
18208 ac_status=$?
18209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18210 (exit $ac_status); }; } &&
18211 { ac_try='test -s conftest.$ac_objext'
18212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18213 (eval $ac_try) 2>&5
18214 ac_status=$?
18215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18216 (exit $ac_status); }; }; then
97bf5e38 18217 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 18218else
bec39cab
AC
18219 echo "$as_me: failed program was:" >&5
18220sed 's/^/| /' conftest.$ac_ext >&5
18221
b4e70030 18222bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 18223
c906108c 18224fi
bec39cab 18225rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18226fi
18227
97bf5e38 18228 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab
AC
18229
18230cat >>confdefs.h <<\_ACEOF
97bf5e38 18231#define HAVE_PR_SIGACTION64_T 1
bec39cab 18232_ACEOF
c906108c 18233
97bf5e38 18234 fi
b4e70030
JB
18235 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
18236echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6
97bf5e38 18237
b4e70030
JB
18238 echo "$as_me:$LINENO: checking for pr_siginfo64_t in sys/procfs.h" >&5
18239echo $ECHO_N "checking for pr_siginfo64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18240 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then
18241 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18242else
bec39cab
AC
18243 cat >conftest.$ac_ext <<_ACEOF
18244/* confdefs.h. */
18245_ACEOF
18246cat confdefs.h >>conftest.$ac_ext
18247cat >>conftest.$ac_ext <<_ACEOF
18248/* end confdefs.h. */
97bf5e38
MK
18249
18250#define _SYSCALL32
18251#include <sys/procfs.h>
bec39cab
AC
18252int
18253main ()
18254{
97bf5e38 18255pr_siginfo64_t avar
bec39cab
AC
18256 ;
18257 return 0;
18258}
18259_ACEOF
18260rm -f conftest.$ac_objext
18261if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18262 (eval $ac_compile) 2>conftest.er1
18263 ac_status=$?
18264 grep -v '^ *+' conftest.er1 >conftest.err
18265 rm -f conftest.er1
18266 cat conftest.err >&5
18267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18268 (exit $ac_status); } &&
b4e70030
JB
18269 { ac_try='test -z "$ac_c_werror_flag"
18270 || test ! -s conftest.err'
bec39cab
AC
18271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18272 (eval $ac_try) 2>&5
18273 ac_status=$?
18274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18275 (exit $ac_status); }; } &&
18276 { ac_try='test -s conftest.$ac_objext'
18277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18278 (eval $ac_try) 2>&5
18279 ac_status=$?
18280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18281 (exit $ac_status); }; }; then
97bf5e38
MK
18282 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
18283else
bec39cab
AC
18284 echo "$as_me: failed program was:" >&5
18285sed 's/^/| /' conftest.$ac_ext >&5
18286
b4e70030 18287bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 18288
97bf5e38 18289fi
bec39cab 18290rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18291fi
c906108c 18292
97bf5e38 18293 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab
AC
18294
18295cat >>confdefs.h <<\_ACEOF
97bf5e38 18296#define HAVE_PR_SIGINFO64_T 1
bec39cab 18297_ACEOF
c906108c 18298
97bf5e38 18299 fi
b4e70030
JB
18300 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
18301echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6
bec39cab
AC
18302
18303
97bf5e38
MK
18304
18305
18306
97bf5e38 18307 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
b4e70030
JB
18308 echo "$as_me:$LINENO: checking whether prfpregset_t type is broken" >&5
18309echo $ECHO_N "checking whether prfpregset_t type is broken... $ECHO_C" >&6
bec39cab
AC
18310 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then
18311 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
18312else
18313 if test "$cross_compiling" = yes; then
97bf5e38 18314 gdb_cv_prfpregset_t_broken=yes
c906108c 18315else
bec39cab
AC
18316 cat >conftest.$ac_ext <<_ACEOF
18317/* confdefs.h. */
18318_ACEOF
18319cat confdefs.h >>conftest.$ac_ext
18320cat >>conftest.$ac_ext <<_ACEOF
18321/* end confdefs.h. */
97bf5e38
MK
18322#include <sys/procfs.h>
18323 int main ()
18324 {
18325 if (sizeof (prfpregset_t) == sizeof (void *))
18326 return 1;
18327 return 0;
18328 }
bec39cab
AC
18329_ACEOF
18330rm -f conftest$ac_exeext
18331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18332 (eval $ac_link) 2>&5
18333 ac_status=$?
18334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18335 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18337 (eval $ac_try) 2>&5
18338 ac_status=$?
18339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18340 (exit $ac_status); }; }; then
97bf5e38 18341 gdb_cv_prfpregset_t_broken=no
c906108c 18342else
bec39cab
AC
18343 echo "$as_me: program exited with status $ac_status" >&5
18344echo "$as_me: failed program was:" >&5
18345sed 's/^/| /' conftest.$ac_ext >&5
18346
18347( exit $ac_status )
18348gdb_cv_prfpregset_t_broken=yes
c906108c 18349fi
b4e70030 18350rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 18351fi
c906108c
SS
18352fi
18353
b4e70030
JB
18354 echo "$as_me:$LINENO: result: $gdb_cv_prfpregset_t_broken" >&5
18355echo "${ECHO_T}$gdb_cv_prfpregset_t_broken" >&6
97bf5e38 18356 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f
SE
18357
18358cat >>confdefs.h <<\_ACEOF
97bf5e38 18359#define PRFPREGSET_T_BROKEN 1
bec39cab 18360_ACEOF
c906108c 18361
97bf5e38
MK
18362 fi
18363 fi
c906108c 18364
bec39cab 18365
b4e70030
JB
18366 echo "$as_me:$LINENO: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
18367echo $ECHO_N "checking for PIOCSET ioctl entry in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18368 if test "${gdb_cv_have_procfs_piocset+set}" = set; then
18369 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18370else
bec39cab
AC
18371 cat >conftest.$ac_ext <<_ACEOF
18372/* confdefs.h. */
18373_ACEOF
18374cat confdefs.h >>conftest.$ac_ext
18375cat >>conftest.$ac_ext <<_ACEOF
18376/* end confdefs.h. */
97bf5e38
MK
18377#include <unistd.h>
18378#include <sys/types.h>
18379#include <sys/procfs.h>
18380
bec39cab
AC
18381int
18382main ()
18383{
97bf5e38
MK
18384
18385 int dummy;;
18386 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
18387
18388 ;
18389 return 0;
18390}
18391_ACEOF
18392rm -f conftest.$ac_objext
18393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18394 (eval $ac_compile) 2>conftest.er1
18395 ac_status=$?
18396 grep -v '^ *+' conftest.er1 >conftest.err
18397 rm -f conftest.er1
18398 cat conftest.err >&5
18399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18400 (exit $ac_status); } &&
b4e70030
JB
18401 { ac_try='test -z "$ac_c_werror_flag"
18402 || test ! -s conftest.err'
bec39cab
AC
18403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18404 (eval $ac_try) 2>&5
18405 ac_status=$?
18406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18407 (exit $ac_status); }; } &&
18408 { ac_try='test -s conftest.$ac_objext'
18409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18410 (eval $ac_try) 2>&5
18411 ac_status=$?
18412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18413 (exit $ac_status); }; }; then
97bf5e38 18414 gdb_cv_have_procfs_piocset=yes
c906108c 18415else
bec39cab
AC
18416 echo "$as_me: failed program was:" >&5
18417sed 's/^/| /' conftest.$ac_ext >&5
18418
b4e70030 18419gdb_cv_have_procfs_piocset=no
c906108c 18420fi
bec39cab 18421rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18422fi
97bf5e38 18423
b4e70030
JB
18424 echo "$as_me:$LINENO: result: $gdb_cv_have_procfs_piocset" >&5
18425echo "${ECHO_T}$gdb_cv_have_procfs_piocset" >&6
97bf5e38 18426 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f
SE
18427
18428cat >>confdefs.h <<\_ACEOF
97bf5e38 18429#define HAVE_PROCFS_PIOCSET 1
bec39cab 18430_ACEOF
97bf5e38
MK
18431
18432 fi
c906108c 18433fi
c906108c 18434
97bf5e38 18435if test ${host} = ${target} ; then
bec39cab 18436
b4e70030
JB
18437 echo "$as_me:$LINENO: checking for member l_addr in struct link_map" >&5
18438echo $ECHO_N "checking for member l_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
18439 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then
18440 echo $ECHO_N "(cached) $ECHO_C" >&6
18441else
18442 cat >conftest.$ac_ext <<_ACEOF
18443/* confdefs.h. */
18444_ACEOF
18445cat confdefs.h >>conftest.$ac_ext
18446cat >>conftest.$ac_ext <<_ACEOF
18447/* end confdefs.h. */
97bf5e38 18448#include <link.h>
bec39cab
AC
18449int
18450main ()
18451{
97bf5e38 18452struct link_map lm; (void) lm.l_addr;
bec39cab
AC
18453 ;
18454 return 0;
18455}
18456_ACEOF
18457rm -f conftest.$ac_objext
18458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18459 (eval $ac_compile) 2>conftest.er1
18460 ac_status=$?
18461 grep -v '^ *+' conftest.er1 >conftest.err
18462 rm -f conftest.er1
18463 cat conftest.err >&5
18464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18465 (exit $ac_status); } &&
b4e70030
JB
18466 { ac_try='test -z "$ac_c_werror_flag"
18467 || test ! -s conftest.err'
bec39cab
AC
18468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18469 (eval $ac_try) 2>&5
18470 ac_status=$?
18471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18472 (exit $ac_status); }; } &&
18473 { ac_try='test -s conftest.$ac_objext'
18474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18475 (eval $ac_try) 2>&5
18476 ac_status=$?
18477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18478 (exit $ac_status); }; }; then
97bf5e38 18479 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 18480else
bec39cab
AC
18481 echo "$as_me: failed program was:" >&5
18482sed 's/^/| /' conftest.$ac_ext >&5
18483
b4e70030 18484gdb_cv_have_struct_link_map_with_l_members=no
c906108c 18485fi
bec39cab 18486rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18487fi
18488
b4e70030
JB
18489 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
18490echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_l_members" >&6
97bf5e38 18491 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f
SE
18492
18493cat >>confdefs.h <<\_ACEOF
97bf5e38 18494#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
bec39cab 18495_ACEOF
97bf5e38
MK
18496
18497 fi
18498
bec39cab 18499
b4e70030
JB
18500 echo "$as_me:$LINENO: checking for member lm_addr in struct link_map" >&5
18501echo $ECHO_N "checking for member lm_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
18502 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then
18503 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18504else
bec39cab
AC
18505 cat >conftest.$ac_ext <<_ACEOF
18506/* confdefs.h. */
18507_ACEOF
18508cat confdefs.h >>conftest.$ac_ext
18509cat >>conftest.$ac_ext <<_ACEOF
18510/* end confdefs.h. */
97bf5e38
MK
18511#include <sys/types.h>
18512#include <link.h>
bec39cab
AC
18513int
18514main ()
18515{
97bf5e38 18516struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
18517 ;
18518 return 0;
18519}
18520_ACEOF
18521rm -f conftest.$ac_objext
18522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18523 (eval $ac_compile) 2>conftest.er1
18524 ac_status=$?
18525 grep -v '^ *+' conftest.er1 >conftest.err
18526 rm -f conftest.er1
18527 cat conftest.err >&5
18528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18529 (exit $ac_status); } &&
b4e70030
JB
18530 { ac_try='test -z "$ac_c_werror_flag"
18531 || test ! -s conftest.err'
bec39cab
AC
18532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18533 (eval $ac_try) 2>&5
18534 ac_status=$?
18535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18536 (exit $ac_status); }; } &&
18537 { ac_try='test -s conftest.$ac_objext'
18538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18539 (eval $ac_try) 2>&5
18540 ac_status=$?
18541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18542 (exit $ac_status); }; }; then
97bf5e38
MK
18543 gdb_cv_have_struct_link_map_with_lm_members=yes
18544else
bec39cab
AC
18545 echo "$as_me: failed program was:" >&5
18546sed 's/^/| /' conftest.$ac_ext >&5
18547
b4e70030 18548gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 18549fi
bec39cab 18550rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18551fi
c906108c 18552
b4e70030
JB
18553 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
18554echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_lm_members" >&6
97bf5e38 18555 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f
SE
18556
18557cat >>confdefs.h <<\_ACEOF
97bf5e38 18558#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
bec39cab 18559_ACEOF
97bf5e38
MK
18560
18561 fi
18562
bec39cab 18563
b4e70030
JB
18564 echo "$as_me:$LINENO: checking for member som_addr in struct so_map" >&5
18565echo $ECHO_N "checking for member som_addr in struct so_map... $ECHO_C" >&6
bec39cab
AC
18566 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then
18567 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18568else
bec39cab
AC
18569 cat >conftest.$ac_ext <<_ACEOF
18570/* confdefs.h. */
18571_ACEOF
18572cat confdefs.h >>conftest.$ac_ext
18573cat >>conftest.$ac_ext <<_ACEOF
18574/* end confdefs.h. */
97bf5e38
MK
18575#include <sys/types.h>
18576#ifdef HAVE_NLIST_H
18577#include <nlist.h>
18578#endif
18579#include <link.h>
bec39cab
AC
18580int
18581main ()
18582{
97bf5e38 18583struct so_map lm; (void) lm.som_addr;
bec39cab
AC
18584 ;
18585 return 0;
18586}
18587_ACEOF
18588rm -f conftest.$ac_objext
18589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18590 (eval $ac_compile) 2>conftest.er1
18591 ac_status=$?
18592 grep -v '^ *+' conftest.er1 >conftest.err
18593 rm -f conftest.er1
18594 cat conftest.err >&5
18595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18596 (exit $ac_status); } &&
b4e70030
JB
18597 { ac_try='test -z "$ac_c_werror_flag"
18598 || test ! -s conftest.err'
bec39cab
AC
18599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18600 (eval $ac_try) 2>&5
18601 ac_status=$?
18602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18603 (exit $ac_status); }; } &&
18604 { ac_try='test -s conftest.$ac_objext'
18605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18606 (eval $ac_try) 2>&5
18607 ac_status=$?
18608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18609 (exit $ac_status); }; }; then
97bf5e38
MK
18610 gdb_cv_have_struct_so_map_with_som_members=yes
18611else
bec39cab
AC
18612 echo "$as_me: failed program was:" >&5
18613sed 's/^/| /' conftest.$ac_ext >&5
18614
b4e70030 18615gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 18616fi
bec39cab 18617rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18618fi
c906108c 18619
b4e70030
JB
18620 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
18621echo "${ECHO_T}$gdb_cv_have_struct_so_map_with_som_members" >&6
97bf5e38 18622 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f
SE
18623
18624cat >>confdefs.h <<\_ACEOF
97bf5e38 18625#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
bec39cab 18626_ACEOF
c906108c 18627
97bf5e38 18628 fi
c906108c 18629
bec39cab 18630
b4e70030
JB
18631 echo "$as_me:$LINENO: checking for struct link_map32 in sys/link.h" >&5
18632echo $ECHO_N "checking for struct link_map32 in sys/link.h... $ECHO_C" >&6
bec39cab
AC
18633 if test "${gdb_cv_have_struct_link_map32+set}" = set; then
18634 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18635else
bec39cab
AC
18636 cat >conftest.$ac_ext <<_ACEOF
18637/* confdefs.h. */
18638_ACEOF
18639cat confdefs.h >>conftest.$ac_ext
18640cat >>conftest.$ac_ext <<_ACEOF
18641/* end confdefs.h. */
97bf5e38
MK
18642#define _SYSCALL32
18643#include <sys/link.h>
bec39cab
AC
18644int
18645main ()
18646{
97bf5e38 18647struct link_map32 l;
bec39cab
AC
18648 ;
18649 return 0;
18650}
18651_ACEOF
18652rm -f conftest.$ac_objext
18653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18654 (eval $ac_compile) 2>conftest.er1
18655 ac_status=$?
18656 grep -v '^ *+' conftest.er1 >conftest.err
18657 rm -f conftest.er1
18658 cat conftest.err >&5
18659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18660 (exit $ac_status); } &&
b4e70030
JB
18661 { ac_try='test -z "$ac_c_werror_flag"
18662 || test ! -s conftest.err'
bec39cab
AC
18663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18664 (eval $ac_try) 2>&5
18665 ac_status=$?
18666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18667 (exit $ac_status); }; } &&
18668 { ac_try='test -s conftest.$ac_objext'
18669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18670 (eval $ac_try) 2>&5
18671 ac_status=$?
18672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18673 (exit $ac_status); }; }; then
97bf5e38
MK
18674 gdb_cv_have_struct_link_map32=yes
18675else
bec39cab
AC
18676 echo "$as_me: failed program was:" >&5
18677sed 's/^/| /' conftest.$ac_ext >&5
18678
b4e70030 18679gdb_cv_have_struct_link_map32=no
97bf5e38 18680fi
bec39cab 18681rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18682fi
c906108c 18683
b4e70030
JB
18684 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map32" >&5
18685echo "${ECHO_T}$gdb_cv_have_struct_link_map32" >&6
97bf5e38 18686 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f
SE
18687
18688cat >>confdefs.h <<\_ACEOF
97bf5e38 18689#define HAVE_STRUCT_LINK_MAP32 1
bec39cab 18690_ACEOF
c906108c 18691
60ca704f
SE
18692
18693cat >>confdefs.h <<\_ACEOF
97bf5e38 18694#define _SYSCALL32 1
bec39cab 18695_ACEOF
c906108c 18696
97bf5e38
MK
18697 fi
18698fi
c906108c 18699
bc8bcb4b 18700# Check if the compiler supports the `long long' type.
c906108c 18701
b4e70030
JB
18702echo "$as_me:$LINENO: checking for long long support in compiler" >&5
18703echo $ECHO_N "checking for long long support in compiler... $ECHO_C" >&6
bec39cab
AC
18704if test "${gdb_cv_c_long_long+set}" = set; then
18705 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18706else
bec39cab
AC
18707 cat >conftest.$ac_ext <<_ACEOF
18708/* confdefs.h. */
18709_ACEOF
18710cat confdefs.h >>conftest.$ac_ext
18711cat >>conftest.$ac_ext <<_ACEOF
18712/* end confdefs.h. */
bc8bcb4b 18713extern long long foo;
bec39cab
AC
18714int
18715main ()
18716{
bc8bcb4b 18717switch (foo & 2) { case 0: return 1; }
bec39cab
AC
18718 ;
18719 return 0;
18720}
18721_ACEOF
18722rm -f conftest.$ac_objext
18723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18724 (eval $ac_compile) 2>conftest.er1
18725 ac_status=$?
18726 grep -v '^ *+' conftest.er1 >conftest.err
18727 rm -f conftest.er1
18728 cat conftest.err >&5
18729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18730 (exit $ac_status); } &&
b4e70030
JB
18731 { ac_try='test -z "$ac_c_werror_flag"
18732 || test ! -s conftest.err'
bec39cab
AC
18733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18734 (eval $ac_try) 2>&5
18735 ac_status=$?
18736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18737 (exit $ac_status); }; } &&
18738 { ac_try='test -s conftest.$ac_objext'
18739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18740 (eval $ac_try) 2>&5
18741 ac_status=$?
18742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18743 (exit $ac_status); }; }; then
97bf5e38
MK
18744 gdb_cv_c_long_long=yes
18745else
bec39cab
AC
18746 echo "$as_me: failed program was:" >&5
18747sed 's/^/| /' conftest.$ac_ext >&5
18748
b4e70030 18749gdb_cv_c_long_long=no
97bf5e38 18750fi
bec39cab 18751rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18752fi
b4e70030
JB
18753echo "$as_me:$LINENO: result: $gdb_cv_c_long_long" >&5
18754echo "${ECHO_T}$gdb_cv_c_long_long" >&6
97bf5e38 18755if test $gdb_cv_c_long_long = yes; then
bc8bcb4b
MK
18756
18757cat >>confdefs.h <<\_ACEOF
97bf5e38 18758#define CC_HAS_LONG_LONG 1
bec39cab 18759_ACEOF
97bf5e38
MK
18760
18761fi
18762
bc8bcb4b 18763# Check if the compiler and runtime support printing long longs.
97bf5e38 18764
b4e70030
JB
18765echo "$as_me:$LINENO: checking for long long support in printf" >&5
18766echo $ECHO_N "checking for long long support in printf... $ECHO_C" >&6
bec39cab
AC
18767if test "${gdb_cv_printf_has_long_long+set}" = set; then
18768 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18769else
18770 if test "$cross_compiling" = yes; then
18771 gdb_cv_printf_has_long_long=no
18772else
bec39cab
AC
18773 cat >conftest.$ac_ext <<_ACEOF
18774/* confdefs.h. */
18775_ACEOF
18776cat confdefs.h >>conftest.$ac_ext
18777cat >>conftest.$ac_ext <<_ACEOF
18778/* end confdefs.h. */
bc8bcb4b
MK
18779$ac_includes_default
18780int
18781main ()
18782{
18783char buf[32];
97bf5e38
MK
18784 long long l = 0;
18785 l = (l << 16) + 0x0123;
18786 l = (l << 16) + 0x4567;
18787 l = (l << 16) + 0x89ab;
18788 l = (l << 16) + 0xcdef;
18789 sprintf (buf, "0x%016llx", l);
18790 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
18791 ;
18792 return 0;
c906108c 18793}
bec39cab
AC
18794_ACEOF
18795rm -f conftest$ac_exeext
18796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18797 (eval $ac_link) 2>&5
18798 ac_status=$?
18799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18802 (eval $ac_try) 2>&5
18803 ac_status=$?
18804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18805 (exit $ac_status); }; }; then
97bf5e38
MK
18806 gdb_cv_printf_has_long_long=yes
18807else
bec39cab
AC
18808 echo "$as_me: program exited with status $ac_status" >&5
18809echo "$as_me: failed program was:" >&5
18810sed 's/^/| /' conftest.$ac_ext >&5
18811
18812( exit $ac_status )
18813gdb_cv_printf_has_long_long=no
97bf5e38 18814fi
b4e70030 18815rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 18816fi
97bf5e38 18817fi
b4e70030
JB
18818echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_long" >&5
18819echo "${ECHO_T}$gdb_cv_printf_has_long_long" >&6
97bf5e38 18820if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b
MK
18821
18822cat >>confdefs.h <<\_ACEOF
97bf5e38 18823#define PRINTF_HAS_LONG_LONG 1
bec39cab 18824_ACEOF
97bf5e38
MK
18825
18826fi
97bf5e38 18827
1a619819
LM
18828# Check if the compiler and runtime support printing decfloats.
18829
18830echo "$as_me:$LINENO: checking for decfloat support in printf" >&5
18831echo $ECHO_N "checking for decfloat support in printf... $ECHO_C" >&6
18832if test "${gdb_cv_printf_has_decfloat+set}" = set; then
18833 echo $ECHO_N "(cached) $ECHO_C" >&6
18834else
18835 if test "$cross_compiling" = yes; then
18836 gdb_cv_printf_has_decfloat=no
18837else
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. */
18844$ac_includes_default
18845int
18846main ()
18847{
18848char buf[64];
18849 _Decimal32 d32 = 1.2345df;
18850 _Decimal64 d64 = 1.2345dd;
18851 _Decimal128 d128 = 1.2345dl;
18852 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
18853 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
18854 ;
18855 return 0;
18856}
18857_ACEOF
18858rm -f conftest$ac_exeext
18859if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18860 (eval $ac_link) 2>&5
18861 ac_status=$?
18862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18863 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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); }; }; then
18869 gdb_cv_printf_has_decfloat=yes
18870else
18871 echo "$as_me: program exited with status $ac_status" >&5
18872echo "$as_me: failed program was:" >&5
18873sed 's/^/| /' conftest.$ac_ext >&5
18874
18875( exit $ac_status )
18876gdb_cv_printf_has_decfloat=no
18877fi
18878rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18879fi
18880fi
18881echo "$as_me:$LINENO: result: $gdb_cv_printf_has_decfloat" >&5
18882echo "${ECHO_T}$gdb_cv_printf_has_decfloat" >&6
18883if test $gdb_cv_printf_has_decfloat = yes; then
18884
18885cat >>confdefs.h <<\_ACEOF
18886#define PRINTF_HAS_DECFLOAT 1
18887_ACEOF
18888
18889fi
18890
bc8bcb4b
MK
18891# Check if the compiler supports the `long double' type. We can't use
18892# AC_C_LONG_DOUBLE because that one does additional checks on the
18893# constants defined in <float.h> that fail on some systems,
18894# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 18895
b4e70030
JB
18896echo "$as_me:$LINENO: checking for long double support in compiler" >&5
18897echo $ECHO_N "checking for long double support in compiler... $ECHO_C" >&6
bc8bcb4b 18898if test "${gdb_cv_c_long_double+set}" = set; then
bec39cab 18899 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18900else
bec39cab
AC
18901 cat >conftest.$ac_ext <<_ACEOF
18902/* confdefs.h. */
18903_ACEOF
18904cat confdefs.h >>conftest.$ac_ext
18905cat >>conftest.$ac_ext <<_ACEOF
18906/* end confdefs.h. */
97bf5e38 18907long double foo;
bec39cab
AC
18908_ACEOF
18909rm -f conftest.$ac_objext
18910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18911 (eval $ac_compile) 2>conftest.er1
18912 ac_status=$?
18913 grep -v '^ *+' conftest.er1 >conftest.err
18914 rm -f conftest.er1
18915 cat conftest.err >&5
18916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18917 (exit $ac_status); } &&
b4e70030
JB
18918 { ac_try='test -z "$ac_c_werror_flag"
18919 || test ! -s conftest.err'
bec39cab
AC
18920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18921 (eval $ac_try) 2>&5
18922 ac_status=$?
18923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18924 (exit $ac_status); }; } &&
18925 { ac_try='test -s conftest.$ac_objext'
18926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18927 (eval $ac_try) 2>&5
18928 ac_status=$?
18929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18930 (exit $ac_status); }; }; then
bc8bcb4b 18931 gdb_cv_c_long_double=yes
97bf5e38 18932else
bec39cab
AC
18933 echo "$as_me: failed program was:" >&5
18934sed 's/^/| /' conftest.$ac_ext >&5
18935
b4e70030 18936gdb_cv_c_long_double=no
97bf5e38 18937fi
bec39cab 18938rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18939fi
b4e70030
JB
18940echo "$as_me:$LINENO: result: $gdb_cv_c_long_double" >&5
18941echo "${ECHO_T}$gdb_cv_c_long_double" >&6
bc8bcb4b 18942if test $gdb_cv_c_long_double = yes; then
c906108c 18943
bc8bcb4b 18944cat >>confdefs.h <<\_ACEOF
97bf5e38 18945#define HAVE_LONG_DOUBLE 1
bec39cab 18946_ACEOF
97bf5e38
MK
18947
18948fi
18949
bc8bcb4b 18950# Check if the compiler and runtime support printing long doubles.
97bf5e38 18951
b4e70030
JB
18952echo "$as_me:$LINENO: checking for long double support in printf" >&5
18953echo $ECHO_N "checking for long double support in printf... $ECHO_C" >&6
bec39cab
AC
18954if test "${gdb_cv_printf_has_long_double+set}" = set; then
18955 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18956else
18957 if test "$cross_compiling" = yes; then
18958 gdb_cv_printf_has_long_double=no
18959else
bec39cab
AC
18960 cat >conftest.$ac_ext <<_ACEOF
18961/* confdefs.h. */
18962_ACEOF
18963cat confdefs.h >>conftest.$ac_ext
18964cat >>conftest.$ac_ext <<_ACEOF
18965/* end confdefs.h. */
bc8bcb4b
MK
18966$ac_includes_default
18967int
18968main ()
18969{
18970char buf[16];
97bf5e38
MK
18971 long double f = 3.141592653;
18972 sprintf (buf, "%Lg", f);
18973 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
18974 ;
18975 return 0;
97bf5e38 18976}
bec39cab
AC
18977_ACEOF
18978rm -f conftest$ac_exeext
18979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18980 (eval $ac_link) 2>&5
18981 ac_status=$?
18982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18983 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18985 (eval $ac_try) 2>&5
18986 ac_status=$?
18987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18988 (exit $ac_status); }; }; then
97bf5e38 18989 gdb_cv_printf_has_long_double=yes
c906108c 18990else
bec39cab
AC
18991 echo "$as_me: program exited with status $ac_status" >&5
18992echo "$as_me: failed program was:" >&5
18993sed 's/^/| /' conftest.$ac_ext >&5
18994
18995( exit $ac_status )
18996gdb_cv_printf_has_long_double=no
c906108c 18997fi
b4e70030 18998rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 18999fi
c906108c 19000fi
b4e70030
JB
19001echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_double" >&5
19002echo "${ECHO_T}$gdb_cv_printf_has_long_double" >&6
97bf5e38 19003if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b
MK
19004
19005cat >>confdefs.h <<\_ACEOF
97bf5e38 19006#define PRINTF_HAS_LONG_DOUBLE 1
bec39cab 19007_ACEOF
97bf5e38
MK
19008
19009fi
97bf5e38 19010
bc8bcb4b 19011# Check if the compiler and runtime support scanning long doubles.
97bf5e38 19012
b4e70030
JB
19013echo "$as_me:$LINENO: checking for long double support in scanf" >&5
19014echo $ECHO_N "checking for long double support in scanf... $ECHO_C" >&6
bec39cab
AC
19015if test "${gdb_cv_scanf_has_long_double+set}" = set; then
19016 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
19017else
19018 if test "$cross_compiling" = yes; then
19019 gdb_cv_scanf_has_long_double=no
19020else
bec39cab
AC
19021 cat >conftest.$ac_ext <<_ACEOF
19022/* confdefs.h. */
19023_ACEOF
19024cat confdefs.h >>conftest.$ac_ext
19025cat >>conftest.$ac_ext <<_ACEOF
19026/* end confdefs.h. */
bc8bcb4b
MK
19027#include <stdio.h>
19028int
19029main ()
19030{
19031char *buf = "3.141592653";
97bf5e38
MK
19032 long double f = 0;
19033 sscanf (buf, "%Lg", &f);
19034 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
19035 ;
19036 return 0;
97bf5e38 19037}
bec39cab
AC
19038_ACEOF
19039rm -f conftest$ac_exeext
19040if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19041 (eval $ac_link) 2>&5
19042 ac_status=$?
19043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19044 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19046 (eval $ac_try) 2>&5
19047 ac_status=$?
19048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19049 (exit $ac_status); }; }; then
97bf5e38
MK
19050 gdb_cv_scanf_has_long_double=yes
19051else
bec39cab
AC
19052 echo "$as_me: program exited with status $ac_status" >&5
19053echo "$as_me: failed program was:" >&5
19054sed 's/^/| /' conftest.$ac_ext >&5
19055
19056( exit $ac_status )
19057gdb_cv_scanf_has_long_double=no
97bf5e38 19058fi
b4e70030 19059rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 19060fi
c906108c 19061fi
b4e70030
JB
19062echo "$as_me:$LINENO: result: $gdb_cv_scanf_has_long_double" >&5
19063echo "${ECHO_T}$gdb_cv_scanf_has_long_double" >&6
97bf5e38 19064if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b
MK
19065
19066cat >>confdefs.h <<\_ACEOF
97bf5e38 19067#define SCANF_HAS_LONG_DOUBLE 1
bec39cab 19068_ACEOF
97bf5e38
MK
19069
19070fi
c906108c 19071
438013df
AO
19072case ${host_os} in
19073aix*)
b4e70030
JB
19074 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
19075echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
bec39cab
AC
19076if test "${gdb_cv_bigtoc+set}" = set; then
19077 echo $ECHO_N "(cached) $ECHO_C" >&6
438013df 19078else
bec39cab 19079
438013df
AO
19080 SAVE_LDFLAGS=$LDFLAGS
19081
19082 case $GCC in
19083 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
19084 *) gdb_cv_bigtoc=-bbigtoc ;;
19085 esac
19086
19087 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
bec39cab
AC
19088 cat >conftest.$ac_ext <<_ACEOF
19089/* confdefs.h. */
19090_ACEOF
19091cat confdefs.h >>conftest.$ac_ext
19092cat >>conftest.$ac_ext <<_ACEOF
19093/* end confdefs.h. */
438013df 19094
bec39cab
AC
19095int
19096main ()
19097{
438013df 19098int i;
bec39cab
AC
19099 ;
19100 return 0;
19101}
19102_ACEOF
19103rm -f conftest.$ac_objext conftest$ac_exeext
19104if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19105 (eval $ac_link) 2>conftest.er1
19106 ac_status=$?
19107 grep -v '^ *+' conftest.er1 >conftest.err
19108 rm -f conftest.er1
19109 cat conftest.err >&5
19110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19111 (exit $ac_status); } &&
b4e70030
JB
19112 { ac_try='test -z "$ac_c_werror_flag"
19113 || test ! -s conftest.err'
bec39cab
AC
19114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19115 (eval $ac_try) 2>&5
19116 ac_status=$?
19117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19118 (exit $ac_status); }; } &&
19119 { ac_try='test -s conftest$ac_exeext'
19120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19121 (eval $ac_try) 2>&5
19122 ac_status=$?
19123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19124 (exit $ac_status); }; }; then
438013df
AO
19125 :
19126else
bec39cab
AC
19127 echo "$as_me: failed program was:" >&5
19128sed 's/^/| /' conftest.$ac_ext >&5
19129
b4e70030 19130gdb_cv_bigtoc=
438013df 19131fi
bec39cab
AC
19132rm -f conftest.err conftest.$ac_objext \
19133 conftest$ac_exeext conftest.$ac_ext
ec76baa5 19134 LDFLAGS="${SAVE_LDFLAGS}"
438013df 19135
bec39cab 19136fi
b4e70030
JB
19137echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
19138echo "${ECHO_T}$gdb_cv_bigtoc" >&6
438013df
AO
19139 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
19140 ;;
19141esac
19142
c906108c
SS
19143
19144
19145if test ${build} = ${host} -a ${host} = ${target} ; then
19146 case ${host_os} in
19147 hpux*)
b4e70030
JB
19148 echo "$as_me:$LINENO: checking for HPUX/OSF thread support" >&5
19149echo $ECHO_N "checking for HPUX/OSF thread support... $ECHO_C" >&6
c906108c
SS
19150 if test -f /usr/include/dce/cma_config.h ; then
19151 if test "$GCC" = "yes" ; then
b4e70030
JB
19152 echo "$as_me:$LINENO: result: yes" >&5
19153echo "${ECHO_T}yes" >&6
60ca704f
SE
19154
19155cat >>confdefs.h <<\_ACEOF
c906108c 19156#define HAVE_HPUX_THREAD_SUPPORT 1
bec39cab 19157_ACEOF
c906108c 19158
3483b318 19159 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
19160 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
19161 else
b4e70030
JB
19162 echo "$as_me:$LINENO: result: no (suppressed because you are not using GCC)" >&5
19163echo "${ECHO_T}no (suppressed because you are not using GCC)" >&6
c906108c
SS
19164 fi
19165 else
b4e70030
JB
19166 echo "$as_me:$LINENO: result: no" >&5
19167echo "${ECHO_T}no" >&6
c906108c
SS
19168 fi
19169 ;;
19170 solaris*)
d92419e5
JB
19171 # See if thread_db library is around for Solaris thread debugging.
19172 # Note that we must explicitly test for version 1 of the library
19173 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
19174 # the same API.
b4e70030
JB
19175 echo "$as_me:$LINENO: checking for Solaris thread debugging library" >&5
19176echo $ECHO_N "checking for Solaris thread debugging library... $ECHO_C" >&6
c906108c 19177 if test -f /usr/lib/libthread_db.so.1 ; then
b4e70030
JB
19178 echo "$as_me:$LINENO: result: yes" >&5
19179echo "${ECHO_T}yes" >&6
60ca704f
SE
19180
19181cat >>confdefs.h <<\_ACEOF
c906108c 19182#define HAVE_THREAD_DB_LIB 1
bec39cab 19183_ACEOF
c906108c 19184
3483b318 19185 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 19186 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
bec39cab 19187
b4e70030
JB
19188echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19189echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
bec39cab
AC
19190if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19191 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19192else
bec39cab 19193 ac_check_lib_save_LIBS=$LIBS
c906108c 19194LIBS="-ldl $LIBS"
bec39cab
AC
19195cat >conftest.$ac_ext <<_ACEOF
19196/* confdefs.h. */
19197_ACEOF
19198cat confdefs.h >>conftest.$ac_ext
19199cat >>conftest.$ac_ext <<_ACEOF
19200/* end confdefs.h. */
19201
b4e70030 19202/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
19203#ifdef __cplusplus
19204extern "C"
19205#endif
b4e70030
JB
19206/* We use char because int might match the return type of a gcc2
19207 builtin and then its argument prototype would still apply. */
bec39cab
AC
19208char dlopen ();
19209int
19210main ()
19211{
b4e70030 19212dlopen ();
bec39cab
AC
19213 ;
19214 return 0;
19215}
19216_ACEOF
19217rm -f conftest.$ac_objext conftest$ac_exeext
19218if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19219 (eval $ac_link) 2>conftest.er1
19220 ac_status=$?
19221 grep -v '^ *+' conftest.er1 >conftest.err
19222 rm -f conftest.er1
19223 cat conftest.err >&5
19224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19225 (exit $ac_status); } &&
b4e70030
JB
19226 { ac_try='test -z "$ac_c_werror_flag"
19227 || test ! -s conftest.err'
bec39cab
AC
19228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19229 (eval $ac_try) 2>&5
19230 ac_status=$?
19231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19232 (exit $ac_status); }; } &&
19233 { ac_try='test -s conftest$ac_exeext'
19234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19235 (eval $ac_try) 2>&5
19236 ac_status=$?
19237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19238 (exit $ac_status); }; }; then
19239 ac_cv_lib_dl_dlopen=yes
19240else
19241 echo "$as_me: failed program was:" >&5
19242sed 's/^/| /' conftest.$ac_ext >&5
19243
b4e70030 19244ac_cv_lib_dl_dlopen=no
bec39cab
AC
19245fi
19246rm -f conftest.err conftest.$ac_objext \
19247 conftest$ac_exeext conftest.$ac_ext
19248LIBS=$ac_check_lib_save_LIBS
19249fi
b4e70030
JB
19250echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19251echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
bec39cab
AC
19252if test $ac_cv_lib_dl_dlopen = yes; then
19253 cat >>confdefs.h <<_ACEOF
19254#define HAVE_LIBDL 1
19255_ACEOF
c906108c
SS
19256
19257 LIBS="-ldl $LIBS"
19258
c906108c
SS
19259fi
19260
19261 if test "$GCC" = "yes" ; then
19262 # The GNU linker requires the -export-dynamic option to make
19263 # all symbols visible in the dynamic symbol table.
19264 hold_ldflags=$LDFLAGS
b4e70030
JB
19265 echo "$as_me:$LINENO: checking for the ld -export-dynamic flag" >&5
19266echo $ECHO_N "checking for the ld -export-dynamic flag... $ECHO_C" >&6
c906108c 19267 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
bec39cab
AC
19268 cat >conftest.$ac_ext <<_ACEOF
19269/* confdefs.h. */
19270_ACEOF
19271cat confdefs.h >>conftest.$ac_ext
19272cat >>conftest.$ac_ext <<_ACEOF
19273/* end confdefs.h. */
c906108c 19274
bec39cab
AC
19275int
19276main ()
19277{
c906108c 19278int i;
bec39cab
AC
19279 ;
19280 return 0;
19281}
19282_ACEOF
19283rm -f conftest.$ac_objext conftest$ac_exeext
19284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19285 (eval $ac_link) 2>conftest.er1
19286 ac_status=$?
19287 grep -v '^ *+' conftest.er1 >conftest.err
19288 rm -f conftest.er1
19289 cat conftest.err >&5
19290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19291 (exit $ac_status); } &&
b4e70030
JB
19292 { ac_try='test -z "$ac_c_werror_flag"
19293 || test ! -s conftest.err'
bec39cab
AC
19294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19295 (eval $ac_try) 2>&5
19296 ac_status=$?
19297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19298 (exit $ac_status); }; } &&
19299 { ac_try='test -s conftest$ac_exeext'
19300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19301 (eval $ac_try) 2>&5
19302 ac_status=$?
19303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19304 (exit $ac_status); }; }; then
c906108c
SS
19305 found=yes
19306else
bec39cab
AC
19307 echo "$as_me: failed program was:" >&5
19308sed 's/^/| /' conftest.$ac_ext >&5
19309
b4e70030 19310found=no
c906108c 19311fi
bec39cab
AC
19312rm -f conftest.err conftest.$ac_objext \
19313 conftest$ac_exeext conftest.$ac_ext
c906108c 19314 LDFLAGS=$hold_ldflags
b4e70030
JB
19315 echo "$as_me:$LINENO: result: $found" >&5
19316echo "${ECHO_T}$found" >&6
c906108c
SS
19317 if test $found = yes; then
19318 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
19319 fi
19320 fi
19321 # Sun randomly tweaked the prototypes in <proc_service.h>
19322 # at one point.
b4e70030
JB
19323 echo "$as_me:$LINENO: checking if <proc_service.h> is old" >&5
19324echo $ECHO_N "checking if <proc_service.h> is old... $ECHO_C" >&6
bec39cab
AC
19325 if test "${gdb_cv_proc_service_is_old+set}" = set; then
19326 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19327else
bec39cab
AC
19328
19329 cat >conftest.$ac_ext <<_ACEOF
19330/* confdefs.h. */
19331_ACEOF
19332cat confdefs.h >>conftest.$ac_ext
19333cat >>conftest.$ac_ext <<_ACEOF
19334/* end confdefs.h. */
c906108c
SS
19335
19336 #include <proc_service.h>
19337 ps_err_e ps_pdwrite
19338 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 19339
bec39cab
AC
19340int
19341main ()
19342{
19343
19344 ;
19345 return 0;
19346}
19347_ACEOF
19348rm -f conftest.$ac_objext
19349if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19350 (eval $ac_compile) 2>conftest.er1
19351 ac_status=$?
19352 grep -v '^ *+' conftest.er1 >conftest.err
19353 rm -f conftest.er1
19354 cat conftest.err >&5
19355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19356 (exit $ac_status); } &&
b4e70030
JB
19357 { ac_try='test -z "$ac_c_werror_flag"
19358 || test ! -s conftest.err'
bec39cab
AC
19359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19360 (eval $ac_try) 2>&5
19361 ac_status=$?
19362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19363 (exit $ac_status); }; } &&
19364 { ac_try='test -s conftest.$ac_objext'
19365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19366 (eval $ac_try) 2>&5
19367 ac_status=$?
19368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19369 (exit $ac_status); }; }; then
c906108c
SS
19370 gdb_cv_proc_service_is_old=no
19371else
bec39cab
AC
19372 echo "$as_me: failed program was:" >&5
19373sed 's/^/| /' conftest.$ac_ext >&5
19374
b4e70030 19375gdb_cv_proc_service_is_old=yes
c906108c 19376fi
bec39cab
AC
19377rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19378
c906108c
SS
19379fi
19380
b4e70030
JB
19381 echo "$as_me:$LINENO: result: $gdb_cv_proc_service_is_old" >&5
19382echo "${ECHO_T}$gdb_cv_proc_service_is_old" >&6
c906108c 19383 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f
SE
19384
19385cat >>confdefs.h <<\_ACEOF
c906108c 19386#define PROC_SERVICE_IS_OLD 1
bec39cab 19387_ACEOF
c906108c
SS
19388
19389 fi
19390 else
b4e70030
JB
19391 echo "$as_me:$LINENO: result: no" >&5
19392echo "${ECHO_T}no" >&6
c906108c
SS
19393 fi
19394 ;;
d92419e5 19395 aix*)
b4e70030
JB
19396 echo "$as_me:$LINENO: checking for AiX thread debugging library" >&5
19397echo $ECHO_N "checking for AiX thread debugging library... $ECHO_C" >&6
bec39cab
AC
19398 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then
19399 echo $ECHO_N "(cached) $ECHO_C" >&6
19400else
19401 cat >conftest.$ac_ext <<_ACEOF
19402/* confdefs.h. */
19403_ACEOF
19404cat confdefs.h >>conftest.$ac_ext
19405cat >>conftest.$ac_ext <<_ACEOF
19406/* end confdefs.h. */
d92419e5 19407#include <sys/pthdebug.h>
bec39cab
AC
19408int
19409main ()
19410{
d92419e5
JB
19411#ifndef PTHDB_VERSION_3
19412 #error
19413 #endif
bec39cab
AC
19414 ;
19415 return 0;
19416}
19417_ACEOF
19418rm -f conftest.$ac_objext
19419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19420 (eval $ac_compile) 2>conftest.er1
19421 ac_status=$?
19422 grep -v '^ *+' conftest.er1 >conftest.err
19423 rm -f conftest.er1
19424 cat conftest.err >&5
19425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19426 (exit $ac_status); } &&
b4e70030
JB
19427 { ac_try='test -z "$ac_c_werror_flag"
19428 || test ! -s conftest.err'
bec39cab
AC
19429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19430 (eval $ac_try) 2>&5
19431 ac_status=$?
19432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19433 (exit $ac_status); }; } &&
19434 { ac_try='test -s conftest.$ac_objext'
19435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19436 (eval $ac_try) 2>&5
19437 ac_status=$?
19438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19439 (exit $ac_status); }; }; then
d92419e5
JB
19440 gdb_cv_have_aix_thread_debug=yes
19441else
bec39cab
AC
19442 echo "$as_me: failed program was:" >&5
19443sed 's/^/| /' conftest.$ac_ext >&5
19444
b4e70030 19445gdb_cv_have_aix_thread_debug=no
d92419e5 19446fi
bec39cab 19447rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
19448fi
19449
b4e70030
JB
19450 echo "$as_me:$LINENO: result: $gdb_cv_have_aix_thread_debug" >&5
19451echo "${ECHO_T}$gdb_cv_have_aix_thread_debug" >&6
d92419e5
JB
19452 if test $gdb_cv_have_aix_thread_debug = yes; then
19453 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 19454 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
19455 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
19456 fi
19457 ;;
c906108c 19458 esac
bec39cab 19459
c906108c
SS
19460fi
19461
3f47be5c 19462if test "x$ac_cv_header_thread_db_h" = "xyes"; then
b4e70030
JB
19463 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTALLOC" >&5
19464echo $ECHO_N "checking whether <thread_db.h> has TD_NOTALLOC... $ECHO_C" >&6
bec39cab
AC
19465if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then
19466 echo $ECHO_N "(cached) $ECHO_C" >&6
19467else
19468 cat >conftest.$ac_ext <<_ACEOF
19469/* confdefs.h. */
19470_ACEOF
19471cat confdefs.h >>conftest.$ac_ext
19472cat >>conftest.$ac_ext <<_ACEOF
19473/* end confdefs.h. */
3f47be5c 19474#include <thread_db.h>
bec39cab
AC
19475int
19476main ()
19477{
3f47be5c 19478int i = TD_NOTALLOC;
bec39cab
AC
19479 ;
19480 return 0;
19481}
19482_ACEOF
19483rm -f conftest.$ac_objext
19484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19485 (eval $ac_compile) 2>conftest.er1
19486 ac_status=$?
19487 grep -v '^ *+' conftest.er1 >conftest.err
19488 rm -f conftest.er1
19489 cat conftest.err >&5
19490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19491 (exit $ac_status); } &&
b4e70030
JB
19492 { ac_try='test -z "$ac_c_werror_flag"
19493 || test ! -s conftest.err'
bec39cab
AC
19494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19495 (eval $ac_try) 2>&5
19496 ac_status=$?
19497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19498 (exit $ac_status); }; } &&
19499 { ac_try='test -s conftest.$ac_objext'
19500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19501 (eval $ac_try) 2>&5
19502 ac_status=$?
19503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19504 (exit $ac_status); }; }; then
3f47be5c
EZ
19505 gdb_cv_thread_db_h_has_td_notalloc=yes
19506else
bec39cab
AC
19507 echo "$as_me: failed program was:" >&5
19508sed 's/^/| /' conftest.$ac_ext >&5
19509
b4e70030 19510gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 19511
3f47be5c 19512fi
bec39cab 19513rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 19514
bec39cab 19515fi
b4e70030
JB
19516echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
19517echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notalloc" >&6
59f80f10
DJ
19518 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_VERSION" >&5
19519echo $ECHO_N "checking whether <thread_db.h> has TD_VERSION... $ECHO_C" >&6
19520if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then
19521 echo $ECHO_N "(cached) $ECHO_C" >&6
19522else
19523 cat >conftest.$ac_ext <<_ACEOF
19524/* confdefs.h. */
19525_ACEOF
19526cat confdefs.h >>conftest.$ac_ext
19527cat >>conftest.$ac_ext <<_ACEOF
19528/* end confdefs.h. */
19529#include <thread_db.h>
19530int
19531main ()
19532{
19533int i = TD_VERSION;
19534 ;
19535 return 0;
19536}
19537_ACEOF
19538rm -f conftest.$ac_objext
19539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19540 (eval $ac_compile) 2>conftest.er1
19541 ac_status=$?
19542 grep -v '^ *+' conftest.er1 >conftest.err
19543 rm -f conftest.er1
19544 cat conftest.err >&5
19545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19546 (exit $ac_status); } &&
19547 { ac_try='test -z "$ac_c_werror_flag"
19548 || test ! -s conftest.err'
19549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19550 (eval $ac_try) 2>&5
19551 ac_status=$?
19552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19553 (exit $ac_status); }; } &&
19554 { ac_try='test -s conftest.$ac_objext'
19555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19556 (eval $ac_try) 2>&5
19557 ac_status=$?
19558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19559 (exit $ac_status); }; }; then
19560 gdb_cv_thread_db_h_has_td_version=yes
19561else
19562 echo "$as_me: failed program was:" >&5
19563sed 's/^/| /' conftest.$ac_ext >&5
19564
19565gdb_cv_thread_db_h_has_td_version=no
19566
19567fi
19568rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19569
19570fi
19571echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_version" >&5
19572echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_version" >&6
19573 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTLS" >&5
19574echo $ECHO_N "checking whether <thread_db.h> has TD_NOTLS... $ECHO_C" >&6
19575if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then
19576 echo $ECHO_N "(cached) $ECHO_C" >&6
19577else
19578 cat >conftest.$ac_ext <<_ACEOF
19579/* confdefs.h. */
19580_ACEOF
19581cat confdefs.h >>conftest.$ac_ext
19582cat >>conftest.$ac_ext <<_ACEOF
19583/* end confdefs.h. */
19584#include <thread_db.h>
19585int
19586main ()
19587{
19588int i = TD_NOTLS;
19589 ;
19590 return 0;
19591}
19592_ACEOF
19593rm -f conftest.$ac_objext
19594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19595 (eval $ac_compile) 2>conftest.er1
19596 ac_status=$?
19597 grep -v '^ *+' conftest.er1 >conftest.err
19598 rm -f conftest.er1
19599 cat conftest.err >&5
19600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19601 (exit $ac_status); } &&
19602 { ac_try='test -z "$ac_c_werror_flag"
19603 || test ! -s conftest.err'
19604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19605 (eval $ac_try) 2>&5
19606 ac_status=$?
19607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19608 (exit $ac_status); }; } &&
19609 { ac_try='test -s conftest.$ac_objext'
19610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19611 (eval $ac_try) 2>&5
19612 ac_status=$?
19613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19614 (exit $ac_status); }; }; then
19615 gdb_cv_thread_db_h_has_td_notls=yes
19616else
19617 echo "$as_me: failed program was:" >&5
19618sed 's/^/| /' conftest.$ac_ext >&5
19619
19620gdb_cv_thread_db_h_has_td_notls=no
19621
19622fi
19623rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19624
19625fi
19626echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notls" >&5
19627echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notls" >&6
3f47be5c
EZ
19628fi
19629if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab
AC
19630
19631cat >>confdefs.h <<\_ACEOF
3f47be5c 19632#define THREAD_DB_HAS_TD_NOTALLOC 1
bec39cab 19633_ACEOF
3f47be5c 19634
59f80f10
DJ
19635fi
19636if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
19637
19638cat >>confdefs.h <<\_ACEOF
19639#define THREAD_DB_HAS_TD_VERSION 1
19640_ACEOF
19641
19642fi
19643if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
19644
19645cat >>confdefs.h <<\_ACEOF
19646#define THREAD_DB_HAS_TD_NOTLS 1
19647_ACEOF
19648
3f47be5c
EZ
19649fi
19650
b757528f 19651if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
b4e70030
JB
19652 echo "$as_me:$LINENO: checking whether <sys/syscall.h> has __NR_tkill" >&5
19653echo $ECHO_N "checking whether <sys/syscall.h> has __NR_tkill... $ECHO_C" >&6
bec39cab
AC
19654if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then
19655 echo $ECHO_N "(cached) $ECHO_C" >&6
19656else
19657 cat >conftest.$ac_ext <<_ACEOF
19658/* confdefs.h. */
19659_ACEOF
19660cat confdefs.h >>conftest.$ac_ext
19661cat >>conftest.$ac_ext <<_ACEOF
19662/* end confdefs.h. */
b757528f 19663#include <sys/syscall.h>
bec39cab
AC
19664int
19665main ()
19666{
b757528f 19667int i = __NR_tkill;
bec39cab
AC
19668 ;
19669 return 0;
19670}
19671_ACEOF
19672rm -f conftest.$ac_objext
19673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19674 (eval $ac_compile) 2>conftest.er1
19675 ac_status=$?
19676 grep -v '^ *+' conftest.er1 >conftest.err
19677 rm -f conftest.er1
19678 cat conftest.err >&5
19679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19680 (exit $ac_status); } &&
b4e70030
JB
19681 { ac_try='test -z "$ac_c_werror_flag"
19682 || test ! -s conftest.err'
bec39cab
AC
19683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19684 (eval $ac_try) 2>&5
19685 ac_status=$?
19686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19687 (exit $ac_status); }; } &&
19688 { ac_try='test -s conftest.$ac_objext'
19689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19690 (eval $ac_try) 2>&5
19691 ac_status=$?
19692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19693 (exit $ac_status); }; }; then
b757528f
JJ
19694 gdb_cv_sys_syscall_h_has_tkill=yes
19695else
bec39cab
AC
19696 echo "$as_me: failed program was:" >&5
19697sed 's/^/| /' conftest.$ac_ext >&5
19698
b4e70030 19699gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 19700
b757528f 19701fi
bec39cab 19702rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 19703
bec39cab 19704fi
b4e70030
JB
19705echo "$as_me:$LINENO: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
19706echo "${ECHO_T}$gdb_cv_sys_syscall_h_has_tkill" >&6
b757528f
JJ
19707fi
19708if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab
AC
19709
19710cat >>confdefs.h <<\_ACEOF
b757528f 19711#define HAVE_TKILL_SYSCALL 1
bec39cab 19712_ACEOF
b757528f
JJ
19713
19714fi
19715
10568435
JK
19716echo "$as_me:$LINENO: checking whether ADDR_NO_RANDOMIZE is declared" >&5
19717echo $ECHO_N "checking whether ADDR_NO_RANDOMIZE is declared... $ECHO_C" >&6
19718if test "${ac_cv_have_decl_ADDR_NO_RANDOMIZE+set}" = set; then
19719 echo $ECHO_N "(cached) $ECHO_C" >&6
19720else
19721 cat >conftest.$ac_ext <<_ACEOF
19722/* confdefs.h. */
19723_ACEOF
19724cat confdefs.h >>conftest.$ac_ext
19725cat >>conftest.$ac_ext <<_ACEOF
19726/* end confdefs.h. */
19727#include <sys/personality.h>
19728
19729int
19730main ()
19731{
19732#ifndef ADDR_NO_RANDOMIZE
19733 char *p = (char *) ADDR_NO_RANDOMIZE;
19734#endif
19735
19736 ;
19737 return 0;
19738}
19739_ACEOF
19740rm -f conftest.$ac_objext
19741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19742 (eval $ac_compile) 2>conftest.er1
19743 ac_status=$?
19744 grep -v '^ *+' conftest.er1 >conftest.err
19745 rm -f conftest.er1
19746 cat conftest.err >&5
19747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19748 (exit $ac_status); } &&
19749 { ac_try='test -z "$ac_c_werror_flag"
19750 || test ! -s conftest.err'
19751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19752 (eval $ac_try) 2>&5
19753 ac_status=$?
19754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19755 (exit $ac_status); }; } &&
19756 { ac_try='test -s conftest.$ac_objext'
19757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19758 (eval $ac_try) 2>&5
19759 ac_status=$?
19760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19761 (exit $ac_status); }; }; then
19762 ac_cv_have_decl_ADDR_NO_RANDOMIZE=yes
19763else
19764 echo "$as_me: failed program was:" >&5
19765sed 's/^/| /' conftest.$ac_ext >&5
19766
19767ac_cv_have_decl_ADDR_NO_RANDOMIZE=no
19768fi
19769rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19770fi
19771echo "$as_me:$LINENO: result: $ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&5
19772echo "${ECHO_T}$ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&6
19773if test $ac_cv_have_decl_ADDR_NO_RANDOMIZE = yes; then
19774
19775cat >>confdefs.h <<_ACEOF
19776#define HAVE_DECL_ADDR_NO_RANDOMIZE 1
19777_ACEOF
19778
19779
19780else
19781 cat >>confdefs.h <<_ACEOF
19782#define HAVE_DECL_ADDR_NO_RANDOMIZE 0
19783_ACEOF
19784
19785
19786fi
19787
19788
19789
19790if test "$cross_compiling" = yes; then
19791 cat >conftest.$ac_ext <<_ACEOF
19792/* confdefs.h. */
19793_ACEOF
19794cat confdefs.h >>conftest.$ac_ext
19795cat >>conftest.$ac_ext <<_ACEOF
19796/* end confdefs.h. */
19797#include <sys/personality.h>
19798int
19799main ()
19800{
19801
19802# if !HAVE_DECL_ADDR_NO_RANDOMIZE
19803# define ADDR_NO_RANDOMIZE 0x0040000
19804# endif
19805 /* Test the flag could be set and stays set. */
19806 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19807 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19808 return 1
19809 ;
19810 return 0;
19811}
19812_ACEOF
19813rm -f conftest.$ac_objext conftest$ac_exeext
19814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19815 (eval $ac_link) 2>conftest.er1
19816 ac_status=$?
19817 grep -v '^ *+' conftest.er1 >conftest.err
19818 rm -f conftest.er1
19819 cat conftest.err >&5
19820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19821 (exit $ac_status); } &&
19822 { ac_try='test -z "$ac_c_werror_flag"
19823 || test ! -s conftest.err'
19824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19825 (eval $ac_try) 2>&5
19826 ac_status=$?
19827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19828 (exit $ac_status); }; } &&
19829 { ac_try='test -s conftest$ac_exeext'
19830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19831 (eval $ac_try) 2>&5
19832 ac_status=$?
19833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19834 (exit $ac_status); }; }; then
19835 have_personality=true
19836else
19837 echo "$as_me: failed program was:" >&5
19838sed 's/^/| /' conftest.$ac_ext >&5
19839
19840have_personality=false
19841fi
19842rm -f conftest.err conftest.$ac_objext \
19843 conftest$ac_exeext conftest.$ac_ext
19844else
19845 cat >conftest.$ac_ext <<_ACEOF
19846/* confdefs.h. */
19847_ACEOF
19848cat confdefs.h >>conftest.$ac_ext
19849cat >>conftest.$ac_ext <<_ACEOF
19850/* end confdefs.h. */
19851#include <sys/personality.h>
19852int
19853main ()
19854{
19855
19856# if !HAVE_DECL_ADDR_NO_RANDOMIZE
19857# define ADDR_NO_RANDOMIZE 0x0040000
19858# endif
19859 /* Test the flag could be set and stays set. */
19860 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19861 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19862 return 1
19863 ;
19864 return 0;
19865}
19866_ACEOF
19867rm -f conftest$ac_exeext
19868if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19869 (eval $ac_link) 2>&5
19870 ac_status=$?
19871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19872 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19874 (eval $ac_try) 2>&5
19875 ac_status=$?
19876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19877 (exit $ac_status); }; }; then
19878 have_personality=true
19879else
19880 echo "$as_me: program exited with status $ac_status" >&5
19881echo "$as_me: failed program was:" >&5
19882sed 's/^/| /' conftest.$ac_ext >&5
19883
19884( exit $ac_status )
19885have_personality=false
19886fi
19887rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19888fi
19889if $have_personality
19890then
19891
19892cat >>confdefs.h <<\_ACEOF
19893#define HAVE_PERSONALITY 1
19894_ACEOF
19895
19896fi
19897
fb40c209 19898
bec39cab 19899
b4e70030 19900# Check whether --with-sysroot or --without-sysroot was given.
030292b7 19901if test "${with_sysroot+set}" = set; then
b4e70030
JB
19902 withval="$with_sysroot"
19903
030292b7 19904 case ${with_sysroot} in
715d1656 19905 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
19906 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
19907 esac
19908
19909 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
19910
07abfebf
RS
19911 if test "x$prefix" = xNONE; then
19912 test_prefix=/usr/local
19913 else
19914 test_prefix=$prefix
19915 fi
aa28a74e 19916 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 19917 test_exec_prefix=$test_prefix
030292b7 19918 else
07abfebf 19919 test_exec_prefix=$exec_prefix
030292b7
DJ
19920 fi
19921 case ${TARGET_SYSTEM_ROOT} in
715d1656 19922 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
19923 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
19924 '${prefix}'|'${prefix}/'*|\
715d1656 19925 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
19926 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
19927 TARGET_SYSTEM_ROOT_DEFINE="$t"
19928 ;;
19929 esac
19930
19931else
bec39cab 19932
030292b7
DJ
19933 TARGET_SYSTEM_ROOT=
19934 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
19935
b4e70030 19936fi;
030292b7
DJ
19937
19938
19939
16e7150e
JG
19940system_gdbinit=
19941
19942# Check whether --with-system-gdbinit or --without-system-gdbinit was given.
19943if test "${with_system_gdbinit+set}" = set; then
19944 withval="$with_system_gdbinit"
19945 system_gdbinit=${withval}
19946fi;
19947
19948
19949 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
19950 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19951 ac_define_dir=`eval echo $system_gdbinit`
19952 ac_define_dir=`eval echo $ac_define_dir`
19953
19954cat >>confdefs.h <<_ACEOF
19955#define SYSTEM_GDBINIT "$ac_define_dir"
19956_ACEOF
19957
19958
19959
19960if test "x$prefix" = xNONE; then
19961 test_prefix=$ac_default_prefix
19962else
19963 test_prefix=$prefix
19964fi
19965if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
19966 test_exec_prefix=$test_prefix
19967else
19968 test_exec_prefix=$exec_prefix
19969fi
19970case ${system_gdbinit} in
19971 "${test_prefix}"|"${test_prefix}/"*|\
19972 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
19973 '${prefix}'|'${prefix}/'*|\
19974 '${exec_prefix}'|'${exec_prefix}/'*)
19975
19976cat >>confdefs.h <<\_ACEOF
19977#define SYSTEM_GDBINIT_RELOCATABLE 1
19978_ACEOF
19979
19980 ;;
19981esac
19982
b4e70030 19983# Check whether --enable-werror or --disable-werror was given.
094a342e 19984if test "${enable_werror+set}" = set; then
b4e70030
JB
19985 enableval="$enable_werror"
19986 case "${enableval}" in
094a342e
MK
19987 yes | y) ERROR_ON_WARNING="yes" ;;
19988 no | n) ERROR_ON_WARNING="no" ;;
19989 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
19990echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
19991 { (exit 1); exit 1; }; } ;;
19992 esac
b4e70030 19993fi;
094a342e
MK
19994
19995# Enable -Werror by default when using gcc
19996if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
19997 ERROR_ON_WARNING=yes
19998fi
19999
20000WERROR_CFLAGS=""
20001if test "${ERROR_ON_WARNING}" = yes ; then
20002 WERROR_CFLAGS="-Werror"
20003fi
20004
aa79a185
DJ
20005# The entries after -Wno-pointer-sign are disabled warnings which may
20006# be enabled in the future, which can not currently be used to build
20007# GDB.
20008# NOTE: If you change this list, remember to update
3b851bce 20009# gdb/doc/gdbint.texinfo.
aa79a185
DJ
20010build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
20011-Wformat-nonliteral -Wno-pointer-sign \
58b38ee2 20012-Wno-unused -Wno-switch -Wno-char-subscripts"
a3b362c4 20013
3526781e
DJ
20014# Enable -Wno-format by default when using gcc on mingw since many
20015# GCC versions complain about %I64.
20016case "${host}" in
20017 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
20018esac
20019
b4e70030 20020# Check whether --enable-build-warnings or --disable-build-warnings was given.
c906108c 20021if test "${enable_build_warnings+set}" = set; then
b4e70030
JB
20022 enableval="$enable_build_warnings"
20023 case "${enableval}" in
c906108c
SS
20024 yes) ;;
20025 no) build_warnings="-w";;
20026 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20027 build_warnings="${build_warnings} ${t}";;
20028 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20029 build_warnings="${t} ${build_warnings}";;
20030 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
20031esac
d4f3574e 20032if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 20033 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 20034fi
b4e70030 20035fi; # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
3b851bce 20036if test "${enable_gdb_build_warnings+set}" = set; then
b4e70030
JB
20037 enableval="$enable_gdb_build_warnings"
20038 case "${enableval}" in
3b851bce
AC
20039 yes) ;;
20040 no) build_warnings="-w";;
20041 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20042 build_warnings="${build_warnings} ${t}";;
20043 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20044 build_warnings="${t} ${build_warnings}";;
20045 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
20046esac
20047if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
20048 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
20049fi
b4e70030 20050fi; WARN_CFLAGS=""
c906108c
SS
20051if test "x${build_warnings}" != x -a "x$GCC" = xyes
20052then
b4e70030
JB
20053 echo "$as_me:$LINENO: checking compiler warning flags" >&5
20054echo $ECHO_N "checking compiler warning flags... $ECHO_C" >&6
746a987d
AC
20055 # Separate out the -Werror flag as some files just cannot be
20056 # compiled with it enabled.
20057 for w in ${build_warnings}; do
20058 case $w in
20059 -Werr*) WERROR_CFLAGS=-Werror ;;
20060 *) # Check that GCC accepts it
4536bbc6
AC
20061 saved_CFLAGS="$CFLAGS"
20062 CFLAGS="$CFLAGS $w"
bec39cab
AC
20063 cat >conftest.$ac_ext <<_ACEOF
20064/* confdefs.h. */
20065_ACEOF
20066cat confdefs.h >>conftest.$ac_ext
20067cat >>conftest.$ac_ext <<_ACEOF
20068/* end confdefs.h. */
4536bbc6 20069
bec39cab
AC
20070int
20071main ()
20072{
4536bbc6 20073
bec39cab
AC
20074 ;
20075 return 0;
20076}
20077_ACEOF
20078rm -f conftest.$ac_objext
20079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20080 (eval $ac_compile) 2>conftest.er1
20081 ac_status=$?
20082 grep -v '^ *+' conftest.er1 >conftest.err
20083 rm -f conftest.er1
20084 cat conftest.err >&5
20085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20086 (exit $ac_status); } &&
b4e70030
JB
20087 { ac_try='test -z "$ac_c_werror_flag"
20088 || test ! -s conftest.err'
bec39cab
AC
20089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20090 (eval $ac_try) 2>&5
20091 ac_status=$?
20092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20093 (exit $ac_status); }; } &&
20094 { ac_try='test -s conftest.$ac_objext'
20095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20096 (eval $ac_try) 2>&5
20097 ac_status=$?
20098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20099 (exit $ac_status); }; }; then
4536bbc6
AC
20100 WARN_CFLAGS="${WARN_CFLAGS} $w"
20101else
bec39cab
AC
20102 echo "$as_me: failed program was:" >&5
20103sed 's/^/| /' conftest.$ac_ext >&5
20104
4536bbc6 20105fi
bec39cab 20106rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 20107 CFLAGS="$saved_CFLAGS"
746a987d
AC
20108 esac
20109 done
aa79a185
DJ
20110 echo "$as_me:$LINENO: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
20111echo "${ECHO_T}${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6
c906108c
SS
20112fi
20113
20114
104c1213 20115
7a292a7a 20116# In the Cygwin environment, we need some additional flags.
b4e70030
JB
20117echo "$as_me:$LINENO: checking for cygwin" >&5
20118echo $ECHO_N "checking for cygwin... $ECHO_C" >&6
bec39cab
AC
20119if test "${gdb_cv_os_cygwin+set}" = set; then
20120 echo $ECHO_N "(cached) $ECHO_C" >&6
20121else
20122 cat >conftest.$ac_ext <<_ACEOF
20123/* confdefs.h. */
20124_ACEOF
20125cat confdefs.h >>conftest.$ac_ext
20126cat >>conftest.$ac_ext <<_ACEOF
20127/* end confdefs.h. */
7a292a7a
SS
20128
20129#if defined (__CYGWIN__) || defined (__CYGWIN32__)
20130lose
20131#endif
bec39cab 20132_ACEOF
7a292a7a 20133if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 20134 $EGREP "lose" >/dev/null 2>&1; then
7a292a7a
SS
20135 gdb_cv_os_cygwin=yes
20136else
7a292a7a
SS
20137 gdb_cv_os_cygwin=no
20138fi
20139rm -f conftest*
20140
20141fi
b4e70030
JB
20142echo "$as_me:$LINENO: result: $gdb_cv_os_cygwin" >&5
20143echo "${ECHO_T}$gdb_cv_os_cygwin" >&6
7a292a7a 20144
aff38e61 20145
3eb25fda 20146SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 20147case ${host} in
95cbc983
AC
20148 *go32* ) SER_HARDWIRE=ser-go32.o ;;
20149 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 20150 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
20151esac
20152
20153
cd0fc7c3
SS
20154# libreadline needs libuser32.a in a cygwin environment
20155WIN32LIBS=
20156if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
20157 WIN32LIBS="-luser32"
20158 case "${target}" in
20159 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
20160 ;;
20161 esac
cd0fc7c3 20162fi
c906108c 20163
b4505029
MM
20164# The ser-tcp.c module requires sockets.
20165case ${host} in
20166 *mingw32*)
20167
20168cat >>confdefs.h <<\_ACEOF
20169#define USE_WIN32API 1
20170_ACEOF
20171
20172 WIN32LIBS="$WIN32LIBS -lws2_32"
20173 ;;
20174esac
20175
7a292a7a 20176
31d99776
DJ
20177# Add ELF support to GDB, but only if BFD includes ELF support.
20178OLD_CFLAGS=$CFLAGS
20179OLD_LDFLAGS=$LDFLAGS
20180OLD_LIBS=$LIBS
cab58a69 20181CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 20182LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 20183intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
0f72fb1c 20184LIBS="-lbfd -liberty $intl $LIBS"
31d99776
DJ
20185echo "$as_me:$LINENO: checking for ELF support in BFD" >&5
20186echo $ECHO_N "checking for ELF support in BFD... $ECHO_C" >&6
20187if test "${gdb_cv_var_elf+set}" = set; then
20188 echo $ECHO_N "(cached) $ECHO_C" >&6
20189else
20190 cat >conftest.$ac_ext <<_ACEOF
20191/* confdefs.h. */
20192_ACEOF
20193cat confdefs.h >>conftest.$ac_ext
20194cat >>conftest.$ac_ext <<_ACEOF
20195/* end confdefs.h. */
20196#include <stdlib.h>
20197#include "bfd.h"
20198#include "elf-bfd.h"
20199
20200int
20201main ()
20202{
20203bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
20204 ;
20205 return 0;
20206}
20207_ACEOF
20208rm -f conftest.$ac_objext conftest$ac_exeext
20209if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20210 (eval $ac_link) 2>conftest.er1
20211 ac_status=$?
20212 grep -v '^ *+' conftest.er1 >conftest.err
20213 rm -f conftest.er1
20214 cat conftest.err >&5
20215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20216 (exit $ac_status); } &&
20217 { ac_try='test -z "$ac_c_werror_flag"
20218 || test ! -s conftest.err'
20219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20220 (eval $ac_try) 2>&5
20221 ac_status=$?
20222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20223 (exit $ac_status); }; } &&
20224 { ac_try='test -s conftest$ac_exeext'
20225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20226 (eval $ac_try) 2>&5
20227 ac_status=$?
20228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20229 (exit $ac_status); }; }; then
20230 gdb_cv_var_elf=yes
20231else
20232 echo "$as_me: failed program was:" >&5
20233sed 's/^/| /' conftest.$ac_ext >&5
20234
20235gdb_cv_var_elf=no
20236fi
20237rm -f conftest.err conftest.$ac_objext \
20238 conftest$ac_exeext conftest.$ac_ext
20239fi
20240echo "$as_me:$LINENO: result: $gdb_cv_var_elf" >&5
20241echo "${ECHO_T}$gdb_cv_var_elf" >&6
20242if test $gdb_cv_var_elf = yes; then
20243 CONFIG_OBS="$CONFIG_OBS elfread.o"
20244
20245cat >>confdefs.h <<\_ACEOF
20246#define HAVE_ELF 1
20247_ACEOF
20248
20249fi
20250CFLAGS=$OLD_CFLAGS
20251LDFLAGS=$OLD_LDFLAGS
20252LIBS=$OLD_LIBS
20253
121ce6e5
DJ
20254# Add any host-specific objects to GDB.
20255CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
20256
3fc11d3e
JM
20257LIBGUI="../libgui/src/libgui.a"
20258GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
20259
20260
7a292a7a 20261
3fc11d3e
JM
20262WIN32LDAPP=
20263
20264
20265
d91670b9 20266case "${host}" in
686a5eed 20267*-*-cygwin* | *-*-mingw* )
d91670b9
CV
20268 configdir="win"
20269 ;;
20270*)
20271 configdir="unix"
20272 ;;
20273esac
3fc11d3e
JM
20274
20275GDBTKLIBS=
20276if test "${enable_gdbtk}" = "yes"; then
20277
d1c3b63a
KS
20278 # Gdbtk must have an absolute path to srcdir in order to run
20279 # properly when not installed.
20280 here=`pwd`
20281 cd ${srcdir}
20282 GDBTK_SRC_DIR=`pwd`
20283 cd $here
20284
bec39cab 20285
5062cc19
KS
20286 #
20287 # Ok, lets find the tcl configuration
20288 # First, look for one uninstalled.
20289 # the alternative search directory is invoked by --with-tcl
20290 #
3fc11d3e 20291
5062cc19
KS
20292 if test x"${no_tcl}" = x ; then
20293 # we reset no_tcl in case something fails here
20294 no_tcl=true
bec39cab 20295
5062cc19
KS
20296# Check whether --with-tcl or --without-tcl was given.
20297if test "${with_tcl+set}" = set; then
20298 withval="$with_tcl"
b4e70030
JB
20299 with_tclconfig=${withval}
20300fi;
5062cc19 20301 echo "$as_me:$LINENO: checking for Tcl configuration" >&5
b4e70030 20302echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
5062cc19 20303 if test "${ac_cv_c_tclconfig+set}" = set; then
bec39cab 20304 echo $ECHO_N "(cached) $ECHO_C" >&6
3fc11d3e 20305else
bec39cab 20306
3fc11d3e 20307
5062cc19
KS
20308 # First check to see if --with-tcl was specified.
20309 case "${host}" in
20310 *-*-cygwin*) platDir="win" ;;
20311 *) platDir="unix" ;;
20312 esac
20313 if test x"${with_tclconfig}" != x ; then
20314 if test -f "${with_tclconfig}/tclConfig.sh" ; then
20315 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
20316 else
20317 { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
bec39cab
AC
20318echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
20319 { (exit 1); exit 1; }; }
5062cc19
KS
20320 fi
20321 fi
20322
20323 # then check for a private Tcl installation
20324 if test x"${ac_cv_c_tclconfig}" = x ; then
20325 for i in \
20326 ../tcl \
20327 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20328 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
20329 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
20330 ../../tcl \
20331 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20332 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
20333 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
20334 ../../../tcl \
20335 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20336 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
20337 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
20338 if test -f "$i/$platDir/tclConfig.sh" ; then
20339 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
20340 break
20341 fi
20342 done
20343 fi
20344
20345 # on Darwin, check in Framework installation locations
20346 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
20347 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
20348 `ls -d /Library/Frameworks 2>/dev/null` \
20349 `ls -d /Network/Library/Frameworks 2>/dev/null` \
20350 `ls -d /System/Library/Frameworks 2>/dev/null` \
20351 ; do
20352 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
20353 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
20354 break
20355 fi
20356 done
20357 fi
20358
20359 # check in a few common install locations
20360 if test x"${ac_cv_c_tclconfig}" = x ; then
20361 for i in `ls -d ${libdir} 2>/dev/null` \
20362 `ls -d ${exec_prefix}/lib 2>/dev/null` \
20363 `ls -d ${prefix}/lib 2>/dev/null` \
20364 `ls -d /usr/local/lib 2>/dev/null` \
20365 `ls -d /usr/contrib/lib 2>/dev/null` \
20366 `ls -d /usr/lib 2>/dev/null` \
20367 ; do
20368 if test -f "$i/tclConfig.sh" ; then
20369 ac_cv_c_tclconfig=`(cd $i; pwd)`
20370 break
20371 fi
20372 done
20373 fi
3fc11d3e 20374
5062cc19
KS
20375 # check in a few other private locations
20376 if test x"${ac_cv_c_tclconfig}" = x ; then
20377 for i in \
20378 ${srcdir}/../tcl \
20379 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20380 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
20381 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
20382 if test -f "$i/$platDir/tclConfig.sh" ; then
20383 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
20384 break
20385 fi
20386 done
20387 fi
bec39cab 20388
3fc11d3e
JM
20389fi
20390
5062cc19
KS
20391
20392 if test x"${ac_cv_c_tclconfig}" = x ; then
20393 TCL_BIN_DIR="# no Tcl configs found"
20394 { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
bec39cab 20395echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
20396 else
20397 no_tcl=
20398 TCL_BIN_DIR=${ac_cv_c_tclconfig}
20399 echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
20400echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
20401 fi
20402 fi
3fc11d3e 20403
bec39cab 20404
85541719
DE
20405 # If $no_tk is nonempty, then we can't do Tk, and there is no
20406 # point to doing Tcl.
bec39cab 20407
5062cc19
KS
20408 #
20409 # Ok, lets find the tk configuration
20410 # First, look for one uninstalled.
20411 # the alternative search directory is invoked by --with-tk
20412 #
3fc11d3e 20413
5062cc19
KS
20414 if test x"${no_tk}" = x ; then
20415 # we reset no_tk in case something fails here
20416 no_tk=true
bec39cab 20417
5062cc19
KS
20418# Check whether --with-tk or --without-tk was given.
20419if test "${with_tk+set}" = set; then
20420 withval="$with_tk"
20421 with_tkconfig=${withval}
b4e70030 20422fi;
5062cc19
KS
20423 echo "$as_me:$LINENO: checking for Tk configuration" >&5
20424echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6
20425 if test "${ac_cv_c_tkconfig+set}" = set; then
bec39cab
AC
20426 echo $ECHO_N "(cached) $ECHO_C" >&6
20427else
3fc11d3e
JM
20428
20429
5062cc19
KS
20430 # First check to see if --with-tkconfig was specified.
20431 if test x"${with_tkconfig}" != x ; then
20432 if test -f "${with_tkconfig}/tkConfig.sh" ; then
20433 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
20434 else
20435 { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
20436echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
bec39cab 20437 { (exit 1); exit 1; }; }
5062cc19
KS
20438 fi
20439 fi
3fc11d3e 20440
5062cc19
KS
20441 # then check for a private Tk library
20442 case "${host}" in
20443 *-*-cygwin*) platDir="win" ;;
20444 *) platDir="unix" ;;
20445 esac
20446 if test x"${ac_cv_c_tkconfig}" = x ; then
20447 for i in \
20448 ../tk \
20449 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20450 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
20451 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
20452 ../../tk \
20453 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20454 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
20455 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
20456 ../../../tk \
20457 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20458 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
20459 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
20460 if test -f "$i/$platDir/tkConfig.sh" ; then
20461 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20462 break
20463 fi
20464 done
20465 fi
20466
20467 # on Darwin, check in Framework installation locations
20468 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
20469 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
20470 `ls -d /Library/Frameworks 2>/dev/null` \
20471 `ls -d /Network/Library/Frameworks 2>/dev/null` \
20472 `ls -d /System/Library/Frameworks 2>/dev/null` \
20473 ; do
20474 if test -f "$i/Tk.framework/tkConfig.sh" ; then
20475 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
20476 break
20477 fi
20478 done
20479 fi
20480
20481 # check in a few common install locations
20482 if test x"${ac_cv_c_tkconfig}" = x ; then
20483 for i in `ls -d ${libdir} 2>/dev/null` \
20484 `ls -d ${exec_prefix}/lib 2>/dev/null` \
20485 `ls -d ${prefix}/lib 2>/dev/null` \
20486 `ls -d /usr/local/lib 2>/dev/null` \
20487 `ls -d /usr/contrib/lib 2>/dev/null` \
20488 `ls -d /usr/lib 2>/dev/null` \
20489 ; do
20490 if test -f "$i/tkConfig.sh" ; then
20491 ac_cv_c_tkconfig=`(cd $i; pwd)`
20492 break
20493 fi
20494 done
20495 fi
20496 # check in a few other private locations
20497 if test x"${ac_cv_c_tkconfig}" = x ; then
20498 for i in \
20499 ${srcdir}/../tk \
20500 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20501 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
20502 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
20503 if test -f "$i/$platDir/tkConfig.sh" ; then
20504 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20505 break
20506 fi
20507 done
20508 fi
3fc11d3e 20509
3fc11d3e
JM
20510fi
20511
20512
5062cc19
KS
20513 if test x"${ac_cv_c_tkconfig}" = x ; then
20514 TK_BIN_DIR="# no Tk configs found"
20515 { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
20516echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
20517 else
20518 no_tk=
20519 TK_BIN_DIR=${ac_cv_c_tkconfig}
20520 echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
20521echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6
20522 fi
3fc11d3e 20523 fi
dd2504ab 20524
dd2504ab 20525
85541719
DE
20526 if test -z "${no_tcl}" -a -z "${no_tk}"; then
20527
20528 echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
20529echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
20530
20531 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
20532 echo "$as_me:$LINENO: result: loading" >&5
20533echo "${ECHO_T}loading" >&6
20534 . ${TCL_BIN_DIR}/tclConfig.sh
20535 else
20536 echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
20537echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
20538 fi
20539
20540 # eval is required to do the TCL_DBGX substitution
20541 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
20542 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
20543
20544 # If the TCL_BIN_DIR is the build directory (not the install directory),
20545 # then set the common variable name to the value of the build variables.
20546 # For example, the variable TCL_LIB_SPEC will be set to the value
20547 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
20548 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
20549 # installed and uninstalled version of Tcl.
20550 if test -f "${TCL_BIN_DIR}/Makefile" ; then
20551 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
20552 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
20553 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
20554 elif test "`uname -s`" = "Darwin"; then
20555 # If Tcl was built as a framework, attempt to use the libraries
20556 # from the framework at the given location so that linking works
20557 # against Tcl.framework installed in an arbitary location.
20558 case ${TCL_DEFS} in
20559 *TCL_FRAMEWORK*)
20560 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
20561 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
20562 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
20563 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
20564 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
20565 break
20566 fi
20567 done
20568 fi
20569 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
20570 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
20571 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
20572 fi
20573 ;;
20574 esac
20575 fi
20576
20577 # eval is required to do the TCL_DBGX substitution
20578 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
20579 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
20580 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
20581 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597 # Check for in-tree tcl
20598 here=`pwd`
20599 cd ${srcdir}/..
20600 topdir=`pwd`
20601 cd ${here}
20602
20603 intree="no"
20604 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
20605 intree="yes"
20606 fi
20607
20608 # Find Tcl private headers
20609 if test x"${intree}" = xno; then
20610
20611 echo "$as_me:$LINENO: checking for Tcl private headers" >&5
20612echo $ECHO_N "checking for Tcl private headers... $ECHO_C" >&6
20613 private_dir=""
20614 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
20615 if test -f ${dir}/tclInt.h ; then
20616 private_dir=${dir}
20617 fi
20618
20619 if test x"${private_dir}" = x; then
20620 { { echo "$as_me:$LINENO: error: could not find private Tcl headers" >&5
20621echo "$as_me: error: could not find private Tcl headers" >&2;}
20622 { (exit 1); exit 1; }; }
20623 else
20624 TCL_PRIVATE_INCLUDE="-I${private_dir}"
20625 echo "$as_me:$LINENO: result: ${private_dir}" >&5
20626echo "${ECHO_T}${private_dir}" >&6
20627 fi
20628
20629 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
20630 TCL_LIBRARY="${TCL_LIB_SPEC}"
20631 TCL_DEPS=""
20632 else
20633 # If building tcl in the same src tree, private headers
20634 # are not needed, but we need to be sure to use the right
20635 # headers library
20636 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
20637 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
20638 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
20639 fi
20640
20641
20642
20643
20644
5062cc19
KS
20645 echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
20646echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6
dd2504ab 20647
5062cc19
KS
20648 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
20649 echo "$as_me:$LINENO: result: loading" >&5
20650echo "${ECHO_T}loading" >&6
20651 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 20652 else
5062cc19
KS
20653 echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
20654echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
3fc11d3e 20655 fi
bec39cab 20656
5062cc19
KS
20657 # eval is required to do the TK_DBGX substitution
20658 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
20659 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
20660
20661 # If the TK_BIN_DIR is the build directory (not the install directory),
20662 # then set the common variable name to the value of the build variables.
20663 # For example, the variable TK_LIB_SPEC will be set to the value
20664 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
20665 # instead of TK_BUILD_LIB_SPEC since it will work with both an
20666 # installed and uninstalled version of Tcl.
85541719 20667 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
20668 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
20669 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
20670 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
20671 elif test "`uname -s`" = "Darwin"; then
20672 # If Tk was built as a framework, attempt to use the libraries
20673 # from the framework at the given location so that linking works
20674 # against Tk.framework installed in an arbitary location.
20675 case ${TK_DEFS} in
20676 *TK_FRAMEWORK*)
85541719 20677 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
20678 for i in "`cd ${TK_BIN_DIR}; pwd`" \
20679 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
20680 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
20681 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
20682 break
20683 fi
20684 done
20685 fi
85541719 20686 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
20687 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
20688 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
20689 fi
20690 ;;
20691 esac
3fc11d3e
JM
20692 fi
20693
5062cc19
KS
20694 # eval is required to do the TK_DBGX substitution
20695 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
20696 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
20697 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
20698 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 20699
3fc11d3e
JM
20700
20701
bec39cab
AC
20702
20703
20704
20705
20706
20707
20708
3fc11d3e 20709
3fc11d3e 20710
bec39cab 20711
bec39cab 20712
85541719
DE
20713 # Check for in-tree Tk
20714 intree="no"
20715 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
20716 intree="yes"
20717 fi
3fc11d3e 20718
85541719
DE
20719 # Find Tk private headers
20720 if test x"${intree}" = xno; then
3fc11d3e 20721
5062cc19
KS
20722 echo "$as_me:$LINENO: checking for Tk private headers" >&5
20723echo $ECHO_N "checking for Tk private headers... $ECHO_C" >&6
20724 private_dir=""
20725 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
20726 if test -f ${dir}/tkInt.h; then
20727 private_dir=${dir}
3fc11d3e 20728 fi
bec39cab 20729
5062cc19
KS
20730 if test x"${private_dir}" = x; then
20731 { { echo "$as_me:$LINENO: error: could not find Tk private headers" >&5
20732echo "$as_me: error: could not find Tk private headers" >&2;}
20733 { (exit 1); exit 1; }; }
3fc11d3e 20734 else
5062cc19
KS
20735 TK_PRIVATE_INCLUDE="-I${private_dir}"
20736 echo "$as_me:$LINENO: result: ${private_dir}" >&5
20737echo "${ECHO_T}${private_dir}" >&6
3fc11d3e 20738 fi
3fc11d3e 20739
85541719
DE
20740 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
20741 TK_LIBRARY=${TK_LIB_SPEC}
20742 TK_DEPS=""
20743 else
20744 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
20745 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
20746 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
20747 fi
3fc11d3e
JM
20748
20749
3fc11d3e
JM
20750
20751
3fc11d3e 20752
85541719 20753 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 20754
85541719
DE
20755 # Include some libraries that Tcl and Tk want.
20756 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
20757 # Yes, the ordering seems wrong here. But it isn't.
20758 # TK_LIBS is the list of libraries that need to be linked
20759 # after Tcl/Tk. Note that this isn't put into LIBS. If it
20760 # were in LIBS then any link tests after this point would
20761 # try to include things like `$(LIBGUI)', which wouldn't work.
20762 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 20763
85541719
DE
20764 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
20765 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
20766 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
20767 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
20768 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
20769 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
20770 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 20771
85541719
DE
20772 if test x$gdb_cv_os_cygwin = xyes; then
20773 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
20774 WIN32LDAPP="-Wl,--subsystem,console"
20775 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 20776 fi
ffc6a242 20777
b4e70030
JB
20778
20779
20780subdirs="$subdirs gdbtk"
3ace7edb 20781
85541719 20782 fi
3fc11d3e
JM
20783fi
20784
20785
20786
20787
20788
20789
20790
20791
b4e70030
JB
20792echo "$as_me:$LINENO: checking for X" >&5
20793echo $ECHO_N "checking for X... $ECHO_C" >&6
bec39cab 20794
c906108c 20795
b4e70030 20796# Check whether --with-x or --without-x was given.
c906108c 20797if test "${with_x+set}" = set; then
b4e70030 20798 withval="$with_x"
c906108c 20799
b4e70030 20800fi;
c906108c
SS
20801# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20802if test "x$with_x" = xno; then
20803 # The user explicitly disabled X.
20804 have_x=disabled
20805else
20806 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20807 # Both variables are already set.
20808 have_x=yes
20809 else
bec39cab
AC
20810 if test "${ac_cv_have_x+set}" = set; then
20811 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
20812else
20813 # One or both of the vars are not set, and there is no cached value.
bec39cab 20814ac_x_includes=no ac_x_libraries=no
b4e70030 20815rm -fr conftest.dir
bec39cab
AC
20816if mkdir conftest.dir; then
20817 cd conftest.dir
c906108c 20818 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
bec39cab 20819 cat >Imakefile <<'_ACEOF'
c906108c
SS
20820acfindx:
20821 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
bec39cab 20822_ACEOF
b4e70030 20823 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c
SS
20824 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20825 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
20826 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20827 for ac_extension in a so sl; do
20828 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
bec39cab
AC
20829 test -f $ac_im_libdir/libX11.$ac_extension; then
20830 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
20831 fi
20832 done
20833 # Screen out bogus values from the imake configuration. They are
20834 # bogus both because they are the default anyway, and because
20835 # using them would break gcc on systems where it needs fixed includes.
bec39cab 20836 case $ac_im_incroot in
b4e70030 20837 /usr/include) ;;
bec39cab 20838 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 20839 esac
bec39cab 20840 case $ac_im_usrlibdir in
c906108c 20841 /usr/lib | /lib) ;;
bec39cab 20842 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
20843 esac
20844 fi
20845 cd ..
b4e70030 20846 rm -fr conftest.dir
c906108c
SS
20847fi
20848
bec39cab
AC
20849# Standard set of common directories for X headers.
20850# Check X11 before X11Rn because it is often a symlink to the current release.
20851ac_x_header_dirs='
20852/usr/X11/include
20853/usr/X11R6/include
20854/usr/X11R5/include
20855/usr/X11R4/include
20856
20857/usr/include/X11
20858/usr/include/X11R6
20859/usr/include/X11R5
20860/usr/include/X11R4
20861
20862/usr/local/X11/include
20863/usr/local/X11R6/include
20864/usr/local/X11R5/include
20865/usr/local/X11R4/include
20866
20867/usr/local/include/X11
20868/usr/local/include/X11R6
20869/usr/local/include/X11R5
20870/usr/local/include/X11R4
20871
20872/usr/X386/include
20873/usr/x386/include
20874/usr/XFree86/include/X11
20875
20876/usr/include
20877/usr/local/include
20878/usr/unsupported/include
20879/usr/athena/include
20880/usr/local/x11r5/include
20881/usr/lpp/Xamples/include
20882
20883/usr/openwin/include
20884/usr/openwin/share/include'
20885
20886if test "$ac_x_includes" = no; then
59f80f10 20887 # Guess where to find include files, by looking for Intrinsic.h.
c906108c 20888 # First, try using that file with no special directory specified.
bec39cab
AC
20889 cat >conftest.$ac_ext <<_ACEOF
20890/* confdefs.h. */
20891_ACEOF
20892cat confdefs.h >>conftest.$ac_ext
20893cat >>conftest.$ac_ext <<_ACEOF
20894/* end confdefs.h. */
59f80f10 20895#include <X11/Intrinsic.h>
bec39cab
AC
20896_ACEOF
20897if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20898 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20899 ac_status=$?
20900 grep -v '^ *+' conftest.er1 >conftest.err
20901 rm -f conftest.er1
20902 cat conftest.err >&5
20903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20904 (exit $ac_status); } >/dev/null; then
20905 if test -s conftest.err; then
20906 ac_cpp_err=$ac_c_preproc_warn_flag
20907 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20908 else
20909 ac_cpp_err=
20910 fi
20911else
20912 ac_cpp_err=yes
20913fi
20914if test -z "$ac_cpp_err"; then
c906108c
SS
20915 # We can compile using X headers with no special include directory.
20916ac_x_includes=
20917else
bec39cab
AC
20918 echo "$as_me: failed program was:" >&5
20919sed 's/^/| /' conftest.$ac_ext >&5
20920
20921 for ac_dir in $ac_x_header_dirs; do
59f80f10 20922 if test -r "$ac_dir/X11/Intrinsic.h"; then
bec39cab
AC
20923 ac_x_includes=$ac_dir
20924 break
20925 fi
20926done
c906108c 20927fi
bec39cab
AC
20928rm -f conftest.err conftest.$ac_ext
20929fi # $ac_x_includes = no
c906108c 20930
bec39cab 20931if test "$ac_x_libraries" = no; then
c906108c 20932 # Check for the libraries.
c906108c
SS
20933 # See if we find them without any special options.
20934 # Don't add to $LIBS permanently.
bec39cab 20935 ac_save_LIBS=$LIBS
4e8d927d 20936 LIBS="-lXt $LIBS"
bec39cab
AC
20937 cat >conftest.$ac_ext <<_ACEOF
20938/* confdefs.h. */
20939_ACEOF
20940cat confdefs.h >>conftest.$ac_ext
20941cat >>conftest.$ac_ext <<_ACEOF
20942/* end confdefs.h. */
59f80f10 20943#include <X11/Intrinsic.h>
bec39cab
AC
20944int
20945main ()
20946{
59f80f10 20947XtMalloc (0)
bec39cab
AC
20948 ;
20949 return 0;
20950}
20951_ACEOF
20952rm -f conftest.$ac_objext conftest$ac_exeext
20953if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20954 (eval $ac_link) 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_exeext'
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 LIBS=$ac_save_LIBS
c906108c
SS
20975# We can link X programs with no special library path.
20976ac_x_libraries=
20977else
bec39cab
AC
20978 echo "$as_me: failed program was:" >&5
20979sed 's/^/| /' conftest.$ac_ext >&5
20980
b4e70030 20981LIBS=$ac_save_LIBS
bec39cab 20982for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 20983do
bec39cab 20984 # Don't even attempt the hair of trying to link an X program!
c906108c 20985 for ac_extension in a so sl; do
b4e70030 20986 if test -r $ac_dir/libXt.$ac_extension; then
c906108c
SS
20987 ac_x_libraries=$ac_dir
20988 break 2
20989 fi
20990 done
20991done
20992fi
bec39cab
AC
20993rm -f conftest.err conftest.$ac_objext \
20994 conftest$ac_exeext conftest.$ac_ext
20995fi # $ac_x_libraries = no
c906108c 20996
bec39cab 20997if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
c906108c
SS
20998 # Didn't find X anywhere. Cache the known absence of X.
20999 ac_cv_have_x="have_x=no"
21000else
21001 # Record where we found X for the cache.
21002 ac_cv_have_x="have_x=yes \
bec39cab 21003 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
c906108c
SS
21004fi
21005fi
bec39cab 21006
c906108c
SS
21007 fi
21008 eval "$ac_cv_have_x"
21009fi # $with_x != no
21010
21011if test "$have_x" != yes; then
b4e70030
JB
21012 echo "$as_me:$LINENO: result: $have_x" >&5
21013echo "${ECHO_T}$have_x" >&6
c906108c
SS
21014 no_x=yes
21015else
21016 # If each of the values was on the command line, it overrides each guess.
21017 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
21018 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
21019 # Update the cache value to reflect the command line values.
21020 ac_cv_have_x="have_x=yes \
21021 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
b4e70030
JB
21022 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
21023echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
c906108c
SS
21024fi
21025
21026
bec39cab 21027# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 21028# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
21029# This code just checks for a few cases where we'd like to ignore those
21030# definitions, even when they're present in the '.mt' file. These cases
21031# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 21032# not part of the source tree.
7a292a7a 21033#
b4e70030 21034# Check whether --enable-sim or --disable-sim was given.
7a292a7a 21035if test "${enable_sim+set}" = set; then
b4e70030
JB
21036 enableval="$enable_sim"
21037 echo "enable_sim = $enable_sim";
7a292a7a
SS
21038 echo "enableval = ${enableval}";
21039 case "${enableval}" in
21040 yes) ignore_sim=false ;;
21041 no) ignore_sim=true ;;
21042 *) ignore_sim=false ;;
21043 esac
21044else
21045 ignore_sim=false
b4e70030 21046fi;
7a292a7a
SS
21047
21048if test ! -d "${srcdir}/../sim"; then
21049 ignore_sim=true
21050fi
21051
9b624dbe
UW
21052SIM=
21053SIM_OBS=
21054if test "${ignore_sim}" = "false"; then
21055 if test x"${gdb_sim}" != x ; then
21056 SIM="${gdb_sim}"
21057 SIM_OBS="remote-sim.o"
60ca704f
SE
21058
21059cat >>confdefs.h <<\_ACEOF
7a292a7a 21060#define WITH_SIM 1
bec39cab 21061_ACEOF
7a292a7a 21062
9b624dbe 21063 fi
7a292a7a
SS
21064fi
21065
21066
21067
c906108c
SS
21068
21069
21070
21071
21072
21073
dfcd3bfb 21074
e56ac5c3
AC
21075
21076
b3a90332
AC
21077
21078
c35f4ffc 21079# List of host floatformats.
bec39cab
AC
21080
21081cat >>confdefs.h <<_ACEOF
c35f4ffc 21082#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 21083_ACEOF
c35f4ffc 21084
bec39cab
AC
21085
21086cat >>confdefs.h <<_ACEOF
c35f4ffc 21087#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
21088_ACEOF
21089
c35f4ffc 21090
bec39cab 21091cat >>confdefs.h <<_ACEOF
c35f4ffc 21092#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 21093_ACEOF
c35f4ffc
AC
21094
21095
c906108c
SS
21096# target_subdir is used by the testsuite to find the target libraries.
21097target_subdir=
21098if test "${host}" != "${target}"; then
21099 target_subdir="${target_alias}/"
21100fi
21101
21102
21103frags=
771b4502 21104if test "${gdb_native}" = "yes"; then
0dad8a66
MK
21105 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
21106 if test ! -f ${host_makefile_frag}; then
bec39cab
AC
21107 { { echo "$as_me:$LINENO: error: \"*** Gdb does not support native target ${host}\"" >&5
21108echo "$as_me: error: \"*** Gdb does not support native target ${host}\"" >&2;}
21109 { (exit 1); exit 1; }; }
0dad8a66
MK
21110 fi
21111 frags="$frags $host_makefile_frag"
21112else
21113 host_makefile_frag=/dev/null
c906108c 21114fi
c906108c 21115
c906108c
SS
21116
21117
21118
771b4502 21119if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
21120# We pick this up from the host configuration file (.mh) because we
21121# do not have a native configuration Makefile fragment.
c906108c
SS
21122nativefile=`sed -n '
21123s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
21124' ${host_makefile_frag}`
c906108c
SS
21125fi
21126
21127
b00a8037 21128if test x"${gdb_osabi}" != x ; then
bec39cab
AC
21129
21130cat >>confdefs.h <<_ACEOF
b00a8037 21131#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 21132_ACEOF
b00a8037
DJ
21133
21134fi
21135
8dcde887 21136# Enable multi-ice-gdb-server.
b4e70030 21137# Check whether --enable-multi-ice or --disable-multi-ice was given.
8dcde887 21138if test "${enable_multi_ice+set}" = set; then
b4e70030
JB
21139 enableval="$enable_multi_ice"
21140 case $enableval in
8dcde887
MK
21141 yes | no)
21142 ;;
bec39cab
AC
21143 *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-multi-ice" >&5
21144echo "$as_me: error: bad value $enableval for --enable-multi-ice" >&2;}
21145 { (exit 1); exit 1; }; } ;;
8dcde887 21146 esac
b4e70030 21147fi;
4e8d927d 21148if test "x$enable_multi_ice" = xyes; then
b4e70030
JB
21149
21150
21151subdirs="$subdirs multi-ice"
3ace7edb 21152
a85f51e7
DJ
21153fi
21154
a13e2c95
UW
21155# We only build gdbserver automatically in a native configuration.
21156if test "$gdb_native" = "yes"; then
b4e70030
JB
21157 echo "$as_me:$LINENO: checking whether gdbserver is supported on this host" >&5
21158echo $ECHO_N "checking whether gdbserver is supported on this host... $ECHO_C" >&6
8dcde887 21159 if test "x$build_gdbserver" = xyes; then
b4e70030
JB
21160 echo "$as_me:$LINENO: result: yes" >&5
21161echo "${ECHO_T}yes" >&6
21162
21163
21164subdirs="$subdirs gdbserver"
3ace7edb 21165
8dcde887 21166 else
b4e70030
JB
21167 echo "$as_me:$LINENO: result: no" >&5
21168echo "${ECHO_T}no" >&6
8dcde887
MK
21169 fi
21170fi
21171
db985757 21172# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 21173# to an empty version.
c906108c
SS
21174
21175files=
21176links=
5a2402b8 21177
c906108c 21178rm -f nm.h
5a2402b8 21179nm_h=""
c906108c 21180if test "${nativefile}" != ""; then
5a2402b8 21181 nm_h=nm.h
0f475e27
AC
21182 case "${nativefile}" in
21183 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
21184 * ) GDB_NM_FILE="${nativefile}"
21185 esac
5a2402b8
AC
21186 files="${files} ${GDB_NM_FILE}"
21187 links="${links} nm.h"
60ca704f
SE
21188
21189cat >>confdefs.h <<_ACEOF
b78960be 21190#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 21191_ACEOF
5a2402b8 21192
c906108c 21193fi
5a2402b8
AC
21194
21195
bec39cab
AC
21196ac_sources="$files"
21197ac_dests="$links"
21198while test -n "$ac_sources"; do
21199 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
21200 set $ac_sources; ac_source=$1; shift; ac_sources=$*
21201 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
21202done
b4e70030 21203 ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
21204
21205
c906108c
SS
21206
21207
c906108c 21208
bec39cab 21209cat >>confdefs.h <<\_ACEOF
6c7a06a3 21210#define GDB_DEFAULT_HOST_CHARSET "UTF-8"
bec39cab
AC
21211_ACEOF
21212
bec39cab 21213
26e251b6
JM
21214# Flags needed to enable html installing and building
21215
21216# Check whether --with-datarootdir or --without-datarootdir was given.
21217if test "${with_datarootdir+set}" = set; then
21218 withval="$with_datarootdir"
21219 datarootdir="\${prefix}/${withval}"
21220else
21221 datarootdir="\${prefix}/share"
21222fi;
21223
21224
21225# Check whether --with-docdir or --without-docdir was given.
21226if test "${with_docdir+set}" = set; then
21227 withval="$with_docdir"
21228 docdir="\${prefix}/${withval}"
21229else
21230 docdir="\${datarootdir}/doc"
21231fi;
21232
21233
21234# Check whether --with-pdfdir or --without-pdfdir was given.
21235if test "${with_pdfdir+set}" = set; then
21236 withval="$with_pdfdir"
21237 pdfdir="\${prefix}/${withval}"
21238else
21239 pdfdir="\${docdir}"
21240fi;
21241
21242
21243# Check whether --with-htmldir or --without-htmldir was given.
21244if test "${with_htmldir+set}" = set; then
21245 withval="$with_htmldir"
21246 htmldir="\${prefix}/${withval}"
21247else
21248 htmldir="\${docdir}"
21249fi;
21250
89a34d1b
JM
21251
21252
21253
21254
21255
e28b3332 21256 ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
b4e70030 21257 ac_config_commands="$ac_config_commands default"
bec39cab
AC
21258cat >confcache <<\_ACEOF
21259# This file is a shell script that caches the results of configure
21260# tests run on this system so they can be shared between configure
21261# scripts and configure runs, see configure's option --config-cache.
21262# It is not useful on other systems. If it contains results you don't
21263# want to keep, you may remove or edit it.
21264#
21265# config.status only pays attention to the cache file if you give it
21266# the --recheck option to rerun configure.
21267#
21268# `ac_cv_env_foo' variables (set or unset) will be overridden when
21269# loading this file, other *unset* `ac_cv_foo' will be assigned the
21270# following values.
21271
21272_ACEOF
21273
21274# The following way of writing the cache mishandles newlines in values,
21275# but we know of no workaround that is simple, portable, and efficient.
b4e70030 21276# So, don't put newlines in cache variables' values.
bec39cab
AC
21277# Ultrix sh set writes to stderr and can't be redirected directly,
21278# and sets the high bit in the cache file unless we assign to the vars.
b4e70030 21279{
bec39cab 21280 (set) 2>&1 |
b4e70030
JB
21281 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21282 *ac_space=\ *)
bec39cab
AC
21283 # `set' does not quote correctly, so add quotes (double-quote
21284 # substitution turns \\\\ into \\, and sed turns \\ into \).
21285 sed -n \
21286 "s/'/'\\\\''/g;
21287 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b4e70030 21288 ;;
bec39cab
AC
21289 *)
21290 # `set' quotes correctly as required by POSIX, so do not add quotes.
b4e70030
JB
21291 sed -n \
21292 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 21293 ;;
b4e70030
JB
21294 esac;
21295} |
bec39cab
AC
21296 sed '
21297 t clear
b4e70030 21298 : clear
bec39cab
AC
21299 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21300 t end
b4e70030
JB
21301 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21302 : end' >>confcache
bec39cab
AC
21303if diff $cache_file confcache >/dev/null 2>&1; then :; else
21304 if test -w $cache_file; then
b4e70030 21305 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
bec39cab
AC
21306 cat confcache >$cache_file
21307 else
b4e70030 21308 echo "not updating unwritable cache $cache_file"
bec39cab
AC
21309 fi
21310fi
21311rm -f confcache
21312
21313test "x$prefix" = xNONE && prefix=$ac_default_prefix
21314# Let make expand exec_prefix.
21315test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21316
b4e70030
JB
21317# VPATH may cause trouble with some makes, so we remove $(srcdir),
21318# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21319# trailing colons and then remove the whole line if VPATH becomes empty
21320# (actually we leave an empty line to preserve line numbers).
21321if test "x$srcdir" = x.; then
21322 ac_vpsub='/^[ ]*VPATH[ ]*=/{
21323s/:*\$(srcdir):*/:/;
21324s/:*\${srcdir}:*/:/;
21325s/:*@srcdir@:*/:/;
21326s/^\([^=]*=[ ]*\):*/\1/;
21327s/:*$//;
21328s/^[^=]*=[ ]*$//;
21329}'
21330fi
21331
bec39cab
AC
21332DEFS=-DHAVE_CONFIG_H
21333
21334ac_libobjs=
21335ac_ltlibobjs=
21336for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21337 # 1. Remove the extension, and $U if already installed.
b4e70030
JB
21338 ac_i=`echo "$ac_i" |
21339 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
21340 # 2. Add them.
21341 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21342 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
bec39cab
AC
21343done
21344LIBOBJS=$ac_libobjs
21345
21346LTLIBOBJS=$ac_ltlibobjs
21347
21348
85981d60
AC
21349if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
21350 { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
21351Usually this means the macro was only invoked conditionally." >&5
21352echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
21353Usually this means the macro was only invoked conditionally." >&2;}
21354 { (exit 1); exit 1; }; }
21355fi
a417dc56
RW
21356if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
21357 { { echo "$as_me:$LINENO: error: conditional \"GMAKE\" was never defined.
21358Usually this means the macro was only invoked conditionally." >&5
21359echo "$as_me: error: conditional \"GMAKE\" was never defined.
21360Usually this means the macro was only invoked conditionally." >&2;}
21361 { (exit 1); exit 1; }; }
21362fi
783e057b
DJ
21363if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
21364 { { echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21365Usually this means the macro was only invoked conditionally." >&5
21366echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21367Usually this means the macro was only invoked conditionally." >&2;}
21368 { (exit 1); exit 1; }; }
21369fi
21370
21371 gl_libobjs=
21372 gl_ltlibobjs=
21373 if test -n "$gl_LIBOBJS"; then
21374 # Remove the extension.
21375 sed_drop_objext='s/\.o$//;s/\.obj$//'
21376 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21377 gl_libobjs="$gl_libobjs $i.$ac_objext"
21378 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
21379 done
21380 fi
21381 gl_LIBOBJS=$gl_libobjs
21382
21383 gl_LTLIBOBJS=$gl_ltlibobjs
21384
21385
21386
21387 gltests_libobjs=
21388 gltests_ltlibobjs=
21389 if test -n "$gltests_LIBOBJS"; then
21390 # Remove the extension.
21391 sed_drop_objext='s/\.o$//;s/\.obj$//'
21392 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21393 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
21394 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
21395 done
21396 fi
21397 gltests_LIBOBJS=$gltests_libobjs
21398
21399 gltests_LTLIBOBJS=$gltests_ltlibobjs
21400
21401
e28b3332
DJ
21402if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
21403 { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
21404Usually this means the macro was only invoked conditionally." >&5
21405echo "$as_me: error: conditional \"AMDEP\" was never defined.
21406Usually this means the macro was only invoked conditionally." >&2;}
21407 { (exit 1); exit 1; }; }
21408fi
21409if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
21410 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
21411Usually this means the macro was only invoked conditionally." >&5
21412echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
21413Usually this means the macro was only invoked conditionally." >&2;}
21414 { (exit 1); exit 1; }; }
21415fi
bec39cab
AC
21416
21417: ${CONFIG_STATUS=./config.status}
21418ac_clean_files_save=$ac_clean_files
21419ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21420{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21421echo "$as_me: creating $CONFIG_STATUS" >&6;}
21422cat >$CONFIG_STATUS <<_ACEOF
21423#! $SHELL
21424# Generated by $as_me.
21425# Run this file to recreate the current configuration.
21426# Compiler output produced by configure, useful for debugging
21427# configure, is in config.log if it exists.
21428
21429debug=false
21430ac_cs_recheck=false
21431ac_cs_silent=false
21432SHELL=\${CONFIG_SHELL-$SHELL}
21433_ACEOF
21434
21435cat >>$CONFIG_STATUS <<\_ACEOF
21436## --------------------- ##
21437## M4sh Initialization. ##
21438## --------------------- ##
21439
21440# Be Bourne compatible
21441if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21442 emulate sh
21443 NULLCMD=:
21444 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21445 # is contrary to our usage. Disable this feature.
21446 alias -g '${1+"$@"}'='"$@"'
b4e70030
JB
21447elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21448 set -o posix
bec39cab
AC
21449fi
21450DUALCASE=1; export DUALCASE # for MKS sh
21451
21452# Support unset when possible.
21453if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21454 as_unset=unset
21455else
21456 as_unset=false
21457fi
21458
21459
21460# Work around bugs in pre-3.0 UWIN ksh.
b4e70030 21461$as_unset ENV MAIL MAILPATH
bec39cab
AC
21462PS1='$ '
21463PS2='> '
21464PS4='+ '
21465
21466# NLS nuisances.
21467for as_var in \
21468 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21469 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21470 LC_TELEPHONE LC_TIME
21471do
21472 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
21473 eval $as_var=C; export $as_var
21474 else
b4e70030 21475 $as_unset $as_var
bec39cab
AC
21476 fi
21477done
21478
21479# Required to use basename.
b4e70030 21480if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
21481 as_expr=expr
21482else
21483 as_expr=false
21484fi
21485
b4e70030 21486if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
bec39cab
AC
21487 as_basename=basename
21488else
21489 as_basename=false
21490fi
21491
21492
21493# Name of the executable.
b4e70030 21494as_me=`$as_basename "$0" ||
bec39cab
AC
21495$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21496 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
21497 X"$0" : 'X\(/\)$' \| \
21498 . : '\(.\)' 2>/dev/null ||
bec39cab 21499echo X/"$0" |
b4e70030
JB
21500 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21501 /^X\/\(\/\/\)$/{ s//\1/; q; }
21502 /^X\/\(\/\).*/{ s//\1/; q; }
21503 s/.*/./; q'`
bec39cab 21504
b4e70030
JB
21505
21506# PATH needs CR, and LINENO needs CR and PATH.
21507# Avoid depending upon Character Ranges.
21508as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21509as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21510as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21511as_cr_digits='0123456789'
21512as_cr_alnum=$as_cr_Letters$as_cr_digits
21513
21514# The user is always right.
21515if test "${PATH_SEPARATOR+set}" != set; then
21516 echo "#! /bin/sh" >conf$$.sh
21517 echo "exit 0" >>conf$$.sh
21518 chmod +x conf$$.sh
21519 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
21520 PATH_SEPARATOR=';'
21521 else
21522 PATH_SEPARATOR=:
21523 fi
21524 rm -f conf$$.sh
21525fi
bec39cab
AC
21526
21527
b4e70030
JB
21528 as_lineno_1=$LINENO
21529 as_lineno_2=$LINENO
21530 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21531 test "x$as_lineno_1" != "x$as_lineno_2" &&
21532 test "x$as_lineno_3" = "x$as_lineno_2" || {
21533 # Find who we are. Look in the path if we contain no path at all
21534 # relative or not.
21535 case $0 in
21536 *[\\/]* ) as_myself=$0 ;;
21537 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21538for as_dir in $PATH
21539do
21540 IFS=$as_save_IFS
21541 test -z "$as_dir" && as_dir=.
21542 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21543done
bec39cab 21544
b4e70030
JB
21545 ;;
21546 esac
21547 # We did not find ourselves, most probably we were run as `sh COMMAND'
21548 # in which case we are not to be found in the path.
21549 if test "x$as_myself" = x; then
21550 as_myself=$0
21551 fi
21552 if test ! -f "$as_myself"; then
21553 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21554echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21555 { (exit 1); exit 1; }; }
21556 fi
21557 case $CONFIG_SHELL in
21558 '')
21559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21560for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21561do
21562 IFS=$as_save_IFS
21563 test -z "$as_dir" && as_dir=.
21564 for as_base in sh bash ksh sh5; do
21565 case $as_dir in
21566 /*)
21567 if ("$as_dir/$as_base" -c '
bec39cab
AC
21568 as_lineno_1=$LINENO
21569 as_lineno_2=$LINENO
b4e70030 21570 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
bec39cab 21571 test "x$as_lineno_1" != "x$as_lineno_2" &&
b4e70030
JB
21572 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
21573 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21574 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
21575 CONFIG_SHELL=$as_dir/$as_base
21576 export CONFIG_SHELL
21577 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21578 fi;;
21579 esac
21580 done
21581done
21582;;
21583 esac
bec39cab
AC
21584
21585 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21586 # uniformly replaced by the line number. The first 'sed' inserts a
b4e70030
JB
21587 # line-number line before each line; the second 'sed' does the real
21588 # work. The second script uses 'N' to pair each line-number line
21589 # with the numbered line, and appends trailing '-' during
21590 # substitution so that $LINENO is not a special case at line end.
bec39cab 21591 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b4e70030
JB
21592 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
21593 sed '=' <$as_myself |
bec39cab
AC
21594 sed '
21595 N
b4e70030
JB
21596 s,$,-,
21597 : loop
21598 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
bec39cab 21599 t loop
b4e70030
JB
21600 s,-$,,
21601 s,^['$as_cr_digits']*\n,,
bec39cab 21602 ' >$as_me.lineno &&
b4e70030
JB
21603 chmod +x $as_me.lineno ||
21604 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21605echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
bec39cab
AC
21606 { (exit 1); exit 1; }; }
21607
21608 # Don't try to exec as it changes $[0], causing all sort of problems
21609 # (the dirname of $[0] is not the place where we might find the
b4e70030
JB
21610 # original and so on. Autoconf is especially sensible to this).
21611 . ./$as_me.lineno
bec39cab
AC
21612 # Exit status is that of the last command.
21613 exit
21614}
21615
21616
b4e70030
JB
21617case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21618 *c*,-n*) ECHO_N= ECHO_C='
21619' ECHO_T=' ' ;;
21620 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21621 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
bec39cab
AC
21622esac
21623
b4e70030 21624if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
21625 as_expr=expr
21626else
21627 as_expr=false
21628fi
21629
21630rm -f conf$$ conf$$.exe conf$$.file
21631echo >conf$$.file
21632if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030
JB
21633 # We could just check for DJGPP; but this test a) works b) is more generic
21634 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21635 if test -f conf$$.exe; then
21636 # Don't use ln at all; we don't have any links
bec39cab 21637 as_ln_s='cp -p'
b4e70030
JB
21638 else
21639 as_ln_s='ln -s'
21640 fi
bec39cab
AC
21641elif ln conf$$.file conf$$ 2>/dev/null; then
21642 as_ln_s=ln
21643else
21644 as_ln_s='cp -p'
21645fi
b4e70030 21646rm -f conf$$ conf$$.exe conf$$.file
bec39cab
AC
21647
21648if mkdir -p . 2>/dev/null; then
21649 as_mkdir_p=:
21650else
21651 test -d ./-p && rmdir ./-p
21652 as_mkdir_p=false
21653fi
21654
b4e70030 21655as_executable_p="test -f"
bec39cab
AC
21656
21657# Sed expression to map a string onto a valid CPP name.
21658as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21659
21660# Sed expression to map a string onto a valid variable name.
21661as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21662
21663
b4e70030
JB
21664# IFS
21665# We need space, tab and new line, in precisely that order.
21666as_nl='
21667'
21668IFS=" $as_nl"
21669
21670# CDPATH.
21671$as_unset CDPATH
21672
bec39cab
AC
21673exec 6>&1
21674
b4e70030 21675# Open the log real soon, to keep \$[0] and so on meaningful, and to
bec39cab 21676# report actual input values of CONFIG_FILES etc. instead of their
b4e70030
JB
21677# values after options handling. Logging --version etc. is OK.
21678exec 5>>config.log
21679{
21680 echo
21681 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21682## Running $as_me. ##
21683_ASBOX
21684} >&5
21685cat >&5 <<_CSEOF
21686
bec39cab 21687This file was extended by $as_me, which was
b4e70030 21688generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
21689
21690 CONFIG_FILES = $CONFIG_FILES
21691 CONFIG_HEADERS = $CONFIG_HEADERS
21692 CONFIG_LINKS = $CONFIG_LINKS
21693 CONFIG_COMMANDS = $CONFIG_COMMANDS
21694 $ $0 $@
21695
b4e70030
JB
21696_CSEOF
21697echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21698echo >&5
bec39cab
AC
21699_ACEOF
21700
21701# Files that config.status was made for.
b4e70030
JB
21702if test -n "$ac_config_files"; then
21703 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21704fi
234b45d4 21705
b4e70030
JB
21706if test -n "$ac_config_headers"; then
21707 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21708fi
21709
21710if test -n "$ac_config_links"; then
21711 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21712fi
21713
21714if test -n "$ac_config_commands"; then
21715 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21716fi
234b45d4 21717
bec39cab 21718cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030 21719
bec39cab
AC
21720ac_cs_usage="\
21721\`$as_me' instantiates files from templates according to the
21722current configuration.
234b45d4 21723
bec39cab 21724Usage: $0 [OPTIONS] [FILE]...
234b45d4 21725
bec39cab
AC
21726 -h, --help print this help, then exit
21727 -V, --version print version number, then exit
21728 -q, --quiet do not print progress messages
21729 -d, --debug don't remove temporary files
21730 --recheck update $as_me by reconfiguring in the same conditions
21731 --file=FILE[:TEMPLATE]
21732 instantiate the configuration file FILE
21733 --header=FILE[:TEMPLATE]
21734 instantiate the configuration header FILE
234b45d4 21735
bec39cab
AC
21736Configuration files:
21737$config_files
234b45d4 21738
bec39cab
AC
21739Configuration headers:
21740$config_headers
234b45d4 21741
bec39cab
AC
21742Configuration links:
21743$config_links
234b45d4 21744
bec39cab
AC
21745Configuration commands:
21746$config_commands
21747
21748Report bugs to <bug-autoconf@gnu.org>."
4e8d927d 21749_ACEOF
b4e70030 21750
bec39cab
AC
21751cat >>$CONFIG_STATUS <<_ACEOF
21752ac_cs_version="\\
21753config.status
b4e70030 21754configured by $0, generated by GNU Autoconf 2.59,
bec39cab
AC
21755 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21756
b4e70030 21757Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
21758This config.status script is free software; the Free Software Foundation
21759gives unlimited permission to copy, distribute and modify it."
b4e70030
JB
21760srcdir=$srcdir
21761INSTALL="$INSTALL"
bec39cab
AC
21762_ACEOF
21763
21764cat >>$CONFIG_STATUS <<\_ACEOF
21765# If no file are specified by the user, then we need to provide default
21766# value. By we need to know if files were specified by the user.
21767ac_need_defaults=:
21768while test $# != 0
21769do
21770 case $1 in
21771 --*=*)
b4e70030
JB
21772 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21773 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
bec39cab 21774 ac_shift=:
c906108c 21775 ;;
b4e70030 21776 -*)
bec39cab
AC
21777 ac_option=$1
21778 ac_optarg=$2
21779 ac_shift=shift
c906108c 21780 ;;
b4e70030
JB
21781 *) # This is not an option, so the user has probably given explicit
21782 # arguments.
21783 ac_option=$1
21784 ac_need_defaults=false;;
bec39cab 21785 esac
c906108c 21786
bec39cab
AC
21787 case $ac_option in
21788 # Handling of the options.
b4e70030
JB
21789_ACEOF
21790cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
21791 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21792 ac_cs_recheck=: ;;
b4e70030
JB
21793 --version | --vers* | -V )
21794 echo "$ac_cs_version"; exit 0 ;;
21795 --he | --h)
21796 # Conflict between --help and --header
21797 { { echo "$as_me:$LINENO: error: ambiguous option: $1
21798Try \`$0 --help' for more information." >&5
21799echo "$as_me: error: ambiguous option: $1
21800Try \`$0 --help' for more information." >&2;}
21801 { (exit 1); exit 1; }; };;
21802 --help | --hel | -h )
21803 echo "$ac_cs_usage"; exit 0 ;;
21804 --debug | --d* | -d )
bec39cab
AC
21805 debug=: ;;
21806 --file | --fil | --fi | --f )
21807 $ac_shift
21808 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
21809 ac_need_defaults=false;;
21810 --header | --heade | --head | --hea )
21811 $ac_shift
21812 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
21813 ac_need_defaults=false;;
21814 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21815 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21816 ac_cs_silent=: ;;
c906108c 21817
bec39cab 21818 # This is an error.
b4e70030
JB
21819 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21820Try \`$0 --help' for more information." >&5
21821echo "$as_me: error: unrecognized option: $1
21822Try \`$0 --help' for more information." >&2;}
bec39cab 21823 { (exit 1); exit 1; }; } ;;
c906108c 21824
b4e70030 21825 *) ac_config_targets="$ac_config_targets $1" ;;
c906108c 21826
bec39cab
AC
21827 esac
21828 shift
21829done
c906108c 21830
bec39cab 21831ac_configure_extra_args=
c906108c 21832
bec39cab
AC
21833if $ac_cs_silent; then
21834 exec 6>/dev/null
21835 ac_configure_extra_args="$ac_configure_extra_args --silent"
21836fi
c906108c 21837
bec39cab
AC
21838_ACEOF
21839cat >>$CONFIG_STATUS <<_ACEOF
21840if \$ac_cs_recheck; then
b4e70030
JB
21841 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21842 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
bec39cab
AC
21843fi
21844
21845_ACEOF
21846
21847cat >>$CONFIG_STATUS <<_ACEOF
c906108c 21848#
b4e70030 21849# INIT-COMMANDS section.
c906108c 21850#
c906108c 21851
a417dc56 21852ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 21853AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 21854
bec39cab 21855gdb_host_cpu=$gdb_host_cpu
bec39cab
AC
21856nativefile=$nativefile
21857
21858
21859_ACEOF
21860
4e8d927d 21861
b4e70030
JB
21862
21863cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab 21864for ac_config_target in $ac_config_targets
c906108c 21865do
b4e70030
JB
21866 case "$ac_config_target" in
21867 # Handling of arguments.
21868 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21869 ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
e28b3332 21870 "gnulib/Makefile" ) CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
b4e70030 21871 "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
a417dc56 21872 "depdir" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
e28b3332 21873 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
b4e70030
JB
21874 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21875 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
bec39cab
AC
21876 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21877echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21878 { (exit 1); exit 1; }; };;
c906108c
SS
21879 esac
21880done
21881
bec39cab
AC
21882# If the user did not use the arguments to specify the items to instantiate,
21883# then the envvar interface is used. Set only those that are not.
21884# We use the long form for the default assignment because of an extremely
21885# bizarre bug on SunOS 4.1.3.
21886if $ac_need_defaults; then
21887 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21888 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21889 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
21890 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21891fi
21892
b4e70030
JB
21893# Have a temporary directory for convenience. Make it in the build tree
21894# simply because there is no reason to put it here, and in addition,
21895# creating and moving files from /tmp can sometimes cause problems.
21896# Create a temporary directory, and hook for its removal unless debugging.
21897$debug ||
21898{
21899 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21900 trap '{ (exit 1); exit 1; }' 1 2 13 15
21901}
4e8d927d 21902
b4e70030 21903# Create a (secure) tmp directory for tmp files.
4e8d927d 21904
b4e70030
JB
21905{
21906 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
21907 test -n "$tmp" && test -d "$tmp"
21908} ||
21909{
21910 tmp=./confstat$$-$RANDOM
21911 (umask 077 && mkdir $tmp)
21912} ||
21913{
21914 echo "$me: cannot create a temporary directory in ." >&2
21915 { (exit 1); exit 1; }
21916}
4e8d927d 21917
b4e70030 21918_ACEOF
4e8d927d 21919
b4e70030 21920cat >>$CONFIG_STATUS <<_ACEOF
4e8d927d 21921
b4e70030
JB
21922#
21923# CONFIG_FILES section.
21924#
4e8d927d 21925
b4e70030
JB
21926# No need to generate the scripts if there are no CONFIG_FILES.
21927# This happens for instance when ./config.status config.h
21928if test -n "\$CONFIG_FILES"; then
21929 # Protect against being on the right side of a sed subst in config.status.
21930 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21931 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21932s,@SHELL@,$SHELL,;t t
21933s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21934s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21935s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21936s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21937s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21938s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21939s,@exec_prefix@,$exec_prefix,;t t
21940s,@prefix@,$prefix,;t t
21941s,@program_transform_name@,$program_transform_name,;t t
21942s,@bindir@,$bindir,;t t
21943s,@sbindir@,$sbindir,;t t
21944s,@libexecdir@,$libexecdir,;t t
21945s,@datadir@,$datadir,;t t
21946s,@sysconfdir@,$sysconfdir,;t t
21947s,@sharedstatedir@,$sharedstatedir,;t t
21948s,@localstatedir@,$localstatedir,;t t
21949s,@libdir@,$libdir,;t t
21950s,@includedir@,$includedir,;t t
21951s,@oldincludedir@,$oldincludedir,;t t
21952s,@infodir@,$infodir,;t t
21953s,@mandir@,$mandir,;t t
21954s,@build_alias@,$build_alias,;t t
21955s,@host_alias@,$host_alias,;t t
21956s,@target_alias@,$target_alias,;t t
21957s,@DEFS@,$DEFS,;t t
21958s,@ECHO_C@,$ECHO_C,;t t
21959s,@ECHO_N@,$ECHO_N,;t t
21960s,@ECHO_T@,$ECHO_T,;t t
21961s,@LIBS@,$LIBS,;t t
21962s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
21963s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
21964s,@MAINT@,$MAINT,;t t
21965s,@CC@,$CC,;t t
21966s,@CFLAGS@,$CFLAGS,;t t
21967s,@LDFLAGS@,$LDFLAGS,;t t
21968s,@CPPFLAGS@,$CPPFLAGS,;t t
21969s,@ac_ct_CC@,$ac_ct_CC,;t t
21970s,@EXEEXT@,$EXEEXT,;t t
21971s,@OBJEXT@,$OBJEXT,;t t
21972s,@CPP@,$CPP,;t t
21973s,@EGREP@,$EGREP,;t t
783e057b
DJ
21974s,@RANLIB@,$RANLIB,;t t
21975s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
b4e70030
JB
21976s,@build@,$build,;t t
21977s,@build_cpu@,$build_cpu,;t t
21978s,@build_vendor@,$build_vendor,;t t
21979s,@build_os@,$build_os,;t t
21980s,@host@,$host,;t t
21981s,@host_cpu@,$host_cpu,;t t
21982s,@host_vendor@,$host_vendor,;t t
21983s,@host_os@,$host_os,;t t
21984s,@target@,$target,;t t
21985s,@target_cpu@,$target_cpu,;t t
21986s,@target_vendor@,$target_vendor,;t t
21987s,@target_os@,$target_os,;t t
a417dc56
RW
21988s,@am__leading_dot@,$am__leading_dot,;t t
21989s,@DEPDIR@,$DEPDIR,;t t
21990s,@CCDEPMODE@,$CCDEPMODE,;t t
21991s,@MAKE@,$MAKE,;t t
21992s,@GMAKE_TRUE@,$GMAKE_TRUE,;t t
21993s,@GMAKE_FALSE@,$GMAKE_FALSE,;t t
21994s,@SET_MAKE@,$SET_MAKE,;t t
b4e70030 21995s,@USE_NLS@,$USE_NLS,;t t
20e95c23
DJ
21996s,@LIBINTL@,$LIBINTL,;t t
21997s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
21998s,@INCINTL@,$INCINTL,;t t
b4e70030 21999s,@XGETTEXT@,$XGETTEXT,;t t
20e95c23
DJ
22000s,@GMSGFMT@,$GMSGFMT,;t t
22001s,@POSUB@,$POSUB,;t t
b4e70030 22002s,@CATALOGS@,$CATALOGS,;t t
b4e70030 22003s,@DATADIRNAME@,$DATADIRNAME,;t t
b4e70030 22004s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20e95c23
DJ
22005s,@GENCAT@,$GENCAT,;t t
22006s,@CATOBJEXT@,$CATOBJEXT,;t t
b4e70030 22007s,@localedir@,$localedir,;t t
783e057b
DJ
22008s,@GL_COND_LIBTOOL_TRUE@,$GL_COND_LIBTOOL_TRUE,;t t
22009s,@GL_COND_LIBTOOL_FALSE@,$GL_COND_LIBTOOL_FALSE,;t t
22010s,@GNULIB_MEMMEM@,$GNULIB_MEMMEM,;t t
22011s,@GNULIB_MEMPCPY@,$GNULIB_MEMPCPY,;t t
22012s,@GNULIB_MEMRCHR@,$GNULIB_MEMRCHR,;t t
22013s,@GNULIB_STPCPY@,$GNULIB_STPCPY,;t t
22014s,@GNULIB_STPNCPY@,$GNULIB_STPNCPY,;t t
22015s,@GNULIB_STRCHRNUL@,$GNULIB_STRCHRNUL,;t t
22016s,@GNULIB_STRDUP@,$GNULIB_STRDUP,;t t
22017s,@GNULIB_STRNDUP@,$GNULIB_STRNDUP,;t t
22018s,@GNULIB_STRNLEN@,$GNULIB_STRNLEN,;t t
22019s,@GNULIB_STRPBRK@,$GNULIB_STRPBRK,;t t
22020s,@GNULIB_STRSEP@,$GNULIB_STRSEP,;t t
22021s,@GNULIB_STRSTR@,$GNULIB_STRSTR,;t t
22022s,@GNULIB_STRCASESTR@,$GNULIB_STRCASESTR,;t t
22023s,@GNULIB_STRTOK_R@,$GNULIB_STRTOK_R,;t t
22024s,@GNULIB_MBSLEN@,$GNULIB_MBSLEN,;t t
22025s,@GNULIB_MBSNLEN@,$GNULIB_MBSNLEN,;t t
22026s,@GNULIB_MBSCHR@,$GNULIB_MBSCHR,;t t
22027s,@GNULIB_MBSRCHR@,$GNULIB_MBSRCHR,;t t
22028s,@GNULIB_MBSSTR@,$GNULIB_MBSSTR,;t t
22029s,@GNULIB_MBSCASECMP@,$GNULIB_MBSCASECMP,;t t
22030s,@GNULIB_MBSNCASECMP@,$GNULIB_MBSNCASECMP,;t t
22031s,@GNULIB_MBSPCASECMP@,$GNULIB_MBSPCASECMP,;t t
22032s,@GNULIB_MBSCASESTR@,$GNULIB_MBSCASESTR,;t t
22033s,@GNULIB_MBSCSPN@,$GNULIB_MBSCSPN,;t t
22034s,@GNULIB_MBSPBRK@,$GNULIB_MBSPBRK,;t t
22035s,@GNULIB_MBSSPN@,$GNULIB_MBSSPN,;t t
22036s,@GNULIB_MBSSEP@,$GNULIB_MBSSEP,;t t
22037s,@GNULIB_MBSTOK_R@,$GNULIB_MBSTOK_R,;t t
22038s,@GNULIB_STRERROR@,$GNULIB_STRERROR,;t t
22039s,@GNULIB_STRSIGNAL@,$GNULIB_STRSIGNAL,;t t
22040s,@HAVE_DECL_MEMMEM@,$HAVE_DECL_MEMMEM,;t t
22041s,@HAVE_MEMPCPY@,$HAVE_MEMPCPY,;t t
22042s,@HAVE_DECL_MEMRCHR@,$HAVE_DECL_MEMRCHR,;t t
22043s,@HAVE_STPCPY@,$HAVE_STPCPY,;t t
22044s,@HAVE_STPNCPY@,$HAVE_STPNCPY,;t t
22045s,@HAVE_STRCHRNUL@,$HAVE_STRCHRNUL,;t t
22046s,@HAVE_DECL_STRDUP@,$HAVE_DECL_STRDUP,;t t
22047s,@HAVE_STRNDUP@,$HAVE_STRNDUP,;t t
22048s,@HAVE_DECL_STRNDUP@,$HAVE_DECL_STRNDUP,;t t
22049s,@HAVE_DECL_STRNLEN@,$HAVE_DECL_STRNLEN,;t t
22050s,@HAVE_STRPBRK@,$HAVE_STRPBRK,;t t
22051s,@HAVE_STRSEP@,$HAVE_STRSEP,;t t
22052s,@HAVE_STRCASESTR@,$HAVE_STRCASESTR,;t t
22053s,@HAVE_DECL_STRTOK_R@,$HAVE_DECL_STRTOK_R,;t t
22054s,@HAVE_DECL_STRERROR@,$HAVE_DECL_STRERROR,;t t
22055s,@HAVE_DECL_STRSIGNAL@,$HAVE_DECL_STRSIGNAL,;t t
22056s,@REPLACE_STRERROR@,$REPLACE_STRERROR,;t t
22057s,@REPLACE_STRSIGNAL@,$REPLACE_STRSIGNAL,;t t
22058s,@REPLACE_MEMMEM@,$REPLACE_MEMMEM,;t t
22059s,@REPLACE_STRCASESTR@,$REPLACE_STRCASESTR,;t t
22060s,@REPLACE_STRSTR@,$REPLACE_STRSTR,;t t
22061s,@HAVE_LONG_LONG_INT@,$HAVE_LONG_LONG_INT,;t t
22062s,@HAVE_UNSIGNED_LONG_LONG_INT@,$HAVE_UNSIGNED_LONG_LONG_INT,;t t
22063s,@HAVE_INTTYPES_H@,$HAVE_INTTYPES_H,;t t
22064s,@HAVE_SYS_TYPES_H@,$HAVE_SYS_TYPES_H,;t t
22065s,@INCLUDE_NEXT@,$INCLUDE_NEXT,;t t
22066s,@NEXT_STDINT_H@,$NEXT_STDINT_H,;t t
22067s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22068s,@HAVE_SYS_INTTYPES_H@,$HAVE_SYS_INTTYPES_H,;t t
22069s,@HAVE_SYS_BITYPES_H@,$HAVE_SYS_BITYPES_H,;t t
22070s,@BITSIZEOF_PTRDIFF_T@,$BITSIZEOF_PTRDIFF_T,;t t
22071s,@BITSIZEOF_SIG_ATOMIC_T@,$BITSIZEOF_SIG_ATOMIC_T,;t t
22072s,@BITSIZEOF_SIZE_T@,$BITSIZEOF_SIZE_T,;t t
22073s,@BITSIZEOF_WCHAR_T@,$BITSIZEOF_WCHAR_T,;t t
22074s,@BITSIZEOF_WINT_T@,$BITSIZEOF_WINT_T,;t t
22075s,@HAVE_SIGNED_SIG_ATOMIC_T@,$HAVE_SIGNED_SIG_ATOMIC_T,;t t
22076s,@HAVE_SIGNED_WCHAR_T@,$HAVE_SIGNED_WCHAR_T,;t t
22077s,@HAVE_SIGNED_WINT_T@,$HAVE_SIGNED_WINT_T,;t t
22078s,@PTRDIFF_T_SUFFIX@,$PTRDIFF_T_SUFFIX,;t t
22079s,@SIG_ATOMIC_T_SUFFIX@,$SIG_ATOMIC_T_SUFFIX,;t t
22080s,@SIZE_T_SUFFIX@,$SIZE_T_SUFFIX,;t t
22081s,@WCHAR_T_SUFFIX@,$WCHAR_T_SUFFIX,;t t
22082s,@WINT_T_SUFFIX@,$WINT_T_SUFFIX,;t t
22083s,@STDINT_H@,$STDINT_H,;t t
22084s,@NEXT_STRING_H@,$NEXT_STRING_H,;t t
22085s,@GNULIB_WCWIDTH@,$GNULIB_WCWIDTH,;t t
22086s,@HAVE_DECL_WCWIDTH@,$HAVE_DECL_WCWIDTH,;t t
22087s,@REPLACE_WCWIDTH@,$REPLACE_WCWIDTH,;t t
22088s,@WCHAR_H@,$WCHAR_H,;t t
22089s,@HAVE_WCHAR_H@,$HAVE_WCHAR_H,;t t
22090s,@NEXT_WCHAR_H@,$NEXT_WCHAR_H,;t t
22091s,@LIBGNU_LIBDEPS@,$LIBGNU_LIBDEPS,;t t
22092s,@LIBGNU_LTLIBDEPS@,$LIBGNU_LTLIBDEPS,;t t
d5af19ba 22093s,@GNULIB_STDINT_H@,$GNULIB_STDINT_H,;t t
b4e70030 22094s,@PACKAGE@,$PACKAGE,;t t
b4e70030
JB
22095s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22096s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22097s,@INSTALL_DATA@,$INSTALL_DATA,;t t
e28b3332 22098s,@CYGPATH_W@,$CYGPATH_W,;t t
d57a3c85 22099s,@PYTHON2_4@,$PYTHON2_4,;t t
e28b3332
DJ
22100s,@ACLOCAL@,$ACLOCAL,;t t
22101s,@AUTOCONF@,$AUTOCONF,;t t
22102s,@AUTOMAKE@,$AUTOMAKE,;t t
22103s,@AUTOHEADER@,$AUTOHEADER,;t t
22104s,@MAKEINFO@,$MAKEINFO,;t t
22105s,@install_sh@,$install_sh,;t t
22106s,@STRIP@,$STRIP,;t t
22107s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
22108s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
22109s,@mkdir_p@,$mkdir_p,;t t
22110s,@AWK@,$AWK,;t t
e28b3332
DJ
22111s,@AMTAR@,$AMTAR,;t t
22112s,@am__tar@,$am__tar,;t t
22113s,@am__untar@,$am__untar,;t t
e28b3332
DJ
22114s,@am__include@,$am__include,;t t
22115s,@am__quote@,$am__quote,;t t
22116s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
22117s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
22118s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
e28b3332
DJ
22119s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
22120s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
22121s,@subdirs@,$subdirs,;t t
22122s,@TARGET_OBS@,$TARGET_OBS,;t t
c16158bc
JM
22123s,@PKGVERSION@,$PKGVERSION,;t t
22124s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
22125s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
b4e70030
JB
22126s,@LN_S@,$LN_S,;t t
22127s,@YACC@,$YACC,;t t
22128s,@AR@,$AR,;t t
22129s,@ac_ct_AR@,$ac_ct_AR,;t t
22130s,@DLLTOOL@,$DLLTOOL,;t t
22131s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
22132s,@WINDRES@,$WINDRES,;t t
22133s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t
22134s,@MIG@,$MIG,;t t
22135s,@ac_ct_MIG@,$ac_ct_MIG,;t t
6a30b0a5
AS
22136s,@READLINE@,$READLINE,;t t
22137s,@READLINE_DEPS@,$READLINE_DEPS,;t t
22138s,@READLINE_CFLAGS@,$READLINE_CFLAGS,;t t
3841debe
DJ
22139s,@HAVE_LIBEXPAT@,$HAVE_LIBEXPAT,;t t
22140s,@LIBEXPAT@,$LIBEXPAT,;t t
22141s,@LTLIBEXPAT@,$LTLIBEXPAT,;t t
d57a3c85 22142s,@PYTHON_CFLAGS@,$PYTHON_CFLAGS,;t t
20e95c23 22143s,@ALLOCA@,$ALLOCA,;t t
b4e70030
JB
22144s,@CONFIG_LDFLAGS@,$CONFIG_LDFLAGS,;t t
22145s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
22146s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
22147s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
22148s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t
22149s,@SER_HARDWIRE@,$SER_HARDWIRE,;t t
22150s,@WIN32LIBS@,$WIN32LIBS,;t t
22151s,@LIBGUI@,$LIBGUI,;t t
22152s,@GUI_CFLAGS_X@,$GUI_CFLAGS_X,;t t
22153s,@WIN32LDAPP@,$WIN32LDAPP,;t t
22154s,@TCL_VERSION@,$TCL_VERSION,;t t
5062cc19
KS
22155s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
22156s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
22157s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
22158s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
22159s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
b4e70030 22160s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
5062cc19
KS
22161s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
22162s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
22163s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
22164s,@TCL_INCLUDE@,$TCL_INCLUDE,;t t
22165s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
22166s,@TCL_DEPS@,$TCL_DEPS,;t t
b4e70030 22167s,@TK_VERSION@,$TK_VERSION,;t t
5062cc19
KS
22168s,@TK_BIN_DIR@,$TK_BIN_DIR,;t t
22169s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t
22170s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
22171s,@TK_LIB_FLAG@,$TK_LIB_FLAG,;t t
b4e70030 22172s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
5062cc19
KS
22173s,@TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t
22174s,@TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t
22175s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t
22176s,@TK_INCLUDE@,$TK_INCLUDE,;t t
22177s,@TK_LIBRARY@,$TK_LIBRARY,;t t
22178s,@TK_DEPS@,$TK_DEPS,;t t
22179s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t
b4e70030
JB
22180s,@X_CFLAGS@,$X_CFLAGS,;t t
22181s,@X_LDFLAGS@,$X_LDFLAGS,;t t
22182s,@X_LIBS@,$X_LIBS,;t t
b4e70030
JB
22183s,@GDBTKLIBS@,$GDBTKLIBS,;t t
22184s,@GDBTK_CFLAGS@,$GDBTK_CFLAGS,;t t
22185s,@GDBTK_SRC_DIR@,$GDBTK_SRC_DIR,;t t
9b624dbe
UW
22186s,@SIM@,$SIM,;t t
22187s,@SIM_OBS@,$SIM_OBS,;t t
b4e70030
JB
22188s,@ENABLE_CFLAGS@,$ENABLE_CFLAGS,;t t
22189s,@PROFILE_CFLAGS@,$PROFILE_CFLAGS,;t t
22190s,@CONFIG_OBS@,$CONFIG_OBS,;t t
22191s,@CONFIG_DEPS@,$CONFIG_DEPS,;t t
22192s,@CONFIG_SRCS@,$CONFIG_SRCS,;t t
22193s,@CONFIG_ALL@,$CONFIG_ALL,;t t
22194s,@CONFIG_CLEAN@,$CONFIG_CLEAN,;t t
22195s,@CONFIG_INSTALL@,$CONFIG_INSTALL,;t t
22196s,@CONFIG_UNINSTALL@,$CONFIG_UNINSTALL,;t t
22197s,@target_subdir@,$target_subdir,;t t
22198s,@frags@,$frags,;t t
b4e70030 22199s,@nm_h@,$nm_h,;t t
89a34d1b
JM
22200s,@datarootdir@,$datarootdir,;t t
22201s,@docdir@,$docdir,;t t
22202s,@htmldir@,$htmldir,;t t
22203s,@pdfdir@,$pdfdir,;t t
b4e70030
JB
22204s,@LIBOBJS@,$LIBOBJS,;t t
22205s,@LTLIBOBJS@,$LTLIBOBJS,;t t
783e057b
DJ
22206s,@gl_LIBOBJS@,$gl_LIBOBJS,;t t
22207s,@gl_LTLIBOBJS@,$gl_LTLIBOBJS,;t t
22208s,@gltests_LIBOBJS@,$gltests_LIBOBJS,;t t
22209s,@gltests_LTLIBOBJS@,$gltests_LTLIBOBJS,;t t
b4e70030
JB
22210/@host_makefile_frag@/r $host_makefile_frag
22211s,@host_makefile_frag@,,;t t
b4e70030
JB
22212CEOF
22213
22214_ACEOF
22215
22216 cat >>$CONFIG_STATUS <<\_ACEOF
22217 # Split the substitutions into bite-sized pieces for seds with
22218 # small command number limits, like on Digital OSF/1 and HP-UX.
22219 ac_max_sed_lines=48
22220 ac_sed_frag=1 # Number of current file.
22221 ac_beg=1 # First line for current file.
22222 ac_end=$ac_max_sed_lines # Line after last line for current file.
22223 ac_more_lines=:
22224 ac_sed_cmds=
22225 while $ac_more_lines; do
22226 if test $ac_beg -gt 1; then
22227 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22228 else
22229 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
4e8d927d 22230 fi
b4e70030
JB
22231 if test ! -s $tmp/subs.frag; then
22232 ac_more_lines=false
22233 else
22234 # The purpose of the label and of the branching condition is to
22235 # speed up the sed processing (if there are no `@' at all, there
22236 # is no need to browse any of the substitutions).
22237 # These are the two extra sed commands mentioned above.
22238 (echo ':t
22239 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22240 if test -z "$ac_sed_cmds"; then
22241 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22242 else
22243 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22244 fi
22245 ac_sed_frag=`expr $ac_sed_frag + 1`
22246 ac_beg=$ac_end
22247 ac_end=`expr $ac_end + $ac_max_sed_lines`
22248 fi
22249 done
22250 if test -z "$ac_sed_cmds"; then
22251 ac_sed_cmds=cat
22252 fi
22253fi # test -n "$CONFIG_FILES"
4e8d927d 22254
b4e70030
JB
22255_ACEOF
22256cat >>$CONFIG_STATUS <<\_ACEOF
22257for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22258 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22259 case $ac_file in
22260 - | *:- | *:-:* ) # input from stdin
22261 cat >$tmp/stdin
22262 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22263 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22264 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22265 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22266 * ) ac_file_in=$ac_file.in ;;
c906108c
SS
22267 esac
22268
b4e70030
JB
22269 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22270 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
bec39cab
AC
22271$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22272 X"$ac_file" : 'X\(//\)[^/]' \| \
22273 X"$ac_file" : 'X\(//\)$' \| \
b4e70030
JB
22274 X"$ac_file" : 'X\(/\)' \| \
22275 . : '\(.\)' 2>/dev/null ||
bec39cab 22276echo X"$ac_file" |
b4e70030
JB
22277 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22278 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22279 /^X\(\/\/\)$/{ s//\1/; q; }
22280 /^X\(\/\).*/{ s//\1/; q; }
22281 s/.*/./; q'`
22282 { if $as_mkdir_p; then
22283 mkdir -p "$ac_dir"
22284 else
22285 as_dir="$ac_dir"
bec39cab 22286 as_dirs=
b4e70030
JB
22287 while test ! -d "$as_dir"; do
22288 as_dirs="$as_dir $as_dirs"
22289 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
22290$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22291 X"$as_dir" : 'X\(//\)[^/]' \| \
22292 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
22293 X"$as_dir" : 'X\(/\)' \| \
22294 . : '\(.\)' 2>/dev/null ||
bec39cab 22295echo X"$as_dir" |
b4e70030
JB
22296 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22297 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22298 /^X\(\/\/\)$/{ s//\1/; q; }
22299 /^X\(\/\).*/{ s//\1/; q; }
22300 s/.*/./; q'`
bec39cab 22301 done
b4e70030
JB
22302 test ! -n "$as_dirs" || mkdir $as_dirs
22303 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22304echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 22305 { (exit 1); exit 1; }; }; }
b4e70030 22306
bec39cab
AC
22307 ac_builddir=.
22308
b4e70030 22309if test "$ac_dir" != .; then
bec39cab 22310 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
22311 # A "../" for each directory in $ac_dir_suffix.
22312 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22313else
22314 ac_dir_suffix= ac_top_builddir=
22315fi
bec39cab
AC
22316
22317case $srcdir in
b4e70030 22318 .) # No --srcdir option. We are building in place.
bec39cab 22319 ac_srcdir=.
b4e70030
JB
22320 if test -z "$ac_top_builddir"; then
22321 ac_top_srcdir=.
22322 else
22323 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22324 fi ;;
22325 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 22326 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
22327 ac_top_srcdir=$srcdir ;;
22328 *) # Relative path.
22329 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22330 ac_top_srcdir=$ac_top_builddir$srcdir ;;
bec39cab
AC
22331esac
22332
b4e70030
JB
22333# Do not use `cd foo && pwd` to compute absolute paths, because
22334# the directories may not exist.
22335case `pwd` in
22336.) ac_abs_builddir="$ac_dir";;
22337*)
22338 case "$ac_dir" in
22339 .) ac_abs_builddir=`pwd`;;
22340 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22341 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22342 esac;;
22343esac
22344case $ac_abs_builddir in
22345.) ac_abs_top_builddir=${ac_top_builddir}.;;
22346*)
22347 case ${ac_top_builddir}. in
22348 .) ac_abs_top_builddir=$ac_abs_builddir;;
22349 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22350 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22351 esac;;
22352esac
22353case $ac_abs_builddir in
22354.) ac_abs_srcdir=$ac_srcdir;;
22355*)
22356 case $ac_srcdir in
22357 .) ac_abs_srcdir=$ac_abs_builddir;;
22358 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22359 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22360 esac;;
22361esac
22362case $ac_abs_builddir in
22363.) ac_abs_top_srcdir=$ac_top_srcdir;;
22364*)
22365 case $ac_top_srcdir in
22366 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22367 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22368 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22369 esac;;
22370esac
c906108c 22371
c906108c 22372
bec39cab
AC
22373 case $INSTALL in
22374 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
b4e70030 22375 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
c906108c 22376 esac
121ce6e5 22377
b4e70030
JB
22378 if test x"$ac_file" != x-; then
22379 { echo "$as_me:$LINENO: creating $ac_file" >&5
22380echo "$as_me: creating $ac_file" >&6;}
22381 rm -f "$ac_file"
22382 fi
22383 # Let's still pretend it is `configure' which instantiates (i.e., don't
22384 # use $as_me), people would be surprised to read:
22385 # /* config.h. Generated by config.status. */
22386 if test x"$ac_file" = x-; then
22387 configure_input=
22388 else
22389 configure_input="$ac_file. "
22390 fi
22391 configure_input=$configure_input"Generated from `echo $ac_file_in |
22392 sed 's,.*/,,'` by configure."
22393
22394 # First look for the input files in the build tree, otherwise in the
22395 # src tree.
22396 ac_file_inputs=`IFS=:
22397 for f in $ac_file_in; do
22398 case $f in
22399 -) echo $tmp/stdin ;;
22400 [\\/$]*)
22401 # Absolute (can't be DOS-style, as IFS=:)
22402 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22403echo "$as_me: error: cannot find input file: $f" >&2;}
22404 { (exit 1); exit 1; }; }
22405 echo "$f";;
22406 *) # Relative
22407 if test -f "$f"; then
22408 # Build tree
22409 echo "$f"
22410 elif test -f "$srcdir/$f"; then
22411 # Source tree
22412 echo "$srcdir/$f"
22413 else
22414 # /dev/null tree
22415 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22416echo "$as_me: error: cannot find input file: $f" >&2;}
22417 { (exit 1); exit 1; }; }
22418 fi;;
22419 esac
22420 done` || { (exit 1); exit 1; }
4e8d927d 22421_ACEOF
bec39cab
AC
22422cat >>$CONFIG_STATUS <<_ACEOF
22423 sed "$ac_vpsub
22424$extrasub
22425_ACEOF
22426cat >>$CONFIG_STATUS <<\_ACEOF
22427:t
22428/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b4e70030
JB
22429s,@configure_input@,$configure_input,;t t
22430s,@srcdir@,$ac_srcdir,;t t
22431s,@abs_srcdir@,$ac_abs_srcdir,;t t
22432s,@top_srcdir@,$ac_top_srcdir,;t t
22433s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22434s,@builddir@,$ac_builddir,;t t
22435s,@abs_builddir@,$ac_abs_builddir,;t t
22436s,@top_builddir@,$ac_top_builddir,;t t
22437s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22438s,@INSTALL@,$ac_INSTALL,;t t
22439" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22440 rm -f $tmp/stdin
22441 if test x"$ac_file" != x-; then
22442 mv $tmp/out $ac_file
22443 else
22444 cat $tmp/out
22445 rm -f $tmp/out
22446 fi
22447
22448done
22449_ACEOF
22450cat >>$CONFIG_STATUS <<\_ACEOF
22451
22452#
22453# CONFIG_HEADER section.
22454#
22455
22456# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22457# NAME is the cpp macro being defined and VALUE is the value it is being given.
22458#
22459# ac_d sets the value in "#define NAME VALUE" lines.
22460ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22461ac_dB='[ ].*$,\1#\2'
22462ac_dC=' '
22463ac_dD=',;t'
22464# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22465ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
22466ac_uB='$,\1#\2define\3'
22467ac_uC=' '
22468ac_uD=',;t'
22469
22470for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22471 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
bec39cab 22472 case $ac_file in
b4e70030
JB
22473 - | *:- | *:-:* ) # input from stdin
22474 cat >$tmp/stdin
22475 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22476 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22477 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22478 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22479 * ) ac_file_in=$ac_file.in ;;
c906108c 22480 esac
b4e70030
JB
22481
22482 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22483echo "$as_me: creating $ac_file" >&6;}
22484
22485 # First look for the input files in the build tree, otherwise in the
22486 # src tree.
22487 ac_file_inputs=`IFS=:
22488 for f in $ac_file_in; do
22489 case $f in
22490 -) echo $tmp/stdin ;;
22491 [\\/$]*)
22492 # Absolute (can't be DOS-style, as IFS=:)
22493 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22494echo "$as_me: error: cannot find input file: $f" >&2;}
22495 { (exit 1); exit 1; }; }
22496 # Do quote $f, to prevent DOS paths from being IFS'd.
22497 echo "$f";;
22498 *) # Relative
22499 if test -f "$f"; then
22500 # Build tree
22501 echo "$f"
22502 elif test -f "$srcdir/$f"; then
22503 # Source tree
22504 echo "$srcdir/$f"
22505 else
22506 # /dev/null tree
22507 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22508echo "$as_me: error: cannot find input file: $f" >&2;}
22509 { (exit 1); exit 1; }; }
22510 fi;;
22511 esac
22512 done` || { (exit 1); exit 1; }
22513 # Remove the trailing spaces.
22514 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
22515
22516_ACEOF
22517
22518# Transform confdefs.h into two sed scripts, `conftest.defines' and
22519# `conftest.undefs', that substitutes the proper values into
22520# config.h.in to produce config.h. The first handles `#define'
22521# templates, and the second `#undef' templates.
22522# And first: Protect against being on the right side of a sed subst in
22523# config.status. Protect against being in an unquoted here document
22524# in config.status.
22525rm -f conftest.defines conftest.undefs
22526# Using a here document instead of a string reduces the quoting nightmare.
22527# Putting comments in sed scripts is not portable.
22528#
22529# `end' is used to avoid that the second main sed command (meant for
22530# 0-ary CPP macros) applies to n-ary macro definitions.
22531# See the Autoconf documentation for `clear'.
22532cat >confdef2sed.sed <<\_ACEOF
22533s/[\\&,]/\\&/g
22534s,[\\$`],\\&,g
22535t clear
22536: clear
22537s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
22538t end
22539s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
22540: end
22541_ACEOF
22542# If some macros were called several times there might be several times
22543# the same #defines, which is useless. Nevertheless, we may not want to
22544# sort them, since we want the *last* AC-DEFINE to be honored.
22545uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22546sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22547rm -f confdef2sed.sed
22548
22549# This sed command replaces #undef with comments. This is necessary, for
c906108c
SS
22550# example, in the case of _POSIX_SOURCE, which is predefined and required
22551# on some systems where configure will not decide to define it.
b4e70030
JB
22552cat >>conftest.undefs <<\_ACEOF
22553s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
22554_ACEOF
22555
22556# Break up conftest.defines because some shells have a limit on the size
22557# of here documents, and old seds have small limits too (100 cmds).
22558echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
22559echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
22560echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22561echo ' :' >>$CONFIG_STATUS
22562rm -f conftest.tail
22563while grep . conftest.defines >/dev/null
bec39cab 22564do
b4e70030
JB
22565 # Write a limited-size here document to $tmp/defines.sed.
22566 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22567 # Speed up: don't consider the non `#define' lines.
22568 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
22569 # Work around the forget-to-reset-the-flag bug.
22570 echo 't clr' >>$CONFIG_STATUS
22571 echo ': clr' >>$CONFIG_STATUS
22572 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
bec39cab 22573 echo 'CEOF
b4e70030
JB
22574 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22575 rm -f $tmp/in
22576 mv $tmp/out $tmp/in
22577' >>$CONFIG_STATUS
22578 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
bec39cab
AC
22579 rm -f conftest.defines
22580 mv conftest.tail conftest.defines
22581done
b4e70030
JB
22582rm -f conftest.defines
22583echo ' fi # grep' >>$CONFIG_STATUS
22584echo >>$CONFIG_STATUS
22585
22586# Break up conftest.undefs because some shells have a limit on the size
22587# of here documents, and old seds have small limits too (100 cmds).
22588echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22589rm -f conftest.tail
22590while grep . conftest.undefs >/dev/null
22591do
22592 # Write a limited-size here document to $tmp/undefs.sed.
22593 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22594 # Speed up: don't consider the non `#undef'
22595 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
22596 # Work around the forget-to-reset-the-flag bug.
22597 echo 't clr' >>$CONFIG_STATUS
22598 echo ': clr' >>$CONFIG_STATUS
22599 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22600 echo 'CEOF
22601 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22602 rm -f $tmp/in
22603 mv $tmp/out $tmp/in
22604' >>$CONFIG_STATUS
22605 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22606 rm -f conftest.undefs
22607 mv conftest.tail conftest.undefs
22608done
22609rm -f conftest.undefs
bec39cab
AC
22610
22611cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030
JB
22612 # Let's still pretend it is `configure' which instantiates (i.e., don't
22613 # use $as_me), people would be surprised to read:
22614 # /* config.h. Generated by config.status. */
22615 if test x"$ac_file" = x-; then
22616 echo "/* Generated by configure. */" >$tmp/config.h
22617 else
22618 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
22619 fi
22620 cat $tmp/in >>$tmp/config.h
22621 rm -f $tmp/in
bec39cab 22622 if test x"$ac_file" != x-; then
b4e70030 22623 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
bec39cab
AC
22624 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22625echo "$as_me: $ac_file is unchanged" >&6;}
22626 else
b4e70030
JB
22627 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22628$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22629 X"$ac_file" : 'X\(//\)[^/]' \| \
22630 X"$ac_file" : 'X\(//\)$' \| \
22631 X"$ac_file" : 'X\(/\)' \| \
22632 . : '\(.\)' 2>/dev/null ||
22633echo X"$ac_file" |
22634 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22635 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22636 /^X\(\/\/\)$/{ s//\1/; q; }
22637 /^X\(\/\).*/{ s//\1/; q; }
22638 s/.*/./; q'`
22639 { if $as_mkdir_p; then
22640 mkdir -p "$ac_dir"
22641 else
22642 as_dir="$ac_dir"
22643 as_dirs=
22644 while test ! -d "$as_dir"; do
22645 as_dirs="$as_dir $as_dirs"
22646 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22647$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22648 X"$as_dir" : 'X\(//\)[^/]' \| \
22649 X"$as_dir" : 'X\(//\)$' \| \
22650 X"$as_dir" : 'X\(/\)' \| \
22651 . : '\(.\)' 2>/dev/null ||
22652echo X"$as_dir" |
22653 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22654 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22655 /^X\(\/\/\)$/{ s//\1/; q; }
22656 /^X\(\/\).*/{ s//\1/; q; }
22657 s/.*/./; q'`
22658 done
22659 test ! -n "$as_dirs" || mkdir $as_dirs
22660 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22661echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22662 { (exit 1); exit 1; }; }; }
22663
bec39cab 22664 rm -f $ac_file
b4e70030 22665 mv $tmp/config.h $ac_file
bec39cab
AC
22666 fi
22667 else
b4e70030
JB
22668 cat $tmp/config.h
22669 rm -f $tmp/config.h
bec39cab 22670 fi
e28b3332
DJ
22671# Compute $ac_file's index in $config_headers.
22672_am_stamp_count=1
22673for _am_header in $config_headers :; do
22674 case $_am_header in
22675 $ac_file | $ac_file:* )
22676 break ;;
22677 * )
22678 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
22679 esac
22680done
22681echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
22682$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22683 X$ac_file : 'X\(//\)[^/]' \| \
22684 X$ac_file : 'X\(//\)$' \| \
22685 X$ac_file : 'X\(/\)' \| \
22686 . : '\(.\)' 2>/dev/null ||
22687echo X$ac_file |
22688 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22689 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22690 /^X\(\/\/\)$/{ s//\1/; q; }
22691 /^X\(\/\).*/{ s//\1/; q; }
22692 s/.*/./; q'`/stamp-h$_am_stamp_count
b4e70030
JB
22693done
22694_ACEOF
22695cat >>$CONFIG_STATUS <<\_ACEOF
22696
22697#
22698# CONFIG_LINKS section.
22699#
22700
22701for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
22702 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22703 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c906108c 22704
b4e70030
JB
22705 { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
22706echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
c906108c
SS
22707
22708 if test ! -r $srcdir/$ac_source; then
bec39cab
AC
22709 { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
22710echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
22711 { (exit 1); exit 1; }; }
c906108c 22712 fi
b4e70030
JB
22713 rm -f $ac_dest
22714
22715 # Make relative symlinks.
22716 ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
22717$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22718 X"$ac_dest" : 'X\(//\)[^/]' \| \
22719 X"$ac_dest" : 'X\(//\)$' \| \
22720 X"$ac_dest" : 'X\(/\)' \| \
22721 . : '\(.\)' 2>/dev/null ||
22722echo X"$ac_dest" |
22723 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22724 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22725 /^X\(\/\/\)$/{ s//\1/; q; }
22726 /^X\(\/\).*/{ s//\1/; q; }
22727 s/.*/./; q'`
22728 { if $as_mkdir_p; then
22729 mkdir -p "$ac_dest_dir"
22730 else
22731 as_dir="$ac_dest_dir"
22732 as_dirs=
22733 while test ! -d "$as_dir"; do
22734 as_dirs="$as_dir $as_dirs"
22735 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22736$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22737 X"$as_dir" : 'X\(//\)[^/]' \| \
22738 X"$as_dir" : 'X\(//\)$' \| \
22739 X"$as_dir" : 'X\(/\)' \| \
22740 . : '\(.\)' 2>/dev/null ||
22741echo X"$as_dir" |
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 done
22748 test ! -n "$as_dirs" || mkdir $as_dirs
22749 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
22750echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
22751 { (exit 1); exit 1; }; }; }
22752
22753 ac_builddir=.
22754
22755if test "$ac_dest_dir" != .; then
22756 ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
22757 # A "../" for each directory in $ac_dir_suffix.
22758 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22759else
22760 ac_dir_suffix= ac_top_builddir=
22761fi
22762
22763case $srcdir in
22764 .) # No --srcdir option. We are building in place.
22765 ac_srcdir=.
22766 if test -z "$ac_top_builddir"; then
22767 ac_top_srcdir=.
22768 else
22769 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22770 fi ;;
22771 [\\/]* | ?:[\\/]* ) # Absolute path.
22772 ac_srcdir=$srcdir$ac_dir_suffix;
22773 ac_top_srcdir=$srcdir ;;
22774 *) # Relative path.
22775 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22776 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22777esac
22778
22779# Do not use `cd foo && pwd` to compute absolute paths, because
22780# the directories may not exist.
22781case `pwd` in
22782.) ac_abs_builddir="$ac_dest_dir";;
22783*)
22784 case "$ac_dest_dir" in
22785 .) ac_abs_builddir=`pwd`;;
22786 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
22787 *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
22788 esac;;
22789esac
22790case $ac_abs_builddir in
22791.) ac_abs_top_builddir=${ac_top_builddir}.;;
22792*)
22793 case ${ac_top_builddir}. in
22794 .) ac_abs_top_builddir=$ac_abs_builddir;;
22795 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22796 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22797 esac;;
22798esac
22799case $ac_abs_builddir in
22800.) ac_abs_srcdir=$ac_srcdir;;
22801*)
22802 case $ac_srcdir in
22803 .) ac_abs_srcdir=$ac_abs_builddir;;
22804 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22805 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22806 esac;;
22807esac
22808case $ac_abs_builddir in
22809.) ac_abs_top_srcdir=$ac_top_srcdir;;
22810*)
22811 case $ac_top_srcdir in
22812 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22813 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22814 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22815 esac;;
22816esac
22817
bec39cab
AC
22818
22819 case $srcdir in
22820 [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
b4e70030 22821 *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
c906108c 22822 esac
b4e70030
JB
22823
22824 # Try a symlink, then a hard link, then a copy.
22825 ln -s $ac_rel_source $ac_dest 2>/dev/null ||
22826 ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
22827 cp -p $srcdir/$ac_source $ac_dest ||
22828 { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
22829echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
bec39cab 22830 { (exit 1); exit 1; }; }
b4e70030
JB
22831done
22832_ACEOF
22833cat >>$CONFIG_STATUS <<\_ACEOF
22834
22835#
22836# CONFIG_COMMANDS section.
22837#
22838for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22839 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22840 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22841 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
22842$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22843 X"$ac_dest" : 'X\(//\)[^/]' \| \
22844 X"$ac_dest" : 'X\(//\)$' \| \
22845 X"$ac_dest" : 'X\(/\)' \| \
22846 . : '\(.\)' 2>/dev/null ||
22847echo X"$ac_dest" |
22848 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22849 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22850 /^X\(\/\/\)$/{ s//\1/; q; }
22851 /^X\(\/\).*/{ s//\1/; q; }
22852 s/.*/./; q'`
22853 { if $as_mkdir_p; then
22854 mkdir -p "$ac_dir"
22855 else
22856 as_dir="$ac_dir"
22857 as_dirs=
22858 while test ! -d "$as_dir"; do
22859 as_dirs="$as_dir $as_dirs"
22860 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22861$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22862 X"$as_dir" : 'X\(//\)[^/]' \| \
22863 X"$as_dir" : 'X\(//\)$' \| \
22864 X"$as_dir" : 'X\(/\)' \| \
22865 . : '\(.\)' 2>/dev/null ||
22866echo X"$as_dir" |
22867 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22868 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22869 /^X\(\/\/\)$/{ s//\1/; q; }
22870 /^X\(\/\).*/{ s//\1/; q; }
22871 s/.*/./; q'`
22872 done
22873 test ! -n "$as_dirs" || mkdir $as_dirs
22874 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22875echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22876 { (exit 1); exit 1; }; }; }
22877
22878 ac_builddir=.
22879
22880if test "$ac_dir" != .; then
22881 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22882 # A "../" for each directory in $ac_dir_suffix.
22883 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22884else
22885 ac_dir_suffix= ac_top_builddir=
22886fi
22887
22888case $srcdir in
22889 .) # No --srcdir option. We are building in place.
22890 ac_srcdir=.
22891 if test -z "$ac_top_builddir"; then
22892 ac_top_srcdir=.
22893 else
22894 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22895 fi ;;
22896 [\\/]* | ?:[\\/]* ) # Absolute path.
22897 ac_srcdir=$srcdir$ac_dir_suffix;
22898 ac_top_srcdir=$srcdir ;;
22899 *) # Relative path.
22900 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22901 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22902esac
22903
22904# Do not use `cd foo && pwd` to compute absolute paths, because
22905# the directories may not exist.
22906case `pwd` in
22907.) ac_abs_builddir="$ac_dir";;
22908*)
22909 case "$ac_dir" in
22910 .) ac_abs_builddir=`pwd`;;
22911 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22912 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22913 esac;;
22914esac
22915case $ac_abs_builddir in
22916.) ac_abs_top_builddir=${ac_top_builddir}.;;
22917*)
22918 case ${ac_top_builddir}. in
22919 .) ac_abs_top_builddir=$ac_abs_builddir;;
22920 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22921 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22922 esac;;
22923esac
22924case $ac_abs_builddir in
22925.) ac_abs_srcdir=$ac_srcdir;;
22926*)
22927 case $ac_srcdir in
22928 .) ac_abs_srcdir=$ac_abs_builddir;;
22929 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22930 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22931 esac;;
22932esac
22933case $ac_abs_builddir in
22934.) ac_abs_top_srcdir=$ac_top_srcdir;;
22935*)
22936 case $ac_top_srcdir in
22937 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22938 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22939 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22940 esac;;
22941esac
bec39cab 22942
bec39cab 22943
b4e70030
JB
22944 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
22945echo "$as_me: executing $ac_dest commands" >&6;}
22946 case $ac_dest in
a417dc56 22947 depdir ) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
e28b3332
DJ
22948 depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
22949 # Strip MF so we end up with the name of the file.
22950 mf=`echo "$mf" | sed -e 's/:.*$//'`
22951 # Check whether this is an Automake generated Makefile or not.
22952 # We used to match only the files named `Makefile.in', but
22953 # some people rename them; so instead we look at the file content.
22954 # Grep'ing the first line is not enough: some people post-process
22955 # each Makefile.in and add a new line on top of each file to say so.
22956 # So let's grep whole file.
22957 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
22958 dirpart=`(dirname "$mf") 2>/dev/null ||
22959$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22960 X"$mf" : 'X\(//\)[^/]' \| \
22961 X"$mf" : 'X\(//\)$' \| \
22962 X"$mf" : 'X\(/\)' \| \
22963 . : '\(.\)' 2>/dev/null ||
22964echo X"$mf" |
22965 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22966 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22967 /^X\(\/\/\)$/{ s//\1/; q; }
22968 /^X\(\/\).*/{ s//\1/; q; }
22969 s/.*/./; q'`
22970 else
22971 continue
22972 fi
22973 # Extract the definition of DEPDIR, am__include, and am__quote
22974 # from the Makefile without running `make'.
22975 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
22976 test -z "$DEPDIR" && continue
22977 am__include=`sed -n 's/^am__include = //p' < "$mf"`
22978 test -z "am__include" && continue
22979 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
22980 # When using ansi2knr, U may be empty or an underscore; expand it
22981 U=`sed -n 's/^U = //p' < "$mf"`
22982 # Find all dependency output files, they are included files with
22983 # $(DEPDIR) in their names. We invoke sed twice because it is the
22984 # simplest approach to changing $(DEPDIR) to its actual value in the
22985 # expansion.
22986 for file in `sed -n "
22987 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
22988 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
22989 # Make sure the directory exists.
22990 test -f "$dirpart/$file" && continue
22991 fdir=`(dirname "$file") 2>/dev/null ||
22992$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22993 X"$file" : 'X\(//\)[^/]' \| \
22994 X"$file" : 'X\(//\)$' \| \
22995 X"$file" : 'X\(/\)' \| \
22996 . : '\(.\)' 2>/dev/null ||
22997echo X"$file" |
22998 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22999 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23000 /^X\(\/\/\)$/{ s//\1/; q; }
23001 /^X\(\/\).*/{ s//\1/; q; }
23002 s/.*/./; q'`
23003 { if $as_mkdir_p; then
23004 mkdir -p $dirpart/$fdir
23005 else
23006 as_dir=$dirpart/$fdir
23007 as_dirs=
23008 while test ! -d "$as_dir"; do
23009 as_dirs="$as_dir $as_dirs"
23010 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23011$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23012 X"$as_dir" : 'X\(//\)[^/]' \| \
23013 X"$as_dir" : 'X\(//\)$' \| \
23014 X"$as_dir" : 'X\(/\)' \| \
23015 . : '\(.\)' 2>/dev/null ||
23016echo X"$as_dir" |
23017 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23018 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23019 /^X\(\/\/\)$/{ s//\1/; q; }
23020 /^X\(\/\).*/{ s//\1/; q; }
23021 s/.*/./; q'`
23022 done
23023 test ! -n "$as_dirs" || mkdir $as_dirs
23024 fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
23025echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
23026 { (exit 1); exit 1; }; }; }
23027
23028 # echo "creating $dirpart/$file"
23029 echo '# dummy' > "$dirpart/$file"
23030 done
23031done
4e8d927d 23032 ;;
b4e70030 23033 default )
c906108c 23034
db985757 23035sed -e '/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
c906108c
SS
23036mv -f Makefile.tmp Makefile
23037
2acceee2 23038
c906108c
SS
23039case x$CONFIG_HEADERS in
23040xconfig.h:config.in)
23041echo > stamp-h ;;
23042esac
bec39cab
AC
23043 ;;
23044 esac
b4e70030
JB
23045done
23046_ACEOF
c906108c 23047
b4e70030 23048cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
23049
23050{ (exit 0); exit 0; }
23051_ACEOF
c906108c 23052chmod +x $CONFIG_STATUS
bec39cab
AC
23053ac_clean_files=$ac_clean_files_save
23054
23055
23056# configure is writing to config.log, and then calls config.status.
23057# config.status does its own redirection, appending to config.log.
23058# Unfortunately, on DOS this fails, as config.log is still kept open
23059# by configure, so config.status won't be able to write to it; its
23060# output is simply discarded. So we exec the FD to /dev/null,
23061# effectively closing config.log, so it can be properly (re)opened and
23062# appended to by config.status. When coming back to configure, we
23063# need to make the FD available again.
23064if test "$no_create" != yes; then
23065 ac_cs_success=:
23066 ac_config_status_args=
23067 test "$silent" = yes &&
23068 ac_config_status_args="$ac_config_status_args --quiet"
23069 exec 5>/dev/null
23070 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23071 exec 5>>config.log
23072 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23073 # would make configure fail if this is the last instruction.
23074 $ac_cs_success || { (exit 1); exit 1; }
23075fi
c906108c 23076
bec39cab 23077#
fdc59709 23078# CONFIG_SUBDIRS section, as fixed in confsubdir.m4.
bec39cab 23079#
c906108c
SS
23080if test "$no_recursion" != yes; then
23081
23082 # Remove --cache-file and --srcdir arguments so they do not pile up.
23083 ac_sub_configure_args=
23084 ac_prev=
fdc59709
PB
23085 eval "set x $ac_configure_args"
23086 shift
23087 for ac_arg
23088 do
c906108c
SS
23089 if test -n "$ac_prev"; then
23090 ac_prev=
23091 continue
23092 fi
bec39cab 23093 case $ac_arg in
c906108c
SS
23094 -cache-file | --cache-file | --cache-fil | --cache-fi \
23095 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
23096 ac_prev=cache_file ;;
23097 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
23098 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
23099 | --c=*)
23100 ;;
23101 --config-cache | -C)
c906108c
SS
23102 ;;
23103 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
23104 ac_prev=srcdir ;;
23105 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
23106 ;;
bec39cab
AC
23107 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
23108 ac_prev=prefix ;;
23109 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
23110 ;;
fdc59709
PB
23111 *)
23112 case $ac_arg in
23113 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
23114 esac
23115 ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
c906108c
SS
23116 esac
23117 done
23118
bec39cab
AC
23119 # Always prepend --prefix to ensure using the same prefix
23120 # in subdir configurations.
fdc59709
PB
23121 ac_arg="--prefix=$prefix"
23122 case $ac_arg in
23123 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
23124 esac
23125 ac_sub_configure_args="$ac_arg $ac_sub_configure_args"
bec39cab 23126
b4e70030 23127 ac_popdir=`pwd`
bec39cab 23128 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
23129
23130 # Do not complain, so a configure script can configure whichever
23131 # parts of a large source tree are present.
fdc59709 23132 test -d "$srcdir/$ac_dir" || continue
c906108c 23133
b4e70030
JB
23134 { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
23135echo "$as_me: configuring in $ac_dir" >&6;}
23136 { if $as_mkdir_p; then
23137 mkdir -p "$ac_dir"
23138 else
23139 as_dir="$ac_dir"
bec39cab 23140 as_dirs=
b4e70030
JB
23141 while test ! -d "$as_dir"; do
23142 as_dirs="$as_dir $as_dirs"
23143 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
23144$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23145 X"$as_dir" : 'X\(//\)[^/]' \| \
23146 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
23147 X"$as_dir" : 'X\(/\)' \| \
23148 . : '\(.\)' 2>/dev/null ||
bec39cab 23149echo X"$as_dir" |
b4e70030
JB
23150 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23151 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23152 /^X\(\/\/\)$/{ s//\1/; q; }
23153 /^X\(\/\).*/{ s//\1/; q; }
23154 s/.*/./; q'`
bec39cab 23155 done
b4e70030
JB
23156 test ! -n "$as_dirs" || mkdir $as_dirs
23157 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23158echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 23159 { (exit 1); exit 1; }; }; }
b4e70030 23160
bec39cab
AC
23161 ac_builddir=.
23162
b4e70030 23163if test "$ac_dir" != .; then
bec39cab 23164 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
23165 # A "../" for each directory in $ac_dir_suffix.
23166 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23167else
23168 ac_dir_suffix= ac_top_builddir=
23169fi
bec39cab
AC
23170
23171case $srcdir in
b4e70030 23172 .) # No --srcdir option. We are building in place.
bec39cab 23173 ac_srcdir=.
b4e70030
JB
23174 if test -z "$ac_top_builddir"; then
23175 ac_top_srcdir=.
23176 else
23177 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23178 fi ;;
23179 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 23180 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
23181 ac_top_srcdir=$srcdir ;;
23182 *) # Relative path.
23183 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23184 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23185esac
23186
23187# Do not use `cd foo && pwd` to compute absolute paths, because
23188# the directories may not exist.
23189case `pwd` in
23190.) ac_abs_builddir="$ac_dir";;
23191*)
23192 case "$ac_dir" in
23193 .) ac_abs_builddir=`pwd`;;
23194 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23195 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23196 esac;;
23197esac
23198case $ac_abs_builddir in
23199.) ac_abs_top_builddir=${ac_top_builddir}.;;
23200*)
23201 case ${ac_top_builddir}. in
23202 .) ac_abs_top_builddir=$ac_abs_builddir;;
23203 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23204 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23205 esac;;
23206esac
23207case $ac_abs_builddir in
23208.) ac_abs_srcdir=$ac_srcdir;;
23209*)
23210 case $ac_srcdir in
23211 .) ac_abs_srcdir=$ac_abs_builddir;;
23212 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23213 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23214 esac;;
23215esac
23216case $ac_abs_builddir in
23217.) ac_abs_top_srcdir=$ac_top_srcdir;;
23218*)
23219 case $ac_top_srcdir in
23220 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23221 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23222 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23223 esac;;
bec39cab 23224esac
c906108c 23225
c906108c 23226
fdc59709 23227 cd "$ac_dir"
c906108c
SS
23228
23229 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
23230 if test -f "$ac_srcdir/configure.gnu"; then
23231 ac_sub_configure=$ac_srcdir/configure.gnu
23232 elif test -f "$ac_srcdir/configure"; then
23233 ac_sub_configure=$ac_srcdir/configure
23234 elif test -f "$ac_srcdir/configure.in"; then
23235 # This should be Cygnus configure.
23236 ac_sub_configure=$ac_aux_dir/configure
c906108c 23237 else
bec39cab
AC
23238 { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
23239echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
23240 ac_sub_configure=
23241 fi
23242
23243 # The recursion is here.
23244 if test -n "$ac_sub_configure"; then
c906108c 23245 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
23246 case $cache_file in
23247 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
b4e70030
JB
23248 *) # Relative path.
23249 ac_sub_cache_file=$ac_top_builddir$cache_file ;;
c906108c 23250 esac
c906108c 23251
fdc59709
PB
23252 { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
23253echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 23254 # The eval makes quoting arguments work.
fdc59709
PB
23255 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
23256 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
bec39cab
AC
23257 { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
23258echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
23259 { (exit 1); exit 1; }; }
c906108c
SS
23260 fi
23261
fdc59709 23262 cd "$ac_popdir"
c906108c
SS
23263 done
23264fi
23265
23266
23267exit 0
This page took 2.128731 seconds and 4 git commands to generate.