intl/
[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"
b14b1491 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 DEBUGDIR GDB_DATADIR 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 SYSTEM_GDBINIT 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 GDB_NM_FILE 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
62e4f60c 889 [LIBDIR/debug]
b14b1491
TT
890 --with-gdb-datadir=PATH look for global separate data files in this path
891 [DATADIR/gdb]
29b0e8a2 892 --with-relocated-sources=PATH
32c1c914
TT
893 automatically relocate this path for source files
894 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
895 --with-curses use the curses library instead of the termcap
896 library
c16158bc
JM
897 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
898 --with-bugurl=URL Direct users to URL to report a bug
a1220294
TT
899 --with-libiconv-prefix=DIR
900 search for libiconv in DIR/include and DIR/lib
6a30b0a5 901 --with-system-readline use installed readline library
5c39566f 902 --with-expat include expat support (auto/yes/no)
3841debe
DJ
903 --with-gnu-ld assume the C compiler uses GNU ld default=no
904 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
905 --without-libexpat-prefix don't search for libexpat in includedir and libdir
d57a3c85 906 --with-python include python support (auto/yes/no/<path>)
a1220294
TT
907 --without-included-regex
908 don't use included regex; this is the default on
909 systems with version 2 of the GNU C library (use
910 with caution on other system)
32c1c914
TT
911 --with-sysroot[=DIR]
912 search for usr/lib et al within DIR
b14b1491 913 --with-system-gdbinit=PATH
32c1c914 914 automatically load a system-wide gdbinit file
5062cc19
KS
915 --with-tcl directory containing tcl configuration (tclConfig.sh)
916 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 917 --with-x use the X Window System
26e251b6
JM
918 --with-datarootdir use datarootdir as the data root directory.
919 --with-docdir install documentation in this directory.
920 --with-pdfdir install pdf in this directory.
921 --with-htmldir install html in this directory.
bec39cab
AC
922
923Some influential environment variables:
924 CC C compiler command
925 CFLAGS C compiler flags
926 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
927 nonstandard directory <lib dir>
b4e70030
JB
928 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
929 headers in a nonstandard directory <include dir>
bec39cab
AC
930 CPP C preprocessor
931
932Use these variables to override the choices made by `configure' or to help
933it to find libraries and programs with nonstandard names/locations.
934
935_ACEOF
936fi
937
938if test "$ac_init_help" = "recursive"; then
939 # If there are subdirs, report their specific --help.
b4e70030 940 ac_popdir=`pwd`
bec39cab
AC
941 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
942 test -d $ac_dir || continue
943 ac_builddir=.
944
b4e70030 945if test "$ac_dir" != .; then
bec39cab 946 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
947 # A "../" for each directory in $ac_dir_suffix.
948 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
949else
950 ac_dir_suffix= ac_top_builddir=
951fi
bec39cab
AC
952
953case $srcdir in
b4e70030 954 .) # No --srcdir option. We are building in place.
bec39cab 955 ac_srcdir=.
b4e70030
JB
956 if test -z "$ac_top_builddir"; then
957 ac_top_srcdir=.
958 else
959 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
960 fi ;;
961 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 962 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
963 ac_top_srcdir=$srcdir ;;
964 *) # Relative path.
965 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
966 ac_top_srcdir=$ac_top_builddir$srcdir ;;
967esac
968
969# Do not use `cd foo && pwd` to compute absolute paths, because
970# the directories may not exist.
971case `pwd` in
972.) ac_abs_builddir="$ac_dir";;
973*)
974 case "$ac_dir" in
975 .) ac_abs_builddir=`pwd`;;
976 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
977 *) ac_abs_builddir=`pwd`/"$ac_dir";;
978 esac;;
979esac
980case $ac_abs_builddir in
981.) ac_abs_top_builddir=${ac_top_builddir}.;;
982*)
983 case ${ac_top_builddir}. in
984 .) ac_abs_top_builddir=$ac_abs_builddir;;
985 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
986 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
987 esac;;
988esac
989case $ac_abs_builddir in
990.) ac_abs_srcdir=$ac_srcdir;;
991*)
992 case $ac_srcdir in
993 .) ac_abs_srcdir=$ac_abs_builddir;;
994 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
995 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
996 esac;;
997esac
998case $ac_abs_builddir in
999.) ac_abs_top_srcdir=$ac_top_srcdir;;
1000*)
1001 case $ac_top_srcdir in
1002 .) ac_abs_top_srcdir=$ac_abs_builddir;;
1003 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1004 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1005 esac;;
bec39cab
AC
1006esac
1007
b4e70030
JB
1008 cd $ac_dir
1009 # Check for guested configure; otherwise get Cygnus style configure.
bec39cab 1010 if test -f $ac_srcdir/configure.gnu; then
b4e70030 1011 echo
bec39cab
AC
1012 $SHELL $ac_srcdir/configure.gnu --help=recursive
1013 elif test -f $ac_srcdir/configure; then
b4e70030 1014 echo
bec39cab 1015 $SHELL $ac_srcdir/configure --help=recursive
b4e70030
JB
1016 elif test -f $ac_srcdir/configure.ac ||
1017 test -f $ac_srcdir/configure.in; then
1018 echo
1019 $ac_configure --help
3ace7edb 1020 else
bec39cab 1021 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b4e70030
JB
1022 fi
1023 cd $ac_popdir
bec39cab
AC
1024 done
1025fi
1026
b4e70030 1027test -n "$ac_init_help" && exit 0
bec39cab
AC
1028if $ac_init_version; then
1029 cat <<\_ACEOF
1030
b4e70030 1031Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
1032This configure script is free software; the Free Software Foundation
1033gives unlimited permission to copy, distribute and modify it.
1034_ACEOF
b4e70030 1035 exit 0
bec39cab 1036fi
b4e70030
JB
1037exec 5>config.log
1038cat >&5 <<_ACEOF
bec39cab
AC
1039This file contains any messages produced by compilers while
1040running configure, to aid debugging if configure makes a mistake.
1041
1042It was created by $as_me, which was
b4e70030 1043generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
1044
1045 $ $0 $@
1046
1047_ACEOF
1048{
1049cat <<_ASUNAME
1050## --------- ##
1051## Platform. ##
1052## --------- ##
1053
1054hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1055uname -m = `(uname -m) 2>/dev/null || echo unknown`
1056uname -r = `(uname -r) 2>/dev/null || echo unknown`
1057uname -s = `(uname -s) 2>/dev/null || echo unknown`
1058uname -v = `(uname -v) 2>/dev/null || echo unknown`
1059
1060/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1061/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1062
1063/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1064/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1065/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b4e70030 1066hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
bec39cab
AC
1067/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1068/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1069/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1070
1071_ASUNAME
1072
1073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1074for as_dir in $PATH
1075do
1076 IFS=$as_save_IFS
1077 test -z "$as_dir" && as_dir=.
1078 echo "PATH: $as_dir"
1079done
1080
1081} >&5
1082
1083cat >&5 <<_ACEOF
1084
1085
1086## ----------- ##
1087## Core tests. ##
1088## ----------- ##
1089
1090_ACEOF
1091
1092
1093# Keep a trace of the command line.
1094# Strip out --no-create and --no-recursion so they do not pile up.
1095# Strip out --silent because we don't want to record it for future runs.
1096# Also quote any args containing shell meta-characters.
1097# Make two passes to allow for proper duplicate-argument suppression.
1098ac_configure_args=
1099ac_configure_args0=
1100ac_configure_args1=
1101ac_sep=
1102ac_must_keep_next=false
1103for ac_pass in 1 2
1104do
1105 for ac_arg
1106 do
1107 case $ac_arg in
1108 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1109 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1110 | -silent | --silent | --silen | --sile | --sil)
1111 continue ;;
b4e70030 1112 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
bec39cab
AC
1113 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1114 esac
1115 case $ac_pass in
1116 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1117 2)
1118 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1119 if test $ac_must_keep_next = true; then
1120 ac_must_keep_next=false # Got value, back to normal.
1121 else
1122 case $ac_arg in
1123 *=* | --config-cache | -C | -disable-* | --disable-* \
1124 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1125 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1126 | -with-* | --with-* | -without-* | --without-* | --x)
1127 case "$ac_configure_args0 " in
1128 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1129 esac
1130 ;;
1131 -* ) ac_must_keep_next=true ;;
1132 esac
1133 fi
1134 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1135 # Get rid of the leading space.
1136 ac_sep=" "
1137 ;;
1138 esac
1139 done
1140done
1141$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1142$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1143
1144# When interrupted or exit'd, cleanup temporary files, and complete
1145# config.log. We remove comments because anyway the quotes in there
1146# would cause problems or look ugly.
b4e70030
JB
1147# WARNING: Be sure not to use single quotes in there, as some shells,
1148# such as our DU 5.0 friend, will then `close' the trap.
bec39cab
AC
1149trap 'exit_status=$?
1150 # Save into config.log some information that might help in debugging.
1151 {
1152 echo
1153
1154 cat <<\_ASBOX
1155## ---------------- ##
1156## Cache variables. ##
1157## ---------------- ##
1158_ASBOX
1159 echo
1160 # The following way of writing the cache mishandles newlines in values,
b4e70030 1161{
bec39cab 1162 (set) 2>&1 |
b4e70030
JB
1163 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1164 *ac_space=\ *)
bec39cab 1165 sed -n \
b4e70030
JB
1166 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1167 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1168 ;;
bec39cab 1169 *)
b4e70030
JB
1170 sed -n \
1171 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 1172 ;;
b4e70030
JB
1173 esac;
1174}
bec39cab
AC
1175 echo
1176
1177 cat <<\_ASBOX
1178## ----------------- ##
1179## Output variables. ##
1180## ----------------- ##
1181_ASBOX
1182 echo
1183 for ac_var in $ac_subst_vars
1184 do
b4e70030
JB
1185 eval ac_val=$`echo $ac_var`
1186 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1187 done | sort
1188 echo
1189
1190 if test -n "$ac_subst_files"; then
1191 cat <<\_ASBOX
b4e70030
JB
1192## ------------- ##
1193## Output files. ##
1194## ------------- ##
bec39cab
AC
1195_ASBOX
1196 echo
1197 for ac_var in $ac_subst_files
1198 do
b4e70030
JB
1199 eval ac_val=$`echo $ac_var`
1200 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1201 done | sort
1202 echo
1203 fi
1204
1205 if test -s confdefs.h; then
1206 cat <<\_ASBOX
1207## ----------- ##
1208## confdefs.h. ##
1209## ----------- ##
1210_ASBOX
1211 echo
b4e70030 1212 sed "/^$/d" confdefs.h | sort
bec39cab 1213 echo
3ace7edb 1214 fi
bec39cab
AC
1215 test "$ac_signal" != 0 &&
1216 echo "$as_me: caught signal $ac_signal"
1217 echo "$as_me: exit $exit_status"
1218 } >&5
b4e70030
JB
1219 rm -f core *.core &&
1220 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
bec39cab 1221 exit $exit_status
b4e70030 1222 ' 0
bec39cab
AC
1223for ac_signal in 1 2 13 15; do
1224 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1225done
1226ac_signal=0
1227
1228# confdefs.h avoids OS command line length limits that DEFS can exceed.
b4e70030
JB
1229rm -rf conftest* confdefs.h
1230# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1231echo >confdefs.h
bec39cab
AC
1232
1233# Predefined preprocessor variables.
1234
1235cat >>confdefs.h <<_ACEOF
1236#define PACKAGE_NAME "$PACKAGE_NAME"
1237_ACEOF
1238
1239
1240cat >>confdefs.h <<_ACEOF
1241#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1242_ACEOF
1243
1244
1245cat >>confdefs.h <<_ACEOF
1246#define PACKAGE_VERSION "$PACKAGE_VERSION"
1247_ACEOF
1248
1249
1250cat >>confdefs.h <<_ACEOF
1251#define PACKAGE_STRING "$PACKAGE_STRING"
1252_ACEOF
1253
1254
1255cat >>confdefs.h <<_ACEOF
1256#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1257_ACEOF
1258
1259
1260# Let the site file select an alternate cache file if it wants to.
1261# Prefer explicitly selected file to automatically selected ones.
b4e70030
JB
1262if test -z "$CONFIG_SITE"; then
1263 if test "x$prefix" != xNONE; then
1264 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1265 else
1266 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1267 fi
c906108c 1268fi
b4e70030 1269for ac_site_file in $CONFIG_SITE; do
c906108c 1270 if test -r "$ac_site_file"; then
bec39cab
AC
1271 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1272echo "$as_me: loading site script $ac_site_file" >&6;}
1273 sed 's/^/| /' "$ac_site_file" >&5
c906108c
SS
1274 . "$ac_site_file"
1275 fi
1276done
1277
1278if test -r "$cache_file"; then
bec39cab
AC
1279 # Some versions of bash will fail to source /dev/null (special
1280 # files actually), so we avoid doing that.
1281 if test -f "$cache_file"; then
1282 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1283echo "$as_me: loading cache $cache_file" >&6;}
1284 case $cache_file in
1285 [\\/]* | ?:[\\/]* ) . $cache_file;;
1286 *) . ./$cache_file;;
1287 esac
1288 fi
c906108c 1289else
bec39cab
AC
1290 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1291echo "$as_me: creating cache $cache_file" >&6;}
1292 >$cache_file
1293fi
1294
1295# Check that the precious variables saved in the cache have kept the same
1296# value.
1297ac_cache_corrupted=false
b4e70030
JB
1298for ac_var in `(set) 2>&1 |
1299 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
bec39cab
AC
1300 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1301 eval ac_new_set=\$ac_env_${ac_var}_set
b4e70030
JB
1302 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1303 eval ac_new_val="\$ac_env_${ac_var}_value"
bec39cab
AC
1304 case $ac_old_set,$ac_new_set in
1305 set,)
1306 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1307echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1308 ac_cache_corrupted=: ;;
1309 ,set)
1310 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1311echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1312 ac_cache_corrupted=: ;;
1313 ,);;
1314 *)
1315 if test "x$ac_old_val" != "x$ac_new_val"; then
fdc59709
PB
1316 # differences in whitespace do not lead to failure.
1317 ac_old_val_w=`echo x $ac_old_val`
1318 ac_new_val_w=`echo x $ac_new_val`
1319 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1320 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
bec39cab 1321echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
fdc59709
PB
1322 ac_cache_corrupted=:
1323 else
1324 { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1325echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1326 eval $ac_var=\$ac_old_val
1327 fi
1328 { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1329echo "$as_me: former value: \`$ac_old_val'" >&2;}
1330 { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1331echo "$as_me: current value: \`$ac_new_val'" >&2;}
bec39cab
AC
1332 fi;;
1333 esac
1334 # Pass precious variables to config.status.
1335 if test "$ac_new_set" = set; then
1336 case $ac_new_val in
b4e70030
JB
1337 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1338 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
1339 *) ac_arg=$ac_var=$ac_new_val ;;
1340 esac
1341 case " $ac_configure_args " in
1342 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1343 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1344 esac
1345 fi
1346done
1347if $ac_cache_corrupted; then
d5af19ba
DJ
1348 { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1349echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1350 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1351echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1352 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1353echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1354 { (exit 1); exit 1; }; }
c906108c
SS
1355fi
1356
b4e70030
JB
1357ac_ext=c
1358ac_cpp='$CPP $CPPFLAGS'
1359ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1360ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1361ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c
SS
1362
1363
783e057b
DJ
1364gl_header_list="$gl_header_list stdint.h"
1365gl_header_list="$gl_header_list wchar.h"
1366gl_header_list="$gl_header_list string.h"
bec39cab
AC
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
bec39cab 1383
d5af19ba
DJ
1384
1385
1386
b4e70030
JB
1387 ac_config_headers="$ac_config_headers config.h:config.in"
1388
1389echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1390echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
1391 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
413ccac7 1392if test "${enable_maintainer_mode+set}" = set; then
b4e70030
JB
1393 enableval="$enable_maintainer_mode"
1394 USE_MAINTAINER_MODE=$enableval
413ccac7
AC
1395else
1396 USE_MAINTAINER_MODE=no
b4e70030
JB
1397fi;
1398 echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
1399echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
413ccac7 1400
413ccac7
AC
1401
1402if test $USE_MAINTAINER_MODE = yes; then
1403 MAINTAINER_MODE_TRUE=
1404 MAINTAINER_MODE_FALSE='#'
1405else
1406 MAINTAINER_MODE_TRUE='#'
1407 MAINTAINER_MODE_FALSE=
1408fi
85981d60 1409
413ccac7 1410 MAINT=$MAINTAINER_MODE_TRUE
413ccac7 1411
c906108c 1412
bec39cab
AC
1413
1414ac_ext=c
1415ac_cpp='$CPP $CPPFLAGS'
1416ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1417ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1418ac_compiler_gnu=$ac_cv_c_compiler_gnu
1419if test -n "$ac_tool_prefix"; then
1420 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1421set dummy ${ac_tool_prefix}gcc; ac_word=$2
b4e70030
JB
1422echo "$as_me:$LINENO: checking for $ac_word" >&5
1423echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1424if test "${ac_cv_prog_CC+set}" = set; then
1425 echo $ECHO_N "(cached) $ECHO_C" >&6
1426else
1427 if test -n "$CC"; then
1428 ac_cv_prog_CC="$CC" # Let the user override the test.
1429else
1430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1431for as_dir in $PATH
1432do
1433 IFS=$as_save_IFS
1434 test -z "$as_dir" && as_dir=.
1435 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1436 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1437 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1438 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1439 break 2
1440 fi
1441done
1442done
1443
1444fi
1445fi
1446CC=$ac_cv_prog_CC
1447if test -n "$CC"; then
b4e70030
JB
1448 echo "$as_me:$LINENO: result: $CC" >&5
1449echo "${ECHO_T}$CC" >&6
bec39cab 1450else
b4e70030
JB
1451 echo "$as_me:$LINENO: result: no" >&5
1452echo "${ECHO_T}no" >&6
bec39cab
AC
1453fi
1454
1455fi
1456if test -z "$ac_cv_prog_CC"; then
1457 ac_ct_CC=$CC
1458 # Extract the first word of "gcc", so it can be a program name with args.
c906108c 1459set dummy gcc; ac_word=$2
b4e70030
JB
1460echo "$as_me:$LINENO: checking for $ac_word" >&5
1461echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1462if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1463 echo $ECHO_N "(cached) $ECHO_C" >&6
1464else
1465 if test -n "$ac_ct_CC"; then
1466 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1467else
1468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1469for as_dir in $PATH
1470do
1471 IFS=$as_save_IFS
1472 test -z "$as_dir" && as_dir=.
1473 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1474 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1475 ac_cv_prog_ac_ct_CC="gcc"
1476 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1477 break 2
1478 fi
1479done
1480done
1481
1482fi
1483fi
1484ac_ct_CC=$ac_cv_prog_ac_ct_CC
1485if test -n "$ac_ct_CC"; then
b4e70030
JB
1486 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1487echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1488else
b4e70030
JB
1489 echo "$as_me:$LINENO: result: no" >&5
1490echo "${ECHO_T}no" >&6
bec39cab
AC
1491fi
1492
b4e70030 1493 CC=$ac_ct_CC
bec39cab
AC
1494else
1495 CC="$ac_cv_prog_CC"
1496fi
1497
1498if test -z "$CC"; then
b4e70030
JB
1499 if test -n "$ac_tool_prefix"; then
1500 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
bec39cab 1501set dummy ${ac_tool_prefix}cc; ac_word=$2
b4e70030
JB
1502echo "$as_me:$LINENO: checking for $ac_word" >&5
1503echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1504if test "${ac_cv_prog_CC+set}" = set; then
1505 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1506else
1507 if test -n "$CC"; then
1508 ac_cv_prog_CC="$CC" # Let the user override the test.
1509else
bec39cab
AC
1510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1511for as_dir in $PATH
1512do
1513 IFS=$as_save_IFS
1514 test -z "$as_dir" && as_dir=.
1515 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1516 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1517 ac_cv_prog_CC="${ac_tool_prefix}cc"
1518 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1519 break 2
1520 fi
1521done
1522done
1523
c906108c
SS
1524fi
1525fi
bec39cab 1526CC=$ac_cv_prog_CC
c906108c 1527if test -n "$CC"; then
b4e70030
JB
1528 echo "$as_me:$LINENO: result: $CC" >&5
1529echo "${ECHO_T}$CC" >&6
c906108c 1530else
b4e70030
JB
1531 echo "$as_me:$LINENO: result: no" >&5
1532echo "${ECHO_T}no" >&6
c906108c
SS
1533fi
1534
b4e70030
JB
1535fi
1536if test -z "$ac_cv_prog_CC"; then
1537 ac_ct_CC=$CC
1538 # Extract the first word of "cc", so it can be a program name with args.
1539set dummy cc; ac_word=$2
1540echo "$as_me:$LINENO: checking for $ac_word" >&5
1541echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1542if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1543 echo $ECHO_N "(cached) $ECHO_C" >&6
1544else
1545 if test -n "$ac_ct_CC"; then
1546 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1547else
1548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1549for as_dir in $PATH
1550do
1551 IFS=$as_save_IFS
1552 test -z "$as_dir" && as_dir=.
1553 for ac_exec_ext in '' $ac_executable_extensions; do
1554 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1555 ac_cv_prog_ac_ct_CC="cc"
1556 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1557 break 2
4e8d927d 1558 fi
b4e70030
JB
1559done
1560done
1561
1562fi
1563fi
1564ac_ct_CC=$ac_cv_prog_ac_ct_CC
1565if test -n "$ac_ct_CC"; then
1566 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1567echo "${ECHO_T}$ac_ct_CC" >&6
1568else
1569 echo "$as_me:$LINENO: result: no" >&5
1570echo "${ECHO_T}no" >&6
1571fi
1572
1573 CC=$ac_ct_CC
1574else
1575 CC="$ac_cv_prog_CC"
1576fi
1577
bec39cab 1578fi
c906108c
SS
1579if test -z "$CC"; then
1580 # Extract the first word of "cc", so it can be a program name with args.
1581set dummy cc; ac_word=$2
b4e70030
JB
1582echo "$as_me:$LINENO: checking for $ac_word" >&5
1583echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1584if test "${ac_cv_prog_CC+set}" = set; then
1585 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1586else
1587 if test -n "$CC"; then
1588 ac_cv_prog_CC="$CC" # Let the user override the test.
1589else
c906108c 1590 ac_prog_rejected=no
bec39cab
AC
1591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1592for as_dir in $PATH
1593do
1594 IFS=$as_save_IFS
1595 test -z "$as_dir" && as_dir=.
1596 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1597 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1598 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1599 ac_prog_rejected=yes
1600 continue
1601 fi
1602 ac_cv_prog_CC="cc"
1603 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1604 break 2
1605 fi
1606done
1607done
1608
c906108c
SS
1609if test $ac_prog_rejected = yes; then
1610 # We found a bogon in the path, so make sure we never use it.
1611 set dummy $ac_cv_prog_CC
1612 shift
bec39cab 1613 if test $# != 0; then
c906108c
SS
1614 # We chose a different compiler from the bogus one.
1615 # However, it has the same basename, so the bogon will be chosen
1616 # first if we set CC to just the basename; use the full file name.
1617 shift
bec39cab 1618 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
1619 fi
1620fi
1621fi
1622fi
bec39cab 1623CC=$ac_cv_prog_CC
c906108c 1624if test -n "$CC"; then
b4e70030
JB
1625 echo "$as_me:$LINENO: result: $CC" >&5
1626echo "${ECHO_T}$CC" >&6
c906108c 1627else
b4e70030
JB
1628 echo "$as_me:$LINENO: result: no" >&5
1629echo "${ECHO_T}no" >&6
c906108c
SS
1630fi
1631
bec39cab
AC
1632fi
1633if test -z "$CC"; then
1634 if test -n "$ac_tool_prefix"; then
b4e70030 1635 for ac_prog in cl
bec39cab
AC
1636 do
1637 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1638set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b4e70030
JB
1639echo "$as_me:$LINENO: checking for $ac_word" >&5
1640echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1641if test "${ac_cv_prog_CC+set}" = set; then
1642 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1643else
1644 if test -n "$CC"; then
1645 ac_cv_prog_CC="$CC" # Let the user override the test.
1646else
bec39cab
AC
1647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1648for as_dir in $PATH
1649do
1650 IFS=$as_save_IFS
1651 test -z "$as_dir" && as_dir=.
1652 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1653 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1654 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1655 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1656 break 2
1657 fi
1658done
1659done
1660
c906108c
SS
1661fi
1662fi
bec39cab 1663CC=$ac_cv_prog_CC
c906108c 1664if test -n "$CC"; then
b4e70030
JB
1665 echo "$as_me:$LINENO: result: $CC" >&5
1666echo "${ECHO_T}$CC" >&6
c906108c 1667else
b4e70030
JB
1668 echo "$as_me:$LINENO: result: no" >&5
1669echo "${ECHO_T}no" >&6
c906108c 1670fi
bec39cab
AC
1671
1672 test -n "$CC" && break
1673 done
1674fi
1675if test -z "$CC"; then
1676 ac_ct_CC=$CC
b4e70030 1677 for ac_prog in cl
bec39cab
AC
1678do
1679 # Extract the first word of "$ac_prog", so it can be a program name with args.
1680set dummy $ac_prog; ac_word=$2
b4e70030
JB
1681echo "$as_me:$LINENO: checking for $ac_word" >&5
1682echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1683if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1684 echo $ECHO_N "(cached) $ECHO_C" >&6
1685else
1686 if test -n "$ac_ct_CC"; then
1687 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1688else
1689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1690for as_dir in $PATH
1691do
1692 IFS=$as_save_IFS
1693 test -z "$as_dir" && as_dir=.
1694 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1695 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1696 ac_cv_prog_ac_ct_CC="$ac_prog"
1697 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1698 break 2
c906108c 1699 fi
bec39cab
AC
1700done
1701done
1702
1703fi
1704fi
1705ac_ct_CC=$ac_cv_prog_ac_ct_CC
1706if test -n "$ac_ct_CC"; then
b4e70030
JB
1707 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1708echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1709else
b4e70030
JB
1710 echo "$as_me:$LINENO: result: no" >&5
1711echo "${ECHO_T}no" >&6
c906108c
SS
1712fi
1713
bec39cab
AC
1714 test -n "$ac_ct_CC" && break
1715done
c906108c 1716
b4e70030 1717 CC=$ac_ct_CC
bec39cab
AC
1718fi
1719
1720fi
1721
1722
d5af19ba
DJ
1723test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1724echo "$as_me: error: in \`$ac_pwd':" >&2;}
1725{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
bec39cab
AC
1726See \`config.log' for more details." >&5
1727echo "$as_me: error: no acceptable C compiler found in \$PATH
1728See \`config.log' for more details." >&2;}
d5af19ba 1729 { (exit 1); exit 1; }; }; }
bec39cab
AC
1730
1731# Provide some information about the compiler.
b4e70030
JB
1732echo "$as_me:$LINENO:" \
1733 "checking for C compiler version" >&5
bec39cab 1734ac_compiler=`set X $ac_compile; echo $2`
b4e70030
JB
1735{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1736 (eval $ac_compiler --version </dev/null >&5) 2>&5
bec39cab
AC
1737 ac_status=$?
1738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1739 (exit $ac_status); }
b4e70030
JB
1740{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1741 (eval $ac_compiler -v </dev/null >&5) 2>&5
bec39cab
AC
1742 ac_status=$?
1743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1744 (exit $ac_status); }
b4e70030
JB
1745{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1746 (eval $ac_compiler -V </dev/null >&5) 2>&5
bec39cab
AC
1747 ac_status=$?
1748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1749 (exit $ac_status); }
1750
1751cat >conftest.$ac_ext <<_ACEOF
1752/* confdefs.h. */
1753_ACEOF
1754cat confdefs.h >>conftest.$ac_ext
1755cat >>conftest.$ac_ext <<_ACEOF
1756/* end confdefs.h. */
1757
1758int
1759main ()
1760{
1761
1762 ;
1763 return 0;
1764}
1765_ACEOF
1766ac_clean_files_save=$ac_clean_files
b4e70030 1767ac_clean_files="$ac_clean_files a.out a.exe b.out"
bec39cab
AC
1768# Try to create an executable without -o first, disregard a.out.
1769# It will help us diagnose broken compilers, and finding out an intuition
1770# of exeext.
b4e70030
JB
1771echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1772echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
bec39cab
AC
1773ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1774if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1775 (eval $ac_link_default) 2>&5
1776 ac_status=$?
1777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1778 (exit $ac_status); }; then
b4e70030
JB
1779 # Find the output, starting from the most likely. This scheme is
1780# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1781# resort.
1782
1783# Be careful to initialize this variable, since it used to be cached.
1784# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1785ac_cv_exeext=
1786# b.out is created by i960 compilers.
1787for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
bec39cab
AC
1788do
1789 test -f "$ac_file" || continue
1790 case $ac_file in
b4e70030
JB
1791 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1792 ;;
1793 conftest.$ac_ext )
1794 # This is the source file.
1795 ;;
1796 [ab].out )
1797 # We found the default executable, but exeext='' is most
1798 # certainly right.
1799 break;;
1800 *.* )
1801 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1802 # FIXME: I believe we export ac_cv_exeext for Libtool,
1803 # but it would be cool to find out if it's true. Does anybody
1804 # maintain Libtool? --akim.
1805 export ac_cv_exeext
1806 break;;
1807 * )
1808 break;;
bec39cab
AC
1809 esac
1810done
1811else
1812 echo "$as_me: failed program was:" >&5
1813sed 's/^/| /' conftest.$ac_ext >&5
1814
d5af19ba
DJ
1815{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1816echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1817{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1818See \`config.log' for more details." >&5
1819echo "$as_me: error: C compiler cannot create executables
1820See \`config.log' for more details." >&2;}
d5af19ba 1821 { (exit 77); exit 77; }; }; }
bec39cab
AC
1822fi
1823
b4e70030
JB
1824ac_exeext=$ac_cv_exeext
1825echo "$as_me:$LINENO: result: $ac_file" >&5
1826echo "${ECHO_T}$ac_file" >&6
1827
1828# Check the compiler produces executables we can run. If not, either
bec39cab 1829# the compiler is broken, or we cross compile.
b4e70030
JB
1830echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1831echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
bec39cab
AC
1832# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1833# If not cross compiling, check that we can run a simple program.
1834if test "$cross_compiling" != yes; then
1835 if { ac_try='./$ac_file'
1836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1837 (eval $ac_try) 2>&5
1838 ac_status=$?
1839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1840 (exit $ac_status); }; }; then
1841 cross_compiling=no
c906108c 1842 else
bec39cab
AC
1843 if test "$cross_compiling" = maybe; then
1844 cross_compiling=yes
1845 else
d5af19ba
DJ
1846 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1847echo "$as_me: error: in \`$ac_pwd':" >&2;}
1848{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
bec39cab
AC
1849If you meant to cross compile, use \`--host'.
1850See \`config.log' for more details." >&5
1851echo "$as_me: error: cannot run C compiled programs.
1852If you meant to cross compile, use \`--host'.
1853See \`config.log' for more details." >&2;}
d5af19ba 1854 { (exit 1); exit 1; }; }; }
bec39cab 1855 fi
c906108c 1856 fi
bec39cab 1857fi
b4e70030
JB
1858echo "$as_me:$LINENO: result: yes" >&5
1859echo "${ECHO_T}yes" >&6
bec39cab 1860
b4e70030
JB
1861rm -f a.out a.exe conftest$ac_cv_exeext b.out
1862ac_clean_files=$ac_clean_files_save
1863# Check the compiler produces executables we can run. If not, either
1864# the compiler is broken, or we cross compile.
1865echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1866echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1867echo "$as_me:$LINENO: result: $cross_compiling" >&5
1868echo "${ECHO_T}$cross_compiling" >&6
4e8d927d 1869
b4e70030
JB
1870echo "$as_me:$LINENO: checking for suffix of executables" >&5
1871echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1872if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
bec39cab
AC
1873 (eval $ac_link) 2>&5
1874 ac_status=$?
1875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1876 (exit $ac_status); }; then
b4e70030
JB
1877 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1878# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1879# work properly (i.e., refer to `conftest.exe'), while it won't with
1880# `rm'.
1881for ac_file in conftest.exe conftest conftest.*; do
1882 test -f "$ac_file" || continue
1883 case $ac_file in
1884 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1885 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1886 export ac_cv_exeext
1887 break;;
1888 * ) break;;
1889 esac
1890done
c906108c 1891else
d5af19ba
DJ
1892 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1893echo "$as_me: error: in \`$ac_pwd':" >&2;}
1894{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
bec39cab
AC
1895See \`config.log' for more details." >&5
1896echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1897See \`config.log' for more details." >&2;}
d5af19ba 1898 { (exit 1); exit 1; }; }; }
c906108c 1899fi
c906108c 1900
b4e70030
JB
1901rm -f conftest$ac_cv_exeext
1902echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1903echo "${ECHO_T}$ac_cv_exeext" >&6
c906108c 1904
b4e70030 1905rm -f conftest.$ac_ext
bec39cab
AC
1906EXEEXT=$ac_cv_exeext
1907ac_exeext=$EXEEXT
b4e70030
JB
1908echo "$as_me:$LINENO: checking for suffix of object files" >&5
1909echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
bec39cab
AC
1910if test "${ac_cv_objext+set}" = set; then
1911 echo $ECHO_N "(cached) $ECHO_C" >&6
1912else
b4e70030
JB
1913 cat >conftest.$ac_ext <<_ACEOF
1914/* confdefs.h. */
1915_ACEOF
1916cat confdefs.h >>conftest.$ac_ext
1917cat >>conftest.$ac_ext <<_ACEOF
1918/* end confdefs.h. */
1919
1920int
1921main ()
1922{
1923
1924 ;
1925 return 0;
1926}
1927_ACEOF
1928rm -f conftest.o conftest.obj
bec39cab
AC
1929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1930 (eval $ac_compile) 2>&5
1931 ac_status=$?
1932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1933 (exit $ac_status); }; then
b4e70030 1934 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
bec39cab 1935 case $ac_file in
b4e70030 1936 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
bec39cab
AC
1937 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1938 break;;
1939 esac
1940done
c906108c 1941else
bec39cab
AC
1942 echo "$as_me: failed program was:" >&5
1943sed 's/^/| /' conftest.$ac_ext >&5
1944
d5af19ba
DJ
1945{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1946echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1947{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1948See \`config.log' for more details." >&5
1949echo "$as_me: error: cannot compute suffix of object files: cannot compile
1950See \`config.log' for more details." >&2;}
d5af19ba 1951 { (exit 1); exit 1; }; }; }
c906108c
SS
1952fi
1953
b4e70030 1954rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 1955fi
b4e70030
JB
1956echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1957echo "${ECHO_T}$ac_cv_objext" >&6
bec39cab
AC
1958OBJEXT=$ac_cv_objext
1959ac_objext=$OBJEXT
b4e70030
JB
1960echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1961echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
bec39cab
AC
1962if test "${ac_cv_c_compiler_gnu+set}" = set; then
1963 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 1964else
bec39cab
AC
1965 cat >conftest.$ac_ext <<_ACEOF
1966/* confdefs.h. */
1967_ACEOF
1968cat confdefs.h >>conftest.$ac_ext
1969cat >>conftest.$ac_ext <<_ACEOF
1970/* end confdefs.h. */
1971
1972int
1973main ()
1974{
1975#ifndef __GNUC__
1976 choke me
1977#endif
1978
1979 ;
1980 return 0;
1981}
1982_ACEOF
1983rm -f conftest.$ac_objext
1984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1985 (eval $ac_compile) 2>conftest.er1
1986 ac_status=$?
1987 grep -v '^ *+' conftest.er1 >conftest.err
1988 rm -f conftest.er1
1989 cat conftest.err >&5
1990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1991 (exit $ac_status); } &&
b4e70030
JB
1992 { ac_try='test -z "$ac_c_werror_flag"
1993 || test ! -s conftest.err'
bec39cab
AC
1994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1995 (eval $ac_try) 2>&5
1996 ac_status=$?
1997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1998 (exit $ac_status); }; } &&
1999 { ac_try='test -s conftest.$ac_objext'
2000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2001 (eval $ac_try) 2>&5
2002 ac_status=$?
2003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2004 (exit $ac_status); }; }; then
2005 ac_compiler_gnu=yes
2006else
2007 echo "$as_me: failed program was:" >&5
2008sed 's/^/| /' conftest.$ac_ext >&5
2009
b4e70030 2010ac_compiler_gnu=no
bec39cab
AC
2011fi
2012rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2013ac_cv_c_compiler_gnu=$ac_compiler_gnu
2014
2015fi
b4e70030
JB
2016echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2017echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
bec39cab
AC
2018GCC=`test $ac_compiler_gnu = yes && echo yes`
2019ac_test_CFLAGS=${CFLAGS+set}
2020ac_save_CFLAGS=$CFLAGS
b4e70030
JB
2021CFLAGS="-g"
2022echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2023echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
bec39cab
AC
2024if test "${ac_cv_prog_cc_g+set}" = set; then
2025 echo $ECHO_N "(cached) $ECHO_C" >&6
2026else
b4e70030 2027 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
2028/* confdefs.h. */
2029_ACEOF
2030cat confdefs.h >>conftest.$ac_ext
2031cat >>conftest.$ac_ext <<_ACEOF
2032/* end confdefs.h. */
2033
2034int
2035main ()
2036{
2037
2038 ;
2039 return 0;
2040}
2041_ACEOF
2042rm -f conftest.$ac_objext
2043if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2044 (eval $ac_compile) 2>conftest.er1
2045 ac_status=$?
2046 grep -v '^ *+' conftest.er1 >conftest.err
2047 rm -f conftest.er1
2048 cat conftest.err >&5
2049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2050 (exit $ac_status); } &&
b4e70030
JB
2051 { ac_try='test -z "$ac_c_werror_flag"
2052 || test ! -s conftest.err'
bec39cab
AC
2053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2054 (eval $ac_try) 2>&5
2055 ac_status=$?
2056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2057 (exit $ac_status); }; } &&
2058 { ac_try='test -s conftest.$ac_objext'
2059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2060 (eval $ac_try) 2>&5
2061 ac_status=$?
2062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2063 (exit $ac_status); }; }; then
c906108c
SS
2064 ac_cv_prog_cc_g=yes
2065else
bec39cab
AC
2066 echo "$as_me: failed program was:" >&5
2067sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2068
b4e70030 2069ac_cv_prog_cc_g=no
4e8d927d 2070fi
bec39cab
AC
2071rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2072fi
b4e70030
JB
2073echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2074echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c906108c 2075if test "$ac_test_CFLAGS" = set; then
bec39cab 2076 CFLAGS=$ac_save_CFLAGS
c906108c
SS
2077elif test $ac_cv_prog_cc_g = yes; then
2078 if test "$GCC" = yes; then
2079 CFLAGS="-g -O2"
2080 else
2081 CFLAGS="-g"
2082 fi
2083else
2084 if test "$GCC" = yes; then
2085 CFLAGS="-O2"
2086 else
2087 CFLAGS=
2088 fi
2089fi
b4e70030
JB
2090echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2091echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2092if test "${ac_cv_prog_cc_stdc+set}" = set; then
bec39cab
AC
2093 echo $ECHO_N "(cached) $ECHO_C" >&6
2094else
b4e70030 2095 ac_cv_prog_cc_stdc=no
bec39cab
AC
2096ac_save_CC=$CC
2097cat >conftest.$ac_ext <<_ACEOF
2098/* confdefs.h. */
2099_ACEOF
2100cat confdefs.h >>conftest.$ac_ext
2101cat >>conftest.$ac_ext <<_ACEOF
2102/* end confdefs.h. */
c906108c
SS
2103#include <stdarg.h>
2104#include <stdio.h>
2105#include <sys/types.h>
2106#include <sys/stat.h>
2107/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2108struct buf { int x; };
2109FILE * (*rcsopen) (struct buf *, struct stat *, int);
2110static char *e (p, i)
2111 char **p;
2112 int i;
2113{
2114 return p[i];
2115}
2116static char *f (char * (*g) (char **, int), char **p, ...)
2117{
2118 char *s;
2119 va_list v;
2120 va_start (v,p);
2121 s = g (p, va_arg (v,int));
2122 va_end (v);
2123 return s;
2124}
bec39cab
AC
2125
2126/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2127 function prototypes and stuff, but not '\xHH' hex character constants.
2128 These don't provoke an error unfortunately, instead are silently treated
b4e70030 2129 as 'x'. The following induces an error, until -std1 is added to get
bec39cab
AC
2130 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2131 array size at least. It's necessary to write '\x00'==0 to get something
b4e70030 2132 that's true only with -std1. */
bec39cab
AC
2133int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2134
c906108c
SS
2135int test (int i, double x);
2136struct s1 {int (*f) (int a);};
2137struct s2 {int (*f) (double a);};
2138int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2139int argc;
2140char **argv;
bec39cab
AC
2141int
2142main ()
2143{
c906108c 2144return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
2145 ;
2146 return 0;
2147}
2148_ACEOF
b4e70030
JB
2149# Don't try gcc -ansi; that turns off useful extensions and
2150# breaks some systems' header files.
2151# AIX -qlanglvl=ansi
2152# Ultrix and OSF/1 -std1
2153# HP-UX 10.20 and later -Ae
2154# HP-UX older versions -Aa -D_HPUX_SOURCE
2155# SVR4 -Xc -D__EXTENSIONS__
2156for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
2157do
2158 CC="$ac_save_CC $ac_arg"
2159 rm -f conftest.$ac_objext
2160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2161 (eval $ac_compile) 2>conftest.er1
2162 ac_status=$?
2163 grep -v '^ *+' conftest.er1 >conftest.err
2164 rm -f conftest.er1
2165 cat conftest.err >&5
2166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2167 (exit $ac_status); } &&
b4e70030
JB
2168 { ac_try='test -z "$ac_c_werror_flag"
2169 || test ! -s conftest.err'
bec39cab
AC
2170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2171 (eval $ac_try) 2>&5
2172 ac_status=$?
2173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2174 (exit $ac_status); }; } &&
2175 { ac_try='test -s conftest.$ac_objext'
2176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2177 (eval $ac_try) 2>&5
2178 ac_status=$?
2179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2180 (exit $ac_status); }; }; then
b4e70030
JB
2181 ac_cv_prog_cc_stdc=$ac_arg
2182break
c906108c 2183else
bec39cab
AC
2184 echo "$as_me: failed program was:" >&5
2185sed 's/^/| /' conftest.$ac_ext >&5
2186
c906108c 2187fi
bec39cab 2188rm -f conftest.err conftest.$ac_objext
c906108c 2189done
b4e70030 2190rm -f conftest.$ac_ext conftest.$ac_objext
bec39cab 2191CC=$ac_save_CC
c906108c
SS
2192
2193fi
b4e70030
JB
2194
2195case "x$ac_cv_prog_cc_stdc" in
2196 x|xno)
2197 echo "$as_me:$LINENO: result: none needed" >&5
2198echo "${ECHO_T}none needed" >&6 ;;
bec39cab 2199 *)
b4e70030
JB
2200 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2201echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2202 CC="$CC $ac_cv_prog_cc_stdc" ;;
c906108c
SS
2203esac
2204
b4e70030
JB
2205# Some people use a C++ compiler to compile C. Since we use `exit',
2206# in C++ we need to declare it. In case someone uses the same compiler
2207# for both compiling C and C++ we need to have the C++ compiler decide
2208# the declaration of exit, since it's the most demanding environment.
2209cat >conftest.$ac_ext <<_ACEOF
2210#ifndef __cplusplus
2211 choke me
2212#endif
2213_ACEOF
2214rm -f conftest.$ac_objext
2215if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2216 (eval $ac_compile) 2>conftest.er1
2217 ac_status=$?
2218 grep -v '^ *+' conftest.er1 >conftest.err
2219 rm -f conftest.er1
2220 cat conftest.err >&5
2221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2222 (exit $ac_status); } &&
2223 { ac_try='test -z "$ac_c_werror_flag"
2224 || test ! -s conftest.err'
2225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2226 (eval $ac_try) 2>&5
2227 ac_status=$?
2228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2229 (exit $ac_status); }; } &&
2230 { ac_try='test -s conftest.$ac_objext'
2231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2232 (eval $ac_try) 2>&5
2233 ac_status=$?
2234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2235 (exit $ac_status); }; }; then
2236 for ac_declaration in \
2237 '' \
2238 'extern "C" void std::exit (int) throw (); using std::exit;' \
2239 'extern "C" void std::exit (int); using std::exit;' \
2240 'extern "C" void exit (int) throw ();' \
2241 'extern "C" void exit (int);' \
2242 'void exit (int);'
2243do
2244 cat >conftest.$ac_ext <<_ACEOF
2245/* confdefs.h. */
2246_ACEOF
2247cat confdefs.h >>conftest.$ac_ext
2248cat >>conftest.$ac_ext <<_ACEOF
2249/* end confdefs.h. */
2250$ac_declaration
2251#include <stdlib.h>
2252int
2253main ()
2254{
2255exit (42);
2256 ;
2257 return 0;
2258}
2259_ACEOF
2260rm -f conftest.$ac_objext
2261if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2262 (eval $ac_compile) 2>conftest.er1
2263 ac_status=$?
2264 grep -v '^ *+' conftest.er1 >conftest.err
2265 rm -f conftest.er1
2266 cat conftest.err >&5
2267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2268 (exit $ac_status); } &&
2269 { ac_try='test -z "$ac_c_werror_flag"
2270 || test ! -s conftest.err'
2271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2272 (eval $ac_try) 2>&5
2273 ac_status=$?
2274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2275 (exit $ac_status); }; } &&
2276 { ac_try='test -s conftest.$ac_objext'
2277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2278 (eval $ac_try) 2>&5
2279 ac_status=$?
2280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2281 (exit $ac_status); }; }; then
2282 :
2283else
2284 echo "$as_me: failed program was:" >&5
2285sed 's/^/| /' conftest.$ac_ext >&5
2286
2287continue
2288fi
2289rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2290 cat >conftest.$ac_ext <<_ACEOF
2291/* confdefs.h. */
2292_ACEOF
2293cat confdefs.h >>conftest.$ac_ext
2294cat >>conftest.$ac_ext <<_ACEOF
2295/* end confdefs.h. */
2296$ac_declaration
2297int
2298main ()
2299{
2300exit (42);
2301 ;
2302 return 0;
2303}
2304_ACEOF
2305rm -f conftest.$ac_objext
2306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2307 (eval $ac_compile) 2>conftest.er1
2308 ac_status=$?
2309 grep -v '^ *+' conftest.er1 >conftest.err
2310 rm -f conftest.er1
2311 cat conftest.err >&5
2312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2313 (exit $ac_status); } &&
2314 { ac_try='test -z "$ac_c_werror_flag"
2315 || test ! -s conftest.err'
2316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2317 (eval $ac_try) 2>&5
2318 ac_status=$?
2319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2320 (exit $ac_status); }; } &&
2321 { ac_try='test -s conftest.$ac_objext'
2322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2323 (eval $ac_try) 2>&5
2324 ac_status=$?
2325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2326 (exit $ac_status); }; }; then
2327 break
2328else
2329 echo "$as_me: failed program was:" >&5
2330sed 's/^/| /' conftest.$ac_ext >&5
2331
2332fi
2333rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2334done
2335rm -f conftest*
2336if test -n "$ac_declaration"; then
2337 echo '#ifdef __cplusplus' >>confdefs.h
2338 echo $ac_declaration >>confdefs.h
2339 echo '#endif' >>confdefs.h
2340fi
2341
2342else
2343 echo "$as_me: failed program was:" >&5
2344sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2345
b4e70030
JB
2346fi
2347rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
2348ac_ext=c
2349ac_cpp='$CPP $CPPFLAGS'
2350ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2351ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2352ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 2353
60ca704f 2354
bec39cab
AC
2355cat >>confdefs.h <<\_ACEOF
2356#define _GNU_SOURCE 1
2357_ACEOF
c906108c
SS
2358
2359
8bb2c122 2360
bec39cab
AC
2361ac_ext=c
2362ac_cpp='$CPP $CPPFLAGS'
2363ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2364ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2365ac_compiler_gnu=$ac_cv_c_compiler_gnu
b4e70030
JB
2366echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2367echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
bec39cab
AC
2368# On Suns, sometimes $CPP names a directory.
2369if test -n "$CPP" && test -d "$CPP"; then
2370 CPP=
8bb2c122 2371fi
bec39cab
AC
2372if test -z "$CPP"; then
2373 if test "${ac_cv_prog_CPP+set}" = set; then
2374 echo $ECHO_N "(cached) $ECHO_C" >&6
2375else
2376 # Double quotes because CPP needs to be expanded
2377 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2378 do
2379 ac_preproc_ok=false
2380for ac_c_preproc_warn_flag in '' yes
2381do
2382 # Use a header file that comes with gcc, so configuring glibc
2383 # with a fresh cross-compiler works.
2384 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2385 # <limits.h> exists even on freestanding compilers.
2386 # On the NeXT, cc -E runs the code through the compiler's parser,
2387 # not just through cpp. "Syntax error" is here to catch this case.
2388 cat >conftest.$ac_ext <<_ACEOF
2389/* confdefs.h. */
2390_ACEOF
2391cat confdefs.h >>conftest.$ac_ext
2392cat >>conftest.$ac_ext <<_ACEOF
2393/* end confdefs.h. */
2394#ifdef __STDC__
2395# include <limits.h>
2396#else
2397# include <assert.h>
2398#endif
2399 Syntax error
2400_ACEOF
2401if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2402 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2403 ac_status=$?
2404 grep -v '^ *+' conftest.er1 >conftest.err
2405 rm -f conftest.er1
2406 cat conftest.err >&5
2407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2408 (exit $ac_status); } >/dev/null; then
2409 if test -s conftest.err; then
2410 ac_cpp_err=$ac_c_preproc_warn_flag
2411 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2412 else
2413 ac_cpp_err=
2414 fi
8bb2c122 2415else
bec39cab 2416 ac_cpp_err=yes
8bb2c122 2417fi
bec39cab
AC
2418if test -z "$ac_cpp_err"; then
2419 :
8bb2c122 2420else
bec39cab
AC
2421 echo "$as_me: failed program was:" >&5
2422sed 's/^/| /' conftest.$ac_ext >&5
2423
2424 # Broken: fails on valid input.
2425continue
2426fi
2427rm -f conftest.err conftest.$ac_ext
2428
b4e70030 2429 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2430 # can be detected and how.
2431 cat >conftest.$ac_ext <<_ACEOF
2432/* confdefs.h. */
2433_ACEOF
2434cat confdefs.h >>conftest.$ac_ext
2435cat >>conftest.$ac_ext <<_ACEOF
2436/* end confdefs.h. */
2437#include <ac_nonexistent.h>
2438_ACEOF
2439if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2440 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2441 ac_status=$?
2442 grep -v '^ *+' conftest.er1 >conftest.err
2443 rm -f conftest.er1
2444 cat conftest.err >&5
2445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2446 (exit $ac_status); } >/dev/null; then
2447 if test -s conftest.err; then
2448 ac_cpp_err=$ac_c_preproc_warn_flag
2449 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2450 else
2451 ac_cpp_err=
2452 fi
8bb2c122 2453else
bec39cab 2454 ac_cpp_err=yes
8bb2c122 2455fi
bec39cab
AC
2456if test -z "$ac_cpp_err"; then
2457 # Broken: success on invalid input.
2458continue
8bb2c122 2459else
bec39cab
AC
2460 echo "$as_me: failed program was:" >&5
2461sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 2462
bec39cab
AC
2463 # Passes both tests.
2464ac_preproc_ok=:
2465break
8bb2c122 2466fi
bec39cab 2467rm -f conftest.err conftest.$ac_ext
8bb2c122 2468
bec39cab
AC
2469done
2470# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2471rm -f conftest.err conftest.$ac_ext
2472if $ac_preproc_ok; then
2473 break
2474fi
8bb2c122 2475
bec39cab
AC
2476 done
2477 ac_cv_prog_CPP=$CPP
ddc9cd0f 2478
c906108c 2479fi
bec39cab
AC
2480 CPP=$ac_cv_prog_CPP
2481else
2482 ac_cv_prog_CPP=$CPP
c906108c 2483fi
b4e70030
JB
2484echo "$as_me:$LINENO: result: $CPP" >&5
2485echo "${ECHO_T}$CPP" >&6
bec39cab
AC
2486ac_preproc_ok=false
2487for ac_c_preproc_warn_flag in '' yes
2488do
2489 # Use a header file that comes with gcc, so configuring glibc
2490 # with a fresh cross-compiler works.
2491 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2492 # <limits.h> exists even on freestanding compilers.
2493 # On the NeXT, cc -E runs the code through the compiler's parser,
2494 # not just through cpp. "Syntax error" is here to catch this case.
2495 cat >conftest.$ac_ext <<_ACEOF
2496/* confdefs.h. */
2497_ACEOF
2498cat confdefs.h >>conftest.$ac_ext
2499cat >>conftest.$ac_ext <<_ACEOF
2500/* end confdefs.h. */
2501#ifdef __STDC__
2502# include <limits.h>
2503#else
2504# include <assert.h>
2505#endif
2506 Syntax error
2507_ACEOF
2508if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2509 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2510 ac_status=$?
2511 grep -v '^ *+' conftest.er1 >conftest.err
2512 rm -f conftest.er1
2513 cat conftest.err >&5
2514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2515 (exit $ac_status); } >/dev/null; then
2516 if test -s conftest.err; then
2517 ac_cpp_err=$ac_c_preproc_warn_flag
2518 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2519 else
2520 ac_cpp_err=
2521 fi
c906108c 2522else
bec39cab 2523 ac_cpp_err=yes
c906108c 2524fi
bec39cab
AC
2525if test -z "$ac_cpp_err"; then
2526 :
c906108c 2527else
bec39cab
AC
2528 echo "$as_me: failed program was:" >&5
2529sed 's/^/| /' conftest.$ac_ext >&5
2530
2531 # Broken: fails on valid input.
2532continue
2533fi
2534rm -f conftest.err conftest.$ac_ext
2535
b4e70030 2536 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2537 # can be detected and how.
2538 cat >conftest.$ac_ext <<_ACEOF
2539/* confdefs.h. */
2540_ACEOF
2541cat confdefs.h >>conftest.$ac_ext
2542cat >>conftest.$ac_ext <<_ACEOF
2543/* end confdefs.h. */
2544#include <ac_nonexistent.h>
2545_ACEOF
2546if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2547 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2548 ac_status=$?
2549 grep -v '^ *+' conftest.er1 >conftest.err
2550 rm -f conftest.er1
2551 cat conftest.err >&5
2552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2553 (exit $ac_status); } >/dev/null; then
2554 if test -s conftest.err; then
2555 ac_cpp_err=$ac_c_preproc_warn_flag
2556 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2557 else
2558 ac_cpp_err=
2559 fi
c906108c 2560else
bec39cab 2561 ac_cpp_err=yes
c906108c 2562fi
bec39cab
AC
2563if test -z "$ac_cpp_err"; then
2564 # Broken: success on invalid input.
2565continue
c906108c 2566else
bec39cab
AC
2567 echo "$as_me: failed program was:" >&5
2568sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2569
bec39cab
AC
2570 # Passes both tests.
2571ac_preproc_ok=:
2572break
c906108c 2573fi
bec39cab 2574rm -f conftest.err conftest.$ac_ext
c906108c 2575
bec39cab
AC
2576done
2577# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2578rm -f conftest.err conftest.$ac_ext
2579if $ac_preproc_ok; then
c906108c
SS
2580 :
2581else
d5af19ba
DJ
2582 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2583echo "$as_me: error: in \`$ac_pwd':" >&2;}
2584{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
bec39cab
AC
2585See \`config.log' for more details." >&5
2586echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2587See \`config.log' for more details." >&2;}
d5af19ba 2588 { (exit 1); exit 1; }; }; }
c906108c 2589fi
c906108c 2590
bec39cab
AC
2591ac_ext=c
2592ac_cpp='$CPP $CPPFLAGS'
2593ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2594ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2595ac_compiler_gnu=$ac_cv_c_compiler_gnu
2596
2597
b4e70030
JB
2598echo "$as_me:$LINENO: checking for egrep" >&5
2599echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2600if test "${ac_cv_prog_egrep+set}" = set; then
4e8d927d
DJ
2601 echo $ECHO_N "(cached) $ECHO_C" >&6
2602else
b4e70030
JB
2603 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2604 then ac_cv_prog_egrep='grep -E'
2605 else ac_cv_prog_egrep='egrep'
bec39cab 2606 fi
4e8d927d 2607fi
b4e70030
JB
2608echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2609echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2610 EGREP=$ac_cv_prog_egrep
c906108c 2611
bec39cab
AC
2612
2613
b4e70030
JB
2614echo "$as_me:$LINENO: checking for AIX" >&5
2615echo $ECHO_N "checking for AIX... $ECHO_C" >&6
bec39cab
AC
2616cat >conftest.$ac_ext <<_ACEOF
2617/* confdefs.h. */
2618_ACEOF
2619cat confdefs.h >>conftest.$ac_ext
2620cat >>conftest.$ac_ext <<_ACEOF
2621/* end confdefs.h. */
2622#ifdef _AIX
2623 yes
2624#endif
2625
2626_ACEOF
c906108c 2627if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 2628 $EGREP "yes" >/dev/null 2>&1; then
b4e70030
JB
2629 echo "$as_me:$LINENO: result: yes" >&5
2630echo "${ECHO_T}yes" >&6
bec39cab
AC
2631cat >>confdefs.h <<\_ACEOF
2632#define _ALL_SOURCE 1
2633_ACEOF
2634
c906108c 2635else
b4e70030
JB
2636 echo "$as_me:$LINENO: result: no" >&5
2637echo "${ECHO_T}no" >&6
c906108c
SS
2638fi
2639rm -f conftest*
2640
c906108c 2641
b4e70030
JB
2642echo "$as_me:$LINENO: checking for library containing strerror" >&5
2643echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
bec39cab
AC
2644if test "${ac_cv_search_strerror+set}" = set; then
2645 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2646else
bec39cab 2647 ac_func_search_save_LIBS=$LIBS
b4e70030 2648ac_cv_search_strerror=no
bec39cab
AC
2649cat >conftest.$ac_ext <<_ACEOF
2650/* confdefs.h. */
2651_ACEOF
2652cat confdefs.h >>conftest.$ac_ext
2653cat >>conftest.$ac_ext <<_ACEOF
2654/* end confdefs.h. */
c906108c 2655
b4e70030 2656/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
2657#ifdef __cplusplus
2658extern "C"
2659#endif
b4e70030
JB
2660/* We use char because int might match the return type of a gcc2
2661 builtin and then its argument prototype would still apply. */
bec39cab
AC
2662char strerror ();
2663int
2664main ()
2665{
b4e70030 2666strerror ();
bec39cab
AC
2667 ;
2668 return 0;
2669}
2670_ACEOF
b4e70030 2671rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
2672if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2673 (eval $ac_link) 2>conftest.er1
2674 ac_status=$?
2675 grep -v '^ *+' conftest.er1 >conftest.err
2676 rm -f conftest.er1
2677 cat conftest.err >&5
2678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2679 (exit $ac_status); } &&
b4e70030
JB
2680 { ac_try='test -z "$ac_c_werror_flag"
2681 || test ! -s conftest.err'
bec39cab
AC
2682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2683 (eval $ac_try) 2>&5
2684 ac_status=$?
2685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2686 (exit $ac_status); }; } &&
2687 { ac_try='test -s conftest$ac_exeext'
2688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2689 (eval $ac_try) 2>&5
2690 ac_status=$?
2691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2692 (exit $ac_status); }; }; then
b4e70030 2693 ac_cv_search_strerror="none required"
c906108c 2694else
bec39cab
AC
2695 echo "$as_me: failed program was:" >&5
2696sed 's/^/| /' conftest.$ac_ext >&5
c906108c
SS
2697
2698fi
bec39cab 2699rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
2700 conftest$ac_exeext conftest.$ac_ext
2701if test "$ac_cv_search_strerror" = no; then
2702 for ac_lib in cposix; do
2703 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
2704 cat >conftest.$ac_ext <<_ACEOF
2705/* confdefs.h. */
2706_ACEOF
2707cat confdefs.h >>conftest.$ac_ext
2708cat >>conftest.$ac_ext <<_ACEOF
2709/* end confdefs.h. */
2710
2711/* Override any gcc2 internal prototype to avoid an error. */
2712#ifdef __cplusplus
2713extern "C"
2714#endif
2715/* We use char because int might match the return type of a gcc2
2716 builtin and then its argument prototype would still apply. */
2717char strerror ();
2718int
2719main ()
2720{
2721strerror ();
2722 ;
2723 return 0;
2724}
2725_ACEOF
2726rm -f conftest.$ac_objext conftest$ac_exeext
2727if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2728 (eval $ac_link) 2>conftest.er1
2729 ac_status=$?
2730 grep -v '^ *+' conftest.er1 >conftest.err
2731 rm -f conftest.er1
2732 cat conftest.err >&5
2733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734 (exit $ac_status); } &&
2735 { ac_try='test -z "$ac_c_werror_flag"
2736 || test ! -s conftest.err'
2737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2738 (eval $ac_try) 2>&5
2739 ac_status=$?
2740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2741 (exit $ac_status); }; } &&
2742 { ac_try='test -s conftest$ac_exeext'
2743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2744 (eval $ac_try) 2>&5
2745 ac_status=$?
2746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2747 (exit $ac_status); }; }; then
2748 ac_cv_search_strerror="-l$ac_lib"
2749break
4e8d927d 2750else
b4e70030
JB
2751 echo "$as_me: failed program was:" >&5
2752sed 's/^/| /' conftest.$ac_ext >&5
2753
2754fi
2755rm -f conftest.err conftest.$ac_objext \
2756 conftest$ac_exeext conftest.$ac_ext
2757 done
c906108c 2758fi
bec39cab 2759LIBS=$ac_func_search_save_LIBS
c906108c 2760fi
b4e70030
JB
2761echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
2762echo "${ECHO_T}$ac_cv_search_strerror" >&6
2763if test "$ac_cv_search_strerror" != no; then
2764 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
bec39cab 2765
c906108c
SS
2766fi
2767
783e057b
DJ
2768if test -n "$ac_tool_prefix"; then
2769 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2770set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2771echo "$as_me:$LINENO: checking for $ac_word" >&5
2772echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2773if test "${ac_cv_prog_RANLIB+set}" = set; then
2774 echo $ECHO_N "(cached) $ECHO_C" >&6
2775else
2776 if test -n "$RANLIB"; then
2777 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2778else
2779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2780for as_dir in $PATH
2781do
2782 IFS=$as_save_IFS
2783 test -z "$as_dir" && as_dir=.
2784 for ac_exec_ext in '' $ac_executable_extensions; do
2785 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2786 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2787 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2788 break 2
2789 fi
2790done
2791done
c906108c 2792
783e057b
DJ
2793fi
2794fi
2795RANLIB=$ac_cv_prog_RANLIB
2796if test -n "$RANLIB"; then
2797 echo "$as_me:$LINENO: result: $RANLIB" >&5
2798echo "${ECHO_T}$RANLIB" >&6
2799else
2800 echo "$as_me:$LINENO: result: no" >&5
2801echo "${ECHO_T}no" >&6
2802fi
bec39cab 2803
783e057b
DJ
2804fi
2805if test -z "$ac_cv_prog_RANLIB"; then
2806 ac_ct_RANLIB=$RANLIB
2807 # Extract the first word of "ranlib", so it can be a program name with args.
2808set dummy ranlib; ac_word=$2
2809echo "$as_me:$LINENO: checking for $ac_word" >&5
2810echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2811if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
bec39cab 2812 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2813else
783e057b
DJ
2814 if test -n "$ac_ct_RANLIB"; then
2815 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2816else
2817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2818for as_dir in $PATH
bec39cab 2819do
783e057b
DJ
2820 IFS=$as_save_IFS
2821 test -z "$as_dir" && as_dir=.
2822 for ac_exec_ext in '' $ac_executable_extensions; do
2823 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2824 ac_cv_prog_ac_ct_RANLIB="ranlib"
2825 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2826 break 2
2827 fi
2828done
2829done
2830
2831 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2832fi
2833fi
2834ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2835if test -n "$ac_ct_RANLIB"; then
2836 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2837echo "${ECHO_T}$ac_ct_RANLIB" >&6
2838else
2839 echo "$as_me:$LINENO: result: no" >&5
2840echo "${ECHO_T}no" >&6
2841fi
2842
2843 RANLIB=$ac_ct_RANLIB
2844else
2845 RANLIB="$ac_cv_prog_RANLIB"
2846fi
2847
2848echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2849echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2850if test "${ac_cv_header_stdc+set}" = set; then
2851 echo $ECHO_N "(cached) $ECHO_C" >&6
2852else
bec39cab
AC
2853 cat >conftest.$ac_ext <<_ACEOF
2854/* confdefs.h. */
2855_ACEOF
2856cat confdefs.h >>conftest.$ac_ext
2857cat >>conftest.$ac_ext <<_ACEOF
2858/* end confdefs.h. */
783e057b 2859#include <stdlib.h>
bec39cab 2860#include <stdarg.h>
783e057b
DJ
2861#include <string.h>
2862#include <float.h>
c906108c 2863
bec39cab
AC
2864int
2865main ()
2866{
c906108c 2867
bec39cab
AC
2868 ;
2869 return 0;
2870}
2871_ACEOF
2872rm -f conftest.$ac_objext
2873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2874 (eval $ac_compile) 2>conftest.er1
2875 ac_status=$?
2876 grep -v '^ *+' conftest.er1 >conftest.err
2877 rm -f conftest.er1
2878 cat conftest.err >&5
2879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2880 (exit $ac_status); } &&
b4e70030
JB
2881 { ac_try='test -z "$ac_c_werror_flag"
2882 || test ! -s conftest.err'
bec39cab
AC
2883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2884 (eval $ac_try) 2>&5
2885 ac_status=$?
2886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2887 (exit $ac_status); }; } &&
2888 { ac_try='test -s conftest.$ac_objext'
2889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2890 (eval $ac_try) 2>&5
2891 ac_status=$?
2892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2893 (exit $ac_status); }; }; then
783e057b 2894 ac_cv_header_stdc=yes
c906108c 2895else
bec39cab
AC
2896 echo "$as_me: failed program was:" >&5
2897sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2898
783e057b 2899ac_cv_header_stdc=no
c906108c 2900fi
bec39cab 2901rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 2902
783e057b
DJ
2903if test $ac_cv_header_stdc = yes; then
2904 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2905 cat >conftest.$ac_ext <<_ACEOF
2906/* confdefs.h. */
2907_ACEOF
2908cat confdefs.h >>conftest.$ac_ext
2909cat >>conftest.$ac_ext <<_ACEOF
2910/* end confdefs.h. */
2911#include <string.h>
c906108c 2912
783e057b
DJ
2913_ACEOF
2914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2915 $EGREP "memchr" >/dev/null 2>&1; then
2916 :
c906108c 2917else
783e057b 2918 ac_cv_header_stdc=no
c906108c 2919fi
783e057b 2920rm -f conftest*
c906108c
SS
2921
2922fi
2923
783e057b
DJ
2924if test $ac_cv_header_stdc = yes; then
2925 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2926 cat >conftest.$ac_ext <<_ACEOF
2927/* confdefs.h. */
2928_ACEOF
2929cat confdefs.h >>conftest.$ac_ext
2930cat >>conftest.$ac_ext <<_ACEOF
2931/* end confdefs.h. */
2932#include <stdlib.h>
bec39cab 2933
783e057b
DJ
2934_ACEOF
2935if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2936 $EGREP "free" >/dev/null 2>&1; then
2937 :
bec39cab 2938else
783e057b 2939 ac_cv_header_stdc=no
bec39cab 2940fi
783e057b 2941rm -f conftest*
bec39cab
AC
2942
2943fi
bec39cab 2944
783e057b
DJ
2945if test $ac_cv_header_stdc = yes; then
2946 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2947 if test "$cross_compiling" = yes; then
2948 :
bec39cab 2949else
783e057b
DJ
2950 cat >conftest.$ac_ext <<_ACEOF
2951/* confdefs.h. */
2952_ACEOF
2953cat confdefs.h >>conftest.$ac_ext
2954cat >>conftest.$ac_ext <<_ACEOF
2955/* end confdefs.h. */
2956#include <ctype.h>
2957#if ((' ' & 0x0FF) == 0x020)
2958# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2959# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2960#else
2961# define ISLOWER(c) \
2962 (('a' <= (c) && (c) <= 'i') \
2963 || ('j' <= (c) && (c) <= 'r') \
2964 || ('s' <= (c) && (c) <= 'z'))
2965# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2966#endif
2967
2968#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2969int
2970main ()
2971{
2972 int i;
2973 for (i = 0; i < 256; i++)
2974 if (XOR (islower (i), ISLOWER (i))
2975 || toupper (i) != TOUPPER (i))
2976 exit(2);
2977 exit (0);
2978}
2979_ACEOF
2980rm -f conftest$ac_exeext
2981if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2982 (eval $ac_link) 2>&5
2983 ac_status=$?
2984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2987 (eval $ac_try) 2>&5
2988 ac_status=$?
2989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2990 (exit $ac_status); }; }; then
2991 :
2992else
2993 echo "$as_me: program exited with status $ac_status" >&5
2994echo "$as_me: failed program was:" >&5
2995sed 's/^/| /' conftest.$ac_ext >&5
2996
2997( exit $ac_status )
2998ac_cv_header_stdc=no
2999fi
3000rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3001fi
3002fi
3003fi
3004echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3005echo "${ECHO_T}$ac_cv_header_stdc" >&6
3006if test $ac_cv_header_stdc = yes; then
3007
3008cat >>confdefs.h <<\_ACEOF
3009#define STDC_HEADERS 1
3010_ACEOF
3011
3012fi
3013
3014# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3025 inttypes.h stdint.h unistd.h
3026do
3027as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3028echo "$as_me:$LINENO: checking for $ac_header" >&5
3029echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3030if eval "test \"\${$as_ac_Header+set}\" = set"; then
3031 echo $ECHO_N "(cached) $ECHO_C" >&6
3032else
3033 cat >conftest.$ac_ext <<_ACEOF
3034/* confdefs.h. */
3035_ACEOF
3036cat confdefs.h >>conftest.$ac_ext
3037cat >>conftest.$ac_ext <<_ACEOF
3038/* end confdefs.h. */
3039$ac_includes_default
3040
3041#include <$ac_header>
3042_ACEOF
3043rm -f conftest.$ac_objext
3044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3045 (eval $ac_compile) 2>conftest.er1
3046 ac_status=$?
3047 grep -v '^ *+' conftest.er1 >conftest.err
3048 rm -f conftest.er1
3049 cat conftest.err >&5
3050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3051 (exit $ac_status); } &&
3052 { ac_try='test -z "$ac_c_werror_flag"
3053 || test ! -s conftest.err'
3054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3055 (eval $ac_try) 2>&5
3056 ac_status=$?
3057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3058 (exit $ac_status); }; } &&
3059 { ac_try='test -s conftest.$ac_objext'
3060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3061 (eval $ac_try) 2>&5
3062 ac_status=$?
3063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3064 (exit $ac_status); }; }; then
3065 eval "$as_ac_Header=yes"
3066else
3067 echo "$as_me: failed program was:" >&5
3068sed 's/^/| /' conftest.$ac_ext >&5
3069
3070eval "$as_ac_Header=no"
3071fi
3072rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3073fi
3074echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3075echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3076if test `eval echo '${'$as_ac_Header'}'` = yes; then
3077 cat >>confdefs.h <<_ACEOF
3078#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3079_ACEOF
3080
3081fi
3082
3083done
3084
3085
3086
3087 if test "${ac_cv_header_minix_config_h+set}" = set; then
3088 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3089echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3090if test "${ac_cv_header_minix_config_h+set}" = set; then
3091 echo $ECHO_N "(cached) $ECHO_C" >&6
3092fi
3093echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3094echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3095else
3096 # Is the header compilable?
3097echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3098echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3099cat >conftest.$ac_ext <<_ACEOF
3100/* confdefs.h. */
3101_ACEOF
3102cat confdefs.h >>conftest.$ac_ext
3103cat >>conftest.$ac_ext <<_ACEOF
3104/* end confdefs.h. */
3105$ac_includes_default
3106#include <minix/config.h>
3107_ACEOF
3108rm -f conftest.$ac_objext
3109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3110 (eval $ac_compile) 2>conftest.er1
3111 ac_status=$?
3112 grep -v '^ *+' conftest.er1 >conftest.err
3113 rm -f conftest.er1
3114 cat conftest.err >&5
3115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3116 (exit $ac_status); } &&
3117 { ac_try='test -z "$ac_c_werror_flag"
3118 || test ! -s conftest.err'
3119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3120 (eval $ac_try) 2>&5
3121 ac_status=$?
3122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3123 (exit $ac_status); }; } &&
3124 { ac_try='test -s conftest.$ac_objext'
3125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3126 (eval $ac_try) 2>&5
3127 ac_status=$?
3128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3129 (exit $ac_status); }; }; then
3130 ac_header_compiler=yes
3131else
3132 echo "$as_me: failed program was:" >&5
3133sed 's/^/| /' conftest.$ac_ext >&5
3134
3135ac_header_compiler=no
3136fi
3137rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3138echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3139echo "${ECHO_T}$ac_header_compiler" >&6
3140
3141# Is the header present?
3142echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3143echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3144cat >conftest.$ac_ext <<_ACEOF
3145/* confdefs.h. */
3146_ACEOF
3147cat confdefs.h >>conftest.$ac_ext
3148cat >>conftest.$ac_ext <<_ACEOF
3149/* end confdefs.h. */
3150#include <minix/config.h>
3151_ACEOF
3152if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3153 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3154 ac_status=$?
3155 grep -v '^ *+' conftest.er1 >conftest.err
3156 rm -f conftest.er1
3157 cat conftest.err >&5
3158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3159 (exit $ac_status); } >/dev/null; then
3160 if test -s conftest.err; then
3161 ac_cpp_err=$ac_c_preproc_warn_flag
3162 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3163 else
3164 ac_cpp_err=
3165 fi
3166else
3167 ac_cpp_err=yes
3168fi
3169if test -z "$ac_cpp_err"; then
3170 ac_header_preproc=yes
3171else
3172 echo "$as_me: failed program was:" >&5
3173sed 's/^/| /' conftest.$ac_ext >&5
3174
3175 ac_header_preproc=no
3176fi
3177rm -f conftest.err conftest.$ac_ext
3178echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3179echo "${ECHO_T}$ac_header_preproc" >&6
3180
3181# So? What about this header?
3182case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3183 yes:no: )
3184 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3185echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3186 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
3187echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
3188 ac_header_preproc=yes
3189 ;;
3190 no:yes:* )
3191 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3192echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3193 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3194echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3195 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
3196echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
3197 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
3198echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
3199 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3200echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3201 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
3202echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
3203 (
3204 cat <<\_ASBOX
3205## ------------------------------------------ ##
3206## Report this to the AC_PACKAGE_NAME lists. ##
3207## ------------------------------------------ ##
3208_ASBOX
3209 ) |
3210 sed "s/^/$as_me: WARNING: /" >&2
3211 ;;
3212esac
3213echo "$as_me:$LINENO: checking for minix/config.h" >&5
3214echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3215if test "${ac_cv_header_minix_config_h+set}" = set; then
3216 echo $ECHO_N "(cached) $ECHO_C" >&6
3217else
3218 ac_cv_header_minix_config_h=$ac_header_preproc
3219fi
3220echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3221echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3222
3223fi
3224if test $ac_cv_header_minix_config_h = yes; then
3225 MINIX=yes
3226else
3227 MINIX=
3228fi
3229
3230
3231 if test "$MINIX" = yes; then
3232
3233cat >>confdefs.h <<\_ACEOF
3234#define _POSIX_SOURCE 1
3235_ACEOF
3236
3237
3238cat >>confdefs.h <<\_ACEOF
3239#define _POSIX_1_SOURCE 2
3240_ACEOF
3241
3242
3243cat >>confdefs.h <<\_ACEOF
3244#define _MINIX 1
3245_ACEOF
3246
3247 fi
3248
3249
3250
3251 echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
3252echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
3253if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
3254 echo $ECHO_N "(cached) $ECHO_C" >&6
3255else
3256 cat >conftest.$ac_ext <<_ACEOF
3257/* confdefs.h. */
3258_ACEOF
3259cat confdefs.h >>conftest.$ac_ext
3260cat >>conftest.$ac_ext <<_ACEOF
3261/* end confdefs.h. */
3262
3263# define __EXTENSIONS__ 1
3264 $ac_includes_default
3265int
3266main ()
3267{
3268
3269 ;
3270 return 0;
3271}
3272_ACEOF
3273rm -f conftest.$ac_objext
3274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3275 (eval $ac_compile) 2>conftest.er1
3276 ac_status=$?
3277 grep -v '^ *+' conftest.er1 >conftest.err
3278 rm -f conftest.er1
3279 cat conftest.err >&5
3280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3281 (exit $ac_status); } &&
3282 { ac_try='test -z "$ac_c_werror_flag"
3283 || test ! -s conftest.err'
3284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3285 (eval $ac_try) 2>&5
3286 ac_status=$?
3287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3288 (exit $ac_status); }; } &&
3289 { ac_try='test -s conftest.$ac_objext'
3290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3291 (eval $ac_try) 2>&5
3292 ac_status=$?
3293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3294 (exit $ac_status); }; }; then
3295 ac_cv_safe_to_define___extensions__=yes
3296else
3297 echo "$as_me: failed program was:" >&5
3298sed 's/^/| /' conftest.$ac_ext >&5
3299
3300ac_cv_safe_to_define___extensions__=no
3301fi
3302rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3303fi
3304echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
3305echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
3306 test $ac_cv_safe_to_define___extensions__ = yes &&
3307 cat >>confdefs.h <<\_ACEOF
3308#define __EXTENSIONS__ 1
3309_ACEOF
3310
3311 cat >>confdefs.h <<\_ACEOF
3312#define _ALL_SOURCE 1
3313_ACEOF
3314
3315 cat >>confdefs.h <<\_ACEOF
3316#define _GNU_SOURCE 1
3317_ACEOF
3318
3319 cat >>confdefs.h <<\_ACEOF
3320#define _POSIX_PTHREAD_SEMANTICS 1
3321_ACEOF
3322
3323 cat >>confdefs.h <<\_ACEOF
3324#define _TANDEM_SOURCE 1
3325_ACEOF
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5
3337echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
3338if test "${am_cv_prog_cc_stdc+set}" = set; then
3339 echo $ECHO_N "(cached) $ECHO_C" >&6
3340else
3341 am_cv_prog_cc_stdc=no
3342ac_save_CC="$CC"
3343# Don't try gcc -ansi; that turns off useful extensions and
3344# breaks some systems' header files.
3345# AIX -qlanglvl=ansi
3346# Ultrix and OSF/1 -std1
3347# HP-UX 10.20 and later -Ae
3348# HP-UX older versions -Aa -D_HPUX_SOURCE
3349# SVR4 -Xc -D__EXTENSIONS__
3350for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3351do
3352 CC="$ac_save_CC $ac_arg"
3353 cat >conftest.$ac_ext <<_ACEOF
3354/* confdefs.h. */
3355_ACEOF
3356cat confdefs.h >>conftest.$ac_ext
3357cat >>conftest.$ac_ext <<_ACEOF
3358/* end confdefs.h. */
3359#include <stdarg.h>
3360#include <stdio.h>
3361#include <sys/types.h>
3362#include <sys/stat.h>
3363/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3364struct buf { int x; };
3365FILE * (*rcsopen) (struct buf *, struct stat *, int);
3366static char *e (p, i)
3367 char **p;
3368 int i;
3369{
3370 return p[i];
3371}
3372static char *f (char * (*g) (char **, int), char **p, ...)
3373{
3374 char *s;
3375 va_list v;
3376 va_start (v,p);
3377 s = g (p, va_arg (v,int));
3378 va_end (v);
3379 return s;
3380}
3381int test (int i, double x);
3382struct s1 {int (*f) (int a);};
3383struct s2 {int (*f) (double a);};
3384int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3385int argc;
3386char **argv;
3387
3388int
3389main ()
3390{
3391
3392return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3393
3394 ;
3395 return 0;
3396}
3397_ACEOF
3398rm -f conftest.$ac_objext
3399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3400 (eval $ac_compile) 2>conftest.er1
3401 ac_status=$?
3402 grep -v '^ *+' conftest.er1 >conftest.err
3403 rm -f conftest.er1
3404 cat conftest.err >&5
3405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3406 (exit $ac_status); } &&
3407 { ac_try='test -z "$ac_c_werror_flag"
3408 || test ! -s conftest.err'
3409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3410 (eval $ac_try) 2>&5
3411 ac_status=$?
3412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3413 (exit $ac_status); }; } &&
3414 { ac_try='test -s conftest.$ac_objext'
3415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3416 (eval $ac_try) 2>&5
3417 ac_status=$?
3418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3419 (exit $ac_status); }; }; then
3420 am_cv_prog_cc_stdc="$ac_arg"; break
3421else
3422 echo "$as_me: failed program was:" >&5
3423sed 's/^/| /' conftest.$ac_ext >&5
3424
3425fi
3426rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3427done
3428CC="$ac_save_CC"
3429
3430fi
3431
3432if test -z "$am_cv_prog_cc_stdc"; then
3433 echo "$as_me:$LINENO: result: none needed" >&5
3434echo "${ECHO_T}none needed" >&6
3435else
3436 echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5
3437echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6
3438fi
3439case "x$am_cv_prog_cc_stdc" in
3440 x|xno) ;;
3441 *) CC="$CC $am_cv_prog_cc_stdc" ;;
3442esac
3443
3444
3445ac_aux_dir=
3446for ac_dir in .. $srcdir/..; do
3447 if test -f $ac_dir/install-sh; then
3448 ac_aux_dir=$ac_dir
3449 ac_install_sh="$ac_aux_dir/install-sh -c"
3450 break
3451 elif test -f $ac_dir/install.sh; then
3452 ac_aux_dir=$ac_dir
3453 ac_install_sh="$ac_aux_dir/install.sh -c"
3454 break
3455 elif test -f $ac_dir/shtool; then
3456 ac_aux_dir=$ac_dir
3457 ac_install_sh="$ac_aux_dir/shtool install -c"
3458 break
3459 fi
3460done
3461if test -z "$ac_aux_dir"; then
3462 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5
3463echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;}
3464 { (exit 1); exit 1; }; }
3465fi
3466ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3467ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3468ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
3469
3470# Make sure we can run config.sub.
3471$ac_config_sub sun4 >/dev/null 2>&1 ||
3472 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
3473echo "$as_me: error: cannot run $ac_config_sub" >&2;}
3474 { (exit 1); exit 1; }; }
3475
3476echo "$as_me:$LINENO: checking build system type" >&5
3477echo $ECHO_N "checking build system type... $ECHO_C" >&6
3478if test "${ac_cv_build+set}" = set; then
3479 echo $ECHO_N "(cached) $ECHO_C" >&6
3480else
3481 ac_cv_build_alias=$build_alias
3482test -z "$ac_cv_build_alias" &&
3483 ac_cv_build_alias=`$ac_config_guess`
3484test -z "$ac_cv_build_alias" &&
3485 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
3486echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
3487 { (exit 1); exit 1; }; }
3488ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
3489 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
3490echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
3491 { (exit 1); exit 1; }; }
3492
3493fi
3494echo "$as_me:$LINENO: result: $ac_cv_build" >&5
3495echo "${ECHO_T}$ac_cv_build" >&6
3496build=$ac_cv_build
3497build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3498build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3499build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3500
3501
3502echo "$as_me:$LINENO: checking host system type" >&5
3503echo $ECHO_N "checking host system type... $ECHO_C" >&6
3504if test "${ac_cv_host+set}" = set; then
3505 echo $ECHO_N "(cached) $ECHO_C" >&6
3506else
3507 ac_cv_host_alias=$host_alias
3508test -z "$ac_cv_host_alias" &&
3509 ac_cv_host_alias=$ac_cv_build_alias
3510ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
3511 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
3512echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
3513 { (exit 1); exit 1; }; }
3514
3515fi
3516echo "$as_me:$LINENO: result: $ac_cv_host" >&5
3517echo "${ECHO_T}$ac_cv_host" >&6
3518host=$ac_cv_host
3519host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3520host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3521host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3522
3523
3524echo "$as_me:$LINENO: checking target system type" >&5
3525echo $ECHO_N "checking target system type... $ECHO_C" >&6
3526if test "${ac_cv_target+set}" = set; then
3527 echo $ECHO_N "(cached) $ECHO_C" >&6
3528else
3529 ac_cv_target_alias=$target_alias
3530test "x$ac_cv_target_alias" = "x" &&
b4e70030
JB
3531 ac_cv_target_alias=$ac_cv_host_alias
3532ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
3533 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
3534echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
bec39cab
AC
3535 { (exit 1); exit 1; }; }
3536
3537fi
783e057b
DJ
3538echo "$as_me:$LINENO: result: $ac_cv_target" >&5
3539echo "${ECHO_T}$ac_cv_target" >&6
3540target=$ac_cv_target
3541target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3542target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3543target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3544
3545
3546# The aliases save the names the user supplied, while $host etc.
3547# will get canonicalized.
3548test -n "$target_alias" &&
3549 test "$program_prefix$program_suffix$program_transform_name" = \
3550 NONENONEs,x,x, &&
3551 program_prefix=${target_alias}-
3552
a417dc56
RW
3553# Dependency checking.
3554rm -rf .tst 2>/dev/null
3555mkdir .tst 2>/dev/null
3556if test -d .tst; then
3557 am__leading_dot=.
3558else
3559 am__leading_dot=_
3560fi
3561rmdir .tst 2>/dev/null
3562
3563DEPDIR="${am__leading_dot}deps"
3564
3565 ac_config_commands="$ac_config_commands depdir"
3566
3567
3568depcc="$CC" am_compiler_list=
3569
3570am_depcomp=$ac_aux_dir/depcomp
3571echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
3572echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
3573if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
3574 echo $ECHO_N "(cached) $ECHO_C" >&6
3575else
3576 if test -f "$am_depcomp"; then
3577 # We make a subdir and do the tests there. Otherwise we can end up
3578 # making bogus files that we don't know about and never remove. For
3579 # instance it was reported that on HP-UX the gcc test will end up
3580 # making a dummy file named `D' -- because `-MD' means `put the output
3581 # in D'.
3582 mkdir conftest.dir
3583 # Copy depcomp to subdir because otherwise we won't find it if we're
3584 # using a relative directory.
3585 cp "$am_depcomp" conftest.dir
3586 cd conftest.dir
3587 # We will build objects and dependencies in a subdirectory because
3588 # it helps to detect inapplicable dependency modes. For instance
3589 # both Tru64's cc and ICC support -MD to output dependencies as a
3590 # side effect of compilation, but ICC will put the dependencies in
3591 # the current directory while Tru64 will put them in the object
3592 # directory.
3593 mkdir sub
3594
3595 am_cv_CC_dependencies_compiler_type=none
3596 if test "$am_compiler_list" = ""; then
3597 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3598 fi
3599 for depmode in $am_compiler_list; do
3600 if test $depmode = none; then break; fi
3601
3602 echo "$as_me:$LINENO: trying $depmode" >&5
3603 # Setup a source with many dependencies, because some compilers
3604 # like to wrap large dependency lists on column 80 (with \), and
3605 # we should not choose a depcomp mode which is confused by this.
3606 #
3607 # We need to recreate these files for each test, as the compiler may
3608 # overwrite some of them when testing with obscure command lines.
3609 # This happens at least with the AIX C compiler.
3610 : > sub/conftest.c
3611 for i in 1 2 3 4 5 6; do
3612 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3613 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3614 # Solaris 8's {/usr,}/bin/sh.
3615 touch sub/conftst$i.h
3616 done
3617 echo "include sub/conftest.Po" > confmf
3618
3619 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3620 # mode. It turns out that the SunPro C++ compiler does not properly
3621 # handle `-M -o', and we need to detect this.
3622 depcmd="depmode=$depmode \
3623 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
3624 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3625 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
3626 echo "| $depcmd" | sed -e 's/ */ /g' >&5
3627 if env $depcmd > conftest.err 2>&1 &&
3628 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
3629 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
3630 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
3631 # icc doesn't choke on unknown options, it will just issue warnings
3632 # or remarks (even with -Werror). So we grep stderr for any message
3633 # that says an option was ignored or not supported.
3634 # When given -MP, icc 7.0 and 7.1 complain thusly:
3635 # icc: Command line warning: ignoring option '-M'; no argument required
3636 # The diagnosis changed in icc 8.0:
3637 # icc: Command line remark: option '-MP' not supported
3638 if (grep 'ignoring option' conftest.err ||
3639 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3640 am_cv_CC_dependencies_compiler_type=$depmode
3641 echo "$as_me:$LINENO: success" >&5
3642 break
3643 fi
3644 fi
3645 echo "$as_me:$LINENO: failure, diagnostics are:" >&5
3646 sed -e 's/^/| /' < conftest.err >&5
3647 done
3648
3649 cd ..
3650 rm -rf conftest.dir
3651else
3652 am_cv_CC_dependencies_compiler_type=none
3653fi
3654
3655fi
3656echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3657echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
3658if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
3659then { { echo "$as_me:$LINENO: error: no usable dependency style found" >&5
3660echo "$as_me: error: no usable dependency style found" >&2;}
3661 { (exit 1); exit 1; }; }
3662else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3663
3664fi
3665
3666
3667# Check for the 'make' the user wants to use.
3668for ac_prog in make
3669do
3670 # Extract the first word of "$ac_prog", so it can be a program name with args.
3671set dummy $ac_prog; ac_word=$2
3672echo "$as_me:$LINENO: checking for $ac_word" >&5
3673echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3674if test "${ac_cv_prog_MAKE+set}" = set; then
3675 echo $ECHO_N "(cached) $ECHO_C" >&6
3676else
3677 if test -n "$MAKE"; then
3678 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
3679else
3680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3681for as_dir in $PATH
3682do
3683 IFS=$as_save_IFS
3684 test -z "$as_dir" && as_dir=.
3685 for ac_exec_ext in '' $ac_executable_extensions; do
3686 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3687 ac_cv_prog_MAKE="$ac_prog"
3688 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3689 break 2
3690 fi
3691done
3692done
3693
3694fi
3695fi
3696MAKE=$ac_cv_prog_MAKE
3697if test -n "$MAKE"; then
3698 echo "$as_me:$LINENO: result: $MAKE" >&5
3699echo "${ECHO_T}$MAKE" >&6
3700else
3701 echo "$as_me:$LINENO: result: no" >&5
3702echo "${ECHO_T}no" >&6
3703fi
3704
3705 test -n "$MAKE" && break
3706done
3707
3708MAKE_IS_GNU=
3709case "`$MAKE --version 2>&1 | sed 1q`" in
3710 *GNU*)
3711 MAKE_IS_GNU=yes
3712 ;;
3713esac
3714
3715
3716if test "$MAKE_IS_GNU" = yes; then
3717 GMAKE_TRUE=
3718 GMAKE_FALSE='#'
3719else
3720 GMAKE_TRUE='#'
3721 GMAKE_FALSE=
3722fi
3723
3724echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3725echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3726set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3727if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3728 echo $ECHO_N "(cached) $ECHO_C" >&6
3729else
3730 cat >conftest.make <<\_ACEOF
3731all:
3732 @echo 'ac_maketemp="$(MAKE)"'
3733_ACEOF
3734# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3735eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3736if test -n "$ac_maketemp"; then
3737 eval ac_cv_prog_make_${ac_make}_set=yes
3738else
3739 eval ac_cv_prog_make_${ac_make}_set=no
3740fi
3741rm -f conftest.make
3742fi
3743if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3744 echo "$as_me:$LINENO: result: yes" >&5
3745echo "${ECHO_T}yes" >&6
3746 SET_MAKE=
3747else
3748 echo "$as_me:$LINENO: result: no" >&5
3749echo "${ECHO_T}no" >&6
3750 SET_MAKE="MAKE=${MAKE-make}"
3751fi
3752
3753
783e057b
DJ
3754
3755CONFIG_OBS=
3756CONFIG_DEPS=
3757CONFIG_SRCS=
3758ENABLE_CFLAGS=
3759
3760CONFIG_ALL=
3761CONFIG_CLEAN=
3762CONFIG_INSTALL=
3763CONFIG_UNINSTALL=
3764
3765# If we haven't got the data from the intl directory,
3766# assume NLS is disabled.
3767USE_NLS=no
3768LIBINTL=
3769LIBINTL_DEP=
3770INCINTL=
3771XGETTEXT=
3772GMSGFMT=
3773POSUB=
3774
3775if test -f ../intl/config.intl; then
3776 . ../intl/config.intl
3777fi
3778echo "$as_me:$LINENO: checking whether NLS is requested" >&5
3779echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
3780if test x"$USE_NLS" != xyes; then
3781 echo "$as_me:$LINENO: result: no" >&5
3782echo "${ECHO_T}no" >&6
3783else
3784 echo "$as_me:$LINENO: result: yes" >&5
3785echo "${ECHO_T}yes" >&6
3786
3787cat >>confdefs.h <<\_ACEOF
3788#define ENABLE_NLS 1
3789_ACEOF
3790
3791
3792 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
3793echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
3794 # Look for .po and .gmo files in the source directory.
3795 CATALOGS=
3796 XLINGUAS=
3797 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
3798 # If there aren't any .gmo files the shell will give us the
3799 # literal string "../path/to/srcdir/po/*.gmo" which has to be
3800 # weeded out.
3801 case "$cat" in *\**)
3802 continue;;
3803 esac
3804 # The quadruple backslash is collapsed to a double backslash
3805 # by the backticks, then collapsed again by the double quotes,
3806 # leaving us with one backslash in the sed expression (right
3807 # before the dot that mustn't act as a wildcard).
3808 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
3809 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
3810 # The user is allowed to set LINGUAS to a list of languages to
3811 # install catalogs for. If it's empty that means "all of them."
3812 if test "x$LINGUAS" = x; then
3813 CATALOGS="$CATALOGS $cat"
3814 XLINGUAS="$XLINGUAS $lang"
3815 else
3816 case "$LINGUAS" in *$lang*)
3817 CATALOGS="$CATALOGS $cat"
3818 XLINGUAS="$XLINGUAS $lang"
3819 ;;
3820 esac
3821 fi
3822 done
3823 LINGUAS="$XLINGUAS"
3824 echo "$as_me:$LINENO: result: $LINGUAS" >&5
3825echo "${ECHO_T}$LINGUAS" >&6
3826
3827
3828 DATADIRNAME=share
3829
3830 INSTOBJEXT=.mo
3831
3832 GENCAT=gencat
3833
3834 CATOBJEXT=.gmo
3835
3836fi
3837
3838localedir='${datadir}/locale'
3839
3840
3841if test x"$USE_NLS" = xyes; then
3842 CONFIG_ALL="$CONFIG_ALL all-po"
3843 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
3844 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
3845 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
3846fi
3847
3848
3849 GNULIB_MEMMEM=0;
3850 GNULIB_MEMPCPY=0;
3851 GNULIB_MEMRCHR=0;
3852 GNULIB_STPCPY=0;
3853 GNULIB_STPNCPY=0;
3854 GNULIB_STRCHRNUL=0;
3855 GNULIB_STRDUP=0;
3856 GNULIB_STRNDUP=0;
3857 GNULIB_STRNLEN=0;
3858 GNULIB_STRPBRK=0;
3859 GNULIB_STRSEP=0;
3860 GNULIB_STRSTR=0;
3861 GNULIB_STRCASESTR=0;
3862 GNULIB_STRTOK_R=0;
3863 GNULIB_MBSLEN=0;
3864 GNULIB_MBSNLEN=0;
3865 GNULIB_MBSCHR=0;
3866 GNULIB_MBSRCHR=0;
3867 GNULIB_MBSSTR=0;
3868 GNULIB_MBSCASECMP=0;
3869 GNULIB_MBSNCASECMP=0;
3870 GNULIB_MBSPCASECMP=0;
3871 GNULIB_MBSCASESTR=0;
3872 GNULIB_MBSCSPN=0;
3873 GNULIB_MBSPBRK=0;
3874 GNULIB_MBSSPN=0;
3875 GNULIB_MBSSEP=0;
3876 GNULIB_MBSTOK_R=0;
3877 GNULIB_STRERROR=0;
3878 GNULIB_STRSIGNAL=0;
3879 HAVE_DECL_MEMMEM=1;
3880 HAVE_MEMPCPY=1;
3881 HAVE_DECL_MEMRCHR=1;
3882 HAVE_STPCPY=1;
3883 HAVE_STPNCPY=1;
3884 HAVE_STRCHRNUL=1;
3885 HAVE_DECL_STRDUP=1;
3886 HAVE_STRNDUP=1;
3887 HAVE_DECL_STRNDUP=1;
3888 HAVE_DECL_STRNLEN=1;
3889 HAVE_STRPBRK=1;
3890 HAVE_STRSEP=1;
3891 HAVE_STRCASESTR=1;
3892 HAVE_DECL_STRTOK_R=1;
3893 HAVE_DECL_STRERROR=1;
3894 HAVE_DECL_STRSIGNAL=1;
3895 REPLACE_STRERROR=0;
3896 REPLACE_STRSIGNAL=0;
3897 REPLACE_MEMMEM=0;
3898 REPLACE_STRCASESTR=0;
3899 REPLACE_STRSTR=0;
3900
3901
3902 echo "$as_me:$LINENO: checking whether memmem is declared" >&5
3903echo $ECHO_N "checking whether memmem is declared... $ECHO_C" >&6
3904if test "${ac_cv_have_decl_memmem+set}" = set; then
3905 echo $ECHO_N "(cached) $ECHO_C" >&6
3906else
3907 cat >conftest.$ac_ext <<_ACEOF
3908/* confdefs.h. */
3909_ACEOF
3910cat confdefs.h >>conftest.$ac_ext
3911cat >>conftest.$ac_ext <<_ACEOF
3912/* end confdefs.h. */
3913$ac_includes_default
3914int
3915main ()
3916{
3917#ifndef memmem
3918 char *p = (char *) memmem;
3919#endif
3920
3921 ;
3922 return 0;
3923}
3924_ACEOF
3925rm -f conftest.$ac_objext
3926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3927 (eval $ac_compile) 2>conftest.er1
3928 ac_status=$?
3929 grep -v '^ *+' conftest.er1 >conftest.err
3930 rm -f conftest.er1
3931 cat conftest.err >&5
3932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3933 (exit $ac_status); } &&
3934 { ac_try='test -z "$ac_c_werror_flag"
3935 || test ! -s conftest.err'
3936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3937 (eval $ac_try) 2>&5
3938 ac_status=$?
3939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3940 (exit $ac_status); }; } &&
3941 { ac_try='test -s conftest.$ac_objext'
3942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3943 (eval $ac_try) 2>&5
3944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); }; }; then
3947 ac_cv_have_decl_memmem=yes
3948else
3949 echo "$as_me: failed program was:" >&5
3950sed 's/^/| /' conftest.$ac_ext >&5
3951
3952ac_cv_have_decl_memmem=no
3953fi
3954rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3955fi
3956echo "$as_me:$LINENO: result: $ac_cv_have_decl_memmem" >&5
3957echo "${ECHO_T}$ac_cv_have_decl_memmem" >&6
3958if test $ac_cv_have_decl_memmem = yes; then
3959
3960cat >>confdefs.h <<_ACEOF
3961#define HAVE_DECL_MEMMEM 1
3962_ACEOF
3963
3964
3965else
3966 cat >>confdefs.h <<_ACEOF
3967#define HAVE_DECL_MEMMEM 0
3968_ACEOF
3969
3970
3971fi
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987for ac_func in memmem
3988do
3989as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3990echo "$as_me:$LINENO: checking for $ac_func" >&5
3991echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3992if eval "test \"\${$as_ac_var+set}\" = set"; then
3993 echo $ECHO_N "(cached) $ECHO_C" >&6
3994else
3995 cat >conftest.$ac_ext <<_ACEOF
3996/* confdefs.h. */
3997_ACEOF
3998cat confdefs.h >>conftest.$ac_ext
3999cat >>conftest.$ac_ext <<_ACEOF
4000/* end confdefs.h. */
4001/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4002 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4003#define $ac_func innocuous_$ac_func
4004
4005/* System header to define __stub macros and hopefully few prototypes,
4006 which can conflict with char $ac_func (); below.
4007 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4008 <limits.h> exists even on freestanding compilers. */
4009
4010#ifdef __STDC__
4011# include <limits.h>
4012#else
4013# include <assert.h>
4014#endif
4015
4016#undef $ac_func
4017
4018/* Override any gcc2 internal prototype to avoid an error. */
4019#ifdef __cplusplus
4020extern "C"
4021{
4022#endif
4023/* We use char because int might match the return type of a gcc2
4024 builtin and then its argument prototype would still apply. */
4025char $ac_func ();
4026/* The GNU C library defines this for functions which it implements
4027 to always fail with ENOSYS. Some functions are actually named
4028 something starting with __ and the normal name is an alias. */
4029#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4030choke me
4031#else
4032char (*f) () = $ac_func;
4033#endif
4034#ifdef __cplusplus
4035}
4036#endif
4037
4038int
4039main ()
4040{
4041return f != $ac_func;
4042 ;
4043 return 0;
4044}
4045_ACEOF
4046rm -f conftest.$ac_objext conftest$ac_exeext
4047if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4048 (eval $ac_link) 2>conftest.er1
4049 ac_status=$?
4050 grep -v '^ *+' conftest.er1 >conftest.err
4051 rm -f conftest.er1
4052 cat conftest.err >&5
4053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4054 (exit $ac_status); } &&
4055 { ac_try='test -z "$ac_c_werror_flag"
4056 || test ! -s conftest.err'
4057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4058 (eval $ac_try) 2>&5
4059 ac_status=$?
4060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4061 (exit $ac_status); }; } &&
4062 { ac_try='test -s conftest$ac_exeext'
4063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4064 (eval $ac_try) 2>&5
4065 ac_status=$?
4066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4067 (exit $ac_status); }; }; then
4068 eval "$as_ac_var=yes"
4069else
4070 echo "$as_me: failed program was:" >&5
4071sed 's/^/| /' conftest.$ac_ext >&5
4072
4073eval "$as_ac_var=no"
4074fi
4075rm -f conftest.err conftest.$ac_objext \
4076 conftest$ac_exeext conftest.$ac_ext
4077fi
4078echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4079echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4080if test `eval echo '${'$as_ac_var'}'` = yes; then
4081 cat >>confdefs.h <<_ACEOF
4082#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4083_ACEOF
4084
4085else
4086
4087 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4088
4089fi
4090done
4091
4092
4093
4094 :
4095
4096
4097
4098
4099
4100 if test $ac_cv_have_decl_memmem = no; then
4101 HAVE_DECL_MEMMEM=0
4102 fi
4103 :
4104
4105
4106 echo "$as_me:$LINENO: checking for long long int" >&5
4107echo $ECHO_N "checking for long long int... $ECHO_C" >&6
4108if test "${ac_cv_type_long_long_int+set}" = set; then
4109 echo $ECHO_N "(cached) $ECHO_C" >&6
4110else
4111 cat >conftest.$ac_ext <<_ACEOF
4112
4113 /* confdefs.h. */
4114_ACEOF
4115cat confdefs.h >>conftest.$ac_ext
4116cat >>conftest.$ac_ext <<_ACEOF
4117/* end confdefs.h. */
4118/* For now, do not test the preprocessor; as of 2007 there are too many
4119 implementations with broken preprocessors. Perhaps this can
4120 be revisited in 2012. In the meantime, code should not expect
4121 #if to work with literals wider than 32 bits. */
4122 /* Test literals. */
4123 long long int ll = 9223372036854775807ll;
4124 long long int nll = -9223372036854775807LL;
4125 unsigned long long int ull = 18446744073709551615ULL;
4126 /* Test constant expressions. */
4127 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4128 ? 1 : -1)];
4129 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4130 ? 1 : -1)];
4131 int i = 63;
4132int
4133main ()
4134{
4135/* Test availability of runtime routines for shift and division. */
4136 long long int llmax = 9223372036854775807ll;
4137 unsigned long long int ullmax = 18446744073709551615ull;
4138 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4139 | (llmax / ll) | (llmax % ll)
4140 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4141 | (ullmax / ull) | (ullmax % ull));
4142 ;
4143 return 0;
4144}
4145
4146_ACEOF
4147rm -f conftest.$ac_objext conftest$ac_exeext
4148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4149 (eval $ac_link) 2>conftest.er1
4150 ac_status=$?
4151 grep -v '^ *+' conftest.er1 >conftest.err
4152 rm -f conftest.er1
4153 cat conftest.err >&5
4154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4155 (exit $ac_status); } &&
4156 { ac_try='test -z "$ac_c_werror_flag"
4157 || test ! -s conftest.err'
4158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4159 (eval $ac_try) 2>&5
4160 ac_status=$?
4161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4162 (exit $ac_status); }; } &&
4163 { ac_try='test -s conftest$ac_exeext'
4164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4165 (eval $ac_try) 2>&5
4166 ac_status=$?
4167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4168 (exit $ac_status); }; }; then
4169 if test "$cross_compiling" = yes; then
4170 ac_cv_type_long_long_int=yes
4171else
4172 cat >conftest.$ac_ext <<_ACEOF
4173/* confdefs.h. */
4174_ACEOF
4175cat confdefs.h >>conftest.$ac_ext
4176cat >>conftest.$ac_ext <<_ACEOF
4177/* end confdefs.h. */
4178#include <limits.h>
4179 #ifndef LLONG_MAX
4180 # define HALF \
4181 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4182 # define LLONG_MAX (HALF - 1 + HALF)
4183 #endif
4184int
4185main ()
4186{
4187long long int n = 1;
4188 int i;
4189 for (i = 0; ; i++)
4190 {
4191 long long int m = n << i;
4192 if (m >> i != n)
4193 return 1;
4194 if (LLONG_MAX / 2 < m)
4195 break;
4196 }
4197 return 0;
4198 ;
4199 return 0;
4200}
4201_ACEOF
4202rm -f conftest$ac_exeext
4203if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4204 (eval $ac_link) 2>&5
4205 ac_status=$?
4206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4207 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4209 (eval $ac_try) 2>&5
4210 ac_status=$?
4211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4212 (exit $ac_status); }; }; then
4213 ac_cv_type_long_long_int=yes
4214else
4215 echo "$as_me: program exited with status $ac_status" >&5
4216echo "$as_me: failed program was:" >&5
4217sed 's/^/| /' conftest.$ac_ext >&5
4218
4219( exit $ac_status )
4220ac_cv_type_long_long_int=no
4221fi
4222rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4223fi
4224else
4225 echo "$as_me: failed program was:" >&5
4226sed 's/^/| /' conftest.$ac_ext >&5
4227
4228ac_cv_type_long_long_int=no
4229fi
4230rm -f conftest.err conftest.$ac_objext \
4231 conftest$ac_exeext conftest.$ac_ext
4232fi
4233echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
4234echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
4235 if test $ac_cv_type_long_long_int = yes; then
4236
4237cat >>confdefs.h <<\_ACEOF
4238#define HAVE_LONG_LONG_INT 1
4239_ACEOF
4240
4241 fi
4242
4243
4244 echo "$as_me:$LINENO: checking for unsigned long long int" >&5
4245echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6
4246if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
4247 echo $ECHO_N "(cached) $ECHO_C" >&6
4248else
4249 cat >conftest.$ac_ext <<_ACEOF
4250
4251 /* confdefs.h. */
4252_ACEOF
4253cat confdefs.h >>conftest.$ac_ext
4254cat >>conftest.$ac_ext <<_ACEOF
4255/* end confdefs.h. */
4256/* For now, do not test the preprocessor; as of 2007 there are too many
4257 implementations with broken preprocessors. Perhaps this can
4258 be revisited in 2012. In the meantime, code should not expect
4259 #if to work with literals wider than 32 bits. */
4260 /* Test literals. */
4261 long long int ll = 9223372036854775807ll;
4262 long long int nll = -9223372036854775807LL;
4263 unsigned long long int ull = 18446744073709551615ULL;
4264 /* Test constant expressions. */
4265 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4266 ? 1 : -1)];
4267 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4268 ? 1 : -1)];
4269 int i = 63;
4270int
4271main ()
4272{
4273/* Test availability of runtime routines for shift and division. */
4274 long long int llmax = 9223372036854775807ll;
4275 unsigned long long int ullmax = 18446744073709551615ull;
4276 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4277 | (llmax / ll) | (llmax % ll)
4278 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4279 | (ullmax / ull) | (ullmax % ull));
4280 ;
4281 return 0;
4282}
4283
4284_ACEOF
4285rm -f conftest.$ac_objext conftest$ac_exeext
4286if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4287 (eval $ac_link) 2>conftest.er1
4288 ac_status=$?
4289 grep -v '^ *+' conftest.er1 >conftest.err
4290 rm -f conftest.er1
4291 cat conftest.err >&5
4292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4293 (exit $ac_status); } &&
4294 { ac_try='test -z "$ac_c_werror_flag"
4295 || test ! -s conftest.err'
4296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4297 (eval $ac_try) 2>&5
4298 ac_status=$?
4299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4300 (exit $ac_status); }; } &&
4301 { ac_try='test -s conftest$ac_exeext'
4302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4303 (eval $ac_try) 2>&5
4304 ac_status=$?
4305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4306 (exit $ac_status); }; }; then
4307 ac_cv_type_unsigned_long_long_int=yes
4308else
4309 echo "$as_me: failed program was:" >&5
4310sed 's/^/| /' conftest.$ac_ext >&5
4311
4312ac_cv_type_unsigned_long_long_int=no
4313fi
4314rm -f conftest.err conftest.$ac_objext \
4315 conftest$ac_exeext conftest.$ac_ext
4316fi
4317echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
4318echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6
4319 if test $ac_cv_type_unsigned_long_long_int = yes; then
4320
4321cat >>confdefs.h <<\_ACEOF
4322#define HAVE_UNSIGNED_LONG_LONG_INT 1
4323_ACEOF
4324
4325 fi
4326
4327
4328
4329 echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5
4330echo $ECHO_N "checking whether the preprocessor supports include_next... $ECHO_C" >&6
4331if test "${gl_cv_have_include_next+set}" = set; then
4332 echo $ECHO_N "(cached) $ECHO_C" >&6
4333else
4334 rm -rf conftestd1 conftestd2
4335 mkdir conftestd1 conftestd2
4336 cat <<EOF > conftestd1/conftest.h
4337#define DEFINED_IN_CONFTESTD1
4338#include_next <conftest.h>
4339#ifdef DEFINED_IN_CONFTESTD2
4340int foo;
4341#else
4342#error "include_next doesn't work"
4343#endif
4344EOF
4345 cat <<EOF > conftestd2/conftest.h
4346#ifndef DEFINED_IN_CONFTESTD1
4347#error "include_next test doesn't work"
4348#endif
4349#define DEFINED_IN_CONFTESTD2
4350EOF
4351 save_CPPFLAGS="$CPPFLAGS"
4352 CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
4353 cat >conftest.$ac_ext <<_ACEOF
4354#include <conftest.h>
4355_ACEOF
4356rm -f conftest.$ac_objext
4357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4358 (eval $ac_compile) 2>conftest.er1
4359 ac_status=$?
4360 grep -v '^ *+' conftest.er1 >conftest.err
4361 rm -f conftest.er1
4362 cat conftest.err >&5
4363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4364 (exit $ac_status); } &&
4365 { ac_try='test -z "$ac_c_werror_flag"
4366 || test ! -s conftest.err'
4367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4368 (eval $ac_try) 2>&5
4369 ac_status=$?
4370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4371 (exit $ac_status); }; } &&
4372 { ac_try='test -s conftest.$ac_objext'
4373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4374 (eval $ac_try) 2>&5
4375 ac_status=$?
4376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4377 (exit $ac_status); }; }; then
4378 gl_cv_have_include_next=yes
4379else
4380 echo "$as_me: failed program was:" >&5
4381sed 's/^/| /' conftest.$ac_ext >&5
4382
4383gl_cv_have_include_next=no
4384fi
4385rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4386 CPPFLAGS="$save_CPPFLAGS"
4387 rm -rf conftestd1 conftestd2
4388
4389fi
4390echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5
4391echo "${ECHO_T}$gl_cv_have_include_next" >&6
4392 if test $gl_cv_have_include_next = yes; then
4393
4394
4395cat >>confdefs.h <<\_ACEOF
4396#define HAVE_INCLUDE_NEXT 1
4397_ACEOF
4398
4399
4400 INCLUDE_NEXT=include_next
4401 else
4402 INCLUDE_NEXT=include
4403 fi
4404
4405
4406
4407
4408
4409
4410
4411for ac_header in $gl_header_list
4412do
4413as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4414if eval "test \"\${$as_ac_Header+set}\" = set"; then
4415 echo "$as_me:$LINENO: checking for $ac_header" >&5
4416echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4417if eval "test \"\${$as_ac_Header+set}\" = set"; then
4418 echo $ECHO_N "(cached) $ECHO_C" >&6
4419fi
4420echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4421echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4422else
4423 # Is the header compilable?
4424echo "$as_me:$LINENO: checking $ac_header usability" >&5
4425echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4426cat >conftest.$ac_ext <<_ACEOF
4427/* confdefs.h. */
4428_ACEOF
4429cat confdefs.h >>conftest.$ac_ext
4430cat >>conftest.$ac_ext <<_ACEOF
4431/* end confdefs.h. */
4432$ac_includes_default
4433#include <$ac_header>
4434_ACEOF
4435rm -f conftest.$ac_objext
4436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4437 (eval $ac_compile) 2>conftest.er1
4438 ac_status=$?
4439 grep -v '^ *+' conftest.er1 >conftest.err
4440 rm -f conftest.er1
4441 cat conftest.err >&5
4442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4443 (exit $ac_status); } &&
4444 { ac_try='test -z "$ac_c_werror_flag"
4445 || test ! -s conftest.err'
4446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4447 (eval $ac_try) 2>&5
4448 ac_status=$?
4449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4450 (exit $ac_status); }; } &&
4451 { ac_try='test -s conftest.$ac_objext'
4452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4453 (eval $ac_try) 2>&5
4454 ac_status=$?
4455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4456 (exit $ac_status); }; }; then
4457 ac_header_compiler=yes
4458else
4459 echo "$as_me: failed program was:" >&5
4460sed 's/^/| /' conftest.$ac_ext >&5
4461
4462ac_header_compiler=no
4463fi
4464rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4465echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4466echo "${ECHO_T}$ac_header_compiler" >&6
4467
4468# Is the header present?
4469echo "$as_me:$LINENO: checking $ac_header presence" >&5
4470echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4471cat >conftest.$ac_ext <<_ACEOF
4472/* confdefs.h. */
4473_ACEOF
4474cat confdefs.h >>conftest.$ac_ext
4475cat >>conftest.$ac_ext <<_ACEOF
4476/* end confdefs.h. */
4477#include <$ac_header>
4478_ACEOF
4479if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4480 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4481 ac_status=$?
4482 grep -v '^ *+' conftest.er1 >conftest.err
4483 rm -f conftest.er1
4484 cat conftest.err >&5
4485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4486 (exit $ac_status); } >/dev/null; then
4487 if test -s conftest.err; then
4488 ac_cpp_err=$ac_c_preproc_warn_flag
4489 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4490 else
4491 ac_cpp_err=
4492 fi
4493else
4494 ac_cpp_err=yes
4495fi
4496if test -z "$ac_cpp_err"; then
4497 ac_header_preproc=yes
4498else
4499 echo "$as_me: failed program was:" >&5
4500sed 's/^/| /' conftest.$ac_ext >&5
4501
4502 ac_header_preproc=no
4503fi
4504rm -f conftest.err conftest.$ac_ext
4505echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4506echo "${ECHO_T}$ac_header_preproc" >&6
4507
4508# So? What about this header?
4509case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4510 yes:no: )
4511 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4512echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4513 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4514echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4515 ac_header_preproc=yes
4516 ;;
4517 no:yes:* )
4518 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4519echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4520 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4521echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4522 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4523echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4524 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4525echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4526 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4527echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4528 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4529echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4530 (
4531 cat <<\_ASBOX
4532## ------------------------------------------ ##
4533## Report this to the AC_PACKAGE_NAME lists. ##
4534## ------------------------------------------ ##
4535_ASBOX
4536 ) |
4537 sed "s/^/$as_me: WARNING: /" >&2
4538 ;;
4539esac
4540echo "$as_me:$LINENO: checking for $ac_header" >&5
4541echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4542if eval "test \"\${$as_ac_Header+set}\" = set"; then
4543 echo $ECHO_N "(cached) $ECHO_C" >&6
4544else
4545 eval "$as_ac_Header=\$ac_header_preproc"
4546fi
4547echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4548echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4549
4550fi
4551if test `eval echo '${'$as_ac_Header'}'` = yes; then
4552 cat >>confdefs.h <<_ACEOF
4553#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4554_ACEOF
4555
4556fi
4557
4558done
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
4572echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6
4573if test "${ac_cv_c_restrict+set}" = set; then
4574 echo $ECHO_N "(cached) $ECHO_C" >&6
4575else
4576 ac_cv_c_restrict=no
4577 # The order here caters to the fact that C++ does not require restrict.
4578 for ac_kw in __restrict __restrict__ _Restrict restrict; do
4579 cat >conftest.$ac_ext <<_ACEOF
4580/* confdefs.h. */
4581_ACEOF
4582cat confdefs.h >>conftest.$ac_ext
4583cat >>conftest.$ac_ext <<_ACEOF
4584/* end confdefs.h. */
4585typedef int * int_ptr;
4586 int foo (int_ptr $ac_kw ip) {
4587 return ip[0];
4588 }
4589int
4590main ()
4591{
4592int s[1];
4593 int * $ac_kw t = s;
4594 t[0] = 0;
4595 return foo(t)
4596 ;
4597 return 0;
4598}
4599_ACEOF
4600rm -f conftest.$ac_objext
4601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4602 (eval $ac_compile) 2>conftest.er1
4603 ac_status=$?
4604 grep -v '^ *+' conftest.er1 >conftest.err
4605 rm -f conftest.er1
4606 cat conftest.err >&5
4607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4608 (exit $ac_status); } &&
4609 { ac_try='test -z "$ac_c_werror_flag"
4610 || test ! -s conftest.err'
4611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4612 (eval $ac_try) 2>&5
4613 ac_status=$?
4614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4615 (exit $ac_status); }; } &&
4616 { ac_try='test -s conftest.$ac_objext'
4617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4618 (eval $ac_try) 2>&5
4619 ac_status=$?
4620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4621 (exit $ac_status); }; }; then
4622 ac_cv_c_restrict=$ac_kw
4623else
4624 echo "$as_me: failed program was:" >&5
4625sed 's/^/| /' conftest.$ac_ext >&5
4626
4627fi
4628rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4629 test "$ac_cv_c_restrict" != no && break
4630 done
4631
4632fi
4633echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5
4634echo "${ECHO_T}$ac_cv_c_restrict" >&6
4635
4636
4637 case $ac_cv_c_restrict in
4638 restrict) ;;
4639 no) cat >>confdefs.h <<\_ACEOF
4640#define restrict
4641_ACEOF
4642 ;;
4643 *) cat >>confdefs.h <<_ACEOF
4644#define restrict $ac_cv_c_restrict
4645_ACEOF
4646 ;;
4647 esac
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661 :
4662
4663
4664
4665
4666
4667
4668
4669 if test $gl_cv_have_include_next = yes; then
4670 gl_cv_next_string_h='<'string.h'>'
4671 else
4672 echo "$as_me:$LINENO: checking absolute name of <string.h>" >&5
4673echo $ECHO_N "checking absolute name of <string.h>... $ECHO_C" >&6
4674if test "${gl_cv_next_string_h+set}" = set; then
4675 echo $ECHO_N "(cached) $ECHO_C" >&6
4676else
4677
4678 if test $ac_cv_header_string_h = yes; then
4679 cat >conftest.$ac_ext <<_ACEOF
4680/* confdefs.h. */
4681_ACEOF
4682cat confdefs.h >>conftest.$ac_ext
4683cat >>conftest.$ac_ext <<_ACEOF
4684/* end confdefs.h. */
4685#include <string.h>
4686
4687_ACEOF
4688 gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4689 sed -n '\#/string.h#{
4690 s#.*"\(.*/string.h\)".*#\1#
4691 s#^/[^/]#//&#
4692 p
4693 q
4694 }'`'"'
4695 else
4696 gl_cv_next_string_h='<'string.h'>'
4697 fi
4698
4699fi
4700echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5
4701echo "${ECHO_T}$gl_cv_next_string_h" >&6
4702 fi
4703 NEXT_STRING_H=$gl_cv_next_string_h
4704
4705
4706
4707
4708
4709 GNULIB_WCWIDTH=0;
4710 HAVE_DECL_WCWIDTH=1;
4711 REPLACE_WCWIDTH=0;
4712 WCHAR_H=
4713
4714
4715
4716
4717
4718if false; then
4719 GL_COND_LIBTOOL_TRUE=
4720 GL_COND_LIBTOOL_FALSE='#'
4721else
4722 GL_COND_LIBTOOL_TRUE='#'
4723 GL_COND_LIBTOOL_FALSE=
4724fi
4725
4726 gl_cond_libtool=false
4727 gl_libdeps=
4728 gl_ltlibdeps=
4729
4730
4731
4732 gl_source_base='gnulib'
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742for ac_func in memchr
4743do
4744as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4745echo "$as_me:$LINENO: checking for $ac_func" >&5
4746echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4747if eval "test \"\${$as_ac_var+set}\" = set"; then
4748 echo $ECHO_N "(cached) $ECHO_C" >&6
4749else
4750 cat >conftest.$ac_ext <<_ACEOF
4751/* confdefs.h. */
4752_ACEOF
4753cat confdefs.h >>conftest.$ac_ext
4754cat >>conftest.$ac_ext <<_ACEOF
4755/* end confdefs.h. */
4756/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4757 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4758#define $ac_func innocuous_$ac_func
4759
4760/* System header to define __stub macros and hopefully few prototypes,
4761 which can conflict with char $ac_func (); below.
4762 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4763 <limits.h> exists even on freestanding compilers. */
4764
4765#ifdef __STDC__
4766# include <limits.h>
4767#else
4768# include <assert.h>
4769#endif
4770
4771#undef $ac_func
4772
4773/* Override any gcc2 internal prototype to avoid an error. */
4774#ifdef __cplusplus
4775extern "C"
4776{
4777#endif
4778/* We use char because int might match the return type of a gcc2
4779 builtin and then its argument prototype would still apply. */
4780char $ac_func ();
4781/* The GNU C library defines this for functions which it implements
4782 to always fail with ENOSYS. Some functions are actually named
4783 something starting with __ and the normal name is an alias. */
4784#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4785choke me
4786#else
4787char (*f) () = $ac_func;
4788#endif
4789#ifdef __cplusplus
4790}
4791#endif
4792
4793int
4794main ()
4795{
4796return f != $ac_func;
4797 ;
4798 return 0;
4799}
4800_ACEOF
4801rm -f conftest.$ac_objext conftest$ac_exeext
4802if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4803 (eval $ac_link) 2>conftest.er1
4804 ac_status=$?
4805 grep -v '^ *+' conftest.er1 >conftest.err
4806 rm -f conftest.er1
4807 cat conftest.err >&5
4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); } &&
4810 { ac_try='test -z "$ac_c_werror_flag"
4811 || test ! -s conftest.err'
4812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4813 (eval $ac_try) 2>&5
4814 ac_status=$?
4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816 (exit $ac_status); }; } &&
4817 { ac_try='test -s conftest$ac_exeext'
4818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4819 (eval $ac_try) 2>&5
4820 ac_status=$?
4821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4822 (exit $ac_status); }; }; then
4823 eval "$as_ac_var=yes"
4824else
4825 echo "$as_me: failed program was:" >&5
4826sed 's/^/| /' conftest.$ac_ext >&5
4827
4828eval "$as_ac_var=no"
4829fi
4830rm -f conftest.err conftest.$ac_objext \
4831 conftest$ac_exeext conftest.$ac_ext
4832fi
4833echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4834echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4835if test `eval echo '${'$as_ac_var'}'` = yes; then
4836 cat >>confdefs.h <<_ACEOF
4837#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4838_ACEOF
4839
4840else
4841
4842 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4843
4844fi
4845done
4846
4847
4848 if test $ac_cv_func_memchr = no; then
4849
4850
4851for ac_header in bp-sym.h
4852do
4853as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4854if eval "test \"\${$as_ac_Header+set}\" = set"; then
4855 echo "$as_me:$LINENO: checking for $ac_header" >&5
4856echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4857if eval "test \"\${$as_ac_Header+set}\" = set"; then
4858 echo $ECHO_N "(cached) $ECHO_C" >&6
4859fi
4860echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4861echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4862else
4863 # Is the header compilable?
4864echo "$as_me:$LINENO: checking $ac_header usability" >&5
4865echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4866cat >conftest.$ac_ext <<_ACEOF
4867/* confdefs.h. */
4868_ACEOF
4869cat confdefs.h >>conftest.$ac_ext
4870cat >>conftest.$ac_ext <<_ACEOF
4871/* end confdefs.h. */
4872$ac_includes_default
4873#include <$ac_header>
4874_ACEOF
4875rm -f conftest.$ac_objext
4876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4877 (eval $ac_compile) 2>conftest.er1
4878 ac_status=$?
4879 grep -v '^ *+' conftest.er1 >conftest.err
4880 rm -f conftest.er1
4881 cat conftest.err >&5
4882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4883 (exit $ac_status); } &&
4884 { ac_try='test -z "$ac_c_werror_flag"
4885 || test ! -s conftest.err'
4886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4887 (eval $ac_try) 2>&5
4888 ac_status=$?
4889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4890 (exit $ac_status); }; } &&
4891 { ac_try='test -s conftest.$ac_objext'
4892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4893 (eval $ac_try) 2>&5
4894 ac_status=$?
4895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4896 (exit $ac_status); }; }; then
4897 ac_header_compiler=yes
4898else
4899 echo "$as_me: failed program was:" >&5
4900sed 's/^/| /' conftest.$ac_ext >&5
4901
4902ac_header_compiler=no
4903fi
4904rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4905echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4906echo "${ECHO_T}$ac_header_compiler" >&6
4907
4908# Is the header present?
4909echo "$as_me:$LINENO: checking $ac_header presence" >&5
4910echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4911cat >conftest.$ac_ext <<_ACEOF
4912/* confdefs.h. */
4913_ACEOF
4914cat confdefs.h >>conftest.$ac_ext
4915cat >>conftest.$ac_ext <<_ACEOF
4916/* end confdefs.h. */
4917#include <$ac_header>
4918_ACEOF
4919if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4920 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4921 ac_status=$?
4922 grep -v '^ *+' conftest.er1 >conftest.err
4923 rm -f conftest.er1
4924 cat conftest.err >&5
4925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4926 (exit $ac_status); } >/dev/null; then
4927 if test -s conftest.err; then
4928 ac_cpp_err=$ac_c_preproc_warn_flag
4929 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4930 else
4931 ac_cpp_err=
4932 fi
4933else
4934 ac_cpp_err=yes
4935fi
4936if test -z "$ac_cpp_err"; then
4937 ac_header_preproc=yes
4938else
4939 echo "$as_me: failed program was:" >&5
4940sed 's/^/| /' conftest.$ac_ext >&5
4941
4942 ac_header_preproc=no
4943fi
4944rm -f conftest.err conftest.$ac_ext
4945echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4946echo "${ECHO_T}$ac_header_preproc" >&6
4947
4948# So? What about this header?
4949case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4950 yes:no: )
4951 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4952echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4953 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4954echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4955 ac_header_preproc=yes
4956 ;;
4957 no:yes:* )
4958 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4959echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4960 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4961echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4962 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4963echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4964 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4965echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4966 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4967echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4968 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4969echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4970 (
4971 cat <<\_ASBOX
4972## ------------------------------------------ ##
4973## Report this to the AC_PACKAGE_NAME lists. ##
4974## ------------------------------------------ ##
4975_ASBOX
4976 ) |
4977 sed "s/^/$as_me: WARNING: /" >&2
4978 ;;
4979esac
4980echo "$as_me:$LINENO: checking for $ac_header" >&5
4981echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4982if eval "test \"\${$as_ac_Header+set}\" = set"; then
4983 echo $ECHO_N "(cached) $ECHO_C" >&6
4984else
4985 eval "$as_ac_Header=\$ac_header_preproc"
4986fi
4987echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4988echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4989
4990fi
4991if test `eval echo '${'$as_ac_Header'}'` = yes; then
4992 cat >>confdefs.h <<_ACEOF
4993#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4994_ACEOF
4995
4996fi
4997
4998done
4999
5000
5001 fi
5002
5003
5004 echo "$as_me:$LINENO: checking for working memcmp" >&5
5005echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
5006if test "${ac_cv_func_memcmp_working+set}" = set; then
5007 echo $ECHO_N "(cached) $ECHO_C" >&6
5008else
5009 if test "$cross_compiling" = yes; then
5010 ac_cv_func_memcmp_working=no
5011else
5012 cat >conftest.$ac_ext <<_ACEOF
5013/* confdefs.h. */
5014_ACEOF
5015cat confdefs.h >>conftest.$ac_ext
5016cat >>conftest.$ac_ext <<_ACEOF
5017/* end confdefs.h. */
5018$ac_includes_default
5019int
5020main ()
5021{
5022
5023 /* Some versions of memcmp are not 8-bit clean. */
5024 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
5025 if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
5026 exit (1);
5027
5028 /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
5029 or more and with at least one buffer not starting on a 4-byte boundary.
5030 William Lewis provided this test program. */
5031 {
5032 char foo[21];
5033 char bar[21];
5034 int i;
5035 for (i = 0; i < 4; i++)
5036 {
5037 char *a = foo + i;
5038 char *b = bar + i;
5039 strcpy (a, "--------01111111");
5040 strcpy (b, "--------10000000");
5041 if (memcmp (a, b, 16) >= 0)
5042 exit (1);
5043 }
5044 exit (0);
5045 }
5046
5047 ;
5048 return 0;
5049}
5050_ACEOF
5051rm -f conftest$ac_exeext
5052if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5053 (eval $ac_link) 2>&5
5054 ac_status=$?
5055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5058 (eval $ac_try) 2>&5
5059 ac_status=$?
5060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5061 (exit $ac_status); }; }; then
5062 ac_cv_func_memcmp_working=yes
5063else
5064 echo "$as_me: program exited with status $ac_status" >&5
5065echo "$as_me: failed program was:" >&5
5066sed 's/^/| /' conftest.$ac_ext >&5
5067
5068( exit $ac_status )
5069ac_cv_func_memcmp_working=no
5070fi
5071rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5072fi
5073fi
5074echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
5075echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
5076test $ac_cv_func_memcmp_working = no &&
5077
5078
5079
5080
5081
5082
5083 gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext"
5084
5085
5086 if test $ac_cv_func_memcmp_working = no; then
5087
5088cat >>confdefs.h <<\_ACEOF
5089#define memcmp rpl_memcmp
5090_ACEOF
5091
5092 :
5093 fi
5094
5095
5096
5097 if test $ac_cv_have_decl_memmem = yes; then
5098 echo "$as_me:$LINENO: checking whether memmem works in linear time" >&5
5099echo $ECHO_N "checking whether memmem works in linear time... $ECHO_C" >&6
5100if test "${gl_cv_func_memmem_works+set}" = set; then
5101 echo $ECHO_N "(cached) $ECHO_C" >&6
5102else
5103 if test "$cross_compiling" = yes; then
5104 gl_cv_func_memmem_works="guessing no"
5105else
5106 cat >conftest.$ac_ext <<_ACEOF
5107/* confdefs.h. */
5108_ACEOF
5109cat confdefs.h >>conftest.$ac_ext
5110cat >>conftest.$ac_ext <<_ACEOF
5111/* end confdefs.h. */
5112
5113#include <string.h> /* for memmem */
5114#include <stdlib.h> /* for malloc */
5115#include <unistd.h> /* for alarm */
5116
5117int
5118main ()
5119{
5120size_t m = 1000000;
5121 char *haystack = (char *) malloc (2 * m + 1);
5122 char *needle = (char *) malloc (m + 1);
5123 void *result = 0;
5124 /* Failure to compile this test due to missing alarm is okay,
5125 since all such platforms (mingw) also lack memmem. */
5126 alarm (5);
5127 /* Check for quadratic performance. */
5128 if (haystack && needle)
5129 {
5130 memset (haystack, 'A', 2 * m);
5131 haystack[2 * m] = 'B';
5132 memset (needle, 'A', m);
5133 needle[m] = 'B';
5134 result = memmem (haystack, 2 * m + 1, needle, m + 1);
5135 }
5136 /* Check for empty needle behavior. */
5137 return !result || !memmem ("a", 1, 0, 0);
5138 ;
5139 return 0;
5140}
5141_ACEOF
5142rm -f conftest$ac_exeext
5143if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5144 (eval $ac_link) 2>&5
5145 ac_status=$?
5146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5147 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5149 (eval $ac_try) 2>&5
5150 ac_status=$?
5151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5152 (exit $ac_status); }; }; then
5153 gl_cv_func_memmem_works=yes
5154else
5155 echo "$as_me: program exited with status $ac_status" >&5
5156echo "$as_me: failed program was:" >&5
5157sed 's/^/| /' conftest.$ac_ext >&5
5158
5159( exit $ac_status )
5160gl_cv_func_memmem_works=no
5161fi
5162rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5163fi
5164fi
5165echo "$as_me:$LINENO: result: $gl_cv_func_memmem_works" >&5
5166echo "${ECHO_T}$gl_cv_func_memmem_works" >&6
5167 if test "$gl_cv_func_memmem_works" != yes; then
5168 REPLACE_MEMMEM=1
5169
5170
5171
5172
5173
5174
5175
5176 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
5177
5178 fi
5179 fi
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193for ac_func in memmem
5194do
5195as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5196echo "$as_me:$LINENO: checking for $ac_func" >&5
5197echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5198if eval "test \"\${$as_ac_var+set}\" = set"; then
5199 echo $ECHO_N "(cached) $ECHO_C" >&6
5200else
5201 cat >conftest.$ac_ext <<_ACEOF
5202/* confdefs.h. */
5203_ACEOF
5204cat confdefs.h >>conftest.$ac_ext
5205cat >>conftest.$ac_ext <<_ACEOF
5206/* end confdefs.h. */
5207/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5208 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5209#define $ac_func innocuous_$ac_func
5210
5211/* System header to define __stub macros and hopefully few prototypes,
5212 which can conflict with char $ac_func (); below.
5213 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5214 <limits.h> exists even on freestanding compilers. */
5215
5216#ifdef __STDC__
5217# include <limits.h>
5218#else
5219# include <assert.h>
5220#endif
5221
5222#undef $ac_func
5223
5224/* Override any gcc2 internal prototype to avoid an error. */
5225#ifdef __cplusplus
5226extern "C"
5227{
5228#endif
5229/* We use char because int might match the return type of a gcc2
5230 builtin and then its argument prototype would still apply. */
5231char $ac_func ();
5232/* The GNU C library defines this for functions which it implements
5233 to always fail with ENOSYS. Some functions are actually named
5234 something starting with __ and the normal name is an alias. */
5235#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5236choke me
5237#else
5238char (*f) () = $ac_func;
5239#endif
5240#ifdef __cplusplus
5241}
5242#endif
5243
5244int
5245main ()
5246{
5247return f != $ac_func;
5248 ;
5249 return 0;
5250}
5251_ACEOF
5252rm -f conftest.$ac_objext conftest$ac_exeext
5253if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5254 (eval $ac_link) 2>conftest.er1
5255 ac_status=$?
5256 grep -v '^ *+' conftest.er1 >conftest.err
5257 rm -f conftest.er1
5258 cat conftest.err >&5
5259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5260 (exit $ac_status); } &&
5261 { ac_try='test -z "$ac_c_werror_flag"
5262 || test ! -s conftest.err'
5263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5264 (eval $ac_try) 2>&5
5265 ac_status=$?
5266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267 (exit $ac_status); }; } &&
5268 { ac_try='test -s conftest$ac_exeext'
5269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5270 (eval $ac_try) 2>&5
5271 ac_status=$?
5272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5273 (exit $ac_status); }; }; then
5274 eval "$as_ac_var=yes"
5275else
5276 echo "$as_me: failed program was:" >&5
5277sed 's/^/| /' conftest.$ac_ext >&5
5278
5279eval "$as_ac_var=no"
5280fi
5281rm -f conftest.err conftest.$ac_objext \
5282 conftest$ac_exeext conftest.$ac_ext
5283fi
5284echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5285echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5286if test `eval echo '${'$as_ac_var'}'` = yes; then
5287 cat >>confdefs.h <<_ACEOF
5288#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5289_ACEOF
5290
5291else
5292
5293 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5294
5295fi
5296done
5297
5298
5299
5300 :
5301
5302
5303
5304
5305
5306 if test $ac_cv_have_decl_memmem = no; then
5307 HAVE_DECL_MEMMEM=0
5308 fi
5309 :
5310
5311
5312
5313 GNULIB_MEMMEM=1
5314
5315
5316
5317
5318 if test $ac_cv_type_long_long_int = yes; then
5319 HAVE_LONG_LONG_INT=1
5320 else
5321 HAVE_LONG_LONG_INT=0
5322 fi
5323
5324
5325 if test $ac_cv_type_unsigned_long_long_int = yes; then
5326 HAVE_UNSIGNED_LONG_LONG_INT=1
5327 else
5328 HAVE_UNSIGNED_LONG_LONG_INT=0
5329 fi
5330
5331
5332 if test $ac_cv_header_inttypes_h = yes; then
5333 HAVE_INTTYPES_H=1
5334 else
5335 HAVE_INTTYPES_H=0
5336 fi
5337
5338
5339 if test $ac_cv_header_sys_types_h = yes; then
5340 HAVE_SYS_TYPES_H=1
5341 else
5342 HAVE_SYS_TYPES_H=0
5343 fi
5344
5345
5346
5347
5348
5349 :
5350
5351
5352
5353
5354
5355
5356
5357 if test $gl_cv_have_include_next = yes; then
5358 gl_cv_next_stdint_h='<'stdint.h'>'
5359 else
5360 echo "$as_me:$LINENO: checking absolute name of <stdint.h>" >&5
5361echo $ECHO_N "checking absolute name of <stdint.h>... $ECHO_C" >&6
5362if test "${gl_cv_next_stdint_h+set}" = set; then
5363 echo $ECHO_N "(cached) $ECHO_C" >&6
5364else
5365
5366 if test $ac_cv_header_stdint_h = yes; then
5367 cat >conftest.$ac_ext <<_ACEOF
5368/* confdefs.h. */
5369_ACEOF
5370cat confdefs.h >>conftest.$ac_ext
5371cat >>conftest.$ac_ext <<_ACEOF
5372/* end confdefs.h. */
5373#include <stdint.h>
5374
5375_ACEOF
5376 gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5377 sed -n '\#/stdint.h#{
5378 s#.*"\(.*/stdint.h\)".*#\1#
5379 s#^/[^/]#//&#
5380 p
5381 q
5382 }'`'"'
5383 else
5384 gl_cv_next_stdint_h='<'stdint.h'>'
5385 fi
5386
5387fi
5388echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5
5389echo "${ECHO_T}$gl_cv_next_stdint_h" >&6
5390 fi
5391 NEXT_STDINT_H=$gl_cv_next_stdint_h
5392
5393
5394
5395 if test $ac_cv_header_stdint_h = yes; then
5396 HAVE_STDINT_H=1
5397 else
5398 HAVE_STDINT_H=0
5399 fi
5400
5401
5402 if test $ac_cv_header_stdint_h = yes; then
5403 echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5
5404echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6
5405if test "${gl_cv_header_working_stdint_h+set}" = set; then
5406 echo $ECHO_N "(cached) $ECHO_C" >&6
5407else
5408 gl_cv_header_working_stdint_h=no
5409 cat >conftest.$ac_ext <<_ACEOF
5410
5411 /* confdefs.h. */
5412_ACEOF
5413cat confdefs.h >>conftest.$ac_ext
5414cat >>conftest.$ac_ext <<_ACEOF
5415/* end confdefs.h. */
5416
5417#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
5418#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
5419#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5420#include <stdint.h>
5421/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
5422#if !(defined WCHAR_MIN && defined WCHAR_MAX)
5423#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
5424#endif
5425
5426
5427 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5428 included before <wchar.h>. */
5429 #include <stddef.h>
5430 #include <signal.h>
5431 #if HAVE_WCHAR_H
5432 # include <stdio.h>
5433 # include <time.h>
5434 # include <wchar.h>
5435 #endif
5436
5437
5438#ifdef INT8_MAX
5439int8_t a1 = INT8_MAX;
5440int8_t a1min = INT8_MIN;
5441#endif
5442#ifdef INT16_MAX
5443int16_t a2 = INT16_MAX;
5444int16_t a2min = INT16_MIN;
5445#endif
5446#ifdef INT32_MAX
5447int32_t a3 = INT32_MAX;
5448int32_t a3min = INT32_MIN;
5449#endif
5450#ifdef INT64_MAX
5451int64_t a4 = INT64_MAX;
5452int64_t a4min = INT64_MIN;
5453#endif
5454#ifdef UINT8_MAX
5455uint8_t b1 = UINT8_MAX;
5456#else
5457typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
5458#endif
5459#ifdef UINT16_MAX
5460uint16_t b2 = UINT16_MAX;
5461#endif
5462#ifdef UINT32_MAX
5463uint32_t b3 = UINT32_MAX;
5464#endif
5465#ifdef UINT64_MAX
5466uint64_t b4 = UINT64_MAX;
5467#endif
5468int_least8_t c1 = INT8_C (0x7f);
5469int_least8_t c1max = INT_LEAST8_MAX;
5470int_least8_t c1min = INT_LEAST8_MIN;
5471int_least16_t c2 = INT16_C (0x7fff);
5472int_least16_t c2max = INT_LEAST16_MAX;
5473int_least16_t c2min = INT_LEAST16_MIN;
5474int_least32_t c3 = INT32_C (0x7fffffff);
5475int_least32_t c3max = INT_LEAST32_MAX;
5476int_least32_t c3min = INT_LEAST32_MIN;
5477int_least64_t c4 = INT64_C (0x7fffffffffffffff);
5478int_least64_t c4max = INT_LEAST64_MAX;
5479int_least64_t c4min = INT_LEAST64_MIN;
5480uint_least8_t d1 = UINT8_C (0xff);
5481uint_least8_t d1max = UINT_LEAST8_MAX;
5482uint_least16_t d2 = UINT16_C (0xffff);
5483uint_least16_t d2max = UINT_LEAST16_MAX;
5484uint_least32_t d3 = UINT32_C (0xffffffff);
5485uint_least32_t d3max = UINT_LEAST32_MAX;
5486uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
5487uint_least64_t d4max = UINT_LEAST64_MAX;
5488int_fast8_t e1 = INT_FAST8_MAX;
5489int_fast8_t e1min = INT_FAST8_MIN;
5490int_fast16_t e2 = INT_FAST16_MAX;
5491int_fast16_t e2min = INT_FAST16_MIN;
5492int_fast32_t e3 = INT_FAST32_MAX;
5493int_fast32_t e3min = INT_FAST32_MIN;
5494int_fast64_t e4 = INT_FAST64_MAX;
5495int_fast64_t e4min = INT_FAST64_MIN;
5496uint_fast8_t f1 = UINT_FAST8_MAX;
5497uint_fast16_t f2 = UINT_FAST16_MAX;
5498uint_fast32_t f3 = UINT_FAST32_MAX;
5499uint_fast64_t f4 = UINT_FAST64_MAX;
5500#ifdef INTPTR_MAX
5501intptr_t g = INTPTR_MAX;
5502intptr_t gmin = INTPTR_MIN;
5503#endif
5504#ifdef UINTPTR_MAX
5505uintptr_t h = UINTPTR_MAX;
5506#endif
5507intmax_t i = INTMAX_MAX;
5508uintmax_t j = UINTMAX_MAX;
5509
5510#include <limits.h> /* for CHAR_BIT */
5511#define TYPE_MINIMUM(t) \
5512 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
5513#define TYPE_MAXIMUM(t) \
5514 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
5515struct s {
5516 int check_PTRDIFF:
5517 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
5518 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
5519 ? 1 : -1;
5520 /* Detect bug in FreeBSD 6.0 / ia64. */
5521 int check_SIG_ATOMIC:
5522 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
5523 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
5524 ? 1 : -1;
5525 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
5526 int check_WCHAR:
5527 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
5528 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
5529 ? 1 : -1;
5530 /* Detect bug in mingw. */
5531 int check_WINT:
5532 WINT_MIN == TYPE_MINIMUM (wint_t)
5533 && WINT_MAX == TYPE_MAXIMUM (wint_t)
5534 ? 1 : -1;
5535
5536 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
5537 int check_UINT8_C:
5538 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
5539 int check_UINT16_C:
5540 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
5541
5542 /* Detect bugs in OpenBSD 3.9 stdint.h. */
5543#ifdef UINT8_MAX
5544 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
5545#endif
5546#ifdef UINT16_MAX
5547 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
5548#endif
5549#ifdef UINT32_MAX
5550 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
5551#endif
5552#ifdef UINT64_MAX
5553 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
5554#endif
5555 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
5556 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
5557 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
5558 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
5559 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
5560 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
5561 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
5562 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
5563 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
5564 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
5565 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
5566};
5567
5568int
5569main ()
5570{
5571
5572 ;
5573 return 0;
5574}
5575_ACEOF
5576rm -f conftest.$ac_objext
5577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5578 (eval $ac_compile) 2>conftest.er1
5579 ac_status=$?
5580 grep -v '^ *+' conftest.er1 >conftest.err
5581 rm -f conftest.er1
5582 cat conftest.err >&5
5583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5584 (exit $ac_status); } &&
5585 { ac_try='test -z "$ac_c_werror_flag"
5586 || test ! -s conftest.err'
5587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5588 (eval $ac_try) 2>&5
5589 ac_status=$?
5590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5591 (exit $ac_status); }; } &&
5592 { ac_try='test -s conftest.$ac_objext'
5593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5594 (eval $ac_try) 2>&5
5595 ac_status=$?
5596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5597 (exit $ac_status); }; }; then
5598 gl_cv_header_working_stdint_h=yes
5599else
5600 echo "$as_me: failed program was:" >&5
5601sed 's/^/| /' conftest.$ac_ext >&5
5602
5603fi
5604rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5605fi
5606echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5
5607echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6
5608 fi
5609 if test "$gl_cv_header_working_stdint_h" = yes; then
5610 STDINT_H=
5611 else
5612
5613
5614for ac_header in sys/inttypes.h sys/bitypes.h
5615do
5616as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5617if eval "test \"\${$as_ac_Header+set}\" = set"; then
5618 echo "$as_me:$LINENO: checking for $ac_header" >&5
5619echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5620if eval "test \"\${$as_ac_Header+set}\" = set"; then
5621 echo $ECHO_N "(cached) $ECHO_C" >&6
5622fi
5623echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5624echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5625else
5626 # Is the header compilable?
5627echo "$as_me:$LINENO: checking $ac_header usability" >&5
5628echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5629cat >conftest.$ac_ext <<_ACEOF
5630/* confdefs.h. */
5631_ACEOF
5632cat confdefs.h >>conftest.$ac_ext
5633cat >>conftest.$ac_ext <<_ACEOF
5634/* end confdefs.h. */
5635$ac_includes_default
5636#include <$ac_header>
5637_ACEOF
5638rm -f conftest.$ac_objext
5639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5640 (eval $ac_compile) 2>conftest.er1
5641 ac_status=$?
5642 grep -v '^ *+' conftest.er1 >conftest.err
5643 rm -f conftest.er1
5644 cat conftest.err >&5
5645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5646 (exit $ac_status); } &&
5647 { ac_try='test -z "$ac_c_werror_flag"
5648 || test ! -s conftest.err'
5649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5650 (eval $ac_try) 2>&5
5651 ac_status=$?
5652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5653 (exit $ac_status); }; } &&
5654 { ac_try='test -s conftest.$ac_objext'
5655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5656 (eval $ac_try) 2>&5
5657 ac_status=$?
5658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5659 (exit $ac_status); }; }; then
5660 ac_header_compiler=yes
5661else
5662 echo "$as_me: failed program was:" >&5
5663sed 's/^/| /' conftest.$ac_ext >&5
5664
5665ac_header_compiler=no
5666fi
5667rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5668echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5669echo "${ECHO_T}$ac_header_compiler" >&6
5670
5671# Is the header present?
5672echo "$as_me:$LINENO: checking $ac_header presence" >&5
5673echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5674cat >conftest.$ac_ext <<_ACEOF
5675/* confdefs.h. */
5676_ACEOF
5677cat confdefs.h >>conftest.$ac_ext
5678cat >>conftest.$ac_ext <<_ACEOF
5679/* end confdefs.h. */
5680#include <$ac_header>
5681_ACEOF
5682if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5683 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5684 ac_status=$?
5685 grep -v '^ *+' conftest.er1 >conftest.err
5686 rm -f conftest.er1
5687 cat conftest.err >&5
5688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5689 (exit $ac_status); } >/dev/null; then
5690 if test -s conftest.err; then
5691 ac_cpp_err=$ac_c_preproc_warn_flag
5692 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5693 else
5694 ac_cpp_err=
5695 fi
5696else
5697 ac_cpp_err=yes
5698fi
5699if test -z "$ac_cpp_err"; then
5700 ac_header_preproc=yes
5701else
5702 echo "$as_me: failed program was:" >&5
5703sed 's/^/| /' conftest.$ac_ext >&5
5704
5705 ac_header_preproc=no
5706fi
5707rm -f conftest.err conftest.$ac_ext
5708echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5709echo "${ECHO_T}$ac_header_preproc" >&6
5710
5711# So? What about this header?
5712case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5713 yes:no: )
5714 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5715echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5716 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5717echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5718 ac_header_preproc=yes
5719 ;;
5720 no:yes:* )
5721 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5722echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5723 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5724echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5725 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5726echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5727 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5728echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5729 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5730echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5731 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5732echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5733 (
5734 cat <<\_ASBOX
5735## ------------------------------------------ ##
5736## Report this to the AC_PACKAGE_NAME lists. ##
5737## ------------------------------------------ ##
5738_ASBOX
5739 ) |
5740 sed "s/^/$as_me: WARNING: /" >&2
5741 ;;
5742esac
5743echo "$as_me:$LINENO: checking for $ac_header" >&5
5744echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5745if eval "test \"\${$as_ac_Header+set}\" = set"; then
5746 echo $ECHO_N "(cached) $ECHO_C" >&6
5747else
5748 eval "$as_ac_Header=\$ac_header_preproc"
5749fi
5750echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5751echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5752
5753fi
5754if test `eval echo '${'$as_ac_Header'}'` = yes; then
5755 cat >>confdefs.h <<_ACEOF
5756#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5757_ACEOF
5758
5759fi
5760
5761done
5762
5763 if test $ac_cv_header_sys_inttypes_h = yes; then
5764 HAVE_SYS_INTTYPES_H=1
5765 else
5766 HAVE_SYS_INTTYPES_H=0
5767 fi
5768
5769 if test $ac_cv_header_sys_bitypes_h = yes; then
5770 HAVE_SYS_BITYPES_H=1
5771 else
5772 HAVE_SYS_BITYPES_H=0
5773 fi
5774
5775
5776
5777 :
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
5793 echo "$as_me:$LINENO: checking for bit size of $gltype" >&5
5794echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6
5795if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\" = set"; then
5796 echo $ECHO_N "(cached) $ECHO_C" >&6
5797else
5798 if test "$cross_compiling" = yes; then
5799 # Depending upon the size, compute the lo and hi bounds.
5800cat >conftest.$ac_ext <<_ACEOF
5801/* confdefs.h. */
5802_ACEOF
5803cat confdefs.h >>conftest.$ac_ext
5804cat >>conftest.$ac_ext <<_ACEOF
5805/* end confdefs.h. */
5806
5807 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5808 included before <wchar.h>. */
5809 #include <stddef.h>
5810 #include <signal.h>
5811 #if HAVE_WCHAR_H
5812 # include <stdio.h>
5813 # include <time.h>
5814 # include <wchar.h>
5815 #endif
5816
5817#include <limits.h>
5818int
5819main ()
5820{
5821static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)];
5822test_array [0] = 0
5823
5824 ;
5825 return 0;
5826}
5827_ACEOF
5828rm -f conftest.$ac_objext
5829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5830 (eval $ac_compile) 2>conftest.er1
5831 ac_status=$?
5832 grep -v '^ *+' conftest.er1 >conftest.err
5833 rm -f conftest.er1
5834 cat conftest.err >&5
5835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5836 (exit $ac_status); } &&
5837 { ac_try='test -z "$ac_c_werror_flag"
5838 || test ! -s conftest.err'
5839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5840 (eval $ac_try) 2>&5
5841 ac_status=$?
5842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5843 (exit $ac_status); }; } &&
5844 { ac_try='test -s conftest.$ac_objext'
5845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5846 (eval $ac_try) 2>&5
5847 ac_status=$?
5848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5849 (exit $ac_status); }; }; then
5850 ac_lo=0 ac_mid=0
5851 while :; do
5852 cat >conftest.$ac_ext <<_ACEOF
5853/* confdefs.h. */
5854_ACEOF
5855cat confdefs.h >>conftest.$ac_ext
5856cat >>conftest.$ac_ext <<_ACEOF
5857/* end confdefs.h. */
5858
5859 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5860 included before <wchar.h>. */
5861 #include <stddef.h>
5862 #include <signal.h>
5863 #if HAVE_WCHAR_H
5864 # include <stdio.h>
5865 # include <time.h>
5866 # include <wchar.h>
5867 #endif
5868
5869#include <limits.h>
5870int
5871main ()
5872{
5873static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
5874test_array [0] = 0
5875
5876 ;
5877 return 0;
5878}
5879_ACEOF
5880rm -f conftest.$ac_objext
5881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5882 (eval $ac_compile) 2>conftest.er1
5883 ac_status=$?
5884 grep -v '^ *+' conftest.er1 >conftest.err
5885 rm -f conftest.er1
5886 cat conftest.err >&5
5887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5888 (exit $ac_status); } &&
5889 { ac_try='test -z "$ac_c_werror_flag"
5890 || test ! -s conftest.err'
5891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5892 (eval $ac_try) 2>&5
5893 ac_status=$?
5894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895 (exit $ac_status); }; } &&
5896 { ac_try='test -s conftest.$ac_objext'
5897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5898 (eval $ac_try) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); }; }; then
5902 ac_hi=$ac_mid; break
5903else
5904 echo "$as_me: failed program was:" >&5
5905sed 's/^/| /' conftest.$ac_ext >&5
5906
5907ac_lo=`expr $ac_mid + 1`
5908 if test $ac_lo -le $ac_mid; then
5909 ac_lo= ac_hi=
5910 break
5911 fi
5912 ac_mid=`expr 2 '*' $ac_mid + 1`
5913fi
5914rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5915 done
5916else
5917 echo "$as_me: failed program was:" >&5
5918sed 's/^/| /' conftest.$ac_ext >&5
5919
5920cat >conftest.$ac_ext <<_ACEOF
5921/* confdefs.h. */
5922_ACEOF
5923cat confdefs.h >>conftest.$ac_ext
5924cat >>conftest.$ac_ext <<_ACEOF
5925/* end confdefs.h. */
5926
5927 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5928 included before <wchar.h>. */
5929 #include <stddef.h>
5930 #include <signal.h>
5931 #if HAVE_WCHAR_H
5932 # include <stdio.h>
5933 # include <time.h>
5934 # include <wchar.h>
5935 #endif
5936
5937#include <limits.h>
5938int
5939main ()
5940{
5941static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)];
5942test_array [0] = 0
5943
5944 ;
5945 return 0;
5946}
5947_ACEOF
5948rm -f conftest.$ac_objext
5949if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5950 (eval $ac_compile) 2>conftest.er1
5951 ac_status=$?
5952 grep -v '^ *+' conftest.er1 >conftest.err
5953 rm -f conftest.er1
5954 cat conftest.err >&5
5955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5956 (exit $ac_status); } &&
5957 { ac_try='test -z "$ac_c_werror_flag"
5958 || test ! -s conftest.err'
5959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5960 (eval $ac_try) 2>&5
5961 ac_status=$?
5962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5963 (exit $ac_status); }; } &&
5964 { ac_try='test -s conftest.$ac_objext'
5965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5966 (eval $ac_try) 2>&5
5967 ac_status=$?
5968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5969 (exit $ac_status); }; }; then
5970 ac_hi=-1 ac_mid=-1
5971 while :; do
5972 cat >conftest.$ac_ext <<_ACEOF
5973/* confdefs.h. */
5974_ACEOF
5975cat confdefs.h >>conftest.$ac_ext
5976cat >>conftest.$ac_ext <<_ACEOF
5977/* end confdefs.h. */
5978
5979 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5980 included before <wchar.h>. */
5981 #include <stddef.h>
5982 #include <signal.h>
5983 #if HAVE_WCHAR_H
5984 # include <stdio.h>
5985 # include <time.h>
5986 # include <wchar.h>
5987 #endif
5988
5989#include <limits.h>
5990int
5991main ()
5992{
5993static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)];
5994test_array [0] = 0
5995
5996 ;
5997 return 0;
5998}
5999_ACEOF
6000rm -f conftest.$ac_objext
6001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6002 (eval $ac_compile) 2>conftest.er1
6003 ac_status=$?
6004 grep -v '^ *+' conftest.er1 >conftest.err
6005 rm -f conftest.er1
6006 cat conftest.err >&5
6007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6008 (exit $ac_status); } &&
6009 { ac_try='test -z "$ac_c_werror_flag"
6010 || test ! -s conftest.err'
6011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6012 (eval $ac_try) 2>&5
6013 ac_status=$?
6014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6015 (exit $ac_status); }; } &&
6016 { ac_try='test -s conftest.$ac_objext'
6017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6018 (eval $ac_try) 2>&5
6019 ac_status=$?
6020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6021 (exit $ac_status); }; }; then
6022 ac_lo=$ac_mid; break
6023else
6024 echo "$as_me: failed program was:" >&5
6025sed 's/^/| /' conftest.$ac_ext >&5
6026
6027ac_hi=`expr '(' $ac_mid ')' - 1`
6028 if test $ac_mid -le $ac_hi; then
6029 ac_lo= ac_hi=
6030 break
6031 fi
6032 ac_mid=`expr 2 '*' $ac_mid`
6033fi
6034rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6035 done
6036else
6037 echo "$as_me: failed program was:" >&5
6038sed 's/^/| /' conftest.$ac_ext >&5
6039
6040ac_lo= ac_hi=
6041fi
6042rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6043fi
6044rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6045# Binary search between lo and hi bounds.
6046while test "x$ac_lo" != "x$ac_hi"; do
6047 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6048 cat >conftest.$ac_ext <<_ACEOF
6049/* confdefs.h. */
6050_ACEOF
6051cat confdefs.h >>conftest.$ac_ext
6052cat >>conftest.$ac_ext <<_ACEOF
6053/* end confdefs.h. */
6054
6055 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6056 included before <wchar.h>. */
6057 #include <stddef.h>
6058 #include <signal.h>
6059 #if HAVE_WCHAR_H
6060 # include <stdio.h>
6061 # include <time.h>
6062 # include <wchar.h>
6063 #endif
6064
6065#include <limits.h>
6066int
6067main ()
6068{
6069static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
6070test_array [0] = 0
6071
6072 ;
6073 return 0;
6074}
6075_ACEOF
6076rm -f conftest.$ac_objext
6077if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6078 (eval $ac_compile) 2>conftest.er1
6079 ac_status=$?
6080 grep -v '^ *+' conftest.er1 >conftest.err
6081 rm -f conftest.er1
6082 cat conftest.err >&5
6083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6084 (exit $ac_status); } &&
6085 { ac_try='test -z "$ac_c_werror_flag"
6086 || test ! -s conftest.err'
6087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6088 (eval $ac_try) 2>&5
6089 ac_status=$?
6090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6091 (exit $ac_status); }; } &&
6092 { ac_try='test -s conftest.$ac_objext'
6093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6094 (eval $ac_try) 2>&5
6095 ac_status=$?
6096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6097 (exit $ac_status); }; }; then
6098 ac_hi=$ac_mid
6099else
6100 echo "$as_me: failed program was:" >&5
6101sed 's/^/| /' conftest.$ac_ext >&5
6102
6103ac_lo=`expr '(' $ac_mid ')' + 1`
6104fi
6105rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6106done
6107case $ac_lo in
6108?*) result=$ac_lo;;
6109'') result=unknown ;;
6110esac
6111else
6112 if test "$cross_compiling" = yes; then
d5af19ba
DJ
6113 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6114echo "$as_me: error: in \`$ac_pwd':" >&2;}
6115{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
783e057b
DJ
6116See \`config.log' for more details." >&5
6117echo "$as_me: error: cannot run test program while cross compiling
6118See \`config.log' for more details." >&2;}
d5af19ba 6119 { (exit 1); exit 1; }; }; }
783e057b
DJ
6120else
6121 cat >conftest.$ac_ext <<_ACEOF
6122/* confdefs.h. */
6123_ACEOF
6124cat confdefs.h >>conftest.$ac_ext
6125cat >>conftest.$ac_ext <<_ACEOF
6126/* end confdefs.h. */
6127
6128 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6129 included before <wchar.h>. */
6130 #include <stddef.h>
6131 #include <signal.h>
6132 #if HAVE_WCHAR_H
6133 # include <stdio.h>
6134 # include <time.h>
6135 # include <wchar.h>
6136 #endif
6137
6138#include <limits.h>
6139long longval () { return sizeof ($gltype) * CHAR_BIT; }
6140unsigned long ulongval () { return sizeof ($gltype) * CHAR_BIT; }
6141#include <stdio.h>
6142#include <stdlib.h>
6143int
6144main ()
6145{
6146
6147 FILE *f = fopen ("conftest.val", "w");
6148 if (! f)
6149 exit (1);
6150 if ((sizeof ($gltype) * CHAR_BIT) < 0)
6151 {
6152 long i = longval ();
6153 if (i != (sizeof ($gltype) * CHAR_BIT))
6154 exit (1);
6155 fprintf (f, "%ld\n", i);
6156 }
6157 else
6158 {
6159 unsigned long i = ulongval ();
6160 if (i != (sizeof ($gltype) * CHAR_BIT))
6161 exit (1);
6162 fprintf (f, "%lu\n", i);
6163 }
6164 exit (ferror (f) || fclose (f) != 0);
6165
6166 ;
6167 return 0;
6168}
6169_ACEOF
6170rm -f conftest$ac_exeext
6171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6172 (eval $ac_link) 2>&5
6173 ac_status=$?
6174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6175 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6177 (eval $ac_try) 2>&5
6178 ac_status=$?
6179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180 (exit $ac_status); }; }; then
6181 result=`cat conftest.val`
6182else
6183 echo "$as_me: program exited with status $ac_status" >&5
6184echo "$as_me: failed program was:" >&5
6185sed 's/^/| /' conftest.$ac_ext >&5
6186
6187( exit $ac_status )
6188result=unknown
6189fi
6190rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6191fi
6192fi
6193rm -f conftest.val
6194 eval gl_cv_bitsizeof_${gltype}=\$result
c906108c 6195
783e057b
DJ
6196fi
6197echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&5
6198echo "${ECHO_T}`eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&6
6199 eval result=\$gl_cv_bitsizeof_${gltype}
6200 if test $result = unknown; then
6201 result=0
6202 fi
6203 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6204 cat >>confdefs.h <<_ACEOF
6205#define BITSIZEOF_${GLTYPE} $result
6206_ACEOF
c906108c 6207
783e057b
DJ
6208 eval BITSIZEOF_${GLTYPE}=\$result
6209 done
c906108c 6210
c906108c 6211
c906108c 6212
bec39cab 6213
3841debe 6214
783e057b
DJ
6215
6216
6217 for gltype in sig_atomic_t wchar_t wint_t ; do
6218 echo "$as_me:$LINENO: checking whether $gltype is signed" >&5
6219echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6
6220if eval "test \"\${gl_cv_type_${gltype}_signed+set}\" = set"; then
6221 echo $ECHO_N "(cached) $ECHO_C" >&6
6222else
6223 cat >conftest.$ac_ext <<_ACEOF
6224/* confdefs.h. */
6225_ACEOF
6226cat confdefs.h >>conftest.$ac_ext
6227cat >>conftest.$ac_ext <<_ACEOF
6228/* end confdefs.h. */
6229
6230 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6231 included before <wchar.h>. */
6232 #include <stddef.h>
6233 #include <signal.h>
6234 #if HAVE_WCHAR_H
6235 # include <stdio.h>
6236 # include <time.h>
6237 # include <wchar.h>
6238 #endif
6239
6240 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6241int
6242main ()
6243{
6244
6245 ;
6246 return 0;
6247}
6248_ACEOF
6249rm -f conftest.$ac_objext
6250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6251 (eval $ac_compile) 2>conftest.er1
6252 ac_status=$?
6253 grep -v '^ *+' conftest.er1 >conftest.err
6254 rm -f conftest.er1
6255 cat conftest.err >&5
6256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6257 (exit $ac_status); } &&
6258 { ac_try='test -z "$ac_c_werror_flag"
6259 || test ! -s conftest.err'
6260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6261 (eval $ac_try) 2>&5
6262 ac_status=$?
6263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6264 (exit $ac_status); }; } &&
6265 { ac_try='test -s conftest.$ac_objext'
6266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6267 (eval $ac_try) 2>&5
6268 ac_status=$?
6269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6270 (exit $ac_status); }; }; then
6271 result=yes
6272else
6273 echo "$as_me: failed program was:" >&5
6274sed 's/^/| /' conftest.$ac_ext >&5
6275
6276result=no
20e95c23 6277fi
783e057b
DJ
6278rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6279 eval gl_cv_type_${gltype}_signed=\$result
6280
6281fi
6282echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&5
6283echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&6
6284 eval result=\$gl_cv_type_${gltype}_signed
6285 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6286 if test "$result" = yes; then
6287 cat >>confdefs.h <<_ACEOF
6288#define HAVE_SIGNED_${GLTYPE} 1
6289_ACEOF
6290
6291 eval HAVE_SIGNED_${GLTYPE}=1
6292 else
6293 eval HAVE_SIGNED_${GLTYPE}=0
6294 fi
6295 done
6296
6297
6298 gl_cv_type_ptrdiff_t_signed=yes
6299 gl_cv_type_size_t_signed=no
6300
6301
6302
6303
6304
6305
6306
6307 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
6308 echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5
6309echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6
6310if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\" = set"; then
6311 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 6312else
783e057b
DJ
6313 eval gl_cv_type_${gltype}_suffix=no
6314 eval result=\$gl_cv_type_${gltype}_signed
6315 if test "$result" = yes; then
6316 glsufu=
6317 else
6318 glsufu=u
6319 fi
6320 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6321 case $glsuf in
6322 '') gltype1='int';;
6323 l) gltype1='long int';;
6324 ll) gltype1='long long int';;
6325 i64) gltype1='__int64';;
6326 u) gltype1='unsigned int';;
6327 ul) gltype1='unsigned long int';;
6328 ull) gltype1='unsigned long long int';;
6329 ui64)gltype1='unsigned __int64';;
6330 esac
6331 cat >conftest.$ac_ext <<_ACEOF
6332/* confdefs.h. */
6333_ACEOF
6334cat confdefs.h >>conftest.$ac_ext
6335cat >>conftest.$ac_ext <<_ACEOF
6336/* end confdefs.h. */
6337
6338 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6339 included before <wchar.h>. */
6340 #include <stddef.h>
6341 #include <signal.h>
6342 #if HAVE_WCHAR_H
6343 # include <stdio.h>
6344 # include <time.h>
6345 # include <wchar.h>
6346 #endif
6347
6348 extern $gltype foo;
6349 extern $gltype1 foo;
6350int
6351main ()
6352{
6353
6354 ;
6355 return 0;
6356}
6357_ACEOF
6358rm -f conftest.$ac_objext
6359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6360 (eval $ac_compile) 2>conftest.er1
6361 ac_status=$?
6362 grep -v '^ *+' conftest.er1 >conftest.err
6363 rm -f conftest.er1
6364 cat conftest.err >&5
6365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6366 (exit $ac_status); } &&
6367 { ac_try='test -z "$ac_c_werror_flag"
6368 || test ! -s conftest.err'
6369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6370 (eval $ac_try) 2>&5
6371 ac_status=$?
6372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6373 (exit $ac_status); }; } &&
6374 { ac_try='test -s conftest.$ac_objext'
6375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6376 (eval $ac_try) 2>&5
6377 ac_status=$?
6378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6379 (exit $ac_status); }; }; then
6380 eval gl_cv_type_${gltype}_suffix=\$glsuf
6381else
6382 echo "$as_me: failed program was:" >&5
6383sed 's/^/| /' conftest.$ac_ext >&5
6384
6385fi
6386rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6387 eval result=\$gl_cv_type_${gltype}_suffix
6388 test "$result" != no && break
6389 done
6390fi
6391echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&5
6392echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&6
6393 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6394 eval result=\$gl_cv_type_${gltype}_suffix
6395 test "$result" = no && result=
6396 eval ${GLTYPE}_SUFFIX=\$result
6397 cat >>confdefs.h <<_ACEOF
6398#define ${GLTYPE}_SUFFIX $result
6399_ACEOF
6400
6401 done
6402
6403
6404
6405 STDINT_H=stdint.h
6406 fi
6407
6408
6409
6410
6411
6412
6413
6414 echo "$as_me:$LINENO: checking whether <wchar.h> is standalone" >&5
6415echo $ECHO_N "checking whether <wchar.h> is standalone... $ECHO_C" >&6
6416if test "${gl_cv_header_wchar_h_standalone+set}" = set; then
6417 echo $ECHO_N "(cached) $ECHO_C" >&6
6418else
6419 cat >conftest.$ac_ext <<_ACEOF
6420#include <wchar.h>
6421wchar_t w;
6422_ACEOF
6423rm -f conftest.$ac_objext
6424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6425 (eval $ac_compile) 2>conftest.er1
6426 ac_status=$?
6427 grep -v '^ *+' conftest.er1 >conftest.err
6428 rm -f conftest.er1
6429 cat conftest.err >&5
6430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6431 (exit $ac_status); } &&
6432 { ac_try='test -z "$ac_c_werror_flag"
6433 || test ! -s conftest.err'
6434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6435 (eval $ac_try) 2>&5
6436 ac_status=$?
6437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6438 (exit $ac_status); }; } &&
6439 { ac_try='test -s conftest.$ac_objext'
6440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6441 (eval $ac_try) 2>&5
6442 ac_status=$?
6443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6444 (exit $ac_status); }; }; then
6445 gl_cv_header_wchar_h_standalone=yes
6446else
6447 echo "$as_me: failed program was:" >&5
6448sed 's/^/| /' conftest.$ac_ext >&5
6449
6450gl_cv_header_wchar_h_standalone=no
6451fi
6452rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6453fi
6454echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5
6455echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6
6456 if test $gl_cv_header_wchar_h_standalone != yes; then
6457 WCHAR_H=wchar.h
6458 fi
6459
6460
6461 :
6462
6463
6464
6465
6466
6467 if test $ac_cv_header_wchar_h = yes; then
6468 HAVE_WCHAR_H=1
6469 else
6470 HAVE_WCHAR_H=0
6471 fi
6472
6473
6474
6475
6476 :
6477
6478
6479
6480
6481
6482
6483
6484 if test $gl_cv_have_include_next = yes; then
6485 gl_cv_next_wchar_h='<'wchar.h'>'
6486 else
6487 echo "$as_me:$LINENO: checking absolute name of <wchar.h>" >&5
6488echo $ECHO_N "checking absolute name of <wchar.h>... $ECHO_C" >&6
6489if test "${gl_cv_next_wchar_h+set}" = set; then
6490 echo $ECHO_N "(cached) $ECHO_C" >&6
6491else
6492
6493 if test $ac_cv_header_wchar_h = yes; then
6494 cat >conftest.$ac_ext <<_ACEOF
6495/* confdefs.h. */
6496_ACEOF
6497cat confdefs.h >>conftest.$ac_ext
6498cat >>conftest.$ac_ext <<_ACEOF
6499/* end confdefs.h. */
6500#include <wchar.h>
6501
6502_ACEOF
6503 gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6504 sed -n '\#/wchar.h#{
6505 s#.*"\(.*/wchar.h\)".*#\1#
6506 s#^/[^/]#//&#
6507 p
6508 q
6509 }'`'"'
6510 else
6511 gl_cv_next_wchar_h='<'wchar.h'>'
6512 fi
6513
6514fi
6515echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5
6516echo "${ECHO_T}$gl_cv_next_wchar_h" >&6
6517 fi
6518 NEXT_WCHAR_H=$gl_cv_next_wchar_h
6519
c906108c 6520
c906108c 6521
c906108c 6522
c906108c 6523
c906108c 6524
c906108c 6525
c906108c 6526
783e057b
DJ
6527 gltests_libdeps=
6528 gltests_ltlibdeps=
20e95c23 6529
20e95c23 6530
20e95c23 6531
783e057b 6532 gl_source_base='tests'
c906108c 6533
bec39cab 6534
bec39cab 6535
783e057b
DJ
6536
6537 LIBGNU_LIBDEPS="$gl_libdeps"
6538
6539 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
6540
6541
e28b3332 6542
d5af19ba
DJ
6543# For Makefile dependencies.
6544GNULIB_STDINT_H=
6545if test x"$STDINT_H" != x; then
6546 GNULIB_STDINT_H=gnulib/$STDINT_H
6547fi
6548
6549
bec39cab
AC
6550PACKAGE=gdb
6551
6552cat >>confdefs.h <<_ACEOF
6553#define PACKAGE "$PACKAGE"
6554_ACEOF
6555
6556
6557
e28b3332
DJ
6558# GDB does not use automake, but gnulib does. This line lets us
6559# generate its Makefile.in.
6560am__api_version="1.9"
6561# Find a good install program. We prefer a C program (faster),
6562# so one script is as good as another. But avoid the broken or
6563# incompatible versions:
6564# SysV /etc/install, /usr/sbin/install
6565# SunOS /usr/etc/install
6566# IRIX /sbin/install
6567# AIX /bin/install
6568# AmigaOS /C/install, which installs bootblocks on floppy discs
6569# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6570# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6571# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6572# OS/2's system install, which has a completely different semantic
6573# ./install, which can be erroneously created by make from ./install.sh.
85541719 6574# Reject install programs that cannot install multiple files.
e28b3332
DJ
6575echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
6576echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
6577if test -z "$INSTALL"; then
6578if test "${ac_cv_path_install+set}" = set; then
6579 echo $ECHO_N "(cached) $ECHO_C" >&6
6580else
6581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6582for as_dir in $PATH
6583do
6584 IFS=$as_save_IFS
6585 test -z "$as_dir" && as_dir=.
6586 # Account for people who put trailing slashes in PATH elements.
6587case $as_dir/ in
6588 ./ | .// | /cC/* | \
6589 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6590 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
6591 /usr/ucb/* ) ;;
6592 *)
6593 # OSF1 and SCO ODT 3.0 have their own names for install.
6594 # Don't use installbsd from OSF since it installs stuff as root
6595 # by default.
6596 for ac_prog in ginstall scoinst install; do
6597 for ac_exec_ext in '' $ac_executable_extensions; do
6598 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6599 if test $ac_prog = install &&
6600 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6601 # AIX install. It has an incompatible calling convention.
6602 :
6603 elif test $ac_prog = install &&
6604 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6605 # program-specific install script used by HP pwplus--don't use.
6606 :
6607 else
85541719
DE
6608 rm -rf conftest.one conftest.two conftest.dir
6609 echo one > conftest.one
6610 echo two > conftest.two
6611 mkdir conftest.dir
6612 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6613 test -s conftest.one && test -s conftest.two &&
6614 test -s conftest.dir/conftest.one &&
6615 test -s conftest.dir/conftest.two
6616 then
6617 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6618 break 3
6619 fi
e28b3332
DJ
6620 fi
6621 fi
6622 done
6623 done
6624 ;;
6625esac
6626done
6627
85541719 6628rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
6629
6630fi
6631 if test "${ac_cv_path_install+set}" = set; then
6632 INSTALL=$ac_cv_path_install
6633 else
85541719
DE
6634 # As a last resort, use the slow shell script. Don't cache a
6635 # value for INSTALL within a source directory, because that will
e28b3332 6636 # break other packages using the cache if that directory is
85541719 6637 # removed, or if the value is a relative name.
e28b3332
DJ
6638 INSTALL=$ac_install_sh
6639 fi
6640fi
6641echo "$as_me:$LINENO: result: $INSTALL" >&5
6642echo "${ECHO_T}$INSTALL" >&6
6643
6644# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6645# It thinks the first close brace ends the variable substitution.
6646test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6647
6648test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6649
6650test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6651
6652echo "$as_me:$LINENO: checking whether build environment is sane" >&5
6653echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
6654# Just in case
6655sleep 1
6656echo timestamp > conftest.file
6657# Do `set' in a subshell so we don't clobber the current shell's
6658# arguments. Must try -L first in case configure is actually a
6659# symlink; some systems play weird games with the mod time of symlinks
6660# (eg FreeBSD returns the mod time of the symlink's containing
6661# directory).
6662if (
6663 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6664 if test "$*" = "X"; then
6665 # -L didn't work.
6666 set X `ls -t $srcdir/configure conftest.file`
6667 fi
6668 rm -f conftest.file
6669 if test "$*" != "X $srcdir/configure conftest.file" \
6670 && test "$*" != "X conftest.file $srcdir/configure"; then
6671
6672 # If neither matched, then we have a broken ls. This can happen
6673 # if, for instance, CONFIG_SHELL is bash and it inherits a
6674 # broken ls alias from the environment. This has actually
6675 # happened. Such a system could not be considered "sane".
6676 { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
6677alias in your environment" >&5
6678echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
6679alias in your environment" >&2;}
6680 { (exit 1); exit 1; }; }
6681 fi
6682
6683 test "$2" = conftest.file
6684 )
6685then
6686 # Ok.
6687 :
6688else
6689 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
6690Check your system clock" >&5
6691echo "$as_me: error: newly created file is older than distributed files!
6692Check your system clock" >&2;}
6693 { (exit 1); exit 1; }; }
6694fi
6695echo "$as_me:$LINENO: result: yes" >&5
6696echo "${ECHO_T}yes" >&6
6697test "$program_prefix" != NONE &&
6698 program_transform_name="s,^,$program_prefix,;$program_transform_name"
6699# Use a double $ so make ignores it.
6700test "$program_suffix" != NONE &&
6701 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
6702# Double any \ or $. echo might interpret backslashes.
6703# By default was `s,x,x', remove it if useless.
6704cat <<\_ACEOF >conftest.sed
6705s/[\\$]/&&/g;s/;s,x,x,$//
6706_ACEOF
6707program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
6708rm conftest.sed
6709
6710# expand $ac_aux_dir to an absolute path
6711am_aux_dir=`cd $ac_aux_dir && pwd`
6712
6713test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6714# Use eval to expand $SHELL
6715if eval "$MISSING --run true"; then
6716 am_missing_run="$MISSING --run "
6717else
6718 am_missing_run=
6719 { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
6720echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
6721fi
6722
6723if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6724 # We used to keeping the `.' as first argument, in order to
6725 # allow $(mkdir_p) to be used without argument. As in
6726 # $(mkdir_p) $(somedir)
6727 # where $(somedir) is conditionally defined. However this is wrong
6728 # for two reasons:
6729 # 1. if the package is installed by a user who cannot write `.'
6730 # make install will fail,
6731 # 2. the above comment should most certainly read
6732 # $(mkdir_p) $(DESTDIR)$(somedir)
6733 # so it does not work when $(somedir) is undefined and
6734 # $(DESTDIR) is not.
6735 # To support the latter case, we have to write
6736 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6737 # so the `.' trick is pointless.
6738 mkdir_p='mkdir -p --'
6739else
6740 # On NextStep and OpenStep, the `mkdir' command does not
6741 # recognize any option. It will interpret all options as
6742 # directories to create, and then abort because `.' already
6743 # exists.
6744 for d in ./-p ./--version;
6745 do
6746 test -d $d && rmdir $d
6747 done
6748 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6749 if test -f "$ac_aux_dir/mkinstalldirs"; then
6750 mkdir_p='$(mkinstalldirs)'
6751 else
6752 mkdir_p='$(install_sh) -d'
6753 fi
6754fi
6755
6756for ac_prog in gawk mawk nawk awk
6757do
6758 # Extract the first word of "$ac_prog", so it can be a program name with args.
6759set dummy $ac_prog; ac_word=$2
6760echo "$as_me:$LINENO: checking for $ac_word" >&5
6761echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6762if test "${ac_cv_prog_AWK+set}" = set; then
6763 echo $ECHO_N "(cached) $ECHO_C" >&6
6764else
6765 if test -n "$AWK"; then
6766 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6767else
6768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6769for as_dir in $PATH
6770do
6771 IFS=$as_save_IFS
6772 test -z "$as_dir" && as_dir=.
6773 for ac_exec_ext in '' $ac_executable_extensions; do
6774 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6775 ac_cv_prog_AWK="$ac_prog"
6776 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6777 break 2
6778 fi
6779done
6780done
6781
6782fi
6783fi
6784AWK=$ac_cv_prog_AWK
6785if test -n "$AWK"; then
6786 echo "$as_me:$LINENO: result: $AWK" >&5
6787echo "${ECHO_T}$AWK" >&6
6788else
6789 echo "$as_me:$LINENO: result: no" >&5
6790echo "${ECHO_T}no" >&6
6791fi
6792
6793 test -n "$AWK" && break
6794done
6795
e28b3332
DJ
6796 ac_config_commands="$ac_config_commands depfiles"
6797
6798
6799am_make=${MAKE-make}
6800cat > confinc << 'END'
6801am__doit:
6802 @echo done
6803.PHONY: am__doit
6804END
6805# If we don't find an include directive, just comment out the code.
6806echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
6807echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
6808am__include="#"
6809am__quote=
6810_am_result=none
6811# First try GNU make style include.
6812echo "include confinc" > confmf
6813# We grep out `Entering directory' and `Leaving directory'
6814# messages which can occur if `w' ends up in MAKEFLAGS.
6815# In particular we don't look at `^make:' because GNU make might
6816# be invoked under some other name (usually "gmake"), in which
6817# case it prints its new name instead of `make'.
6818if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6819 am__include=include
6820 am__quote=
6821 _am_result=GNU
6822fi
6823# Now try BSD make style include.
6824if test "$am__include" = "#"; then
6825 echo '.include "confinc"' > confmf
6826 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6827 am__include=.include
6828 am__quote="\""
6829 _am_result=BSD
6830 fi
6831fi
6832
6833
6834echo "$as_me:$LINENO: result: $_am_result" >&5
6835echo "${ECHO_T}$_am_result" >&6
6836rm -f confinc confmf
6837
6838# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
6839if test "${enable_dependency_tracking+set}" = set; then
6840 enableval="$enable_dependency_tracking"
6841
6842fi;
6843if test "x$enable_dependency_tracking" != xno; then
6844 am_depcomp="$ac_aux_dir/depcomp"
6845 AMDEPBACKSLASH='\'
6846fi
6847
6848
6849if test "x$enable_dependency_tracking" != xno; then
6850 AMDEP_TRUE=
6851 AMDEP_FALSE='#'
6852else
6853 AMDEP_TRUE='#'
6854 AMDEP_FALSE=
6855fi
6856
6857
6858
6859# test to see if srcdir already configured
6860if test "`cd $srcdir && pwd`" != "`pwd`" &&
6861 test -f $srcdir/config.status; then
6862 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
6863echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
6864 { (exit 1); exit 1; }; }
6865fi
6866
6867# test whether we have cygpath
6868if test -z "$CYGPATH_W"; then
6869 if (cygpath --version) >/dev/null 2>/dev/null; then
6870 CYGPATH_W='cygpath -w'
6871 else
6872 CYGPATH_W=echo
6873 fi
6874fi
6875
6876
6877# Define the identity of the package.
6878 PACKAGE=gdb
6879 VERSION=UNUSED-VERSION
6880
6881
6882# Some tools Automake needs.
6883
6884ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6885
6886
6887AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6888
6889
6890AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6891
6892
6893AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6894
6895
6896MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6897
6898install_sh=${install_sh-"$am_aux_dir/install-sh"}
6899
6900# Installed binaries are usually stripped using `strip' when the user
6901# run `make install-strip'. However `strip' might not be the right
6902# tool to use in cross-compilation environments, therefore Automake
6903# will honor the `STRIP' environment variable to overrule this program.
6904if test "$cross_compiling" != no; then
6905 if test -n "$ac_tool_prefix"; then
6906 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6907set dummy ${ac_tool_prefix}strip; ac_word=$2
6908echo "$as_me:$LINENO: checking for $ac_word" >&5
6909echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6910if test "${ac_cv_prog_STRIP+set}" = set; then
6911 echo $ECHO_N "(cached) $ECHO_C" >&6
6912else
6913 if test -n "$STRIP"; then
6914 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6915else
6916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6917for as_dir in $PATH
6918do
6919 IFS=$as_save_IFS
6920 test -z "$as_dir" && as_dir=.
6921 for ac_exec_ext in '' $ac_executable_extensions; do
6922 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6923 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6924 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6925 break 2
6926 fi
6927done
6928done
6929
6930fi
6931fi
6932STRIP=$ac_cv_prog_STRIP
6933if test -n "$STRIP"; then
6934 echo "$as_me:$LINENO: result: $STRIP" >&5
6935echo "${ECHO_T}$STRIP" >&6
6936else
6937 echo "$as_me:$LINENO: result: no" >&5
6938echo "${ECHO_T}no" >&6
6939fi
6940
6941fi
6942if test -z "$ac_cv_prog_STRIP"; then
6943 ac_ct_STRIP=$STRIP
6944 # Extract the first word of "strip", so it can be a program name with args.
6945set dummy strip; ac_word=$2
6946echo "$as_me:$LINENO: checking for $ac_word" >&5
6947echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6948if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6949 echo $ECHO_N "(cached) $ECHO_C" >&6
6950else
6951 if test -n "$ac_ct_STRIP"; then
6952 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6953else
6954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6955for as_dir in $PATH
6956do
6957 IFS=$as_save_IFS
6958 test -z "$as_dir" && as_dir=.
6959 for ac_exec_ext in '' $ac_executable_extensions; do
6960 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6961 ac_cv_prog_ac_ct_STRIP="strip"
6962 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6963 break 2
6964 fi
6965done
6966done
6967
6968 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
6969fi
6970fi
6971ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6972if test -n "$ac_ct_STRIP"; then
6973 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6974echo "${ECHO_T}$ac_ct_STRIP" >&6
6975else
6976 echo "$as_me:$LINENO: result: no" >&5
6977echo "${ECHO_T}no" >&6
6978fi
6979
6980 STRIP=$ac_ct_STRIP
6981else
6982 STRIP="$ac_cv_prog_STRIP"
6983fi
6984
6985fi
6986INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
6987
6988# We need awk for the "check" target. The system "awk" is bad on
6989# some platforms.
6990# Always define AMTAR for backward compatibility.
6991
6992AMTAR=${AMTAR-"${am_missing_run}tar"}
6993
6994am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
6995
6996
6997
6998
6999depcc="$CC" am_compiler_list=
7000
7001echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
7002echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
7003if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
7004 echo $ECHO_N "(cached) $ECHO_C" >&6
7005else
7006 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7007 # We make a subdir and do the tests there. Otherwise we can end up
7008 # making bogus files that we don't know about and never remove. For
7009 # instance it was reported that on HP-UX the gcc test will end up
7010 # making a dummy file named `D' -- because `-MD' means `put the output
7011 # in D'.
7012 mkdir conftest.dir
7013 # Copy depcomp to subdir because otherwise we won't find it if we're
7014 # using a relative directory.
7015 cp "$am_depcomp" conftest.dir
7016 cd conftest.dir
7017 # We will build objects and dependencies in a subdirectory because
7018 # it helps to detect inapplicable dependency modes. For instance
7019 # both Tru64's cc and ICC support -MD to output dependencies as a
7020 # side effect of compilation, but ICC will put the dependencies in
7021 # the current directory while Tru64 will put them in the object
7022 # directory.
7023 mkdir sub
7024
7025 am_cv_CC_dependencies_compiler_type=none
7026 if test "$am_compiler_list" = ""; then
7027 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7028 fi
7029 for depmode in $am_compiler_list; do
7030 # Setup a source with many dependencies, because some compilers
7031 # like to wrap large dependency lists on column 80 (with \), and
7032 # we should not choose a depcomp mode which is confused by this.
7033 #
7034 # We need to recreate these files for each test, as the compiler may
7035 # overwrite some of them when testing with obscure command lines.
7036 # This happens at least with the AIX C compiler.
7037 : > sub/conftest.c
7038 for i in 1 2 3 4 5 6; do
7039 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7040 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7041 # Solaris 8's {/usr,}/bin/sh.
7042 touch sub/conftst$i.h
7043 done
7044 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7045
7046 case $depmode in
7047 nosideeffect)
7048 # after this tag, mechanisms are not by side-effect, so they'll
7049 # only be used when explicitly requested
7050 if test "x$enable_dependency_tracking" = xyes; then
7051 continue
7052 else
7053 break
7054 fi
7055 ;;
7056 none) break ;;
7057 esac
7058 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7059 # mode. It turns out that the SunPro C++ compiler does not properly
7060 # handle `-M -o', and we need to detect this.
7061 if depmode=$depmode \
7062 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7063 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7064 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7065 >/dev/null 2>conftest.err &&
7066 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7067 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7068 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7069 # icc doesn't choke on unknown options, it will just issue warnings
7070 # or remarks (even with -Werror). So we grep stderr for any message
7071 # that says an option was ignored or not supported.
7072 # When given -MP, icc 7.0 and 7.1 complain thusly:
7073 # icc: Command line warning: ignoring option '-M'; no argument required
7074 # The diagnosis changed in icc 8.0:
7075 # icc: Command line remark: option '-MP' not supported
7076 if (grep 'ignoring option' conftest.err ||
7077 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7078 am_cv_CC_dependencies_compiler_type=$depmode
7079 break
7080 fi
7081 fi
7082 done
7083
7084 cd ..
7085 rm -rf conftest.dir
7086else
7087 am_cv_CC_dependencies_compiler_type=none
7088fi
7089
7090fi
7091echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
7092echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
7093CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7094
7095
7096
7097if
7098 test "x$enable_dependency_tracking" != xno \
7099 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7100 am__fastdepCC_TRUE=
7101 am__fastdepCC_FALSE='#'
7102else
7103 am__fastdepCC_TRUE='#'
7104 am__fastdepCC_FALSE=
7105fi
7106
7107
7108
7109
bec39cab
AC
7110
7111
b4e70030 7112# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
bec39cab 7113if test "${with_separate_debug_dir+set}" = set; then
783e057b 7114 withval="$with_separate_debug_dir"
20e95c23 7115
b14b1491
TT
7116 DEBUGDIR=$withval
7117else
7118 DEBUGDIR=${libdir}/debug
7119fi;
20e95c23 7120
783e057b
DJ
7121 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7122 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 7123 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 7124 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7125
783e057b
DJ
7126cat >>confdefs.h <<_ACEOF
7127#define DEBUGDIR "$ac_define_dir"
20e95c23 7128_ACEOF
20e95c23 7129
20e95c23 7130
20e95c23 7131
b14b1491
TT
7132 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7133 if test "x$prefix" = xNONE; then
7134 test_prefix=/usr/local
7135 else
7136 test_prefix=$prefix
7137 fi
783e057b 7138 else
b14b1491 7139 test_prefix=$exec_prefix
783e057b 7140 fi
b14b1491
TT
7141 value=0
7142 case ${ac_define_dir} in
7143 "${test_prefix}"|"${test_prefix}/"*|\
7144 '${exec_prefix}'|'${exec_prefix}/'*)
7145 value=1
7146 ;;
7147 esac
7148
7149cat >>confdefs.h <<_ACEOF
7150#define DEBUGDIR_RELOCATABLE $value
7151_ACEOF
7152
7153
7154
7155# GDB's datadir relocation
7156
7157
7158
7159# Check whether --with-gdb-datadir or --without-gdb-datadir was given.
7160if test "${with_gdb_datadir+set}" = set; then
7161 withval="$with_gdb_datadir"
7162
7163 GDB_DATADIR=$withval
20e95c23 7164else
b14b1491
TT
7165 GDB_DATADIR=${datadir}/gdb
7166fi;
20e95c23 7167
b14b1491
TT
7168 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7169 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7170 ac_define_dir=`eval echo $GDB_DATADIR`
7171 ac_define_dir=`eval echo $ac_define_dir`
7172
7173cat >>confdefs.h <<_ACEOF
7174#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
7175_ACEOF
7176
b14b1491
TT
7177
7178
7179 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7180 if test "x$prefix" = xNONE; then
7181 test_prefix=/usr/local
7182 else
7183 test_prefix=$prefix
7184 fi
7185 else
7186 test_prefix=$exec_prefix
7187 fi
7188 value=0
7189 case ${ac_define_dir} in
7190 "${test_prefix}"|"${test_prefix}/"*|\
7191 '${exec_prefix}'|'${exec_prefix}/'*)
7192 value=1
7193 ;;
7194 esac
7195
7196cat >>confdefs.h <<_ACEOF
7197#define GDB_DATADIR_RELOCATABLE $value
7198_ACEOF
7199
7200
783e057b 7201
20e95c23 7202
29b0e8a2
JM
7203# Check whether --with-relocated-sources or --without-relocated-sources was given.
7204if test "${with_relocated_sources+set}" = set; then
7205 withval="$with_relocated_sources"
7206 reloc_srcdir="${withval}"
7207
7208 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7209 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7210 ac_define_dir=`eval echo $reloc_srcdir`
7211 ac_define_dir=`eval echo $ac_define_dir`
7212
7213cat >>confdefs.h <<_ACEOF
7214#define RELOC_SRCDIR "$ac_define_dir"
7215_ACEOF
7216
7217
7218
7219fi;
7220
7221
20e95c23 7222
783e057b 7223subdirs="$subdirs doc testsuite"
20e95c23
DJ
7224
7225
783e057b
DJ
7226# Check whether to support alternative target configurations
7227# Check whether --enable-targets or --disable-targets was given.
7228if test "${enable_targets+set}" = set; then
7229 enableval="$enable_targets"
7230 case "${enableval}" in
7231 yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
7232echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
7233 { (exit 1); exit 1; }; }
7234 ;;
7235 no) enable_targets= ;;
7236 *) enable_targets=$enableval ;;
7237esac
7238fi;
20e95c23 7239
783e057b
DJ
7240# Check whether to enable 64-bit support on 32-bit hosts
7241# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
7242if test "${enable_64_bit_bfd+set}" = set; then
7243 enableval="$enable_64_bit_bfd"
7244 case "${enableval}" in
7245 yes) want64=true ;;
7246 no) want64=false ;;
7247 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
7248echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
7249 { (exit 1); exit 1; }; } ;;
7250esac
7251else
7252 want64=false
7253fi;
7254# Provide defaults for some variables set by the per-host and per-target
7255# configuration.
7256gdb_host_obs=posix-hdep.o
20e95c23 7257
783e057b
DJ
7258if test "${target}" = "${host}"; then
7259 gdb_native=yes
7260else
7261 gdb_native=no
7262fi
20e95c23 7263
783e057b 7264. $srcdir/configure.host
20e95c23 7265
783e057b 7266# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 7267
783e057b
DJ
7268TARGET_OBS=
7269all_targets=
20e95c23 7270
783e057b 7271for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 7272do
783e057b
DJ
7273 if test "$targ_alias" = "all"; then
7274 all_targets=true
7275 else
7276 # Canonicalize the secondary target names.
7277 result=`$ac_config_sub $targ_alias 2>/dev/null`
7278 if test -n "$result"; then
7279 targ=$result
7280 else
7281 targ=$targ_alias
7282 fi
20e95c23 7283
783e057b 7284 . ${srcdir}/configure.tgt
20e95c23 7285
783e057b
DJ
7286 # Target-specific object files
7287 for i in ${gdb_target_obs}; do
7288 case " $TARGET_OBS " in
7289 *" ${i} "*) ;;
7290 *)
7291 TARGET_OBS="$TARGET_OBS ${i}"
7292 ;;
7293 esac
7294 done
20e95c23 7295
783e057b
DJ
7296 # Check whether this target needs 64-bit CORE_ADDR
7297 if test x${want64} = xfalse; then
7298 . ${srcdir}/../bfd/config.bfd
7299 fi
7300 fi
20e95c23
DJ
7301done
7302
783e057b
DJ
7303if test x${all_targets} = xtrue; then
7304
7305 # We want all 64-bit targets if we either:
7306 # - run on a 64-bit host or
7307 # - already require 64-bit support for some other target or
7308 # - the --enable-64-bit-bfd option was supplied
7309 # Otherwise we only support all 32-bit targets.
7310 #
7311 # NOTE: This test must be in sync with the corresponding
7312 # tests in BFD!
20e95c23 7313
783e057b
DJ
7314 if test x${want64} = xfalse; then
7315 echo "$as_me:$LINENO: checking for long" >&5
c0993dbe
UW
7316echo $ECHO_N "checking for long... $ECHO_C" >&6
7317if test "${ac_cv_type_long+set}" = set; then
7318 echo $ECHO_N "(cached) $ECHO_C" >&6
7319else
7320 cat >conftest.$ac_ext <<_ACEOF
7321/* confdefs.h. */
7322_ACEOF
7323cat confdefs.h >>conftest.$ac_ext
7324cat >>conftest.$ac_ext <<_ACEOF
7325/* end confdefs.h. */
7326$ac_includes_default
7327int
7328main ()
7329{
7330if ((long *) 0)
7331 return 0;
7332if (sizeof (long))
7333 return 0;
7334 ;
7335 return 0;
7336}
7337_ACEOF
7338rm -f conftest.$ac_objext
7339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7340 (eval $ac_compile) 2>conftest.er1
7341 ac_status=$?
7342 grep -v '^ *+' conftest.er1 >conftest.err
7343 rm -f conftest.er1
7344 cat conftest.err >&5
7345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7346 (exit $ac_status); } &&
7347 { ac_try='test -z "$ac_c_werror_flag"
7348 || test ! -s conftest.err'
7349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7350 (eval $ac_try) 2>&5
7351 ac_status=$?
7352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7353 (exit $ac_status); }; } &&
7354 { ac_try='test -s conftest.$ac_objext'
7355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7356 (eval $ac_try) 2>&5
7357 ac_status=$?
7358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7359 (exit $ac_status); }; }; then
7360 ac_cv_type_long=yes
7361else
7362 echo "$as_me: failed program was:" >&5
7363sed 's/^/| /' conftest.$ac_ext >&5
7364
7365ac_cv_type_long=no
7366fi
7367rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7368fi
7369echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7370echo "${ECHO_T}$ac_cv_type_long" >&6
7371
7372echo "$as_me:$LINENO: checking size of long" >&5
7373echo $ECHO_N "checking size of long... $ECHO_C" >&6
7374if test "${ac_cv_sizeof_long+set}" = set; then
7375 echo $ECHO_N "(cached) $ECHO_C" >&6
7376else
7377 if test "$ac_cv_type_long" = yes; then
7378 # The cast to unsigned long works around a bug in the HP C Compiler
7379 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7380 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7381 # This bug is HP SR number 8606223364.
7382 if test "$cross_compiling" = yes; then
7383 # Depending upon the size, compute the lo and hi bounds.
7384cat >conftest.$ac_ext <<_ACEOF
7385/* confdefs.h. */
7386_ACEOF
7387cat confdefs.h >>conftest.$ac_ext
7388cat >>conftest.$ac_ext <<_ACEOF
7389/* end confdefs.h. */
7390$ac_includes_default
7391int
7392main ()
7393{
7394static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
7395test_array [0] = 0
7396
7397 ;
7398 return 0;
7399}
7400_ACEOF
7401rm -f conftest.$ac_objext
7402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7403 (eval $ac_compile) 2>conftest.er1
7404 ac_status=$?
7405 grep -v '^ *+' conftest.er1 >conftest.err
7406 rm -f conftest.er1
7407 cat conftest.err >&5
7408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7409 (exit $ac_status); } &&
7410 { ac_try='test -z "$ac_c_werror_flag"
7411 || test ! -s conftest.err'
7412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7413 (eval $ac_try) 2>&5
7414 ac_status=$?
7415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7416 (exit $ac_status); }; } &&
7417 { ac_try='test -s conftest.$ac_objext'
7418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7419 (eval $ac_try) 2>&5
7420 ac_status=$?
7421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7422 (exit $ac_status); }; }; then
7423 ac_lo=0 ac_mid=0
7424 while :; do
7425 cat >conftest.$ac_ext <<_ACEOF
7426/* confdefs.h. */
7427_ACEOF
7428cat confdefs.h >>conftest.$ac_ext
7429cat >>conftest.$ac_ext <<_ACEOF
7430/* end confdefs.h. */
7431$ac_includes_default
7432int
7433main ()
7434{
7435static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7436test_array [0] = 0
7437
7438 ;
7439 return 0;
7440}
7441_ACEOF
7442rm -f conftest.$ac_objext
7443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7444 (eval $ac_compile) 2>conftest.er1
7445 ac_status=$?
7446 grep -v '^ *+' conftest.er1 >conftest.err
7447 rm -f conftest.er1
7448 cat conftest.err >&5
7449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7450 (exit $ac_status); } &&
7451 { ac_try='test -z "$ac_c_werror_flag"
7452 || test ! -s conftest.err'
7453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7454 (eval $ac_try) 2>&5
7455 ac_status=$?
7456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7457 (exit $ac_status); }; } &&
7458 { ac_try='test -s conftest.$ac_objext'
7459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7460 (eval $ac_try) 2>&5
7461 ac_status=$?
7462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7463 (exit $ac_status); }; }; then
7464 ac_hi=$ac_mid; break
7465else
7466 echo "$as_me: failed program was:" >&5
7467sed 's/^/| /' conftest.$ac_ext >&5
7468
7469ac_lo=`expr $ac_mid + 1`
7470 if test $ac_lo -le $ac_mid; then
7471 ac_lo= ac_hi=
7472 break
7473 fi
7474 ac_mid=`expr 2 '*' $ac_mid + 1`
7475fi
7476rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7477 done
7478else
7479 echo "$as_me: failed program was:" >&5
7480sed 's/^/| /' conftest.$ac_ext >&5
7481
7482cat >conftest.$ac_ext <<_ACEOF
7483/* confdefs.h. */
7484_ACEOF
7485cat confdefs.h >>conftest.$ac_ext
7486cat >>conftest.$ac_ext <<_ACEOF
7487/* end confdefs.h. */
7488$ac_includes_default
7489int
7490main ()
7491{
7492static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
7493test_array [0] = 0
7494
7495 ;
7496 return 0;
7497}
7498_ACEOF
7499rm -f conftest.$ac_objext
7500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7501 (eval $ac_compile) 2>conftest.er1
7502 ac_status=$?
7503 grep -v '^ *+' conftest.er1 >conftest.err
7504 rm -f conftest.er1
7505 cat conftest.err >&5
7506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7507 (exit $ac_status); } &&
7508 { ac_try='test -z "$ac_c_werror_flag"
7509 || test ! -s conftest.err'
7510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7511 (eval $ac_try) 2>&5
7512 ac_status=$?
7513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7514 (exit $ac_status); }; } &&
7515 { ac_try='test -s conftest.$ac_objext'
7516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7517 (eval $ac_try) 2>&5
7518 ac_status=$?
7519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7520 (exit $ac_status); }; }; then
7521 ac_hi=-1 ac_mid=-1
7522 while :; do
7523 cat >conftest.$ac_ext <<_ACEOF
7524/* confdefs.h. */
7525_ACEOF
7526cat confdefs.h >>conftest.$ac_ext
7527cat >>conftest.$ac_ext <<_ACEOF
7528/* end confdefs.h. */
7529$ac_includes_default
7530int
7531main ()
7532{
7533static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
7534test_array [0] = 0
7535
7536 ;
7537 return 0;
7538}
7539_ACEOF
7540rm -f conftest.$ac_objext
7541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7542 (eval $ac_compile) 2>conftest.er1
7543 ac_status=$?
7544 grep -v '^ *+' conftest.er1 >conftest.err
7545 rm -f conftest.er1
7546 cat conftest.err >&5
7547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7548 (exit $ac_status); } &&
7549 { ac_try='test -z "$ac_c_werror_flag"
7550 || test ! -s conftest.err'
7551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7552 (eval $ac_try) 2>&5
7553 ac_status=$?
7554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7555 (exit $ac_status); }; } &&
7556 { ac_try='test -s conftest.$ac_objext'
7557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7558 (eval $ac_try) 2>&5
7559 ac_status=$?
7560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7561 (exit $ac_status); }; }; then
7562 ac_lo=$ac_mid; break
7563else
7564 echo "$as_me: failed program was:" >&5
7565sed 's/^/| /' conftest.$ac_ext >&5
7566
7567ac_hi=`expr '(' $ac_mid ')' - 1`
7568 if test $ac_mid -le $ac_hi; then
7569 ac_lo= ac_hi=
7570 break
7571 fi
7572 ac_mid=`expr 2 '*' $ac_mid`
7573fi
7574rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7575 done
7576else
7577 echo "$as_me: failed program was:" >&5
7578sed 's/^/| /' conftest.$ac_ext >&5
7579
7580ac_lo= ac_hi=
7581fi
7582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7583fi
7584rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7585# Binary search between lo and hi bounds.
7586while test "x$ac_lo" != "x$ac_hi"; do
7587 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7588 cat >conftest.$ac_ext <<_ACEOF
7589/* confdefs.h. */
7590_ACEOF
7591cat confdefs.h >>conftest.$ac_ext
7592cat >>conftest.$ac_ext <<_ACEOF
7593/* end confdefs.h. */
7594$ac_includes_default
7595int
7596main ()
7597{
7598static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7599test_array [0] = 0
7600
7601 ;
7602 return 0;
7603}
7604_ACEOF
7605rm -f conftest.$ac_objext
7606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7607 (eval $ac_compile) 2>conftest.er1
7608 ac_status=$?
7609 grep -v '^ *+' conftest.er1 >conftest.err
7610 rm -f conftest.er1
7611 cat conftest.err >&5
7612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7613 (exit $ac_status); } &&
7614 { ac_try='test -z "$ac_c_werror_flag"
7615 || test ! -s conftest.err'
7616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7617 (eval $ac_try) 2>&5
7618 ac_status=$?
7619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7620 (exit $ac_status); }; } &&
7621 { ac_try='test -s conftest.$ac_objext'
7622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7623 (eval $ac_try) 2>&5
7624 ac_status=$?
7625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7626 (exit $ac_status); }; }; then
7627 ac_hi=$ac_mid
7628else
7629 echo "$as_me: failed program was:" >&5
7630sed 's/^/| /' conftest.$ac_ext >&5
7631
7632ac_lo=`expr '(' $ac_mid ')' + 1`
7633fi
7634rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7635done
7636case $ac_lo in
7637?*) ac_cv_sizeof_long=$ac_lo;;
d5af19ba
DJ
7638'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7639echo "$as_me: error: in \`$ac_pwd':" >&2;}
7640{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
c0993dbe
UW
7641See \`config.log' for more details." >&5
7642echo "$as_me: error: cannot compute sizeof (long), 77
7643See \`config.log' for more details." >&2;}
d5af19ba 7644 { (exit 1); exit 1; }; }; } ;;
c0993dbe
UW
7645esac
7646else
7647 if test "$cross_compiling" = yes; then
d5af19ba
DJ
7648 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7649echo "$as_me: error: in \`$ac_pwd':" >&2;}
7650{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
c0993dbe
UW
7651See \`config.log' for more details." >&5
7652echo "$as_me: error: cannot run test program while cross compiling
7653See \`config.log' for more details." >&2;}
d5af19ba 7654 { (exit 1); exit 1; }; }; }
c0993dbe
UW
7655else
7656 cat >conftest.$ac_ext <<_ACEOF
7657/* confdefs.h. */
7658_ACEOF
7659cat confdefs.h >>conftest.$ac_ext
7660cat >>conftest.$ac_ext <<_ACEOF
7661/* end confdefs.h. */
7662$ac_includes_default
7663long longval () { return (long) (sizeof (long)); }
7664unsigned long ulongval () { return (long) (sizeof (long)); }
7665#include <stdio.h>
7666#include <stdlib.h>
7667int
7668main ()
7669{
7670
7671 FILE *f = fopen ("conftest.val", "w");
7672 if (! f)
7673 exit (1);
7674 if (((long) (sizeof (long))) < 0)
7675 {
7676 long i = longval ();
7677 if (i != ((long) (sizeof (long))))
7678 exit (1);
7679 fprintf (f, "%ld\n", i);
7680 }
7681 else
7682 {
7683 unsigned long i = ulongval ();
7684 if (i != ((long) (sizeof (long))))
7685 exit (1);
7686 fprintf (f, "%lu\n", i);
7687 }
7688 exit (ferror (f) || fclose (f) != 0);
7689
7690 ;
7691 return 0;
7692}
7693_ACEOF
7694rm -f conftest$ac_exeext
7695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7696 (eval $ac_link) 2>&5
7697 ac_status=$?
7698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7699 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7701 (eval $ac_try) 2>&5
7702 ac_status=$?
7703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7704 (exit $ac_status); }; }; then
7705 ac_cv_sizeof_long=`cat conftest.val`
7706else
7707 echo "$as_me: program exited with status $ac_status" >&5
7708echo "$as_me: failed program was:" >&5
7709sed 's/^/| /' conftest.$ac_ext >&5
7710
7711( exit $ac_status )
d5af19ba
DJ
7712{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7713echo "$as_me: error: in \`$ac_pwd':" >&2;}
c0993dbe
UW
7714{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7715See \`config.log' for more details." >&5
7716echo "$as_me: error: cannot compute sizeof (long), 77
7717See \`config.log' for more details." >&2;}
d5af19ba 7718 { (exit 1); exit 1; }; }; }
c0993dbe
UW
7719fi
7720rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7721fi
7722fi
7723rm -f conftest.val
7724else
7725 ac_cv_sizeof_long=0
7726fi
7727fi
7728echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7729echo "${ECHO_T}$ac_cv_sizeof_long" >&6
7730cat >>confdefs.h <<_ACEOF
7731#define SIZEOF_LONG $ac_cv_sizeof_long
7732_ACEOF
7733
7734
7735 if test "x${ac_cv_sizeof_long}" = "x8"; then
7736 want64=true
7737 fi
7738 fi
7739 if test x${want64} = xtrue; then
7740 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
7741 else
7742 TARGET_OBS='$(ALL_TARGET_OBS)'
7743 fi
7744fi
7745
7746
7747
7748# For other settings, only the main target counts.
7749gdb_sim=
7750gdb_osabi=
7751build_gdbserver=
7752targ=$target; . ${srcdir}/configure.tgt
7753
7754# Fetch the default architecture and default target vector from BFD.
7755targ=$target; . $srcdir/../bfd/config.bfd
7756
7757# We only want the first architecture, so strip off the others if
7758# there is more than one.
7759targ_archs=`echo $targ_archs | sed 's/ .*//'`
7760
7761if test "x$targ_archs" != x; then
7762
7763cat >>confdefs.h <<_ACEOF
7764#define DEFAULT_BFD_ARCH $targ_archs
7765_ACEOF
7766
7767fi
7768if test "x$targ_defvec" != x; then
7769
7770cat >>confdefs.h <<_ACEOF
7771#define DEFAULT_BFD_VEC $targ_defvec
7772_ACEOF
7773
7774fi
7775
c0993dbe
UW
7776# The CLI cannot be disabled yet, but may be in the future.
7777
7778# Enable CLI.
7779# Check whether --enable-gdbcli or --disable-gdbcli was given.
7780if test "${enable_gdbcli+set}" = set; then
7781 enableval="$enable_gdbcli"
7782 case $enableval in
7783 yes)
7784 ;;
7785 no)
7786 { { echo "$as_me:$LINENO: error: the command-line interface cannot be disabled yet" >&5
7787echo "$as_me: error: the command-line interface cannot be disabled yet" >&2;}
7788 { (exit 1); exit 1; }; } ;;
7789 *)
7790 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbcli" >&5
7791echo "$as_me: error: bad value $enableval for --enable-gdbcli" >&2;}
7792 { (exit 1); exit 1; }; } ;;
7793 esac
7794else
7795 enable_gdbcli=yes
7796fi;
7797if test x"$enable_gdbcli" = xyes; then
7798 if test -d $srcdir/cli; then
7799 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
7800 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
7801 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
7802 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
7803 fi
7804fi
7805
7806# Enable MI.
7807# Check whether --enable-gdbmi or --disable-gdbmi was given.
7808if test "${enable_gdbmi+set}" = set; then
7809 enableval="$enable_gdbmi"
7810 case $enableval in
7811 yes | no)
7812 ;;
7813 *)
7814 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbmi" >&5
7815echo "$as_me: error: bad value $enableval for --enable-gdbmi" >&2;}
7816 { (exit 1); exit 1; }; } ;;
7817 esac
7818else
7819 enable_gdbmi=yes
7820fi;
7821if test x"$enable_gdbmi" = xyes; then
7822 if test -d $srcdir/mi; then
7823 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
7824 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
7825 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
7826 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
7827 fi
7828fi
7829
7830# Enable TUI.
7831# Check whether --enable-tui or --disable-tui was given.
7832if test "${enable_tui+set}" = set; then
7833 enableval="$enable_tui"
7834 case $enableval in
3ca64bd3 7835 yes | no | auto)
c0993dbe
UW
7836 ;;
7837 *)
7838 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tui" >&5
7839echo "$as_me: error: bad value $enableval for --enable-tui" >&2;}
7840 { (exit 1); exit 1; }; } ;;
7841 esac
7842else
3ca64bd3 7843 enable_tui=auto
c0993dbe
UW
7844fi;
7845
7846# Enable gdbtk.
7847# Check whether --enable-gdbtk or --disable-gdbtk was given.
7848if test "${enable_gdbtk+set}" = set; then
7849 enableval="$enable_gdbtk"
7850 case $enableval in
7851 yes | no)
7852 ;;
7853 *)
7854 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbtk" >&5
7855echo "$as_me: error: bad value $enableval for --enable-gdbtk" >&2;}
7856 { (exit 1); exit 1; }; } ;;
7857 esac
7858else
5062cc19 7859 if test -d $srcdir/gdbtk; then
c0993dbe
UW
7860 enable_gdbtk=yes
7861 else
7862 enable_gdbtk=no
7863 fi
7864fi;
7865# We unconditionally disable gdbtk tests on selected platforms.
7866case $host_os in
7867 go32* | windows*)
7868 { echo "$as_me:$LINENO: WARNING: gdbtk isn't supported on $host; disabling" >&5
7869echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
7870 enable_gdbtk=no ;;
7871esac
7872
7873# Libunwind support.
bec39cab 7874
b4e70030 7875# Check whether --with-libunwind or --without-libunwind was given.
bec39cab 7876if test "${with_libunwind+set}" = set; then
b4e70030
JB
7877 withval="$with_libunwind"
7878 case "${withval}" in
bec39cab
AC
7879 yes) enable_libunwind=yes ;;
7880 no) enable_libunwind=no ;;
7881 *) { { echo "$as_me:$LINENO: error: bad value ${withval} for GDB with-libunwind option" >&5
7882echo "$as_me: error: bad value ${withval} for GDB with-libunwind option" >&2;}
7883 { (exit 1); exit 1; }; } ;;
7884esac
7885else
7886
7887
a9322a30
TT
7888
7889for ac_header in libunwind.h libunwind-ia64.h
bec39cab
AC
7890do
7891as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7892if eval "test \"\${$as_ac_Header+set}\" = set"; then
7893 echo "$as_me:$LINENO: checking for $ac_header" >&5
7894echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7895if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7896 echo $ECHO_N "(cached) $ECHO_C" >&6
7897fi
b4e70030
JB
7898echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7899echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7900else
7901 # Is the header compilable?
b4e70030
JB
7902echo "$as_me:$LINENO: checking $ac_header usability" >&5
7903echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7904cat >conftest.$ac_ext <<_ACEOF
7905/* confdefs.h. */
7906_ACEOF
7907cat confdefs.h >>conftest.$ac_ext
7908cat >>conftest.$ac_ext <<_ACEOF
7909/* end confdefs.h. */
7910$ac_includes_default
7911#include <$ac_header>
7912_ACEOF
7913rm -f conftest.$ac_objext
7914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7915 (eval $ac_compile) 2>conftest.er1
7916 ac_status=$?
7917 grep -v '^ *+' conftest.er1 >conftest.err
7918 rm -f conftest.er1
7919 cat conftest.err >&5
7920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7921 (exit $ac_status); } &&
b4e70030
JB
7922 { ac_try='test -z "$ac_c_werror_flag"
7923 || test ! -s conftest.err'
bec39cab
AC
7924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7925 (eval $ac_try) 2>&5
7926 ac_status=$?
7927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7928 (exit $ac_status); }; } &&
7929 { ac_try='test -s conftest.$ac_objext'
7930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7931 (eval $ac_try) 2>&5
7932 ac_status=$?
7933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7934 (exit $ac_status); }; }; then
7935 ac_header_compiler=yes
7936else
7937 echo "$as_me: failed program was:" >&5
7938sed 's/^/| /' conftest.$ac_ext >&5
7939
b4e70030 7940ac_header_compiler=no
bec39cab
AC
7941fi
7942rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
7943echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7944echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
7945
7946# Is the header present?
b4e70030
JB
7947echo "$as_me:$LINENO: checking $ac_header presence" >&5
7948echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
7949cat >conftest.$ac_ext <<_ACEOF
7950/* confdefs.h. */
7951_ACEOF
7952cat confdefs.h >>conftest.$ac_ext
7953cat >>conftest.$ac_ext <<_ACEOF
7954/* end confdefs.h. */
7955#include <$ac_header>
7956_ACEOF
7957if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7958 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7959 ac_status=$?
7960 grep -v '^ *+' conftest.er1 >conftest.err
7961 rm -f conftest.er1
7962 cat conftest.err >&5
7963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); } >/dev/null; then
7965 if test -s conftest.err; then
7966 ac_cpp_err=$ac_c_preproc_warn_flag
7967 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7968 else
7969 ac_cpp_err=
7970 fi
7971else
7972 ac_cpp_err=yes
7973fi
7974if test -z "$ac_cpp_err"; then
7975 ac_header_preproc=yes
7976else
7977 echo "$as_me: failed program was:" >&5
7978sed 's/^/| /' conftest.$ac_ext >&5
7979
7980 ac_header_preproc=no
7981fi
7982rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7983echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7984echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
7985
7986# So? What about this header?
7987case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7988 yes:no: )
7989 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7990echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7991 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7992echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7993 ac_header_preproc=yes
7994 ;;
7995 no:yes:* )
7996 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7997echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7998 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7999echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8000 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8001echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8002 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8003echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8004 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8005echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8006 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8007echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8008 (
8009 cat <<\_ASBOX
8010## ------------------------------------------ ##
8011## Report this to the AC_PACKAGE_NAME lists. ##
8012## ------------------------------------------ ##
8013_ASBOX
8014 ) |
8015 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8016 ;;
8017esac
b4e70030
JB
8018echo "$as_me:$LINENO: checking for $ac_header" >&5
8019echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8020if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8021 echo $ECHO_N "(cached) $ECHO_C" >&6
8022else
8023 eval "$as_ac_Header=\$ac_header_preproc"
8024fi
b4e70030
JB
8025echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8026echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8027
8028fi
8029if test `eval echo '${'$as_ac_Header'}'` = yes; then
8030 cat >>confdefs.h <<_ACEOF
8031#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8032_ACEOF
8033
8034fi
8035
8036done
8037
a9322a30
TT
8038 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
8039 enable_libunwind=yes;
8040 fi
8041
8042fi;
8043
8044if test x"$enable_libunwind" = xyes; then
8045
bec39cab 8046
a9322a30 8047for ac_header in libunwind.h libunwind-ia64.h
bec39cab
AC
8048do
8049as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
8050if eval "test \"\${$as_ac_Header+set}\" = set"; then
8051 echo "$as_me:$LINENO: checking for $ac_header" >&5
8052echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8053if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8054 echo $ECHO_N "(cached) $ECHO_C" >&6
8055fi
b4e70030
JB
8056echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8057echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8058else
8059 # Is the header compilable?
b4e70030
JB
8060echo "$as_me:$LINENO: checking $ac_header usability" >&5
8061echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
8062cat >conftest.$ac_ext <<_ACEOF
8063/* confdefs.h. */
8064_ACEOF
8065cat confdefs.h >>conftest.$ac_ext
8066cat >>conftest.$ac_ext <<_ACEOF
8067/* end confdefs.h. */
8068$ac_includes_default
8069#include <$ac_header>
8070_ACEOF
8071rm -f conftest.$ac_objext
8072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8073 (eval $ac_compile) 2>conftest.er1
8074 ac_status=$?
8075 grep -v '^ *+' conftest.er1 >conftest.err
8076 rm -f conftest.er1
8077 cat conftest.err >&5
8078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8079 (exit $ac_status); } &&
b4e70030
JB
8080 { ac_try='test -z "$ac_c_werror_flag"
8081 || test ! -s conftest.err'
bec39cab
AC
8082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8083 (eval $ac_try) 2>&5
8084 ac_status=$?
8085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8086 (exit $ac_status); }; } &&
8087 { ac_try='test -s conftest.$ac_objext'
8088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8089 (eval $ac_try) 2>&5
8090 ac_status=$?
8091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8092 (exit $ac_status); }; }; then
8093 ac_header_compiler=yes
8094else
8095 echo "$as_me: failed program was:" >&5
8096sed 's/^/| /' conftest.$ac_ext >&5
8097
b4e70030 8098ac_header_compiler=no
bec39cab
AC
8099fi
8100rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8101echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8102echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8103
8104# Is the header present?
b4e70030
JB
8105echo "$as_me:$LINENO: checking $ac_header presence" >&5
8106echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8107cat >conftest.$ac_ext <<_ACEOF
8108/* confdefs.h. */
8109_ACEOF
8110cat confdefs.h >>conftest.$ac_ext
8111cat >>conftest.$ac_ext <<_ACEOF
8112/* end confdefs.h. */
8113#include <$ac_header>
8114_ACEOF
8115if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8116 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8117 ac_status=$?
8118 grep -v '^ *+' conftest.er1 >conftest.err
8119 rm -f conftest.er1
8120 cat conftest.err >&5
8121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8122 (exit $ac_status); } >/dev/null; then
8123 if test -s conftest.err; then
8124 ac_cpp_err=$ac_c_preproc_warn_flag
8125 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8126 else
8127 ac_cpp_err=
8128 fi
8129else
8130 ac_cpp_err=yes
8131fi
8132if test -z "$ac_cpp_err"; then
8133 ac_header_preproc=yes
8134else
8135 echo "$as_me: failed program was:" >&5
8136sed 's/^/| /' conftest.$ac_ext >&5
8137
8138 ac_header_preproc=no
8139fi
8140rm -f conftest.err conftest.$ac_ext
b4e70030
JB
8141echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8142echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
8143
8144# So? What about this header?
8145case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8146 yes:no: )
8147 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8148echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8149 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8150echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8151 ac_header_preproc=yes
8152 ;;
8153 no:yes:* )
8154 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8155echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8156 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8157echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8158 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8159echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8160 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8161echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8162 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8163echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8164 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8165echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8166 (
8167 cat <<\_ASBOX
8168## ------------------------------------------ ##
8169## Report this to the AC_PACKAGE_NAME lists. ##
8170## ------------------------------------------ ##
8171_ASBOX
8172 ) |
8173 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8174 ;;
8175esac
b4e70030
JB
8176echo "$as_me:$LINENO: checking for $ac_header" >&5
8177echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8178if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8179 echo $ECHO_N "(cached) $ECHO_C" >&6
8180else
8181 eval "$as_ac_Header=\$ac_header_preproc"
8182fi
b4e70030
JB
8183echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8184echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8185
8186fi
8187if test `eval echo '${'$as_ac_Header'}'` = yes; then
8188 cat >>confdefs.h <<_ACEOF
8189#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8190_ACEOF
8191
8192fi
8193
8194done
8195
bec39cab 8196
a9322a30
TT
8197cat >>confdefs.h <<\_ACEOF
8198#define HAVE_LIBUNWIND 1
8199_ACEOF
8200
8201 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8202 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8203 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8204fi
8205
cb01cfba
JB
8206opt_curses=no
8207
8208# Check whether --with-curses or --without-curses was given.
8209if test "${with_curses+set}" = set; then
8210 withval="$with_curses"
8211 opt_curses=$withval
8212fi;
8213
76a39ba7 8214prefer_curses=no
cb01cfba 8215if test "$opt_curses" = "yes"; then
76a39ba7 8216 prefer_curses=yes
cb01cfba
JB
8217fi
8218
a9322a30
TT
8219# Profiling support.
8220# Check whether --enable-profiling or --disable-profiling was given.
8221if test "${enable_profiling+set}" = set; then
8222 enableval="$enable_profiling"
8223 case $enableval in
8224 yes | no)
8225 ;;
8226 *)
8227 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-profile" >&5
8228echo "$as_me: error: bad value $enableval for --enable-profile" >&2;}
8229 { (exit 1); exit 1; }; } ;;
8230 esac
8231else
8232 enable_profiling=no
b4e70030 8233fi;
bec39cab 8234
bec39cab 8235
a9322a30
TT
8236
8237for ac_func in monstartup _mcleanup
bec39cab 8238do
a9322a30
TT
8239as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8240echo "$as_me:$LINENO: checking for $ac_func" >&5
8241echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8242if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 8243 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8244else
a9322a30 8245 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8246/* confdefs.h. */
8247_ACEOF
8248cat confdefs.h >>conftest.$ac_ext
8249cat >>conftest.$ac_ext <<_ACEOF
8250/* end confdefs.h. */
a9322a30
TT
8251/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8252 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8253#define $ac_func innocuous_$ac_func
8254
8255/* System header to define __stub macros and hopefully few prototypes,
8256 which can conflict with char $ac_func (); below.
8257 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8258 <limits.h> exists even on freestanding compilers. */
8259
8260#ifdef __STDC__
8261# include <limits.h>
8262#else
8263# include <assert.h>
8264#endif
8265
8266#undef $ac_func
8267
8268/* Override any gcc2 internal prototype to avoid an error. */
8269#ifdef __cplusplus
8270extern "C"
8271{
8272#endif
8273/* We use char because int might match the return type of a gcc2
8274 builtin and then its argument prototype would still apply. */
8275char $ac_func ();
8276/* The GNU C library defines this for functions which it implements
8277 to always fail with ENOSYS. Some functions are actually named
8278 something starting with __ and the normal name is an alias. */
8279#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8280choke me
8281#else
8282char (*f) () = $ac_func;
8283#endif
8284#ifdef __cplusplus
8285}
8286#endif
8287
8288int
8289main ()
8290{
8291return f != $ac_func;
8292 ;
8293 return 0;
8294}
bec39cab 8295_ACEOF
a9322a30
TT
8296rm -f conftest.$ac_objext conftest$ac_exeext
8297if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8298 (eval $ac_link) 2>conftest.er1
bec39cab
AC
8299 ac_status=$?
8300 grep -v '^ *+' conftest.er1 >conftest.err
8301 rm -f conftest.er1
8302 cat conftest.err >&5
8303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8304 (exit $ac_status); } &&
b4e70030
JB
8305 { ac_try='test -z "$ac_c_werror_flag"
8306 || test ! -s conftest.err'
bec39cab
AC
8307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8308 (eval $ac_try) 2>&5
8309 ac_status=$?
8310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311 (exit $ac_status); }; } &&
a9322a30 8312 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
8313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8314 (eval $ac_try) 2>&5
8315 ac_status=$?
8316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8317 (exit $ac_status); }; }; then
a9322a30 8318 eval "$as_ac_var=yes"
bec39cab
AC
8319else
8320 echo "$as_me: failed program was:" >&5
8321sed 's/^/| /' conftest.$ac_ext >&5
8322
a9322a30 8323eval "$as_ac_var=no"
bec39cab 8324fi
a9322a30
TT
8325rm -f conftest.err conftest.$ac_objext \
8326 conftest$ac_exeext conftest.$ac_ext
bec39cab 8327fi
a9322a30
TT
8328echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8329echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8330if test `eval echo '${'$as_ac_var'}'` = yes; then
bec39cab 8331 cat >>confdefs.h <<_ACEOF
a9322a30 8332#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab
AC
8333_ACEOF
8334
8335fi
bec39cab
AC
8336done
8337
a9322a30
TT
8338echo "$as_me:$LINENO: checking for _etext" >&5
8339echo $ECHO_N "checking for _etext... $ECHO_C" >&6
8340if test "${ac_cv_var__etext+set}" = set; then
bec39cab 8341 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8342else
a9322a30 8343 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8344/* confdefs.h. */
8345_ACEOF
8346cat confdefs.h >>conftest.$ac_ext
8347cat >>conftest.$ac_ext <<_ACEOF
8348/* end confdefs.h. */
a9322a30
TT
8349#include <stdlib.h>
8350extern char _etext;
8351
8352int
8353main ()
8354{
8355free (&_etext);
8356 ;
8357 return 0;
8358}
bec39cab 8359_ACEOF
a9322a30
TT
8360rm -f conftest.$ac_objext conftest$ac_exeext
8361if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8362 (eval $ac_link) 2>conftest.er1
bec39cab
AC
8363 ac_status=$?
8364 grep -v '^ *+' conftest.er1 >conftest.err
8365 rm -f conftest.er1
8366 cat conftest.err >&5
8367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8368 (exit $ac_status); } &&
b4e70030
JB
8369 { ac_try='test -z "$ac_c_werror_flag"
8370 || test ! -s conftest.err'
bec39cab
AC
8371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8372 (eval $ac_try) 2>&5
8373 ac_status=$?
8374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8375 (exit $ac_status); }; } &&
a9322a30 8376 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
8377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8378 (eval $ac_try) 2>&5
8379 ac_status=$?
8380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8381 (exit $ac_status); }; }; then
a9322a30 8382 ac_cv_var__etext=yes
bec39cab
AC
8383else
8384 echo "$as_me: failed program was:" >&5
8385sed 's/^/| /' conftest.$ac_ext >&5
8386
a9322a30 8387ac_cv_var__etext=no
bec39cab 8388fi
a9322a30
TT
8389rm -f conftest.err conftest.$ac_objext \
8390 conftest$ac_exeext conftest.$ac_ext
bec39cab 8391fi
a9322a30
TT
8392echo "$as_me:$LINENO: result: $ac_cv_var__etext" >&5
8393echo "${ECHO_T}$ac_cv_var__etext" >&6
8394if test $ac_cv_var__etext = yes; then
60ca704f
SE
8395
8396cat >>confdefs.h <<\_ACEOF
a9322a30 8397#define HAVE__ETEXT 1
bec39cab
AC
8398_ACEOF
8399
bec39cab 8400fi
a9322a30
TT
8401echo "$as_me:$LINENO: checking for etext" >&5
8402echo $ECHO_N "checking for etext... $ECHO_C" >&6
8403if test "${ac_cv_var_etext+set}" = set; then
bec39cab
AC
8404 echo $ECHO_N "(cached) $ECHO_C" >&6
8405else
8406 cat >conftest.$ac_ext <<_ACEOF
8407/* confdefs.h. */
8408_ACEOF
8409cat confdefs.h >>conftest.$ac_ext
8410cat >>conftest.$ac_ext <<_ACEOF
8411/* end confdefs.h. */
a9322a30
TT
8412#include <stdlib.h>
8413extern char etext;
bec39cab
AC
8414
8415int
8416main ()
8417{
a9322a30 8418free (&etext);
bec39cab
AC
8419 ;
8420 return 0;
8421}
8422_ACEOF
8423rm -f conftest.$ac_objext conftest$ac_exeext
8424if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8425 (eval $ac_link) 2>conftest.er1
8426 ac_status=$?
8427 grep -v '^ *+' conftest.er1 >conftest.err
8428 rm -f conftest.er1
8429 cat conftest.err >&5
8430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8431 (exit $ac_status); } &&
b4e70030
JB
8432 { ac_try='test -z "$ac_c_werror_flag"
8433 || test ! -s conftest.err'
bec39cab
AC
8434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8435 (eval $ac_try) 2>&5
8436 ac_status=$?
8437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8438 (exit $ac_status); }; } &&
8439 { ac_try='test -s conftest$ac_exeext'
8440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8441 (eval $ac_try) 2>&5
8442 ac_status=$?
8443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8444 (exit $ac_status); }; }; then
a9322a30 8445 ac_cv_var_etext=yes
bec39cab
AC
8446else
8447 echo "$as_me: failed program was:" >&5
8448sed 's/^/| /' conftest.$ac_ext >&5
8449
a9322a30 8450ac_cv_var_etext=no
bec39cab
AC
8451fi
8452rm -f conftest.err conftest.$ac_objext \
8453 conftest$ac_exeext conftest.$ac_ext
8454fi
a9322a30
TT
8455echo "$as_me:$LINENO: result: $ac_cv_var_etext" >&5
8456echo "${ECHO_T}$ac_cv_var_etext" >&6
8457if test $ac_cv_var_etext = yes; then
8458
8459cat >>confdefs.h <<\_ACEOF
8460#define HAVE_ETEXT 1
bec39cab
AC
8461_ACEOF
8462
8463fi
a9322a30
TT
8464if test "$enable_profiling" = yes ; then
8465 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
8466 { { echo "$as_me:$LINENO: error: --enable-profiling requires monstartup and _mcleanup" >&5
8467echo "$as_me: error: --enable-profiling requires monstartup and _mcleanup" >&2;}
8468 { (exit 1); exit 1; }; }
8469 fi
8470 PROFILE_CFLAGS=-pg
8471 OLD_CFLAGS="$CFLAGS"
8472 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8473
a9322a30
TT
8474 echo "$as_me:$LINENO: checking whether $CC supports -pg" >&5
8475echo $ECHO_N "checking whether $CC supports -pg... $ECHO_C" >&6
8476if test "${ac_cv_cc_supports_pg+set}" = set; then
bec39cab
AC
8477 echo $ECHO_N "(cached) $ECHO_C" >&6
8478else
8479 cat >conftest.$ac_ext <<_ACEOF
8480/* confdefs.h. */
8481_ACEOF
8482cat confdefs.h >>conftest.$ac_ext
8483cat >>conftest.$ac_ext <<_ACEOF
8484/* end confdefs.h. */
bec39cab
AC
8485
8486int
8487main ()
8488{
a9322a30 8489int x;
bec39cab
AC
8490 ;
8491 return 0;
8492}
8493_ACEOF
a9322a30
TT
8494rm -f conftest.$ac_objext
8495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8496 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
8497 ac_status=$?
8498 grep -v '^ *+' conftest.er1 >conftest.err
8499 rm -f conftest.er1
8500 cat conftest.err >&5
8501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8502 (exit $ac_status); } &&
b4e70030
JB
8503 { ac_try='test -z "$ac_c_werror_flag"
8504 || test ! -s conftest.err'
bec39cab
AC
8505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8506 (eval $ac_try) 2>&5
8507 ac_status=$?
8508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8509 (exit $ac_status); }; } &&
a9322a30 8510 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
8511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8512 (eval $ac_try) 2>&5
8513 ac_status=$?
8514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8515 (exit $ac_status); }; }; then
a9322a30 8516 ac_cv_cc_supports_pg=yes
bec39cab
AC
8517else
8518 echo "$as_me: failed program was:" >&5
8519sed 's/^/| /' conftest.$ac_ext >&5
8520
a9322a30 8521ac_cv_cc_supports_pg=no
bec39cab 8522fi
a9322a30 8523rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8524fi
a9322a30
TT
8525echo "$as_me:$LINENO: result: $ac_cv_cc_supports_pg" >&5
8526echo "${ECHO_T}$ac_cv_cc_supports_pg" >&6
bec39cab 8527
a9322a30
TT
8528 if test $ac_cv_cc_supports_pg = no; then
8529 { { echo "$as_me:$LINENO: error: --enable-profiling requires a compiler which supports -pg" >&5
8530echo "$as_me: error: --enable-profiling requires a compiler which supports -pg" >&2;}
8531 { (exit 1); exit 1; }; }
8532 fi
bec39cab 8533
a9322a30 8534 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8535fi
8536
c16158bc
JM
8537
8538
8539# Check whether --with-pkgversion or --without-pkgversion was given.
8540if test "${with_pkgversion+set}" = set; then
8541 withval="$with_pkgversion"
8542 case "$withval" in
8543 yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
8544echo "$as_me: error: package version not specified" >&2;}
8545 { (exit 1); exit 1; }; } ;;
8546 no) PKGVERSION= ;;
8547 *) PKGVERSION="($withval) " ;;
8548 esac
8549else
8550 PKGVERSION="(GDB) "
8551
8552fi;
8553
8554
8555
8556
8557# Check whether --with-bugurl or --without-bugurl was given.
8558if test "${with_bugurl+set}" = set; then
8559 withval="$with_bugurl"
8560 case "$withval" in
8561 yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
8562echo "$as_me: error: bug URL not specified" >&2;}
8563 { (exit 1); exit 1; }; } ;;
8564 no) BUGURL=
8565 ;;
8566 *) BUGURL="$withval"
8567 ;;
8568 esac
8569else
8570 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8571
8572fi;
8573 case ${BUGURL} in
8574 "")
8575 REPORT_BUGS_TO=
8576 REPORT_BUGS_TEXI=
8577 ;;
8578 *)
8579 REPORT_BUGS_TO="<$BUGURL>"
8580 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8581 ;;
8582 esac;
8583
8584
8585
8586
8587cat >>confdefs.h <<_ACEOF
8588#define PKGVERSION "$PKGVERSION"
8589_ACEOF
8590
8591
8592cat >>confdefs.h <<_ACEOF
8593#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8594_ACEOF
8595
8596
bec39cab
AC
8597# --------------------- #
8598# Checks for programs. #
8599# --------------------- #
8600
8601for ac_prog in gawk mawk nawk awk
8602do
8603 # Extract the first word of "$ac_prog", so it can be a program name with args.
8604set dummy $ac_prog; ac_word=$2
b4e70030
JB
8605echo "$as_me:$LINENO: checking for $ac_word" >&5
8606echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8607if test "${ac_cv_prog_AWK+set}" = set; then
8608 echo $ECHO_N "(cached) $ECHO_C" >&6
8609else
8610 if test -n "$AWK"; then
8611 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8612else
8613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8614for as_dir in $PATH
8615do
8616 IFS=$as_save_IFS
8617 test -z "$as_dir" && as_dir=.
8618 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8619 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8620 ac_cv_prog_AWK="$ac_prog"
8621 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8622 break 2
8623 fi
8624done
8625done
8626
8627fi
8628fi
8629AWK=$ac_cv_prog_AWK
8630if test -n "$AWK"; then
b4e70030
JB
8631 echo "$as_me:$LINENO: result: $AWK" >&5
8632echo "${ECHO_T}$AWK" >&6
bec39cab 8633else
b4e70030
JB
8634 echo "$as_me:$LINENO: result: no" >&5
8635echo "${ECHO_T}no" >&6
bec39cab
AC
8636fi
8637
8638 test -n "$AWK" && break
8639done
8640
8641# Find a good install program. We prefer a C program (faster),
8642# so one script is as good as another. But avoid the broken or
8643# incompatible versions:
8644# SysV /etc/install, /usr/sbin/install
8645# SunOS /usr/etc/install
8646# IRIX /sbin/install
8647# AIX /bin/install
8648# AmigaOS /C/install, which installs bootblocks on floppy discs
8649# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8650# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8651# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8652# OS/2's system install, which has a completely different semantic
8653# ./install, which can be erroneously created by make from ./install.sh.
85541719 8654# Reject install programs that cannot install multiple files.
b4e70030
JB
8655echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
8656echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
bec39cab
AC
8657if test -z "$INSTALL"; then
8658if test "${ac_cv_path_install+set}" = set; then
8659 echo $ECHO_N "(cached) $ECHO_C" >&6
8660else
8661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8662for as_dir in $PATH
8663do
8664 IFS=$as_save_IFS
8665 test -z "$as_dir" && as_dir=.
8666 # Account for people who put trailing slashes in PATH elements.
8667case $as_dir/ in
8668 ./ | .// | /cC/* | \
8669 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8670 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
8671 /usr/ucb/* ) ;;
c906108c 8672 *)
bec39cab
AC
8673 # OSF1 and SCO ODT 3.0 have their own names for install.
8674 # Don't use installbsd from OSF since it installs stuff as root
8675 # by default.
8676 for ac_prog in ginstall scoinst install; do
8677 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8678 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
bec39cab
AC
8679 if test $ac_prog = install &&
8680 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8681 # AIX install. It has an incompatible calling convention.
8682 :
8683 elif test $ac_prog = install &&
8684 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8685 # program-specific install script used by HP pwplus--don't use.
8686 :
8687 else
85541719
DE
8688 rm -rf conftest.one conftest.two conftest.dir
8689 echo one > conftest.one
8690 echo two > conftest.two
8691 mkdir conftest.dir
8692 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
8693 test -s conftest.one && test -s conftest.two &&
8694 test -s conftest.dir/conftest.one &&
8695 test -s conftest.dir/conftest.two
8696 then
8697 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8698 break 3
8699 fi
bec39cab
AC
8700 fi
8701 fi
8702 done
8703 done
8704 ;;
c906108c 8705esac
bec39cab
AC
8706done
8707
85541719 8708rm -rf conftest.one conftest.two conftest.dir
bec39cab
AC
8709
8710fi
8711 if test "${ac_cv_path_install+set}" = set; then
8712 INSTALL=$ac_cv_path_install
8713 else
85541719
DE
8714 # As a last resort, use the slow shell script. Don't cache a
8715 # value for INSTALL within a source directory, because that will
bec39cab 8716 # break other packages using the cache if that directory is
85541719 8717 # removed, or if the value is a relative name.
bec39cab
AC
8718 INSTALL=$ac_install_sh
8719 fi
8720fi
b4e70030
JB
8721echo "$as_me:$LINENO: result: $INSTALL" >&5
8722echo "${ECHO_T}$INSTALL" >&6
bec39cab
AC
8723
8724# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8725# It thinks the first close brace ends the variable substitution.
8726test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8727
8728test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8729
8730test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8731
b4e70030
JB
8732echo "$as_me:$LINENO: checking whether ln -s works" >&5
8733echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
bec39cab
AC
8734LN_S=$as_ln_s
8735if test "$LN_S" = "ln -s"; then
b4e70030
JB
8736 echo "$as_me:$LINENO: result: yes" >&5
8737echo "${ECHO_T}yes" >&6
bec39cab 8738else
b4e70030
JB
8739 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
8740echo "${ECHO_T}no, using $LN_S" >&6
bec39cab
AC
8741fi
8742
8743if test -n "$ac_tool_prefix"; then
8744 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8745set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b4e70030
JB
8746echo "$as_me:$LINENO: checking for $ac_word" >&5
8747echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8748if test "${ac_cv_prog_RANLIB+set}" = set; then
8749 echo $ECHO_N "(cached) $ECHO_C" >&6
8750else
8751 if test -n "$RANLIB"; then
8752 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8753else
8754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8755for as_dir in $PATH
8756do
8757 IFS=$as_save_IFS
8758 test -z "$as_dir" && as_dir=.
8759 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8760 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8761 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8762 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8763 break 2
8764 fi
8765done
8766done
8767
8768fi
8769fi
8770RANLIB=$ac_cv_prog_RANLIB
8771if test -n "$RANLIB"; then
b4e70030
JB
8772 echo "$as_me:$LINENO: result: $RANLIB" >&5
8773echo "${ECHO_T}$RANLIB" >&6
bec39cab 8774else
b4e70030
JB
8775 echo "$as_me:$LINENO: result: no" >&5
8776echo "${ECHO_T}no" >&6
bec39cab
AC
8777fi
8778
8779fi
8780if test -z "$ac_cv_prog_RANLIB"; then
8781 ac_ct_RANLIB=$RANLIB
8782 # Extract the first word of "ranlib", so it can be a program name with args.
8783set dummy ranlib; ac_word=$2
b4e70030
JB
8784echo "$as_me:$LINENO: checking for $ac_word" >&5
8785echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8786if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8787 echo $ECHO_N "(cached) $ECHO_C" >&6
8788else
8789 if test -n "$ac_ct_RANLIB"; then
8790 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8791else
8792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8793for as_dir in $PATH
8794do
8795 IFS=$as_save_IFS
8796 test -z "$as_dir" && as_dir=.
8797 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8798 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8799 ac_cv_prog_ac_ct_RANLIB="ranlib"
8800 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8801 break 2
8802 fi
8803done
8804done
8805
b4e70030 8806 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
bec39cab
AC
8807fi
8808fi
8809ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8810if test -n "$ac_ct_RANLIB"; then
b4e70030
JB
8811 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8812echo "${ECHO_T}$ac_ct_RANLIB" >&6
bec39cab 8813else
b4e70030
JB
8814 echo "$as_me:$LINENO: result: no" >&5
8815echo "${ECHO_T}no" >&6
bec39cab
AC
8816fi
8817
b4e70030 8818 RANLIB=$ac_ct_RANLIB
bec39cab
AC
8819else
8820 RANLIB="$ac_cv_prog_RANLIB"
8821fi
8822
8823for ac_prog in 'bison -y' byacc
8824do
8825 # Extract the first word of "$ac_prog", so it can be a program name with args.
8826set dummy $ac_prog; ac_word=$2
b4e70030
JB
8827echo "$as_me:$LINENO: checking for $ac_word" >&5
8828echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8829if test "${ac_cv_prog_YACC+set}" = set; then
8830 echo $ECHO_N "(cached) $ECHO_C" >&6
8831else
8832 if test -n "$YACC"; then
8833 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8834else
8835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8836for as_dir in $PATH
8837do
8838 IFS=$as_save_IFS
8839 test -z "$as_dir" && as_dir=.
8840 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8841 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8842 ac_cv_prog_YACC="$ac_prog"
8843 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8844 break 2
8845 fi
8846done
8847done
8848
8849fi
8850fi
8851YACC=$ac_cv_prog_YACC
8852if test -n "$YACC"; then
b4e70030
JB
8853 echo "$as_me:$LINENO: result: $YACC" >&5
8854echo "${ECHO_T}$YACC" >&6
bec39cab 8855else
b4e70030
JB
8856 echo "$as_me:$LINENO: result: no" >&5
8857echo "${ECHO_T}no" >&6
bec39cab
AC
8858fi
8859
8860 test -n "$YACC" && break
8861done
8862test -n "$YACC" || YACC="yacc"
8863
8864
8865if test -n "$ac_tool_prefix"; then
8866 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8867set dummy ${ac_tool_prefix}ar; ac_word=$2
b4e70030
JB
8868echo "$as_me:$LINENO: checking for $ac_word" >&5
8869echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8870if test "${ac_cv_prog_AR+set}" = set; then
8871 echo $ECHO_N "(cached) $ECHO_C" >&6
8872else
8873 if test -n "$AR"; then
8874 ac_cv_prog_AR="$AR" # Let the user override the test.
8875else
8876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8877for as_dir in $PATH
8878do
8879 IFS=$as_save_IFS
8880 test -z "$as_dir" && as_dir=.
8881 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8882 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8883 ac_cv_prog_AR="${ac_tool_prefix}ar"
8884 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8885 break 2
8886 fi
8887done
8888done
8889
8890fi
8891fi
8892AR=$ac_cv_prog_AR
8893if test -n "$AR"; then
b4e70030
JB
8894 echo "$as_me:$LINENO: result: $AR" >&5
8895echo "${ECHO_T}$AR" >&6
bec39cab 8896else
b4e70030
JB
8897 echo "$as_me:$LINENO: result: no" >&5
8898echo "${ECHO_T}no" >&6
bec39cab
AC
8899fi
8900
8901fi
8902if test -z "$ac_cv_prog_AR"; then
8903 ac_ct_AR=$AR
8904 # Extract the first word of "ar", so it can be a program name with args.
8905set dummy ar; ac_word=$2
b4e70030
JB
8906echo "$as_me:$LINENO: checking for $ac_word" >&5
8907echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8908if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
8909 echo $ECHO_N "(cached) $ECHO_C" >&6
8910else
8911 if test -n "$ac_ct_AR"; then
8912 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8913else
8914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8915for as_dir in $PATH
8916do
8917 IFS=$as_save_IFS
8918 test -z "$as_dir" && as_dir=.
8919 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8920 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8921 ac_cv_prog_ac_ct_AR="ar"
8922 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8923 break 2
8924 fi
8925done
8926done
8927
8928fi
8929fi
8930ac_ct_AR=$ac_cv_prog_ac_ct_AR
8931if test -n "$ac_ct_AR"; then
b4e70030
JB
8932 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
8933echo "${ECHO_T}$ac_ct_AR" >&6
bec39cab 8934else
b4e70030
JB
8935 echo "$as_me:$LINENO: result: no" >&5
8936echo "${ECHO_T}no" >&6
bec39cab
AC
8937fi
8938
b4e70030 8939 AR=$ac_ct_AR
bec39cab
AC
8940else
8941 AR="$ac_cv_prog_AR"
8942fi
8943
8944if test -n "$ac_tool_prefix"; then
8945 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8946set dummy ${ac_tool_prefix}dlltool; ac_word=$2
b4e70030
JB
8947echo "$as_me:$LINENO: checking for $ac_word" >&5
8948echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8949if test "${ac_cv_prog_DLLTOOL+set}" = set; then
8950 echo $ECHO_N "(cached) $ECHO_C" >&6
8951else
8952 if test -n "$DLLTOOL"; then
8953 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8954else
8955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8956for as_dir in $PATH
8957do
8958 IFS=$as_save_IFS
8959 test -z "$as_dir" && as_dir=.
8960 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8961 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8962 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8963 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8964 break 2
8965 fi
8966done
8967done
8968
8969fi
8970fi
8971DLLTOOL=$ac_cv_prog_DLLTOOL
8972if test -n "$DLLTOOL"; then
b4e70030
JB
8973 echo "$as_me:$LINENO: result: $DLLTOOL" >&5
8974echo "${ECHO_T}$DLLTOOL" >&6
bec39cab 8975else
b4e70030
JB
8976 echo "$as_me:$LINENO: result: no" >&5
8977echo "${ECHO_T}no" >&6
bec39cab
AC
8978fi
8979
8980fi
8981if test -z "$ac_cv_prog_DLLTOOL"; then
8982 ac_ct_DLLTOOL=$DLLTOOL
8983 # Extract the first word of "dlltool", so it can be a program name with args.
8984set dummy dlltool; ac_word=$2
b4e70030
JB
8985echo "$as_me:$LINENO: checking for $ac_word" >&5
8986echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8987if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
8988 echo $ECHO_N "(cached) $ECHO_C" >&6
8989else
8990 if test -n "$ac_ct_DLLTOOL"; then
8991 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8992else
8993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994for as_dir in $PATH
8995do
8996 IFS=$as_save_IFS
8997 test -z "$as_dir" && as_dir=.
8998 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8999 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9000 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9001 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9002 break 2
9003 fi
9004done
9005done
9006
9007fi
9008fi
9009ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9010if test -n "$ac_ct_DLLTOOL"; then
b4e70030
JB
9011 echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
9012echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
bec39cab 9013else
b4e70030
JB
9014 echo "$as_me:$LINENO: result: no" >&5
9015echo "${ECHO_T}no" >&6
bec39cab
AC
9016fi
9017
b4e70030 9018 DLLTOOL=$ac_ct_DLLTOOL
bec39cab
AC
9019else
9020 DLLTOOL="$ac_cv_prog_DLLTOOL"
9021fi
9022
9023if test -n "$ac_tool_prefix"; then
9024 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9025set dummy ${ac_tool_prefix}windres; ac_word=$2
b4e70030
JB
9026echo "$as_me:$LINENO: checking for $ac_word" >&5
9027echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9028if test "${ac_cv_prog_WINDRES+set}" = set; then
9029 echo $ECHO_N "(cached) $ECHO_C" >&6
9030else
9031 if test -n "$WINDRES"; then
9032 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9033else
9034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9035for as_dir in $PATH
9036do
9037 IFS=$as_save_IFS
9038 test -z "$as_dir" && as_dir=.
9039 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9040 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9041 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9042 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9043 break 2
9044 fi
9045done
9046done
9047
9048fi
9049fi
9050WINDRES=$ac_cv_prog_WINDRES
9051if test -n "$WINDRES"; then
b4e70030
JB
9052 echo "$as_me:$LINENO: result: $WINDRES" >&5
9053echo "${ECHO_T}$WINDRES" >&6
bec39cab 9054else
b4e70030
JB
9055 echo "$as_me:$LINENO: result: no" >&5
9056echo "${ECHO_T}no" >&6
bec39cab
AC
9057fi
9058
9059fi
9060if test -z "$ac_cv_prog_WINDRES"; then
9061 ac_ct_WINDRES=$WINDRES
9062 # Extract the first word of "windres", so it can be a program name with args.
9063set dummy windres; ac_word=$2
b4e70030
JB
9064echo "$as_me:$LINENO: checking for $ac_word" >&5
9065echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9066if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
9067 echo $ECHO_N "(cached) $ECHO_C" >&6
9068else
9069 if test -n "$ac_ct_WINDRES"; then
9070 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9071else
9072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9073for as_dir in $PATH
9074do
9075 IFS=$as_save_IFS
9076 test -z "$as_dir" && as_dir=.
9077 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9078 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9079 ac_cv_prog_ac_ct_WINDRES="windres"
9080 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9081 break 2
9082 fi
9083done
9084done
9085
9086fi
9087fi
9088ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9089if test -n "$ac_ct_WINDRES"; then
b4e70030
JB
9090 echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
9091echo "${ECHO_T}$ac_ct_WINDRES" >&6
bec39cab 9092else
b4e70030
JB
9093 echo "$as_me:$LINENO: result: no" >&5
9094echo "${ECHO_T}no" >&6
c906108c 9095fi
bec39cab 9096
b4e70030 9097 WINDRES=$ac_ct_WINDRES
c906108c 9098else
bec39cab 9099 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
9100fi
9101
bec39cab
AC
9102
9103# Needed for GNU/Hurd.
9104if test -n "$ac_tool_prefix"; then
9105 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
9106set dummy ${ac_tool_prefix}mig; ac_word=$2
b4e70030
JB
9107echo "$as_me:$LINENO: checking for $ac_word" >&5
9108echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9109if test "${ac_cv_prog_MIG+set}" = set; then
9110 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 9111else
bec39cab
AC
9112 if test -n "$MIG"; then
9113 ac_cv_prog_MIG="$MIG" # Let the user override the test.
9114else
9115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9116for as_dir in $PATH
9117do
9118 IFS=$as_save_IFS
9119 test -z "$as_dir" && as_dir=.
9120 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9121 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9122 ac_cv_prog_MIG="${ac_tool_prefix}mig"
9123 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9124 break 2
9125 fi
9126done
9127done
9128
c906108c 9129fi
bec39cab
AC
9130fi
9131MIG=$ac_cv_prog_MIG
9132if test -n "$MIG"; then
b4e70030
JB
9133 echo "$as_me:$LINENO: result: $MIG" >&5
9134echo "${ECHO_T}$MIG" >&6
c906108c 9135else
b4e70030
JB
9136 echo "$as_me:$LINENO: result: no" >&5
9137echo "${ECHO_T}no" >&6
c906108c
SS
9138fi
9139
bec39cab
AC
9140fi
9141if test -z "$ac_cv_prog_MIG"; then
9142 ac_ct_MIG=$MIG
9143 # Extract the first word of "mig", so it can be a program name with args.
9144set dummy mig; ac_word=$2
b4e70030
JB
9145echo "$as_me:$LINENO: checking for $ac_word" >&5
9146echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9147if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then
9148 echo $ECHO_N "(cached) $ECHO_C" >&6
9149else
9150 if test -n "$ac_ct_MIG"; then
9151 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
9152else
9153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9154for as_dir in $PATH
9155do
9156 IFS=$as_save_IFS
9157 test -z "$as_dir" && as_dir=.
9158 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9159 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9160 ac_cv_prog_ac_ct_MIG="mig"
9161 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9162 break 2
9163 fi
9164done
9165done
c906108c 9166
bec39cab
AC
9167fi
9168fi
9169ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9170if test -n "$ac_ct_MIG"; then
b4e70030
JB
9171 echo "$as_me:$LINENO: result: $ac_ct_MIG" >&5
9172echo "${ECHO_T}$ac_ct_MIG" >&6
bec39cab 9173else
b4e70030
JB
9174 echo "$as_me:$LINENO: result: no" >&5
9175echo "${ECHO_T}no" >&6
bec39cab 9176fi
c906108c 9177
b4e70030 9178 MIG=$ac_ct_MIG
bec39cab
AC
9179else
9180 MIG="$ac_cv_prog_MIG"
9181fi
c906108c 9182
c906108c 9183
bec39cab
AC
9184# ---------------------- #
9185# Checks for libraries. #
9186# ---------------------- #
c906108c 9187
bec39cab 9188# We might need to link with -lm; most simulators need it.
c906108c 9189
b4e70030
JB
9190echo "$as_me:$LINENO: checking for main in -lm" >&5
9191echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
bec39cab
AC
9192if test "${ac_cv_lib_m_main+set}" = set; then
9193 echo $ECHO_N "(cached) $ECHO_C" >&6
9194else
9195 ac_check_lib_save_LIBS=$LIBS
9196LIBS="-lm $LIBS"
9197cat >conftest.$ac_ext <<_ACEOF
9198/* confdefs.h. */
9199_ACEOF
9200cat confdefs.h >>conftest.$ac_ext
9201cat >>conftest.$ac_ext <<_ACEOF
9202/* end confdefs.h. */
c906108c 9203
c906108c 9204
bec39cab
AC
9205int
9206main ()
9207{
b4e70030 9208main ();
bec39cab
AC
9209 ;
9210 return 0;
9211}
9212_ACEOF
9213rm -f conftest.$ac_objext conftest$ac_exeext
9214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9215 (eval $ac_link) 2>conftest.er1
9216 ac_status=$?
9217 grep -v '^ *+' conftest.er1 >conftest.err
9218 rm -f conftest.er1
9219 cat conftest.err >&5
9220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9221 (exit $ac_status); } &&
b4e70030
JB
9222 { ac_try='test -z "$ac_c_werror_flag"
9223 || test ! -s conftest.err'
bec39cab
AC
9224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9225 (eval $ac_try) 2>&5
9226 ac_status=$?
9227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9228 (exit $ac_status); }; } &&
9229 { ac_try='test -s conftest$ac_exeext'
9230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9231 (eval $ac_try) 2>&5
9232 ac_status=$?
9233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9234 (exit $ac_status); }; }; then
9235 ac_cv_lib_m_main=yes
9236else
9237 echo "$as_me: failed program was:" >&5
9238sed 's/^/| /' conftest.$ac_ext >&5
9239
b4e70030 9240ac_cv_lib_m_main=no
bec39cab
AC
9241fi
9242rm -f conftest.err conftest.$ac_objext \
9243 conftest$ac_exeext conftest.$ac_ext
9244LIBS=$ac_check_lib_save_LIBS
9245fi
b4e70030
JB
9246echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
9247echo "${ECHO_T}$ac_cv_lib_m_main" >&6
bec39cab
AC
9248if test $ac_cv_lib_m_main = yes; then
9249 cat >>confdefs.h <<_ACEOF
9250#define HAVE_LIBM 1
9251_ACEOF
9252
9253 LIBS="-lm $LIBS"
c906108c 9254
c906108c 9255fi
bec39cab
AC
9256
9257
9258# We need to link with -lw to get `wctype' on Solaris before Solaris
9259# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9260# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9261# is known to have this problem). Therefore we avoid libw if we can.
b4e70030
JB
9262echo "$as_me:$LINENO: checking for wctype" >&5
9263echo $ECHO_N "checking for wctype... $ECHO_C" >&6
bec39cab
AC
9264if test "${ac_cv_func_wctype+set}" = set; then
9265 echo $ECHO_N "(cached) $ECHO_C" >&6
9266else
9267 cat >conftest.$ac_ext <<_ACEOF
9268/* confdefs.h. */
9269_ACEOF
9270cat confdefs.h >>conftest.$ac_ext
9271cat >>conftest.$ac_ext <<_ACEOF
9272/* end confdefs.h. */
9273/* Define wctype to an innocuous variant, in case <limits.h> declares wctype.
9274 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9275#define wctype innocuous_wctype
9276
9277/* System header to define __stub macros and hopefully few prototypes,
9278 which can conflict with char wctype (); below.
9279 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9280 <limits.h> exists even on freestanding compilers. */
9281
9282#ifdef __STDC__
9283# include <limits.h>
9284#else
9285# include <assert.h>
9286#endif
9287
9288#undef wctype
9289
b4e70030 9290/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9291#ifdef __cplusplus
9292extern "C"
b4e70030 9293{
bec39cab 9294#endif
b4e70030
JB
9295/* We use char because int might match the return type of a gcc2
9296 builtin and then its argument prototype would still apply. */
bec39cab
AC
9297char wctype ();
9298/* The GNU C library defines this for functions which it implements
9299 to always fail with ENOSYS. Some functions are actually named
9300 something starting with __ and the normal name is an alias. */
b4e70030 9301#if defined (__stub_wctype) || defined (__stub___wctype)
bec39cab 9302choke me
b4e70030
JB
9303#else
9304char (*f) () = wctype;
9305#endif
9306#ifdef __cplusplus
9307}
bec39cab
AC
9308#endif
9309
9310int
9311main ()
9312{
b4e70030 9313return f != wctype;
bec39cab
AC
9314 ;
9315 return 0;
9316}
9317_ACEOF
9318rm -f conftest.$ac_objext conftest$ac_exeext
9319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9320 (eval $ac_link) 2>conftest.er1
9321 ac_status=$?
9322 grep -v '^ *+' conftest.er1 >conftest.err
9323 rm -f conftest.er1
9324 cat conftest.err >&5
9325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9326 (exit $ac_status); } &&
b4e70030
JB
9327 { ac_try='test -z "$ac_c_werror_flag"
9328 || test ! -s conftest.err'
bec39cab
AC
9329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9330 (eval $ac_try) 2>&5
9331 ac_status=$?
9332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9333 (exit $ac_status); }; } &&
9334 { ac_try='test -s conftest$ac_exeext'
9335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9336 (eval $ac_try) 2>&5
9337 ac_status=$?
9338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9339 (exit $ac_status); }; }; then
9340 ac_cv_func_wctype=yes
9341else
9342 echo "$as_me: failed program was:" >&5
9343sed 's/^/| /' conftest.$ac_ext >&5
9344
b4e70030 9345ac_cv_func_wctype=no
bec39cab
AC
9346fi
9347rm -f conftest.err conftest.$ac_objext \
9348 conftest$ac_exeext conftest.$ac_ext
9349fi
b4e70030
JB
9350echo "$as_me:$LINENO: result: $ac_cv_func_wctype" >&5
9351echo "${ECHO_T}$ac_cv_func_wctype" >&6
bec39cab
AC
9352if test $ac_cv_func_wctype = yes; then
9353 :
c906108c 9354else
c906108c 9355
b4e70030
JB
9356echo "$as_me:$LINENO: checking for wctype in -lw" >&5
9357echo $ECHO_N "checking for wctype in -lw... $ECHO_C" >&6
bec39cab
AC
9358if test "${ac_cv_lib_w_wctype+set}" = set; then
9359 echo $ECHO_N "(cached) $ECHO_C" >&6
9360else
9361 ac_check_lib_save_LIBS=$LIBS
9362LIBS="-lw $LIBS"
9363cat >conftest.$ac_ext <<_ACEOF
9364/* confdefs.h. */
9365_ACEOF
9366cat confdefs.h >>conftest.$ac_ext
9367cat >>conftest.$ac_ext <<_ACEOF
9368/* end confdefs.h. */
c906108c 9369
b4e70030 9370/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9371#ifdef __cplusplus
9372extern "C"
9373#endif
b4e70030
JB
9374/* We use char because int might match the return type of a gcc2
9375 builtin and then its argument prototype would still apply. */
bec39cab
AC
9376char wctype ();
9377int
9378main ()
9379{
b4e70030 9380wctype ();
bec39cab
AC
9381 ;
9382 return 0;
9383}
9384_ACEOF
9385rm -f conftest.$ac_objext conftest$ac_exeext
9386if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9387 (eval $ac_link) 2>conftest.er1
9388 ac_status=$?
9389 grep -v '^ *+' conftest.er1 >conftest.err
9390 rm -f conftest.er1
9391 cat conftest.err >&5
9392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9393 (exit $ac_status); } &&
b4e70030
JB
9394 { ac_try='test -z "$ac_c_werror_flag"
9395 || test ! -s conftest.err'
bec39cab
AC
9396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9397 (eval $ac_try) 2>&5
9398 ac_status=$?
9399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9400 (exit $ac_status); }; } &&
9401 { ac_try='test -s conftest$ac_exeext'
9402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9403 (eval $ac_try) 2>&5
9404 ac_status=$?
9405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9406 (exit $ac_status); }; }; then
9407 ac_cv_lib_w_wctype=yes
9408else
9409 echo "$as_me: failed program was:" >&5
9410sed 's/^/| /' conftest.$ac_ext >&5
9411
b4e70030 9412ac_cv_lib_w_wctype=no
bec39cab
AC
9413fi
9414rm -f conftest.err conftest.$ac_objext \
9415 conftest$ac_exeext conftest.$ac_ext
9416LIBS=$ac_check_lib_save_LIBS
9417fi
b4e70030
JB
9418echo "$as_me:$LINENO: result: $ac_cv_lib_w_wctype" >&5
9419echo "${ECHO_T}$ac_cv_lib_w_wctype" >&6
bec39cab
AC
9420if test $ac_cv_lib_w_wctype = yes; then
9421 cat >>confdefs.h <<_ACEOF
9422#define HAVE_LIBW 1
9423_ACEOF
c906108c 9424
bec39cab 9425 LIBS="-lw $LIBS"
c906108c 9426
bec39cab 9427fi
c906108c 9428
bec39cab 9429fi
c906108c 9430
ddc9cd0f 9431
bec39cab 9432# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
b4e70030
JB
9433echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
9434echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
bec39cab
AC
9435if test "${ac_cv_search_gethostbyname+set}" = set; then
9436 echo $ECHO_N "(cached) $ECHO_C" >&6
9437else
9438 ac_func_search_save_LIBS=$LIBS
b4e70030 9439ac_cv_search_gethostbyname=no
bec39cab
AC
9440cat >conftest.$ac_ext <<_ACEOF
9441/* confdefs.h. */
9442_ACEOF
9443cat confdefs.h >>conftest.$ac_ext
9444cat >>conftest.$ac_ext <<_ACEOF
9445/* end confdefs.h. */
ddc9cd0f 9446
b4e70030 9447/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9448#ifdef __cplusplus
9449extern "C"
9450#endif
b4e70030
JB
9451/* We use char because int might match the return type of a gcc2
9452 builtin and then its argument prototype would still apply. */
bec39cab
AC
9453char gethostbyname ();
9454int
9455main ()
9456{
b4e70030 9457gethostbyname ();
bec39cab
AC
9458 ;
9459 return 0;
9460}
9461_ACEOF
b4e70030 9462rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9463if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9464 (eval $ac_link) 2>conftest.er1
9465 ac_status=$?
9466 grep -v '^ *+' conftest.er1 >conftest.err
9467 rm -f conftest.er1
9468 cat conftest.err >&5
9469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9470 (exit $ac_status); } &&
b4e70030
JB
9471 { ac_try='test -z "$ac_c_werror_flag"
9472 || test ! -s conftest.err'
bec39cab
AC
9473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9474 (eval $ac_try) 2>&5
9475 ac_status=$?
9476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9477 (exit $ac_status); }; } &&
9478 { ac_try='test -s conftest$ac_exeext'
9479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9480 (eval $ac_try) 2>&5
9481 ac_status=$?
9482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9483 (exit $ac_status); }; }; then
b4e70030 9484 ac_cv_search_gethostbyname="none required"
bec39cab
AC
9485else
9486 echo "$as_me: failed program was:" >&5
9487sed 's/^/| /' conftest.$ac_ext >&5
ddc9cd0f 9488
bec39cab
AC
9489fi
9490rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
9491 conftest$ac_exeext conftest.$ac_ext
9492if test "$ac_cv_search_gethostbyname" = no; then
9493 for ac_lib in nsl; do
9494 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9495 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
9496/* confdefs.h. */
9497_ACEOF
9498cat confdefs.h >>conftest.$ac_ext
9499cat >>conftest.$ac_ext <<_ACEOF
9500/* end confdefs.h. */
ddc9cd0f 9501
b4e70030 9502/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9503#ifdef __cplusplus
9504extern "C"
9505#endif
b4e70030
JB
9506/* We use char because int might match the return type of a gcc2
9507 builtin and then its argument prototype would still apply. */
9508char gethostbyname ();
bec39cab
AC
9509int
9510main ()
9511{
b4e70030 9512gethostbyname ();
bec39cab
AC
9513 ;
9514 return 0;
9515}
9516_ACEOF
b4e70030 9517rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9518if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9519 (eval $ac_link) 2>conftest.er1
9520 ac_status=$?
9521 grep -v '^ *+' conftest.er1 >conftest.err
9522 rm -f conftest.er1
9523 cat conftest.err >&5
9524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9525 (exit $ac_status); } &&
b4e70030
JB
9526 { ac_try='test -z "$ac_c_werror_flag"
9527 || test ! -s conftest.err'
bec39cab
AC
9528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9529 (eval $ac_try) 2>&5
9530 ac_status=$?
9531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9532 (exit $ac_status); }; } &&
9533 { ac_try='test -s conftest$ac_exeext'
9534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9535 (eval $ac_try) 2>&5
9536 ac_status=$?
9537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9538 (exit $ac_status); }; }; then
b4e70030
JB
9539 ac_cv_search_gethostbyname="-l$ac_lib"
9540break
bec39cab
AC
9541else
9542 echo "$as_me: failed program was:" >&5
9543sed 's/^/| /' conftest.$ac_ext >&5
9544
9545fi
9546rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
9547 conftest$ac_exeext conftest.$ac_ext
9548 done
bec39cab
AC
9549fi
9550LIBS=$ac_func_search_save_LIBS
9551fi
b4e70030
JB
9552echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
9553echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
9554if test "$ac_cv_search_gethostbyname" != no; then
9555 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
96baa820 9556
bec39cab 9557fi
96baa820 9558
c906108c 9559
b4e70030
JB
9560# Some systems (e.g. Solaris) have `socketpair' in libsocket.
9561echo "$as_me:$LINENO: checking for library containing socketpair" >&5
9562echo $ECHO_N "checking for library containing socketpair... $ECHO_C" >&6
9563if test "${ac_cv_search_socketpair+set}" = set; then
9564 echo $ECHO_N "(cached) $ECHO_C" >&6
9565else
9566 ac_func_search_save_LIBS=$LIBS
9567ac_cv_search_socketpair=no
9568cat >conftest.$ac_ext <<_ACEOF
9569/* confdefs.h. */
9570_ACEOF
9571cat confdefs.h >>conftest.$ac_ext
9572cat >>conftest.$ac_ext <<_ACEOF
9573/* end confdefs.h. */
9574
9575/* Override any gcc2 internal prototype to avoid an error. */
9576#ifdef __cplusplus
9577extern "C"
9578#endif
9579/* We use char because int might match the return type of a gcc2
9580 builtin and then its argument prototype would still apply. */
9581char socketpair ();
9582int
9583main ()
9584{
9585socketpair ();
9586 ;
9587 return 0;
9588}
9589_ACEOF
9590rm -f conftest.$ac_objext conftest$ac_exeext
9591if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9592 (eval $ac_link) 2>conftest.er1
9593 ac_status=$?
9594 grep -v '^ *+' conftest.er1 >conftest.err
9595 rm -f conftest.er1
9596 cat conftest.err >&5
9597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9598 (exit $ac_status); } &&
9599 { ac_try='test -z "$ac_c_werror_flag"
9600 || test ! -s conftest.err'
9601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9602 (eval $ac_try) 2>&5
9603 ac_status=$?
9604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605 (exit $ac_status); }; } &&
9606 { ac_try='test -s conftest$ac_exeext'
9607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9608 (eval $ac_try) 2>&5
9609 ac_status=$?
9610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9611 (exit $ac_status); }; }; then
9612 ac_cv_search_socketpair="none required"
9613else
9614 echo "$as_me: failed program was:" >&5
9615sed 's/^/| /' conftest.$ac_ext >&5
9616
9617fi
9618rm -f conftest.err conftest.$ac_objext \
9619 conftest$ac_exeext conftest.$ac_ext
9620if test "$ac_cv_search_socketpair" = no; then
9621 for ac_lib in socket; do
9622 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9623 cat >conftest.$ac_ext <<_ACEOF
9624/* confdefs.h. */
9625_ACEOF
9626cat confdefs.h >>conftest.$ac_ext
9627cat >>conftest.$ac_ext <<_ACEOF
9628/* end confdefs.h. */
9629
9630/* Override any gcc2 internal prototype to avoid an error. */
9631#ifdef __cplusplus
9632extern "C"
9633#endif
9634/* We use char because int might match the return type of a gcc2
9635 builtin and then its argument prototype would still apply. */
9636char socketpair ();
9637int
9638main ()
9639{
9640socketpair ();
9641 ;
9642 return 0;
9643}
9644_ACEOF
9645rm -f conftest.$ac_objext conftest$ac_exeext
9646if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9647 (eval $ac_link) 2>conftest.er1
9648 ac_status=$?
9649 grep -v '^ *+' conftest.er1 >conftest.err
9650 rm -f conftest.er1
9651 cat conftest.err >&5
9652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9653 (exit $ac_status); } &&
9654 { ac_try='test -z "$ac_c_werror_flag"
9655 || test ! -s conftest.err'
9656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9657 (eval $ac_try) 2>&5
9658 ac_status=$?
9659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9660 (exit $ac_status); }; } &&
9661 { ac_try='test -s conftest$ac_exeext'
9662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9663 (eval $ac_try) 2>&5
9664 ac_status=$?
9665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9666 (exit $ac_status); }; }; then
9667 ac_cv_search_socketpair="-l$ac_lib"
9668break
9669else
9670 echo "$as_me: failed program was:" >&5
9671sed 's/^/| /' conftest.$ac_ext >&5
9672
9673fi
9674rm -f conftest.err conftest.$ac_objext \
9675 conftest$ac_exeext conftest.$ac_ext
9676 done
9677fi
9678LIBS=$ac_func_search_save_LIBS
9679fi
9680echo "$as_me:$LINENO: result: $ac_cv_search_socketpair" >&5
9681echo "${ECHO_T}$ac_cv_search_socketpair" >&6
9682if test "$ac_cv_search_socketpair" != no; then
9683 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
9684
9685fi
9686
9687
233a11ab
CS
9688# Link in zlib if we can. This allows us to read compressed debug sections.
9689echo "$as_me:$LINENO: checking for library containing zlibVersion" >&5
9690echo $ECHO_N "checking for library containing zlibVersion... $ECHO_C" >&6
9691if test "${ac_cv_search_zlibVersion+set}" = set; then
9692 echo $ECHO_N "(cached) $ECHO_C" >&6
9693else
9694 ac_func_search_save_LIBS=$LIBS
9695ac_cv_search_zlibVersion=no
9696cat >conftest.$ac_ext <<_ACEOF
9697/* confdefs.h. */
9698_ACEOF
9699cat confdefs.h >>conftest.$ac_ext
9700cat >>conftest.$ac_ext <<_ACEOF
9701/* end confdefs.h. */
9702
9703/* Override any gcc2 internal prototype to avoid an error. */
9704#ifdef __cplusplus
9705extern "C"
9706#endif
9707/* We use char because int might match the return type of a gcc2
9708 builtin and then its argument prototype would still apply. */
9709char zlibVersion ();
9710int
9711main ()
9712{
9713zlibVersion ();
9714 ;
9715 return 0;
9716}
9717_ACEOF
9718rm -f conftest.$ac_objext conftest$ac_exeext
9719if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9720 (eval $ac_link) 2>conftest.er1
9721 ac_status=$?
9722 grep -v '^ *+' conftest.er1 >conftest.err
9723 rm -f conftest.er1
9724 cat conftest.err >&5
9725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9726 (exit $ac_status); } &&
9727 { ac_try='test -z "$ac_c_werror_flag"
9728 || test ! -s conftest.err'
9729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9730 (eval $ac_try) 2>&5
9731 ac_status=$?
9732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9733 (exit $ac_status); }; } &&
9734 { ac_try='test -s conftest$ac_exeext'
9735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9736 (eval $ac_try) 2>&5
9737 ac_status=$?
9738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9739 (exit $ac_status); }; }; then
9740 ac_cv_search_zlibVersion="none required"
9741else
9742 echo "$as_me: failed program was:" >&5
9743sed 's/^/| /' conftest.$ac_ext >&5
9744
9745fi
9746rm -f conftest.err conftest.$ac_objext \
9747 conftest$ac_exeext conftest.$ac_ext
9748if test "$ac_cv_search_zlibVersion" = no; then
9749 for ac_lib in z; do
9750 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9751 cat >conftest.$ac_ext <<_ACEOF
9752/* confdefs.h. */
9753_ACEOF
9754cat confdefs.h >>conftest.$ac_ext
9755cat >>conftest.$ac_ext <<_ACEOF
9756/* end confdefs.h. */
9757
9758/* Override any gcc2 internal prototype to avoid an error. */
9759#ifdef __cplusplus
9760extern "C"
9761#endif
9762/* We use char because int might match the return type of a gcc2
9763 builtin and then its argument prototype would still apply. */
9764char zlibVersion ();
9765int
9766main ()
9767{
9768zlibVersion ();
9769 ;
9770 return 0;
9771}
9772_ACEOF
9773rm -f conftest.$ac_objext conftest$ac_exeext
9774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9775 (eval $ac_link) 2>conftest.er1
9776 ac_status=$?
9777 grep -v '^ *+' conftest.er1 >conftest.err
9778 rm -f conftest.er1
9779 cat conftest.err >&5
9780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9781 (exit $ac_status); } &&
9782 { ac_try='test -z "$ac_c_werror_flag"
9783 || test ! -s conftest.err'
9784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9785 (eval $ac_try) 2>&5
9786 ac_status=$?
9787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9788 (exit $ac_status); }; } &&
9789 { ac_try='test -s conftest$ac_exeext'
9790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9791 (eval $ac_try) 2>&5
9792 ac_status=$?
9793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9794 (exit $ac_status); }; }; then
9795 ac_cv_search_zlibVersion="-l$ac_lib"
9796break
9797else
9798 echo "$as_me: failed program was:" >&5
9799sed 's/^/| /' conftest.$ac_ext >&5
9800
9801fi
9802rm -f conftest.err conftest.$ac_objext \
9803 conftest$ac_exeext conftest.$ac_ext
9804 done
9805fi
9806LIBS=$ac_func_search_save_LIBS
9807fi
9808echo "$as_me:$LINENO: result: $ac_cv_search_zlibVersion" >&5
9809echo "${ECHO_T}$ac_cv_search_zlibVersion" >&6
9810if test "$ac_cv_search_zlibVersion" != no; then
9811 test "$ac_cv_search_zlibVersion" = "none required" || LIBS="$ac_cv_search_zlibVersion $LIBS"
9812
9813for ac_header in zlib.h
9814do
9815as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9816if eval "test \"\${$as_ac_Header+set}\" = set"; then
9817 echo "$as_me:$LINENO: checking for $ac_header" >&5
9818echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9819if eval "test \"\${$as_ac_Header+set}\" = set"; then
9820 echo $ECHO_N "(cached) $ECHO_C" >&6
9821fi
9822echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9823echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9824else
9825 # Is the header compilable?
9826echo "$as_me:$LINENO: checking $ac_header usability" >&5
9827echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9828cat >conftest.$ac_ext <<_ACEOF
9829/* confdefs.h. */
9830_ACEOF
9831cat confdefs.h >>conftest.$ac_ext
9832cat >>conftest.$ac_ext <<_ACEOF
9833/* end confdefs.h. */
9834$ac_includes_default
9835#include <$ac_header>
9836_ACEOF
9837rm -f conftest.$ac_objext
9838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9839 (eval $ac_compile) 2>conftest.er1
9840 ac_status=$?
9841 grep -v '^ *+' conftest.er1 >conftest.err
9842 rm -f conftest.er1
9843 cat conftest.err >&5
9844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9845 (exit $ac_status); } &&
9846 { ac_try='test -z "$ac_c_werror_flag"
9847 || test ! -s conftest.err'
9848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9849 (eval $ac_try) 2>&5
9850 ac_status=$?
9851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852 (exit $ac_status); }; } &&
9853 { ac_try='test -s conftest.$ac_objext'
9854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9855 (eval $ac_try) 2>&5
9856 ac_status=$?
9857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9858 (exit $ac_status); }; }; then
9859 ac_header_compiler=yes
9860else
9861 echo "$as_me: failed program was:" >&5
9862sed 's/^/| /' conftest.$ac_ext >&5
9863
9864ac_header_compiler=no
9865fi
9866rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9867echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9868echo "${ECHO_T}$ac_header_compiler" >&6
9869
9870# Is the header present?
9871echo "$as_me:$LINENO: checking $ac_header presence" >&5
9872echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9873cat >conftest.$ac_ext <<_ACEOF
9874/* confdefs.h. */
9875_ACEOF
9876cat confdefs.h >>conftest.$ac_ext
9877cat >>conftest.$ac_ext <<_ACEOF
9878/* end confdefs.h. */
9879#include <$ac_header>
9880_ACEOF
9881if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9882 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9883 ac_status=$?
9884 grep -v '^ *+' conftest.er1 >conftest.err
9885 rm -f conftest.er1
9886 cat conftest.err >&5
9887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9888 (exit $ac_status); } >/dev/null; then
9889 if test -s conftest.err; then
9890 ac_cpp_err=$ac_c_preproc_warn_flag
9891 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9892 else
9893 ac_cpp_err=
9894 fi
9895else
9896 ac_cpp_err=yes
9897fi
9898if test -z "$ac_cpp_err"; then
9899 ac_header_preproc=yes
9900else
9901 echo "$as_me: failed program was:" >&5
9902sed 's/^/| /' conftest.$ac_ext >&5
9903
9904 ac_header_preproc=no
9905fi
9906rm -f conftest.err conftest.$ac_ext
9907echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9908echo "${ECHO_T}$ac_header_preproc" >&6
9909
9910# So? What about this header?
9911case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9912 yes:no: )
9913 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9914echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9915 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9916echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9917 ac_header_preproc=yes
9918 ;;
9919 no:yes:* )
9920 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9921echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9922 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9923echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9924 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9925echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9926 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9927echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9928 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9929echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9930 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9931echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9932 (
9933 cat <<\_ASBOX
9934## ------------------------------------------ ##
9935## Report this to the AC_PACKAGE_NAME lists. ##
9936## ------------------------------------------ ##
9937_ASBOX
9938 ) |
9939 sed "s/^/$as_me: WARNING: /" >&2
9940 ;;
9941esac
9942echo "$as_me:$LINENO: checking for $ac_header" >&5
9943echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9944if eval "test \"\${$as_ac_Header+set}\" = set"; then
9945 echo $ECHO_N "(cached) $ECHO_C" >&6
9946else
9947 eval "$as_ac_Header=\$ac_header_preproc"
9948fi
9949echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9950echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9951
9952fi
9953if test `eval echo '${'$as_ac_Header'}'` = yes; then
9954 cat >>confdefs.h <<_ACEOF
9955#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9956_ACEOF
9957
9958fi
9959
9960done
9961
9962fi
9963
9964
77f120bf
JB
9965# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
9966echo "$as_me:$LINENO: checking for library containing dlgetmodinfo" >&5
9967echo $ECHO_N "checking for library containing dlgetmodinfo... $ECHO_C" >&6
9968if test "${ac_cv_search_dlgetmodinfo+set}" = set; then
bec39cab
AC
9969 echo $ECHO_N "(cached) $ECHO_C" >&6
9970else
9971 ac_func_search_save_LIBS=$LIBS
77f120bf 9972ac_cv_search_dlgetmodinfo=no
bec39cab
AC
9973cat >conftest.$ac_ext <<_ACEOF
9974/* confdefs.h. */
9975_ACEOF
9976cat confdefs.h >>conftest.$ac_ext
9977cat >>conftest.$ac_ext <<_ACEOF
9978/* end confdefs.h. */
c906108c 9979
b4e70030 9980/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9981#ifdef __cplusplus
9982extern "C"
9983#endif
b4e70030
JB
9984/* We use char because int might match the return type of a gcc2
9985 builtin and then its argument prototype would still apply. */
77f120bf 9986char dlgetmodinfo ();
bec39cab
AC
9987int
9988main ()
9989{
77f120bf 9990dlgetmodinfo ();
bec39cab
AC
9991 ;
9992 return 0;
9993}
9994_ACEOF
b4e70030 9995rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9997 (eval $ac_link) 2>conftest.er1
9998 ac_status=$?
9999 grep -v '^ *+' conftest.er1 >conftest.err
10000 rm -f conftest.er1
10001 cat conftest.err >&5
10002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10003 (exit $ac_status); } &&
b4e70030
JB
10004 { ac_try='test -z "$ac_c_werror_flag"
10005 || test ! -s conftest.err'
bec39cab
AC
10006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10007 (eval $ac_try) 2>&5
10008 ac_status=$?
10009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10010 (exit $ac_status); }; } &&
10011 { ac_try='test -s conftest$ac_exeext'
10012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10013 (eval $ac_try) 2>&5
10014 ac_status=$?
10015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10016 (exit $ac_status); }; }; then
77f120bf 10017 ac_cv_search_dlgetmodinfo="none required"
bec39cab
AC
10018else
10019 echo "$as_me: failed program was:" >&5
10020sed 's/^/| /' conftest.$ac_ext >&5
1ba607ad
AC
10021
10022fi
bec39cab 10023rm -f conftest.err conftest.$ac_objext \
b4e70030 10024 conftest$ac_exeext conftest.$ac_ext
77f120bf
JB
10025if test "$ac_cv_search_dlgetmodinfo" = no; then
10026 for ac_lib in dl xpdl; do
b4e70030
JB
10027 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10028 cat >conftest.$ac_ext <<_ACEOF
10029/* confdefs.h. */
10030_ACEOF
10031cat confdefs.h >>conftest.$ac_ext
10032cat >>conftest.$ac_ext <<_ACEOF
10033/* end confdefs.h. */
10034
10035/* Override any gcc2 internal prototype to avoid an error. */
10036#ifdef __cplusplus
10037extern "C"
10038#endif
10039/* We use char because int might match the return type of a gcc2
10040 builtin and then its argument prototype would still apply. */
77f120bf 10041char dlgetmodinfo ();
b4e70030
JB
10042int
10043main ()
10044{
77f120bf 10045dlgetmodinfo ();
b4e70030
JB
10046 ;
10047 return 0;
10048}
10049_ACEOF
10050rm -f conftest.$ac_objext conftest$ac_exeext
10051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10052 (eval $ac_link) 2>conftest.er1
10053 ac_status=$?
10054 grep -v '^ *+' conftest.er1 >conftest.err
10055 rm -f conftest.er1
10056 cat conftest.err >&5
10057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10058 (exit $ac_status); } &&
10059 { ac_try='test -z "$ac_c_werror_flag"
10060 || test ! -s conftest.err'
10061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10062 (eval $ac_try) 2>&5
10063 ac_status=$?
10064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10065 (exit $ac_status); }; } &&
10066 { ac_try='test -s conftest$ac_exeext'
10067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10068 (eval $ac_try) 2>&5
10069 ac_status=$?
10070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10071 (exit $ac_status); }; }; then
77f120bf 10072 ac_cv_search_dlgetmodinfo="-l$ac_lib"
b4e70030 10073break
4e8d927d 10074else
b4e70030
JB
10075 echo "$as_me: failed program was:" >&5
10076sed 's/^/| /' conftest.$ac_ext >&5
10077
10078fi
10079rm -f conftest.err conftest.$ac_objext \
10080 conftest$ac_exeext conftest.$ac_ext
10081 done
1ba607ad 10082fi
bec39cab
AC
10083LIBS=$ac_func_search_save_LIBS
10084fi
77f120bf
JB
10085echo "$as_me:$LINENO: result: $ac_cv_search_dlgetmodinfo" >&5
10086echo "${ECHO_T}$ac_cv_search_dlgetmodinfo" >&6
10087if test "$ac_cv_search_dlgetmodinfo" != no; then
10088 test "$ac_cv_search_dlgetmodinfo" = "none required" || LIBS="$ac_cv_search_dlgetmodinfo $LIBS"
c906108c 10089
8bb2c122 10090fi
8bb2c122 10091
8bb2c122 10092
77f120bf 10093
77f120bf 10094
6c7a06a3
TT
10095
10096# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10097if test "${with_libiconv_prefix+set}" = set; then
10098 withval="$with_libiconv_prefix"
10099
10100 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
10101 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
10102 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
10103 done
10104
10105fi;
10106
10107 BUILD_LIBICONV_LIBDIR="-L../libiconv/lib/.libs -L../libiconv/lib/_libs"
10108 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
10109
10110 echo "$as_me:$LINENO: checking for iconv" >&5
10111echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10112if test "${am_cv_func_iconv+set}" = set; then
d542061a
UW
10113 echo $ECHO_N "(cached) $ECHO_C" >&6
10114else
6c7a06a3
TT
10115
10116 am_cv_func_iconv="no, consider installing GNU libiconv"
10117 am_cv_lib_iconv=no
10118 am_cv_use_build_libiconv=no
4edb1e84
JB
10119
10120 # If libiconv is part of the build tree, then try using it over
10121 # any system iconv.
10122 if test -d ../libiconv; then
10123 am_save_LIBS="$LIBS"
10124 am_save_CPPFLAGS="$CPPFLAGS"
10125 LIBS="$LIBS $BUILD_LIBICONV_LIBDIR -liconv"
10126 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
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 10138iconv_t cd = iconv_open("","");
4edb1e84
JB
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
4edb1e84
JB
10167 am_cv_use_build_libiconv=yes
10168 am_cv_lib_iconv=yes
10169 am_cv_func_iconv=yes
d542061a
UW
10170else
10171 echo "$as_me: failed program was:" >&5
10172sed 's/^/| /' conftest.$ac_ext >&5
10173
10174fi
10175rm -f conftest.err conftest.$ac_objext \
10176 conftest$ac_exeext conftest.$ac_ext
4edb1e84
JB
10177 LIBS="$am_save_LIBS"
10178 CPPFLAGS="$am_save_CPPFLAGS"
10179 fi
94ae1714 10180
4edb1e84 10181 # Next, try to find iconv in libc.
6c7a06a3 10182 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 10183 cat >conftest.$ac_ext <<_ACEOF
d542061a
UW
10184/* confdefs.h. */
10185_ACEOF
10186cat confdefs.h >>conftest.$ac_ext
10187cat >>conftest.$ac_ext <<_ACEOF
10188/* end confdefs.h. */
6c7a06a3
TT
10189#include <stdlib.h>
10190#include <iconv.h>
d542061a
UW
10191int
10192main ()
10193{
6c7a06a3
TT
10194iconv_t cd = iconv_open("","");
10195 iconv(cd,NULL,NULL,NULL,NULL);
10196 iconv_close(cd);
d542061a
UW
10197 ;
10198 return 0;
10199}
10200_ACEOF
10201rm -f conftest.$ac_objext conftest$ac_exeext
10202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10203 (eval $ac_link) 2>conftest.er1
10204 ac_status=$?
10205 grep -v '^ *+' conftest.er1 >conftest.err
10206 rm -f conftest.er1
10207 cat conftest.err >&5
10208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10209 (exit $ac_status); } &&
10210 { ac_try='test -z "$ac_c_werror_flag"
10211 || test ! -s conftest.err'
10212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10213 (eval $ac_try) 2>&5
10214 ac_status=$?
10215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10216 (exit $ac_status); }; } &&
10217 { ac_try='test -s conftest$ac_exeext'
10218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10219 (eval $ac_try) 2>&5
10220 ac_status=$?
10221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10222 (exit $ac_status); }; }; then
4edb1e84 10223 am_cv_func_iconv=yes
d542061a
UW
10224else
10225 echo "$as_me: failed program was:" >&5
10226sed 's/^/| /' conftest.$ac_ext >&5
10227
10228fi
10229rm -f conftest.err conftest.$ac_objext \
10230 conftest$ac_exeext conftest.$ac_ext
77f120bf 10231 fi
94ae1714 10232
4edb1e84
JB
10233 # If iconv was not in libc, try -liconv. In this case, arrange to
10234 # look in the libiconv prefix, if it was specified by the user.
10235 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 10236 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
10237 am_save_LIBS="$LIBS"
10238 if test -n "$LIBICONV_INCLUDE"; then
10239 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10240 LIBS="$LIBS $LIBICONV_LIBDIR"
10241 fi
10242 LIBS="$LIBS -liconv"
6c7a06a3 10243 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
10244/* confdefs.h. */
10245_ACEOF
10246cat confdefs.h >>conftest.$ac_ext
10247cat >>conftest.$ac_ext <<_ACEOF
10248/* end confdefs.h. */
6c7a06a3
TT
10249#include <stdlib.h>
10250#include <iconv.h>
bec39cab
AC
10251int
10252main ()
10253{
6c7a06a3
TT
10254iconv_t cd = iconv_open("","");
10255 iconv(cd,NULL,NULL,NULL,NULL);
10256 iconv_close(cd);
bec39cab
AC
10257 ;
10258 return 0;
10259}
10260_ACEOF
b4e70030 10261rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
10262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10263 (eval $ac_link) 2>conftest.er1
10264 ac_status=$?
10265 grep -v '^ *+' conftest.er1 >conftest.err
10266 rm -f conftest.er1
10267 cat conftest.err >&5
10268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10269 (exit $ac_status); } &&
b4e70030
JB
10270 { ac_try='test -z "$ac_c_werror_flag"
10271 || test ! -s conftest.err'
bec39cab
AC
10272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10273 (eval $ac_try) 2>&5
10274 ac_status=$?
10275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10276 (exit $ac_status); }; } &&
10277 { ac_try='test -s conftest$ac_exeext'
10278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10279 (eval $ac_try) 2>&5
10280 ac_status=$?
10281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10282 (exit $ac_status); }; }; then
4edb1e84 10283 am_cv_lib_iconv=yes
6c7a06a3 10284 am_cv_func_iconv=yes
627af7ea 10285else
bec39cab
AC
10286 echo "$as_me: failed program was:" >&5
10287sed 's/^/| /' conftest.$ac_ext >&5
627af7ea 10288
627af7ea 10289fi
bec39cab 10290rm -f conftest.err conftest.$ac_objext \
b4e70030 10291 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10292 LIBS="$am_save_LIBS"
fc3b640d 10293 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
10294 fi
10295
10296fi
10297echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
10298echo "${ECHO_T}$am_cv_func_iconv" >&6
94ae1714
TT
10299
10300 # Set the various flags based on the cache variables. We can't rely
10301 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
10302 LIBICONV=
10303 if test "$am_cv_lib_iconv" = yes; then
10304 LIBICONV="-liconv"
94ae1714
TT
10305 else
10306 LIBICONV_LIBDIR=
10307 LIBICONV_INCLUDE=
fc3b640d
TT
10308 fi
10309 if test "$am_cv_use_build_libiconv" = yes; then
10310 LIBICONV_LIBDIR="$BUILD_LIBICONV_LIBDIR"
10311 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
10312 fi
10313 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10314 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 10315
6c7a06a3
TT
10316 if test "$am_cv_func_iconv" = yes; then
10317
10318cat >>confdefs.h <<\_ACEOF
10319#define HAVE_ICONV 1
10320_ACEOF
10321
10322 echo "$as_me:$LINENO: checking for iconv declaration" >&5
10323echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
10324 if test "${am_cv_proto_iconv+set}" = set; then
10325 echo $ECHO_N "(cached) $ECHO_C" >&6
10326else
10327
10328 cat >conftest.$ac_ext <<_ACEOF
b4e70030
JB
10329/* confdefs.h. */
10330_ACEOF
10331cat confdefs.h >>conftest.$ac_ext
10332cat >>conftest.$ac_ext <<_ACEOF
10333/* end confdefs.h. */
10334
6c7a06a3
TT
10335#include <stdlib.h>
10336#include <iconv.h>
10337extern
b4e70030 10338#ifdef __cplusplus
6c7a06a3 10339"C"
b4e70030 10340#endif
6c7a06a3
TT
10341#if defined(__STDC__) || defined(__cplusplus)
10342size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10343#else
10344size_t iconv();
10345#endif
10346
b4e70030
JB
10347int
10348main ()
10349{
6c7a06a3 10350
b4e70030
JB
10351 ;
10352 return 0;
10353}
10354_ACEOF
6c7a06a3
TT
10355rm -f conftest.$ac_objext
10356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10357 (eval $ac_compile) 2>conftest.er1
b4e70030
JB
10358 ac_status=$?
10359 grep -v '^ *+' conftest.er1 >conftest.err
10360 rm -f conftest.er1
10361 cat conftest.err >&5
10362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10363 (exit $ac_status); } &&
10364 { ac_try='test -z "$ac_c_werror_flag"
10365 || test ! -s conftest.err'
10366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10367 (eval $ac_try) 2>&5
10368 ac_status=$?
10369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10370 (exit $ac_status); }; } &&
6c7a06a3 10371 { ac_try='test -s conftest.$ac_objext'
b4e70030
JB
10372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10373 (eval $ac_try) 2>&5
10374 ac_status=$?
10375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10376 (exit $ac_status); }; }; then
6c7a06a3 10377 am_cv_proto_iconv_arg1=""
4e8d927d 10378else
b4e70030
JB
10379 echo "$as_me: failed program was:" >&5
10380sed 's/^/| /' conftest.$ac_ext >&5
10381
6c7a06a3 10382am_cv_proto_iconv_arg1="const"
b4e70030 10383fi
6c7a06a3
TT
10384rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10385 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);"
10386fi
10387
10388 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10389 echo "$as_me:$LINENO: result: ${ac_t:-
10390 }$am_cv_proto_iconv" >&5
10391echo "${ECHO_T}${ac_t:-
10392 }$am_cv_proto_iconv" >&6
10393
10394cat >>confdefs.h <<_ACEOF
10395#define ICONV_CONST $am_cv_proto_iconv_arg1
10396_ACEOF
10397
10398 fi
6c7a06a3
TT
10399
10400
10401# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
10402# There is a very specific comment in /usr/include/curses.h explaining that
10403# termcap routines built into libcurses must not be used.
10404#
10405# The symptoms we observed so far is GDB unexpectedly changing
10406# the terminal settings when tgetent is called - this is particularly
10407# visible as the output is missing carriage returns, and so rapidly
10408# becomes very hard to read.
10409#
10410# The readline configure script has already decided that libtermcap
10411# was enough for its purposes, and so decided to build readline using
10412# libtermcap. Since the TUI mode requires curses, building GDB with
10413# TUI enabled results in both libraries to be used at the same time,
10414# which is not allowed. This basically means that GDB with TUI is
10415# broken on alpha-osf.
10416
10417case $host_os in
10418 alpha*-*-osf* )
10419 if "$enable_tui" = "yes"; then
10420 { { echo "$as_me:$LINENO: error: Building GDB with TUI mode is not supported on this host" >&5
10421echo "$as_me: error: Building GDB with TUI mode is not supported on this host" >&2;}
10422 { (exit 1); exit 1; }; }
10423 fi
10424 if "$enable_tui" = "auto"; then
10425 enable_tui=no
10426 fi
10427 ;;
10428esac
10429
cb01cfba 10430# For the TUI, we need enhanced curses functionality.
bd8a8e1b 10431if test x"$enable_tui" != xno; then
cb01cfba
JB
10432 prefer_curses=yes
10433fi
10434
10435curses_found=no
10436if test x"$prefer_curses" = xyes; then
10437 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
10438 # curses library because the latter might not provide all the
10439 # functionality we need. However, this leads to problems on systems
10440 # where the linker searches /usr/local/lib, but the compiler doesn't
10441 # search /usr/local/include, if ncurses is installed in /usr/local. A
10442 # default installation of ncurses on alpha*-dec-osf* will lead to such
10443 # a situation.
10444 echo "$as_me:$LINENO: checking for library containing waddstr" >&5
6c7a06a3
TT
10445echo $ECHO_N "checking for library containing waddstr... $ECHO_C" >&6
10446if test "${ac_cv_search_waddstr+set}" = set; then
10447 echo $ECHO_N "(cached) $ECHO_C" >&6
10448else
10449 ac_func_search_save_LIBS=$LIBS
10450ac_cv_search_waddstr=no
10451cat >conftest.$ac_ext <<_ACEOF
10452/* confdefs.h. */
10453_ACEOF
10454cat confdefs.h >>conftest.$ac_ext
10455cat >>conftest.$ac_ext <<_ACEOF
10456/* end confdefs.h. */
10457
10458/* Override any gcc2 internal prototype to avoid an error. */
10459#ifdef __cplusplus
10460extern "C"
10461#endif
10462/* We use char because int might match the return type of a gcc2
10463 builtin and then its argument prototype would still apply. */
10464char waddstr ();
10465int
10466main ()
10467{
10468waddstr ();
10469 ;
10470 return 0;
10471}
10472_ACEOF
10473rm -f conftest.$ac_objext conftest$ac_exeext
10474if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10475 (eval $ac_link) 2>conftest.er1
10476 ac_status=$?
10477 grep -v '^ *+' conftest.er1 >conftest.err
10478 rm -f conftest.er1
10479 cat conftest.err >&5
10480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10481 (exit $ac_status); } &&
10482 { ac_try='test -z "$ac_c_werror_flag"
10483 || test ! -s conftest.err'
10484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10485 (eval $ac_try) 2>&5
10486 ac_status=$?
10487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10488 (exit $ac_status); }; } &&
10489 { ac_try='test -s conftest$ac_exeext'
10490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10491 (eval $ac_try) 2>&5
10492 ac_status=$?
10493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10494 (exit $ac_status); }; }; then
10495 ac_cv_search_waddstr="none required"
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
10503if test "$ac_cv_search_waddstr" = no; then
10504 for ac_lib in ncurses cursesX curses; do
10505 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10506 cat >conftest.$ac_ext <<_ACEOF
10507/* confdefs.h. */
10508_ACEOF
10509cat confdefs.h >>conftest.$ac_ext
10510cat >>conftest.$ac_ext <<_ACEOF
10511/* end confdefs.h. */
10512
10513/* Override any gcc2 internal prototype to avoid an error. */
10514#ifdef __cplusplus
10515extern "C"
10516#endif
10517/* We use char because int might match the return type of a gcc2
10518 builtin and then its argument prototype would still apply. */
10519char waddstr ();
10520int
10521main ()
10522{
10523waddstr ();
10524 ;
10525 return 0;
10526}
10527_ACEOF
10528rm -f conftest.$ac_objext conftest$ac_exeext
10529if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10530 (eval $ac_link) 2>conftest.er1
10531 ac_status=$?
10532 grep -v '^ *+' conftest.er1 >conftest.err
10533 rm -f conftest.er1
10534 cat conftest.err >&5
10535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10536 (exit $ac_status); } &&
10537 { ac_try='test -z "$ac_c_werror_flag"
10538 || test ! -s conftest.err'
10539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10540 (eval $ac_try) 2>&5
10541 ac_status=$?
10542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10543 (exit $ac_status); }; } &&
10544 { ac_try='test -s conftest$ac_exeext'
10545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10546 (eval $ac_try) 2>&5
10547 ac_status=$?
10548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10549 (exit $ac_status); }; }; then
10550 ac_cv_search_waddstr="-l$ac_lib"
10551break
10552else
10553 echo "$as_me: failed program was:" >&5
10554sed 's/^/| /' conftest.$ac_ext >&5
10555
10556fi
10557rm -f conftest.err conftest.$ac_objext \
10558 conftest$ac_exeext conftest.$ac_ext
10559 done
10560fi
10561LIBS=$ac_func_search_save_LIBS
10562fi
10563echo "$as_me:$LINENO: result: $ac_cv_search_waddstr" >&5
10564echo "${ECHO_T}$ac_cv_search_waddstr" >&6
10565if test "$ac_cv_search_waddstr" != no; then
10566 test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
10567
10568fi
10569
10570
cb01cfba
JB
10571 if test "$ac_cv_search_waddstr" != no; then
10572 curses_found=yes
10573 fi
10574fi
10575
10576# Check whether we should enable the TUI, but only do so if we really
10577# can.
10578if test x"$enable_tui" != xno; then
10579 if test -d $srcdir/tui; then
10580 if test "$curses_found" != no; then
6c7a06a3
TT
10581 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
10582 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
10583 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
10584 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
10585 CONFIG_ALL="${CONFIG_ALL} all-tui"
10586 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
10587 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
10588 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
10589 else
10590 if test x"$enable_tui" = xyes; then
10591 { { echo "$as_me:$LINENO: error: no enhanced curses library found; disable TUI" >&5
10592echo "$as_me: error: no enhanced curses library found; disable TUI" >&2;}
10593 { (exit 1); exit 1; }; }
10594 else
10595 { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
10596echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
10597 fi
10598 fi
10599 fi
10600fi
10601
10602# Since GDB uses Readline, we need termcap functionality. In many
10603# cases this will be provided by the curses library, but some systems
10604# have a seperate termcap library, or no curses library at all.
10605
10606case $host_os in
10607 cygwin*)
10608 if test -d $srcdir/libtermcap; then
10609 LIBS="../libtermcap/libtermcap.a $LIBS"
10610 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
10611 fi ;;
10612 go32* | *djgpp*)
10613 ac_cv_search_tgetent="none required"
10614 ;;
10615 *mingw32*)
10616 ac_cv_search_tgetent="none required"
10617 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
10618 ;;
10619esac
10620
10621# These are the libraries checked by Readline.
10622echo "$as_me:$LINENO: checking for library containing tgetent" >&5
10623echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6
10624if test "${ac_cv_search_tgetent+set}" = set; then
10625 echo $ECHO_N "(cached) $ECHO_C" >&6
10626else
10627 ac_func_search_save_LIBS=$LIBS
10628ac_cv_search_tgetent=no
10629cat >conftest.$ac_ext <<_ACEOF
10630/* confdefs.h. */
10631_ACEOF
10632cat confdefs.h >>conftest.$ac_ext
10633cat >>conftest.$ac_ext <<_ACEOF
10634/* end confdefs.h. */
10635
10636/* Override any gcc2 internal prototype to avoid an error. */
10637#ifdef __cplusplus
10638extern "C"
10639#endif
10640/* We use char because int might match the return type of a gcc2
10641 builtin and then its argument prototype would still apply. */
10642char tgetent ();
10643int
10644main ()
10645{
10646tgetent ();
10647 ;
10648 return 0;
10649}
10650_ACEOF
10651rm -f conftest.$ac_objext conftest$ac_exeext
10652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10653 (eval $ac_link) 2>conftest.er1
10654 ac_status=$?
10655 grep -v '^ *+' conftest.er1 >conftest.err
10656 rm -f conftest.er1
10657 cat conftest.err >&5
10658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10659 (exit $ac_status); } &&
10660 { ac_try='test -z "$ac_c_werror_flag"
10661 || test ! -s conftest.err'
10662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10663 (eval $ac_try) 2>&5
10664 ac_status=$?
10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666 (exit $ac_status); }; } &&
10667 { ac_try='test -s conftest$ac_exeext'
10668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10669 (eval $ac_try) 2>&5
10670 ac_status=$?
10671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10672 (exit $ac_status); }; }; then
10673 ac_cv_search_tgetent="none required"
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
10681if test "$ac_cv_search_tgetent" = no; then
10682 for ac_lib in termcap tinfo curses ncurses; do
10683 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10684 cat >conftest.$ac_ext <<_ACEOF
10685/* confdefs.h. */
10686_ACEOF
10687cat confdefs.h >>conftest.$ac_ext
10688cat >>conftest.$ac_ext <<_ACEOF
10689/* end confdefs.h. */
10690
10691/* Override any gcc2 internal prototype to avoid an error. */
10692#ifdef __cplusplus
10693extern "C"
10694#endif
10695/* We use char because int might match the return type of a gcc2
10696 builtin and then its argument prototype would still apply. */
10697char tgetent ();
10698int
10699main ()
10700{
10701tgetent ();
10702 ;
10703 return 0;
10704}
10705_ACEOF
10706rm -f conftest.$ac_objext conftest$ac_exeext
10707if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10708 (eval $ac_link) 2>conftest.er1
10709 ac_status=$?
10710 grep -v '^ *+' conftest.er1 >conftest.err
10711 rm -f conftest.er1
10712 cat conftest.err >&5
10713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10714 (exit $ac_status); } &&
10715 { ac_try='test -z "$ac_c_werror_flag"
10716 || test ! -s conftest.err'
10717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10718 (eval $ac_try) 2>&5
10719 ac_status=$?
10720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10721 (exit $ac_status); }; } &&
10722 { ac_try='test -s conftest$ac_exeext'
10723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10724 (eval $ac_try) 2>&5
10725 ac_status=$?
10726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10727 (exit $ac_status); }; }; then
10728 ac_cv_search_tgetent="-l$ac_lib"
10729break
10730else
10731 echo "$as_me: failed program was:" >&5
10732sed 's/^/| /' conftest.$ac_ext >&5
10733
10734fi
10735rm -f conftest.err conftest.$ac_objext \
10736 conftest$ac_exeext conftest.$ac_ext
10737 done
10738fi
10739LIBS=$ac_func_search_save_LIBS
10740fi
10741echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5
10742echo "${ECHO_T}$ac_cv_search_tgetent" >&6
10743if test "$ac_cv_search_tgetent" != no; then
10744 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
10745
06825bd1
MK
10746fi
10747
06825bd1 10748
bec39cab
AC
10749if test "$ac_cv_search_tgetent" = no; then
10750 { { echo "$as_me:$LINENO: error: no termcap library found" >&5
10751echo "$as_me: error: no termcap library found" >&2;}
10752 { (exit 1); exit 1; }; }
8ee53726
MK
10753fi
10754
3841debe 10755
6a30b0a5
AS
10756# Check whether --with-system-readline or --without-system-readline was given.
10757if test "${with_system_readline+set}" = set; then
10758 withval="$with_system_readline"
10759
10760fi;
10761
10762if test "$with_system_readline" = yes; then
10763 READLINE=-lreadline
10764 READLINE_DEPS=
10765 READLINE_CFLAGS=
10766else
10767 READLINE='$(READLINE_DIR)/libreadline.a'
10768 READLINE_DEPS='$(READLINE)'
10769 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
10770fi
10771
10772
10773
10774
10775
5c39566f
DJ
10776# Check whether --with-expat or --without-expat was given.
10777if test "${with_expat+set}" = set; then
10778 withval="$with_expat"
10779
10780else
10781 with_expat=auto
10782fi;
10783echo "$as_me:$LINENO: checking whether to use expat" >&5
10784echo $ECHO_N "checking whether to use expat... $ECHO_C" >&6
10785echo "$as_me:$LINENO: result: $with_expat" >&5
10786echo "${ECHO_T}$with_expat" >&6
10787
10788if test "${with_expat}" = no; then
10789 { echo "$as_me:$LINENO: WARNING: expat support disabled; some features may be unavailable." >&5
10790echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
10791 HAVE_LIBEXPAT=no
10792else
10793
3841debe
DJ
10794 if test "X$prefix" = "XNONE"; then
10795 acl_final_prefix="$ac_default_prefix"
10796 else
10797 acl_final_prefix="$prefix"
10798 fi
10799 if test "X$exec_prefix" = "XNONE"; then
10800 acl_final_exec_prefix='${prefix}'
10801 else
10802 acl_final_exec_prefix="$exec_prefix"
10803 fi
10804 acl_save_prefix="$prefix"
10805 prefix="$acl_final_prefix"
10806 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10807 prefix="$acl_save_prefix"
10808
10809
10810# Check whether --with-gnu-ld or --without-gnu-ld was given.
10811if test "${with_gnu_ld+set}" = set; then
10812 withval="$with_gnu_ld"
10813 test "$withval" = no || with_gnu_ld=yes
10814else
10815 with_gnu_ld=no
10816fi;
10817# Prepare PATH_SEPARATOR.
10818# The user is always right.
10819if test "${PATH_SEPARATOR+set}" != set; then
10820 echo "#! /bin/sh" >conf$$.sh
10821 echo "exit 0" >>conf$$.sh
10822 chmod +x conf$$.sh
10823 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10824 PATH_SEPARATOR=';'
10825 else
10826 PATH_SEPARATOR=:
10827 fi
10828 rm -f conf$$.sh
10829fi
10830ac_prog=ld
10831if test "$GCC" = yes; then
10832 # Check if gcc -print-prog-name=ld gives a path.
10833 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10834echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10835 case $host in
10836 *-*-mingw*)
10837 # gcc leaves a trailing carriage return which upsets mingw
10838 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10839 *)
10840 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10841 esac
10842 case $ac_prog in
10843 # Accept absolute paths.
10844 [\\/]* | [A-Za-z]:[\\/]*)
10845 re_direlt='/[^/][^/]*/\.\./'
10846 # Canonicalize the path of ld
10847 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10848 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10849 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10850 done
10851 test -z "$LD" && LD="$ac_prog"
10852 ;;
10853 "")
10854 # If it fails, then pretend we aren't using GCC.
10855 ac_prog=ld
10856 ;;
10857 *)
10858 # If it is relative, then search for the first ld in PATH.
10859 with_gnu_ld=unknown
10860 ;;
10861 esac
10862elif test "$with_gnu_ld" = yes; then
10863 echo "$as_me:$LINENO: checking for GNU ld" >&5
10864echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
10865else
10866 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10867echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
10868fi
10869if test "${acl_cv_path_LD+set}" = set; then
10870 echo $ECHO_N "(cached) $ECHO_C" >&6
10871else
10872 if test -z "$LD"; then
10873 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10874 for ac_dir in $PATH; do
10875 test -z "$ac_dir" && ac_dir=.
10876 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10877 acl_cv_path_LD="$ac_dir/$ac_prog"
10878 # Check to see if the program is GNU ld. I'd rather use --version,
10879 # but apparently some GNU ld's only accept -v.
10880 # Break only if it was the GNU/non-GNU ld that we prefer.
10881 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10882 test "$with_gnu_ld" != no && break
10883 else
10884 test "$with_gnu_ld" != yes && break
10885 fi
10886 fi
10887 done
10888 IFS="$ac_save_ifs"
10889else
10890 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10891fi
10892fi
10893
10894LD="$acl_cv_path_LD"
10895if test -n "$LD"; then
10896 echo "$as_me:$LINENO: result: $LD" >&5
10897echo "${ECHO_T}$LD" >&6
10898else
10899 echo "$as_me:$LINENO: result: no" >&5
10900echo "${ECHO_T}no" >&6
10901fi
10902test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10903echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10904 { (exit 1); exit 1; }; }
10905echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10906echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10907if test "${acl_cv_prog_gnu_ld+set}" = set; then
10908 echo $ECHO_N "(cached) $ECHO_C" >&6
10909else
10910 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10911if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10912 acl_cv_prog_gnu_ld=yes
10913else
10914 acl_cv_prog_gnu_ld=no
10915fi
10916fi
10917echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10918echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10919with_gnu_ld=$acl_cv_prog_gnu_ld
10920
10921
10922
10923 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10924echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10925if test "${acl_cv_rpath+set}" = set; then
10926 echo $ECHO_N "(cached) $ECHO_C" >&6
10927else
10928
10929 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10930 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10931 . ./conftest.sh
10932 rm -f ./conftest.sh
10933 acl_cv_rpath=done
10934
10935fi
10936echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10937echo "${ECHO_T}$acl_cv_rpath" >&6
10938 wl="$acl_cv_wl"
10939 libext="$acl_cv_libext"
10940 shlibext="$acl_cv_shlibext"
10941 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10942 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10943 hardcode_direct="$acl_cv_hardcode_direct"
10944 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10945 # Check whether --enable-rpath or --disable-rpath was given.
10946if test "${enable_rpath+set}" = set; then
10947 enableval="$enable_rpath"
10948 :
10949else
10950 enable_rpath=yes
10951fi;
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961 use_additional=yes
10962
10963 acl_save_prefix="$prefix"
10964 prefix="$acl_final_prefix"
10965 acl_save_exec_prefix="$exec_prefix"
10966 exec_prefix="$acl_final_exec_prefix"
10967
10968 eval additional_includedir=\"$includedir\"
10969 eval additional_libdir=\"$libdir\"
10970
10971 exec_prefix="$acl_save_exec_prefix"
10972 prefix="$acl_save_prefix"
10973
10974
10975# Check whether --with-libexpat-prefix or --without-libexpat-prefix was given.
10976if test "${with_libexpat_prefix+set}" = set; then
10977 withval="$with_libexpat_prefix"
10978
10979 if test "X$withval" = "Xno"; then
10980 use_additional=no
10981 else
10982 if test "X$withval" = "X"; then
10983
10984 acl_save_prefix="$prefix"
10985 prefix="$acl_final_prefix"
10986 acl_save_exec_prefix="$exec_prefix"
10987 exec_prefix="$acl_final_exec_prefix"
10988
10989 eval additional_includedir=\"$includedir\"
10990 eval additional_libdir=\"$libdir\"
10991
10992 exec_prefix="$acl_save_exec_prefix"
10993 prefix="$acl_save_prefix"
10994
10995 else
10996 additional_includedir="$withval/include"
10997 additional_libdir="$withval/lib"
10998 fi
10999 fi
11000
11001fi;
11002 LIBEXPAT=
11003 LTLIBEXPAT=
11004 INCEXPAT=
11005 rpathdirs=
11006 ltrpathdirs=
11007 names_already_handled=
11008 names_next_round='expat '
11009 while test -n "$names_next_round"; do
11010 names_this_round="$names_next_round"
11011 names_next_round=
11012 for name in $names_this_round; do
11013 already_handled=
11014 for n in $names_already_handled; do
11015 if test "$n" = "$name"; then
11016 already_handled=yes
11017 break
11018 fi
11019 done
11020 if test -z "$already_handled"; then
11021 names_already_handled="$names_already_handled $name"
11022 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11023 eval value=\"\$HAVE_LIB$uppername\"
11024 if test -n "$value"; then
11025 if test "$value" = yes; then
11026 eval value=\"\$LIB$uppername\"
11027 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
11028 eval value=\"\$LTLIB$uppername\"
11029 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
11030 else
11031 :
11032 fi
11033 else
11034 found_dir=
11035 found_la=
11036 found_so=
11037 found_a=
11038 if test $use_additional = yes; then
11039 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11040 found_dir="$additional_libdir"
11041 found_so="$additional_libdir/lib$name.$shlibext"
11042 if test -f "$additional_libdir/lib$name.la"; then
11043 found_la="$additional_libdir/lib$name.la"
11044 fi
11045 else
11046 if test -f "$additional_libdir/lib$name.$libext"; then
11047 found_dir="$additional_libdir"
11048 found_a="$additional_libdir/lib$name.$libext"
11049 if test -f "$additional_libdir/lib$name.la"; then
11050 found_la="$additional_libdir/lib$name.la"
11051 fi
11052 fi
11053 fi
11054 fi
11055 if test "X$found_dir" = "X"; then
11056 for x in $LDFLAGS $LTLIBEXPAT; do
11057
11058 acl_save_prefix="$prefix"
11059 prefix="$acl_final_prefix"
11060 acl_save_exec_prefix="$exec_prefix"
11061 exec_prefix="$acl_final_exec_prefix"
11062 eval x=\"$x\"
11063 exec_prefix="$acl_save_exec_prefix"
11064 prefix="$acl_save_prefix"
11065
11066 case "$x" in
11067 -L*)
11068 dir=`echo "X$x" | sed -e 's/^X-L//'`
11069 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11070 found_dir="$dir"
11071 found_so="$dir/lib$name.$shlibext"
11072 if test -f "$dir/lib$name.la"; then
11073 found_la="$dir/lib$name.la"
11074 fi
11075 else
11076 if test -f "$dir/lib$name.$libext"; then
11077 found_dir="$dir"
11078 found_a="$dir/lib$name.$libext"
11079 if test -f "$dir/lib$name.la"; then
11080 found_la="$dir/lib$name.la"
11081 fi
11082 fi
11083 fi
11084 ;;
11085 esac
11086 if test "X$found_dir" != "X"; then
11087 break
11088 fi
11089 done
11090 fi
11091 if test "X$found_dir" != "X"; then
11092 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
11093 if test "X$found_so" != "X"; then
11094 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11095 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11096 else
11097 haveit=
11098 for x in $ltrpathdirs; do
11099 if test "X$x" = "X$found_dir"; then
11100 haveit=yes
11101 break
11102 fi
11103 done
11104 if test -z "$haveit"; then
11105 ltrpathdirs="$ltrpathdirs $found_dir"
11106 fi
11107 if test "$hardcode_direct" = yes; then
11108 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11109 else
11110 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11111 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11112 haveit=
11113 for x in $rpathdirs; do
11114 if test "X$x" = "X$found_dir"; then
11115 haveit=yes
11116 break
11117 fi
11118 done
11119 if test -z "$haveit"; then
11120 rpathdirs="$rpathdirs $found_dir"
11121 fi
11122 else
11123 haveit=
11124 for x in $LDFLAGS $LIBEXPAT; do
11125
11126 acl_save_prefix="$prefix"
11127 prefix="$acl_final_prefix"
11128 acl_save_exec_prefix="$exec_prefix"
11129 exec_prefix="$acl_final_exec_prefix"
11130 eval x=\"$x\"
11131 exec_prefix="$acl_save_exec_prefix"
11132 prefix="$acl_save_prefix"
11133
11134 if test "X$x" = "X-L$found_dir"; then
11135 haveit=yes
11136 break
11137 fi
11138 done
11139 if test -z "$haveit"; then
11140 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
11141 fi
11142 if test "$hardcode_minus_L" != no; then
11143 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11144 else
11145 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11146 fi
11147 fi
11148 fi
11149 fi
11150 else
11151 if test "X$found_a" != "X"; then
11152 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
11153 else
11154 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
11155 fi
11156 fi
11157 additional_includedir=
11158 case "$found_dir" in
11159 */lib | */lib/)
11160 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11161 additional_includedir="$basedir/include"
11162 ;;
11163 esac
11164 if test "X$additional_includedir" != "X"; then
11165 if test "X$additional_includedir" != "X/usr/include"; then
11166 haveit=
11167 if test "X$additional_includedir" = "X/usr/local/include"; then
11168 if test -n "$GCC"; then
11169 case $host_os in
11170 linux*) haveit=yes;;
11171 esac
11172 fi
11173 fi
11174 if test -z "$haveit"; then
11175 for x in $CPPFLAGS $INCEXPAT; do
11176
11177 acl_save_prefix="$prefix"
11178 prefix="$acl_final_prefix"
11179 acl_save_exec_prefix="$exec_prefix"
11180 exec_prefix="$acl_final_exec_prefix"
11181 eval x=\"$x\"
11182 exec_prefix="$acl_save_exec_prefix"
11183 prefix="$acl_save_prefix"
11184
11185 if test "X$x" = "X-I$additional_includedir"; then
11186 haveit=yes
11187 break
11188 fi
11189 done
11190 if test -z "$haveit"; then
11191 if test -d "$additional_includedir"; then
11192 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
11193 fi
11194 fi
11195 fi
11196 fi
11197 fi
11198 if test -n "$found_la"; then
11199 save_libdir="$libdir"
11200 case "$found_la" in
11201 */* | *\\*) . "$found_la" ;;
11202 *) . "./$found_la" ;;
11203 esac
11204 libdir="$save_libdir"
11205 for dep in $dependency_libs; do
11206 case "$dep" in
11207 -L*)
11208 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11209 if test "X$additional_libdir" != "X/usr/lib"; then
11210 haveit=
11211 if test "X$additional_libdir" = "X/usr/local/lib"; then
11212 if test -n "$GCC"; then
11213 case $host_os in
11214 linux*) haveit=yes;;
11215 esac
11216 fi
11217 fi
11218 if test -z "$haveit"; then
11219 haveit=
11220 for x in $LDFLAGS $LIBEXPAT; do
11221
11222 acl_save_prefix="$prefix"
11223 prefix="$acl_final_prefix"
11224 acl_save_exec_prefix="$exec_prefix"
11225 exec_prefix="$acl_final_exec_prefix"
11226 eval x=\"$x\"
11227 exec_prefix="$acl_save_exec_prefix"
11228 prefix="$acl_save_prefix"
11229
11230 if test "X$x" = "X-L$additional_libdir"; then
11231 haveit=yes
11232 break
11233 fi
11234 done
11235 if test -z "$haveit"; then
11236 if test -d "$additional_libdir"; then
11237 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
11238 fi
11239 fi
11240 haveit=
11241 for x in $LDFLAGS $LTLIBEXPAT; do
11242
11243 acl_save_prefix="$prefix"
11244 prefix="$acl_final_prefix"
11245 acl_save_exec_prefix="$exec_prefix"
11246 exec_prefix="$acl_final_exec_prefix"
11247 eval x=\"$x\"
11248 exec_prefix="$acl_save_exec_prefix"
11249 prefix="$acl_save_prefix"
11250
11251 if test "X$x" = "X-L$additional_libdir"; then
11252 haveit=yes
11253 break
11254 fi
11255 done
11256 if test -z "$haveit"; then
11257 if test -d "$additional_libdir"; then
11258 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
11259 fi
11260 fi
11261 fi
11262 fi
11263 ;;
11264 -R*)
11265 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11266 if test "$enable_rpath" != no; then
11267 haveit=
11268 for x in $rpathdirs; do
11269 if test "X$x" = "X$dir"; then
11270 haveit=yes
11271 break
11272 fi
11273 done
11274 if test -z "$haveit"; then
11275 rpathdirs="$rpathdirs $dir"
11276 fi
11277 haveit=
11278 for x in $ltrpathdirs; do
11279 if test "X$x" = "X$dir"; then
11280 haveit=yes
11281 break
11282 fi
11283 done
11284 if test -z "$haveit"; then
11285 ltrpathdirs="$ltrpathdirs $dir"
11286 fi
11287 fi
11288 ;;
11289 -l*)
11290 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11291 ;;
11292 *.la)
11293 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11294 ;;
11295 *)
11296 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
11297 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
11298 ;;
11299 esac
11300 done
11301 fi
11302 else
11303 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11304 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
11305 fi
11306 fi
11307 fi
11308 done
11309 done
11310 if test "X$rpathdirs" != "X"; then
11311 if test -n "$hardcode_libdir_separator"; then
11312 alldirs=
11313 for found_dir in $rpathdirs; do
11314 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11315 done
11316 acl_save_libdir="$libdir"
11317 libdir="$alldirs"
11318 eval flag=\"$hardcode_libdir_flag_spec\"
11319 libdir="$acl_save_libdir"
11320 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
11321 else
11322 for found_dir in $rpathdirs; do
11323 acl_save_libdir="$libdir"
11324 libdir="$found_dir"
11325 eval flag=\"$hardcode_libdir_flag_spec\"
11326 libdir="$acl_save_libdir"
11327 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
11328 done
11329 fi
11330 fi
11331 if test "X$ltrpathdirs" != "X"; then
11332 for found_dir in $ltrpathdirs; do
11333 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
11334 done
11335 fi
11336
11337
11338 ac_save_CPPFLAGS="$CPPFLAGS"
11339
11340 for element in $INCEXPAT; do
11341 haveit=
11342 for x in $CPPFLAGS; do
11343
11344 acl_save_prefix="$prefix"
11345 prefix="$acl_final_prefix"
11346 acl_save_exec_prefix="$exec_prefix"
11347 exec_prefix="$acl_final_exec_prefix"
11348 eval x=\"$x\"
11349 exec_prefix="$acl_save_exec_prefix"
11350 prefix="$acl_save_prefix"
11351
11352 if test "X$x" = "X$element"; then
11353 haveit=yes
11354 break
11355 fi
11356 done
11357 if test -z "$haveit"; then
11358 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11359 fi
11360 done
11361
11362
11363 echo "$as_me:$LINENO: checking for libexpat" >&5
11364echo $ECHO_N "checking for libexpat... $ECHO_C" >&6
11365if test "${ac_cv_libexpat+set}" = set; then
11366 echo $ECHO_N "(cached) $ECHO_C" >&6
11367else
11368
11369 ac_save_LIBS="$LIBS"
11370 LIBS="$LIBS $LIBEXPAT"
11371 cat >conftest.$ac_ext <<_ACEOF
11372/* confdefs.h. */
11373_ACEOF
11374cat confdefs.h >>conftest.$ac_ext
11375cat >>conftest.$ac_ext <<_ACEOF
11376/* end confdefs.h. */
11377#include "expat.h"
11378int
11379main ()
11380{
11381XML_Parser p = XML_ParserCreate (0);
11382 ;
11383 return 0;
11384}
11385_ACEOF
11386rm -f conftest.$ac_objext conftest$ac_exeext
11387if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11388 (eval $ac_link) 2>conftest.er1
11389 ac_status=$?
11390 grep -v '^ *+' conftest.er1 >conftest.err
11391 rm -f conftest.er1
11392 cat conftest.err >&5
11393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11394 (exit $ac_status); } &&
11395 { ac_try='test -z "$ac_c_werror_flag"
11396 || test ! -s conftest.err'
11397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11398 (eval $ac_try) 2>&5
11399 ac_status=$?
11400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11401 (exit $ac_status); }; } &&
11402 { ac_try='test -s conftest$ac_exeext'
11403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11404 (eval $ac_try) 2>&5
11405 ac_status=$?
11406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11407 (exit $ac_status); }; }; then
11408 ac_cv_libexpat=yes
11409else
11410 echo "$as_me: failed program was:" >&5
11411sed 's/^/| /' conftest.$ac_ext >&5
11412
11413ac_cv_libexpat=no
11414fi
11415rm -f conftest.err conftest.$ac_objext \
11416 conftest$ac_exeext conftest.$ac_ext
11417 LIBS="$ac_save_LIBS"
11418
11419fi
11420echo "$as_me:$LINENO: result: $ac_cv_libexpat" >&5
11421echo "${ECHO_T}$ac_cv_libexpat" >&6
11422 if test "$ac_cv_libexpat" = yes; then
11423 HAVE_LIBEXPAT=yes
11424
11425cat >>confdefs.h <<\_ACEOF
11426#define HAVE_LIBEXPAT 1
11427_ACEOF
11428
11429 echo "$as_me:$LINENO: checking how to link with libexpat" >&5
11430echo $ECHO_N "checking how to link with libexpat... $ECHO_C" >&6
11431 echo "$as_me:$LINENO: result: $LIBEXPAT" >&5
11432echo "${ECHO_T}$LIBEXPAT" >&6
11433 else
11434 HAVE_LIBEXPAT=no
11435 CPPFLAGS="$ac_save_CPPFLAGS"
11436 LIBEXPAT=
11437 LTLIBEXPAT=
11438 fi
11439
11440
11441
11442
11443
11444
5c39566f
DJ
11445 if test "$HAVE_LIBEXPAT" != yes; then
11446 if test "$with_expat" = yes; then
11447 { { echo "$as_me:$LINENO: error: expat is missing or unusable" >&5
11448echo "$as_me: error: expat is missing or unusable" >&2;}
11449 { (exit 1); exit 1; }; }
11450 else
11451 { echo "$as_me:$LINENO: WARNING: expat is missing or unusable; some features may be unavailable." >&5
11452echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
11453 fi
11454 else
11455 save_LIBS=$LIBS
11456 LIBS="$LIBS $LIBEXPAT"
ca4ca11e
DJ
11457
11458for ac_func in XML_StopParser
11459do
11460as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11461echo "$as_me:$LINENO: checking for $ac_func" >&5
11462echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11463if eval "test \"\${$as_ac_var+set}\" = set"; then
11464 echo $ECHO_N "(cached) $ECHO_C" >&6
11465else
11466 cat >conftest.$ac_ext <<_ACEOF
11467/* confdefs.h. */
11468_ACEOF
11469cat confdefs.h >>conftest.$ac_ext
11470cat >>conftest.$ac_ext <<_ACEOF
11471/* end confdefs.h. */
11472/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11473 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11474#define $ac_func innocuous_$ac_func
11475
11476/* System header to define __stub macros and hopefully few prototypes,
11477 which can conflict with char $ac_func (); below.
11478 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11479 <limits.h> exists even on freestanding compilers. */
11480
11481#ifdef __STDC__
11482# include <limits.h>
11483#else
11484# include <assert.h>
11485#endif
11486
11487#undef $ac_func
11488
11489/* Override any gcc2 internal prototype to avoid an error. */
11490#ifdef __cplusplus
11491extern "C"
11492{
11493#endif
11494/* We use char because int might match the return type of a gcc2
11495 builtin and then its argument prototype would still apply. */
11496char $ac_func ();
11497/* The GNU C library defines this for functions which it implements
11498 to always fail with ENOSYS. Some functions are actually named
11499 something starting with __ and the normal name is an alias. */
11500#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11501choke me
11502#else
11503char (*f) () = $ac_func;
11504#endif
11505#ifdef __cplusplus
11506}
11507#endif
11508
11509int
11510main ()
11511{
11512return f != $ac_func;
11513 ;
11514 return 0;
11515}
11516_ACEOF
11517rm -f conftest.$ac_objext conftest$ac_exeext
11518if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11519 (eval $ac_link) 2>conftest.er1
11520 ac_status=$?
11521 grep -v '^ *+' conftest.er1 >conftest.err
11522 rm -f conftest.er1
11523 cat conftest.err >&5
11524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11525 (exit $ac_status); } &&
11526 { ac_try='test -z "$ac_c_werror_flag"
11527 || test ! -s conftest.err'
11528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11529 (eval $ac_try) 2>&5
11530 ac_status=$?
11531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11532 (exit $ac_status); }; } &&
11533 { ac_try='test -s conftest$ac_exeext'
11534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11535 (eval $ac_try) 2>&5
11536 ac_status=$?
11537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11538 (exit $ac_status); }; }; then
11539 eval "$as_ac_var=yes"
11540else
11541 echo "$as_me: failed program was:" >&5
11542sed 's/^/| /' conftest.$ac_ext >&5
11543
11544eval "$as_ac_var=no"
11545fi
11546rm -f conftest.err conftest.$ac_objext \
11547 conftest$ac_exeext conftest.$ac_ext
11548fi
11549echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11550echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11551if test `eval echo '${'$as_ac_var'}'` = yes; then
11552 cat >>confdefs.h <<_ACEOF
11553#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11554_ACEOF
11555
11556fi
11557done
11558
5c39566f
DJ
11559 LIBS=$save_LIBS
11560 fi
3841debe
DJ
11561fi
11562
d57a3c85
TJB
11563
11564
11565
11566# Check whether --with-python or --without-python was given.
11567if test "${with_python+set}" = set; then
11568 withval="$with_python"
11569
11570else
11571 with_python=auto
11572fi;
11573echo "$as_me:$LINENO: checking whether to use python" >&5
11574echo $ECHO_N "checking whether to use python... $ECHO_C" >&6
11575echo "$as_me:$LINENO: result: $with_python" >&5
11576echo "${ECHO_T}$with_python" >&6
11577
11578if test "${with_python}" = no; then
11579 { echo "$as_me:$LINENO: WARNING: python support disabled; some features may be unavailable." >&5
11580echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11581 have_libpython=no
11582else
11583 case "${with_python}" in
11584 yes | auto)
11585 # Leave as empty, use defaults.
11586 python_includes=
11587 python_libs=
11588 ;;
11589 /*)
11590 python_includes="-I${with_python}/include"
11591 python_libs="-L${with_python}/lib"
11592 ;;
11593 *)
11594 { { echo "$as_me:$LINENO: error: invalid value for --with-python" >&5
11595echo "$as_me: error: invalid value for --with-python" >&2;}
11596 { (exit 1); exit 1; }; }
11597 ;;
11598 esac
11599
11600 save_CPPFLAGS=$CPPFLAGS
11601 CPPFLAGS="$CPPFLAGS ${python_includes}"
11602 save_LIBS=$LIBS
11603 LIBS="$LIBS ${python_libs}"
11604 have_libpython=no
11605 if test "${have_libpython}" = no; then
11606
11607 version=python2.6
11608
11609
11610 HAVE_LIBPYTHON2_6=no
11611 echo "$as_me:$LINENO: checking for ${version}" >&5
11612echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11613 save_LIBS=$LIBS
11614 LIBS="$LIBS -l${version}"
11615 cat >conftest.$ac_ext <<_ACEOF
11616/* confdefs.h. */
11617_ACEOF
11618cat confdefs.h >>conftest.$ac_ext
11619cat >>conftest.$ac_ext <<_ACEOF
11620/* end confdefs.h. */
11621#include "${version}/Python.h"
11622int
11623main ()
11624{
11625Py_Initialize ();
11626 ;
11627 return 0;
11628}
11629_ACEOF
11630rm -f conftest.$ac_objext conftest$ac_exeext
11631if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11632 (eval $ac_link) 2>conftest.er1
11633 ac_status=$?
11634 grep -v '^ *+' conftest.er1 >conftest.err
11635 rm -f conftest.er1
11636 cat conftest.err >&5
11637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11638 (exit $ac_status); } &&
11639 { ac_try='test -z "$ac_c_werror_flag"
11640 || test ! -s conftest.err'
11641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11642 (eval $ac_try) 2>&5
11643 ac_status=$?
11644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11645 (exit $ac_status); }; } &&
11646 { ac_try='test -s conftest$ac_exeext'
11647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11648 (eval $ac_try) 2>&5
11649 ac_status=$?
11650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11651 (exit $ac_status); }; }; then
11652 HAVE_LIBPYTHON2_6=yes
11653 have_libpython=yes
11654else
11655 echo "$as_me: failed program was:" >&5
11656sed 's/^/| /' conftest.$ac_ext >&5
11657
11658LIBS=$save_LIBS
11659fi
11660rm -f conftest.err conftest.$ac_objext \
11661 conftest$ac_exeext conftest.$ac_ext
11662 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_6" >&5
11663echo "${ECHO_T}$HAVE_LIBPYTHON2_6" >&6
11664
11665 if test "${HAVE_LIBPYTHON2_6}" = yes; then
11666
11667cat >>confdefs.h <<\_ACEOF
11668#define HAVE_LIBPYTHON2_6 1
11669_ACEOF
11670
11671 fi
11672 fi
11673 if test ${have_libpython} = no; then
11674
11675 version=python2.5
11676
11677
11678 HAVE_LIBPYTHON2_5=no
11679 echo "$as_me:$LINENO: checking for ${version}" >&5
11680echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11681 save_LIBS=$LIBS
11682 LIBS="$LIBS -l${version}"
11683 cat >conftest.$ac_ext <<_ACEOF
11684/* confdefs.h. */
11685_ACEOF
11686cat confdefs.h >>conftest.$ac_ext
11687cat >>conftest.$ac_ext <<_ACEOF
11688/* end confdefs.h. */
11689#include "${version}/Python.h"
11690int
11691main ()
11692{
11693Py_Initialize ();
11694 ;
11695 return 0;
11696}
11697_ACEOF
11698rm -f conftest.$ac_objext conftest$ac_exeext
11699if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11700 (eval $ac_link) 2>conftest.er1
11701 ac_status=$?
11702 grep -v '^ *+' conftest.er1 >conftest.err
11703 rm -f conftest.er1
11704 cat conftest.err >&5
11705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11706 (exit $ac_status); } &&
11707 { ac_try='test -z "$ac_c_werror_flag"
11708 || test ! -s conftest.err'
11709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11710 (eval $ac_try) 2>&5
11711 ac_status=$?
11712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11713 (exit $ac_status); }; } &&
11714 { ac_try='test -s conftest$ac_exeext'
11715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11716 (eval $ac_try) 2>&5
11717 ac_status=$?
11718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11719 (exit $ac_status); }; }; then
11720 HAVE_LIBPYTHON2_5=yes
11721 have_libpython=yes
11722else
11723 echo "$as_me: failed program was:" >&5
11724sed 's/^/| /' conftest.$ac_ext >&5
11725
11726LIBS=$save_LIBS
11727fi
11728rm -f conftest.err conftest.$ac_objext \
11729 conftest$ac_exeext conftest.$ac_ext
11730 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_5" >&5
11731echo "${ECHO_T}$HAVE_LIBPYTHON2_5" >&6
11732
11733 if test "${HAVE_LIBPYTHON2_5}" = yes; then
11734
11735cat >>confdefs.h <<\_ACEOF
11736#define HAVE_LIBPYTHON2_5 1
11737_ACEOF
11738
11739 fi
11740 fi
11741 if test ${have_libpython} = no; then
11742
11743 version=python2.4
11744
11745
11746 HAVE_LIBPYTHON2_4=no
11747 echo "$as_me:$LINENO: checking for ${version}" >&5
11748echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11749 save_LIBS=$LIBS
11750 LIBS="$LIBS -l${version}"
11751 cat >conftest.$ac_ext <<_ACEOF
11752/* confdefs.h. */
11753_ACEOF
11754cat confdefs.h >>conftest.$ac_ext
11755cat >>conftest.$ac_ext <<_ACEOF
11756/* end confdefs.h. */
11757#include "${version}/Python.h"
11758int
11759main ()
11760{
11761Py_Initialize ();
11762 ;
11763 return 0;
11764}
11765_ACEOF
11766rm -f conftest.$ac_objext conftest$ac_exeext
11767if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11768 (eval $ac_link) 2>conftest.er1
11769 ac_status=$?
11770 grep -v '^ *+' conftest.er1 >conftest.err
11771 rm -f conftest.er1
11772 cat conftest.err >&5
11773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11774 (exit $ac_status); } &&
11775 { ac_try='test -z "$ac_c_werror_flag"
11776 || test ! -s conftest.err'
11777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11778 (eval $ac_try) 2>&5
11779 ac_status=$?
11780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11781 (exit $ac_status); }; } &&
11782 { ac_try='test -s conftest$ac_exeext'
11783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11784 (eval $ac_try) 2>&5
11785 ac_status=$?
11786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11787 (exit $ac_status); }; }; then
11788 HAVE_LIBPYTHON2_4=yes
11789 have_libpython=yes
11790else
11791 echo "$as_me: failed program was:" >&5
11792sed 's/^/| /' conftest.$ac_ext >&5
11793
11794LIBS=$save_LIBS
11795fi
11796rm -f conftest.err conftest.$ac_objext \
11797 conftest$ac_exeext conftest.$ac_ext
11798 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_4" >&5
11799echo "${ECHO_T}$HAVE_LIBPYTHON2_4" >&6
11800
11801 if test "${HAVE_LIBPYTHON2_4}" = yes; then
11802
11803cat >>confdefs.h <<\_ACEOF
11804#define HAVE_LIBPYTHON2_4 1
11805_ACEOF
11806
11807 fi
11808 fi
11809 if test ${have_libpython} = no; then
11810 case "${with_python}" in
11811 yes)
11812 { { echo "$as_me:$LINENO: error: python is missing or unusable" >&5
11813echo "$as_me: error: python is missing or unusable" >&2;}
11814 { (exit 1); exit 1; }; }
11815 ;;
11816 auto)
11817 { echo "$as_me:$LINENO: WARNING: python is missing or unusable; some features may be unavailable." >&5
11818echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11819 ;;
11820 *)
11821 { { echo "$as_me:$LINENO: error: no usable python found at ${with_python}" >&5
11822echo "$as_me: error: no usable python found at ${with_python}" >&2;}
11823 { (exit 1); exit 1; }; }
11824 ;;
11825 esac
11826 CPPFLAGS=$save_CPPFLAGS
11827 LIBS=$save_LIBS
11828 fi
11829fi
11830
11831if test "${have_libpython}" = yes; then
11832
11833cat >>confdefs.h <<\_ACEOF
11834#define HAVE_PYTHON 1
11835_ACEOF
11836
11837 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11838 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11839 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11840 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11841
11842 # Flags needed to compile Python code (taken from python-config --cflags).
11843 # We cannot call python-config directly because it will output whatever was
11844 # used when compiling the Python interpreter itself, including flags which
11845 # would make the python-related objects be compiled differently from the
11846 # rest of GDB (e.g., -O2 and -fPIC).
11847 if test "${GCC}" = yes; then
11848 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11849 fi
11850
11851 if test "x${tentative_python_cflags}" != x; then
11852 echo "$as_me:$LINENO: checking compiler flags for python code" >&5
11853echo $ECHO_N "checking compiler flags for python code... $ECHO_C" >&6
11854 for flag in ${tentative_python_cflags}; do
11855 # Check that the compiler accepts it
11856 saved_CFLAGS="$CFLAGS"
11857 CFLAGS="$CFLAGS $flag"
11858 cat >conftest.$ac_ext <<_ACEOF
11859/* confdefs.h. */
11860_ACEOF
11861cat confdefs.h >>conftest.$ac_ext
11862cat >>conftest.$ac_ext <<_ACEOF
11863/* end confdefs.h. */
11864
11865int
11866main ()
11867{
11868
11869 ;
11870 return 0;
11871}
11872_ACEOF
11873rm -f conftest.$ac_objext
11874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11875 (eval $ac_compile) 2>conftest.er1
11876 ac_status=$?
11877 grep -v '^ *+' conftest.er1 >conftest.err
11878 rm -f conftest.er1
11879 cat conftest.err >&5
11880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11881 (exit $ac_status); } &&
11882 { ac_try='test -z "$ac_c_werror_flag"
11883 || test ! -s conftest.err'
11884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11885 (eval $ac_try) 2>&5
11886 ac_status=$?
11887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11888 (exit $ac_status); }; } &&
11889 { ac_try='test -s conftest.$ac_objext'
11890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11891 (eval $ac_try) 2>&5
11892 ac_status=$?
11893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11894 (exit $ac_status); }; }; then
11895 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11896else
11897 echo "$as_me: failed program was:" >&5
11898sed 's/^/| /' conftest.$ac_ext >&5
11899
11900fi
11901rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11902 CFLAGS="$saved_CFLAGS"
11903 done
11904 echo "$as_me:$LINENO: result: ${PYTHON_CFLAGS}" >&5
11905echo "${ECHO_T}${PYTHON_CFLAGS}" >&6
11906 fi
11907else
a08702d6 11908 # Even if Python support is not compiled in, we need to have these files
d57a3c85 11909 # included in order to recognize the GDB command "python".
6bf0ce2b
PP
11910 CONFIG_OBS="$CONFIG_OBS python.o python-value.o python-prettyprint.o"
11911 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c python/python-prettyprint.c"
d57a3c85
TJB
11912fi
11913
11914
bec39cab
AC
11915# ------------------------- #
11916# Checks for header files. #
11917# ------------------------- #
8ee53726 11918
0e5d83e3 11919
bec39cab
AC
11920
11921
11922
11923
11924ac_header_dirent=no
11925for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11926 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
b4e70030
JB
11927echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
11928echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11929if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
11930 echo $ECHO_N "(cached) $ECHO_C" >&6
11931else
11932 cat >conftest.$ac_ext <<_ACEOF
11933/* confdefs.h. */
11934_ACEOF
11935cat confdefs.h >>conftest.$ac_ext
11936cat >>conftest.$ac_ext <<_ACEOF
11937/* end confdefs.h. */
11938#include <sys/types.h>
0e5d83e3 11939#include <$ac_hdr>
bec39cab
AC
11940
11941int
11942main ()
11943{
11944if ((DIR *) 0)
11945return 0;
11946 ;
11947 return 0;
11948}
11949_ACEOF
11950rm -f conftest.$ac_objext
11951if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11952 (eval $ac_compile) 2>conftest.er1
11953 ac_status=$?
11954 grep -v '^ *+' conftest.er1 >conftest.err
11955 rm -f conftest.er1
11956 cat conftest.err >&5
11957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11958 (exit $ac_status); } &&
b4e70030
JB
11959 { ac_try='test -z "$ac_c_werror_flag"
11960 || test ! -s conftest.err'
bec39cab
AC
11961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11962 (eval $ac_try) 2>&5
11963 ac_status=$?
11964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11965 (exit $ac_status); }; } &&
11966 { ac_try='test -s conftest.$ac_objext'
11967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11968 (eval $ac_try) 2>&5
11969 ac_status=$?
11970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11971 (exit $ac_status); }; }; then
11972 eval "$as_ac_Header=yes"
11973else
11974 echo "$as_me: failed program was:" >&5
11975sed 's/^/| /' conftest.$ac_ext >&5
11976
b4e70030 11977eval "$as_ac_Header=no"
bec39cab
AC
11978fi
11979rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11980fi
b4e70030
JB
11981echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11982echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
11983if test `eval echo '${'$as_ac_Header'}'` = yes; then
11984 cat >>confdefs.h <<_ACEOF
11985#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11986_ACEOF
11987
11988ac_header_dirent=$ac_hdr; break
0e5d83e3 11989fi
0e5d83e3 11990
bec39cab
AC
11991done
11992# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11993if test $ac_header_dirent = dirent.h; then
b4e70030
JB
11994 echo "$as_me:$LINENO: checking for library containing opendir" >&5
11995echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
11996if test "${ac_cv_search_opendir+set}" = set; then
11997 echo $ECHO_N "(cached) $ECHO_C" >&6
11998else
11999 ac_func_search_save_LIBS=$LIBS
b4e70030 12000ac_cv_search_opendir=no
bec39cab
AC
12001cat >conftest.$ac_ext <<_ACEOF
12002/* confdefs.h. */
12003_ACEOF
12004cat confdefs.h >>conftest.$ac_ext
12005cat >>conftest.$ac_ext <<_ACEOF
12006/* end confdefs.h. */
0e5d83e3 12007
b4e70030 12008/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
12009#ifdef __cplusplus
12010extern "C"
12011#endif
b4e70030
JB
12012/* We use char because int might match the return type of a gcc2
12013 builtin and then its argument prototype would still apply. */
bec39cab
AC
12014char opendir ();
12015int
12016main ()
12017{
b4e70030 12018opendir ();
bec39cab
AC
12019 ;
12020 return 0;
12021}
12022_ACEOF
b4e70030 12023rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
12024if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12025 (eval $ac_link) 2>conftest.er1
12026 ac_status=$?
12027 grep -v '^ *+' conftest.er1 >conftest.err
12028 rm -f conftest.er1
12029 cat conftest.err >&5
12030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12031 (exit $ac_status); } &&
b4e70030
JB
12032 { ac_try='test -z "$ac_c_werror_flag"
12033 || test ! -s conftest.err'
bec39cab
AC
12034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12035 (eval $ac_try) 2>&5
12036 ac_status=$?
12037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12038 (exit $ac_status); }; } &&
12039 { ac_try='test -s conftest$ac_exeext'
12040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12041 (eval $ac_try) 2>&5
12042 ac_status=$?
12043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12044 (exit $ac_status); }; }; then
b4e70030 12045 ac_cv_search_opendir="none required"
bec39cab
AC
12046else
12047 echo "$as_me: failed program was:" >&5
12048sed 's/^/| /' conftest.$ac_ext >&5
12049
12050fi
bec39cab 12051rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
12052 conftest$ac_exeext conftest.$ac_ext
12053if test "$ac_cv_search_opendir" = no; then
12054 for ac_lib in dir; do
12055 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12056 cat >conftest.$ac_ext <<_ACEOF
12057/* confdefs.h. */
12058_ACEOF
12059cat confdefs.h >>conftest.$ac_ext
12060cat >>conftest.$ac_ext <<_ACEOF
12061/* end confdefs.h. */
12062
12063/* Override any gcc2 internal prototype to avoid an error. */
12064#ifdef __cplusplus
12065extern "C"
12066#endif
12067/* We use char because int might match the return type of a gcc2
12068 builtin and then its argument prototype would still apply. */
12069char opendir ();
12070int
12071main ()
12072{
12073opendir ();
12074 ;
12075 return 0;
12076}
12077_ACEOF
12078rm -f conftest.$ac_objext conftest$ac_exeext
12079if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12080 (eval $ac_link) 2>conftest.er1
12081 ac_status=$?
12082 grep -v '^ *+' conftest.er1 >conftest.err
12083 rm -f conftest.er1
12084 cat conftest.err >&5
12085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12086 (exit $ac_status); } &&
12087 { ac_try='test -z "$ac_c_werror_flag"
12088 || test ! -s conftest.err'
12089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12090 (eval $ac_try) 2>&5
12091 ac_status=$?
12092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12093 (exit $ac_status); }; } &&
12094 { ac_try='test -s conftest$ac_exeext'
12095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12096 (eval $ac_try) 2>&5
12097 ac_status=$?
12098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12099 (exit $ac_status); }; }; then
12100 ac_cv_search_opendir="-l$ac_lib"
12101break
4e8d927d 12102else
b4e70030
JB
12103 echo "$as_me: failed program was:" >&5
12104sed 's/^/| /' conftest.$ac_ext >&5
12105
12106fi
12107rm -f conftest.err conftest.$ac_objext \
12108 conftest$ac_exeext conftest.$ac_ext
12109 done
0e5d83e3 12110fi
bec39cab 12111LIBS=$ac_func_search_save_LIBS
0e5d83e3 12112fi
b4e70030
JB
12113echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
12114echo "${ECHO_T}$ac_cv_search_opendir" >&6
12115if test "$ac_cv_search_opendir" != no; then
12116 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
0e5d83e3 12117
0e5d83e3
JJ
12118fi
12119
d28f9cdf 12120else
b4e70030
JB
12121 echo "$as_me:$LINENO: checking for library containing opendir" >&5
12122echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
12123if test "${ac_cv_search_opendir+set}" = set; then
12124 echo $ECHO_N "(cached) $ECHO_C" >&6
12125else
12126 ac_func_search_save_LIBS=$LIBS
b4e70030 12127ac_cv_search_opendir=no
bec39cab
AC
12128cat >conftest.$ac_ext <<_ACEOF
12129/* confdefs.h. */
12130_ACEOF
12131cat confdefs.h >>conftest.$ac_ext
12132cat >>conftest.$ac_ext <<_ACEOF
12133/* end confdefs.h. */
d28f9cdf 12134
b4e70030 12135/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
12136#ifdef __cplusplus
12137extern "C"
d28f9cdf 12138#endif
b4e70030
JB
12139/* We use char because int might match the return type of a gcc2
12140 builtin and then its argument prototype would still apply. */
bec39cab
AC
12141char opendir ();
12142int
12143main ()
12144{
b4e70030 12145opendir ();
bec39cab
AC
12146 ;
12147 return 0;
12148}
12149_ACEOF
b4e70030 12150rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
12151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12152 (eval $ac_link) 2>conftest.er1
12153 ac_status=$?
12154 grep -v '^ *+' conftest.er1 >conftest.err
12155 rm -f conftest.er1
12156 cat conftest.err >&5
12157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12158 (exit $ac_status); } &&
b4e70030
JB
12159 { ac_try='test -z "$ac_c_werror_flag"
12160 || test ! -s conftest.err'
bec39cab
AC
12161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12162 (eval $ac_try) 2>&5
12163 ac_status=$?
12164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12165 (exit $ac_status); }; } &&
12166 { ac_try='test -s conftest$ac_exeext'
12167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12168 (eval $ac_try) 2>&5
12169 ac_status=$?
12170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12171 (exit $ac_status); }; }; then
b4e70030 12172 ac_cv_search_opendir="none required"
d28f9cdf 12173else
bec39cab
AC
12174 echo "$as_me: failed program was:" >&5
12175sed 's/^/| /' conftest.$ac_ext >&5
12176
d28f9cdf 12177fi
bec39cab 12178rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
12179 conftest$ac_exeext conftest.$ac_ext
12180if test "$ac_cv_search_opendir" = no; then
12181 for ac_lib in x; do
12182 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12183 cat >conftest.$ac_ext <<_ACEOF
12184/* confdefs.h. */
12185_ACEOF
12186cat confdefs.h >>conftest.$ac_ext
12187cat >>conftest.$ac_ext <<_ACEOF
12188/* end confdefs.h. */
12189
12190/* Override any gcc2 internal prototype to avoid an error. */
12191#ifdef __cplusplus
12192extern "C"
12193#endif
12194/* We use char because int might match the return type of a gcc2
12195 builtin and then its argument prototype would still apply. */
12196char opendir ();
12197int
12198main ()
12199{
12200opendir ();
12201 ;
12202 return 0;
12203}
12204_ACEOF
12205rm -f conftest.$ac_objext conftest$ac_exeext
12206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12207 (eval $ac_link) 2>conftest.er1
12208 ac_status=$?
12209 grep -v '^ *+' conftest.er1 >conftest.err
12210 rm -f conftest.er1
12211 cat conftest.err >&5
12212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12213 (exit $ac_status); } &&
12214 { ac_try='test -z "$ac_c_werror_flag"
12215 || test ! -s conftest.err'
12216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12217 (eval $ac_try) 2>&5
12218 ac_status=$?
12219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12220 (exit $ac_status); }; } &&
12221 { ac_try='test -s conftest$ac_exeext'
12222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12223 (eval $ac_try) 2>&5
12224 ac_status=$?
12225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12226 (exit $ac_status); }; }; then
12227 ac_cv_search_opendir="-l$ac_lib"
12228break
4e8d927d 12229else
b4e70030
JB
12230 echo "$as_me: failed program was:" >&5
12231sed 's/^/| /' conftest.$ac_ext >&5
12232
12233fi
12234rm -f conftest.err conftest.$ac_objext \
12235 conftest$ac_exeext conftest.$ac_ext
12236 done
bec39cab
AC
12237fi
12238LIBS=$ac_func_search_save_LIBS
d28f9cdf 12239fi
b4e70030
JB
12240echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
12241echo "${ECHO_T}$ac_cv_search_opendir" >&6
12242if test "$ac_cv_search_opendir" != no; then
12243 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
d28f9cdf 12244
d28f9cdf
DJ
12245fi
12246
bec39cab 12247fi
b0b1c2c0 12248
b4e70030
JB
12249echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
12250echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
bec39cab
AC
12251if test "${ac_cv_header_stat_broken+set}" = set; then
12252 echo $ECHO_N "(cached) $ECHO_C" >&6
b0b1c2c0 12253else
bec39cab
AC
12254 cat >conftest.$ac_ext <<_ACEOF
12255/* confdefs.h. */
12256_ACEOF
12257cat confdefs.h >>conftest.$ac_ext
12258cat >>conftest.$ac_ext <<_ACEOF
12259/* end confdefs.h. */
12260#include <sys/types.h>
12261#include <sys/stat.h>
b0b1c2c0 12262
b4e70030 12263#if defined(S_ISBLK) && defined(S_IFDIR)
bec39cab
AC
12264# if S_ISBLK (S_IFDIR)
12265You lose.
12266# endif
12267#endif
b0b1c2c0 12268
b4e70030 12269#if defined(S_ISBLK) && defined(S_IFCHR)
bec39cab
AC
12270# if S_ISBLK (S_IFCHR)
12271You lose.
12272# endif
12273#endif
d28f9cdf 12274
b4e70030 12275#if defined(S_ISLNK) && defined(S_IFREG)
bec39cab
AC
12276# if S_ISLNK (S_IFREG)
12277You lose.
12278# endif
12279#endif
d28f9cdf 12280
b4e70030 12281#if defined(S_ISSOCK) && defined(S_IFREG)
bec39cab
AC
12282# if S_ISSOCK (S_IFREG)
12283You lose.
12284# endif
12285#endif
12286
12287_ACEOF
12288if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12289 $EGREP "You lose" >/dev/null 2>&1; then
12290 ac_cv_header_stat_broken=yes
d28f9cdf 12291else
bec39cab 12292 ac_cv_header_stat_broken=no
d28f9cdf
DJ
12293fi
12294rm -f conftest*
d28f9cdf 12295
d28f9cdf 12296fi
b4e70030
JB
12297echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
12298echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
bec39cab 12299if test $ac_cv_header_stat_broken = yes; then
d28f9cdf 12300
bec39cab
AC
12301cat >>confdefs.h <<\_ACEOF
12302#define STAT_MACROS_BROKEN 1
12303_ACEOF
8bb2c122 12304
7a292a7a 12305fi
bec39cab 12306
b4e70030
JB
12307echo "$as_me:$LINENO: checking for ANSI C header files" >&5
12308echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
bec39cab
AC
12309if test "${ac_cv_header_stdc+set}" = set; then
12310 echo $ECHO_N "(cached) $ECHO_C" >&6
7a292a7a 12311else
bec39cab
AC
12312 cat >conftest.$ac_ext <<_ACEOF
12313/* confdefs.h. */
12314_ACEOF
12315cat confdefs.h >>conftest.$ac_ext
12316cat >>conftest.$ac_ext <<_ACEOF
12317/* end confdefs.h. */
12318#include <stdlib.h>
12319#include <stdarg.h>
12320#include <string.h>
12321#include <float.h>
7a292a7a 12322
bec39cab
AC
12323int
12324main ()
12325{
7a292a7a 12326
bec39cab
AC
12327 ;
12328 return 0;
12329}
12330_ACEOF
12331rm -f conftest.$ac_objext
12332if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12333 (eval $ac_compile) 2>conftest.er1
12334 ac_status=$?
12335 grep -v '^ *+' conftest.er1 >conftest.err
12336 rm -f conftest.er1
12337 cat conftest.err >&5
12338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12339 (exit $ac_status); } &&
b4e70030
JB
12340 { ac_try='test -z "$ac_c_werror_flag"
12341 || test ! -s conftest.err'
bec39cab
AC
12342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12343 (eval $ac_try) 2>&5
12344 ac_status=$?
12345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12346 (exit $ac_status); }; } &&
12347 { ac_try='test -s conftest.$ac_objext'
12348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12349 (eval $ac_try) 2>&5
12350 ac_status=$?
12351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12352 (exit $ac_status); }; }; then
12353 ac_cv_header_stdc=yes
c906108c 12354else
bec39cab
AC
12355 echo "$as_me: failed program was:" >&5
12356sed 's/^/| /' conftest.$ac_ext >&5
c906108c 12357
b4e70030 12358ac_cv_header_stdc=no
c906108c 12359fi
bec39cab 12360rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12361
bec39cab
AC
12362if test $ac_cv_header_stdc = yes; then
12363 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12364 cat >conftest.$ac_ext <<_ACEOF
12365/* confdefs.h. */
12366_ACEOF
12367cat confdefs.h >>conftest.$ac_ext
12368cat >>conftest.$ac_ext <<_ACEOF
12369/* end confdefs.h. */
12370#include <string.h>
c906108c 12371
bec39cab
AC
12372_ACEOF
12373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12374 $EGREP "memchr" >/dev/null 2>&1; then
12375 :
8bb2c122 12376else
bec39cab 12377 ac_cv_header_stdc=no
8bb2c122 12378fi
bec39cab
AC
12379rm -f conftest*
12380
c906108c
SS
12381fi
12382
bec39cab
AC
12383if test $ac_cv_header_stdc = yes; then
12384 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12385 cat >conftest.$ac_ext <<_ACEOF
12386/* confdefs.h. */
12387_ACEOF
12388cat confdefs.h >>conftest.$ac_ext
12389cat >>conftest.$ac_ext <<_ACEOF
12390/* end confdefs.h. */
12391#include <stdlib.h>
12392
12393_ACEOF
12394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12395 $EGREP "free" >/dev/null 2>&1; then
12396 :
c906108c 12397else
bec39cab 12398 ac_cv_header_stdc=no
c906108c 12399fi
bec39cab
AC
12400rm -f conftest*
12401
c906108c
SS
12402fi
12403
bec39cab
AC
12404if test $ac_cv_header_stdc = yes; then
12405 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12406 if test "$cross_compiling" = yes; then
12407 :
c906108c 12408else
bec39cab
AC
12409 cat >conftest.$ac_ext <<_ACEOF
12410/* confdefs.h. */
12411_ACEOF
12412cat confdefs.h >>conftest.$ac_ext
12413cat >>conftest.$ac_ext <<_ACEOF
12414/* end confdefs.h. */
12415#include <ctype.h>
12416#if ((' ' & 0x0FF) == 0x020)
12417# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12418# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12419#else
12420# define ISLOWER(c) \
12421 (('a' <= (c) && (c) <= 'i') \
12422 || ('j' <= (c) && (c) <= 'r') \
12423 || ('s' <= (c) && (c) <= 'z'))
12424# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12425#endif
12426
12427#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12428int
12429main ()
12430{
12431 int i;
12432 for (i = 0; i < 256; i++)
12433 if (XOR (islower (i), ISLOWER (i))
12434 || toupper (i) != TOUPPER (i))
b4e70030
JB
12435 exit(2);
12436 exit (0);
bec39cab
AC
12437}
12438_ACEOF
12439rm -f conftest$ac_exeext
12440if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12441 (eval $ac_link) 2>&5
12442 ac_status=$?
12443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12444 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12446 (eval $ac_try) 2>&5
12447 ac_status=$?
12448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12449 (exit $ac_status); }; }; then
12450 :
12451else
12452 echo "$as_me: program exited with status $ac_status" >&5
12453echo "$as_me: failed program was:" >&5
12454sed 's/^/| /' conftest.$ac_ext >&5
12455
12456( exit $ac_status )
12457ac_cv_header_stdc=no
c906108c 12458fi
b4e70030 12459rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 12460fi
c906108c 12461fi
bec39cab 12462fi
b4e70030
JB
12463echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
12464echo "${ECHO_T}$ac_cv_header_stdc" >&6
bec39cab 12465if test $ac_cv_header_stdc = yes; then
c906108c 12466
bec39cab
AC
12467cat >>confdefs.h <<\_ACEOF
12468#define STDC_HEADERS 1
12469_ACEOF
c906108c 12470
bec39cab 12471fi
8bb2c122 12472
a9322a30
TT
12473# elf_hp.h is for HP/UX 64-bit shared library support.
12474# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
12475# unconditionally, so what's the point in checking these?
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
bec39cab 12493
a9322a30
TT
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
a8111142 12510
a9322a30
TT
12511
12512
12513for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12514 thread_db.h gnu/libc-version.h signal.h stddef.h \
12515 stdlib.h string.h memory.h strings.h sys/fault.h \
12516 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12517 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12518 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
12519 sys/types.h sys/wait.h wait.h termios.h termio.h \
a8111142 12520 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
bec39cab
AC
12521do
12522as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12523if eval "test \"\${$as_ac_Header+set}\" = set"; then
12524 echo "$as_me:$LINENO: checking for $ac_header" >&5
12525echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12526if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
12527 echo $ECHO_N "(cached) $ECHO_C" >&6
12528fi
b4e70030
JB
12529echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12530echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12531else
12532 # Is the header compilable?
b4e70030
JB
12533echo "$as_me:$LINENO: checking $ac_header usability" >&5
12534echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
12535cat >conftest.$ac_ext <<_ACEOF
12536/* confdefs.h. */
12537_ACEOF
12538cat confdefs.h >>conftest.$ac_ext
12539cat >>conftest.$ac_ext <<_ACEOF
12540/* end confdefs.h. */
12541$ac_includes_default
12542#include <$ac_header>
12543_ACEOF
12544rm -f conftest.$ac_objext
12545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12546 (eval $ac_compile) 2>conftest.er1
12547 ac_status=$?
12548 grep -v '^ *+' conftest.er1 >conftest.err
12549 rm -f conftest.er1
12550 cat conftest.err >&5
12551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552 (exit $ac_status); } &&
b4e70030
JB
12553 { ac_try='test -z "$ac_c_werror_flag"
12554 || test ! -s conftest.err'
bec39cab
AC
12555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12556 (eval $ac_try) 2>&5
12557 ac_status=$?
12558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559 (exit $ac_status); }; } &&
12560 { ac_try='test -s conftest.$ac_objext'
12561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12562 (eval $ac_try) 2>&5
12563 ac_status=$?
12564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12565 (exit $ac_status); }; }; then
12566 ac_header_compiler=yes
12567else
12568 echo "$as_me: failed program was:" >&5
12569sed 's/^/| /' conftest.$ac_ext >&5
12570
b4e70030 12571ac_header_compiler=no
bec39cab
AC
12572fi
12573rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
12574echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12575echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
12576
12577# Is the header present?
b4e70030
JB
12578echo "$as_me:$LINENO: checking $ac_header presence" >&5
12579echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
12580cat >conftest.$ac_ext <<_ACEOF
12581/* confdefs.h. */
12582_ACEOF
12583cat confdefs.h >>conftest.$ac_ext
12584cat >>conftest.$ac_ext <<_ACEOF
12585/* end confdefs.h. */
12586#include <$ac_header>
12587_ACEOF
12588if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12589 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12590 ac_status=$?
12591 grep -v '^ *+' conftest.er1 >conftest.err
12592 rm -f conftest.er1
12593 cat conftest.err >&5
12594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12595 (exit $ac_status); } >/dev/null; then
12596 if test -s conftest.err; then
12597 ac_cpp_err=$ac_c_preproc_warn_flag
12598 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12599 else
12600 ac_cpp_err=
12601 fi
c906108c 12602else
bec39cab 12603 ac_cpp_err=yes
c906108c 12604fi
bec39cab
AC
12605if test -z "$ac_cpp_err"; then
12606 ac_header_preproc=yes
c906108c 12607else
bec39cab
AC
12608 echo "$as_me: failed program was:" >&5
12609sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 12610
bec39cab
AC
12611 ac_header_preproc=no
12612fi
12613rm -f conftest.err conftest.$ac_ext
b4e70030
JB
12614echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12615echo "${ECHO_T}$ac_header_preproc" >&6
c906108c 12616
bec39cab
AC
12617# So? What about this header?
12618case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12619 yes:no: )
12620 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12621echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12622 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12623echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12624 ac_header_preproc=yes
12625 ;;
12626 no:yes:* )
12627 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12628echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12629 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12630echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12631 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12632echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12633 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12634echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12635 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12636echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12637 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12638echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
12639 (
12640 cat <<\_ASBOX
12641## ------------------------------------------ ##
12642## Report this to the AC_PACKAGE_NAME lists. ##
12643## ------------------------------------------ ##
12644_ASBOX
12645 ) |
12646 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
12647 ;;
12648esac
b4e70030
JB
12649echo "$as_me:$LINENO: checking for $ac_header" >&5
12650echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12651if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12652 echo $ECHO_N "(cached) $ECHO_C" >&6
95ca63c4 12653else
bec39cab 12654 eval "$as_ac_Header=\$ac_header_preproc"
95ca63c4 12655fi
b4e70030
JB
12656echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12657echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 12658
95ca63c4 12659fi
bec39cab
AC
12660if test `eval echo '${'$as_ac_Header'}'` = yes; then
12661 cat >>confdefs.h <<_ACEOF
12662#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12663_ACEOF
12664
95ca63c4
CF
12665fi
12666
bec39cab 12667done
95ca63c4
CF
12668
12669
7cb9022a 12670for ac_header in link.h
bec39cab
AC
12671do
12672as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12673echo "$as_me:$LINENO: checking for $ac_header" >&5
12674echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12675if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12676 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12677else
7cb9022a 12678 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12679/* confdefs.h. */
12680_ACEOF
12681cat confdefs.h >>conftest.$ac_ext
12682cat >>conftest.$ac_ext <<_ACEOF
12683/* end confdefs.h. */
7cb9022a
MK
12684#if HAVE_SYS_TYPES_H
12685# include <sys/types.h>
12686#endif
12687#if HAVE_NLIST_H
12688# include <nlist.h>
12689#endif
12690
12691
bec39cab
AC
12692#include <$ac_header>
12693_ACEOF
12694rm -f conftest.$ac_objext
12695if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12696 (eval $ac_compile) 2>conftest.er1
12697 ac_status=$?
12698 grep -v '^ *+' conftest.er1 >conftest.err
12699 rm -f conftest.er1
12700 cat conftest.err >&5
12701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12702 (exit $ac_status); } &&
b4e70030
JB
12703 { ac_try='test -z "$ac_c_werror_flag"
12704 || test ! -s conftest.err'
bec39cab
AC
12705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12706 (eval $ac_try) 2>&5
12707 ac_status=$?
12708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12709 (exit $ac_status); }; } &&
12710 { ac_try='test -s conftest.$ac_objext'
12711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12712 (eval $ac_try) 2>&5
12713 ac_status=$?
12714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12715 (exit $ac_status); }; }; then
7cb9022a 12716 eval "$as_ac_Header=yes"
bec39cab
AC
12717else
12718 echo "$as_me: failed program was:" >&5
12719sed 's/^/| /' conftest.$ac_ext >&5
12720
b4e70030 12721eval "$as_ac_Header=no"
bec39cab
AC
12722fi
12723rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12724fi
b4e70030
JB
12725echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12726echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12727if test `eval echo '${'$as_ac_Header'}'` = yes; then
12728 cat >>confdefs.h <<_ACEOF
12729#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12730_ACEOF
95ca63c4 12731
bec39cab 12732fi
95ca63c4 12733
bec39cab 12734done
95ca63c4 12735
c906108c 12736
a9322a30 12737for ac_header in sys/proc.h
bec39cab
AC
12738do
12739as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a9322a30 12740echo "$as_me:$LINENO: checking for $ac_header" >&5
b4e70030
JB
12741echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12742if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12743 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12744else
a9322a30 12745 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12746/* confdefs.h. */
12747_ACEOF
12748cat confdefs.h >>conftest.$ac_ext
12749cat >>conftest.$ac_ext <<_ACEOF
12750/* end confdefs.h. */
a9322a30
TT
12751#if HAVE_SYS_PARAM_H
12752# include <sys/param.h>
12753#endif
12754
12755
bec39cab
AC
12756#include <$ac_header>
12757_ACEOF
12758rm -f conftest.$ac_objext
12759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12760 (eval $ac_compile) 2>conftest.er1
12761 ac_status=$?
12762 grep -v '^ *+' conftest.er1 >conftest.err
12763 rm -f conftest.er1
12764 cat conftest.err >&5
12765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12766 (exit $ac_status); } &&
b4e70030
JB
12767 { ac_try='test -z "$ac_c_werror_flag"
12768 || test ! -s conftest.err'
bec39cab
AC
12769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12770 (eval $ac_try) 2>&5
12771 ac_status=$?
12772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12773 (exit $ac_status); }; } &&
12774 { ac_try='test -s conftest.$ac_objext'
12775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12776 (eval $ac_try) 2>&5
12777 ac_status=$?
12778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12779 (exit $ac_status); }; }; then
a9322a30 12780 eval "$as_ac_Header=yes"
bec39cab
AC
12781else
12782 echo "$as_me: failed program was:" >&5
12783sed 's/^/| /' conftest.$ac_ext >&5
12784
a9322a30 12785eval "$as_ac_Header=no"
bec39cab
AC
12786fi
12787rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12788fi
12789echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12790echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12791if test `eval echo '${'$as_ac_Header'}'` = yes; then
12792 cat >>confdefs.h <<_ACEOF
12793#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12794_ACEOF
bec39cab 12795
a9322a30
TT
12796fi
12797
12798done
12799
12800
12801for ac_header in sys/user.h
12802do
12803as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12804echo "$as_me:$LINENO: checking for $ac_header" >&5
12805echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12806if eval "test \"\${$as_ac_Header+set}\" = set"; then
12807 echo $ECHO_N "(cached) $ECHO_C" >&6
12808else
12809 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12810/* confdefs.h. */
12811_ACEOF
12812cat confdefs.h >>conftest.$ac_ext
12813cat >>conftest.$ac_ext <<_ACEOF
12814/* end confdefs.h. */
a9322a30
TT
12815#if HAVE_SYS_PARAM_H
12816# include <sys/param.h>
12817#endif
12818
12819
bec39cab
AC
12820#include <$ac_header>
12821_ACEOF
a9322a30
TT
12822rm -f conftest.$ac_objext
12823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12824 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
12825 ac_status=$?
12826 grep -v '^ *+' conftest.er1 >conftest.err
12827 rm -f conftest.er1
12828 cat conftest.err >&5
12829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
12830 (exit $ac_status); } &&
12831 { ac_try='test -z "$ac_c_werror_flag"
12832 || test ! -s conftest.err'
12833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12834 (eval $ac_try) 2>&5
12835 ac_status=$?
12836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12837 (exit $ac_status); }; } &&
12838 { ac_try='test -s conftest.$ac_objext'
12839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12840 (eval $ac_try) 2>&5
12841 ac_status=$?
12842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12843 (exit $ac_status); }; }; then
12844 eval "$as_ac_Header=yes"
bec39cab
AC
12845else
12846 echo "$as_me: failed program was:" >&5
12847sed 's/^/| /' conftest.$ac_ext >&5
12848
a9322a30 12849eval "$as_ac_Header=no"
75c6e08a 12850fi
a9322a30
TT
12851rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12852fi
12853echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12854echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12855if test `eval echo '${'$as_ac_Header'}'` = yes; then
12856 cat >>confdefs.h <<_ACEOF
12857#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12858_ACEOF
bec39cab 12859
bec39cab 12860fi
bec39cab 12861
a9322a30
TT
12862done
12863
12864
12865# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
12866# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
12867# think that we don't have <curses.h> if we're using GCC.
12868case $host_os in
12869 solaris2.[789])
12870 if test "$GCC" = yes; then
12871
12872cat >>confdefs.h <<\_ACEOF
12873#define _MSE_INT_H 1
bec39cab 12874_ACEOF
75c6e08a 12875
a9322a30
TT
12876 fi ;;
12877esac
12878
75c6e08a
MK
12879
12880
12881
9a156167 12882
a9322a30 12883for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
bec39cab
AC
12884do
12885as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12886if eval "test \"\${$as_ac_Header+set}\" = set"; then
12887 echo "$as_me:$LINENO: checking for $ac_header" >&5
12888echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12889if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
12890 echo $ECHO_N "(cached) $ECHO_C" >&6
12891fi
b4e70030
JB
12892echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12893echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12894else
12895 # Is the header compilable?
b4e70030
JB
12896echo "$as_me:$LINENO: checking $ac_header usability" >&5
12897echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
12898cat >conftest.$ac_ext <<_ACEOF
12899/* confdefs.h. */
12900_ACEOF
12901cat confdefs.h >>conftest.$ac_ext
12902cat >>conftest.$ac_ext <<_ACEOF
12903/* end confdefs.h. */
12904$ac_includes_default
12905#include <$ac_header>
12906_ACEOF
12907rm -f conftest.$ac_objext
12908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12909 (eval $ac_compile) 2>conftest.er1
12910 ac_status=$?
12911 grep -v '^ *+' conftest.er1 >conftest.err
12912 rm -f conftest.er1
12913 cat conftest.err >&5
12914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12915 (exit $ac_status); } &&
b4e70030
JB
12916 { ac_try='test -z "$ac_c_werror_flag"
12917 || test ! -s conftest.err'
bec39cab
AC
12918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12919 (eval $ac_try) 2>&5
12920 ac_status=$?
12921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12922 (exit $ac_status); }; } &&
12923 { ac_try='test -s conftest.$ac_objext'
12924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12925 (eval $ac_try) 2>&5
12926 ac_status=$?
12927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12928 (exit $ac_status); }; }; then
12929 ac_header_compiler=yes
12930else
12931 echo "$as_me: failed program was:" >&5
12932sed 's/^/| /' conftest.$ac_ext >&5
12933
b4e70030 12934ac_header_compiler=no
bec39cab
AC
12935fi
12936rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
12937echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12938echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
12939
12940# Is the header present?
b4e70030
JB
12941echo "$as_me:$LINENO: checking $ac_header presence" >&5
12942echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
12943cat >conftest.$ac_ext <<_ACEOF
12944/* confdefs.h. */
12945_ACEOF
12946cat confdefs.h >>conftest.$ac_ext
12947cat >>conftest.$ac_ext <<_ACEOF
12948/* end confdefs.h. */
12949#include <$ac_header>
12950_ACEOF
12951if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12952 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12953 ac_status=$?
12954 grep -v '^ *+' conftest.er1 >conftest.err
12955 rm -f conftest.er1
12956 cat conftest.err >&5
12957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12958 (exit $ac_status); } >/dev/null; then
12959 if test -s conftest.err; then
12960 ac_cpp_err=$ac_c_preproc_warn_flag
12961 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12962 else
12963 ac_cpp_err=
12964 fi
9a156167 12965else
bec39cab 12966 ac_cpp_err=yes
9a156167 12967fi
bec39cab
AC
12968if test -z "$ac_cpp_err"; then
12969 ac_header_preproc=yes
12970else
12971 echo "$as_me: failed program was:" >&5
12972sed 's/^/| /' conftest.$ac_ext >&5
9a156167 12973
bec39cab 12974 ac_header_preproc=no
9a156167 12975fi
bec39cab 12976rm -f conftest.err conftest.$ac_ext
b4e70030
JB
12977echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12978echo "${ECHO_T}$ac_header_preproc" >&6
9a156167 12979
bec39cab
AC
12980# So? What about this header?
12981case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12982 yes:no: )
12983 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12984echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12985 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12986echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12987 ac_header_preproc=yes
12988 ;;
12989 no:yes:* )
12990 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12991echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12992 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12993echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12994 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12995echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12996 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12997echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12998 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12999echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13000 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13001echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
13002 (
13003 cat <<\_ASBOX
13004## ------------------------------------------ ##
13005## Report this to the AC_PACKAGE_NAME lists. ##
13006## ------------------------------------------ ##
13007_ASBOX
13008 ) |
13009 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
13010 ;;
13011esac
b4e70030
JB
13012echo "$as_me:$LINENO: checking for $ac_header" >&5
13013echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13014if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 13015 echo $ECHO_N "(cached) $ECHO_C" >&6
9a156167 13016else
bec39cab 13017 eval "$as_ac_Header=\$ac_header_preproc"
9a156167 13018fi
b4e70030
JB
13019echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13020echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9a156167 13021
bec39cab
AC
13022fi
13023if test `eval echo '${'$as_ac_Header'}'` = yes; then
13024 cat >>confdefs.h <<_ACEOF
13025#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13026_ACEOF
9a156167 13027
bec39cab 13028fi
9a156167 13029
bec39cab 13030done
9a156167 13031
9a156167 13032
a9322a30 13033for ac_header in term.h
bec39cab
AC
13034do
13035as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a9322a30 13036echo "$as_me:$LINENO: checking for $ac_header" >&5
b4e70030
JB
13037echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13038if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 13039 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13040else
a9322a30 13041 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13042/* confdefs.h. */
13043_ACEOF
13044cat confdefs.h >>conftest.$ac_ext
13045cat >>conftest.$ac_ext <<_ACEOF
436868fb 13046/* end confdefs.h. */
a9322a30
TT
13047#if HAVE_CURSES_H
13048# include <curses.h>
13049#endif
13050
13051
436868fb
DP
13052#include <$ac_header>
13053_ACEOF
13054rm -f conftest.$ac_objext
13055if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13056 (eval $ac_compile) 2>conftest.er1
13057 ac_status=$?
13058 grep -v '^ *+' conftest.er1 >conftest.err
13059 rm -f conftest.er1
13060 cat conftest.err >&5
13061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13062 (exit $ac_status); } &&
13063 { ac_try='test -z "$ac_c_werror_flag"
13064 || test ! -s conftest.err'
13065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13066 (eval $ac_try) 2>&5
13067 ac_status=$?
13068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13069 (exit $ac_status); }; } &&
13070 { ac_try='test -s conftest.$ac_objext'
13071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13072 (eval $ac_try) 2>&5
13073 ac_status=$?
13074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13075 (exit $ac_status); }; }; then
a9322a30 13076 eval "$as_ac_Header=yes"
436868fb
DP
13077else
13078 echo "$as_me: failed program was:" >&5
13079sed 's/^/| /' conftest.$ac_ext >&5
13080
a9322a30 13081eval "$as_ac_Header=no"
436868fb
DP
13082fi
13083rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13084fi
13085echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13086echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13087if test `eval echo '${'$as_ac_Header'}'` = yes; then
13088 cat >>confdefs.h <<_ACEOF
13089#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13090_ACEOF
436868fb 13091
a9322a30
TT
13092fi
13093
13094done
13095
13096
13097# ------------------------- #
13098# Checks for declarations. #
13099# ------------------------- #
13100
13101echo "$as_me:$LINENO: checking whether free is declared" >&5
13102echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
13103if test "${ac_cv_have_decl_free+set}" = set; then
13104 echo $ECHO_N "(cached) $ECHO_C" >&6
13105else
13106 cat >conftest.$ac_ext <<_ACEOF
436868fb
DP
13107/* confdefs.h. */
13108_ACEOF
13109cat confdefs.h >>conftest.$ac_ext
13110cat >>conftest.$ac_ext <<_ACEOF
13111/* end confdefs.h. */
a9322a30
TT
13112$ac_includes_default
13113int
13114main ()
13115{
13116#ifndef free
13117 char *p = (char *) free;
13118#endif
13119
13120 ;
13121 return 0;
13122}
436868fb 13123_ACEOF
a9322a30
TT
13124rm -f conftest.$ac_objext
13125if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13126 (eval $ac_compile) 2>conftest.er1
436868fb
DP
13127 ac_status=$?
13128 grep -v '^ *+' conftest.er1 >conftest.err
13129 rm -f conftest.er1
13130 cat conftest.err >&5
13131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13132 (exit $ac_status); } &&
13133 { ac_try='test -z "$ac_c_werror_flag"
13134 || test ! -s conftest.err'
13135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13136 (eval $ac_try) 2>&5
13137 ac_status=$?
13138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13139 (exit $ac_status); }; } &&
13140 { ac_try='test -s conftest.$ac_objext'
13141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13142 (eval $ac_try) 2>&5
13143 ac_status=$?
13144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13145 (exit $ac_status); }; }; then
13146 ac_cv_have_decl_free=yes
436868fb
DP
13147else
13148 echo "$as_me: failed program was:" >&5
13149sed 's/^/| /' conftest.$ac_ext >&5
13150
a9322a30 13151ac_cv_have_decl_free=no
436868fb 13152fi
a9322a30 13153rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
436868fb 13154fi
a9322a30
TT
13155echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
13156echo "${ECHO_T}$ac_cv_have_decl_free" >&6
13157if test $ac_cv_have_decl_free = yes; then
436868fb 13158
a9322a30
TT
13159cat >>confdefs.h <<_ACEOF
13160#define HAVE_DECL_FREE 1
436868fb
DP
13161_ACEOF
13162
436868fb 13163
a9322a30
TT
13164else
13165 cat >>confdefs.h <<_ACEOF
13166#define HAVE_DECL_FREE 0
13167_ACEOF
436868fb
DP
13168
13169
436868fb 13170fi
a9322a30
TT
13171echo "$as_me:$LINENO: checking whether malloc is declared" >&5
13172echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
13173if test "${ac_cv_have_decl_malloc+set}" = set; then
13174 echo $ECHO_N "(cached) $ECHO_C" >&6
436868fb 13175else
a9322a30 13176 cat >conftest.$ac_ext <<_ACEOF
436868fb
DP
13177/* confdefs.h. */
13178_ACEOF
13179cat confdefs.h >>conftest.$ac_ext
13180cat >>conftest.$ac_ext <<_ACEOF
bec39cab
AC
13181/* end confdefs.h. */
13182$ac_includes_default
a9322a30
TT
13183int
13184main ()
13185{
13186#ifndef malloc
13187 char *p = (char *) malloc;
13188#endif
13189
13190 ;
13191 return 0;
13192}
bec39cab
AC
13193_ACEOF
13194rm -f conftest.$ac_objext
13195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13196 (eval $ac_compile) 2>conftest.er1
13197 ac_status=$?
13198 grep -v '^ *+' conftest.er1 >conftest.err
13199 rm -f conftest.er1
13200 cat conftest.err >&5
13201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13202 (exit $ac_status); } &&
b4e70030
JB
13203 { ac_try='test -z "$ac_c_werror_flag"
13204 || test ! -s conftest.err'
bec39cab
AC
13205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13206 (eval $ac_try) 2>&5
13207 ac_status=$?
13208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13209 (exit $ac_status); }; } &&
13210 { ac_try='test -s conftest.$ac_objext'
13211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13212 (eval $ac_try) 2>&5
13213 ac_status=$?
13214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13215 (exit $ac_status); }; }; then
a9322a30 13216 ac_cv_have_decl_malloc=yes
bec39cab
AC
13217else
13218 echo "$as_me: failed program was:" >&5
13219sed 's/^/| /' conftest.$ac_ext >&5
13220
a9322a30 13221ac_cv_have_decl_malloc=no
bec39cab
AC
13222fi
13223rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13224fi
13225echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
13226echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
13227if test $ac_cv_have_decl_malloc = yes; then
bec39cab 13228
a9322a30
TT
13229cat >>confdefs.h <<_ACEOF
13230#define HAVE_DECL_MALLOC 1
bec39cab 13231_ACEOF
9a156167 13232
9a156167
MK
13233
13234else
bec39cab 13235 cat >>confdefs.h <<_ACEOF
a9322a30 13236#define HAVE_DECL_MALLOC 0
bec39cab 13237_ACEOF
9a156167 13238
c890192f 13239
bec39cab 13240fi
a9322a30
TT
13241echo "$as_me:$LINENO: checking whether realloc is declared" >&5
13242echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
13243if test "${ac_cv_have_decl_realloc+set}" = set; then
13244 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13245else
a9322a30 13246 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13247/* confdefs.h. */
13248_ACEOF
13249cat confdefs.h >>conftest.$ac_ext
13250cat >>conftest.$ac_ext <<_ACEOF
13251/* end confdefs.h. */
13252$ac_includes_default
a9322a30
TT
13253int
13254main ()
13255{
13256#ifndef realloc
13257 char *p = (char *) realloc;
13258#endif
13259
13260 ;
13261 return 0;
13262}
bec39cab
AC
13263_ACEOF
13264rm -f conftest.$ac_objext
13265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13266 (eval $ac_compile) 2>conftest.er1
13267 ac_status=$?
13268 grep -v '^ *+' conftest.er1 >conftest.err
13269 rm -f conftest.er1
13270 cat conftest.err >&5
13271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13272 (exit $ac_status); } &&
b4e70030
JB
13273 { ac_try='test -z "$ac_c_werror_flag"
13274 || test ! -s conftest.err'
bec39cab
AC
13275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13276 (eval $ac_try) 2>&5
13277 ac_status=$?
13278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13279 (exit $ac_status); }; } &&
13280 { ac_try='test -s conftest.$ac_objext'
13281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13282 (eval $ac_try) 2>&5
13283 ac_status=$?
13284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13285 (exit $ac_status); }; }; then
a9322a30 13286 ac_cv_have_decl_realloc=yes
bec39cab
AC
13287else
13288 echo "$as_me: failed program was:" >&5
13289sed 's/^/| /' conftest.$ac_ext >&5
13290
a9322a30 13291ac_cv_have_decl_realloc=no
bec39cab
AC
13292fi
13293rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13294fi
13295echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
13296echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
13297if test $ac_cv_have_decl_realloc = yes; then
bec39cab 13298
a9322a30
TT
13299cat >>confdefs.h <<_ACEOF
13300#define HAVE_DECL_REALLOC 1
bec39cab 13301_ACEOF
bec39cab 13302
bec39cab 13303
c890192f 13304else
bec39cab 13305 cat >>confdefs.h <<_ACEOF
a9322a30 13306#define HAVE_DECL_REALLOC 0
bec39cab 13307_ACEOF
c890192f 13308
bec39cab 13309
bec39cab 13310fi
a9322a30
TT
13311echo "$as_me:$LINENO: checking whether strerror is declared" >&5
13312echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
13313if test "${ac_cv_have_decl_strerror+set}" = set; then
13314 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13315else
a9322a30 13316 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13317/* confdefs.h. */
13318_ACEOF
13319cat confdefs.h >>conftest.$ac_ext
13320cat >>conftest.$ac_ext <<_ACEOF
13321/* end confdefs.h. */
13322$ac_includes_default
a9322a30
TT
13323int
13324main ()
13325{
13326#ifndef strerror
13327 char *p = (char *) strerror;
13328#endif
13329
13330 ;
13331 return 0;
13332}
bec39cab
AC
13333_ACEOF
13334rm -f conftest.$ac_objext
13335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13336 (eval $ac_compile) 2>conftest.er1
13337 ac_status=$?
13338 grep -v '^ *+' conftest.er1 >conftest.err
13339 rm -f conftest.er1
13340 cat conftest.err >&5
13341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13342 (exit $ac_status); } &&
b4e70030
JB
13343 { ac_try='test -z "$ac_c_werror_flag"
13344 || test ! -s conftest.err'
bec39cab
AC
13345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13346 (eval $ac_try) 2>&5
13347 ac_status=$?
13348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13349 (exit $ac_status); }; } &&
13350 { ac_try='test -s conftest.$ac_objext'
13351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13352 (eval $ac_try) 2>&5
13353 ac_status=$?
13354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13355 (exit $ac_status); }; }; then
a9322a30 13356 ac_cv_have_decl_strerror=yes
bec39cab
AC
13357else
13358 echo "$as_me: failed program was:" >&5
13359sed 's/^/| /' conftest.$ac_ext >&5
13360
a9322a30 13361ac_cv_have_decl_strerror=no
bec39cab
AC
13362fi
13363rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13364fi
13365echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
13366echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
13367if test $ac_cv_have_decl_strerror = yes; then
bec39cab 13368
a9322a30
TT
13369cat >>confdefs.h <<_ACEOF
13370#define HAVE_DECL_STRERROR 1
bec39cab 13371_ACEOF
bec39cab 13372
bec39cab 13373
9a156167 13374else
bec39cab 13375 cat >>confdefs.h <<_ACEOF
a9322a30 13376#define HAVE_DECL_STRERROR 0
bec39cab 13377_ACEOF
9a156167 13378
06825bd1 13379
bec39cab 13380fi
a9322a30
TT
13381echo "$as_me:$LINENO: checking whether strstr is declared" >&5
13382echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
13383if test "${ac_cv_have_decl_strstr+set}" = set; then
13384 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13385else
a9322a30 13386 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13387/* confdefs.h. */
13388_ACEOF
13389cat confdefs.h >>conftest.$ac_ext
13390cat >>conftest.$ac_ext <<_ACEOF
13391/* end confdefs.h. */
13392$ac_includes_default
a9322a30
TT
13393int
13394main ()
13395{
13396#ifndef strstr
13397 char *p = (char *) strstr;
13398#endif
13399
13400 ;
13401 return 0;
13402}
bec39cab
AC
13403_ACEOF
13404rm -f conftest.$ac_objext
13405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13406 (eval $ac_compile) 2>conftest.er1
13407 ac_status=$?
13408 grep -v '^ *+' conftest.er1 >conftest.err
13409 rm -f conftest.er1
13410 cat conftest.err >&5
13411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13412 (exit $ac_status); } &&
b4e70030
JB
13413 { ac_try='test -z "$ac_c_werror_flag"
13414 || test ! -s conftest.err'
bec39cab
AC
13415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13416 (eval $ac_try) 2>&5
13417 ac_status=$?
13418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13419 (exit $ac_status); }; } &&
13420 { ac_try='test -s conftest.$ac_objext'
13421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13422 (eval $ac_try) 2>&5
13423 ac_status=$?
13424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13425 (exit $ac_status); }; }; then
a9322a30 13426 ac_cv_have_decl_strstr=yes
bec39cab
AC
13427else
13428 echo "$as_me: failed program was:" >&5
13429sed 's/^/| /' conftest.$ac_ext >&5
13430
a9322a30 13431ac_cv_have_decl_strstr=no
bec39cab
AC
13432fi
13433rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13434fi
13435echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
13436echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
13437if test $ac_cv_have_decl_strstr = yes; then
bec39cab 13438
a9322a30
TT
13439cat >>confdefs.h <<_ACEOF
13440#define HAVE_DECL_STRSTR 1
bec39cab 13441_ACEOF
bec39cab 13442
bec39cab 13443
bec39cab 13444else
bec39cab 13445 cat >>confdefs.h <<_ACEOF
a9322a30 13446#define HAVE_DECL_STRSTR 0
bec39cab 13447_ACEOF
06825bd1 13448
bec39cab 13449
bec39cab 13450fi
a9322a30
TT
13451echo "$as_me:$LINENO: checking whether getopt is declared" >&5
13452echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
13453if test "${ac_cv_have_decl_getopt+set}" = set; then
13454 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13455else
a9322a30 13456 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13457/* confdefs.h. */
13458_ACEOF
13459cat confdefs.h >>conftest.$ac_ext
13460cat >>conftest.$ac_ext <<_ACEOF
13461/* end confdefs.h. */
13462$ac_includes_default
a9322a30
TT
13463int
13464main ()
13465{
13466#ifndef getopt
13467 char *p = (char *) getopt;
13468#endif
13469
13470 ;
13471 return 0;
13472}
bec39cab
AC
13473_ACEOF
13474rm -f conftest.$ac_objext
13475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13476 (eval $ac_compile) 2>conftest.er1
13477 ac_status=$?
13478 grep -v '^ *+' conftest.er1 >conftest.err
13479 rm -f conftest.er1
13480 cat conftest.err >&5
13481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13482 (exit $ac_status); } &&
b4e70030
JB
13483 { ac_try='test -z "$ac_c_werror_flag"
13484 || test ! -s conftest.err'
bec39cab
AC
13485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13486 (eval $ac_try) 2>&5
13487 ac_status=$?
13488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13489 (exit $ac_status); }; } &&
13490 { ac_try='test -s conftest.$ac_objext'
13491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13492 (eval $ac_try) 2>&5
13493 ac_status=$?
13494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13495 (exit $ac_status); }; }; then
a9322a30 13496 ac_cv_have_decl_getopt=yes
bec39cab
AC
13497else
13498 echo "$as_me: failed program was:" >&5
13499sed 's/^/| /' conftest.$ac_ext >&5
13500
a9322a30 13501ac_cv_have_decl_getopt=no
bec39cab
AC
13502fi
13503rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13504fi
13505echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
13506echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
13507if test $ac_cv_have_decl_getopt = yes; then
bec39cab 13508
a9322a30
TT
13509cat >>confdefs.h <<_ACEOF
13510#define HAVE_DECL_GETOPT 1
bec39cab 13511_ACEOF
5ee754fc 13512
bec39cab 13513
5ee754fc 13514else
bec39cab 13515 cat >>confdefs.h <<_ACEOF
a9322a30 13516#define HAVE_DECL_GETOPT 0
bec39cab 13517_ACEOF
c906108c 13518
bec39cab 13519
bec39cab 13520fi
a9322a30
TT
13521echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
13522echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
13523if test "${ac_cv_have_decl_snprintf+set}" = set; then
13524 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13525else
a9322a30 13526 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13527/* confdefs.h. */
13528_ACEOF
13529cat confdefs.h >>conftest.$ac_ext
13530cat >>conftest.$ac_ext <<_ACEOF
13531/* end confdefs.h. */
13532$ac_includes_default
a9322a30
TT
13533int
13534main ()
13535{
13536#ifndef snprintf
13537 char *p = (char *) snprintf;
13538#endif
13539
13540 ;
13541 return 0;
13542}
bec39cab
AC
13543_ACEOF
13544rm -f conftest.$ac_objext
13545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13546 (eval $ac_compile) 2>conftest.er1
13547 ac_status=$?
13548 grep -v '^ *+' conftest.er1 >conftest.err
13549 rm -f conftest.er1
13550 cat conftest.err >&5
13551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13552 (exit $ac_status); } &&
b4e70030
JB
13553 { ac_try='test -z "$ac_c_werror_flag"
13554 || test ! -s conftest.err'
bec39cab
AC
13555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13556 (eval $ac_try) 2>&5
13557 ac_status=$?
13558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13559 (exit $ac_status); }; } &&
13560 { ac_try='test -s conftest.$ac_objext'
13561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13562 (eval $ac_try) 2>&5
13563 ac_status=$?
13564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13565 (exit $ac_status); }; }; then
a9322a30 13566 ac_cv_have_decl_snprintf=yes
bec39cab
AC
13567else
13568 echo "$as_me: failed program was:" >&5
13569sed 's/^/| /' conftest.$ac_ext >&5
13570
a9322a30 13571ac_cv_have_decl_snprintf=no
bec39cab
AC
13572fi
13573rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13574fi
13575echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
13576echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
13577if test $ac_cv_have_decl_snprintf = yes; then
bec39cab 13578
a9322a30
TT
13579cat >>confdefs.h <<_ACEOF
13580#define HAVE_DECL_SNPRINTF 1
bec39cab 13581_ACEOF
c906108c
SS
13582
13583
9608ab8b 13584else
bec39cab 13585 cat >>confdefs.h <<_ACEOF
a9322a30 13586#define HAVE_DECL_SNPRINTF 0
bec39cab 13587_ACEOF
5ee754fc 13588
5ee754fc 13589
bec39cab 13590fi
a9322a30
TT
13591echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
13592echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
13593if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
13594 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13595else
a9322a30 13596 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13597/* confdefs.h. */
13598_ACEOF
13599cat confdefs.h >>conftest.$ac_ext
13600cat >>conftest.$ac_ext <<_ACEOF
13601/* end confdefs.h. */
13602$ac_includes_default
a9322a30
TT
13603int
13604main ()
13605{
13606#ifndef vsnprintf
13607 char *p = (char *) vsnprintf;
13608#endif
13609
13610 ;
13611 return 0;
13612}
bec39cab
AC
13613_ACEOF
13614rm -f conftest.$ac_objext
13615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13616 (eval $ac_compile) 2>conftest.er1
13617 ac_status=$?
13618 grep -v '^ *+' conftest.er1 >conftest.err
13619 rm -f conftest.er1
13620 cat conftest.err >&5
13621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13622 (exit $ac_status); } &&
b4e70030
JB
13623 { ac_try='test -z "$ac_c_werror_flag"
13624 || test ! -s conftest.err'
bec39cab
AC
13625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13626 (eval $ac_try) 2>&5
13627 ac_status=$?
13628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13629 (exit $ac_status); }; } &&
13630 { ac_try='test -s conftest.$ac_objext'
13631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13632 (eval $ac_try) 2>&5
13633 ac_status=$?
13634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13635 (exit $ac_status); }; }; then
a9322a30 13636 ac_cv_have_decl_vsnprintf=yes
bec39cab
AC
13637else
13638 echo "$as_me: failed program was:" >&5
13639sed 's/^/| /' conftest.$ac_ext >&5
13640
a9322a30 13641ac_cv_have_decl_vsnprintf=no
bec39cab
AC
13642fi
13643rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13644fi
13645echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
13646echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
13647if test $ac_cv_have_decl_vsnprintf = yes; then
bec39cab 13648
a9322a30
TT
13649cat >>confdefs.h <<_ACEOF
13650#define HAVE_DECL_VSNPRINTF 1
bec39cab 13651_ACEOF
5ee754fc 13652
5ee754fc 13653
5ee754fc 13654else
bec39cab 13655 cat >>confdefs.h <<_ACEOF
a9322a30 13656#define HAVE_DECL_VSNPRINTF 0
bec39cab 13657_ACEOF
5ee754fc 13658
a9322a30 13659
5ee754fc
MK
13660fi
13661
bec39cab
AC
13662
13663
a8111142
TT
13664 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
13665echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
13666if test "${am_cv_val_LC_MESSAGES+set}" = set; then
13667 echo $ECHO_N "(cached) $ECHO_C" >&6
13668else
13669 cat >conftest.$ac_ext <<_ACEOF
13670/* confdefs.h. */
13671_ACEOF
13672cat confdefs.h >>conftest.$ac_ext
13673cat >>conftest.$ac_ext <<_ACEOF
13674/* end confdefs.h. */
13675#include <locale.h>
13676int
13677main ()
13678{
13679return LC_MESSAGES
13680 ;
13681 return 0;
13682}
13683_ACEOF
13684rm -f conftest.$ac_objext conftest$ac_exeext
13685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13686 (eval $ac_link) 2>conftest.er1
13687 ac_status=$?
13688 grep -v '^ *+' conftest.er1 >conftest.err
13689 rm -f conftest.er1
13690 cat conftest.err >&5
13691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13692 (exit $ac_status); } &&
13693 { ac_try='test -z "$ac_c_werror_flag"
13694 || test ! -s conftest.err'
13695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13696 (eval $ac_try) 2>&5
13697 ac_status=$?
13698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13699 (exit $ac_status); }; } &&
13700 { ac_try='test -s conftest$ac_exeext'
13701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13702 (eval $ac_try) 2>&5
13703 ac_status=$?
13704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13705 (exit $ac_status); }; }; then
13706 am_cv_val_LC_MESSAGES=yes
13707else
13708 echo "$as_me: failed program was:" >&5
13709sed 's/^/| /' conftest.$ac_ext >&5
13710
13711am_cv_val_LC_MESSAGES=no
13712fi
13713rm -f conftest.err conftest.$ac_objext \
13714 conftest$ac_exeext conftest.$ac_ext
13715fi
13716echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
13717echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
13718 if test $am_cv_val_LC_MESSAGES = yes; then
13719
13720cat >>confdefs.h <<\_ACEOF
13721#define HAVE_LC_MESSAGES 1
13722_ACEOF
13723
13724 fi
13725
13726
a9322a30
TT
13727# ----------------------- #
13728# Checks for structures. #
13729# ----------------------- #
13730
13731echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13732echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13733if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
bec39cab 13734 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13735else
a9322a30 13736 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13737/* confdefs.h. */
13738_ACEOF
13739cat confdefs.h >>conftest.$ac_ext
13740cat >>conftest.$ac_ext <<_ACEOF
13741/* end confdefs.h. */
13742$ac_includes_default
a9322a30
TT
13743int
13744main ()
13745{
13746static struct stat ac_aggr;
13747if (ac_aggr.st_blocks)
13748return 0;
13749 ;
13750 return 0;
13751}
bec39cab
AC
13752_ACEOF
13753rm -f conftest.$ac_objext
13754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13755 (eval $ac_compile) 2>conftest.er1
13756 ac_status=$?
13757 grep -v '^ *+' conftest.er1 >conftest.err
13758 rm -f conftest.er1
13759 cat conftest.err >&5
13760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13761 (exit $ac_status); } &&
b4e70030
JB
13762 { ac_try='test -z "$ac_c_werror_flag"
13763 || test ! -s conftest.err'
bec39cab
AC
13764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13765 (eval $ac_try) 2>&5
13766 ac_status=$?
13767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13768 (exit $ac_status); }; } &&
13769 { ac_try='test -s conftest.$ac_objext'
13770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13771 (eval $ac_try) 2>&5
13772 ac_status=$?
13773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13774 (exit $ac_status); }; }; then
a9322a30 13775 ac_cv_member_struct_stat_st_blocks=yes
bec39cab
AC
13776else
13777 echo "$as_me: failed program was:" >&5
13778sed 's/^/| /' conftest.$ac_ext >&5
13779
bec39cab
AC
13780cat >conftest.$ac_ext <<_ACEOF
13781/* confdefs.h. */
13782_ACEOF
13783cat confdefs.h >>conftest.$ac_ext
13784cat >>conftest.$ac_ext <<_ACEOF
13785/* end confdefs.h. */
a9322a30
TT
13786$ac_includes_default
13787int
13788main ()
13789{
13790static struct stat ac_aggr;
13791if (sizeof ac_aggr.st_blocks)
13792return 0;
13793 ;
13794 return 0;
13795}
bec39cab 13796_ACEOF
a9322a30
TT
13797rm -f conftest.$ac_objext
13798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13799 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
13800 ac_status=$?
13801 grep -v '^ *+' conftest.er1 >conftest.err
13802 rm -f conftest.er1
13803 cat conftest.err >&5
13804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13805 (exit $ac_status); } &&
13806 { ac_try='test -z "$ac_c_werror_flag"
13807 || test ! -s conftest.err'
13808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13809 (eval $ac_try) 2>&5
13810 ac_status=$?
13811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13812 (exit $ac_status); }; } &&
13813 { ac_try='test -s conftest.$ac_objext'
13814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13815 (eval $ac_try) 2>&5
13816 ac_status=$?
13817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13818 (exit $ac_status); }; }; then
13819 ac_cv_member_struct_stat_st_blocks=yes
bec39cab
AC
13820else
13821 echo "$as_me: failed program was:" >&5
13822sed 's/^/| /' conftest.$ac_ext >&5
5ee754fc 13823
a9322a30 13824ac_cv_member_struct_stat_st_blocks=no
5ee754fc 13825fi
a9322a30 13826rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13827fi
a9322a30 13828rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13829fi
a9322a30
TT
13830echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13831echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13832if test $ac_cv_member_struct_stat_st_blocks = yes; then
5ee754fc 13833
a9322a30
TT
13834cat >>confdefs.h <<_ACEOF
13835#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13836_ACEOF
5ee754fc 13837
5ee754fc 13838
bec39cab 13839fi
a9322a30
TT
13840echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13841echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13842if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13843 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13844else
a9322a30 13845 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13846/* confdefs.h. */
13847_ACEOF
13848cat confdefs.h >>conftest.$ac_ext
13849cat >>conftest.$ac_ext <<_ACEOF
13850/* end confdefs.h. */
13851$ac_includes_default
a9322a30
TT
13852int
13853main ()
13854{
13855static struct stat ac_aggr;
13856if (ac_aggr.st_blksize)
13857return 0;
13858 ;
13859 return 0;
13860}
bec39cab
AC
13861_ACEOF
13862rm -f conftest.$ac_objext
13863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13864 (eval $ac_compile) 2>conftest.er1
13865 ac_status=$?
13866 grep -v '^ *+' conftest.er1 >conftest.err
13867 rm -f conftest.er1
13868 cat conftest.err >&5
13869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13870 (exit $ac_status); } &&
b4e70030
JB
13871 { ac_try='test -z "$ac_c_werror_flag"
13872 || test ! -s conftest.err'
bec39cab
AC
13873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13874 (eval $ac_try) 2>&5
13875 ac_status=$?
13876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13877 (exit $ac_status); }; } &&
13878 { ac_try='test -s conftest.$ac_objext'
13879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13880 (eval $ac_try) 2>&5
13881 ac_status=$?
13882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13883 (exit $ac_status); }; }; then
a9322a30 13884 ac_cv_member_struct_stat_st_blksize=yes
bec39cab
AC
13885else
13886 echo "$as_me: failed program was:" >&5
13887sed 's/^/| /' conftest.$ac_ext >&5
13888
7eb368b3
NR
13889cat >conftest.$ac_ext <<_ACEOF
13890/* confdefs.h. */
13891_ACEOF
13892cat confdefs.h >>conftest.$ac_ext
13893cat >>conftest.$ac_ext <<_ACEOF
13894/* end confdefs.h. */
13895$ac_includes_default
a9322a30
TT
13896int
13897main ()
13898{
13899static struct stat ac_aggr;
13900if (sizeof ac_aggr.st_blksize)
13901return 0;
13902 ;
13903 return 0;
13904}
7eb368b3
NR
13905_ACEOF
13906rm -f conftest.$ac_objext
13907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13908 (eval $ac_compile) 2>conftest.er1
13909 ac_status=$?
13910 grep -v '^ *+' conftest.er1 >conftest.err
13911 rm -f conftest.er1
13912 cat conftest.err >&5
13913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13914 (exit $ac_status); } &&
13915 { ac_try='test -z "$ac_c_werror_flag"
13916 || test ! -s conftest.err'
13917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13918 (eval $ac_try) 2>&5
13919 ac_status=$?
13920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13921 (exit $ac_status); }; } &&
13922 { ac_try='test -s conftest.$ac_objext'
13923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13924 (eval $ac_try) 2>&5
13925 ac_status=$?
13926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13927 (exit $ac_status); }; }; then
a9322a30 13928 ac_cv_member_struct_stat_st_blksize=yes
7eb368b3
NR
13929else
13930 echo "$as_me: failed program was:" >&5
13931sed 's/^/| /' conftest.$ac_ext >&5
13932
a9322a30 13933ac_cv_member_struct_stat_st_blksize=no
7eb368b3
NR
13934fi
13935rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7eb368b3 13936fi
a9322a30 13937rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7eb368b3 13938fi
a9322a30
TT
13939echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13940echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13941if test $ac_cv_member_struct_stat_st_blksize = yes; then
7eb368b3 13942
a9322a30
TT
13943cat >>confdefs.h <<_ACEOF
13944#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
13945_ACEOF
13946
a9322a30 13947
7eb368b3
NR
13948fi
13949
7eb368b3 13950
a9322a30
TT
13951# ------------------ #
13952# Checks for types. #
13953# ------------------ #
7eb368b3 13954
a9322a30
TT
13955echo "$as_me:$LINENO: checking return type of signal handlers" >&5
13956echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13957if test "${ac_cv_type_signal+set}" = set; then
bec39cab 13958 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13959else
7cb9022a 13960 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13961/* confdefs.h. */
13962_ACEOF
13963cat confdefs.h >>conftest.$ac_ext
13964cat >>conftest.$ac_ext <<_ACEOF
13965/* end confdefs.h. */
a9322a30
TT
13966#include <sys/types.h>
13967#include <signal.h>
13968#ifdef signal
13969# undef signal
13970#endif
13971#ifdef __cplusplus
13972extern "C" void (*signal (int, void (*)(int)))(int);
13973#else
13974void (*signal ()) ();
7cb9022a
MK
13975#endif
13976
a9322a30
TT
13977int
13978main ()
13979{
13980int i;
13981 ;
13982 return 0;
13983}
bec39cab
AC
13984_ACEOF
13985rm -f conftest.$ac_objext
13986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13987 (eval $ac_compile) 2>conftest.er1
13988 ac_status=$?
13989 grep -v '^ *+' conftest.er1 >conftest.err
13990 rm -f conftest.er1
13991 cat conftest.err >&5
13992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13993 (exit $ac_status); } &&
b4e70030
JB
13994 { ac_try='test -z "$ac_c_werror_flag"
13995 || test ! -s conftest.err'
bec39cab
AC
13996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13997 (eval $ac_try) 2>&5
13998 ac_status=$?
13999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14000 (exit $ac_status); }; } &&
14001 { ac_try='test -s conftest.$ac_objext'
14002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14003 (eval $ac_try) 2>&5
14004 ac_status=$?
14005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14006 (exit $ac_status); }; }; then
a9322a30 14007 ac_cv_type_signal=void
bec39cab
AC
14008else
14009 echo "$as_me: failed program was:" >&5
14010sed 's/^/| /' conftest.$ac_ext >&5
14011
a9322a30 14012ac_cv_type_signal=int
bec39cab
AC
14013fi
14014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 14015fi
a9322a30
TT
14016echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
14017echo "${ECHO_T}$ac_cv_type_signal" >&6
bec39cab 14018
a9322a30
TT
14019cat >>confdefs.h <<_ACEOF
14020#define RETSIGTYPE $ac_cv_type_signal
14021_ACEOF
5ee754fc 14022
bec39cab 14023
a9322a30
TT
14024echo "$as_me:$LINENO: checking for socklen_t" >&5
14025echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
14026if test "${ac_cv_type_socklen_t+set}" = set; then
bec39cab 14027 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 14028else
a9322a30 14029 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14030/* confdefs.h. */
14031_ACEOF
14032cat confdefs.h >>conftest.$ac_ext
14033cat >>conftest.$ac_ext <<_ACEOF
14034/* end confdefs.h. */
a9322a30
TT
14035#include <sys/types.h>
14036#include <sys/socket.h>
14037
14038
14039int
14040main ()
14041{
14042if ((socklen_t *) 0)
14043 return 0;
14044if (sizeof (socklen_t))
14045 return 0;
14046 ;
14047 return 0;
14048}
bec39cab
AC
14049_ACEOF
14050rm -f conftest.$ac_objext
14051if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14052 (eval $ac_compile) 2>conftest.er1
14053 ac_status=$?
14054 grep -v '^ *+' conftest.er1 >conftest.err
14055 rm -f conftest.er1
14056 cat conftest.err >&5
14057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14058 (exit $ac_status); } &&
b4e70030
JB
14059 { ac_try='test -z "$ac_c_werror_flag"
14060 || test ! -s conftest.err'
bec39cab
AC
14061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14062 (eval $ac_try) 2>&5
14063 ac_status=$?
14064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14065 (exit $ac_status); }; } &&
14066 { ac_try='test -s conftest.$ac_objext'
14067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14068 (eval $ac_try) 2>&5
14069 ac_status=$?
14070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14071 (exit $ac_status); }; }; then
a9322a30 14072 ac_cv_type_socklen_t=yes
bec39cab
AC
14073else
14074 echo "$as_me: failed program was:" >&5
14075sed 's/^/| /' conftest.$ac_ext >&5
14076
a9322a30 14077ac_cv_type_socklen_t=no
bec39cab
AC
14078fi
14079rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
14080fi
14081echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
14082echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
14083if test $ac_cv_type_socklen_t = yes; then
bec39cab 14084
a9322a30
TT
14085cat >>confdefs.h <<_ACEOF
14086#define HAVE_SOCKLEN_T 1
14087_ACEOF
14088
14089
14090fi
14091
14092
14093# ------------------------------------- #
14094# Checks for compiler characteristics. #
14095# ------------------------------------- #
14096
14097echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14098echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14099if test "${ac_cv_c_const+set}" = set; then
14100 echo $ECHO_N "(cached) $ECHO_C" >&6
14101else
14102 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14103/* confdefs.h. */
14104_ACEOF
14105cat confdefs.h >>conftest.$ac_ext
14106cat >>conftest.$ac_ext <<_ACEOF
14107/* end confdefs.h. */
a9322a30
TT
14108
14109int
14110main ()
14111{
14112/* FIXME: Include the comments suggested by Paul. */
14113#ifndef __cplusplus
14114 /* Ultrix mips cc rejects this. */
14115 typedef int charset[2];
14116 const charset x;
14117 /* SunOS 4.1.1 cc rejects this. */
14118 char const *const *ccp;
14119 char **p;
14120 /* NEC SVR4.0.2 mips cc rejects this. */
14121 struct point {int x, y;};
14122 static struct point const zero = {0,0};
14123 /* AIX XL C 1.02.0.0 rejects this.
14124 It does not let you subtract one const X* pointer from another in
14125 an arm of an if-expression whose if-part is not a constant
14126 expression */
14127 const char *g = "string";
14128 ccp = &g + (g ? g-g : 0);
14129 /* HPUX 7.0 cc rejects these. */
14130 ++ccp;
14131 p = (char**) ccp;
14132 ccp = (char const *const *) p;
14133 { /* SCO 3.2v4 cc rejects this. */
14134 char *t;
14135 char const *s = 0 ? (char *) 0 : (char const *) 0;
14136
14137 *t++ = 0;
14138 }
14139 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14140 int x[] = {25, 17};
14141 const int *foo = &x[0];
14142 ++foo;
14143 }
14144 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14145 typedef const int *iptr;
14146 iptr p = 0;
14147 ++p;
14148 }
14149 { /* AIX XL C 1.02.0.0 rejects this saying
14150 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14151 struct s { int j; const int *ap[3]; };
14152 struct s *b; b->j = 5;
14153 }
14154 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14155 const int foo = 10;
14156 }
14157#endif
14158
14159 ;
14160 return 0;
14161}
bec39cab 14162_ACEOF
a9322a30
TT
14163rm -f conftest.$ac_objext
14164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14165 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14166 ac_status=$?
14167 grep -v '^ *+' conftest.er1 >conftest.err
14168 rm -f conftest.er1
14169 cat conftest.err >&5
14170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
14171 (exit $ac_status); } &&
14172 { ac_try='test -z "$ac_c_werror_flag"
14173 || test ! -s conftest.err'
14174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14175 (eval $ac_try) 2>&5
14176 ac_status=$?
14177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14178 (exit $ac_status); }; } &&
14179 { ac_try='test -s conftest.$ac_objext'
14180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14181 (eval $ac_try) 2>&5
14182 ac_status=$?
14183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14184 (exit $ac_status); }; }; then
14185 ac_cv_c_const=yes
5ee754fc 14186else
bec39cab
AC
14187 echo "$as_me: failed program was:" >&5
14188sed 's/^/| /' conftest.$ac_ext >&5
14189
a9322a30 14190ac_cv_c_const=no
5ee754fc 14191fi
a9322a30 14192rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 14193fi
a9322a30
TT
14194echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14195echo "${ECHO_T}$ac_cv_c_const" >&6
14196if test $ac_cv_c_const = no; then
bec39cab 14197
a9322a30
TT
14198cat >>confdefs.h <<\_ACEOF
14199#define const
bec39cab
AC
14200_ACEOF
14201
5ee754fc 14202fi
bec39cab 14203
a9322a30
TT
14204echo "$as_me:$LINENO: checking for inline" >&5
14205echo $ECHO_N "checking for inline... $ECHO_C" >&6
14206if test "${ac_cv_c_inline+set}" = set; then
bec39cab 14207 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 14208else
a9322a30
TT
14209 ac_cv_c_inline=no
14210for ac_kw in inline __inline__ __inline; do
14211 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14212/* confdefs.h. */
14213_ACEOF
14214cat confdefs.h >>conftest.$ac_ext
14215cat >>conftest.$ac_ext <<_ACEOF
14216/* end confdefs.h. */
a9322a30
TT
14217#ifndef __cplusplus
14218typedef int foo_t;
14219static $ac_kw foo_t static_foo () {return 0; }
14220$ac_kw foo_t foo () {return 0; }
14221#endif
14222
bec39cab
AC
14223_ACEOF
14224rm -f conftest.$ac_objext
14225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14226 (eval $ac_compile) 2>conftest.er1
14227 ac_status=$?
14228 grep -v '^ *+' conftest.er1 >conftest.err
14229 rm -f conftest.er1
14230 cat conftest.err >&5
14231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14232 (exit $ac_status); } &&
b4e70030
JB
14233 { ac_try='test -z "$ac_c_werror_flag"
14234 || test ! -s conftest.err'
bec39cab
AC
14235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14236 (eval $ac_try) 2>&5
14237 ac_status=$?
14238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14239 (exit $ac_status); }; } &&
14240 { ac_try='test -s conftest.$ac_objext'
14241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14242 (eval $ac_try) 2>&5
14243 ac_status=$?
14244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14245 (exit $ac_status); }; }; then
a9322a30 14246 ac_cv_c_inline=$ac_kw; break
bec39cab
AC
14247else
14248 echo "$as_me: failed program was:" >&5
14249sed 's/^/| /' conftest.$ac_ext >&5
14250
bec39cab
AC
14251fi
14252rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 14253done
bec39cab 14254
5ee754fc 14255fi
a9322a30
TT
14256echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
14257echo "${ECHO_T}$ac_cv_c_inline" >&6
bec39cab 14258
5ee754fc 14259
a9322a30
TT
14260case $ac_cv_c_inline in
14261 inline | yes) ;;
14262 *)
14263 case $ac_cv_c_inline in
14264 no) ac_val=;;
14265 *) ac_val=$ac_cv_c_inline;;
14266 esac
14267 cat >>confdefs.h <<_ACEOF
14268#ifndef __cplusplus
14269#define inline $ac_val
14270#endif
14271_ACEOF
bec39cab
AC
14272 ;;
14273esac
bec39cab 14274
a9322a30
TT
14275echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
14276echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
14277if test "${ac_cv_c_bigendian+set}" = set; then
bec39cab 14278 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 14279else
a9322a30 14280 # See if sys/param.h defines the BYTE_ORDER macro.
bec39cab
AC
14281cat >conftest.$ac_ext <<_ACEOF
14282/* confdefs.h. */
14283_ACEOF
14284cat confdefs.h >>conftest.$ac_ext
14285cat >>conftest.$ac_ext <<_ACEOF
14286/* end confdefs.h. */
a9322a30
TT
14287#include <sys/types.h>
14288#include <sys/param.h>
14289
14290int
14291main ()
14292{
14293#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14294 bogus endian macros
14295#endif
14296
14297 ;
14298 return 0;
14299}
bec39cab
AC
14300_ACEOF
14301rm -f conftest.$ac_objext
14302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14303 (eval $ac_compile) 2>conftest.er1
14304 ac_status=$?
14305 grep -v '^ *+' conftest.er1 >conftest.err
14306 rm -f conftest.er1
14307 cat conftest.err >&5
14308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14309 (exit $ac_status); } &&
b4e70030
JB
14310 { ac_try='test -z "$ac_c_werror_flag"
14311 || test ! -s conftest.err'
bec39cab
AC
14312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14313 (eval $ac_try) 2>&5
14314 ac_status=$?
14315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14316 (exit $ac_status); }; } &&
14317 { ac_try='test -s conftest.$ac_objext'
14318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14319 (eval $ac_try) 2>&5
14320 ac_status=$?
14321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14322 (exit $ac_status); }; }; then
a9322a30 14323 # It does; now see whether it defined to BIG_ENDIAN or not.
bec39cab
AC
14324cat >conftest.$ac_ext <<_ACEOF
14325/* confdefs.h. */
14326_ACEOF
14327cat confdefs.h >>conftest.$ac_ext
14328cat >>conftest.$ac_ext <<_ACEOF
14329/* end confdefs.h. */
a9322a30
TT
14330#include <sys/types.h>
14331#include <sys/param.h>
14332
14333int
14334main ()
14335{
14336#if BYTE_ORDER != BIG_ENDIAN
14337 not big endian
14338#endif
14339
14340 ;
14341 return 0;
14342}
bec39cab 14343_ACEOF
a9322a30
TT
14344rm -f conftest.$ac_objext
14345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14346 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14347 ac_status=$?
14348 grep -v '^ *+' conftest.er1 >conftest.err
14349 rm -f conftest.er1
14350 cat conftest.err >&5
14351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
14352 (exit $ac_status); } &&
14353 { ac_try='test -z "$ac_c_werror_flag"
14354 || test ! -s conftest.err'
14355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14356 (eval $ac_try) 2>&5
14357 ac_status=$?
14358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14359 (exit $ac_status); }; } &&
14360 { ac_try='test -s conftest.$ac_objext'
14361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14362 (eval $ac_try) 2>&5
14363 ac_status=$?
14364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14365 (exit $ac_status); }; }; then
14366 ac_cv_c_bigendian=yes
5ee754fc 14367else
bec39cab
AC
14368 echo "$as_me: failed program was:" >&5
14369sed 's/^/| /' conftest.$ac_ext >&5
14370
a9322a30 14371ac_cv_c_bigendian=no
5ee754fc 14372fi
a9322a30 14373rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14374else
a9322a30
TT
14375 echo "$as_me: failed program was:" >&5
14376sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 14377
a9322a30
TT
14378# It does not; compile a test program.
14379if test "$cross_compiling" = yes; then
14380 # try to guess the endianness by grepping values into an object file
14381 ac_cv_c_bigendian=unknown
14382 cat >conftest.$ac_ext <<_ACEOF
14383/* confdefs.h. */
7eb368b3
NR
14384_ACEOF
14385cat confdefs.h >>conftest.$ac_ext
14386cat >>conftest.$ac_ext <<_ACEOF
14387/* end confdefs.h. */
a9322a30
TT
14388short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14389short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14390void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
14391short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14392short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14393void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
7eb368b3
NR
14394int
14395main ()
14396{
a9322a30 14397 _ascii (); _ebcdic ();
7eb368b3
NR
14398 ;
14399 return 0;
14400}
14401_ACEOF
a9322a30
TT
14402rm -f conftest.$ac_objext
14403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14404 (eval $ac_compile) 2>conftest.er1
7eb368b3
NR
14405 ac_status=$?
14406 grep -v '^ *+' conftest.er1 >conftest.err
14407 rm -f conftest.er1
14408 cat conftest.err >&5
14409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14410 (exit $ac_status); } &&
14411 { ac_try='test -z "$ac_c_werror_flag"
14412 || test ! -s conftest.err'
14413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14414 (eval $ac_try) 2>&5
14415 ac_status=$?
14416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14417 (exit $ac_status); }; } &&
a9322a30 14418 { ac_try='test -s conftest.$ac_objext'
7eb368b3
NR
14419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14420 (eval $ac_try) 2>&5
14421 ac_status=$?
14422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14423 (exit $ac_status); }; }; then
a9322a30
TT
14424 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
14425 ac_cv_c_bigendian=yes
14426fi
14427if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14428 if test "$ac_cv_c_bigendian" = unknown; then
14429 ac_cv_c_bigendian=no
14430 else
14431 # finding both strings is unlikely to happen, but who knows?
14432 ac_cv_c_bigendian=unknown
14433 fi
14434fi
7eb368b3
NR
14435else
14436 echo "$as_me: failed program was:" >&5
14437sed 's/^/| /' conftest.$ac_ext >&5
14438
7eb368b3 14439fi
a9322a30 14440rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
14441else
14442 cat >conftest.$ac_ext <<_ACEOF
14443/* confdefs.h. */
14444_ACEOF
14445cat confdefs.h >>conftest.$ac_ext
14446cat >>conftest.$ac_ext <<_ACEOF
14447/* end confdefs.h. */
d3ea6809
MM
14448int
14449main ()
14450{
a9322a30
TT
14451 /* Are we little or big endian? From Harbison&Steele. */
14452 union
14453 {
14454 long l;
14455 char c[sizeof (long)];
14456 } u;
14457 u.l = 1;
14458 exit (u.c[sizeof (long) - 1] == 1);
d3ea6809
MM
14459}
14460_ACEOF
a9322a30 14461rm -f conftest$ac_exeext
d3ea6809 14462if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30 14463 (eval $ac_link) 2>&5
d3ea6809
MM
14464 ac_status=$?
14465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30 14466 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3ea6809
MM
14467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14468 (eval $ac_try) 2>&5
14469 ac_status=$?
14470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14471 (exit $ac_status); }; }; then
a9322a30 14472 ac_cv_c_bigendian=no
d3ea6809 14473else
a9322a30
TT
14474 echo "$as_me: program exited with status $ac_status" >&5
14475echo "$as_me: failed program was:" >&5
d3ea6809
MM
14476sed 's/^/| /' conftest.$ac_ext >&5
14477
a9322a30
TT
14478( exit $ac_status )
14479ac_cv_c_bigendian=yes
d3ea6809 14480fi
a9322a30 14481rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d3ea6809 14482fi
d3ea6809 14483fi
a9322a30
TT
14484rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14485fi
14486echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
14487echo "${ECHO_T}$ac_cv_c_bigendian" >&6
14488case $ac_cv_c_bigendian in
14489 yes)
14490
14491cat >>confdefs.h <<\_ACEOF
14492#define WORDS_BIGENDIAN 1
14493_ACEOF
14494 ;;
14495 no)
14496 ;;
14497 *)
14498 { { echo "$as_me:$LINENO: error: unknown endianness
14499presetting ac_cv_c_bigendian=no (or yes) will help" >&5
14500echo "$as_me: error: unknown endianness
14501presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
14502 { (exit 1); exit 1; }; } ;;
14503esac
d3ea6809
MM
14504
14505
a9322a30
TT
14506# ------------------------------ #
14507# Checks for library functions. #
14508# ------------------------------ #
d3ea6809 14509
a9322a30
TT
14510# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14511# for constant arguments. Useless!
14512echo "$as_me:$LINENO: checking for working alloca.h" >&5
14513echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
14514if test "${ac_cv_working_alloca_h+set}" = set; then
d3ea6809
MM
14515 echo $ECHO_N "(cached) $ECHO_C" >&6
14516else
14517 cat >conftest.$ac_ext <<_ACEOF
14518/* confdefs.h. */
14519_ACEOF
14520cat confdefs.h >>conftest.$ac_ext
14521cat >>conftest.$ac_ext <<_ACEOF
14522/* end confdefs.h. */
a9322a30 14523#include <alloca.h>
bec39cab
AC
14524int
14525main ()
14526{
a9322a30 14527char *p = (char *) alloca (2 * sizeof (int));
bec39cab
AC
14528 ;
14529 return 0;
14530}
14531_ACEOF
14532rm -f conftest.$ac_objext conftest$ac_exeext
14533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14534 (eval $ac_link) 2>conftest.er1
14535 ac_status=$?
14536 grep -v '^ *+' conftest.er1 >conftest.err
14537 rm -f conftest.er1
14538 cat conftest.err >&5
14539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14540 (exit $ac_status); } &&
b4e70030
JB
14541 { ac_try='test -z "$ac_c_werror_flag"
14542 || test ! -s conftest.err'
bec39cab
AC
14543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14544 (eval $ac_try) 2>&5
14545 ac_status=$?
14546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14547 (exit $ac_status); }; } &&
14548 { ac_try='test -s conftest$ac_exeext'
14549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14550 (eval $ac_try) 2>&5
14551 ac_status=$?
14552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14553 (exit $ac_status); }; }; then
a9322a30 14554 ac_cv_working_alloca_h=yes
bec39cab
AC
14555else
14556 echo "$as_me: failed program was:" >&5
14557sed 's/^/| /' conftest.$ac_ext >&5
14558
a9322a30 14559ac_cv_working_alloca_h=no
bec39cab
AC
14560fi
14561rm -f conftest.err conftest.$ac_objext \
14562 conftest$ac_exeext conftest.$ac_ext
14563fi
a9322a30
TT
14564echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14565echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
14566if test $ac_cv_working_alloca_h = yes; then
14567
14568cat >>confdefs.h <<\_ACEOF
14569#define HAVE_ALLOCA_H 1
bec39cab 14570_ACEOF
c906108c 14571
c906108c 14572fi
bec39cab 14573
a9322a30
TT
14574echo "$as_me:$LINENO: checking for alloca" >&5
14575echo $ECHO_N "checking for alloca... $ECHO_C" >&6
14576if test "${ac_cv_func_alloca_works+set}" = set; then
bec39cab
AC
14577 echo $ECHO_N "(cached) $ECHO_C" >&6
14578else
14579 cat >conftest.$ac_ext <<_ACEOF
14580/* confdefs.h. */
14581_ACEOF
14582cat confdefs.h >>conftest.$ac_ext
14583cat >>conftest.$ac_ext <<_ACEOF
14584/* end confdefs.h. */
a9322a30
TT
14585#ifdef __GNUC__
14586# define alloca __builtin_alloca
b4e70030 14587#else
a9322a30
TT
14588# ifdef _MSC_VER
14589# include <malloc.h>
14590# define alloca _alloca
14591# else
14592# if HAVE_ALLOCA_H
14593# include <alloca.h>
14594# else
14595# ifdef _AIX
14596 #pragma alloca
14597# else
14598# ifndef alloca /* predefined by HP cc +Olibcalls */
14599char *alloca ();
14600# endif
14601# endif
14602# endif
14603# endif
c906108c 14604#endif
97bf5e38 14605
bec39cab
AC
14606int
14607main ()
14608{
a9322a30 14609char *p = (char *) alloca (1);
bec39cab
AC
14610 ;
14611 return 0;
14612}
14613_ACEOF
14614rm -f conftest.$ac_objext conftest$ac_exeext
14615if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14616 (eval $ac_link) 2>conftest.er1
14617 ac_status=$?
14618 grep -v '^ *+' conftest.er1 >conftest.err
14619 rm -f conftest.er1
14620 cat conftest.err >&5
14621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14622 (exit $ac_status); } &&
b4e70030
JB
14623 { ac_try='test -z "$ac_c_werror_flag"
14624 || test ! -s conftest.err'
bec39cab
AC
14625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14626 (eval $ac_try) 2>&5
14627 ac_status=$?
14628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14629 (exit $ac_status); }; } &&
14630 { ac_try='test -s conftest$ac_exeext'
14631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14632 (eval $ac_try) 2>&5
14633 ac_status=$?
14634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14635 (exit $ac_status); }; }; then
a9322a30 14636 ac_cv_func_alloca_works=yes
bec39cab
AC
14637else
14638 echo "$as_me: failed program was:" >&5
14639sed 's/^/| /' conftest.$ac_ext >&5
14640
a9322a30 14641ac_cv_func_alloca_works=no
bec39cab
AC
14642fi
14643rm -f conftest.err conftest.$ac_objext \
14644 conftest$ac_exeext conftest.$ac_ext
14645fi
a9322a30
TT
14646echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14647echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
14648
14649if test $ac_cv_func_alloca_works = yes; then
14650
14651cat >>confdefs.h <<\_ACEOF
14652#define HAVE_ALLOCA 1
bec39cab 14653_ACEOF
c906108c 14654
a9322a30
TT
14655else
14656 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14657# that cause trouble. Some versions do not even contain alloca or
14658# contain a buggy version. If you still want to use their alloca,
14659# use ar to extract alloca.o from them instead of compiling alloca.c.
14660
14661ALLOCA=alloca.$ac_objext
14662
14663cat >>confdefs.h <<\_ACEOF
14664#define C_ALLOCA 1
14665_ACEOF
c906108c 14666
bec39cab 14667
a9322a30
TT
14668echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14669echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
14670if test "${ac_cv_os_cray+set}" = set; then
14671 echo $ECHO_N "(cached) $ECHO_C" >&6
14672else
14673 cat >conftest.$ac_ext <<_ACEOF
14674/* confdefs.h. */
14675_ACEOF
14676cat confdefs.h >>conftest.$ac_ext
14677cat >>conftest.$ac_ext <<_ACEOF
14678/* end confdefs.h. */
14679#if defined(CRAY) && ! defined(CRAY2)
14680webecray
14681#else
14682wenotbecray
14683#endif
14684
14685_ACEOF
14686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14687 $EGREP "webecray" >/dev/null 2>&1; then
14688 ac_cv_os_cray=yes
14689else
14690 ac_cv_os_cray=no
14691fi
14692rm -f conftest*
14693
14694fi
14695echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14696echo "${ECHO_T}$ac_cv_os_cray" >&6
14697if test $ac_cv_os_cray = yes; then
14698 for ac_func in _getb67 GETB67 getb67; do
14699 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14700echo "$as_me:$LINENO: checking for $ac_func" >&5
14701echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14702if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
14703 echo $ECHO_N "(cached) $ECHO_C" >&6
14704else
14705 cat >conftest.$ac_ext <<_ACEOF
14706/* confdefs.h. */
14707_ACEOF
14708cat confdefs.h >>conftest.$ac_ext
14709cat >>conftest.$ac_ext <<_ACEOF
14710/* end confdefs.h. */
14711/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14712 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14713#define $ac_func innocuous_$ac_func
14714
97bf5e38 14715/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
14716 which can conflict with char $ac_func (); below.
14717 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14718 <limits.h> exists even on freestanding compilers. */
14719
14720#ifdef __STDC__
14721# include <limits.h>
14722#else
14723# include <assert.h>
14724#endif
c906108c 14725
bec39cab 14726#undef $ac_func
97bf5e38 14727
b4e70030 14728/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
14729#ifdef __cplusplus
14730extern "C"
b4e70030 14731{
bec39cab 14732#endif
b4e70030
JB
14733/* We use char because int might match the return type of a gcc2
14734 builtin and then its argument prototype would still apply. */
bec39cab 14735char $ac_func ();
97bf5e38
MK
14736/* The GNU C library defines this for functions which it implements
14737 to always fail with ENOSYS. Some functions are actually named
14738 something starting with __ and the normal name is an alias. */
b4e70030 14739#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
97bf5e38 14740choke me
b4e70030
JB
14741#else
14742char (*f) () = $ac_func;
14743#endif
14744#ifdef __cplusplus
14745}
c906108c 14746#endif
97bf5e38 14747
bec39cab
AC
14748int
14749main ()
14750{
b4e70030 14751return f != $ac_func;
bec39cab
AC
14752 ;
14753 return 0;
14754}
14755_ACEOF
14756rm -f conftest.$ac_objext conftest$ac_exeext
14757if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14758 (eval $ac_link) 2>conftest.er1
14759 ac_status=$?
14760 grep -v '^ *+' conftest.er1 >conftest.err
14761 rm -f conftest.er1
14762 cat conftest.err >&5
14763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14764 (exit $ac_status); } &&
b4e70030
JB
14765 { ac_try='test -z "$ac_c_werror_flag"
14766 || test ! -s conftest.err'
bec39cab
AC
14767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14768 (eval $ac_try) 2>&5
14769 ac_status=$?
14770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14771 (exit $ac_status); }; } &&
14772 { ac_try='test -s conftest$ac_exeext'
14773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14774 (eval $ac_try) 2>&5
14775 ac_status=$?
14776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14777 (exit $ac_status); }; }; then
14778 eval "$as_ac_var=yes"
14779else
14780 echo "$as_me: failed program was:" >&5
14781sed 's/^/| /' conftest.$ac_ext >&5
14782
b4e70030 14783eval "$as_ac_var=no"
bec39cab
AC
14784fi
14785rm -f conftest.err conftest.$ac_objext \
14786 conftest$ac_exeext conftest.$ac_ext
14787fi
b4e70030
JB
14788echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14789echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab 14790if test `eval echo '${'$as_ac_var'}'` = yes; then
a9322a30
TT
14791
14792cat >>confdefs.h <<_ACEOF
14793#define CRAY_STACKSEG_END $ac_func
bec39cab 14794_ACEOF
c906108c 14795
a9322a30 14796 break
c906108c
SS
14797fi
14798
a9322a30
TT
14799 done
14800fi
bec39cab 14801
a9322a30
TT
14802echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14803echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
14804if test "${ac_cv_c_stack_direction+set}" = set; then
bec39cab 14805 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
14806else
14807 if test "$cross_compiling" = yes; then
14808 ac_cv_c_stack_direction=0
bec39cab
AC
14809else
14810 cat >conftest.$ac_ext <<_ACEOF
14811/* confdefs.h. */
14812_ACEOF
14813cat confdefs.h >>conftest.$ac_ext
14814cat >>conftest.$ac_ext <<_ACEOF
14815/* end confdefs.h. */
a9322a30
TT
14816int
14817find_stack_direction ()
b4e70030 14818{
a9322a30
TT
14819 static char *addr = 0;
14820 auto char dummy;
14821 if (addr == 0)
14822 {
14823 addr = &dummy;
14824 return find_stack_direction ();
14825 }
14826 else
14827 return (&dummy > addr) ? 1 : -1;
b4e70030 14828}
b757528f 14829
bec39cab
AC
14830int
14831main ()
14832{
a9322a30 14833 exit (find_stack_direction () < 0);
bec39cab
AC
14834}
14835_ACEOF
a9322a30 14836rm -f conftest$ac_exeext
bec39cab 14837if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30
TT
14838 (eval $ac_link) 2>&5
14839 ac_status=$?
14840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14843 (eval $ac_try) 2>&5
14844 ac_status=$?
14845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14846 (exit $ac_status); }; }; then
14847 ac_cv_c_stack_direction=1
14848else
14849 echo "$as_me: program exited with status $ac_status" >&5
14850echo "$as_me: failed program was:" >&5
14851sed 's/^/| /' conftest.$ac_ext >&5
14852
14853( exit $ac_status )
14854ac_cv_c_stack_direction=-1
14855fi
14856rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14857fi
14858fi
14859echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14860echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
14861
14862cat >>confdefs.h <<_ACEOF
14863#define STACK_DIRECTION $ac_cv_c_stack_direction
14864_ACEOF
14865
14866
14867fi
14868
14869
14870
14871for ac_header in stdlib.h unistd.h
14872do
14873as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14874if eval "test \"\${$as_ac_Header+set}\" = set"; then
14875 echo "$as_me:$LINENO: checking for $ac_header" >&5
14876echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14877if eval "test \"\${$as_ac_Header+set}\" = set"; then
14878 echo $ECHO_N "(cached) $ECHO_C" >&6
14879fi
14880echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14881echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14882else
14883 # Is the header compilable?
14884echo "$as_me:$LINENO: checking $ac_header usability" >&5
14885echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14886cat >conftest.$ac_ext <<_ACEOF
14887/* confdefs.h. */
14888_ACEOF
14889cat confdefs.h >>conftest.$ac_ext
14890cat >>conftest.$ac_ext <<_ACEOF
14891/* end confdefs.h. */
14892$ac_includes_default
14893#include <$ac_header>
14894_ACEOF
14895rm -f conftest.$ac_objext
14896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14897 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14898 ac_status=$?
14899 grep -v '^ *+' conftest.er1 >conftest.err
14900 rm -f conftest.er1
14901 cat conftest.err >&5
14902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14903 (exit $ac_status); } &&
b4e70030
JB
14904 { ac_try='test -z "$ac_c_werror_flag"
14905 || test ! -s conftest.err'
bec39cab
AC
14906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14907 (eval $ac_try) 2>&5
14908 ac_status=$?
14909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14910 (exit $ac_status); }; } &&
a9322a30 14911 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
14912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14913 (eval $ac_try) 2>&5
14914 ac_status=$?
14915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14916 (exit $ac_status); }; }; then
a9322a30
TT
14917 ac_header_compiler=yes
14918else
14919 echo "$as_me: failed program was:" >&5
14920sed 's/^/| /' conftest.$ac_ext >&5
14921
14922ac_header_compiler=no
14923fi
14924rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14925echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14926echo "${ECHO_T}$ac_header_compiler" >&6
14927
14928# Is the header present?
14929echo "$as_me:$LINENO: checking $ac_header presence" >&5
14930echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14931cat >conftest.$ac_ext <<_ACEOF
14932/* confdefs.h. */
14933_ACEOF
14934cat confdefs.h >>conftest.$ac_ext
14935cat >>conftest.$ac_ext <<_ACEOF
14936/* end confdefs.h. */
14937#include <$ac_header>
14938_ACEOF
14939if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14940 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14941 ac_status=$?
14942 grep -v '^ *+' conftest.er1 >conftest.err
14943 rm -f conftest.er1
14944 cat conftest.err >&5
14945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14946 (exit $ac_status); } >/dev/null; then
14947 if test -s conftest.err; then
14948 ac_cpp_err=$ac_c_preproc_warn_flag
14949 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14950 else
14951 ac_cpp_err=
14952 fi
14953else
14954 ac_cpp_err=yes
14955fi
14956if test -z "$ac_cpp_err"; then
14957 ac_header_preproc=yes
bec39cab
AC
14958else
14959 echo "$as_me: failed program was:" >&5
14960sed 's/^/| /' conftest.$ac_ext >&5
14961
a9322a30
TT
14962 ac_header_preproc=no
14963fi
14964rm -f conftest.err conftest.$ac_ext
14965echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14966echo "${ECHO_T}$ac_header_preproc" >&6
14967
14968# So? What about this header?
14969case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14970 yes:no: )
14971 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14972echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14973 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14974echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14975 ac_header_preproc=yes
14976 ;;
14977 no:yes:* )
14978 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14979echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14980 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14981echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14982 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14983echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14984 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14985echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
14986 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14987echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14988 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14989echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14990 (
14991 cat <<\_ASBOX
14992## ------------------------------------------ ##
14993## Report this to the AC_PACKAGE_NAME lists. ##
14994## ------------------------------------------ ##
14995_ASBOX
14996 ) |
14997 sed "s/^/$as_me: WARNING: /" >&2
14998 ;;
14999esac
15000echo "$as_me:$LINENO: checking for $ac_header" >&5
15001echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15002if eval "test \"\${$as_ac_Header+set}\" = set"; then
15003 echo $ECHO_N "(cached) $ECHO_C" >&6
15004else
15005 eval "$as_ac_Header=\$ac_header_preproc"
bec39cab 15006fi
a9322a30
TT
15007echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15008echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15009
bec39cab 15010fi
a9322a30 15011if test `eval echo '${'$as_ac_Header'}'` = yes; then
bec39cab 15012 cat >>confdefs.h <<_ACEOF
a9322a30 15013#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 15014_ACEOF
b757528f 15015
b757528f 15016fi
bec39cab 15017
a9322a30 15018done
a3828db0 15019
83116857 15020
a9322a30 15021for ac_func in getpagesize
bcb3dc3d 15022do
bec39cab 15023as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15024echo "$as_me:$LINENO: checking for $ac_func" >&5
15025echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15026if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
15027 echo $ECHO_N "(cached) $ECHO_C" >&6
15028else
15029 cat >conftest.$ac_ext <<_ACEOF
15030/* confdefs.h. */
15031_ACEOF
15032cat confdefs.h >>conftest.$ac_ext
15033cat >>conftest.$ac_ext <<_ACEOF
15034/* end confdefs.h. */
15035/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15036 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15037#define $ac_func innocuous_$ac_func
15038
bcb3dc3d 15039/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
15040 which can conflict with char $ac_func (); below.
15041 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15042 <limits.h> exists even on freestanding compilers. */
15043
15044#ifdef __STDC__
15045# include <limits.h>
15046#else
15047# include <assert.h>
15048#endif
bcb3dc3d 15049
bec39cab 15050#undef $ac_func
bcb3dc3d 15051
b4e70030 15052/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
15053#ifdef __cplusplus
15054extern "C"
b4e70030 15055{
bec39cab 15056#endif
b4e70030
JB
15057/* We use char because int might match the return type of a gcc2
15058 builtin and then its argument prototype would still apply. */
bec39cab 15059char $ac_func ();
bcb3dc3d
MK
15060/* The GNU C library defines this for functions which it implements
15061 to always fail with ENOSYS. Some functions are actually named
15062 something starting with __ and the normal name is an alias. */
b4e70030 15063#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
bcb3dc3d 15064choke me
b4e70030
JB
15065#else
15066char (*f) () = $ac_func;
15067#endif
15068#ifdef __cplusplus
15069}
bcb3dc3d
MK
15070#endif
15071
bec39cab
AC
15072int
15073main ()
15074{
b4e70030 15075return f != $ac_func;
bec39cab
AC
15076 ;
15077 return 0;
15078}
15079_ACEOF
15080rm -f conftest.$ac_objext conftest$ac_exeext
15081if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15082 (eval $ac_link) 2>conftest.er1
15083 ac_status=$?
15084 grep -v '^ *+' conftest.er1 >conftest.err
15085 rm -f conftest.er1
15086 cat conftest.err >&5
15087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15088 (exit $ac_status); } &&
b4e70030
JB
15089 { ac_try='test -z "$ac_c_werror_flag"
15090 || test ! -s conftest.err'
bec39cab
AC
15091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15092 (eval $ac_try) 2>&5
15093 ac_status=$?
15094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15095 (exit $ac_status); }; } &&
15096 { ac_try='test -s conftest$ac_exeext'
15097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15098 (eval $ac_try) 2>&5
15099 ac_status=$?
15100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15101 (exit $ac_status); }; }; then
15102 eval "$as_ac_var=yes"
15103else
15104 echo "$as_me: failed program was:" >&5
15105sed 's/^/| /' conftest.$ac_ext >&5
15106
b4e70030 15107eval "$as_ac_var=no"
bec39cab
AC
15108fi
15109rm -f conftest.err conftest.$ac_objext \
15110 conftest$ac_exeext conftest.$ac_ext
15111fi
b4e70030
JB
15112echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15113echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
15114if test `eval echo '${'$as_ac_var'}'` = yes; then
15115 cat >>confdefs.h <<_ACEOF
15116#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15117_ACEOF
bcb3dc3d 15118
bcb3dc3d
MK
15119fi
15120done
15121
a9322a30
TT
15122echo "$as_me:$LINENO: checking for working mmap" >&5
15123echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
15124if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
bec39cab 15125 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
15126else
15127 if test "$cross_compiling" = yes; then
15128 ac_cv_func_mmap_fixed_mapped=no
bec39cab
AC
15129else
15130 cat >conftest.$ac_ext <<_ACEOF
15131/* confdefs.h. */
15132_ACEOF
15133cat confdefs.h >>conftest.$ac_ext
15134cat >>conftest.$ac_ext <<_ACEOF
15135/* end confdefs.h. */
a9322a30
TT
15136$ac_includes_default
15137/* malloc might have been renamed as rpl_malloc. */
15138#undef malloc
bec39cab 15139
a9322a30
TT
15140/* Thanks to Mike Haertel and Jim Avera for this test.
15141 Here is a matrix of mmap possibilities:
15142 mmap private not fixed
15143 mmap private fixed at somewhere currently unmapped
15144 mmap private fixed at somewhere already mapped
15145 mmap shared not fixed
15146 mmap shared fixed at somewhere currently unmapped
15147 mmap shared fixed at somewhere already mapped
15148 For private mappings, we should verify that changes cannot be read()
15149 back from the file, nor mmap's back from the file at a different
15150 address. (There have been systems where private was not correctly
15151 implemented like the infamous i386 svr4.0, and systems where the
15152 VM page cache was not coherent with the file system buffer cache
15153 like early versions of FreeBSD and possibly contemporary NetBSD.)
15154 For shared mappings, we should conversely verify that changes get
15155 propagated back to all the places they're supposed to be.
bec39cab 15156
a9322a30
TT
15157 Grep wants private fixed already mapped.
15158 The main things grep needs to know about mmap are:
15159 * does it exist and is it safe to write into the mmap'd area
15160 * how to use it (BSD variants) */
8b9cf735 15161
a9322a30
TT
15162#include <fcntl.h>
15163#include <sys/mman.h>
8b9cf735 15164
a9322a30
TT
15165#if !STDC_HEADERS && !HAVE_STDLIB_H
15166char *malloc ();
a3828db0
MK
15167#endif
15168
a9322a30
TT
15169/* This mess was copied from the GNU getpagesize.h. */
15170#if !HAVE_GETPAGESIZE
15171/* Assume that all systems that can run configure have sys/param.h. */
15172# if !HAVE_SYS_PARAM_H
15173# define HAVE_SYS_PARAM_H 1
15174# endif
15175
15176# ifdef _SC_PAGESIZE
15177# define getpagesize() sysconf(_SC_PAGESIZE)
15178# else /* no _SC_PAGESIZE */
15179# if HAVE_SYS_PARAM_H
15180# include <sys/param.h>
15181# ifdef EXEC_PAGESIZE
15182# define getpagesize() EXEC_PAGESIZE
15183# else /* no EXEC_PAGESIZE */
15184# ifdef NBPG
15185# define getpagesize() NBPG * CLSIZE
15186# ifndef CLSIZE
15187# define CLSIZE 1
15188# endif /* no CLSIZE */
15189# else /* no NBPG */
15190# ifdef NBPC
15191# define getpagesize() NBPC
15192# else /* no NBPC */
15193# ifdef PAGESIZE
15194# define getpagesize() PAGESIZE
15195# endif /* PAGESIZE */
15196# endif /* no NBPC */
15197# endif /* no NBPG */
15198# endif /* no EXEC_PAGESIZE */
15199# else /* no HAVE_SYS_PARAM_H */
15200# define getpagesize() 8192 /* punt totally */
15201# endif /* no HAVE_SYS_PARAM_H */
15202# endif /* no _SC_PAGESIZE */
15203
15204#endif /* no HAVE_GETPAGESIZE */
15205
bec39cab
AC
15206int
15207main ()
15208{
a9322a30
TT
15209 char *data, *data2, *data3;
15210 int i, pagesize;
15211 int fd;
15212
15213 pagesize = getpagesize ();
15214
15215 /* First, make a file with some known garbage in it. */
15216 data = (char *) malloc (pagesize);
15217 if (!data)
15218 exit (1);
15219 for (i = 0; i < pagesize; ++i)
15220 *(data + i) = rand ();
15221 umask (0);
15222 fd = creat ("conftest.mmap", 0600);
15223 if (fd < 0)
15224 exit (1);
15225 if (write (fd, data, pagesize) != pagesize)
15226 exit (1);
15227 close (fd);
15228
15229 /* Next, try to mmap the file at a fixed address which already has
15230 something else allocated at it. If we can, also make sure that
15231 we see the same garbage. */
15232 fd = open ("conftest.mmap", O_RDWR);
15233 if (fd < 0)
15234 exit (1);
15235 data2 = (char *) malloc (2 * pagesize);
15236 if (!data2)
15237 exit (1);
15238 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
15239 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
15240 MAP_PRIVATE | MAP_FIXED, fd, 0L))
15241 exit (1);
15242 for (i = 0; i < pagesize; ++i)
15243 if (*(data + i) != *(data2 + i))
15244 exit (1);
15245
15246 /* Finally, make sure that changes to the mapped area do not
15247 percolate back to the file as seen by read(). (This is a bug on
15248 some variants of i386 svr4.0.) */
15249 for (i = 0; i < pagesize; ++i)
15250 *(data2 + i) = *(data2 + i) + 1;
15251 data3 = (char *) malloc (pagesize);
15252 if (!data3)
15253 exit (1);
15254 if (read (fd, data3, pagesize) != pagesize)
15255 exit (1);
15256 for (i = 0; i < pagesize; ++i)
15257 if (*(data + i) != *(data3 + i))
15258 exit (1);
15259 close (fd);
15260 exit (0);
bec39cab
AC
15261}
15262_ACEOF
a9322a30 15263rm -f conftest$ac_exeext
a3828db0 15264if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30 15265 (eval $ac_link) 2>&5
bec39cab
AC
15266 ac_status=$?
15267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30 15268 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
15269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15270 (eval $ac_try) 2>&5
15271 ac_status=$?
15272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15273 (exit $ac_status); }; }; then
a9322a30 15274 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 15275else
a9322a30
TT
15276 echo "$as_me: program exited with status $ac_status" >&5
15277echo "$as_me: failed program was:" >&5
bec39cab
AC
15278sed 's/^/| /' conftest.$ac_ext >&5
15279
a9322a30
TT
15280( exit $ac_status )
15281ac_cv_func_mmap_fixed_mapped=no
a3828db0 15282fi
a9322a30 15283rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a3828db0 15284fi
a9322a30
TT
15285fi
15286echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
15287echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
15288if test $ac_cv_func_mmap_fixed_mapped = yes; then
15289
15290cat >>confdefs.h <<\_ACEOF
15291#define HAVE_MMAP 1
a3828db0
MK
15292_ACEOF
15293
086ec9eb 15294fi
a9322a30 15295rm -f conftest.mmap
a3828db0 15296
a9322a30
TT
15297echo "$as_me:$LINENO: checking for pid_t" >&5
15298echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15299if test "${ac_cv_type_pid_t+set}" = set; then
a3828db0
MK
15300 echo $ECHO_N "(cached) $ECHO_C" >&6
15301else
15302 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15303/* confdefs.h. */
15304_ACEOF
15305cat confdefs.h >>conftest.$ac_ext
15306cat >>conftest.$ac_ext <<_ACEOF
15307/* end confdefs.h. */
a9322a30 15308$ac_includes_default
bec39cab
AC
15309int
15310main ()
15311{
a9322a30
TT
15312if ((pid_t *) 0)
15313 return 0;
15314if (sizeof (pid_t))
15315 return 0;
bec39cab
AC
15316 ;
15317 return 0;
15318}
15319_ACEOF
a9322a30
TT
15320rm -f conftest.$ac_objext
15321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15322 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
15323 ac_status=$?
15324 grep -v '^ *+' conftest.er1 >conftest.err
15325 rm -f conftest.er1
15326 cat conftest.err >&5
15327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328 (exit $ac_status); } &&
b4e70030
JB
15329 { ac_try='test -z "$ac_c_werror_flag"
15330 || test ! -s conftest.err'
bec39cab
AC
15331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15332 (eval $ac_try) 2>&5
15333 ac_status=$?
15334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15335 (exit $ac_status); }; } &&
a9322a30 15336 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
15337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15338 (eval $ac_try) 2>&5
15339 ac_status=$?
15340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15341 (exit $ac_status); }; }; then
a9322a30 15342 ac_cv_type_pid_t=yes
086ec9eb 15343else
bec39cab
AC
15344 echo "$as_me: failed program was:" >&5
15345sed 's/^/| /' conftest.$ac_ext >&5
15346
a9322a30 15347ac_cv_type_pid_t=no
086ec9eb 15348fi
a9322a30 15349rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
086ec9eb 15350fi
a9322a30
TT
15351echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
15352echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15353if test $ac_cv_type_pid_t = yes; then
15354 :
15355else
15356
15357cat >>confdefs.h <<_ACEOF
15358#define pid_t int
bec39cab 15359_ACEOF
086ec9eb
MK
15360
15361fi
15362
a3828db0 15363
a9322a30
TT
15364
15365for ac_header in unistd.h vfork.h
a3828db0 15366do
a9322a30
TT
15367as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15368if eval "test \"\${$as_ac_Header+set}\" = set"; then
15369 echo "$as_me:$LINENO: checking for $ac_header" >&5
15370echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15371if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 15372 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
15373fi
15374echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15375echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 15376else
a9322a30
TT
15377 # Is the header compilable?
15378echo "$as_me:$LINENO: checking $ac_header usability" >&5
15379echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15380cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15381/* confdefs.h. */
15382_ACEOF
15383cat confdefs.h >>conftest.$ac_ext
15384cat >>conftest.$ac_ext <<_ACEOF
15385/* end confdefs.h. */
a9322a30
TT
15386$ac_includes_default
15387#include <$ac_header>
bec39cab 15388_ACEOF
a9322a30
TT
15389rm -f conftest.$ac_objext
15390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15391 (eval $ac_compile) 2>conftest.er1
bec39cab 15392 ac_status=$?
a3828db0
MK
15393 grep -v '^ *+' conftest.er1 >conftest.err
15394 rm -f conftest.er1
15395 cat conftest.err >&5
bec39cab 15396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 15397 (exit $ac_status); } &&
b4e70030
JB
15398 { ac_try='test -z "$ac_c_werror_flag"
15399 || test ! -s conftest.err'
a3828db0
MK
15400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15401 (eval $ac_try) 2>&5
15402 ac_status=$?
15403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15404 (exit $ac_status); }; } &&
a9322a30 15405 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
15406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15407 (eval $ac_try) 2>&5
15408 ac_status=$?
15409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15410 (exit $ac_status); }; }; then
a9322a30 15411 ac_header_compiler=yes
c906108c 15412else
a3828db0 15413 echo "$as_me: failed program was:" >&5
bec39cab
AC
15414sed 's/^/| /' conftest.$ac_ext >&5
15415
a9322a30 15416ac_header_compiler=no
97bf5e38 15417fi
a9322a30
TT
15418rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15419echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15420echo "${ECHO_T}$ac_header_compiler" >&6
15421
15422# Is the header present?
15423echo "$as_me:$LINENO: checking $ac_header presence" >&5
15424echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15425cat >conftest.$ac_ext <<_ACEOF
15426/* confdefs.h. */
15427_ACEOF
15428cat confdefs.h >>conftest.$ac_ext
15429cat >>conftest.$ac_ext <<_ACEOF
15430/* end confdefs.h. */
15431#include <$ac_header>
15432_ACEOF
15433if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15434 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15435 ac_status=$?
15436 grep -v '^ *+' conftest.er1 >conftest.err
15437 rm -f conftest.er1
15438 cat conftest.err >&5
15439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15440 (exit $ac_status); } >/dev/null; then
15441 if test -s conftest.err; then
15442 ac_cpp_err=$ac_c_preproc_warn_flag
15443 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15444 else
15445 ac_cpp_err=
15446 fi
15447else
15448 ac_cpp_err=yes
a3828db0 15449fi
a9322a30
TT
15450if test -z "$ac_cpp_err"; then
15451 ac_header_preproc=yes
15452else
15453 echo "$as_me: failed program was:" >&5
15454sed 's/^/| /' conftest.$ac_ext >&5
15455
15456 ac_header_preproc=no
15457fi
15458rm -f conftest.err conftest.$ac_ext
15459echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15460echo "${ECHO_T}$ac_header_preproc" >&6
15461
15462# So? What about this header?
15463case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15464 yes:no: )
15465 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15466echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15467 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15468echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15469 ac_header_preproc=yes
15470 ;;
15471 no:yes:* )
15472 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15473echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15474 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15475echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15476 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15477echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15478 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15479echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
15480 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15481echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15482 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15483echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15484 (
15485 cat <<\_ASBOX
15486## ------------------------------------------ ##
15487## Report this to the AC_PACKAGE_NAME lists. ##
15488## ------------------------------------------ ##
15489_ASBOX
15490 ) |
15491 sed "s/^/$as_me: WARNING: /" >&2
15492 ;;
15493esac
15494echo "$as_me:$LINENO: checking for $ac_header" >&5
15495echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15496if eval "test \"\${$as_ac_Header+set}\" = set"; then
15497 echo $ECHO_N "(cached) $ECHO_C" >&6
15498else
15499 eval "$as_ac_Header=\$ac_header_preproc"
15500fi
15501echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15502echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15503
15504fi
15505if test `eval echo '${'$as_ac_Header'}'` = yes; then
a3828db0 15506 cat >>confdefs.h <<_ACEOF
a9322a30 15507#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 15508_ACEOF
c906108c
SS
15509
15510fi
a9322a30 15511
a3828db0 15512done
c906108c 15513
a3828db0 15514
a9322a30
TT
15515
15516for ac_func in fork vfork
a3828db0
MK
15517do
15518as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15519echo "$as_me:$LINENO: checking for $ac_func" >&5
15520echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15521if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 15522 echo $ECHO_N "(cached) $ECHO_C" >&6
b83266a0 15523else
bec39cab
AC
15524 cat >conftest.$ac_ext <<_ACEOF
15525/* confdefs.h. */
15526_ACEOF
15527cat confdefs.h >>conftest.$ac_ext
15528cat >>conftest.$ac_ext <<_ACEOF
15529/* end confdefs.h. */
a3828db0
MK
15530/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15531 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15532#define $ac_func innocuous_$ac_func
b83266a0 15533
a3828db0
MK
15534/* System header to define __stub macros and hopefully few prototypes,
15535 which can conflict with char $ac_func (); below.
15536 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15537 <limits.h> exists even on freestanding compilers. */
15538
15539#ifdef __STDC__
15540# include <limits.h>
15541#else
15542# include <assert.h>
15543#endif
15544
15545#undef $ac_func
15546
b4e70030 15547/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
15548#ifdef __cplusplus
15549extern "C"
b4e70030 15550{
a3828db0 15551#endif
b4e70030
JB
15552/* We use char because int might match the return type of a gcc2
15553 builtin and then its argument prototype would still apply. */
a3828db0
MK
15554char $ac_func ();
15555/* The GNU C library defines this for functions which it implements
15556 to always fail with ENOSYS. Some functions are actually named
15557 something starting with __ and the normal name is an alias. */
b4e70030 15558#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 15559choke me
b4e70030
JB
15560#else
15561char (*f) () = $ac_func;
15562#endif
15563#ifdef __cplusplus
15564}
a3828db0 15565#endif
97bf5e38 15566
bec39cab
AC
15567int
15568main ()
15569{
b4e70030 15570return f != $ac_func;
bec39cab
AC
15571 ;
15572 return 0;
15573}
15574_ACEOF
a3828db0
MK
15575rm -f conftest.$ac_objext conftest$ac_exeext
15576if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15577 (eval $ac_link) 2>conftest.er1
bec39cab
AC
15578 ac_status=$?
15579 grep -v '^ *+' conftest.er1 >conftest.err
15580 rm -f conftest.er1
15581 cat conftest.err >&5
15582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15583 (exit $ac_status); } &&
b4e70030
JB
15584 { ac_try='test -z "$ac_c_werror_flag"
15585 || test ! -s conftest.err'
bec39cab
AC
15586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15587 (eval $ac_try) 2>&5
15588 ac_status=$?
15589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15590 (exit $ac_status); }; } &&
a3828db0 15591 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
15592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15593 (eval $ac_try) 2>&5
15594 ac_status=$?
15595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15596 (exit $ac_status); }; }; then
a3828db0 15597 eval "$as_ac_var=yes"
b83266a0 15598else
bec39cab
AC
15599 echo "$as_me: failed program was:" >&5
15600sed 's/^/| /' conftest.$ac_ext >&5
15601
b4e70030 15602eval "$as_ac_var=no"
b83266a0 15603fi
a3828db0
MK
15604rm -f conftest.err conftest.$ac_objext \
15605 conftest$ac_exeext conftest.$ac_ext
b83266a0 15606fi
b4e70030
JB
15607echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15608echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
15609if test `eval echo '${'$as_ac_var'}'` = yes; then
15610 cat >>confdefs.h <<_ACEOF
15611#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 15612_ACEOF
b83266a0 15613
97bf5e38 15614fi
a3828db0 15615done
b83266a0 15616
a9322a30
TT
15617if test "x$ac_cv_func_fork" = xyes; then
15618 echo "$as_me:$LINENO: checking for working fork" >&5
15619echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15620if test "${ac_cv_func_fork_works+set}" = set; then
15621 echo $ECHO_N "(cached) $ECHO_C" >&6
15622else
15623 if test "$cross_compiling" = yes; then
15624 ac_cv_func_fork_works=cross
15625else
15626 cat >conftest.$ac_ext <<_ACEOF
15627/* By Ruediger Kuhlmann. */
15628 #include <sys/types.h>
15629 #if HAVE_UNISTD_H
15630 # include <unistd.h>
15631 #endif
15632 /* Some systems only have a dummy stub for fork() */
15633 int main ()
15634 {
15635 if (fork() < 0)
15636 exit (1);
15637 exit (0);
15638 }
15639_ACEOF
15640rm -f conftest$ac_exeext
15641if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15642 (eval $ac_link) 2>&5
15643 ac_status=$?
15644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15645 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15647 (eval $ac_try) 2>&5
15648 ac_status=$?
15649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15650 (exit $ac_status); }; }; then
15651 ac_cv_func_fork_works=yes
15652else
15653 echo "$as_me: program exited with status $ac_status" >&5
15654echo "$as_me: failed program was:" >&5
15655sed 's/^/| /' conftest.$ac_ext >&5
15656
15657( exit $ac_status )
15658ac_cv_func_fork_works=no
15659fi
15660rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15661fi
15662fi
15663echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
15664echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15665
15666else
15667 ac_cv_func_fork_works=$ac_cv_func_fork
15668fi
15669if test "x$ac_cv_func_fork_works" = xcross; then
15670 case $host in
15671 *-*-amigaos* | *-*-msdosdjgpp*)
15672 # Override, as these systems have only a dummy fork() stub
15673 ac_cv_func_fork_works=no
15674 ;;
15675 *)
15676 ac_cv_func_fork_works=yes
15677 ;;
15678 esac
15679 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15680echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15681fi
15682ac_cv_func_vfork_works=$ac_cv_func_vfork
15683if test "x$ac_cv_func_vfork" = xyes; then
15684 echo "$as_me:$LINENO: checking for working vfork" >&5
15685echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15686if test "${ac_cv_func_vfork_works+set}" = set; then
15687 echo $ECHO_N "(cached) $ECHO_C" >&6
15688else
15689 if test "$cross_compiling" = yes; then
15690 ac_cv_func_vfork_works=cross
15691else
15692 cat >conftest.$ac_ext <<_ACEOF
15693/* confdefs.h. */
15694_ACEOF
15695cat confdefs.h >>conftest.$ac_ext
15696cat >>conftest.$ac_ext <<_ACEOF
15697/* end confdefs.h. */
15698/* Thanks to Paul Eggert for this test. */
15699#include <stdio.h>
15700#include <stdlib.h>
15701#include <sys/types.h>
15702#include <sys/stat.h>
15703#include <sys/wait.h>
15704#if HAVE_UNISTD_H
15705# include <unistd.h>
15706#endif
15707#if HAVE_VFORK_H
15708# include <vfork.h>
15709#endif
15710/* On some sparc systems, changes by the child to local and incoming
15711 argument registers are propagated back to the parent. The compiler
15712 is told about this with #include <vfork.h>, but some compilers
15713 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15714 static variable whose address is put into a register that is
15715 clobbered by the vfork. */
15716static void
15717#ifdef __cplusplus
15718sparc_address_test (int arg)
15719# else
15720sparc_address_test (arg) int arg;
15721#endif
15722{
15723 static pid_t child;
15724 if (!child) {
15725 child = vfork ();
15726 if (child < 0) {
15727 perror ("vfork");
15728 _exit(2);
15729 }
15730 if (!child) {
15731 arg = getpid();
15732 write(-1, "", 0);
15733 _exit (arg);
15734 }
15735 }
15736}
15737
15738int
15739main ()
15740{
15741 pid_t parent = getpid ();
15742 pid_t child;
15743
15744 sparc_address_test (0);
15745
15746 child = vfork ();
15747
15748 if (child == 0) {
15749 /* Here is another test for sparc vfork register problems. This
15750 test uses lots of local variables, at least as many local
15751 variables as main has allocated so far including compiler
15752 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15753 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15754 reuse the register of parent for one of the local variables,
15755 since it will think that parent can't possibly be used any more
15756 in this routine. Assigning to the local variable will thus
15757 munge parent in the parent process. */
15758 pid_t
15759 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15760 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15761 /* Convince the compiler that p..p7 are live; otherwise, it might
15762 use the same hardware register for all 8 local variables. */
15763 if (p != p1 || p != p2 || p != p3 || p != p4
15764 || p != p5 || p != p6 || p != p7)
15765 _exit(1);
15766
15767 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15768 from child file descriptors. If the child closes a descriptor
15769 before it execs or exits, this munges the parent's descriptor
15770 as well. Test for this by closing stdout in the child. */
15771 _exit(close(fileno(stdout)) != 0);
15772 } else {
15773 int status;
15774 struct stat st;
15775
15776 while (wait(&status) != child)
15777 ;
15778 exit(
15779 /* Was there some problem with vforking? */
15780 child < 0
15781
15782 /* Did the child fail? (This shouldn't happen.) */
15783 || status
15784
15785 /* Did the vfork/compiler bug occur? */
15786 || parent != getpid()
15787
15788 /* Did the file descriptor bug occur? */
15789 || fstat(fileno(stdout), &st) != 0
15790 );
15791 }
15792}
15793_ACEOF
15794rm -f conftest$ac_exeext
15795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15796 (eval $ac_link) 2>&5
15797 ac_status=$?
15798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15801 (eval $ac_try) 2>&5
15802 ac_status=$?
15803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15804 (exit $ac_status); }; }; then
15805 ac_cv_func_vfork_works=yes
15806else
15807 echo "$as_me: program exited with status $ac_status" >&5
15808echo "$as_me: failed program was:" >&5
15809sed 's/^/| /' conftest.$ac_ext >&5
15810
15811( exit $ac_status )
15812ac_cv_func_vfork_works=no
15813fi
15814rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15815fi
15816fi
15817echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
15818echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15819
15820fi;
15821if test "x$ac_cv_func_fork_works" = xcross; then
15822 ac_cv_func_vfork_works=$ac_cv_func_vfork
15823 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15824echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15825fi
15826
15827if test "x$ac_cv_func_vfork_works" = xyes; then
15828
15829cat >>confdefs.h <<\_ACEOF
15830#define HAVE_WORKING_VFORK 1
15831_ACEOF
15832
15833else
15834
15835cat >>confdefs.h <<\_ACEOF
15836#define vfork fork
15837_ACEOF
15838
15839fi
15840if test "x$ac_cv_func_fork_works" = xyes; then
15841
15842cat >>confdefs.h <<\_ACEOF
15843#define HAVE_WORKING_FORK 1
15844_ACEOF
15845
15846fi
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
a3828db0 15865
fc3b640d 15866
732f6a93 15867
1983cb9a 15868
6c7a06a3 15869
a8111142 15870
a9322a30 15871for ac_func in canonicalize_file_name realpath getrusage getuid \
a156a290 15872 getgid pipe poll pread64 sbrk setpgid setpgrp setsid \
a9322a30 15873 sigaction sigprocmask sigsetmask socketpair syscall \
732f6a93 15874 ttrace wborder setlocale iconvlist libiconvlist btowc
a3828db0
MK
15875do
15876as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15877echo "$as_me:$LINENO: checking for $ac_func" >&5
15878echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15879if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
15880 echo $ECHO_N "(cached) $ECHO_C" >&6
15881else
15882 cat >conftest.$ac_ext <<_ACEOF
15883/* confdefs.h. */
15884_ACEOF
15885cat confdefs.h >>conftest.$ac_ext
15886cat >>conftest.$ac_ext <<_ACEOF
15887/* end confdefs.h. */
a3828db0
MK
15888/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15889 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15890#define $ac_func innocuous_$ac_func
a4db0f07 15891
a3828db0
MK
15892/* System header to define __stub macros and hopefully few prototypes,
15893 which can conflict with char $ac_func (); below.
15894 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15895 <limits.h> exists even on freestanding compilers. */
15896
15897#ifdef __STDC__
15898# include <limits.h>
15899#else
15900# include <assert.h>
15901#endif
15902
15903#undef $ac_func
15904
b4e70030 15905/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
15906#ifdef __cplusplus
15907extern "C"
b4e70030 15908{
a3828db0 15909#endif
b4e70030
JB
15910/* We use char because int might match the return type of a gcc2
15911 builtin and then its argument prototype would still apply. */
a3828db0
MK
15912char $ac_func ();
15913/* The GNU C library defines this for functions which it implements
15914 to always fail with ENOSYS. Some functions are actually named
15915 something starting with __ and the normal name is an alias. */
b4e70030 15916#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 15917choke me
b4e70030
JB
15918#else
15919char (*f) () = $ac_func;
15920#endif
15921#ifdef __cplusplus
15922}
a3828db0 15923#endif
97bf5e38 15924
bec39cab
AC
15925int
15926main ()
15927{
6c7a06a3
TT
15928return f != $ac_func;
15929 ;
15930 return 0;
15931}
15932_ACEOF
15933rm -f conftest.$ac_objext conftest$ac_exeext
15934if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15935 (eval $ac_link) 2>conftest.er1
15936 ac_status=$?
15937 grep -v '^ *+' conftest.er1 >conftest.err
15938 rm -f conftest.er1
15939 cat conftest.err >&5
15940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15941 (exit $ac_status); } &&
15942 { ac_try='test -z "$ac_c_werror_flag"
15943 || test ! -s conftest.err'
15944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15945 (eval $ac_try) 2>&5
15946 ac_status=$?
15947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15948 (exit $ac_status); }; } &&
15949 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
15955 eval "$as_ac_var=yes"
15956else
15957 echo "$as_me: failed program was:" >&5
15958sed 's/^/| /' conftest.$ac_ext >&5
15959
15960eval "$as_ac_var=no"
15961fi
15962rm -f conftest.err conftest.$ac_objext \
15963 conftest$ac_exeext conftest.$ac_ext
15964fi
15965echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15966echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15967if test `eval echo '${'$as_ac_var'}'` = yes; then
15968 cat >>confdefs.h <<_ACEOF
15969#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15970_ACEOF
15971
15972fi
15973done
15974
15975
15976 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
15977echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
15978if test "${am_cv_langinfo_codeset+set}" = set; then
15979 echo $ECHO_N "(cached) $ECHO_C" >&6
15980else
15981 cat >conftest.$ac_ext <<_ACEOF
15982/* confdefs.h. */
15983_ACEOF
15984cat confdefs.h >>conftest.$ac_ext
15985cat >>conftest.$ac_ext <<_ACEOF
15986/* end confdefs.h. */
15987#include <langinfo.h>
15988int
15989main ()
15990{
15991char* cs = nl_langinfo(CODESET);
bec39cab
AC
15992 ;
15993 return 0;
15994}
15995_ACEOF
a3828db0
MK
15996rm -f conftest.$ac_objext conftest$ac_exeext
15997if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15998 (eval $ac_link) 2>conftest.er1
bec39cab
AC
15999 ac_status=$?
16000 grep -v '^ *+' conftest.er1 >conftest.err
16001 rm -f conftest.er1
16002 cat conftest.err >&5
16003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16004 (exit $ac_status); } &&
b4e70030
JB
16005 { ac_try='test -z "$ac_c_werror_flag"
16006 || test ! -s conftest.err'
bec39cab
AC
16007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16008 (eval $ac_try) 2>&5
16009 ac_status=$?
16010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16011 (exit $ac_status); }; } &&
a3828db0 16012 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
16013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16014 (eval $ac_try) 2>&5
16015 ac_status=$?
16016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16017 (exit $ac_status); }; }; then
6c7a06a3 16018 am_cv_langinfo_codeset=yes
a4db0f07 16019else
bec39cab
AC
16020 echo "$as_me: failed program was:" >&5
16021sed 's/^/| /' conftest.$ac_ext >&5
16022
6c7a06a3 16023am_cv_langinfo_codeset=no
a4db0f07 16024fi
a3828db0
MK
16025rm -f conftest.err conftest.$ac_objext \
16026 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 16027
a4db0f07 16028fi
6c7a06a3
TT
16029echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
16030echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
16031 if test $am_cv_langinfo_codeset = yes; then
16032
16033cat >>confdefs.h <<\_ACEOF
16034#define HAVE_LANGINFO_CODESET 1
bec39cab 16035_ACEOF
a4db0f07 16036
6c7a06a3 16037 fi
c906108c 16038
06825bd1 16039
a3828db0
MK
16040# Check the return and argument types of ptrace. No canned test for
16041# this, so roll our own.
16042gdb_ptrace_headers='
16043#if HAVE_SYS_TYPES_H
16044# include <sys/types.h>
16045#endif
16046#if HAVE_SYS_PTRACE_H
16047# include <sys/ptrace.h>
16048#endif
16049#if HAVE_UNISTD_H
16050# include <unistd.h>
16051#endif
16052'
16053# There is no point in checking if we don't have a prototype.
b4e70030
JB
16054echo "$as_me:$LINENO: checking whether ptrace is declared" >&5
16055echo $ECHO_N "checking whether ptrace is declared... $ECHO_C" >&6
a3828db0 16056if test "${ac_cv_have_decl_ptrace+set}" = set; then
bec39cab
AC
16057 echo $ECHO_N "(cached) $ECHO_C" >&6
16058else
16059 cat >conftest.$ac_ext <<_ACEOF
16060/* confdefs.h. */
16061_ACEOF
16062cat confdefs.h >>conftest.$ac_ext
16063cat >>conftest.$ac_ext <<_ACEOF
16064/* end confdefs.h. */
a3828db0
MK
16065$gdb_ptrace_headers
16066
bec39cab
AC
16067int
16068main ()
16069{
a3828db0
MK
16070#ifndef ptrace
16071 char *p = (char *) ptrace;
06825bd1 16072#endif
a3828db0 16073
bec39cab
AC
16074 ;
16075 return 0;
16076}
16077_ACEOF
16078rm -f conftest.$ac_objext
16079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16080 (eval $ac_compile) 2>conftest.er1
16081 ac_status=$?
16082 grep -v '^ *+' conftest.er1 >conftest.err
16083 rm -f conftest.er1
16084 cat conftest.err >&5
16085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16086 (exit $ac_status); } &&
b4e70030
JB
16087 { ac_try='test -z "$ac_c_werror_flag"
16088 || test ! -s conftest.err'
bec39cab
AC
16089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16090 (eval $ac_try) 2>&5
16091 ac_status=$?
16092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16093 (exit $ac_status); }; } &&
16094 { ac_try='test -s conftest.$ac_objext'
16095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16096 (eval $ac_try) 2>&5
16097 ac_status=$?
16098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16099 (exit $ac_status); }; }; then
a3828db0 16100 ac_cv_have_decl_ptrace=yes
06825bd1 16101else
bec39cab
AC
16102 echo "$as_me: failed program was:" >&5
16103sed 's/^/| /' conftest.$ac_ext >&5
16104
b4e70030 16105ac_cv_have_decl_ptrace=no
06825bd1 16106fi
bec39cab 16107rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 16108fi
b4e70030
JB
16109echo "$as_me:$LINENO: result: $ac_cv_have_decl_ptrace" >&5
16110echo "${ECHO_T}$ac_cv_have_decl_ptrace" >&6
a3828db0 16111if test $ac_cv_have_decl_ptrace = yes; then
06825bd1 16112
a3828db0
MK
16113cat >>confdefs.h <<_ACEOF
16114#define HAVE_DECL_PTRACE 1
16115_ACEOF
bec39cab 16116
bec39cab 16117
a3828db0
MK
16118else
16119 cat >>confdefs.h <<_ACEOF
16120#define HAVE_DECL_PTRACE 0
bec39cab 16121_ACEOF
06825bd1 16122
a3828db0
MK
16123
16124 : ${gdb_cv_func_ptrace_ret='int'}
16125 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
16126
06825bd1
MK
16127fi
16128
a3828db0 16129
064ef605
DJ
16130# Check return type. Varargs (used on GNU/Linux) conflict with the
16131# empty argument list, so check for that explicitly.
b4e70030
JB
16132echo "$as_me:$LINENO: checking return type of ptrace" >&5
16133echo $ECHO_N "checking return type of ptrace... $ECHO_C" >&6
a3828db0 16134if test "${gdb_cv_func_ptrace_ret+set}" = set; then
bec39cab
AC
16135 echo $ECHO_N "(cached) $ECHO_C" >&6
16136else
16137 cat >conftest.$ac_ext <<_ACEOF
16138/* confdefs.h. */
16139_ACEOF
16140cat confdefs.h >>conftest.$ac_ext
16141cat >>conftest.$ac_ext <<_ACEOF
16142/* end confdefs.h. */
a3828db0 16143$gdb_ptrace_headers
bec39cab
AC
16144int
16145main ()
16146{
064ef605
DJ
16147extern long ptrace (enum __ptrace_request, ...);
16148 ;
16149 return 0;
16150}
16151_ACEOF
16152rm -f conftest.$ac_objext
16153if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16154 (eval $ac_compile) 2>conftest.er1
16155 ac_status=$?
16156 grep -v '^ *+' conftest.er1 >conftest.err
16157 rm -f conftest.er1
16158 cat conftest.err >&5
16159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16160 (exit $ac_status); } &&
16161 { ac_try='test -z "$ac_c_werror_flag"
16162 || test ! -s conftest.err'
16163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16164 (eval $ac_try) 2>&5
16165 ac_status=$?
16166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16167 (exit $ac_status); }; } &&
16168 { ac_try='test -s conftest.$ac_objext'
16169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16170 (eval $ac_try) 2>&5
16171 ac_status=$?
16172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16173 (exit $ac_status); }; }; then
16174 gdb_cv_func_ptrace_ret='long'
16175else
16176 echo "$as_me: failed program was:" >&5
16177sed 's/^/| /' conftest.$ac_ext >&5
16178
16179cat >conftest.$ac_ext <<_ACEOF
16180/* confdefs.h. */
16181_ACEOF
16182cat confdefs.h >>conftest.$ac_ext
16183cat >>conftest.$ac_ext <<_ACEOF
16184/* end confdefs.h. */
16185$gdb_ptrace_headers
16186int
16187main ()
16188{
a3828db0 16189extern int ptrace ();
bec39cab
AC
16190 ;
16191 return 0;
16192}
16193_ACEOF
16194rm -f conftest.$ac_objext
16195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16196 (eval $ac_compile) 2>conftest.er1
16197 ac_status=$?
16198 grep -v '^ *+' conftest.er1 >conftest.err
16199 rm -f conftest.er1
16200 cat conftest.err >&5
16201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16202 (exit $ac_status); } &&
b4e70030
JB
16203 { ac_try='test -z "$ac_c_werror_flag"
16204 || test ! -s conftest.err'
bec39cab
AC
16205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16206 (eval $ac_try) 2>&5
16207 ac_status=$?
16208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16209 (exit $ac_status); }; } &&
16210 { ac_try='test -s conftest.$ac_objext'
16211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16212 (eval $ac_try) 2>&5
16213 ac_status=$?
16214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16215 (exit $ac_status); }; }; then
a3828db0 16216 gdb_cv_func_ptrace_ret='int'
70f9f479 16217else
bec39cab
AC
16218 echo "$as_me: failed program was:" >&5
16219sed 's/^/| /' conftest.$ac_ext >&5
16220
b4e70030 16221gdb_cv_func_ptrace_ret='long'
70f9f479 16222fi
bec39cab 16223rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 16224fi
064ef605
DJ
16225rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16226fi
b4e70030
JB
16227echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_ret" >&5
16228echo "${ECHO_T}$gdb_cv_func_ptrace_ret" >&6
bec39cab 16229
a3828db0
MK
16230cat >>confdefs.h <<_ACEOF
16231#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 16232_ACEOF
70f9f479 16233
a3828db0 16234# Check argument types.
b4e70030
JB
16235echo "$as_me:$LINENO: checking types of arguments for ptrace" >&5
16236echo $ECHO_N "checking types of arguments for ptrace... $ECHO_C" >&6
a3828db0 16237if test "${gdb_cv_func_ptrace_args+set}" = set; then
bec39cab
AC
16238 echo $ECHO_N "(cached) $ECHO_C" >&6
16239else
a3828db0 16240
064ef605
DJ
16241 cat >conftest.$ac_ext <<_ACEOF
16242/* confdefs.h. */
16243_ACEOF
16244cat confdefs.h >>conftest.$ac_ext
16245cat >>conftest.$ac_ext <<_ACEOF
16246/* end confdefs.h. */
16247$gdb_ptrace_headers
16248int
16249main ()
16250{
16251extern long ptrace (enum __ptrace_request, ...);
16252 ;
16253 return 0;
16254}
16255_ACEOF
16256rm -f conftest.$ac_objext
16257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16258 (eval $ac_compile) 2>conftest.er1
16259 ac_status=$?
16260 grep -v '^ *+' conftest.er1 >conftest.err
16261 rm -f conftest.er1
16262 cat conftest.err >&5
16263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16264 (exit $ac_status); } &&
16265 { ac_try='test -z "$ac_c_werror_flag"
16266 || test ! -s conftest.err'
16267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16268 (eval $ac_try) 2>&5
16269 ac_status=$?
16270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16271 (exit $ac_status); }; } &&
16272 { ac_try='test -s conftest.$ac_objext'
16273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16274 (eval $ac_try) 2>&5
16275 ac_status=$?
16276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16277 (exit $ac_status); }; }; then
16278 gdb_cv_func_ptrace_args='int,int,long,long'
16279else
16280 echo "$as_me: failed program was:" >&5
16281sed 's/^/| /' conftest.$ac_ext >&5
16282
16283
a3828db0
MK
16284for gdb_arg1 in 'int' 'long'; do
16285 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 16286 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0
MK
16287 for gdb_arg4 in 'int' 'long'; do
16288 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
16289/* confdefs.h. */
16290_ACEOF
16291cat confdefs.h >>conftest.$ac_ext
16292cat >>conftest.$ac_ext <<_ACEOF
16293/* end confdefs.h. */
a3828db0 16294$gdb_ptrace_headers
bec39cab
AC
16295int
16296main ()
16297{
a3828db0
MK
16298
16299extern $gdb_cv_func_ptrace_ret
16300 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
16301
bec39cab
AC
16302 ;
16303 return 0;
16304}
16305_ACEOF
16306rm -f conftest.$ac_objext
16307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16308 (eval $ac_compile) 2>conftest.er1
16309 ac_status=$?
16310 grep -v '^ *+' conftest.er1 >conftest.err
16311 rm -f conftest.er1
16312 cat conftest.err >&5
16313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16314 (exit $ac_status); } &&
b4e70030
JB
16315 { ac_try='test -z "$ac_c_werror_flag"
16316 || test ! -s conftest.err'
bec39cab
AC
16317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16318 (eval $ac_try) 2>&5
16319 ac_status=$?
16320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16321 (exit $ac_status); }; } &&
16322 { ac_try='test -s conftest.$ac_objext'
16323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16324 (eval $ac_try) 2>&5
16325 ac_status=$?
16326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16327 (exit $ac_status); }; }; then
a3828db0
MK
16328 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
16329 break 4;
5c7f2947 16330else
bec39cab
AC
16331 echo "$as_me: failed program was:" >&5
16332sed 's/^/| /' conftest.$ac_ext >&5
16333
5c7f2947 16334fi
bec39cab 16335rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
16336 for gdb_arg5 in 'int *' 'int' 'long'; do
16337 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
16338/* confdefs.h. */
16339_ACEOF
16340cat confdefs.h >>conftest.$ac_ext
16341cat >>conftest.$ac_ext <<_ACEOF
16342/* end confdefs.h. */
a3828db0 16343$gdb_ptrace_headers
bec39cab
AC
16344int
16345main ()
16346{
a3828db0
MK
16347
16348extern $gdb_cv_func_ptrace_ret
16349 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
16350
bec39cab
AC
16351 ;
16352 return 0;
16353}
16354_ACEOF
16355rm -f conftest.$ac_objext
16356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16357 (eval $ac_compile) 2>conftest.er1
16358 ac_status=$?
16359 grep -v '^ *+' conftest.er1 >conftest.err
16360 rm -f conftest.er1
16361 cat conftest.err >&5
16362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16363 (exit $ac_status); } &&
b4e70030
JB
16364 { ac_try='test -z "$ac_c_werror_flag"
16365 || test ! -s conftest.err'
bec39cab
AC
16366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16367 (eval $ac_try) 2>&5
16368 ac_status=$?
16369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16370 (exit $ac_status); }; } &&
16371 { ac_try='test -s conftest.$ac_objext'
16372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16373 (eval $ac_try) 2>&5
16374 ac_status=$?
16375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16376 (exit $ac_status); }; }; then
a3828db0
MK
16377
16378gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
16379 break 5;
78434e59 16380else
bec39cab
AC
16381 echo "$as_me: failed program was:" >&5
16382sed 's/^/| /' conftest.$ac_ext >&5
16383
78434e59 16384fi
bec39cab 16385rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
16386 done
16387 done
16388 done
16389 done
16390done
16391# Provide a safe default value.
16392: ${gdb_cv_func_ptrace_args='int,int,long,long'}
16393
064ef605
DJ
16394fi
16395rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 16396fi
b4e70030
JB
16397echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_args" >&5
16398echo "${ECHO_T}$gdb_cv_func_ptrace_args" >&6
a3828db0
MK
16399ac_save_IFS=$IFS; IFS=','
16400set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
16401IFS=$ac_save_IFS
16402shift
bec39cab 16403
a3828db0
MK
16404cat >>confdefs.h <<_ACEOF
16405#define PTRACE_TYPE_ARG3 $3
16406_ACEOF
16407
16408if test -n "$5"; then
16409
16410cat >>confdefs.h <<_ACEOF
16411#define PTRACE_TYPE_ARG5 $5
bec39cab 16412_ACEOF
78434e59
MK
16413
16414fi
16415
a3828db0 16416if test "$cross_compiling" = no; then
b4e70030
JB
16417 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
16418echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 16419if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 16420 echo $ECHO_N "(cached) $ECHO_C" >&6
a3828db0
MK
16421else
16422 if test "$cross_compiling" = yes; then
16423 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
16424echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
16425 { (exit 1); exit 1; }; }
bec39cab
AC
16426else
16427 cat >conftest.$ac_ext <<_ACEOF
16428/* confdefs.h. */
16429_ACEOF
16430cat confdefs.h >>conftest.$ac_ext
16431cat >>conftest.$ac_ext <<_ACEOF
16432/* end confdefs.h. */
b4e70030
JB
16433#if HAVE_UNISTD_H
16434# include <unistd.h>
16435#endif
16436
bec39cab
AC
16437int
16438main ()
16439{
a3828db0
MK
16440/* If this system has a BSD-style setpgrp which takes arguments,
16441 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
16442 exit successfully. */
b4e70030 16443 exit (setpgrp (1,1) == -1 ? 0 : 1);
bec39cab
AC
16444 ;
16445 return 0;
16446}
16447_ACEOF
a3828db0
MK
16448rm -f conftest$ac_exeext
16449if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16450 (eval $ac_link) 2>&5
bec39cab
AC
16451 ac_status=$?
16452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 16453 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
16454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16455 (eval $ac_try) 2>&5
16456 ac_status=$?
16457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16458 (exit $ac_status); }; }; then
a3828db0 16459 ac_cv_func_setpgrp_void=no
c906108c 16460else
a3828db0
MK
16461 echo "$as_me: program exited with status $ac_status" >&5
16462echo "$as_me: failed program was:" >&5
bec39cab
AC
16463sed 's/^/| /' conftest.$ac_ext >&5
16464
a3828db0
MK
16465( exit $ac_status )
16466ac_cv_func_setpgrp_void=yes
c906108c 16467fi
b4e70030 16468rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 16469fi
a3828db0 16470fi
b4e70030
JB
16471echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
16472echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0
MK
16473if test $ac_cv_func_setpgrp_void = yes; then
16474
16475cat >>confdefs.h <<\_ACEOF
16476#define SETPGRP_VOID 1
bec39cab 16477_ACEOF
97bf5e38
MK
16478
16479fi
a3828db0
MK
16480
16481else
b4e70030
JB
16482 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
16483echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 16484if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 16485 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 16486else
bec39cab
AC
16487 cat >conftest.$ac_ext <<_ACEOF
16488/* confdefs.h. */
16489_ACEOF
16490cat confdefs.h >>conftest.$ac_ext
16491cat >>conftest.$ac_ext <<_ACEOF
16492/* end confdefs.h. */
a3828db0
MK
16493
16494#include <unistd.h>
16495
bec39cab
AC
16496int
16497main ()
16498{
a3828db0
MK
16499
16500 if (setpgrp(1,1) == -1)
16501 exit (0);
16502 else
16503 exit (1);
16504
bec39cab
AC
16505 ;
16506 return 0;
16507}
16508_ACEOF
16509rm -f conftest.$ac_objext
16510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16511 (eval $ac_compile) 2>conftest.er1
16512 ac_status=$?
16513 grep -v '^ *+' conftest.er1 >conftest.err
16514 rm -f conftest.er1
16515 cat conftest.err >&5
16516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16517 (exit $ac_status); } &&
b4e70030
JB
16518 { ac_try='test -z "$ac_c_werror_flag"
16519 || test ! -s conftest.err'
bec39cab
AC
16520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16521 (eval $ac_try) 2>&5
16522 ac_status=$?
16523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16524 (exit $ac_status); }; } &&
16525 { ac_try='test -s conftest.$ac_objext'
16526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16527 (eval $ac_try) 2>&5
16528 ac_status=$?
16529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16530 (exit $ac_status); }; }; then
a3828db0 16531 ac_cv_func_setpgrp_void=no
c906108c 16532else
bec39cab
AC
16533 echo "$as_me: failed program was:" >&5
16534sed 's/^/| /' conftest.$ac_ext >&5
16535
b4e70030 16536ac_cv_func_setpgrp_void=yes
c906108c 16537fi
bec39cab 16538rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16539fi
b4e70030
JB
16540echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
16541echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0 16542if test $ac_cv_func_setpgrp_void = yes; then
bec39cab 16543 cat >>confdefs.h <<\_ACEOF
a3828db0 16544#define SETPGRP_VOID 1
bec39cab 16545_ACEOF
c3f6f71d 16546
a3828db0 16547fi
c906108c
SS
16548fi
16549
a3828db0
MK
16550# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
16551# since sigsetjmp might only be defined as a macro.
b4e70030
JB
16552echo "$as_me:$LINENO: checking for sigsetjmp" >&5
16553echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
a3828db0 16554if test "${gdb_cv_func_sigsetjmp+set}" = set; then
bec39cab
AC
16555 echo $ECHO_N "(cached) $ECHO_C" >&6
16556else
16557 cat >conftest.$ac_ext <<_ACEOF
16558/* confdefs.h. */
16559_ACEOF
16560cat confdefs.h >>conftest.$ac_ext
16561cat >>conftest.$ac_ext <<_ACEOF
16562/* end confdefs.h. */
a3828db0
MK
16563
16564#include <setjmp.h>
16565
bec39cab
AC
16566int
16567main ()
16568{
a3828db0 16569sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
16570 ;
16571 return 0;
16572}
16573_ACEOF
16574rm -f conftest.$ac_objext
16575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16576 (eval $ac_compile) 2>conftest.er1
16577 ac_status=$?
16578 grep -v '^ *+' conftest.er1 >conftest.err
16579 rm -f conftest.er1
16580 cat conftest.err >&5
16581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16582 (exit $ac_status); } &&
b4e70030
JB
16583 { ac_try='test -z "$ac_c_werror_flag"
16584 || test ! -s conftest.err'
bec39cab
AC
16585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16586 (eval $ac_try) 2>&5
16587 ac_status=$?
16588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16589 (exit $ac_status); }; } &&
16590 { ac_try='test -s conftest.$ac_objext'
16591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16592 (eval $ac_try) 2>&5
16593 ac_status=$?
16594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16595 (exit $ac_status); }; }; then
a3828db0 16596 gdb_cv_func_sigsetjmp=yes
c906108c 16597else
bec39cab
AC
16598 echo "$as_me: failed program was:" >&5
16599sed 's/^/| /' conftest.$ac_ext >&5
16600
b4e70030 16601gdb_cv_func_sigsetjmp=no
c906108c 16602fi
bec39cab 16603rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16604fi
b4e70030
JB
16605echo "$as_me:$LINENO: result: $gdb_cv_func_sigsetjmp" >&5
16606echo "${ECHO_T}$gdb_cv_func_sigsetjmp" >&6
a3828db0 16607if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 16608
a3828db0
MK
16609cat >>confdefs.h <<\_ACEOF
16610#define HAVE_SIGSETJMP 1
bec39cab 16611_ACEOF
c906108c 16612
97bf5e38 16613fi
c906108c 16614
a3828db0
MK
16615# Assume we'll default to using the included libiberty regex.
16616gdb_use_included_regex=yes
16617
16618# However, if the system regex is GNU regex, then default to *not*
16619# using the included regex.
b4e70030
JB
16620echo "$as_me:$LINENO: checking for GNU regex" >&5
16621echo $ECHO_N "checking for GNU regex... $ECHO_C" >&6
a3828db0 16622if test "${gdb_cv_have_gnu_regex+set}" = set; then
bec39cab
AC
16623 echo $ECHO_N "(cached) $ECHO_C" >&6
16624else
16625 cat >conftest.$ac_ext <<_ACEOF
16626/* confdefs.h. */
16627_ACEOF
16628cat confdefs.h >>conftest.$ac_ext
16629cat >>conftest.$ac_ext <<_ACEOF
16630/* end confdefs.h. */
a3828db0 16631#include <gnu-versions.h>
bec39cab
AC
16632int
16633main ()
16634{
a3828db0
MK
16635#define REGEX_INTERFACE_VERSION 1
16636#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
16637# error "Version mismatch"
16638#endif
bec39cab
AC
16639 ;
16640 return 0;
16641}
16642_ACEOF
16643rm -f conftest.$ac_objext
16644if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16645 (eval $ac_compile) 2>conftest.er1
16646 ac_status=$?
16647 grep -v '^ *+' conftest.er1 >conftest.err
16648 rm -f conftest.er1
16649 cat conftest.err >&5
16650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16651 (exit $ac_status); } &&
b4e70030
JB
16652 { ac_try='test -z "$ac_c_werror_flag"
16653 || test ! -s conftest.err'
bec39cab
AC
16654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16655 (eval $ac_try) 2>&5
16656 ac_status=$?
16657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16658 (exit $ac_status); }; } &&
16659 { ac_try='test -s conftest.$ac_objext'
16660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16661 (eval $ac_try) 2>&5
16662 ac_status=$?
16663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16664 (exit $ac_status); }; }; then
a3828db0 16665 gdb_cv_have_gnu_regex=yes
c906108c 16666else
bec39cab
AC
16667 echo "$as_me: failed program was:" >&5
16668sed 's/^/| /' conftest.$ac_ext >&5
16669
b4e70030 16670gdb_cv_have_gnu_regex=no
c906108c 16671fi
bec39cab 16672rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16673fi
b4e70030
JB
16674echo "$as_me:$LINENO: result: $gdb_cv_have_gnu_regex" >&5
16675echo "${ECHO_T}$gdb_cv_have_gnu_regex" >&6
a3828db0
MK
16676if test $gdb_cv_have_gnu_regex = yes; then
16677 gdb_use_included_regex=no
16678fi
c906108c 16679
a3828db0 16680
b4e70030 16681# Check whether --with-included-regex or --without-included-regex was given.
a3828db0 16682if test "${with_included_regex+set}" = set; then
b4e70030
JB
16683 withval="$with_included_regex"
16684 gdb_with_regex=$withval
a3828db0
MK
16685else
16686 gdb_with_regex=$gdb_use_included_regex
b4e70030 16687fi;
a3828db0
MK
16688if test "$gdb_with_regex" = yes; then
16689
16690cat >>confdefs.h <<\_ACEOF
16691#define USE_INCLUDED_REGEX 1
bec39cab 16692_ACEOF
c906108c 16693
97bf5e38 16694fi
c906108c 16695
5c45e068 16696# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
b4e70030
JB
16697echo "$as_me:$LINENO: checking for struct thread.td_pcb" >&5
16698echo $ECHO_N "checking for struct thread.td_pcb... $ECHO_C" >&6
5c45e068 16699if test "${ac_cv_member_struct_thread_td_pcb+set}" = set; then
bec39cab
AC
16700 echo $ECHO_N "(cached) $ECHO_C" >&6
16701else
16702 cat >conftest.$ac_ext <<_ACEOF
16703/* confdefs.h. */
16704_ACEOF
16705cat confdefs.h >>conftest.$ac_ext
16706cat >>conftest.$ac_ext <<_ACEOF
16707/* end confdefs.h. */
a3828db0
MK
16708#include <sys/param.h>
16709#include <sys/proc.h>
5c45e068
MK
16710
16711
bec39cab
AC
16712int
16713main ()
16714{
5c45e068
MK
16715static struct thread ac_aggr;
16716if (ac_aggr.td_pcb)
16717return 0;
bec39cab
AC
16718 ;
16719 return 0;
16720}
16721_ACEOF
16722rm -f conftest.$ac_objext
16723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16724 (eval $ac_compile) 2>conftest.er1
16725 ac_status=$?
16726 grep -v '^ *+' conftest.er1 >conftest.err
16727 rm -f conftest.er1
16728 cat conftest.err >&5
16729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16730 (exit $ac_status); } &&
b4e70030
JB
16731 { ac_try='test -z "$ac_c_werror_flag"
16732 || test ! -s conftest.err'
bec39cab
AC
16733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16734 (eval $ac_try) 2>&5
16735 ac_status=$?
16736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16737 (exit $ac_status); }; } &&
16738 { ac_try='test -s conftest.$ac_objext'
16739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16740 (eval $ac_try) 2>&5
16741 ac_status=$?
16742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16743 (exit $ac_status); }; }; then
5c45e068 16744 ac_cv_member_struct_thread_td_pcb=yes
c906108c 16745else
bec39cab
AC
16746 echo "$as_me: failed program was:" >&5
16747sed 's/^/| /' conftest.$ac_ext >&5
16748
b4e70030 16749cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16750/* confdefs.h. */
16751_ACEOF
16752cat confdefs.h >>conftest.$ac_ext
16753cat >>conftest.$ac_ext <<_ACEOF
16754/* end confdefs.h. */
16755#include <sys/param.h>
16756#include <sys/proc.h>
16757
16758
16759int
16760main ()
16761{
16762static struct thread ac_aggr;
16763if (sizeof ac_aggr.td_pcb)
16764return 0;
16765 ;
16766 return 0;
16767}
16768_ACEOF
16769rm -f conftest.$ac_objext
16770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16771 (eval $ac_compile) 2>conftest.er1
16772 ac_status=$?
16773 grep -v '^ *+' conftest.er1 >conftest.err
16774 rm -f conftest.er1
16775 cat conftest.err >&5
16776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16777 (exit $ac_status); } &&
b4e70030
JB
16778 { ac_try='test -z "$ac_c_werror_flag"
16779 || test ! -s conftest.err'
5c45e068
MK
16780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16781 (eval $ac_try) 2>&5
16782 ac_status=$?
16783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16784 (exit $ac_status); }; } &&
16785 { ac_try='test -s conftest.$ac_objext'
16786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16787 (eval $ac_try) 2>&5
16788 ac_status=$?
16789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16790 (exit $ac_status); }; }; then
16791 ac_cv_member_struct_thread_td_pcb=yes
16792else
16793 echo "$as_me: failed program was:" >&5
16794sed 's/^/| /' conftest.$ac_ext >&5
16795
b4e70030 16796ac_cv_member_struct_thread_td_pcb=no
5c45e068
MK
16797fi
16798rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16799fi
bec39cab 16800rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16801fi
b4e70030
JB
16802echo "$as_me:$LINENO: result: $ac_cv_member_struct_thread_td_pcb" >&5
16803echo "${ECHO_T}$ac_cv_member_struct_thread_td_pcb" >&6
5c45e068 16804if test $ac_cv_member_struct_thread_td_pcb = yes; then
c906108c 16805
5c45e068 16806cat >>confdefs.h <<_ACEOF
a3828db0 16807#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 16808_ACEOF
c906108c 16809
5c45e068 16810
97bf5e38 16811fi
c906108c 16812
5c45e068 16813
a3828db0 16814# See if <sys/lwp.h> defines `struct lwp`.
b4e70030
JB
16815echo "$as_me:$LINENO: checking for struct lwp" >&5
16816echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
a3828db0 16817if test "${gdb_cv_struct_lwp+set}" = set; then
bec39cab
AC
16818 echo $ECHO_N "(cached) $ECHO_C" >&6
16819else
16820 cat >conftest.$ac_ext <<_ACEOF
16821/* confdefs.h. */
16822_ACEOF
16823cat confdefs.h >>conftest.$ac_ext
16824cat >>conftest.$ac_ext <<_ACEOF
16825/* end confdefs.h. */
a3828db0
MK
16826#include <sys/param.h>
16827#include <sys/lwp.h>
bec39cab
AC
16828int
16829main ()
16830{
a3828db0 16831struct lwp l;
bec39cab
AC
16832 ;
16833 return 0;
16834}
16835_ACEOF
16836rm -f conftest.$ac_objext
16837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16838 (eval $ac_compile) 2>conftest.er1
16839 ac_status=$?
16840 grep -v '^ *+' conftest.er1 >conftest.err
16841 rm -f conftest.er1
16842 cat conftest.err >&5
16843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16844 (exit $ac_status); } &&
b4e70030
JB
16845 { ac_try='test -z "$ac_c_werror_flag"
16846 || test ! -s conftest.err'
bec39cab
AC
16847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16848 (eval $ac_try) 2>&5
16849 ac_status=$?
16850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16851 (exit $ac_status); }; } &&
16852 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
a3828db0 16858 gdb_cv_struct_lwp=yes
c906108c 16859else
bec39cab
AC
16860 echo "$as_me: failed program was:" >&5
16861sed 's/^/| /' conftest.$ac_ext >&5
16862
b4e70030 16863gdb_cv_struct_lwp=no
c906108c 16864fi
bec39cab 16865rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16866fi
b4e70030
JB
16867echo "$as_me:$LINENO: result: $gdb_cv_struct_lwp" >&5
16868echo "${ECHO_T}$gdb_cv_struct_lwp" >&6
a3828db0 16869if test $gdb_cv_struct_lwp = yes; then
c906108c 16870
a3828db0
MK
16871cat >>confdefs.h <<\_ACEOF
16872#define HAVE_STRUCT_LWP 1
bec39cab 16873_ACEOF
c906108c 16874
97bf5e38 16875fi
c906108c 16876
a3828db0 16877# See if <machine/reg.h> degines `struct reg'.
b4e70030
JB
16878echo "$as_me:$LINENO: checking for struct reg in machine/reg.h" >&5
16879echo $ECHO_N "checking for struct reg in machine/reg.h... $ECHO_C" >&6
a3828db0 16880if test "${gdb_cv_struct_reg+set}" = set; then
bec39cab
AC
16881 echo $ECHO_N "(cached) $ECHO_C" >&6
16882else
16883 cat >conftest.$ac_ext <<_ACEOF
16884/* confdefs.h. */
16885_ACEOF
16886cat confdefs.h >>conftest.$ac_ext
16887cat >>conftest.$ac_ext <<_ACEOF
16888/* end confdefs.h. */
a3828db0
MK
16889#include <sys/types.h>
16890#include <machine/reg.h>
bec39cab
AC
16891int
16892main ()
16893{
a3828db0 16894struct reg r;
bec39cab
AC
16895 ;
16896 return 0;
16897}
16898_ACEOF
16899rm -f conftest.$ac_objext
16900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16901 (eval $ac_compile) 2>conftest.er1
16902 ac_status=$?
16903 grep -v '^ *+' conftest.er1 >conftest.err
16904 rm -f conftest.er1
16905 cat conftest.err >&5
16906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16907 (exit $ac_status); } &&
b4e70030
JB
16908 { ac_try='test -z "$ac_c_werror_flag"
16909 || test ! -s conftest.err'
bec39cab
AC
16910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16911 (eval $ac_try) 2>&5
16912 ac_status=$?
16913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16914 (exit $ac_status); }; } &&
16915 { ac_try='test -s conftest.$ac_objext'
16916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16917 (eval $ac_try) 2>&5
16918 ac_status=$?
16919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16920 (exit $ac_status); }; }; then
a3828db0 16921 gdb_cv_struct_reg=yes
27ca5dad 16922else
bec39cab
AC
16923 echo "$as_me: failed program was:" >&5
16924sed 's/^/| /' conftest.$ac_ext >&5
16925
b4e70030 16926gdb_cv_struct_reg=no
27ca5dad 16927fi
bec39cab 16928rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 16929fi
b4e70030
JB
16930echo "$as_me:$LINENO: result: $gdb_cv_struct_reg" >&5
16931echo "${ECHO_T}$gdb_cv_struct_reg" >&6
a3828db0 16932if test $gdb_cv_struct_reg = yes; then
bec39cab
AC
16933
16934cat >>confdefs.h <<\_ACEOF
a3828db0 16935#define HAVE_STRUCT_REG 1
bec39cab 16936_ACEOF
27ca5dad
MC
16937
16938fi
97bf5e38 16939
a3828db0
MK
16940# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
16941# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
b4e70030
JB
16942echo "$as_me:$LINENO: checking for struct reg.r_fs" >&5
16943echo $ECHO_N "checking for struct reg.r_fs... $ECHO_C" >&6
5c45e068 16944if test "${ac_cv_member_struct_reg_r_fs+set}" = set; then
bec39cab 16945 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16946else
bec39cab
AC
16947 cat >conftest.$ac_ext <<_ACEOF
16948/* confdefs.h. */
16949_ACEOF
16950cat confdefs.h >>conftest.$ac_ext
16951cat >>conftest.$ac_ext <<_ACEOF
16952/* end confdefs.h. */
a3828db0 16953#include <machine/reg.h>
5c45e068
MK
16954
16955int
16956main ()
16957{
16958static struct reg ac_aggr;
16959if (ac_aggr.r_fs)
16960return 0;
16961 ;
16962 return 0;
16963}
16964_ACEOF
16965rm -f conftest.$ac_objext
16966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16967 (eval $ac_compile) 2>conftest.er1
16968 ac_status=$?
16969 grep -v '^ *+' conftest.er1 >conftest.err
16970 rm -f conftest.er1
16971 cat conftest.err >&5
16972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16973 (exit $ac_status); } &&
b4e70030
JB
16974 { ac_try='test -z "$ac_c_werror_flag"
16975 || test ! -s conftest.err'
5c45e068
MK
16976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16977 (eval $ac_try) 2>&5
16978 ac_status=$?
16979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16980 (exit $ac_status); }; } &&
16981 { ac_try='test -s conftest.$ac_objext'
16982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16983 (eval $ac_try) 2>&5
16984 ac_status=$?
16985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16986 (exit $ac_status); }; }; then
16987 ac_cv_member_struct_reg_r_fs=yes
16988else
16989 echo "$as_me: failed program was:" >&5
16990sed 's/^/| /' conftest.$ac_ext >&5
16991
b4e70030 16992cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16993/* confdefs.h. */
16994_ACEOF
16995cat confdefs.h >>conftest.$ac_ext
16996cat >>conftest.$ac_ext <<_ACEOF
16997/* end confdefs.h. */
16998#include <machine/reg.h>
16999
bec39cab
AC
17000int
17001main ()
17002{
5c45e068
MK
17003static struct reg ac_aggr;
17004if (sizeof ac_aggr.r_fs)
17005return 0;
bec39cab
AC
17006 ;
17007 return 0;
17008}
17009_ACEOF
17010rm -f conftest.$ac_objext
17011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17012 (eval $ac_compile) 2>conftest.er1
17013 ac_status=$?
17014 grep -v '^ *+' conftest.er1 >conftest.err
17015 rm -f conftest.er1
17016 cat conftest.err >&5
17017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17018 (exit $ac_status); } &&
b4e70030
JB
17019 { ac_try='test -z "$ac_c_werror_flag"
17020 || test ! -s conftest.err'
bec39cab
AC
17021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17022 (eval $ac_try) 2>&5
17023 ac_status=$?
17024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17025 (exit $ac_status); }; } &&
17026 { ac_try='test -s conftest.$ac_objext'
17027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17028 (eval $ac_try) 2>&5
17029 ac_status=$?
17030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17031 (exit $ac_status); }; }; then
5c45e068 17032 ac_cv_member_struct_reg_r_fs=yes
3862412b 17033else
bec39cab
AC
17034 echo "$as_me: failed program was:" >&5
17035sed 's/^/| /' conftest.$ac_ext >&5
17036
b4e70030 17037ac_cv_member_struct_reg_r_fs=no
3862412b 17038fi
bec39cab 17039rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 17040fi
5c45e068
MK
17041rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17042fi
b4e70030
JB
17043echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_fs" >&5
17044echo "${ECHO_T}$ac_cv_member_struct_reg_r_fs" >&6
5c45e068
MK
17045if test $ac_cv_member_struct_reg_r_fs = yes; then
17046
17047cat >>confdefs.h <<_ACEOF
a3828db0 17048#define HAVE_STRUCT_REG_R_FS 1
bec39cab 17049_ACEOF
3862412b 17050
5c45e068 17051
97bf5e38 17052fi
b4e70030
JB
17053echo "$as_me:$LINENO: checking for struct reg.r_gs" >&5
17054echo $ECHO_N "checking for struct reg.r_gs... $ECHO_C" >&6
5c45e068 17055if test "${ac_cv_member_struct_reg_r_gs+set}" = set; then
bec39cab 17056 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17057else
bec39cab
AC
17058 cat >conftest.$ac_ext <<_ACEOF
17059/* confdefs.h. */
17060_ACEOF
17061cat confdefs.h >>conftest.$ac_ext
17062cat >>conftest.$ac_ext <<_ACEOF
17063/* end confdefs.h. */
a3828db0 17064#include <machine/reg.h>
5c45e068 17065
bec39cab
AC
17066int
17067main ()
17068{
5c45e068
MK
17069static struct reg ac_aggr;
17070if (ac_aggr.r_gs)
17071return 0;
bec39cab
AC
17072 ;
17073 return 0;
17074}
17075_ACEOF
17076rm -f conftest.$ac_objext
17077if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17078 (eval $ac_compile) 2>conftest.er1
17079 ac_status=$?
17080 grep -v '^ *+' conftest.er1 >conftest.err
17081 rm -f conftest.er1
17082 cat conftest.err >&5
17083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17084 (exit $ac_status); } &&
b4e70030
JB
17085 { ac_try='test -z "$ac_c_werror_flag"
17086 || test ! -s conftest.err'
bec39cab
AC
17087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17088 (eval $ac_try) 2>&5
17089 ac_status=$?
17090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17091 (exit $ac_status); }; } &&
17092 { ac_try='test -s conftest.$ac_objext'
17093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17094 (eval $ac_try) 2>&5
17095 ac_status=$?
17096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17097 (exit $ac_status); }; }; then
5c45e068 17098 ac_cv_member_struct_reg_r_gs=yes
3862412b 17099else
bec39cab
AC
17100 echo "$as_me: failed program was:" >&5
17101sed 's/^/| /' conftest.$ac_ext >&5
17102
b4e70030 17103cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
17104/* confdefs.h. */
17105_ACEOF
17106cat confdefs.h >>conftest.$ac_ext
17107cat >>conftest.$ac_ext <<_ACEOF
17108/* end confdefs.h. */
17109#include <machine/reg.h>
17110
17111int
17112main ()
17113{
17114static struct reg ac_aggr;
17115if (sizeof ac_aggr.r_gs)
17116return 0;
17117 ;
17118 return 0;
17119}
17120_ACEOF
17121rm -f conftest.$ac_objext
17122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17123 (eval $ac_compile) 2>conftest.er1
17124 ac_status=$?
17125 grep -v '^ *+' conftest.er1 >conftest.err
17126 rm -f conftest.er1
17127 cat conftest.err >&5
17128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17129 (exit $ac_status); } &&
b4e70030
JB
17130 { ac_try='test -z "$ac_c_werror_flag"
17131 || test ! -s conftest.err'
5c45e068
MK
17132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17133 (eval $ac_try) 2>&5
17134 ac_status=$?
17135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17136 (exit $ac_status); }; } &&
17137 { ac_try='test -s conftest.$ac_objext'
17138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17139 (eval $ac_try) 2>&5
17140 ac_status=$?
17141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17142 (exit $ac_status); }; }; then
17143 ac_cv_member_struct_reg_r_gs=yes
17144else
17145 echo "$as_me: failed program was:" >&5
17146sed 's/^/| /' conftest.$ac_ext >&5
17147
b4e70030 17148ac_cv_member_struct_reg_r_gs=no
3862412b 17149fi
bec39cab 17150rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 17151fi
5c45e068
MK
17152rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17153fi
b4e70030
JB
17154echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_gs" >&5
17155echo "${ECHO_T}$ac_cv_member_struct_reg_r_gs" >&6
5c45e068
MK
17156if test $ac_cv_member_struct_reg_r_gs = yes; then
17157
17158cat >>confdefs.h <<_ACEOF
a3828db0 17159#define HAVE_STRUCT_REG_R_GS 1
bec39cab 17160_ACEOF
3862412b 17161
5c45e068 17162
97bf5e38 17163fi
3862412b 17164
5c45e068 17165
a3828db0 17166# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
b4e70030
JB
17167echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
17168echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
a3828db0 17169if test "${gdb_cv_have_ptrace_getregs+set}" = set; then
bec39cab 17170 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 17171else
bec39cab
AC
17172 cat >conftest.$ac_ext <<_ACEOF
17173/* confdefs.h. */
17174_ACEOF
17175cat confdefs.h >>conftest.$ac_ext
17176cat >>conftest.$ac_ext <<_ACEOF
17177/* end confdefs.h. */
a3828db0 17178#include <sys/ptrace.h>
bec39cab
AC
17179int
17180main ()
17181{
a3828db0 17182PTRACE_GETREGS;
bec39cab
AC
17183 ;
17184 return 0;
17185}
17186_ACEOF
17187rm -f conftest.$ac_objext
17188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17189 (eval $ac_compile) 2>conftest.er1
17190 ac_status=$?
17191 grep -v '^ *+' conftest.er1 >conftest.err
17192 rm -f conftest.er1
17193 cat conftest.err >&5
17194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17195 (exit $ac_status); } &&
b4e70030
JB
17196 { ac_try='test -z "$ac_c_werror_flag"
17197 || test ! -s conftest.err'
bec39cab
AC
17198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17199 (eval $ac_try) 2>&5
17200 ac_status=$?
17201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17202 (exit $ac_status); }; } &&
17203 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
a3828db0 17209 gdb_cv_have_ptrace_getregs=yes
451928c5 17210else
bec39cab
AC
17211 echo "$as_me: failed program was:" >&5
17212sed 's/^/| /' conftest.$ac_ext >&5
17213
b4e70030 17214gdb_cv_have_ptrace_getregs=no
451928c5 17215fi
bec39cab 17216rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
17217fi
17218
b4e70030
JB
17219echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getregs" >&5
17220echo "${ECHO_T}$gdb_cv_have_ptrace_getregs" >&6
a3828db0 17221if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f
SE
17222
17223cat >>confdefs.h <<\_ACEOF
a3828db0 17224#define HAVE_PTRACE_GETREGS 1
bec39cab 17225_ACEOF
451928c5 17226
97bf5e38 17227fi
451928c5 17228
a3828db0 17229# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
b4e70030
JB
17230echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5
17231echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6
a3828db0 17232if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then
bec39cab 17233 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 17234else
bec39cab
AC
17235 cat >conftest.$ac_ext <<_ACEOF
17236/* confdefs.h. */
17237_ACEOF
17238cat confdefs.h >>conftest.$ac_ext
17239cat >>conftest.$ac_ext <<_ACEOF
17240/* end confdefs.h. */
a3828db0 17241#include <sys/ptrace.h>
bec39cab
AC
17242int
17243main ()
17244{
a3828db0 17245PTRACE_GETFPXREGS;
bec39cab
AC
17246 ;
17247 return 0;
17248}
17249_ACEOF
17250rm -f conftest.$ac_objext
17251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17252 (eval $ac_compile) 2>conftest.er1
17253 ac_status=$?
17254 grep -v '^ *+' conftest.er1 >conftest.err
17255 rm -f conftest.er1
17256 cat conftest.err >&5
17257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17258 (exit $ac_status); } &&
b4e70030
JB
17259 { ac_try='test -z "$ac_c_werror_flag"
17260 || test ! -s conftest.err'
bec39cab
AC
17261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17262 (eval $ac_try) 2>&5
17263 ac_status=$?
17264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17265 (exit $ac_status); }; } &&
17266 { ac_try='test -s conftest.$ac_objext'
17267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17268 (eval $ac_try) 2>&5
17269 ac_status=$?
17270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17271 (exit $ac_status); }; }; then
a3828db0 17272 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 17273else
bec39cab
AC
17274 echo "$as_me: failed program was:" >&5
17275sed 's/^/| /' conftest.$ac_ext >&5
17276
b4e70030 17277gdb_cv_have_ptrace_getfpxregs=no
451928c5 17278fi
bec39cab 17279rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
17280fi
17281
b4e70030
JB
17282echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getfpxregs" >&5
17283echo "${ECHO_T}$gdb_cv_have_ptrace_getfpxregs" >&6
a3828db0 17284if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f
SE
17285
17286cat >>confdefs.h <<\_ACEOF
a3828db0 17287#define HAVE_PTRACE_GETFPXREGS 1
bec39cab 17288_ACEOF
451928c5 17289
97bf5e38 17290fi
451928c5 17291
a3828db0 17292# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
b4e70030
JB
17293echo "$as_me:$LINENO: checking for PT_GETDBREGS" >&5
17294echo $ECHO_N "checking for PT_GETDBREGS... $ECHO_C" >&6
a3828db0 17295if test "${gdb_cv_have_pt_getdbregs+set}" = set; then
bec39cab 17296 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17297else
bec39cab
AC
17298 cat >conftest.$ac_ext <<_ACEOF
17299/* confdefs.h. */
17300_ACEOF
17301cat confdefs.h >>conftest.$ac_ext
17302cat >>conftest.$ac_ext <<_ACEOF
17303/* end confdefs.h. */
a3828db0
MK
17304#include <sys/types.h>
17305#include <sys/ptrace.h>
bec39cab
AC
17306int
17307main ()
17308{
a3828db0 17309PT_GETDBREGS;
bec39cab
AC
17310 ;
17311 return 0;
17312}
17313_ACEOF
17314rm -f conftest.$ac_objext
17315if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17316 (eval $ac_compile) 2>conftest.er1
17317 ac_status=$?
17318 grep -v '^ *+' conftest.er1 >conftest.err
17319 rm -f conftest.er1
17320 cat conftest.err >&5
17321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17322 (exit $ac_status); } &&
b4e70030
JB
17323 { ac_try='test -z "$ac_c_werror_flag"
17324 || test ! -s conftest.err'
bec39cab
AC
17325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17326 (eval $ac_try) 2>&5
17327 ac_status=$?
17328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17329 (exit $ac_status); }; } &&
17330 { ac_try='test -s conftest.$ac_objext'
17331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17332 (eval $ac_try) 2>&5
17333 ac_status=$?
17334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17335 (exit $ac_status); }; }; then
a3828db0 17336 gdb_cv_have_pt_getdbregs=yes
3862412b 17337else
bec39cab
AC
17338 echo "$as_me: failed program was:" >&5
17339sed 's/^/| /' conftest.$ac_ext >&5
17340
b4e70030 17341gdb_cv_have_pt_getdbregs=no
3862412b 17342fi
bec39cab 17343rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
17344fi
17345
b4e70030
JB
17346echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getdbregs" >&5
17347echo "${ECHO_T}$gdb_cv_have_pt_getdbregs" >&6
a3828db0 17348if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f
SE
17349
17350cat >>confdefs.h <<\_ACEOF
a3828db0 17351#define HAVE_PT_GETDBREGS 1
bec39cab 17352_ACEOF
3862412b 17353
97bf5e38 17354fi
3862412b 17355
a3828db0 17356# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
b4e70030
JB
17357echo "$as_me:$LINENO: checking for PT_GETXMMREGS" >&5
17358echo $ECHO_N "checking for PT_GETXMMREGS... $ECHO_C" >&6
a3828db0 17359if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then
bec39cab 17360 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17361else
bec39cab
AC
17362 cat >conftest.$ac_ext <<_ACEOF
17363/* confdefs.h. */
17364_ACEOF
17365cat confdefs.h >>conftest.$ac_ext
17366cat >>conftest.$ac_ext <<_ACEOF
17367/* end confdefs.h. */
a3828db0
MK
17368#include <sys/types.h>
17369#include <sys/ptrace.h>
bec39cab
AC
17370int
17371main ()
17372{
a3828db0 17373PT_GETXMMREGS;
bec39cab
AC
17374 ;
17375 return 0;
17376}
17377_ACEOF
17378rm -f conftest.$ac_objext
17379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17380 (eval $ac_compile) 2>conftest.er1
17381 ac_status=$?
17382 grep -v '^ *+' conftest.er1 >conftest.err
17383 rm -f conftest.er1
17384 cat conftest.err >&5
17385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17386 (exit $ac_status); } &&
b4e70030
JB
17387 { ac_try='test -z "$ac_c_werror_flag"
17388 || test ! -s conftest.err'
bec39cab
AC
17389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17390 (eval $ac_try) 2>&5
17391 ac_status=$?
17392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17393 (exit $ac_status); }; } &&
17394 { ac_try='test -s conftest.$ac_objext'
17395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17396 (eval $ac_try) 2>&5
17397 ac_status=$?
17398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17399 (exit $ac_status); }; }; then
a3828db0 17400 gdb_cv_have_pt_getxmmregs=yes
3862412b 17401else
bec39cab
AC
17402 echo "$as_me: failed program was:" >&5
17403sed 's/^/| /' conftest.$ac_ext >&5
17404
b4e70030 17405gdb_cv_have_pt_getxmmregs=no
3862412b 17406fi
bec39cab 17407rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
17408fi
17409
b4e70030
JB
17410echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getxmmregs" >&5
17411echo "${ECHO_T}$gdb_cv_have_pt_getxmmregs" >&6
a3828db0 17412if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f
SE
17413
17414cat >>confdefs.h <<\_ACEOF
a3828db0 17415#define HAVE_PT_GETXMMREGS 1
bec39cab 17416_ACEOF
3862412b 17417
97bf5e38 17418fi
3862412b 17419
eb368090 17420# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
17421
17422if test "${target}" = "${host}"; then
17423 case "${host}" in
97bf5e38 17424 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f
SE
17425
17426cat >>confdefs.h <<\_ACEOF
97bf5e38 17427#define NEW_PROC_API 1
bec39cab 17428_ACEOF
97bf5e38
MK
17429
17430 ;;
c162e8c9 17431 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f
SE
17432
17433cat >>confdefs.h <<\_ACEOF
97bf5e38 17434#define NEW_PROC_API 1
bec39cab 17435_ACEOF
c960c18f
AC
17436
17437 ;;
17438 mips-sgi-irix5*)
17439 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f
SE
17440
17441cat >>confdefs.h <<\_ACEOF
c960c18f 17442#define _KMEMUSER 1
bec39cab 17443_ACEOF
97bf5e38
MK
17444
17445 ;;
17446 esac
17447fi
17448
17449if test "$ac_cv_header_sys_procfs_h" = yes; then
b4e70030
JB
17450 echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5
17451echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17452 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then
17453 echo $ECHO_N "(cached) $ECHO_C" >&6
17454else
17455 cat >conftest.$ac_ext <<_ACEOF
17456/* confdefs.h. */
17457_ACEOF
17458cat confdefs.h >>conftest.$ac_ext
17459cat >>conftest.$ac_ext <<_ACEOF
17460/* end confdefs.h. */
596c9d4b
KB
17461
17462#define _SYSCALL32
17463#include <sys/procfs.h>
bec39cab
AC
17464int
17465main ()
17466{
97bf5e38 17467pstatus_t avar
bec39cab
AC
17468 ;
17469 return 0;
17470}
17471_ACEOF
17472rm -f conftest.$ac_objext
17473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17474 (eval $ac_compile) 2>conftest.er1
17475 ac_status=$?
17476 grep -v '^ *+' conftest.er1 >conftest.err
17477 rm -f conftest.er1
17478 cat conftest.err >&5
17479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17480 (exit $ac_status); } &&
b4e70030
JB
17481 { ac_try='test -z "$ac_c_werror_flag"
17482 || test ! -s conftest.err'
bec39cab
AC
17483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17484 (eval $ac_try) 2>&5
17485 ac_status=$?
17486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17487 (exit $ac_status); }; } &&
17488 { ac_try='test -s conftest.$ac_objext'
17489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17490 (eval $ac_try) 2>&5
17491 ac_status=$?
17492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17493 (exit $ac_status); }; }; then
97bf5e38 17494 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 17495else
bec39cab
AC
17496 echo "$as_me: failed program was:" >&5
17497sed 's/^/| /' conftest.$ac_ext >&5
17498
b4e70030 17499bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 17500
596c9d4b 17501fi
bec39cab 17502rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17503fi
17504
97bf5e38 17505 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab
AC
17506
17507cat >>confdefs.h <<\_ACEOF
97bf5e38 17508#define HAVE_PSTATUS_T 1
bec39cab 17509_ACEOF
596c9d4b
KB
17510
17511 fi
b4e70030
JB
17512 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
17513echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6
596c9d4b 17514
b4e70030
JB
17515 echo "$as_me:$LINENO: checking for prrun_t in sys/procfs.h" >&5
17516echo $ECHO_N "checking for prrun_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17517 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then
17518 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 17519else
bec39cab
AC
17520 cat >conftest.$ac_ext <<_ACEOF
17521/* confdefs.h. */
17522_ACEOF
17523cat confdefs.h >>conftest.$ac_ext
17524cat >>conftest.$ac_ext <<_ACEOF
17525/* end confdefs.h. */
596c9d4b
KB
17526
17527#define _SYSCALL32
17528#include <sys/procfs.h>
bec39cab
AC
17529int
17530main ()
17531{
97bf5e38 17532prrun_t avar
bec39cab
AC
17533 ;
17534 return 0;
17535}
17536_ACEOF
17537rm -f conftest.$ac_objext
17538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17539 (eval $ac_compile) 2>conftest.er1
17540 ac_status=$?
17541 grep -v '^ *+' conftest.er1 >conftest.err
17542 rm -f conftest.er1
17543 cat conftest.err >&5
17544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17545 (exit $ac_status); } &&
b4e70030
JB
17546 { ac_try='test -z "$ac_c_werror_flag"
17547 || test ! -s conftest.err'
bec39cab
AC
17548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17549 (eval $ac_try) 2>&5
17550 ac_status=$?
17551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17552 (exit $ac_status); }; } &&
17553 { ac_try='test -s conftest.$ac_objext'
17554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17555 (eval $ac_try) 2>&5
17556 ac_status=$?
17557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17558 (exit $ac_status); }; }; then
97bf5e38 17559 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 17560else
bec39cab
AC
17561 echo "$as_me: failed program was:" >&5
17562sed 's/^/| /' conftest.$ac_ext >&5
17563
b4e70030 17564bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 17565
596c9d4b 17566fi
bec39cab 17567rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17568fi
17569
97bf5e38 17570 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab
AC
17571
17572cat >>confdefs.h <<\_ACEOF
97bf5e38 17573#define HAVE_PRRUN_T 1
bec39cab 17574_ACEOF
596c9d4b
KB
17575
17576 fi
b4e70030
JB
17577 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
17578echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prrun_t" >&6
596c9d4b 17579
b4e70030
JB
17580 echo "$as_me:$LINENO: checking for gregset_t in sys/procfs.h" >&5
17581echo $ECHO_N "checking for gregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17582 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then
17583 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 17584else
bec39cab
AC
17585 cat >conftest.$ac_ext <<_ACEOF
17586/* confdefs.h. */
17587_ACEOF
17588cat confdefs.h >>conftest.$ac_ext
17589cat >>conftest.$ac_ext <<_ACEOF
17590/* end confdefs.h. */
596c9d4b
KB
17591
17592#define _SYSCALL32
17593#include <sys/procfs.h>
bec39cab
AC
17594int
17595main ()
17596{
97bf5e38 17597gregset_t avar
bec39cab
AC
17598 ;
17599 return 0;
17600}
17601_ACEOF
17602rm -f conftest.$ac_objext
17603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17604 (eval $ac_compile) 2>conftest.er1
17605 ac_status=$?
17606 grep -v '^ *+' conftest.er1 >conftest.err
17607 rm -f conftest.er1
17608 cat conftest.err >&5
17609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17610 (exit $ac_status); } &&
b4e70030
JB
17611 { ac_try='test -z "$ac_c_werror_flag"
17612 || test ! -s conftest.err'
bec39cab
AC
17613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17614 (eval $ac_try) 2>&5
17615 ac_status=$?
17616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17617 (exit $ac_status); }; } &&
17618 { ac_try='test -s conftest.$ac_objext'
17619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17620 (eval $ac_try) 2>&5
17621 ac_status=$?
17622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17623 (exit $ac_status); }; }; then
97bf5e38 17624 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 17625else
bec39cab
AC
17626 echo "$as_me: failed program was:" >&5
17627sed 's/^/| /' conftest.$ac_ext >&5
17628
b4e70030 17629bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 17630
596c9d4b 17631fi
bec39cab 17632rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17633fi
17634
97bf5e38 17635 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab
AC
17636
17637cat >>confdefs.h <<\_ACEOF
97bf5e38 17638#define HAVE_GREGSET_T 1
bec39cab 17639_ACEOF
596c9d4b
KB
17640
17641 fi
b4e70030
JB
17642 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
17643echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_gregset_t" >&6
451928c5 17644
b4e70030
JB
17645 echo "$as_me:$LINENO: checking for fpregset_t in sys/procfs.h" >&5
17646echo $ECHO_N "checking for fpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17647 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then
17648 echo $ECHO_N "(cached) $ECHO_C" >&6
d84dd0c5 17649else
bec39cab
AC
17650 cat >conftest.$ac_ext <<_ACEOF
17651/* confdefs.h. */
17652_ACEOF
17653cat confdefs.h >>conftest.$ac_ext
17654cat >>conftest.$ac_ext <<_ACEOF
17655/* end confdefs.h. */
97bf5e38
MK
17656
17657#define _SYSCALL32
d84dd0c5 17658#include <sys/procfs.h>
bec39cab
AC
17659int
17660main ()
17661{
97bf5e38 17662fpregset_t avar
bec39cab
AC
17663 ;
17664 return 0;
17665}
17666_ACEOF
17667rm -f conftest.$ac_objext
17668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17669 (eval $ac_compile) 2>conftest.er1
17670 ac_status=$?
17671 grep -v '^ *+' conftest.er1 >conftest.err
17672 rm -f conftest.er1
17673 cat conftest.err >&5
17674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17675 (exit $ac_status); } &&
b4e70030
JB
17676 { ac_try='test -z "$ac_c_werror_flag"
17677 || test ! -s conftest.err'
bec39cab
AC
17678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17679 (eval $ac_try) 2>&5
17680 ac_status=$?
17681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17682 (exit $ac_status); }; } &&
17683 { ac_try='test -s conftest.$ac_objext'
17684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17685 (eval $ac_try) 2>&5
17686 ac_status=$?
17687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17688 (exit $ac_status); }; }; then
97bf5e38 17689 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 17690else
bec39cab
AC
17691 echo "$as_me: failed program was:" >&5
17692sed 's/^/| /' conftest.$ac_ext >&5
17693
b4e70030 17694bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 17695
d84dd0c5 17696fi
bec39cab 17697rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
17698fi
17699
97bf5e38 17700 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab
AC
17701
17702cat >>confdefs.h <<\_ACEOF
97bf5e38 17703#define HAVE_FPREGSET_T 1
bec39cab 17704_ACEOF
d84dd0c5 17705
97bf5e38 17706 fi
b4e70030
JB
17707 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
17708echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_fpregset_t" >&6
d84dd0c5 17709
b4e70030
JB
17710 echo "$as_me:$LINENO: checking for prgregset_t in sys/procfs.h" >&5
17711echo $ECHO_N "checking for prgregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17712 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then
17713 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17714else
bec39cab
AC
17715 cat >conftest.$ac_ext <<_ACEOF
17716/* confdefs.h. */
17717_ACEOF
17718cat confdefs.h >>conftest.$ac_ext
17719cat >>conftest.$ac_ext <<_ACEOF
17720/* end confdefs.h. */
c906108c 17721
97bf5e38
MK
17722#define _SYSCALL32
17723#include <sys/procfs.h>
bec39cab
AC
17724int
17725main ()
17726{
97bf5e38 17727prgregset_t avar
bec39cab
AC
17728 ;
17729 return 0;
17730}
17731_ACEOF
17732rm -f conftest.$ac_objext
17733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17734 (eval $ac_compile) 2>conftest.er1
17735 ac_status=$?
17736 grep -v '^ *+' conftest.er1 >conftest.err
17737 rm -f conftest.er1
17738 cat conftest.err >&5
17739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17740 (exit $ac_status); } &&
b4e70030
JB
17741 { ac_try='test -z "$ac_c_werror_flag"
17742 || test ! -s conftest.err'
bec39cab
AC
17743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17744 (eval $ac_try) 2>&5
17745 ac_status=$?
17746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17747 (exit $ac_status); }; } &&
17748 { ac_try='test -s conftest.$ac_objext'
17749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17750 (eval $ac_try) 2>&5
17751 ac_status=$?
17752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17753 (exit $ac_status); }; }; then
97bf5e38 17754 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 17755else
bec39cab
AC
17756 echo "$as_me: failed program was:" >&5
17757sed 's/^/| /' conftest.$ac_ext >&5
17758
b4e70030 17759bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 17760
c906108c 17761fi
bec39cab 17762rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17763fi
17764
97bf5e38 17765 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab
AC
17766
17767cat >>confdefs.h <<\_ACEOF
97bf5e38 17768#define HAVE_PRGREGSET_T 1
bec39cab 17769_ACEOF
c906108c 17770
97bf5e38 17771 fi
b4e70030
JB
17772 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
17773echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset_t" >&6
c906108c 17774
b4e70030
JB
17775 echo "$as_me:$LINENO: checking for prfpregset_t in sys/procfs.h" >&5
17776echo $ECHO_N "checking for prfpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17777 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then
17778 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17779else
bec39cab
AC
17780 cat >conftest.$ac_ext <<_ACEOF
17781/* confdefs.h. */
17782_ACEOF
17783cat confdefs.h >>conftest.$ac_ext
17784cat >>conftest.$ac_ext <<_ACEOF
17785/* end confdefs.h. */
97bf5e38
MK
17786
17787#define _SYSCALL32
17788#include <sys/procfs.h>
bec39cab
AC
17789int
17790main ()
17791{
97bf5e38 17792prfpregset_t avar
bec39cab
AC
17793 ;
17794 return 0;
17795}
17796_ACEOF
17797rm -f conftest.$ac_objext
17798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17799 (eval $ac_compile) 2>conftest.er1
17800 ac_status=$?
17801 grep -v '^ *+' conftest.er1 >conftest.err
17802 rm -f conftest.er1
17803 cat conftest.err >&5
17804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17805 (exit $ac_status); } &&
b4e70030
JB
17806 { ac_try='test -z "$ac_c_werror_flag"
17807 || test ! -s conftest.err'
bec39cab
AC
17808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17809 (eval $ac_try) 2>&5
17810 ac_status=$?
17811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17812 (exit $ac_status); }; } &&
17813 { ac_try='test -s conftest.$ac_objext'
17814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17815 (eval $ac_try) 2>&5
17816 ac_status=$?
17817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17818 (exit $ac_status); }; }; then
97bf5e38 17819 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 17820else
bec39cab
AC
17821 echo "$as_me: failed program was:" >&5
17822sed 's/^/| /' conftest.$ac_ext >&5
17823
b4e70030 17824bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 17825
d45fe813 17826fi
bec39cab 17827rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17828fi
17829
97bf5e38 17830 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab
AC
17831
17832cat >>confdefs.h <<\_ACEOF
97bf5e38 17833#define HAVE_PRFPREGSET_T 1
bec39cab 17834_ACEOF
d45fe813 17835
97bf5e38 17836 fi
b4e70030
JB
17837 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
17838echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6
d45fe813 17839
b4e70030
JB
17840 echo "$as_me:$LINENO: checking for prgregset32_t in sys/procfs.h" >&5
17841echo $ECHO_N "checking for prgregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17842 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then
17843 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17844else
bec39cab
AC
17845 cat >conftest.$ac_ext <<_ACEOF
17846/* confdefs.h. */
17847_ACEOF
17848cat confdefs.h >>conftest.$ac_ext
17849cat >>conftest.$ac_ext <<_ACEOF
17850/* end confdefs.h. */
97bf5e38
MK
17851
17852#define _SYSCALL32
17853#include <sys/procfs.h>
bec39cab
AC
17854int
17855main ()
17856{
97bf5e38 17857prgregset32_t avar
bec39cab
AC
17858 ;
17859 return 0;
17860}
17861_ACEOF
17862rm -f conftest.$ac_objext
17863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17864 (eval $ac_compile) 2>conftest.er1
17865 ac_status=$?
17866 grep -v '^ *+' conftest.er1 >conftest.err
17867 rm -f conftest.er1
17868 cat conftest.err >&5
17869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17870 (exit $ac_status); } &&
b4e70030
JB
17871 { ac_try='test -z "$ac_c_werror_flag"
17872 || test ! -s conftest.err'
bec39cab
AC
17873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17874 (eval $ac_try) 2>&5
17875 ac_status=$?
17876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17877 (exit $ac_status); }; } &&
17878 { ac_try='test -s conftest.$ac_objext'
17879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17880 (eval $ac_try) 2>&5
17881 ac_status=$?
17882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17883 (exit $ac_status); }; }; then
97bf5e38 17884 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 17885else
bec39cab
AC
17886 echo "$as_me: failed program was:" >&5
17887sed 's/^/| /' conftest.$ac_ext >&5
17888
b4e70030 17889bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 17890
d45fe813 17891fi
bec39cab 17892rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17893fi
17894
97bf5e38 17895 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab
AC
17896
17897cat >>confdefs.h <<\_ACEOF
97bf5e38 17898#define HAVE_PRGREGSET32_T 1
bec39cab 17899_ACEOF
d45fe813 17900
97bf5e38 17901 fi
b4e70030
JB
17902 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
17903echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6
d45fe813 17904
b4e70030
JB
17905 echo "$as_me:$LINENO: checking for prfpregset32_t in sys/procfs.h" >&5
17906echo $ECHO_N "checking for prfpregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17907 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then
17908 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17909else
bec39cab
AC
17910 cat >conftest.$ac_ext <<_ACEOF
17911/* confdefs.h. */
17912_ACEOF
17913cat confdefs.h >>conftest.$ac_ext
17914cat >>conftest.$ac_ext <<_ACEOF
17915/* end confdefs.h. */
97bf5e38
MK
17916
17917#define _SYSCALL32
17918#include <sys/procfs.h>
bec39cab
AC
17919int
17920main ()
17921{
97bf5e38 17922prfpregset32_t avar
bec39cab
AC
17923 ;
17924 return 0;
17925}
17926_ACEOF
17927rm -f conftest.$ac_objext
17928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17929 (eval $ac_compile) 2>conftest.er1
17930 ac_status=$?
17931 grep -v '^ *+' conftest.er1 >conftest.err
17932 rm -f conftest.er1
17933 cat conftest.err >&5
17934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17935 (exit $ac_status); } &&
b4e70030
JB
17936 { ac_try='test -z "$ac_c_werror_flag"
17937 || test ! -s conftest.err'
bec39cab
AC
17938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17939 (eval $ac_try) 2>&5
17940 ac_status=$?
17941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17942 (exit $ac_status); }; } &&
17943 { ac_try='test -s conftest.$ac_objext'
17944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17945 (eval $ac_try) 2>&5
17946 ac_status=$?
17947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17948 (exit $ac_status); }; }; then
97bf5e38 17949 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 17950else
bec39cab
AC
17951 echo "$as_me: failed program was:" >&5
17952sed 's/^/| /' conftest.$ac_ext >&5
17953
b4e70030 17954bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 17955
d45fe813 17956fi
bec39cab 17957rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17958fi
17959
97bf5e38 17960 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab
AC
17961
17962cat >>confdefs.h <<\_ACEOF
97bf5e38 17963#define HAVE_PRFPREGSET32_T 1
bec39cab 17964_ACEOF
d45fe813 17965
97bf5e38 17966 fi
b4e70030
JB
17967 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
17968echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6
d45fe813 17969
b4e70030
JB
17970 echo "$as_me:$LINENO: checking for lwpid_t in sys/procfs.h" >&5
17971echo $ECHO_N "checking for lwpid_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17972 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then
17973 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17974else
bec39cab
AC
17975 cat >conftest.$ac_ext <<_ACEOF
17976/* confdefs.h. */
17977_ACEOF
17978cat confdefs.h >>conftest.$ac_ext
17979cat >>conftest.$ac_ext <<_ACEOF
17980/* end confdefs.h. */
97bf5e38 17981
d45fe813 17982#define _SYSCALL32
97bf5e38 17983#include <sys/procfs.h>
bec39cab
AC
17984int
17985main ()
17986{
97bf5e38 17987lwpid_t avar
bec39cab
AC
17988 ;
17989 return 0;
17990}
17991_ACEOF
17992rm -f conftest.$ac_objext
17993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17994 (eval $ac_compile) 2>conftest.er1
17995 ac_status=$?
17996 grep -v '^ *+' conftest.er1 >conftest.err
17997 rm -f conftest.er1
17998 cat conftest.err >&5
17999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18000 (exit $ac_status); } &&
b4e70030
JB
18001 { ac_try='test -z "$ac_c_werror_flag"
18002 || test ! -s conftest.err'
bec39cab
AC
18003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18004 (eval $ac_try) 2>&5
18005 ac_status=$?
18006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18007 (exit $ac_status); }; } &&
18008 { ac_try='test -s conftest.$ac_objext'
18009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18010 (eval $ac_try) 2>&5
18011 ac_status=$?
18012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18013 (exit $ac_status); }; }; then
97bf5e38 18014 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 18015else
bec39cab
AC
18016 echo "$as_me: failed program was:" >&5
18017sed 's/^/| /' conftest.$ac_ext >&5
18018
b4e70030 18019bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 18020
d45fe813 18021fi
bec39cab 18022rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
18023fi
18024
97bf5e38 18025 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab
AC
18026
18027cat >>confdefs.h <<\_ACEOF
97bf5e38 18028#define HAVE_LWPID_T 1
bec39cab 18029_ACEOF
d45fe813 18030
97bf5e38 18031 fi
b4e70030
JB
18032 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
18033echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpid_t" >&6
c906108c 18034
b4e70030
JB
18035 echo "$as_me:$LINENO: checking for psaddr_t in sys/procfs.h" >&5
18036echo $ECHO_N "checking for psaddr_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18037 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then
18038 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18039else
bec39cab
AC
18040 cat >conftest.$ac_ext <<_ACEOF
18041/* confdefs.h. */
18042_ACEOF
18043cat confdefs.h >>conftest.$ac_ext
18044cat >>conftest.$ac_ext <<_ACEOF
18045/* end confdefs.h. */
c906108c 18046
97bf5e38
MK
18047#define _SYSCALL32
18048#include <sys/procfs.h>
bec39cab
AC
18049int
18050main ()
18051{
97bf5e38 18052psaddr_t avar
bec39cab
AC
18053 ;
18054 return 0;
18055}
18056_ACEOF
18057rm -f conftest.$ac_objext
18058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18059 (eval $ac_compile) 2>conftest.er1
18060 ac_status=$?
18061 grep -v '^ *+' conftest.er1 >conftest.err
18062 rm -f conftest.er1
18063 cat conftest.err >&5
18064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18065 (exit $ac_status); } &&
b4e70030
JB
18066 { ac_try='test -z "$ac_c_werror_flag"
18067 || test ! -s conftest.err'
bec39cab
AC
18068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18069 (eval $ac_try) 2>&5
18070 ac_status=$?
18071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18072 (exit $ac_status); }; } &&
18073 { ac_try='test -s conftest.$ac_objext'
18074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18075 (eval $ac_try) 2>&5
18076 ac_status=$?
18077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18078 (exit $ac_status); }; }; then
97bf5e38 18079 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 18080else
bec39cab
AC
18081 echo "$as_me: failed program was:" >&5
18082sed 's/^/| /' conftest.$ac_ext >&5
18083
b4e70030 18084bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 18085
c906108c 18086fi
bec39cab 18087rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18088fi
18089
97bf5e38 18090 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab
AC
18091
18092cat >>confdefs.h <<\_ACEOF
97bf5e38 18093#define HAVE_PSADDR_T 1
bec39cab 18094_ACEOF
c906108c 18095
97bf5e38 18096 fi
b4e70030
JB
18097 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
18098echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psaddr_t" >&6
c906108c 18099
b4e70030
JB
18100 echo "$as_me:$LINENO: checking for prsysent_t in sys/procfs.h" >&5
18101echo $ECHO_N "checking for prsysent_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18102 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then
18103 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18104else
bec39cab
AC
18105 cat >conftest.$ac_ext <<_ACEOF
18106/* confdefs.h. */
18107_ACEOF
18108cat confdefs.h >>conftest.$ac_ext
18109cat >>conftest.$ac_ext <<_ACEOF
18110/* end confdefs.h. */
c906108c 18111
97bf5e38
MK
18112#define _SYSCALL32
18113#include <sys/procfs.h>
bec39cab
AC
18114int
18115main ()
18116{
97bf5e38 18117prsysent_t avar
bec39cab
AC
18118 ;
18119 return 0;
18120}
18121_ACEOF
18122rm -f conftest.$ac_objext
18123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18124 (eval $ac_compile) 2>conftest.er1
18125 ac_status=$?
18126 grep -v '^ *+' conftest.er1 >conftest.err
18127 rm -f conftest.er1
18128 cat conftest.err >&5
18129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18130 (exit $ac_status); } &&
b4e70030
JB
18131 { ac_try='test -z "$ac_c_werror_flag"
18132 || test ! -s conftest.err'
bec39cab
AC
18133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18134 (eval $ac_try) 2>&5
18135 ac_status=$?
18136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18137 (exit $ac_status); }; } &&
18138 { ac_try='test -s conftest.$ac_objext'
18139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18140 (eval $ac_try) 2>&5
18141 ac_status=$?
18142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18143 (exit $ac_status); }; }; then
97bf5e38 18144 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 18145else
bec39cab
AC
18146 echo "$as_me: failed program was:" >&5
18147sed 's/^/| /' conftest.$ac_ext >&5
18148
b4e70030 18149bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 18150
c906108c 18151fi
bec39cab 18152rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18153fi
18154
97bf5e38 18155 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab
AC
18156
18157cat >>confdefs.h <<\_ACEOF
97bf5e38 18158#define HAVE_PRSYSENT_T 1
bec39cab 18159_ACEOF
c906108c 18160
97bf5e38 18161 fi
b4e70030
JB
18162 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
18163echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prsysent_t" >&6
c906108c 18164
b4e70030
JB
18165 echo "$as_me:$LINENO: checking for pr_sigset_t in sys/procfs.h" >&5
18166echo $ECHO_N "checking for pr_sigset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18167 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then
18168 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18169else
bec39cab
AC
18170 cat >conftest.$ac_ext <<_ACEOF
18171/* confdefs.h. */
18172_ACEOF
18173cat confdefs.h >>conftest.$ac_ext
18174cat >>conftest.$ac_ext <<_ACEOF
18175/* end confdefs.h. */
c906108c 18176
97bf5e38
MK
18177#define _SYSCALL32
18178#include <sys/procfs.h>
bec39cab
AC
18179int
18180main ()
18181{
97bf5e38 18182pr_sigset_t avar
bec39cab
AC
18183 ;
18184 return 0;
18185}
18186_ACEOF
18187rm -f conftest.$ac_objext
18188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18189 (eval $ac_compile) 2>conftest.er1
18190 ac_status=$?
18191 grep -v '^ *+' conftest.er1 >conftest.err
18192 rm -f conftest.er1
18193 cat conftest.err >&5
18194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18195 (exit $ac_status); } &&
b4e70030
JB
18196 { ac_try='test -z "$ac_c_werror_flag"
18197 || test ! -s conftest.err'
bec39cab
AC
18198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18199 (eval $ac_try) 2>&5
18200 ac_status=$?
18201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18202 (exit $ac_status); }; } &&
18203 { ac_try='test -s conftest.$ac_objext'
18204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18205 (eval $ac_try) 2>&5
18206 ac_status=$?
18207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18208 (exit $ac_status); }; }; then
97bf5e38 18209 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 18210else
bec39cab
AC
18211 echo "$as_me: failed program was:" >&5
18212sed 's/^/| /' conftest.$ac_ext >&5
18213
b4e70030 18214bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 18215
c906108c 18216fi
bec39cab 18217rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18218fi
18219
97bf5e38 18220 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab
AC
18221
18222cat >>confdefs.h <<\_ACEOF
97bf5e38 18223#define HAVE_PR_SIGSET_T 1
bec39cab 18224_ACEOF
c906108c 18225
97bf5e38 18226 fi
b4e70030
JB
18227 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
18228echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6
c906108c 18229
b4e70030
JB
18230 echo "$as_me:$LINENO: checking for pr_sigaction64_t in sys/procfs.h" >&5
18231echo $ECHO_N "checking for pr_sigaction64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18232 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then
18233 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18234else
bec39cab
AC
18235 cat >conftest.$ac_ext <<_ACEOF
18236/* confdefs.h. */
18237_ACEOF
18238cat confdefs.h >>conftest.$ac_ext
18239cat >>conftest.$ac_ext <<_ACEOF
18240/* end confdefs.h. */
c906108c 18241
97bf5e38
MK
18242#define _SYSCALL32
18243#include <sys/procfs.h>
bec39cab
AC
18244int
18245main ()
18246{
97bf5e38 18247pr_sigaction64_t avar
bec39cab
AC
18248 ;
18249 return 0;
18250}
18251_ACEOF
18252rm -f conftest.$ac_objext
18253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18254 (eval $ac_compile) 2>conftest.er1
18255 ac_status=$?
18256 grep -v '^ *+' conftest.er1 >conftest.err
18257 rm -f conftest.er1
18258 cat conftest.err >&5
18259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18260 (exit $ac_status); } &&
b4e70030
JB
18261 { ac_try='test -z "$ac_c_werror_flag"
18262 || test ! -s conftest.err'
bec39cab
AC
18263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18264 (eval $ac_try) 2>&5
18265 ac_status=$?
18266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18267 (exit $ac_status); }; } &&
18268 { ac_try='test -s conftest.$ac_objext'
18269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18270 (eval $ac_try) 2>&5
18271 ac_status=$?
18272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18273 (exit $ac_status); }; }; then
97bf5e38 18274 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 18275else
bec39cab
AC
18276 echo "$as_me: failed program was:" >&5
18277sed 's/^/| /' conftest.$ac_ext >&5
18278
b4e70030 18279bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 18280
c906108c 18281fi
bec39cab 18282rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18283fi
18284
97bf5e38 18285 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab
AC
18286
18287cat >>confdefs.h <<\_ACEOF
97bf5e38 18288#define HAVE_PR_SIGACTION64_T 1
bec39cab 18289_ACEOF
c906108c 18290
97bf5e38 18291 fi
b4e70030
JB
18292 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
18293echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6
97bf5e38 18294
b4e70030
JB
18295 echo "$as_me:$LINENO: checking for pr_siginfo64_t in sys/procfs.h" >&5
18296echo $ECHO_N "checking for pr_siginfo64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18297 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then
18298 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18299else
bec39cab
AC
18300 cat >conftest.$ac_ext <<_ACEOF
18301/* confdefs.h. */
18302_ACEOF
18303cat confdefs.h >>conftest.$ac_ext
18304cat >>conftest.$ac_ext <<_ACEOF
18305/* end confdefs.h. */
97bf5e38
MK
18306
18307#define _SYSCALL32
18308#include <sys/procfs.h>
bec39cab
AC
18309int
18310main ()
18311{
97bf5e38 18312pr_siginfo64_t avar
bec39cab
AC
18313 ;
18314 return 0;
18315}
18316_ACEOF
18317rm -f conftest.$ac_objext
18318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18319 (eval $ac_compile) 2>conftest.er1
18320 ac_status=$?
18321 grep -v '^ *+' conftest.er1 >conftest.err
18322 rm -f conftest.er1
18323 cat conftest.err >&5
18324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18325 (exit $ac_status); } &&
b4e70030
JB
18326 { ac_try='test -z "$ac_c_werror_flag"
18327 || test ! -s conftest.err'
bec39cab
AC
18328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18329 (eval $ac_try) 2>&5
18330 ac_status=$?
18331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18332 (exit $ac_status); }; } &&
18333 { ac_try='test -s conftest.$ac_objext'
18334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18335 (eval $ac_try) 2>&5
18336 ac_status=$?
18337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18338 (exit $ac_status); }; }; then
97bf5e38
MK
18339 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
18340else
bec39cab
AC
18341 echo "$as_me: failed program was:" >&5
18342sed 's/^/| /' conftest.$ac_ext >&5
18343
b4e70030 18344bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 18345
97bf5e38 18346fi
bec39cab 18347rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18348fi
c906108c 18349
97bf5e38 18350 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab
AC
18351
18352cat >>confdefs.h <<\_ACEOF
97bf5e38 18353#define HAVE_PR_SIGINFO64_T 1
bec39cab 18354_ACEOF
c906108c 18355
97bf5e38 18356 fi
b4e70030
JB
18357 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
18358echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6
bec39cab
AC
18359
18360
97bf5e38
MK
18361
18362
18363
97bf5e38 18364 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
b4e70030
JB
18365 echo "$as_me:$LINENO: checking whether prfpregset_t type is broken" >&5
18366echo $ECHO_N "checking whether prfpregset_t type is broken... $ECHO_C" >&6
bec39cab
AC
18367 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then
18368 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
18369else
18370 if test "$cross_compiling" = yes; then
97bf5e38 18371 gdb_cv_prfpregset_t_broken=yes
c906108c 18372else
bec39cab
AC
18373 cat >conftest.$ac_ext <<_ACEOF
18374/* confdefs.h. */
18375_ACEOF
18376cat confdefs.h >>conftest.$ac_ext
18377cat >>conftest.$ac_ext <<_ACEOF
18378/* end confdefs.h. */
97bf5e38
MK
18379#include <sys/procfs.h>
18380 int main ()
18381 {
18382 if (sizeof (prfpregset_t) == sizeof (void *))
18383 return 1;
18384 return 0;
18385 }
bec39cab
AC
18386_ACEOF
18387rm -f conftest$ac_exeext
18388if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18389 (eval $ac_link) 2>&5
18390 ac_status=$?
18391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18392 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18394 (eval $ac_try) 2>&5
18395 ac_status=$?
18396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18397 (exit $ac_status); }; }; then
97bf5e38 18398 gdb_cv_prfpregset_t_broken=no
c906108c 18399else
bec39cab
AC
18400 echo "$as_me: program exited with status $ac_status" >&5
18401echo "$as_me: failed program was:" >&5
18402sed 's/^/| /' conftest.$ac_ext >&5
18403
18404( exit $ac_status )
18405gdb_cv_prfpregset_t_broken=yes
c906108c 18406fi
b4e70030 18407rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 18408fi
c906108c
SS
18409fi
18410
b4e70030
JB
18411 echo "$as_me:$LINENO: result: $gdb_cv_prfpregset_t_broken" >&5
18412echo "${ECHO_T}$gdb_cv_prfpregset_t_broken" >&6
97bf5e38 18413 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f
SE
18414
18415cat >>confdefs.h <<\_ACEOF
97bf5e38 18416#define PRFPREGSET_T_BROKEN 1
bec39cab 18417_ACEOF
c906108c 18418
97bf5e38
MK
18419 fi
18420 fi
c906108c 18421
bec39cab 18422
b4e70030
JB
18423 echo "$as_me:$LINENO: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
18424echo $ECHO_N "checking for PIOCSET ioctl entry in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18425 if test "${gdb_cv_have_procfs_piocset+set}" = set; then
18426 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18427else
bec39cab
AC
18428 cat >conftest.$ac_ext <<_ACEOF
18429/* confdefs.h. */
18430_ACEOF
18431cat confdefs.h >>conftest.$ac_ext
18432cat >>conftest.$ac_ext <<_ACEOF
18433/* end confdefs.h. */
97bf5e38
MK
18434#include <unistd.h>
18435#include <sys/types.h>
18436#include <sys/procfs.h>
18437
bec39cab
AC
18438int
18439main ()
18440{
97bf5e38
MK
18441
18442 int dummy;;
18443 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
18444
18445 ;
18446 return 0;
18447}
18448_ACEOF
18449rm -f conftest.$ac_objext
18450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18451 (eval $ac_compile) 2>conftest.er1
18452 ac_status=$?
18453 grep -v '^ *+' conftest.er1 >conftest.err
18454 rm -f conftest.er1
18455 cat conftest.err >&5
18456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18457 (exit $ac_status); } &&
b4e70030
JB
18458 { ac_try='test -z "$ac_c_werror_flag"
18459 || test ! -s conftest.err'
bec39cab
AC
18460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18461 (eval $ac_try) 2>&5
18462 ac_status=$?
18463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18464 (exit $ac_status); }; } &&
18465 { ac_try='test -s conftest.$ac_objext'
18466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18467 (eval $ac_try) 2>&5
18468 ac_status=$?
18469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18470 (exit $ac_status); }; }; then
97bf5e38 18471 gdb_cv_have_procfs_piocset=yes
c906108c 18472else
bec39cab
AC
18473 echo "$as_me: failed program was:" >&5
18474sed 's/^/| /' conftest.$ac_ext >&5
18475
b4e70030 18476gdb_cv_have_procfs_piocset=no
c906108c 18477fi
bec39cab 18478rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18479fi
97bf5e38 18480
b4e70030
JB
18481 echo "$as_me:$LINENO: result: $gdb_cv_have_procfs_piocset" >&5
18482echo "${ECHO_T}$gdb_cv_have_procfs_piocset" >&6
97bf5e38 18483 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f
SE
18484
18485cat >>confdefs.h <<\_ACEOF
97bf5e38 18486#define HAVE_PROCFS_PIOCSET 1
bec39cab 18487_ACEOF
97bf5e38
MK
18488
18489 fi
c906108c 18490fi
c906108c 18491
97bf5e38 18492if test ${host} = ${target} ; then
bec39cab 18493
b4e70030
JB
18494 echo "$as_me:$LINENO: checking for member l_addr in struct link_map" >&5
18495echo $ECHO_N "checking for member l_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
18496 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then
18497 echo $ECHO_N "(cached) $ECHO_C" >&6
18498else
18499 cat >conftest.$ac_ext <<_ACEOF
18500/* confdefs.h. */
18501_ACEOF
18502cat confdefs.h >>conftest.$ac_ext
18503cat >>conftest.$ac_ext <<_ACEOF
18504/* end confdefs.h. */
97bf5e38 18505#include <link.h>
bec39cab
AC
18506int
18507main ()
18508{
97bf5e38 18509struct link_map lm; (void) lm.l_addr;
bec39cab
AC
18510 ;
18511 return 0;
18512}
18513_ACEOF
18514rm -f conftest.$ac_objext
18515if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18516 (eval $ac_compile) 2>conftest.er1
18517 ac_status=$?
18518 grep -v '^ *+' conftest.er1 >conftest.err
18519 rm -f conftest.er1
18520 cat conftest.err >&5
18521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18522 (exit $ac_status); } &&
b4e70030
JB
18523 { ac_try='test -z "$ac_c_werror_flag"
18524 || test ! -s conftest.err'
bec39cab
AC
18525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18526 (eval $ac_try) 2>&5
18527 ac_status=$?
18528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18529 (exit $ac_status); }; } &&
18530 { ac_try='test -s conftest.$ac_objext'
18531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18532 (eval $ac_try) 2>&5
18533 ac_status=$?
18534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18535 (exit $ac_status); }; }; then
97bf5e38 18536 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 18537else
bec39cab
AC
18538 echo "$as_me: failed program was:" >&5
18539sed 's/^/| /' conftest.$ac_ext >&5
18540
b4e70030 18541gdb_cv_have_struct_link_map_with_l_members=no
c906108c 18542fi
bec39cab 18543rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18544fi
18545
b4e70030
JB
18546 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
18547echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_l_members" >&6
97bf5e38 18548 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f
SE
18549
18550cat >>confdefs.h <<\_ACEOF
97bf5e38 18551#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
bec39cab 18552_ACEOF
97bf5e38
MK
18553
18554 fi
18555
bec39cab 18556
b4e70030
JB
18557 echo "$as_me:$LINENO: checking for member lm_addr in struct link_map" >&5
18558echo $ECHO_N "checking for member lm_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
18559 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then
18560 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18561else
bec39cab
AC
18562 cat >conftest.$ac_ext <<_ACEOF
18563/* confdefs.h. */
18564_ACEOF
18565cat confdefs.h >>conftest.$ac_ext
18566cat >>conftest.$ac_ext <<_ACEOF
18567/* end confdefs.h. */
97bf5e38
MK
18568#include <sys/types.h>
18569#include <link.h>
bec39cab
AC
18570int
18571main ()
18572{
97bf5e38 18573struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
18574 ;
18575 return 0;
18576}
18577_ACEOF
18578rm -f conftest.$ac_objext
18579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18580 (eval $ac_compile) 2>conftest.er1
18581 ac_status=$?
18582 grep -v '^ *+' conftest.er1 >conftest.err
18583 rm -f conftest.er1
18584 cat conftest.err >&5
18585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18586 (exit $ac_status); } &&
b4e70030
JB
18587 { ac_try='test -z "$ac_c_werror_flag"
18588 || test ! -s conftest.err'
bec39cab
AC
18589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18590 (eval $ac_try) 2>&5
18591 ac_status=$?
18592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18593 (exit $ac_status); }; } &&
18594 { ac_try='test -s conftest.$ac_objext'
18595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18596 (eval $ac_try) 2>&5
18597 ac_status=$?
18598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18599 (exit $ac_status); }; }; then
97bf5e38
MK
18600 gdb_cv_have_struct_link_map_with_lm_members=yes
18601else
bec39cab
AC
18602 echo "$as_me: failed program was:" >&5
18603sed 's/^/| /' conftest.$ac_ext >&5
18604
b4e70030 18605gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 18606fi
bec39cab 18607rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18608fi
c906108c 18609
b4e70030
JB
18610 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
18611echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_lm_members" >&6
97bf5e38 18612 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f
SE
18613
18614cat >>confdefs.h <<\_ACEOF
97bf5e38 18615#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
bec39cab 18616_ACEOF
97bf5e38
MK
18617
18618 fi
18619
bec39cab 18620
b4e70030
JB
18621 echo "$as_me:$LINENO: checking for member som_addr in struct so_map" >&5
18622echo $ECHO_N "checking for member som_addr in struct so_map... $ECHO_C" >&6
bec39cab
AC
18623 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then
18624 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18625else
bec39cab
AC
18626 cat >conftest.$ac_ext <<_ACEOF
18627/* confdefs.h. */
18628_ACEOF
18629cat confdefs.h >>conftest.$ac_ext
18630cat >>conftest.$ac_ext <<_ACEOF
18631/* end confdefs.h. */
97bf5e38
MK
18632#include <sys/types.h>
18633#ifdef HAVE_NLIST_H
18634#include <nlist.h>
18635#endif
18636#include <link.h>
bec39cab
AC
18637int
18638main ()
18639{
97bf5e38 18640struct so_map lm; (void) lm.som_addr;
bec39cab
AC
18641 ;
18642 return 0;
18643}
18644_ACEOF
18645rm -f conftest.$ac_objext
18646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18647 (eval $ac_compile) 2>conftest.er1
18648 ac_status=$?
18649 grep -v '^ *+' conftest.er1 >conftest.err
18650 rm -f conftest.er1
18651 cat conftest.err >&5
18652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18653 (exit $ac_status); } &&
b4e70030
JB
18654 { ac_try='test -z "$ac_c_werror_flag"
18655 || test ! -s conftest.err'
bec39cab
AC
18656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18657 (eval $ac_try) 2>&5
18658 ac_status=$?
18659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18660 (exit $ac_status); }; } &&
18661 { ac_try='test -s conftest.$ac_objext'
18662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18663 (eval $ac_try) 2>&5
18664 ac_status=$?
18665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18666 (exit $ac_status); }; }; then
97bf5e38
MK
18667 gdb_cv_have_struct_so_map_with_som_members=yes
18668else
bec39cab
AC
18669 echo "$as_me: failed program was:" >&5
18670sed 's/^/| /' conftest.$ac_ext >&5
18671
b4e70030 18672gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 18673fi
bec39cab 18674rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18675fi
c906108c 18676
b4e70030
JB
18677 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
18678echo "${ECHO_T}$gdb_cv_have_struct_so_map_with_som_members" >&6
97bf5e38 18679 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f
SE
18680
18681cat >>confdefs.h <<\_ACEOF
97bf5e38 18682#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
bec39cab 18683_ACEOF
c906108c 18684
97bf5e38 18685 fi
c906108c 18686
bec39cab 18687
b4e70030
JB
18688 echo "$as_me:$LINENO: checking for struct link_map32 in sys/link.h" >&5
18689echo $ECHO_N "checking for struct link_map32 in sys/link.h... $ECHO_C" >&6
bec39cab
AC
18690 if test "${gdb_cv_have_struct_link_map32+set}" = set; then
18691 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18692else
bec39cab
AC
18693 cat >conftest.$ac_ext <<_ACEOF
18694/* confdefs.h. */
18695_ACEOF
18696cat confdefs.h >>conftest.$ac_ext
18697cat >>conftest.$ac_ext <<_ACEOF
18698/* end confdefs.h. */
97bf5e38
MK
18699#define _SYSCALL32
18700#include <sys/link.h>
bec39cab
AC
18701int
18702main ()
18703{
97bf5e38 18704struct link_map32 l;
bec39cab
AC
18705 ;
18706 return 0;
18707}
18708_ACEOF
18709rm -f conftest.$ac_objext
18710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18711 (eval $ac_compile) 2>conftest.er1
18712 ac_status=$?
18713 grep -v '^ *+' conftest.er1 >conftest.err
18714 rm -f conftest.er1
18715 cat conftest.err >&5
18716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18717 (exit $ac_status); } &&
b4e70030
JB
18718 { ac_try='test -z "$ac_c_werror_flag"
18719 || test ! -s conftest.err'
bec39cab
AC
18720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18721 (eval $ac_try) 2>&5
18722 ac_status=$?
18723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18724 (exit $ac_status); }; } &&
18725 { ac_try='test -s conftest.$ac_objext'
18726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18727 (eval $ac_try) 2>&5
18728 ac_status=$?
18729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18730 (exit $ac_status); }; }; then
97bf5e38
MK
18731 gdb_cv_have_struct_link_map32=yes
18732else
bec39cab
AC
18733 echo "$as_me: failed program was:" >&5
18734sed 's/^/| /' conftest.$ac_ext >&5
18735
b4e70030 18736gdb_cv_have_struct_link_map32=no
97bf5e38 18737fi
bec39cab 18738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18739fi
c906108c 18740
b4e70030
JB
18741 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map32" >&5
18742echo "${ECHO_T}$gdb_cv_have_struct_link_map32" >&6
97bf5e38 18743 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f
SE
18744
18745cat >>confdefs.h <<\_ACEOF
97bf5e38 18746#define HAVE_STRUCT_LINK_MAP32 1
bec39cab 18747_ACEOF
c906108c 18748
60ca704f
SE
18749
18750cat >>confdefs.h <<\_ACEOF
97bf5e38 18751#define _SYSCALL32 1
bec39cab 18752_ACEOF
c906108c 18753
97bf5e38
MK
18754 fi
18755fi
c906108c 18756
bc8bcb4b 18757# Check if the compiler supports the `long long' type.
c906108c 18758
b4e70030
JB
18759echo "$as_me:$LINENO: checking for long long support in compiler" >&5
18760echo $ECHO_N "checking for long long support in compiler... $ECHO_C" >&6
bec39cab
AC
18761if test "${gdb_cv_c_long_long+set}" = set; then
18762 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18763else
bec39cab
AC
18764 cat >conftest.$ac_ext <<_ACEOF
18765/* confdefs.h. */
18766_ACEOF
18767cat confdefs.h >>conftest.$ac_ext
18768cat >>conftest.$ac_ext <<_ACEOF
18769/* end confdefs.h. */
bc8bcb4b 18770extern long long foo;
bec39cab
AC
18771int
18772main ()
18773{
bc8bcb4b 18774switch (foo & 2) { case 0: return 1; }
bec39cab
AC
18775 ;
18776 return 0;
18777}
18778_ACEOF
18779rm -f conftest.$ac_objext
18780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18781 (eval $ac_compile) 2>conftest.er1
18782 ac_status=$?
18783 grep -v '^ *+' conftest.er1 >conftest.err
18784 rm -f conftest.er1
18785 cat conftest.err >&5
18786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18787 (exit $ac_status); } &&
b4e70030
JB
18788 { ac_try='test -z "$ac_c_werror_flag"
18789 || test ! -s conftest.err'
bec39cab
AC
18790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18791 (eval $ac_try) 2>&5
18792 ac_status=$?
18793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18794 (exit $ac_status); }; } &&
18795 { ac_try='test -s conftest.$ac_objext'
18796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18797 (eval $ac_try) 2>&5
18798 ac_status=$?
18799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18800 (exit $ac_status); }; }; then
97bf5e38
MK
18801 gdb_cv_c_long_long=yes
18802else
bec39cab
AC
18803 echo "$as_me: failed program was:" >&5
18804sed 's/^/| /' conftest.$ac_ext >&5
18805
b4e70030 18806gdb_cv_c_long_long=no
97bf5e38 18807fi
bec39cab 18808rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18809fi
b4e70030
JB
18810echo "$as_me:$LINENO: result: $gdb_cv_c_long_long" >&5
18811echo "${ECHO_T}$gdb_cv_c_long_long" >&6
97bf5e38 18812if test $gdb_cv_c_long_long = yes; then
bc8bcb4b
MK
18813
18814cat >>confdefs.h <<\_ACEOF
97bf5e38 18815#define CC_HAS_LONG_LONG 1
bec39cab 18816_ACEOF
97bf5e38
MK
18817
18818fi
18819
bc8bcb4b 18820# Check if the compiler and runtime support printing long longs.
97bf5e38 18821
b4e70030
JB
18822echo "$as_me:$LINENO: checking for long long support in printf" >&5
18823echo $ECHO_N "checking for long long support in printf... $ECHO_C" >&6
bec39cab
AC
18824if test "${gdb_cv_printf_has_long_long+set}" = set; then
18825 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18826else
18827 if test "$cross_compiling" = yes; then
18828 gdb_cv_printf_has_long_long=no
18829else
bec39cab
AC
18830 cat >conftest.$ac_ext <<_ACEOF
18831/* confdefs.h. */
18832_ACEOF
18833cat confdefs.h >>conftest.$ac_ext
18834cat >>conftest.$ac_ext <<_ACEOF
18835/* end confdefs.h. */
bc8bcb4b
MK
18836$ac_includes_default
18837int
18838main ()
18839{
18840char buf[32];
97bf5e38
MK
18841 long long l = 0;
18842 l = (l << 16) + 0x0123;
18843 l = (l << 16) + 0x4567;
18844 l = (l << 16) + 0x89ab;
18845 l = (l << 16) + 0xcdef;
18846 sprintf (buf, "0x%016llx", l);
18847 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
18848 ;
18849 return 0;
c906108c 18850}
bec39cab
AC
18851_ACEOF
18852rm -f conftest$ac_exeext
18853if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18854 (eval $ac_link) 2>&5
18855 ac_status=$?
18856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18857 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18859 (eval $ac_try) 2>&5
18860 ac_status=$?
18861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18862 (exit $ac_status); }; }; then
97bf5e38
MK
18863 gdb_cv_printf_has_long_long=yes
18864else
bec39cab
AC
18865 echo "$as_me: program exited with status $ac_status" >&5
18866echo "$as_me: failed program was:" >&5
18867sed 's/^/| /' conftest.$ac_ext >&5
18868
18869( exit $ac_status )
18870gdb_cv_printf_has_long_long=no
97bf5e38 18871fi
b4e70030 18872rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 18873fi
97bf5e38 18874fi
b4e70030
JB
18875echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_long" >&5
18876echo "${ECHO_T}$gdb_cv_printf_has_long_long" >&6
97bf5e38 18877if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b
MK
18878
18879cat >>confdefs.h <<\_ACEOF
97bf5e38 18880#define PRINTF_HAS_LONG_LONG 1
bec39cab 18881_ACEOF
97bf5e38
MK
18882
18883fi
97bf5e38 18884
1a619819
LM
18885# Check if the compiler and runtime support printing decfloats.
18886
18887echo "$as_me:$LINENO: checking for decfloat support in printf" >&5
18888echo $ECHO_N "checking for decfloat support in printf... $ECHO_C" >&6
18889if test "${gdb_cv_printf_has_decfloat+set}" = set; then
18890 echo $ECHO_N "(cached) $ECHO_C" >&6
18891else
18892 if test "$cross_compiling" = yes; then
18893 gdb_cv_printf_has_decfloat=no
18894else
18895 cat >conftest.$ac_ext <<_ACEOF
18896/* confdefs.h. */
18897_ACEOF
18898cat confdefs.h >>conftest.$ac_ext
18899cat >>conftest.$ac_ext <<_ACEOF
18900/* end confdefs.h. */
18901$ac_includes_default
18902int
18903main ()
18904{
18905char buf[64];
18906 _Decimal32 d32 = 1.2345df;
18907 _Decimal64 d64 = 1.2345dd;
18908 _Decimal128 d128 = 1.2345dl;
18909 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
18910 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
18911 ;
18912 return 0;
18913}
18914_ACEOF
18915rm -f conftest$ac_exeext
18916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18917 (eval $ac_link) 2>&5
18918 ac_status=$?
18919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18922 (eval $ac_try) 2>&5
18923 ac_status=$?
18924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18925 (exit $ac_status); }; }; then
18926 gdb_cv_printf_has_decfloat=yes
18927else
18928 echo "$as_me: program exited with status $ac_status" >&5
18929echo "$as_me: failed program was:" >&5
18930sed 's/^/| /' conftest.$ac_ext >&5
18931
18932( exit $ac_status )
18933gdb_cv_printf_has_decfloat=no
18934fi
18935rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18936fi
18937fi
18938echo "$as_me:$LINENO: result: $gdb_cv_printf_has_decfloat" >&5
18939echo "${ECHO_T}$gdb_cv_printf_has_decfloat" >&6
18940if test $gdb_cv_printf_has_decfloat = yes; then
18941
18942cat >>confdefs.h <<\_ACEOF
18943#define PRINTF_HAS_DECFLOAT 1
18944_ACEOF
18945
18946fi
18947
bc8bcb4b
MK
18948# Check if the compiler supports the `long double' type. We can't use
18949# AC_C_LONG_DOUBLE because that one does additional checks on the
18950# constants defined in <float.h> that fail on some systems,
18951# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 18952
b4e70030
JB
18953echo "$as_me:$LINENO: checking for long double support in compiler" >&5
18954echo $ECHO_N "checking for long double support in compiler... $ECHO_C" >&6
bc8bcb4b 18955if test "${gdb_cv_c_long_double+set}" = set; then
bec39cab 18956 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18957else
bec39cab
AC
18958 cat >conftest.$ac_ext <<_ACEOF
18959/* confdefs.h. */
18960_ACEOF
18961cat confdefs.h >>conftest.$ac_ext
18962cat >>conftest.$ac_ext <<_ACEOF
18963/* end confdefs.h. */
97bf5e38 18964long double foo;
bec39cab
AC
18965_ACEOF
18966rm -f conftest.$ac_objext
18967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18968 (eval $ac_compile) 2>conftest.er1
18969 ac_status=$?
18970 grep -v '^ *+' conftest.er1 >conftest.err
18971 rm -f conftest.er1
18972 cat conftest.err >&5
18973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18974 (exit $ac_status); } &&
b4e70030
JB
18975 { ac_try='test -z "$ac_c_werror_flag"
18976 || test ! -s conftest.err'
bec39cab
AC
18977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18978 (eval $ac_try) 2>&5
18979 ac_status=$?
18980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18981 (exit $ac_status); }; } &&
18982 { ac_try='test -s conftest.$ac_objext'
18983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18984 (eval $ac_try) 2>&5
18985 ac_status=$?
18986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18987 (exit $ac_status); }; }; then
bc8bcb4b 18988 gdb_cv_c_long_double=yes
97bf5e38 18989else
bec39cab
AC
18990 echo "$as_me: failed program was:" >&5
18991sed 's/^/| /' conftest.$ac_ext >&5
18992
b4e70030 18993gdb_cv_c_long_double=no
97bf5e38 18994fi
bec39cab 18995rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18996fi
b4e70030
JB
18997echo "$as_me:$LINENO: result: $gdb_cv_c_long_double" >&5
18998echo "${ECHO_T}$gdb_cv_c_long_double" >&6
bc8bcb4b 18999if test $gdb_cv_c_long_double = yes; then
c906108c 19000
bc8bcb4b 19001cat >>confdefs.h <<\_ACEOF
97bf5e38 19002#define HAVE_LONG_DOUBLE 1
bec39cab 19003_ACEOF
97bf5e38
MK
19004
19005fi
19006
bc8bcb4b 19007# Check if the compiler and runtime support printing long doubles.
97bf5e38 19008
b4e70030
JB
19009echo "$as_me:$LINENO: checking for long double support in printf" >&5
19010echo $ECHO_N "checking for long double support in printf... $ECHO_C" >&6
bec39cab
AC
19011if test "${gdb_cv_printf_has_long_double+set}" = set; then
19012 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
19013else
19014 if test "$cross_compiling" = yes; then
19015 gdb_cv_printf_has_long_double=no
19016else
bec39cab
AC
19017 cat >conftest.$ac_ext <<_ACEOF
19018/* confdefs.h. */
19019_ACEOF
19020cat confdefs.h >>conftest.$ac_ext
19021cat >>conftest.$ac_ext <<_ACEOF
19022/* end confdefs.h. */
bc8bcb4b
MK
19023$ac_includes_default
19024int
19025main ()
19026{
19027char buf[16];
97bf5e38
MK
19028 long double f = 3.141592653;
19029 sprintf (buf, "%Lg", f);
19030 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
19031 ;
19032 return 0;
97bf5e38 19033}
bec39cab
AC
19034_ACEOF
19035rm -f conftest$ac_exeext
19036if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19037 (eval $ac_link) 2>&5
19038 ac_status=$?
19039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19040 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19042 (eval $ac_try) 2>&5
19043 ac_status=$?
19044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19045 (exit $ac_status); }; }; then
97bf5e38 19046 gdb_cv_printf_has_long_double=yes
c906108c 19047else
bec39cab
AC
19048 echo "$as_me: program exited with status $ac_status" >&5
19049echo "$as_me: failed program was:" >&5
19050sed 's/^/| /' conftest.$ac_ext >&5
19051
19052( exit $ac_status )
19053gdb_cv_printf_has_long_double=no
c906108c 19054fi
b4e70030 19055rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 19056fi
c906108c 19057fi
b4e70030
JB
19058echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_double" >&5
19059echo "${ECHO_T}$gdb_cv_printf_has_long_double" >&6
97bf5e38 19060if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b
MK
19061
19062cat >>confdefs.h <<\_ACEOF
97bf5e38 19063#define PRINTF_HAS_LONG_DOUBLE 1
bec39cab 19064_ACEOF
97bf5e38
MK
19065
19066fi
97bf5e38 19067
bc8bcb4b 19068# Check if the compiler and runtime support scanning long doubles.
97bf5e38 19069
b4e70030
JB
19070echo "$as_me:$LINENO: checking for long double support in scanf" >&5
19071echo $ECHO_N "checking for long double support in scanf... $ECHO_C" >&6
bec39cab
AC
19072if test "${gdb_cv_scanf_has_long_double+set}" = set; then
19073 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
19074else
19075 if test "$cross_compiling" = yes; then
19076 gdb_cv_scanf_has_long_double=no
19077else
bec39cab
AC
19078 cat >conftest.$ac_ext <<_ACEOF
19079/* confdefs.h. */
19080_ACEOF
19081cat confdefs.h >>conftest.$ac_ext
19082cat >>conftest.$ac_ext <<_ACEOF
19083/* end confdefs.h. */
bc8bcb4b
MK
19084#include <stdio.h>
19085int
19086main ()
19087{
19088char *buf = "3.141592653";
97bf5e38
MK
19089 long double f = 0;
19090 sscanf (buf, "%Lg", &f);
19091 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
19092 ;
19093 return 0;
97bf5e38 19094}
bec39cab
AC
19095_ACEOF
19096rm -f conftest$ac_exeext
19097if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19098 (eval $ac_link) 2>&5
19099 ac_status=$?
19100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19103 (eval $ac_try) 2>&5
19104 ac_status=$?
19105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19106 (exit $ac_status); }; }; then
97bf5e38
MK
19107 gdb_cv_scanf_has_long_double=yes
19108else
bec39cab
AC
19109 echo "$as_me: program exited with status $ac_status" >&5
19110echo "$as_me: failed program was:" >&5
19111sed 's/^/| /' conftest.$ac_ext >&5
19112
19113( exit $ac_status )
19114gdb_cv_scanf_has_long_double=no
97bf5e38 19115fi
b4e70030 19116rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 19117fi
c906108c 19118fi
b4e70030
JB
19119echo "$as_me:$LINENO: result: $gdb_cv_scanf_has_long_double" >&5
19120echo "${ECHO_T}$gdb_cv_scanf_has_long_double" >&6
97bf5e38 19121if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b
MK
19122
19123cat >>confdefs.h <<\_ACEOF
97bf5e38 19124#define SCANF_HAS_LONG_DOUBLE 1
bec39cab 19125_ACEOF
97bf5e38
MK
19126
19127fi
c906108c 19128
438013df
AO
19129case ${host_os} in
19130aix*)
b4e70030
JB
19131 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
19132echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
bec39cab
AC
19133if test "${gdb_cv_bigtoc+set}" = set; then
19134 echo $ECHO_N "(cached) $ECHO_C" >&6
438013df 19135else
bec39cab 19136
438013df
AO
19137 SAVE_LDFLAGS=$LDFLAGS
19138
19139 case $GCC in
19140 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
19141 *) gdb_cv_bigtoc=-bbigtoc ;;
19142 esac
19143
19144 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
bec39cab
AC
19145 cat >conftest.$ac_ext <<_ACEOF
19146/* confdefs.h. */
19147_ACEOF
19148cat confdefs.h >>conftest.$ac_ext
19149cat >>conftest.$ac_ext <<_ACEOF
19150/* end confdefs.h. */
438013df 19151
bec39cab
AC
19152int
19153main ()
19154{
438013df 19155int i;
bec39cab
AC
19156 ;
19157 return 0;
19158}
19159_ACEOF
19160rm -f conftest.$ac_objext conftest$ac_exeext
19161if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19162 (eval $ac_link) 2>conftest.er1
19163 ac_status=$?
19164 grep -v '^ *+' conftest.er1 >conftest.err
19165 rm -f conftest.er1
19166 cat conftest.err >&5
19167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19168 (exit $ac_status); } &&
b4e70030
JB
19169 { ac_try='test -z "$ac_c_werror_flag"
19170 || test ! -s conftest.err'
bec39cab
AC
19171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19172 (eval $ac_try) 2>&5
19173 ac_status=$?
19174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19175 (exit $ac_status); }; } &&
19176 { ac_try='test -s conftest$ac_exeext'
19177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19178 (eval $ac_try) 2>&5
19179 ac_status=$?
19180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19181 (exit $ac_status); }; }; then
438013df
AO
19182 :
19183else
bec39cab
AC
19184 echo "$as_me: failed program was:" >&5
19185sed 's/^/| /' conftest.$ac_ext >&5
19186
b4e70030 19187gdb_cv_bigtoc=
438013df 19188fi
bec39cab
AC
19189rm -f conftest.err conftest.$ac_objext \
19190 conftest$ac_exeext conftest.$ac_ext
ec76baa5 19191 LDFLAGS="${SAVE_LDFLAGS}"
438013df 19192
bec39cab 19193fi
b4e70030
JB
19194echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
19195echo "${ECHO_T}$gdb_cv_bigtoc" >&6
438013df
AO
19196 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
19197 ;;
19198esac
19199
c906108c
SS
19200
19201
19202if test ${build} = ${host} -a ${host} = ${target} ; then
19203 case ${host_os} in
19204 hpux*)
b4e70030
JB
19205 echo "$as_me:$LINENO: checking for HPUX/OSF thread support" >&5
19206echo $ECHO_N "checking for HPUX/OSF thread support... $ECHO_C" >&6
c906108c
SS
19207 if test -f /usr/include/dce/cma_config.h ; then
19208 if test "$GCC" = "yes" ; then
b4e70030
JB
19209 echo "$as_me:$LINENO: result: yes" >&5
19210echo "${ECHO_T}yes" >&6
60ca704f
SE
19211
19212cat >>confdefs.h <<\_ACEOF
c906108c 19213#define HAVE_HPUX_THREAD_SUPPORT 1
bec39cab 19214_ACEOF
c906108c 19215
3483b318 19216 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
19217 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
19218 else
b4e70030
JB
19219 echo "$as_me:$LINENO: result: no (suppressed because you are not using GCC)" >&5
19220echo "${ECHO_T}no (suppressed because you are not using GCC)" >&6
c906108c
SS
19221 fi
19222 else
b4e70030
JB
19223 echo "$as_me:$LINENO: result: no" >&5
19224echo "${ECHO_T}no" >&6
c906108c
SS
19225 fi
19226 ;;
19227 solaris*)
d92419e5
JB
19228 # See if thread_db library is around for Solaris thread debugging.
19229 # Note that we must explicitly test for version 1 of the library
19230 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
19231 # the same API.
b4e70030
JB
19232 echo "$as_me:$LINENO: checking for Solaris thread debugging library" >&5
19233echo $ECHO_N "checking for Solaris thread debugging library... $ECHO_C" >&6
c906108c 19234 if test -f /usr/lib/libthread_db.so.1 ; then
b4e70030
JB
19235 echo "$as_me:$LINENO: result: yes" >&5
19236echo "${ECHO_T}yes" >&6
60ca704f
SE
19237
19238cat >>confdefs.h <<\_ACEOF
c906108c 19239#define HAVE_THREAD_DB_LIB 1
bec39cab 19240_ACEOF
c906108c 19241
3483b318 19242 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 19243 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
bec39cab 19244
b4e70030
JB
19245echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19246echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
bec39cab
AC
19247if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19248 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19249else
bec39cab 19250 ac_check_lib_save_LIBS=$LIBS
c906108c 19251LIBS="-ldl $LIBS"
bec39cab
AC
19252cat >conftest.$ac_ext <<_ACEOF
19253/* confdefs.h. */
19254_ACEOF
19255cat confdefs.h >>conftest.$ac_ext
19256cat >>conftest.$ac_ext <<_ACEOF
19257/* end confdefs.h. */
19258
b4e70030 19259/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
19260#ifdef __cplusplus
19261extern "C"
19262#endif
b4e70030
JB
19263/* We use char because int might match the return type of a gcc2
19264 builtin and then its argument prototype would still apply. */
bec39cab
AC
19265char dlopen ();
19266int
19267main ()
19268{
b4e70030 19269dlopen ();
bec39cab
AC
19270 ;
19271 return 0;
19272}
19273_ACEOF
19274rm -f conftest.$ac_objext conftest$ac_exeext
19275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19276 (eval $ac_link) 2>conftest.er1
19277 ac_status=$?
19278 grep -v '^ *+' conftest.er1 >conftest.err
19279 rm -f conftest.er1
19280 cat conftest.err >&5
19281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19282 (exit $ac_status); } &&
b4e70030
JB
19283 { ac_try='test -z "$ac_c_werror_flag"
19284 || test ! -s conftest.err'
bec39cab
AC
19285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19286 (eval $ac_try) 2>&5
19287 ac_status=$?
19288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19289 (exit $ac_status); }; } &&
19290 { ac_try='test -s conftest$ac_exeext'
19291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19292 (eval $ac_try) 2>&5
19293 ac_status=$?
19294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19295 (exit $ac_status); }; }; then
19296 ac_cv_lib_dl_dlopen=yes
19297else
19298 echo "$as_me: failed program was:" >&5
19299sed 's/^/| /' conftest.$ac_ext >&5
19300
b4e70030 19301ac_cv_lib_dl_dlopen=no
bec39cab
AC
19302fi
19303rm -f conftest.err conftest.$ac_objext \
19304 conftest$ac_exeext conftest.$ac_ext
19305LIBS=$ac_check_lib_save_LIBS
19306fi
b4e70030
JB
19307echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19308echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
bec39cab
AC
19309if test $ac_cv_lib_dl_dlopen = yes; then
19310 cat >>confdefs.h <<_ACEOF
19311#define HAVE_LIBDL 1
19312_ACEOF
c906108c
SS
19313
19314 LIBS="-ldl $LIBS"
19315
c906108c
SS
19316fi
19317
19318 if test "$GCC" = "yes" ; then
19319 # The GNU linker requires the -export-dynamic option to make
19320 # all symbols visible in the dynamic symbol table.
19321 hold_ldflags=$LDFLAGS
b4e70030
JB
19322 echo "$as_me:$LINENO: checking for the ld -export-dynamic flag" >&5
19323echo $ECHO_N "checking for the ld -export-dynamic flag... $ECHO_C" >&6
c906108c 19324 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
bec39cab
AC
19325 cat >conftest.$ac_ext <<_ACEOF
19326/* confdefs.h. */
19327_ACEOF
19328cat confdefs.h >>conftest.$ac_ext
19329cat >>conftest.$ac_ext <<_ACEOF
19330/* end confdefs.h. */
c906108c 19331
bec39cab
AC
19332int
19333main ()
19334{
c906108c 19335int i;
bec39cab
AC
19336 ;
19337 return 0;
19338}
19339_ACEOF
19340rm -f conftest.$ac_objext conftest$ac_exeext
19341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19342 (eval $ac_link) 2>conftest.er1
19343 ac_status=$?
19344 grep -v '^ *+' conftest.er1 >conftest.err
19345 rm -f conftest.er1
19346 cat conftest.err >&5
19347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19348 (exit $ac_status); } &&
b4e70030
JB
19349 { ac_try='test -z "$ac_c_werror_flag"
19350 || test ! -s conftest.err'
bec39cab
AC
19351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19352 (eval $ac_try) 2>&5
19353 ac_status=$?
19354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19355 (exit $ac_status); }; } &&
19356 { ac_try='test -s conftest$ac_exeext'
19357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19358 (eval $ac_try) 2>&5
19359 ac_status=$?
19360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19361 (exit $ac_status); }; }; then
c906108c
SS
19362 found=yes
19363else
bec39cab
AC
19364 echo "$as_me: failed program was:" >&5
19365sed 's/^/| /' conftest.$ac_ext >&5
19366
b4e70030 19367found=no
c906108c 19368fi
bec39cab
AC
19369rm -f conftest.err conftest.$ac_objext \
19370 conftest$ac_exeext conftest.$ac_ext
c906108c 19371 LDFLAGS=$hold_ldflags
b4e70030
JB
19372 echo "$as_me:$LINENO: result: $found" >&5
19373echo "${ECHO_T}$found" >&6
c906108c
SS
19374 if test $found = yes; then
19375 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
19376 fi
19377 fi
19378 # Sun randomly tweaked the prototypes in <proc_service.h>
19379 # at one point.
b4e70030
JB
19380 echo "$as_me:$LINENO: checking if <proc_service.h> is old" >&5
19381echo $ECHO_N "checking if <proc_service.h> is old... $ECHO_C" >&6
bec39cab
AC
19382 if test "${gdb_cv_proc_service_is_old+set}" = set; then
19383 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19384else
bec39cab
AC
19385
19386 cat >conftest.$ac_ext <<_ACEOF
19387/* confdefs.h. */
19388_ACEOF
19389cat confdefs.h >>conftest.$ac_ext
19390cat >>conftest.$ac_ext <<_ACEOF
19391/* end confdefs.h. */
c906108c
SS
19392
19393 #include <proc_service.h>
19394 ps_err_e ps_pdwrite
19395 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 19396
bec39cab
AC
19397int
19398main ()
19399{
19400
19401 ;
19402 return 0;
19403}
19404_ACEOF
19405rm -f conftest.$ac_objext
19406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19407 (eval $ac_compile) 2>conftest.er1
19408 ac_status=$?
19409 grep -v '^ *+' conftest.er1 >conftest.err
19410 rm -f conftest.er1
19411 cat conftest.err >&5
19412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19413 (exit $ac_status); } &&
b4e70030
JB
19414 { ac_try='test -z "$ac_c_werror_flag"
19415 || test ! -s conftest.err'
bec39cab
AC
19416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19417 (eval $ac_try) 2>&5
19418 ac_status=$?
19419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19420 (exit $ac_status); }; } &&
19421 { ac_try='test -s conftest.$ac_objext'
19422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19423 (eval $ac_try) 2>&5
19424 ac_status=$?
19425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19426 (exit $ac_status); }; }; then
c906108c
SS
19427 gdb_cv_proc_service_is_old=no
19428else
bec39cab
AC
19429 echo "$as_me: failed program was:" >&5
19430sed 's/^/| /' conftest.$ac_ext >&5
19431
b4e70030 19432gdb_cv_proc_service_is_old=yes
c906108c 19433fi
bec39cab
AC
19434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19435
c906108c
SS
19436fi
19437
b4e70030
JB
19438 echo "$as_me:$LINENO: result: $gdb_cv_proc_service_is_old" >&5
19439echo "${ECHO_T}$gdb_cv_proc_service_is_old" >&6
c906108c 19440 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f
SE
19441
19442cat >>confdefs.h <<\_ACEOF
c906108c 19443#define PROC_SERVICE_IS_OLD 1
bec39cab 19444_ACEOF
c906108c
SS
19445
19446 fi
19447 else
b4e70030
JB
19448 echo "$as_me:$LINENO: result: no" >&5
19449echo "${ECHO_T}no" >&6
c906108c
SS
19450 fi
19451 ;;
d92419e5 19452 aix*)
b4e70030
JB
19453 echo "$as_me:$LINENO: checking for AiX thread debugging library" >&5
19454echo $ECHO_N "checking for AiX thread debugging library... $ECHO_C" >&6
bec39cab
AC
19455 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then
19456 echo $ECHO_N "(cached) $ECHO_C" >&6
19457else
19458 cat >conftest.$ac_ext <<_ACEOF
19459/* confdefs.h. */
19460_ACEOF
19461cat confdefs.h >>conftest.$ac_ext
19462cat >>conftest.$ac_ext <<_ACEOF
19463/* end confdefs.h. */
d92419e5 19464#include <sys/pthdebug.h>
bec39cab
AC
19465int
19466main ()
19467{
d92419e5
JB
19468#ifndef PTHDB_VERSION_3
19469 #error
19470 #endif
bec39cab
AC
19471 ;
19472 return 0;
19473}
19474_ACEOF
19475rm -f conftest.$ac_objext
19476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19477 (eval $ac_compile) 2>conftest.er1
19478 ac_status=$?
19479 grep -v '^ *+' conftest.er1 >conftest.err
19480 rm -f conftest.er1
19481 cat conftest.err >&5
19482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19483 (exit $ac_status); } &&
b4e70030
JB
19484 { ac_try='test -z "$ac_c_werror_flag"
19485 || test ! -s conftest.err'
bec39cab
AC
19486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19487 (eval $ac_try) 2>&5
19488 ac_status=$?
19489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19490 (exit $ac_status); }; } &&
19491 { ac_try='test -s conftest.$ac_objext'
19492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19493 (eval $ac_try) 2>&5
19494 ac_status=$?
19495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19496 (exit $ac_status); }; }; then
d92419e5
JB
19497 gdb_cv_have_aix_thread_debug=yes
19498else
bec39cab
AC
19499 echo "$as_me: failed program was:" >&5
19500sed 's/^/| /' conftest.$ac_ext >&5
19501
b4e70030 19502gdb_cv_have_aix_thread_debug=no
d92419e5 19503fi
bec39cab 19504rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
19505fi
19506
b4e70030
JB
19507 echo "$as_me:$LINENO: result: $gdb_cv_have_aix_thread_debug" >&5
19508echo "${ECHO_T}$gdb_cv_have_aix_thread_debug" >&6
d92419e5
JB
19509 if test $gdb_cv_have_aix_thread_debug = yes; then
19510 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 19511 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
19512 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
19513 fi
19514 ;;
c906108c 19515 esac
bec39cab 19516
c906108c
SS
19517fi
19518
3f47be5c 19519if test "x$ac_cv_header_thread_db_h" = "xyes"; then
b4e70030
JB
19520 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTALLOC" >&5
19521echo $ECHO_N "checking whether <thread_db.h> has TD_NOTALLOC... $ECHO_C" >&6
bec39cab
AC
19522if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then
19523 echo $ECHO_N "(cached) $ECHO_C" >&6
19524else
19525 cat >conftest.$ac_ext <<_ACEOF
19526/* confdefs.h. */
19527_ACEOF
19528cat confdefs.h >>conftest.$ac_ext
19529cat >>conftest.$ac_ext <<_ACEOF
19530/* end confdefs.h. */
3f47be5c 19531#include <thread_db.h>
bec39cab
AC
19532int
19533main ()
19534{
3f47be5c 19535int i = TD_NOTALLOC;
bec39cab
AC
19536 ;
19537 return 0;
19538}
19539_ACEOF
19540rm -f conftest.$ac_objext
19541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19542 (eval $ac_compile) 2>conftest.er1
19543 ac_status=$?
19544 grep -v '^ *+' conftest.er1 >conftest.err
19545 rm -f conftest.er1
19546 cat conftest.err >&5
19547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19548 (exit $ac_status); } &&
b4e70030
JB
19549 { ac_try='test -z "$ac_c_werror_flag"
19550 || test ! -s conftest.err'
bec39cab
AC
19551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19552 (eval $ac_try) 2>&5
19553 ac_status=$?
19554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19555 (exit $ac_status); }; } &&
19556 { ac_try='test -s conftest.$ac_objext'
19557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19558 (eval $ac_try) 2>&5
19559 ac_status=$?
19560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19561 (exit $ac_status); }; }; then
3f47be5c
EZ
19562 gdb_cv_thread_db_h_has_td_notalloc=yes
19563else
bec39cab
AC
19564 echo "$as_me: failed program was:" >&5
19565sed 's/^/| /' conftest.$ac_ext >&5
19566
b4e70030 19567gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 19568
3f47be5c 19569fi
bec39cab 19570rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 19571
bec39cab 19572fi
b4e70030
JB
19573echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
19574echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notalloc" >&6
59f80f10
DJ
19575 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_VERSION" >&5
19576echo $ECHO_N "checking whether <thread_db.h> has TD_VERSION... $ECHO_C" >&6
19577if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then
19578 echo $ECHO_N "(cached) $ECHO_C" >&6
19579else
19580 cat >conftest.$ac_ext <<_ACEOF
19581/* confdefs.h. */
19582_ACEOF
19583cat confdefs.h >>conftest.$ac_ext
19584cat >>conftest.$ac_ext <<_ACEOF
19585/* end confdefs.h. */
19586#include <thread_db.h>
19587int
19588main ()
19589{
19590int i = TD_VERSION;
19591 ;
19592 return 0;
19593}
19594_ACEOF
19595rm -f conftest.$ac_objext
19596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19597 (eval $ac_compile) 2>conftest.er1
19598 ac_status=$?
19599 grep -v '^ *+' conftest.er1 >conftest.err
19600 rm -f conftest.er1
19601 cat conftest.err >&5
19602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19603 (exit $ac_status); } &&
19604 { ac_try='test -z "$ac_c_werror_flag"
19605 || test ! -s conftest.err'
19606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19607 (eval $ac_try) 2>&5
19608 ac_status=$?
19609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19610 (exit $ac_status); }; } &&
19611 { ac_try='test -s conftest.$ac_objext'
19612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19613 (eval $ac_try) 2>&5
19614 ac_status=$?
19615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19616 (exit $ac_status); }; }; then
19617 gdb_cv_thread_db_h_has_td_version=yes
19618else
19619 echo "$as_me: failed program was:" >&5
19620sed 's/^/| /' conftest.$ac_ext >&5
19621
19622gdb_cv_thread_db_h_has_td_version=no
19623
19624fi
19625rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19626
19627fi
19628echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_version" >&5
19629echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_version" >&6
19630 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTLS" >&5
19631echo $ECHO_N "checking whether <thread_db.h> has TD_NOTLS... $ECHO_C" >&6
19632if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then
19633 echo $ECHO_N "(cached) $ECHO_C" >&6
19634else
19635 cat >conftest.$ac_ext <<_ACEOF
19636/* confdefs.h. */
19637_ACEOF
19638cat confdefs.h >>conftest.$ac_ext
19639cat >>conftest.$ac_ext <<_ACEOF
19640/* end confdefs.h. */
19641#include <thread_db.h>
19642int
19643main ()
19644{
19645int i = TD_NOTLS;
19646 ;
19647 return 0;
19648}
19649_ACEOF
19650rm -f conftest.$ac_objext
19651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19652 (eval $ac_compile) 2>conftest.er1
19653 ac_status=$?
19654 grep -v '^ *+' conftest.er1 >conftest.err
19655 rm -f conftest.er1
19656 cat conftest.err >&5
19657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19658 (exit $ac_status); } &&
19659 { ac_try='test -z "$ac_c_werror_flag"
19660 || test ! -s conftest.err'
19661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19662 (eval $ac_try) 2>&5
19663 ac_status=$?
19664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19665 (exit $ac_status); }; } &&
19666 { ac_try='test -s conftest.$ac_objext'
19667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19668 (eval $ac_try) 2>&5
19669 ac_status=$?
19670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19671 (exit $ac_status); }; }; then
19672 gdb_cv_thread_db_h_has_td_notls=yes
19673else
19674 echo "$as_me: failed program was:" >&5
19675sed 's/^/| /' conftest.$ac_ext >&5
19676
19677gdb_cv_thread_db_h_has_td_notls=no
19678
19679fi
19680rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19681
19682fi
19683echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notls" >&5
19684echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notls" >&6
3f47be5c
EZ
19685fi
19686if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab
AC
19687
19688cat >>confdefs.h <<\_ACEOF
3f47be5c 19689#define THREAD_DB_HAS_TD_NOTALLOC 1
bec39cab 19690_ACEOF
3f47be5c 19691
59f80f10
DJ
19692fi
19693if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
19694
19695cat >>confdefs.h <<\_ACEOF
19696#define THREAD_DB_HAS_TD_VERSION 1
19697_ACEOF
19698
19699fi
19700if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
19701
19702cat >>confdefs.h <<\_ACEOF
19703#define THREAD_DB_HAS_TD_NOTLS 1
19704_ACEOF
19705
3f47be5c
EZ
19706fi
19707
b757528f 19708if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
b4e70030
JB
19709 echo "$as_me:$LINENO: checking whether <sys/syscall.h> has __NR_tkill" >&5
19710echo $ECHO_N "checking whether <sys/syscall.h> has __NR_tkill... $ECHO_C" >&6
bec39cab
AC
19711if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then
19712 echo $ECHO_N "(cached) $ECHO_C" >&6
19713else
19714 cat >conftest.$ac_ext <<_ACEOF
19715/* confdefs.h. */
19716_ACEOF
19717cat confdefs.h >>conftest.$ac_ext
19718cat >>conftest.$ac_ext <<_ACEOF
19719/* end confdefs.h. */
b757528f 19720#include <sys/syscall.h>
bec39cab
AC
19721int
19722main ()
19723{
b757528f 19724int i = __NR_tkill;
bec39cab
AC
19725 ;
19726 return 0;
19727}
19728_ACEOF
19729rm -f conftest.$ac_objext
19730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19731 (eval $ac_compile) 2>conftest.er1
19732 ac_status=$?
19733 grep -v '^ *+' conftest.er1 >conftest.err
19734 rm -f conftest.er1
19735 cat conftest.err >&5
19736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19737 (exit $ac_status); } &&
b4e70030
JB
19738 { ac_try='test -z "$ac_c_werror_flag"
19739 || test ! -s conftest.err'
bec39cab
AC
19740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19741 (eval $ac_try) 2>&5
19742 ac_status=$?
19743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19744 (exit $ac_status); }; } &&
19745 { ac_try='test -s conftest.$ac_objext'
19746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19747 (eval $ac_try) 2>&5
19748 ac_status=$?
19749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19750 (exit $ac_status); }; }; then
b757528f
JJ
19751 gdb_cv_sys_syscall_h_has_tkill=yes
19752else
bec39cab
AC
19753 echo "$as_me: failed program was:" >&5
19754sed 's/^/| /' conftest.$ac_ext >&5
19755
b4e70030 19756gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 19757
b757528f 19758fi
bec39cab 19759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 19760
bec39cab 19761fi
b4e70030
JB
19762echo "$as_me:$LINENO: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
19763echo "${ECHO_T}$gdb_cv_sys_syscall_h_has_tkill" >&6
b757528f
JJ
19764fi
19765if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab
AC
19766
19767cat >>confdefs.h <<\_ACEOF
b757528f 19768#define HAVE_TKILL_SYSCALL 1
bec39cab 19769_ACEOF
b757528f
JJ
19770
19771fi
19772
10568435
JK
19773echo "$as_me:$LINENO: checking whether ADDR_NO_RANDOMIZE is declared" >&5
19774echo $ECHO_N "checking whether ADDR_NO_RANDOMIZE is declared... $ECHO_C" >&6
19775if test "${ac_cv_have_decl_ADDR_NO_RANDOMIZE+set}" = set; then
19776 echo $ECHO_N "(cached) $ECHO_C" >&6
19777else
19778 cat >conftest.$ac_ext <<_ACEOF
19779/* confdefs.h. */
19780_ACEOF
19781cat confdefs.h >>conftest.$ac_ext
19782cat >>conftest.$ac_ext <<_ACEOF
19783/* end confdefs.h. */
19784#include <sys/personality.h>
19785
19786int
19787main ()
19788{
19789#ifndef ADDR_NO_RANDOMIZE
19790 char *p = (char *) ADDR_NO_RANDOMIZE;
19791#endif
19792
19793 ;
19794 return 0;
19795}
19796_ACEOF
19797rm -f conftest.$ac_objext
19798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19799 (eval $ac_compile) 2>conftest.er1
19800 ac_status=$?
19801 grep -v '^ *+' conftest.er1 >conftest.err
19802 rm -f conftest.er1
19803 cat conftest.err >&5
19804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19805 (exit $ac_status); } &&
19806 { ac_try='test -z "$ac_c_werror_flag"
19807 || test ! -s conftest.err'
19808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19809 (eval $ac_try) 2>&5
19810 ac_status=$?
19811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19812 (exit $ac_status); }; } &&
19813 { ac_try='test -s conftest.$ac_objext'
19814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19815 (eval $ac_try) 2>&5
19816 ac_status=$?
19817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19818 (exit $ac_status); }; }; then
19819 ac_cv_have_decl_ADDR_NO_RANDOMIZE=yes
19820else
19821 echo "$as_me: failed program was:" >&5
19822sed 's/^/| /' conftest.$ac_ext >&5
19823
19824ac_cv_have_decl_ADDR_NO_RANDOMIZE=no
19825fi
19826rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19827fi
19828echo "$as_me:$LINENO: result: $ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&5
19829echo "${ECHO_T}$ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&6
19830if test $ac_cv_have_decl_ADDR_NO_RANDOMIZE = yes; then
19831
19832cat >>confdefs.h <<_ACEOF
19833#define HAVE_DECL_ADDR_NO_RANDOMIZE 1
19834_ACEOF
19835
19836
19837else
19838 cat >>confdefs.h <<_ACEOF
19839#define HAVE_DECL_ADDR_NO_RANDOMIZE 0
19840_ACEOF
19841
19842
19843fi
19844
19845
19846
19847if test "$cross_compiling" = yes; then
19848 cat >conftest.$ac_ext <<_ACEOF
19849/* confdefs.h. */
19850_ACEOF
19851cat confdefs.h >>conftest.$ac_ext
19852cat >>conftest.$ac_ext <<_ACEOF
19853/* end confdefs.h. */
19854#include <sys/personality.h>
19855int
19856main ()
19857{
19858
19859# if !HAVE_DECL_ADDR_NO_RANDOMIZE
19860# define ADDR_NO_RANDOMIZE 0x0040000
19861# endif
19862 /* Test the flag could be set and stays set. */
19863 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19864 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19865 return 1
19866 ;
19867 return 0;
19868}
19869_ACEOF
19870rm -f conftest.$ac_objext conftest$ac_exeext
19871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19872 (eval $ac_link) 2>conftest.er1
19873 ac_status=$?
19874 grep -v '^ *+' conftest.er1 >conftest.err
19875 rm -f conftest.er1
19876 cat conftest.err >&5
19877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19878 (exit $ac_status); } &&
19879 { ac_try='test -z "$ac_c_werror_flag"
19880 || test ! -s conftest.err'
19881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19882 (eval $ac_try) 2>&5
19883 ac_status=$?
19884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19885 (exit $ac_status); }; } &&
19886 { ac_try='test -s conftest$ac_exeext'
19887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19888 (eval $ac_try) 2>&5
19889 ac_status=$?
19890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19891 (exit $ac_status); }; }; then
19892 have_personality=true
19893else
19894 echo "$as_me: failed program was:" >&5
19895sed 's/^/| /' conftest.$ac_ext >&5
19896
19897have_personality=false
19898fi
19899rm -f conftest.err conftest.$ac_objext \
19900 conftest$ac_exeext conftest.$ac_ext
19901else
19902 cat >conftest.$ac_ext <<_ACEOF
19903/* confdefs.h. */
19904_ACEOF
19905cat confdefs.h >>conftest.$ac_ext
19906cat >>conftest.$ac_ext <<_ACEOF
19907/* end confdefs.h. */
19908#include <sys/personality.h>
19909int
19910main ()
19911{
19912
19913# if !HAVE_DECL_ADDR_NO_RANDOMIZE
19914# define ADDR_NO_RANDOMIZE 0x0040000
19915# endif
19916 /* Test the flag could be set and stays set. */
19917 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19918 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19919 return 1
19920 ;
19921 return 0;
19922}
19923_ACEOF
19924rm -f conftest$ac_exeext
19925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19926 (eval $ac_link) 2>&5
19927 ac_status=$?
19928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19929 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19931 (eval $ac_try) 2>&5
19932 ac_status=$?
19933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19934 (exit $ac_status); }; }; then
19935 have_personality=true
19936else
19937 echo "$as_me: program exited with status $ac_status" >&5
19938echo "$as_me: failed program was:" >&5
19939sed 's/^/| /' conftest.$ac_ext >&5
19940
19941( exit $ac_status )
19942have_personality=false
19943fi
19944rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19945fi
19946if $have_personality
19947then
19948
19949cat >>confdefs.h <<\_ACEOF
19950#define HAVE_PERSONALITY 1
19951_ACEOF
19952
19953fi
19954
fb40c209 19955
b14b1491 19956target_sysroot_reloc=0
bec39cab 19957
b4e70030 19958# Check whether --with-sysroot or --without-sysroot was given.
030292b7 19959if test "${with_sysroot+set}" = set; then
b4e70030
JB
19960 withval="$with_sysroot"
19961
030292b7 19962 case ${with_sysroot} in
715d1656 19963 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
19964 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
19965 esac
19966
19967 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
19968
07abfebf
RS
19969 if test "x$prefix" = xNONE; then
19970 test_prefix=/usr/local
19971 else
19972 test_prefix=$prefix
19973 fi
aa28a74e 19974 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 19975 test_exec_prefix=$test_prefix
030292b7 19976 else
07abfebf 19977 test_exec_prefix=$exec_prefix
030292b7
DJ
19978 fi
19979 case ${TARGET_SYSTEM_ROOT} in
715d1656 19980 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
19981 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
19982 '${prefix}'|'${prefix}/'*|\
715d1656 19983 '${exec_prefix}'|'${exec_prefix}/'*)
b14b1491 19984 target_sysroot_reloc=1
030292b7
DJ
19985 ;;
19986 esac
19987
19988else
bec39cab 19989
030292b7
DJ
19990 TARGET_SYSTEM_ROOT=
19991 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
19992
b4e70030 19993fi;
b14b1491
TT
19994TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc"
19995
030292b7
DJ
19996
19997
19998
16e7150e
JG
19999
20000# Check whether --with-system-gdbinit or --without-system-gdbinit was given.
20001if test "${with_system_gdbinit+set}" = set; then
20002 withval="$with_system_gdbinit"
16e7150e 20003
b14b1491
TT
20004 SYSTEM_GDBINIT=$withval
20005else
20006 SYSTEM_GDBINIT=
20007fi;
16e7150e
JG
20008
20009 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
20010 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 20011 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
20012 ac_define_dir=`eval echo $ac_define_dir`
20013
20014cat >>confdefs.h <<_ACEOF
20015#define SYSTEM_GDBINIT "$ac_define_dir"
20016_ACEOF
20017
20018
20019
b14b1491
TT
20020 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
20021 if test "x$prefix" = xNONE; then
20022 test_prefix=/usr/local
20023 else
20024 test_prefix=$prefix
20025 fi
20026 else
20027 test_prefix=$exec_prefix
20028 fi
20029 value=0
20030 case ${ac_define_dir} in
20031 "${test_prefix}"|"${test_prefix}/"*|\
20032 '${exec_prefix}'|'${exec_prefix}/'*)
20033 value=1
20034 ;;
20035 esac
16e7150e 20036
b14b1491
TT
20037cat >>confdefs.h <<_ACEOF
20038#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
20039_ACEOF
20040
b14b1491 20041
16e7150e 20042
b4e70030 20043# Check whether --enable-werror or --disable-werror was given.
094a342e 20044if test "${enable_werror+set}" = set; then
b4e70030
JB
20045 enableval="$enable_werror"
20046 case "${enableval}" in
094a342e
MK
20047 yes | y) ERROR_ON_WARNING="yes" ;;
20048 no | n) ERROR_ON_WARNING="no" ;;
20049 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
20050echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
20051 { (exit 1); exit 1; }; } ;;
20052 esac
b4e70030 20053fi;
094a342e
MK
20054
20055# Enable -Werror by default when using gcc
20056if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
20057 ERROR_ON_WARNING=yes
20058fi
20059
20060WERROR_CFLAGS=""
20061if test "${ERROR_ON_WARNING}" = yes ; then
20062 WERROR_CFLAGS="-Werror"
20063fi
20064
aa79a185
DJ
20065# The entries after -Wno-pointer-sign are disabled warnings which may
20066# be enabled in the future, which can not currently be used to build
20067# GDB.
20068# NOTE: If you change this list, remember to update
3b851bce 20069# gdb/doc/gdbint.texinfo.
aa79a185
DJ
20070build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
20071-Wformat-nonliteral -Wno-pointer-sign \
58b38ee2 20072-Wno-unused -Wno-switch -Wno-char-subscripts"
a3b362c4 20073
3526781e
DJ
20074# Enable -Wno-format by default when using gcc on mingw since many
20075# GCC versions complain about %I64.
20076case "${host}" in
20077 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
20078esac
20079
b4e70030 20080# Check whether --enable-build-warnings or --disable-build-warnings was given.
c906108c 20081if test "${enable_build_warnings+set}" = set; then
b4e70030
JB
20082 enableval="$enable_build_warnings"
20083 case "${enableval}" in
c906108c
SS
20084 yes) ;;
20085 no) build_warnings="-w";;
20086 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20087 build_warnings="${build_warnings} ${t}";;
20088 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20089 build_warnings="${t} ${build_warnings}";;
20090 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
20091esac
d4f3574e 20092if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 20093 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 20094fi
b4e70030 20095fi; # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
3b851bce 20096if test "${enable_gdb_build_warnings+set}" = set; then
b4e70030
JB
20097 enableval="$enable_gdb_build_warnings"
20098 case "${enableval}" in
3b851bce
AC
20099 yes) ;;
20100 no) build_warnings="-w";;
20101 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20102 build_warnings="${build_warnings} ${t}";;
20103 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20104 build_warnings="${t} ${build_warnings}";;
20105 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
20106esac
20107if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
20108 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
20109fi
b4e70030 20110fi; WARN_CFLAGS=""
c906108c
SS
20111if test "x${build_warnings}" != x -a "x$GCC" = xyes
20112then
b4e70030
JB
20113 echo "$as_me:$LINENO: checking compiler warning flags" >&5
20114echo $ECHO_N "checking compiler warning flags... $ECHO_C" >&6
746a987d
AC
20115 # Separate out the -Werror flag as some files just cannot be
20116 # compiled with it enabled.
20117 for w in ${build_warnings}; do
20118 case $w in
20119 -Werr*) WERROR_CFLAGS=-Werror ;;
20120 *) # Check that GCC accepts it
4536bbc6
AC
20121 saved_CFLAGS="$CFLAGS"
20122 CFLAGS="$CFLAGS $w"
bec39cab
AC
20123 cat >conftest.$ac_ext <<_ACEOF
20124/* confdefs.h. */
20125_ACEOF
20126cat confdefs.h >>conftest.$ac_ext
20127cat >>conftest.$ac_ext <<_ACEOF
20128/* end confdefs.h. */
4536bbc6 20129
bec39cab
AC
20130int
20131main ()
20132{
4536bbc6 20133
bec39cab
AC
20134 ;
20135 return 0;
20136}
20137_ACEOF
20138rm -f conftest.$ac_objext
20139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20140 (eval $ac_compile) 2>conftest.er1
20141 ac_status=$?
20142 grep -v '^ *+' conftest.er1 >conftest.err
20143 rm -f conftest.er1
20144 cat conftest.err >&5
20145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20146 (exit $ac_status); } &&
b4e70030
JB
20147 { ac_try='test -z "$ac_c_werror_flag"
20148 || test ! -s conftest.err'
bec39cab
AC
20149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20150 (eval $ac_try) 2>&5
20151 ac_status=$?
20152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20153 (exit $ac_status); }; } &&
20154 { ac_try='test -s conftest.$ac_objext'
20155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20156 (eval $ac_try) 2>&5
20157 ac_status=$?
20158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20159 (exit $ac_status); }; }; then
4536bbc6
AC
20160 WARN_CFLAGS="${WARN_CFLAGS} $w"
20161else
bec39cab
AC
20162 echo "$as_me: failed program was:" >&5
20163sed 's/^/| /' conftest.$ac_ext >&5
20164
4536bbc6 20165fi
bec39cab 20166rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 20167 CFLAGS="$saved_CFLAGS"
746a987d
AC
20168 esac
20169 done
aa79a185
DJ
20170 echo "$as_me:$LINENO: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
20171echo "${ECHO_T}${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6
c906108c
SS
20172fi
20173
20174
104c1213 20175
7a292a7a 20176# In the Cygwin environment, we need some additional flags.
b4e70030
JB
20177echo "$as_me:$LINENO: checking for cygwin" >&5
20178echo $ECHO_N "checking for cygwin... $ECHO_C" >&6
bec39cab
AC
20179if test "${gdb_cv_os_cygwin+set}" = set; then
20180 echo $ECHO_N "(cached) $ECHO_C" >&6
20181else
20182 cat >conftest.$ac_ext <<_ACEOF
20183/* confdefs.h. */
20184_ACEOF
20185cat confdefs.h >>conftest.$ac_ext
20186cat >>conftest.$ac_ext <<_ACEOF
20187/* end confdefs.h. */
7a292a7a
SS
20188
20189#if defined (__CYGWIN__) || defined (__CYGWIN32__)
20190lose
20191#endif
bec39cab 20192_ACEOF
7a292a7a 20193if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 20194 $EGREP "lose" >/dev/null 2>&1; then
7a292a7a
SS
20195 gdb_cv_os_cygwin=yes
20196else
7a292a7a
SS
20197 gdb_cv_os_cygwin=no
20198fi
20199rm -f conftest*
20200
20201fi
b4e70030
JB
20202echo "$as_me:$LINENO: result: $gdb_cv_os_cygwin" >&5
20203echo "${ECHO_T}$gdb_cv_os_cygwin" >&6
7a292a7a 20204
aff38e61 20205
3eb25fda 20206SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 20207case ${host} in
95cbc983
AC
20208 *go32* ) SER_HARDWIRE=ser-go32.o ;;
20209 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 20210 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
20211esac
20212
20213
cd0fc7c3
SS
20214# libreadline needs libuser32.a in a cygwin environment
20215WIN32LIBS=
20216if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
20217 WIN32LIBS="-luser32"
20218 case "${target}" in
20219 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
20220 ;;
20221 esac
cd0fc7c3 20222fi
c906108c 20223
b4505029
MM
20224# The ser-tcp.c module requires sockets.
20225case ${host} in
20226 *mingw32*)
20227
20228cat >>confdefs.h <<\_ACEOF
20229#define USE_WIN32API 1
20230_ACEOF
20231
20232 WIN32LIBS="$WIN32LIBS -lws2_32"
20233 ;;
20234esac
20235
7a292a7a 20236
31d99776
DJ
20237# Add ELF support to GDB, but only if BFD includes ELF support.
20238OLD_CFLAGS=$CFLAGS
20239OLD_LDFLAGS=$LDFLAGS
20240OLD_LIBS=$LIBS
cab58a69 20241CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 20242LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 20243intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
0f72fb1c 20244LIBS="-lbfd -liberty $intl $LIBS"
31d99776
DJ
20245echo "$as_me:$LINENO: checking for ELF support in BFD" >&5
20246echo $ECHO_N "checking for ELF support in BFD... $ECHO_C" >&6
20247if test "${gdb_cv_var_elf+set}" = set; then
20248 echo $ECHO_N "(cached) $ECHO_C" >&6
20249else
20250 cat >conftest.$ac_ext <<_ACEOF
20251/* confdefs.h. */
20252_ACEOF
20253cat confdefs.h >>conftest.$ac_ext
20254cat >>conftest.$ac_ext <<_ACEOF
20255/* end confdefs.h. */
20256#include <stdlib.h>
20257#include "bfd.h"
20258#include "elf-bfd.h"
20259
20260int
20261main ()
20262{
20263bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
20264 ;
20265 return 0;
20266}
20267_ACEOF
20268rm -f conftest.$ac_objext conftest$ac_exeext
20269if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20270 (eval $ac_link) 2>conftest.er1
20271 ac_status=$?
20272 grep -v '^ *+' conftest.er1 >conftest.err
20273 rm -f conftest.er1
20274 cat conftest.err >&5
20275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20276 (exit $ac_status); } &&
20277 { ac_try='test -z "$ac_c_werror_flag"
20278 || test ! -s conftest.err'
20279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20280 (eval $ac_try) 2>&5
20281 ac_status=$?
20282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20283 (exit $ac_status); }; } &&
20284 { ac_try='test -s conftest$ac_exeext'
20285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20286 (eval $ac_try) 2>&5
20287 ac_status=$?
20288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20289 (exit $ac_status); }; }; then
20290 gdb_cv_var_elf=yes
20291else
20292 echo "$as_me: failed program was:" >&5
20293sed 's/^/| /' conftest.$ac_ext >&5
20294
20295gdb_cv_var_elf=no
20296fi
20297rm -f conftest.err conftest.$ac_objext \
20298 conftest$ac_exeext conftest.$ac_ext
20299fi
20300echo "$as_me:$LINENO: result: $gdb_cv_var_elf" >&5
20301echo "${ECHO_T}$gdb_cv_var_elf" >&6
20302if test $gdb_cv_var_elf = yes; then
20303 CONFIG_OBS="$CONFIG_OBS elfread.o"
20304
20305cat >>confdefs.h <<\_ACEOF
20306#define HAVE_ELF 1
20307_ACEOF
20308
20309fi
20310CFLAGS=$OLD_CFLAGS
20311LDFLAGS=$OLD_LDFLAGS
20312LIBS=$OLD_LIBS
20313
121ce6e5
DJ
20314# Add any host-specific objects to GDB.
20315CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
20316
3fc11d3e
JM
20317LIBGUI="../libgui/src/libgui.a"
20318GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
20319
20320
7a292a7a 20321
3fc11d3e
JM
20322WIN32LDAPP=
20323
20324
20325
d91670b9 20326case "${host}" in
686a5eed 20327*-*-cygwin* | *-*-mingw* )
d91670b9
CV
20328 configdir="win"
20329 ;;
20330*)
20331 configdir="unix"
20332 ;;
20333esac
3fc11d3e
JM
20334
20335GDBTKLIBS=
20336if test "${enable_gdbtk}" = "yes"; then
20337
d1c3b63a
KS
20338 # Gdbtk must have an absolute path to srcdir in order to run
20339 # properly when not installed.
20340 here=`pwd`
20341 cd ${srcdir}
20342 GDBTK_SRC_DIR=`pwd`
20343 cd $here
20344
bec39cab 20345
5062cc19
KS
20346 #
20347 # Ok, lets find the tcl configuration
20348 # First, look for one uninstalled.
20349 # the alternative search directory is invoked by --with-tcl
20350 #
3fc11d3e 20351
5062cc19
KS
20352 if test x"${no_tcl}" = x ; then
20353 # we reset no_tcl in case something fails here
20354 no_tcl=true
bec39cab 20355
5062cc19
KS
20356# Check whether --with-tcl or --without-tcl was given.
20357if test "${with_tcl+set}" = set; then
20358 withval="$with_tcl"
b4e70030
JB
20359 with_tclconfig=${withval}
20360fi;
5062cc19 20361 echo "$as_me:$LINENO: checking for Tcl configuration" >&5
b4e70030 20362echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
5062cc19 20363 if test "${ac_cv_c_tclconfig+set}" = set; then
bec39cab 20364 echo $ECHO_N "(cached) $ECHO_C" >&6
3fc11d3e 20365else
bec39cab 20366
3fc11d3e 20367
5062cc19
KS
20368 # First check to see if --with-tcl was specified.
20369 case "${host}" in
20370 *-*-cygwin*) platDir="win" ;;
20371 *) platDir="unix" ;;
20372 esac
20373 if test x"${with_tclconfig}" != x ; then
20374 if test -f "${with_tclconfig}/tclConfig.sh" ; then
20375 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
20376 else
20377 { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
bec39cab
AC
20378echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
20379 { (exit 1); exit 1; }; }
5062cc19
KS
20380 fi
20381 fi
20382
20383 # then check for a private Tcl installation
20384 if test x"${ac_cv_c_tclconfig}" = x ; then
20385 for i in \
20386 ../tcl \
20387 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20388 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
20389 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
20390 ../../tcl \
20391 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20392 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
20393 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
20394 ../../../tcl \
20395 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20396 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
20397 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
20398 if test -f "$i/$platDir/tclConfig.sh" ; then
20399 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
20400 break
20401 fi
20402 done
20403 fi
20404
20405 # on Darwin, check in Framework installation locations
20406 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
20407 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
20408 `ls -d /Library/Frameworks 2>/dev/null` \
20409 `ls -d /Network/Library/Frameworks 2>/dev/null` \
20410 `ls -d /System/Library/Frameworks 2>/dev/null` \
20411 ; do
20412 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
20413 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
20414 break
20415 fi
20416 done
20417 fi
20418
20419 # check in a few common install locations
20420 if test x"${ac_cv_c_tclconfig}" = x ; then
20421 for i in `ls -d ${libdir} 2>/dev/null` \
20422 `ls -d ${exec_prefix}/lib 2>/dev/null` \
20423 `ls -d ${prefix}/lib 2>/dev/null` \
20424 `ls -d /usr/local/lib 2>/dev/null` \
20425 `ls -d /usr/contrib/lib 2>/dev/null` \
20426 `ls -d /usr/lib 2>/dev/null` \
20427 ; do
20428 if test -f "$i/tclConfig.sh" ; then
20429 ac_cv_c_tclconfig=`(cd $i; pwd)`
20430 break
20431 fi
20432 done
20433 fi
3fc11d3e 20434
5062cc19
KS
20435 # check in a few other private locations
20436 if test x"${ac_cv_c_tclconfig}" = x ; then
20437 for i in \
20438 ${srcdir}/../tcl \
20439 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20440 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
20441 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
20442 if test -f "$i/$platDir/tclConfig.sh" ; then
20443 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
20444 break
20445 fi
20446 done
20447 fi
bec39cab 20448
3fc11d3e
JM
20449fi
20450
5062cc19
KS
20451
20452 if test x"${ac_cv_c_tclconfig}" = x ; then
20453 TCL_BIN_DIR="# no Tcl configs found"
20454 { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
bec39cab 20455echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
20456 else
20457 no_tcl=
20458 TCL_BIN_DIR=${ac_cv_c_tclconfig}
20459 echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
20460echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
20461 fi
20462 fi
3fc11d3e 20463
bec39cab 20464
85541719
DE
20465 # If $no_tk is nonempty, then we can't do Tk, and there is no
20466 # point to doing Tcl.
bec39cab 20467
5062cc19
KS
20468 #
20469 # Ok, lets find the tk configuration
20470 # First, look for one uninstalled.
20471 # the alternative search directory is invoked by --with-tk
20472 #
3fc11d3e 20473
5062cc19
KS
20474 if test x"${no_tk}" = x ; then
20475 # we reset no_tk in case something fails here
20476 no_tk=true
bec39cab 20477
5062cc19
KS
20478# Check whether --with-tk or --without-tk was given.
20479if test "${with_tk+set}" = set; then
20480 withval="$with_tk"
20481 with_tkconfig=${withval}
b4e70030 20482fi;
5062cc19
KS
20483 echo "$as_me:$LINENO: checking for Tk configuration" >&5
20484echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6
20485 if test "${ac_cv_c_tkconfig+set}" = set; then
bec39cab
AC
20486 echo $ECHO_N "(cached) $ECHO_C" >&6
20487else
3fc11d3e
JM
20488
20489
5062cc19
KS
20490 # First check to see if --with-tkconfig was specified.
20491 if test x"${with_tkconfig}" != x ; then
20492 if test -f "${with_tkconfig}/tkConfig.sh" ; then
20493 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
20494 else
20495 { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
20496echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
bec39cab 20497 { (exit 1); exit 1; }; }
5062cc19
KS
20498 fi
20499 fi
3fc11d3e 20500
5062cc19
KS
20501 # then check for a private Tk library
20502 case "${host}" in
20503 *-*-cygwin*) platDir="win" ;;
20504 *) platDir="unix" ;;
20505 esac
20506 if test x"${ac_cv_c_tkconfig}" = x ; then
20507 for i in \
20508 ../tk \
20509 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20510 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
20511 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
20512 ../../tk \
20513 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20514 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
20515 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
20516 ../../../tk \
20517 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20518 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
20519 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
20520 if test -f "$i/$platDir/tkConfig.sh" ; then
20521 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20522 break
20523 fi
20524 done
20525 fi
20526
20527 # on Darwin, check in Framework installation locations
20528 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
20529 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
20530 `ls -d /Library/Frameworks 2>/dev/null` \
20531 `ls -d /Network/Library/Frameworks 2>/dev/null` \
20532 `ls -d /System/Library/Frameworks 2>/dev/null` \
20533 ; do
20534 if test -f "$i/Tk.framework/tkConfig.sh" ; then
20535 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
20536 break
20537 fi
20538 done
20539 fi
20540
20541 # check in a few common install locations
20542 if test x"${ac_cv_c_tkconfig}" = x ; then
20543 for i in `ls -d ${libdir} 2>/dev/null` \
20544 `ls -d ${exec_prefix}/lib 2>/dev/null` \
20545 `ls -d ${prefix}/lib 2>/dev/null` \
20546 `ls -d /usr/local/lib 2>/dev/null` \
20547 `ls -d /usr/contrib/lib 2>/dev/null` \
20548 `ls -d /usr/lib 2>/dev/null` \
20549 ; do
20550 if test -f "$i/tkConfig.sh" ; then
20551 ac_cv_c_tkconfig=`(cd $i; pwd)`
20552 break
20553 fi
20554 done
20555 fi
20556 # check in a few other private locations
20557 if test x"${ac_cv_c_tkconfig}" = x ; then
20558 for i in \
20559 ${srcdir}/../tk \
20560 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20561 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
20562 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
20563 if test -f "$i/$platDir/tkConfig.sh" ; then
20564 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20565 break
20566 fi
20567 done
20568 fi
3fc11d3e 20569
3fc11d3e
JM
20570fi
20571
20572
5062cc19
KS
20573 if test x"${ac_cv_c_tkconfig}" = x ; then
20574 TK_BIN_DIR="# no Tk configs found"
20575 { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
20576echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
20577 else
20578 no_tk=
20579 TK_BIN_DIR=${ac_cv_c_tkconfig}
20580 echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
20581echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6
20582 fi
3fc11d3e 20583 fi
dd2504ab 20584
dd2504ab 20585
85541719
DE
20586 if test -z "${no_tcl}" -a -z "${no_tk}"; then
20587
20588 echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
20589echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
20590
20591 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
20592 echo "$as_me:$LINENO: result: loading" >&5
20593echo "${ECHO_T}loading" >&6
20594 . ${TCL_BIN_DIR}/tclConfig.sh
20595 else
20596 echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
20597echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
20598 fi
20599
20600 # eval is required to do the TCL_DBGX substitution
20601 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
20602 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
20603
20604 # If the TCL_BIN_DIR is the build directory (not the install directory),
20605 # then set the common variable name to the value of the build variables.
20606 # For example, the variable TCL_LIB_SPEC will be set to the value
20607 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
20608 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
20609 # installed and uninstalled version of Tcl.
20610 if test -f "${TCL_BIN_DIR}/Makefile" ; then
20611 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
20612 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
20613 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
20614 elif test "`uname -s`" = "Darwin"; then
20615 # If Tcl was built as a framework, attempt to use the libraries
20616 # from the framework at the given location so that linking works
20617 # against Tcl.framework installed in an arbitary location.
20618 case ${TCL_DEFS} in
20619 *TCL_FRAMEWORK*)
20620 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
20621 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
20622 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
20623 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
20624 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
20625 break
20626 fi
20627 done
20628 fi
20629 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
20630 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
20631 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
20632 fi
20633 ;;
20634 esac
20635 fi
20636
20637 # eval is required to do the TCL_DBGX substitution
20638 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
20639 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
20640 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
20641 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657 # Check for in-tree tcl
20658 here=`pwd`
20659 cd ${srcdir}/..
20660 topdir=`pwd`
20661 cd ${here}
20662
20663 intree="no"
20664 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
20665 intree="yes"
20666 fi
20667
20668 # Find Tcl private headers
20669 if test x"${intree}" = xno; then
20670
20671 echo "$as_me:$LINENO: checking for Tcl private headers" >&5
20672echo $ECHO_N "checking for Tcl private headers... $ECHO_C" >&6
20673 private_dir=""
20674 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
20675 if test -f ${dir}/tclInt.h ; then
20676 private_dir=${dir}
20677 fi
20678
20679 if test x"${private_dir}" = x; then
20680 { { echo "$as_me:$LINENO: error: could not find private Tcl headers" >&5
20681echo "$as_me: error: could not find private Tcl headers" >&2;}
20682 { (exit 1); exit 1; }; }
20683 else
20684 TCL_PRIVATE_INCLUDE="-I${private_dir}"
20685 echo "$as_me:$LINENO: result: ${private_dir}" >&5
20686echo "${ECHO_T}${private_dir}" >&6
20687 fi
20688
20689 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
20690 TCL_LIBRARY="${TCL_LIB_SPEC}"
20691 TCL_DEPS=""
20692 else
20693 # If building tcl in the same src tree, private headers
20694 # are not needed, but we need to be sure to use the right
20695 # headers library
20696 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
20697 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
20698 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
20699 fi
20700
20701
20702
20703
20704
5062cc19
KS
20705 echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
20706echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6
dd2504ab 20707
5062cc19
KS
20708 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
20709 echo "$as_me:$LINENO: result: loading" >&5
20710echo "${ECHO_T}loading" >&6
20711 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 20712 else
5062cc19
KS
20713 echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
20714echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
3fc11d3e 20715 fi
bec39cab 20716
5062cc19
KS
20717 # eval is required to do the TK_DBGX substitution
20718 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
20719 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
20720
20721 # If the TK_BIN_DIR is the build directory (not the install directory),
20722 # then set the common variable name to the value of the build variables.
20723 # For example, the variable TK_LIB_SPEC will be set to the value
20724 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
20725 # instead of TK_BUILD_LIB_SPEC since it will work with both an
20726 # installed and uninstalled version of Tcl.
85541719 20727 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
20728 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
20729 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
20730 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
20731 elif test "`uname -s`" = "Darwin"; then
20732 # If Tk was built as a framework, attempt to use the libraries
20733 # from the framework at the given location so that linking works
20734 # against Tk.framework installed in an arbitary location.
20735 case ${TK_DEFS} in
20736 *TK_FRAMEWORK*)
85541719 20737 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
20738 for i in "`cd ${TK_BIN_DIR}; pwd`" \
20739 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
20740 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
20741 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
20742 break
20743 fi
20744 done
20745 fi
85541719 20746 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
20747 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
20748 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
20749 fi
20750 ;;
20751 esac
3fc11d3e
JM
20752 fi
20753
5062cc19
KS
20754 # eval is required to do the TK_DBGX substitution
20755 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
20756 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
20757 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
20758 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 20759
3fc11d3e
JM
20760
20761
bec39cab
AC
20762
20763
20764
20765
20766
20767
20768
3fc11d3e 20769
3fc11d3e 20770
bec39cab 20771
bec39cab 20772
85541719
DE
20773 # Check for in-tree Tk
20774 intree="no"
20775 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
20776 intree="yes"
20777 fi
3fc11d3e 20778
85541719
DE
20779 # Find Tk private headers
20780 if test x"${intree}" = xno; then
3fc11d3e 20781
5062cc19
KS
20782 echo "$as_me:$LINENO: checking for Tk private headers" >&5
20783echo $ECHO_N "checking for Tk private headers... $ECHO_C" >&6
20784 private_dir=""
20785 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
20786 if test -f ${dir}/tkInt.h; then
20787 private_dir=${dir}
3fc11d3e 20788 fi
bec39cab 20789
5062cc19
KS
20790 if test x"${private_dir}" = x; then
20791 { { echo "$as_me:$LINENO: error: could not find Tk private headers" >&5
20792echo "$as_me: error: could not find Tk private headers" >&2;}
20793 { (exit 1); exit 1; }; }
3fc11d3e 20794 else
5062cc19
KS
20795 TK_PRIVATE_INCLUDE="-I${private_dir}"
20796 echo "$as_me:$LINENO: result: ${private_dir}" >&5
20797echo "${ECHO_T}${private_dir}" >&6
3fc11d3e 20798 fi
3fc11d3e 20799
85541719
DE
20800 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
20801 TK_LIBRARY=${TK_LIB_SPEC}
20802 TK_DEPS=""
20803 else
20804 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
20805 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
20806 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
20807 fi
3fc11d3e
JM
20808
20809
3fc11d3e
JM
20810
20811
3fc11d3e 20812
85541719 20813 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 20814
85541719
DE
20815 # Include some libraries that Tcl and Tk want.
20816 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
20817 # Yes, the ordering seems wrong here. But it isn't.
20818 # TK_LIBS is the list of libraries that need to be linked
20819 # after Tcl/Tk. Note that this isn't put into LIBS. If it
20820 # were in LIBS then any link tests after this point would
20821 # try to include things like `$(LIBGUI)', which wouldn't work.
20822 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 20823
85541719
DE
20824 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
20825 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
20826 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
20827 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
20828 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
20829 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
20830 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 20831
85541719
DE
20832 if test x$gdb_cv_os_cygwin = xyes; then
20833 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
20834 WIN32LDAPP="-Wl,--subsystem,console"
20835 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 20836 fi
ffc6a242 20837
b4e70030
JB
20838
20839
20840subdirs="$subdirs gdbtk"
3ace7edb 20841
85541719 20842 fi
3fc11d3e
JM
20843fi
20844
20845
20846
20847
20848
20849
20850
20851
b4e70030
JB
20852echo "$as_me:$LINENO: checking for X" >&5
20853echo $ECHO_N "checking for X... $ECHO_C" >&6
bec39cab 20854
c906108c 20855
b4e70030 20856# Check whether --with-x or --without-x was given.
c906108c 20857if test "${with_x+set}" = set; then
b4e70030 20858 withval="$with_x"
c906108c 20859
b4e70030 20860fi;
c906108c
SS
20861# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20862if test "x$with_x" = xno; then
20863 # The user explicitly disabled X.
20864 have_x=disabled
20865else
20866 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20867 # Both variables are already set.
20868 have_x=yes
20869 else
bec39cab
AC
20870 if test "${ac_cv_have_x+set}" = set; then
20871 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
20872else
20873 # One or both of the vars are not set, and there is no cached value.
bec39cab 20874ac_x_includes=no ac_x_libraries=no
b4e70030 20875rm -fr conftest.dir
bec39cab
AC
20876if mkdir conftest.dir; then
20877 cd conftest.dir
c906108c 20878 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
bec39cab 20879 cat >Imakefile <<'_ACEOF'
c906108c
SS
20880acfindx:
20881 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
bec39cab 20882_ACEOF
b4e70030 20883 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c
SS
20884 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20885 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
20886 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20887 for ac_extension in a so sl; do
20888 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
bec39cab
AC
20889 test -f $ac_im_libdir/libX11.$ac_extension; then
20890 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
20891 fi
20892 done
20893 # Screen out bogus values from the imake configuration. They are
20894 # bogus both because they are the default anyway, and because
20895 # using them would break gcc on systems where it needs fixed includes.
bec39cab 20896 case $ac_im_incroot in
b4e70030 20897 /usr/include) ;;
bec39cab 20898 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 20899 esac
bec39cab 20900 case $ac_im_usrlibdir in
c906108c 20901 /usr/lib | /lib) ;;
bec39cab 20902 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
20903 esac
20904 fi
20905 cd ..
b4e70030 20906 rm -fr conftest.dir
c906108c
SS
20907fi
20908
bec39cab
AC
20909# Standard set of common directories for X headers.
20910# Check X11 before X11Rn because it is often a symlink to the current release.
20911ac_x_header_dirs='
20912/usr/X11/include
20913/usr/X11R6/include
20914/usr/X11R5/include
20915/usr/X11R4/include
20916
20917/usr/include/X11
20918/usr/include/X11R6
20919/usr/include/X11R5
20920/usr/include/X11R4
20921
20922/usr/local/X11/include
20923/usr/local/X11R6/include
20924/usr/local/X11R5/include
20925/usr/local/X11R4/include
20926
20927/usr/local/include/X11
20928/usr/local/include/X11R6
20929/usr/local/include/X11R5
20930/usr/local/include/X11R4
20931
20932/usr/X386/include
20933/usr/x386/include
20934/usr/XFree86/include/X11
20935
20936/usr/include
20937/usr/local/include
20938/usr/unsupported/include
20939/usr/athena/include
20940/usr/local/x11r5/include
20941/usr/lpp/Xamples/include
20942
20943/usr/openwin/include
20944/usr/openwin/share/include'
20945
20946if test "$ac_x_includes" = no; then
59f80f10 20947 # Guess where to find include files, by looking for Intrinsic.h.
c906108c 20948 # First, try using that file with no special directory specified.
bec39cab
AC
20949 cat >conftest.$ac_ext <<_ACEOF
20950/* confdefs.h. */
20951_ACEOF
20952cat confdefs.h >>conftest.$ac_ext
20953cat >>conftest.$ac_ext <<_ACEOF
20954/* end confdefs.h. */
59f80f10 20955#include <X11/Intrinsic.h>
bec39cab
AC
20956_ACEOF
20957if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20958 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20959 ac_status=$?
20960 grep -v '^ *+' conftest.er1 >conftest.err
20961 rm -f conftest.er1
20962 cat conftest.err >&5
20963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20964 (exit $ac_status); } >/dev/null; then
20965 if test -s conftest.err; then
20966 ac_cpp_err=$ac_c_preproc_warn_flag
20967 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20968 else
20969 ac_cpp_err=
20970 fi
20971else
20972 ac_cpp_err=yes
20973fi
20974if test -z "$ac_cpp_err"; then
c906108c
SS
20975 # We can compile using X headers with no special include directory.
20976ac_x_includes=
20977else
bec39cab
AC
20978 echo "$as_me: failed program was:" >&5
20979sed 's/^/| /' conftest.$ac_ext >&5
20980
20981 for ac_dir in $ac_x_header_dirs; do
59f80f10 20982 if test -r "$ac_dir/X11/Intrinsic.h"; then
bec39cab
AC
20983 ac_x_includes=$ac_dir
20984 break
20985 fi
20986done
c906108c 20987fi
bec39cab
AC
20988rm -f conftest.err conftest.$ac_ext
20989fi # $ac_x_includes = no
c906108c 20990
bec39cab 20991if test "$ac_x_libraries" = no; then
c906108c 20992 # Check for the libraries.
c906108c
SS
20993 # See if we find them without any special options.
20994 # Don't add to $LIBS permanently.
bec39cab 20995 ac_save_LIBS=$LIBS
4e8d927d 20996 LIBS="-lXt $LIBS"
bec39cab
AC
20997 cat >conftest.$ac_ext <<_ACEOF
20998/* confdefs.h. */
20999_ACEOF
21000cat confdefs.h >>conftest.$ac_ext
21001cat >>conftest.$ac_ext <<_ACEOF
21002/* end confdefs.h. */
59f80f10 21003#include <X11/Intrinsic.h>
bec39cab
AC
21004int
21005main ()
21006{
59f80f10 21007XtMalloc (0)
bec39cab
AC
21008 ;
21009 return 0;
21010}
21011_ACEOF
21012rm -f conftest.$ac_objext conftest$ac_exeext
21013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21014 (eval $ac_link) 2>conftest.er1
21015 ac_status=$?
21016 grep -v '^ *+' conftest.er1 >conftest.err
21017 rm -f conftest.er1
21018 cat conftest.err >&5
21019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21020 (exit $ac_status); } &&
b4e70030
JB
21021 { ac_try='test -z "$ac_c_werror_flag"
21022 || test ! -s conftest.err'
bec39cab
AC
21023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21024 (eval $ac_try) 2>&5
21025 ac_status=$?
21026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21027 (exit $ac_status); }; } &&
21028 { ac_try='test -s conftest$ac_exeext'
21029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21030 (eval $ac_try) 2>&5
21031 ac_status=$?
21032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21033 (exit $ac_status); }; }; then
21034 LIBS=$ac_save_LIBS
c906108c
SS
21035# We can link X programs with no special library path.
21036ac_x_libraries=
21037else
bec39cab
AC
21038 echo "$as_me: failed program was:" >&5
21039sed 's/^/| /' conftest.$ac_ext >&5
21040
b4e70030 21041LIBS=$ac_save_LIBS
bec39cab 21042for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 21043do
bec39cab 21044 # Don't even attempt the hair of trying to link an X program!
c906108c 21045 for ac_extension in a so sl; do
b4e70030 21046 if test -r $ac_dir/libXt.$ac_extension; then
c906108c
SS
21047 ac_x_libraries=$ac_dir
21048 break 2
21049 fi
21050 done
21051done
21052fi
bec39cab
AC
21053rm -f conftest.err conftest.$ac_objext \
21054 conftest$ac_exeext conftest.$ac_ext
21055fi # $ac_x_libraries = no
c906108c 21056
bec39cab 21057if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
c906108c
SS
21058 # Didn't find X anywhere. Cache the known absence of X.
21059 ac_cv_have_x="have_x=no"
21060else
21061 # Record where we found X for the cache.
21062 ac_cv_have_x="have_x=yes \
bec39cab 21063 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
c906108c
SS
21064fi
21065fi
bec39cab 21066
c906108c
SS
21067 fi
21068 eval "$ac_cv_have_x"
21069fi # $with_x != no
21070
21071if test "$have_x" != yes; then
b4e70030
JB
21072 echo "$as_me:$LINENO: result: $have_x" >&5
21073echo "${ECHO_T}$have_x" >&6
c906108c
SS
21074 no_x=yes
21075else
21076 # If each of the values was on the command line, it overrides each guess.
21077 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
21078 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
21079 # Update the cache value to reflect the command line values.
21080 ac_cv_have_x="have_x=yes \
21081 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
b4e70030
JB
21082 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
21083echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
c906108c
SS
21084fi
21085
21086
bec39cab 21087# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 21088# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
21089# This code just checks for a few cases where we'd like to ignore those
21090# definitions, even when they're present in the '.mt' file. These cases
21091# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 21092# not part of the source tree.
7a292a7a 21093#
b4e70030 21094# Check whether --enable-sim or --disable-sim was given.
7a292a7a 21095if test "${enable_sim+set}" = set; then
b4e70030
JB
21096 enableval="$enable_sim"
21097 echo "enable_sim = $enable_sim";
7a292a7a
SS
21098 echo "enableval = ${enableval}";
21099 case "${enableval}" in
21100 yes) ignore_sim=false ;;
21101 no) ignore_sim=true ;;
21102 *) ignore_sim=false ;;
21103 esac
21104else
21105 ignore_sim=false
b4e70030 21106fi;
7a292a7a
SS
21107
21108if test ! -d "${srcdir}/../sim"; then
21109 ignore_sim=true
21110fi
21111
9b624dbe
UW
21112SIM=
21113SIM_OBS=
21114if test "${ignore_sim}" = "false"; then
21115 if test x"${gdb_sim}" != x ; then
21116 SIM="${gdb_sim}"
21117 SIM_OBS="remote-sim.o"
60ca704f
SE
21118
21119cat >>confdefs.h <<\_ACEOF
7a292a7a 21120#define WITH_SIM 1
bec39cab 21121_ACEOF
7a292a7a 21122
9b624dbe 21123 fi
7a292a7a
SS
21124fi
21125
21126
21127
c906108c
SS
21128
21129
21130
21131
21132
21133
dfcd3bfb 21134
e56ac5c3
AC
21135
21136
b3a90332
AC
21137
21138
c35f4ffc 21139# List of host floatformats.
bec39cab
AC
21140
21141cat >>confdefs.h <<_ACEOF
c35f4ffc 21142#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 21143_ACEOF
c35f4ffc 21144
bec39cab
AC
21145
21146cat >>confdefs.h <<_ACEOF
c35f4ffc 21147#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
21148_ACEOF
21149
c35f4ffc 21150
bec39cab 21151cat >>confdefs.h <<_ACEOF
c35f4ffc 21152#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 21153_ACEOF
c35f4ffc
AC
21154
21155
c906108c
SS
21156# target_subdir is used by the testsuite to find the target libraries.
21157target_subdir=
21158if test "${host}" != "${target}"; then
21159 target_subdir="${target_alias}/"
21160fi
21161
21162
21163frags=
771b4502 21164if test "${gdb_native}" = "yes"; then
0dad8a66
MK
21165 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
21166 if test ! -f ${host_makefile_frag}; then
bec39cab
AC
21167 { { echo "$as_me:$LINENO: error: \"*** Gdb does not support native target ${host}\"" >&5
21168echo "$as_me: error: \"*** Gdb does not support native target ${host}\"" >&2;}
21169 { (exit 1); exit 1; }; }
0dad8a66
MK
21170 fi
21171 frags="$frags $host_makefile_frag"
21172else
21173 host_makefile_frag=/dev/null
c906108c 21174fi
c906108c 21175
c906108c
SS
21176
21177
21178
771b4502 21179if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
21180# We pick this up from the host configuration file (.mh) because we
21181# do not have a native configuration Makefile fragment.
c906108c
SS
21182nativefile=`sed -n '
21183s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
21184' ${host_makefile_frag}`
c906108c
SS
21185fi
21186
21187
b00a8037 21188if test x"${gdb_osabi}" != x ; then
bec39cab
AC
21189
21190cat >>confdefs.h <<_ACEOF
b00a8037 21191#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 21192_ACEOF
b00a8037
DJ
21193
21194fi
21195
8dcde887 21196# Enable multi-ice-gdb-server.
b4e70030 21197# Check whether --enable-multi-ice or --disable-multi-ice was given.
8dcde887 21198if test "${enable_multi_ice+set}" = set; then
b4e70030
JB
21199 enableval="$enable_multi_ice"
21200 case $enableval in
8dcde887
MK
21201 yes | no)
21202 ;;
bec39cab
AC
21203 *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-multi-ice" >&5
21204echo "$as_me: error: bad value $enableval for --enable-multi-ice" >&2;}
21205 { (exit 1); exit 1; }; } ;;
8dcde887 21206 esac
b4e70030 21207fi;
4e8d927d 21208if test "x$enable_multi_ice" = xyes; then
b4e70030
JB
21209
21210
21211subdirs="$subdirs multi-ice"
3ace7edb 21212
a85f51e7
DJ
21213fi
21214
a13e2c95
UW
21215# We only build gdbserver automatically in a native configuration.
21216if test "$gdb_native" = "yes"; then
b4e70030
JB
21217 echo "$as_me:$LINENO: checking whether gdbserver is supported on this host" >&5
21218echo $ECHO_N "checking whether gdbserver is supported on this host... $ECHO_C" >&6
8dcde887 21219 if test "x$build_gdbserver" = xyes; then
b4e70030
JB
21220 echo "$as_me:$LINENO: result: yes" >&5
21221echo "${ECHO_T}yes" >&6
21222
21223
21224subdirs="$subdirs gdbserver"
3ace7edb 21225
8dcde887 21226 else
b4e70030
JB
21227 echo "$as_me:$LINENO: result: no" >&5
21228echo "${ECHO_T}no" >&6
8dcde887
MK
21229 fi
21230fi
21231
db985757 21232# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 21233# to an empty version.
c906108c
SS
21234
21235files=
21236links=
5a2402b8 21237
c906108c
SS
21238rm -f nm.h
21239if test "${nativefile}" != ""; then
0f475e27
AC
21240 case "${nativefile}" in
21241 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
21242 * ) GDB_NM_FILE="${nativefile}"
21243 esac
5a2402b8
AC
21244 files="${files} ${GDB_NM_FILE}"
21245 links="${links} nm.h"
60ca704f
SE
21246
21247cat >>confdefs.h <<_ACEOF
b78960be 21248#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 21249_ACEOF
5a2402b8 21250
c906108c 21251fi
5a2402b8
AC
21252
21253
bec39cab
AC
21254ac_sources="$files"
21255ac_dests="$links"
21256while test -n "$ac_sources"; do
21257 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
21258 set $ac_sources; ac_source=$1; shift; ac_sources=$*
21259 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
21260done
b4e70030 21261 ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
21262
21263
c906108c
SS
21264
21265
c906108c 21266
bec39cab 21267cat >>confdefs.h <<\_ACEOF
6c7a06a3 21268#define GDB_DEFAULT_HOST_CHARSET "UTF-8"
bec39cab
AC
21269_ACEOF
21270
bec39cab 21271
26e251b6
JM
21272# Flags needed to enable html installing and building
21273
21274# Check whether --with-datarootdir or --without-datarootdir was given.
21275if test "${with_datarootdir+set}" = set; then
21276 withval="$with_datarootdir"
21277 datarootdir="\${prefix}/${withval}"
21278else
21279 datarootdir="\${prefix}/share"
21280fi;
21281
21282
21283# Check whether --with-docdir or --without-docdir was given.
21284if test "${with_docdir+set}" = set; then
21285 withval="$with_docdir"
21286 docdir="\${prefix}/${withval}"
21287else
21288 docdir="\${datarootdir}/doc"
21289fi;
21290
21291
21292# Check whether --with-pdfdir or --without-pdfdir was given.
21293if test "${with_pdfdir+set}" = set; then
21294 withval="$with_pdfdir"
21295 pdfdir="\${prefix}/${withval}"
21296else
21297 pdfdir="\${docdir}"
21298fi;
21299
21300
21301# Check whether --with-htmldir or --without-htmldir was given.
21302if test "${with_htmldir+set}" = set; then
21303 withval="$with_htmldir"
21304 htmldir="\${prefix}/${withval}"
21305else
21306 htmldir="\${docdir}"
21307fi;
21308
89a34d1b
JM
21309
21310
21311
21312
21313
e28b3332 21314 ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
b4e70030 21315 ac_config_commands="$ac_config_commands default"
bec39cab
AC
21316cat >confcache <<\_ACEOF
21317# This file is a shell script that caches the results of configure
21318# tests run on this system so they can be shared between configure
21319# scripts and configure runs, see configure's option --config-cache.
21320# It is not useful on other systems. If it contains results you don't
21321# want to keep, you may remove or edit it.
21322#
21323# config.status only pays attention to the cache file if you give it
21324# the --recheck option to rerun configure.
21325#
21326# `ac_cv_env_foo' variables (set or unset) will be overridden when
21327# loading this file, other *unset* `ac_cv_foo' will be assigned the
21328# following values.
21329
21330_ACEOF
21331
21332# The following way of writing the cache mishandles newlines in values,
21333# but we know of no workaround that is simple, portable, and efficient.
b4e70030 21334# So, don't put newlines in cache variables' values.
bec39cab
AC
21335# Ultrix sh set writes to stderr and can't be redirected directly,
21336# and sets the high bit in the cache file unless we assign to the vars.
b4e70030 21337{
bec39cab 21338 (set) 2>&1 |
b4e70030
JB
21339 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21340 *ac_space=\ *)
bec39cab
AC
21341 # `set' does not quote correctly, so add quotes (double-quote
21342 # substitution turns \\\\ into \\, and sed turns \\ into \).
21343 sed -n \
21344 "s/'/'\\\\''/g;
21345 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b4e70030 21346 ;;
bec39cab
AC
21347 *)
21348 # `set' quotes correctly as required by POSIX, so do not add quotes.
b4e70030
JB
21349 sed -n \
21350 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 21351 ;;
b4e70030
JB
21352 esac;
21353} |
bec39cab
AC
21354 sed '
21355 t clear
b4e70030 21356 : clear
bec39cab
AC
21357 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21358 t end
b4e70030
JB
21359 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21360 : end' >>confcache
bec39cab
AC
21361if diff $cache_file confcache >/dev/null 2>&1; then :; else
21362 if test -w $cache_file; then
b4e70030 21363 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
bec39cab
AC
21364 cat confcache >$cache_file
21365 else
b4e70030 21366 echo "not updating unwritable cache $cache_file"
bec39cab
AC
21367 fi
21368fi
21369rm -f confcache
21370
21371test "x$prefix" = xNONE && prefix=$ac_default_prefix
21372# Let make expand exec_prefix.
21373test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21374
b4e70030
JB
21375# VPATH may cause trouble with some makes, so we remove $(srcdir),
21376# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21377# trailing colons and then remove the whole line if VPATH becomes empty
21378# (actually we leave an empty line to preserve line numbers).
21379if test "x$srcdir" = x.; then
21380 ac_vpsub='/^[ ]*VPATH[ ]*=/{
21381s/:*\$(srcdir):*/:/;
21382s/:*\${srcdir}:*/:/;
21383s/:*@srcdir@:*/:/;
21384s/^\([^=]*=[ ]*\):*/\1/;
21385s/:*$//;
21386s/^[^=]*=[ ]*$//;
21387}'
21388fi
21389
bec39cab
AC
21390DEFS=-DHAVE_CONFIG_H
21391
21392ac_libobjs=
21393ac_ltlibobjs=
21394for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21395 # 1. Remove the extension, and $U if already installed.
b4e70030
JB
21396 ac_i=`echo "$ac_i" |
21397 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
21398 # 2. Add them.
21399 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21400 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
bec39cab
AC
21401done
21402LIBOBJS=$ac_libobjs
21403
21404LTLIBOBJS=$ac_ltlibobjs
21405
21406
85981d60
AC
21407if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
21408 { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
21409Usually this means the macro was only invoked conditionally." >&5
21410echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
21411Usually this means the macro was only invoked conditionally." >&2;}
21412 { (exit 1); exit 1; }; }
21413fi
a417dc56
RW
21414if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
21415 { { echo "$as_me:$LINENO: error: conditional \"GMAKE\" was never defined.
21416Usually this means the macro was only invoked conditionally." >&5
21417echo "$as_me: error: conditional \"GMAKE\" was never defined.
21418Usually this means the macro was only invoked conditionally." >&2;}
21419 { (exit 1); exit 1; }; }
21420fi
783e057b
DJ
21421if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
21422 { { echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21423Usually this means the macro was only invoked conditionally." >&5
21424echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21425Usually this means the macro was only invoked conditionally." >&2;}
21426 { (exit 1); exit 1; }; }
21427fi
21428
21429 gl_libobjs=
21430 gl_ltlibobjs=
21431 if test -n "$gl_LIBOBJS"; then
21432 # Remove the extension.
21433 sed_drop_objext='s/\.o$//;s/\.obj$//'
21434 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21435 gl_libobjs="$gl_libobjs $i.$ac_objext"
21436 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
21437 done
21438 fi
21439 gl_LIBOBJS=$gl_libobjs
21440
21441 gl_LTLIBOBJS=$gl_ltlibobjs
21442
21443
21444
21445 gltests_libobjs=
21446 gltests_ltlibobjs=
21447 if test -n "$gltests_LIBOBJS"; then
21448 # Remove the extension.
21449 sed_drop_objext='s/\.o$//;s/\.obj$//'
21450 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21451 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
21452 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
21453 done
21454 fi
21455 gltests_LIBOBJS=$gltests_libobjs
21456
21457 gltests_LTLIBOBJS=$gltests_ltlibobjs
21458
21459
e28b3332
DJ
21460if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
21461 { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
21462Usually this means the macro was only invoked conditionally." >&5
21463echo "$as_me: error: conditional \"AMDEP\" was never defined.
21464Usually this means the macro was only invoked conditionally." >&2;}
21465 { (exit 1); exit 1; }; }
21466fi
21467if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
21468 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
21469Usually this means the macro was only invoked conditionally." >&5
21470echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
21471Usually this means the macro was only invoked conditionally." >&2;}
21472 { (exit 1); exit 1; }; }
21473fi
bec39cab
AC
21474
21475: ${CONFIG_STATUS=./config.status}
21476ac_clean_files_save=$ac_clean_files
21477ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21478{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21479echo "$as_me: creating $CONFIG_STATUS" >&6;}
21480cat >$CONFIG_STATUS <<_ACEOF
21481#! $SHELL
21482# Generated by $as_me.
21483# Run this file to recreate the current configuration.
21484# Compiler output produced by configure, useful for debugging
21485# configure, is in config.log if it exists.
21486
21487debug=false
21488ac_cs_recheck=false
21489ac_cs_silent=false
21490SHELL=\${CONFIG_SHELL-$SHELL}
21491_ACEOF
21492
21493cat >>$CONFIG_STATUS <<\_ACEOF
21494## --------------------- ##
21495## M4sh Initialization. ##
21496## --------------------- ##
21497
21498# Be Bourne compatible
21499if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21500 emulate sh
21501 NULLCMD=:
21502 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21503 # is contrary to our usage. Disable this feature.
21504 alias -g '${1+"$@"}'='"$@"'
b4e70030
JB
21505elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21506 set -o posix
bec39cab
AC
21507fi
21508DUALCASE=1; export DUALCASE # for MKS sh
21509
21510# Support unset when possible.
21511if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21512 as_unset=unset
21513else
21514 as_unset=false
21515fi
21516
21517
21518# Work around bugs in pre-3.0 UWIN ksh.
b4e70030 21519$as_unset ENV MAIL MAILPATH
bec39cab
AC
21520PS1='$ '
21521PS2='> '
21522PS4='+ '
21523
21524# NLS nuisances.
21525for as_var in \
21526 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21527 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21528 LC_TELEPHONE LC_TIME
21529do
21530 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
21531 eval $as_var=C; export $as_var
21532 else
b4e70030 21533 $as_unset $as_var
bec39cab
AC
21534 fi
21535done
21536
21537# Required to use basename.
b4e70030 21538if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
21539 as_expr=expr
21540else
21541 as_expr=false
21542fi
21543
b4e70030 21544if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
bec39cab
AC
21545 as_basename=basename
21546else
21547 as_basename=false
21548fi
21549
21550
21551# Name of the executable.
b4e70030 21552as_me=`$as_basename "$0" ||
bec39cab
AC
21553$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21554 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
21555 X"$0" : 'X\(/\)$' \| \
21556 . : '\(.\)' 2>/dev/null ||
bec39cab 21557echo X/"$0" |
b4e70030
JB
21558 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21559 /^X\/\(\/\/\)$/{ s//\1/; q; }
21560 /^X\/\(\/\).*/{ s//\1/; q; }
21561 s/.*/./; q'`
bec39cab 21562
b4e70030
JB
21563
21564# PATH needs CR, and LINENO needs CR and PATH.
21565# Avoid depending upon Character Ranges.
21566as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21567as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21568as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21569as_cr_digits='0123456789'
21570as_cr_alnum=$as_cr_Letters$as_cr_digits
21571
21572# The user is always right.
21573if test "${PATH_SEPARATOR+set}" != set; then
21574 echo "#! /bin/sh" >conf$$.sh
21575 echo "exit 0" >>conf$$.sh
21576 chmod +x conf$$.sh
21577 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
21578 PATH_SEPARATOR=';'
21579 else
21580 PATH_SEPARATOR=:
21581 fi
21582 rm -f conf$$.sh
21583fi
bec39cab
AC
21584
21585
b4e70030
JB
21586 as_lineno_1=$LINENO
21587 as_lineno_2=$LINENO
21588 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21589 test "x$as_lineno_1" != "x$as_lineno_2" &&
21590 test "x$as_lineno_3" = "x$as_lineno_2" || {
21591 # Find who we are. Look in the path if we contain no path at all
21592 # relative or not.
21593 case $0 in
21594 *[\\/]* ) as_myself=$0 ;;
21595 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21596for as_dir in $PATH
21597do
21598 IFS=$as_save_IFS
21599 test -z "$as_dir" && as_dir=.
21600 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21601done
bec39cab 21602
b4e70030
JB
21603 ;;
21604 esac
21605 # We did not find ourselves, most probably we were run as `sh COMMAND'
21606 # in which case we are not to be found in the path.
21607 if test "x$as_myself" = x; then
21608 as_myself=$0
21609 fi
21610 if test ! -f "$as_myself"; then
21611 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21612echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21613 { (exit 1); exit 1; }; }
21614 fi
21615 case $CONFIG_SHELL in
21616 '')
21617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21618for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21619do
21620 IFS=$as_save_IFS
21621 test -z "$as_dir" && as_dir=.
21622 for as_base in sh bash ksh sh5; do
21623 case $as_dir in
21624 /*)
21625 if ("$as_dir/$as_base" -c '
bec39cab
AC
21626 as_lineno_1=$LINENO
21627 as_lineno_2=$LINENO
b4e70030 21628 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
bec39cab 21629 test "x$as_lineno_1" != "x$as_lineno_2" &&
b4e70030
JB
21630 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
21631 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21632 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
21633 CONFIG_SHELL=$as_dir/$as_base
21634 export CONFIG_SHELL
21635 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21636 fi;;
21637 esac
21638 done
21639done
21640;;
21641 esac
bec39cab
AC
21642
21643 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21644 # uniformly replaced by the line number. The first 'sed' inserts a
b4e70030
JB
21645 # line-number line before each line; the second 'sed' does the real
21646 # work. The second script uses 'N' to pair each line-number line
21647 # with the numbered line, and appends trailing '-' during
21648 # substitution so that $LINENO is not a special case at line end.
bec39cab 21649 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b4e70030
JB
21650 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
21651 sed '=' <$as_myself |
bec39cab
AC
21652 sed '
21653 N
b4e70030
JB
21654 s,$,-,
21655 : loop
21656 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
bec39cab 21657 t loop
b4e70030
JB
21658 s,-$,,
21659 s,^['$as_cr_digits']*\n,,
bec39cab 21660 ' >$as_me.lineno &&
b4e70030
JB
21661 chmod +x $as_me.lineno ||
21662 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21663echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
bec39cab
AC
21664 { (exit 1); exit 1; }; }
21665
21666 # Don't try to exec as it changes $[0], causing all sort of problems
21667 # (the dirname of $[0] is not the place where we might find the
b4e70030
JB
21668 # original and so on. Autoconf is especially sensible to this).
21669 . ./$as_me.lineno
bec39cab
AC
21670 # Exit status is that of the last command.
21671 exit
21672}
21673
21674
b4e70030
JB
21675case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21676 *c*,-n*) ECHO_N= ECHO_C='
21677' ECHO_T=' ' ;;
21678 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21679 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
bec39cab
AC
21680esac
21681
b4e70030 21682if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
21683 as_expr=expr
21684else
21685 as_expr=false
21686fi
21687
21688rm -f conf$$ conf$$.exe conf$$.file
21689echo >conf$$.file
21690if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030
JB
21691 # We could just check for DJGPP; but this test a) works b) is more generic
21692 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21693 if test -f conf$$.exe; then
21694 # Don't use ln at all; we don't have any links
bec39cab 21695 as_ln_s='cp -p'
b4e70030
JB
21696 else
21697 as_ln_s='ln -s'
21698 fi
bec39cab
AC
21699elif ln conf$$.file conf$$ 2>/dev/null; then
21700 as_ln_s=ln
21701else
21702 as_ln_s='cp -p'
21703fi
b4e70030 21704rm -f conf$$ conf$$.exe conf$$.file
bec39cab
AC
21705
21706if mkdir -p . 2>/dev/null; then
21707 as_mkdir_p=:
21708else
21709 test -d ./-p && rmdir ./-p
21710 as_mkdir_p=false
21711fi
21712
b4e70030 21713as_executable_p="test -f"
bec39cab
AC
21714
21715# Sed expression to map a string onto a valid CPP name.
21716as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21717
21718# Sed expression to map a string onto a valid variable name.
21719as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21720
21721
b4e70030
JB
21722# IFS
21723# We need space, tab and new line, in precisely that order.
21724as_nl='
21725'
21726IFS=" $as_nl"
21727
21728# CDPATH.
21729$as_unset CDPATH
21730
bec39cab
AC
21731exec 6>&1
21732
b4e70030 21733# Open the log real soon, to keep \$[0] and so on meaningful, and to
bec39cab 21734# report actual input values of CONFIG_FILES etc. instead of their
b4e70030
JB
21735# values after options handling. Logging --version etc. is OK.
21736exec 5>>config.log
21737{
21738 echo
21739 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21740## Running $as_me. ##
21741_ASBOX
21742} >&5
21743cat >&5 <<_CSEOF
21744
bec39cab 21745This file was extended by $as_me, which was
b4e70030 21746generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
21747
21748 CONFIG_FILES = $CONFIG_FILES
21749 CONFIG_HEADERS = $CONFIG_HEADERS
21750 CONFIG_LINKS = $CONFIG_LINKS
21751 CONFIG_COMMANDS = $CONFIG_COMMANDS
21752 $ $0 $@
21753
b4e70030
JB
21754_CSEOF
21755echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21756echo >&5
bec39cab
AC
21757_ACEOF
21758
21759# Files that config.status was made for.
b4e70030
JB
21760if test -n "$ac_config_files"; then
21761 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21762fi
234b45d4 21763
b4e70030
JB
21764if test -n "$ac_config_headers"; then
21765 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21766fi
21767
21768if test -n "$ac_config_links"; then
21769 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21770fi
21771
21772if test -n "$ac_config_commands"; then
21773 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21774fi
234b45d4 21775
bec39cab 21776cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030 21777
bec39cab
AC
21778ac_cs_usage="\
21779\`$as_me' instantiates files from templates according to the
21780current configuration.
234b45d4 21781
bec39cab 21782Usage: $0 [OPTIONS] [FILE]...
234b45d4 21783
bec39cab
AC
21784 -h, --help print this help, then exit
21785 -V, --version print version number, then exit
21786 -q, --quiet do not print progress messages
21787 -d, --debug don't remove temporary files
21788 --recheck update $as_me by reconfiguring in the same conditions
21789 --file=FILE[:TEMPLATE]
21790 instantiate the configuration file FILE
21791 --header=FILE[:TEMPLATE]
21792 instantiate the configuration header FILE
234b45d4 21793
bec39cab
AC
21794Configuration files:
21795$config_files
234b45d4 21796
bec39cab
AC
21797Configuration headers:
21798$config_headers
234b45d4 21799
bec39cab
AC
21800Configuration links:
21801$config_links
234b45d4 21802
bec39cab
AC
21803Configuration commands:
21804$config_commands
21805
21806Report bugs to <bug-autoconf@gnu.org>."
4e8d927d 21807_ACEOF
b4e70030 21808
bec39cab
AC
21809cat >>$CONFIG_STATUS <<_ACEOF
21810ac_cs_version="\\
21811config.status
b4e70030 21812configured by $0, generated by GNU Autoconf 2.59,
bec39cab
AC
21813 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21814
b4e70030 21815Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
21816This config.status script is free software; the Free Software Foundation
21817gives unlimited permission to copy, distribute and modify it."
b4e70030
JB
21818srcdir=$srcdir
21819INSTALL="$INSTALL"
bec39cab
AC
21820_ACEOF
21821
21822cat >>$CONFIG_STATUS <<\_ACEOF
21823# If no file are specified by the user, then we need to provide default
21824# value. By we need to know if files were specified by the user.
21825ac_need_defaults=:
21826while test $# != 0
21827do
21828 case $1 in
21829 --*=*)
b4e70030
JB
21830 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21831 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
bec39cab 21832 ac_shift=:
c906108c 21833 ;;
b4e70030 21834 -*)
bec39cab
AC
21835 ac_option=$1
21836 ac_optarg=$2
21837 ac_shift=shift
c906108c 21838 ;;
b4e70030
JB
21839 *) # This is not an option, so the user has probably given explicit
21840 # arguments.
21841 ac_option=$1
21842 ac_need_defaults=false;;
bec39cab 21843 esac
c906108c 21844
bec39cab
AC
21845 case $ac_option in
21846 # Handling of the options.
b4e70030
JB
21847_ACEOF
21848cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
21849 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21850 ac_cs_recheck=: ;;
b4e70030
JB
21851 --version | --vers* | -V )
21852 echo "$ac_cs_version"; exit 0 ;;
21853 --he | --h)
21854 # Conflict between --help and --header
21855 { { echo "$as_me:$LINENO: error: ambiguous option: $1
21856Try \`$0 --help' for more information." >&5
21857echo "$as_me: error: ambiguous option: $1
21858Try \`$0 --help' for more information." >&2;}
21859 { (exit 1); exit 1; }; };;
21860 --help | --hel | -h )
21861 echo "$ac_cs_usage"; exit 0 ;;
21862 --debug | --d* | -d )
bec39cab
AC
21863 debug=: ;;
21864 --file | --fil | --fi | --f )
21865 $ac_shift
21866 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
21867 ac_need_defaults=false;;
21868 --header | --heade | --head | --hea )
21869 $ac_shift
21870 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
21871 ac_need_defaults=false;;
21872 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21873 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21874 ac_cs_silent=: ;;
c906108c 21875
bec39cab 21876 # This is an error.
b4e70030
JB
21877 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21878Try \`$0 --help' for more information." >&5
21879echo "$as_me: error: unrecognized option: $1
21880Try \`$0 --help' for more information." >&2;}
bec39cab 21881 { (exit 1); exit 1; }; } ;;
c906108c 21882
b4e70030 21883 *) ac_config_targets="$ac_config_targets $1" ;;
c906108c 21884
bec39cab
AC
21885 esac
21886 shift
21887done
c906108c 21888
bec39cab 21889ac_configure_extra_args=
c906108c 21890
bec39cab
AC
21891if $ac_cs_silent; then
21892 exec 6>/dev/null
21893 ac_configure_extra_args="$ac_configure_extra_args --silent"
21894fi
c906108c 21895
bec39cab
AC
21896_ACEOF
21897cat >>$CONFIG_STATUS <<_ACEOF
21898if \$ac_cs_recheck; then
b4e70030
JB
21899 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21900 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
bec39cab
AC
21901fi
21902
21903_ACEOF
21904
21905cat >>$CONFIG_STATUS <<_ACEOF
c906108c 21906#
b4e70030 21907# INIT-COMMANDS section.
c906108c 21908#
c906108c 21909
a417dc56 21910ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 21911AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 21912
bec39cab
AC
21913_ACEOF
21914
4e8d927d 21915
b4e70030
JB
21916
21917cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab 21918for ac_config_target in $ac_config_targets
c906108c 21919do
b4e70030
JB
21920 case "$ac_config_target" in
21921 # Handling of arguments.
21922 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21923 ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
e28b3332 21924 "gnulib/Makefile" ) CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
b4e70030 21925 "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
a417dc56 21926 "depdir" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
e28b3332 21927 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
b4e70030
JB
21928 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21929 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
bec39cab
AC
21930 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21931echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21932 { (exit 1); exit 1; }; };;
c906108c
SS
21933 esac
21934done
21935
bec39cab
AC
21936# If the user did not use the arguments to specify the items to instantiate,
21937# then the envvar interface is used. Set only those that are not.
21938# We use the long form for the default assignment because of an extremely
21939# bizarre bug on SunOS 4.1.3.
21940if $ac_need_defaults; then
21941 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21942 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21943 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
21944 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21945fi
21946
b4e70030
JB
21947# Have a temporary directory for convenience. Make it in the build tree
21948# simply because there is no reason to put it here, and in addition,
21949# creating and moving files from /tmp can sometimes cause problems.
21950# Create a temporary directory, and hook for its removal unless debugging.
21951$debug ||
21952{
21953 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21954 trap '{ (exit 1); exit 1; }' 1 2 13 15
21955}
4e8d927d 21956
b4e70030 21957# Create a (secure) tmp directory for tmp files.
4e8d927d 21958
b4e70030
JB
21959{
21960 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
21961 test -n "$tmp" && test -d "$tmp"
21962} ||
21963{
21964 tmp=./confstat$$-$RANDOM
21965 (umask 077 && mkdir $tmp)
21966} ||
21967{
21968 echo "$me: cannot create a temporary directory in ." >&2
21969 { (exit 1); exit 1; }
21970}
4e8d927d 21971
b4e70030 21972_ACEOF
4e8d927d 21973
b4e70030 21974cat >>$CONFIG_STATUS <<_ACEOF
4e8d927d 21975
b4e70030
JB
21976#
21977# CONFIG_FILES section.
21978#
4e8d927d 21979
b4e70030
JB
21980# No need to generate the scripts if there are no CONFIG_FILES.
21981# This happens for instance when ./config.status config.h
21982if test -n "\$CONFIG_FILES"; then
21983 # Protect against being on the right side of a sed subst in config.status.
21984 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21985 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21986s,@SHELL@,$SHELL,;t t
21987s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21988s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21989s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21990s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21991s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21992s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21993s,@exec_prefix@,$exec_prefix,;t t
21994s,@prefix@,$prefix,;t t
21995s,@program_transform_name@,$program_transform_name,;t t
21996s,@bindir@,$bindir,;t t
21997s,@sbindir@,$sbindir,;t t
21998s,@libexecdir@,$libexecdir,;t t
21999s,@datadir@,$datadir,;t t
22000s,@sysconfdir@,$sysconfdir,;t t
22001s,@sharedstatedir@,$sharedstatedir,;t t
22002s,@localstatedir@,$localstatedir,;t t
22003s,@libdir@,$libdir,;t t
22004s,@includedir@,$includedir,;t t
22005s,@oldincludedir@,$oldincludedir,;t t
22006s,@infodir@,$infodir,;t t
22007s,@mandir@,$mandir,;t t
22008s,@build_alias@,$build_alias,;t t
22009s,@host_alias@,$host_alias,;t t
22010s,@target_alias@,$target_alias,;t t
22011s,@DEFS@,$DEFS,;t t
22012s,@ECHO_C@,$ECHO_C,;t t
22013s,@ECHO_N@,$ECHO_N,;t t
22014s,@ECHO_T@,$ECHO_T,;t t
22015s,@LIBS@,$LIBS,;t t
22016s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
22017s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
22018s,@MAINT@,$MAINT,;t t
22019s,@CC@,$CC,;t t
22020s,@CFLAGS@,$CFLAGS,;t t
22021s,@LDFLAGS@,$LDFLAGS,;t t
22022s,@CPPFLAGS@,$CPPFLAGS,;t t
22023s,@ac_ct_CC@,$ac_ct_CC,;t t
22024s,@EXEEXT@,$EXEEXT,;t t
22025s,@OBJEXT@,$OBJEXT,;t t
22026s,@CPP@,$CPP,;t t
22027s,@EGREP@,$EGREP,;t t
783e057b
DJ
22028s,@RANLIB@,$RANLIB,;t t
22029s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
b4e70030
JB
22030s,@build@,$build,;t t
22031s,@build_cpu@,$build_cpu,;t t
22032s,@build_vendor@,$build_vendor,;t t
22033s,@build_os@,$build_os,;t t
22034s,@host@,$host,;t t
22035s,@host_cpu@,$host_cpu,;t t
22036s,@host_vendor@,$host_vendor,;t t
22037s,@host_os@,$host_os,;t t
22038s,@target@,$target,;t t
22039s,@target_cpu@,$target_cpu,;t t
22040s,@target_vendor@,$target_vendor,;t t
22041s,@target_os@,$target_os,;t t
a417dc56
RW
22042s,@am__leading_dot@,$am__leading_dot,;t t
22043s,@DEPDIR@,$DEPDIR,;t t
22044s,@CCDEPMODE@,$CCDEPMODE,;t t
22045s,@MAKE@,$MAKE,;t t
22046s,@GMAKE_TRUE@,$GMAKE_TRUE,;t t
22047s,@GMAKE_FALSE@,$GMAKE_FALSE,;t t
22048s,@SET_MAKE@,$SET_MAKE,;t t
b4e70030 22049s,@USE_NLS@,$USE_NLS,;t t
20e95c23
DJ
22050s,@LIBINTL@,$LIBINTL,;t t
22051s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
22052s,@INCINTL@,$INCINTL,;t t
b4e70030 22053s,@XGETTEXT@,$XGETTEXT,;t t
20e95c23
DJ
22054s,@GMSGFMT@,$GMSGFMT,;t t
22055s,@POSUB@,$POSUB,;t t
b4e70030 22056s,@CATALOGS@,$CATALOGS,;t t
b4e70030 22057s,@DATADIRNAME@,$DATADIRNAME,;t t
b4e70030 22058s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20e95c23
DJ
22059s,@GENCAT@,$GENCAT,;t t
22060s,@CATOBJEXT@,$CATOBJEXT,;t t
b4e70030 22061s,@localedir@,$localedir,;t t
783e057b
DJ
22062s,@GL_COND_LIBTOOL_TRUE@,$GL_COND_LIBTOOL_TRUE,;t t
22063s,@GL_COND_LIBTOOL_FALSE@,$GL_COND_LIBTOOL_FALSE,;t t
22064s,@GNULIB_MEMMEM@,$GNULIB_MEMMEM,;t t
22065s,@GNULIB_MEMPCPY@,$GNULIB_MEMPCPY,;t t
22066s,@GNULIB_MEMRCHR@,$GNULIB_MEMRCHR,;t t
22067s,@GNULIB_STPCPY@,$GNULIB_STPCPY,;t t
22068s,@GNULIB_STPNCPY@,$GNULIB_STPNCPY,;t t
22069s,@GNULIB_STRCHRNUL@,$GNULIB_STRCHRNUL,;t t
22070s,@GNULIB_STRDUP@,$GNULIB_STRDUP,;t t
22071s,@GNULIB_STRNDUP@,$GNULIB_STRNDUP,;t t
22072s,@GNULIB_STRNLEN@,$GNULIB_STRNLEN,;t t
22073s,@GNULIB_STRPBRK@,$GNULIB_STRPBRK,;t t
22074s,@GNULIB_STRSEP@,$GNULIB_STRSEP,;t t
22075s,@GNULIB_STRSTR@,$GNULIB_STRSTR,;t t
22076s,@GNULIB_STRCASESTR@,$GNULIB_STRCASESTR,;t t
22077s,@GNULIB_STRTOK_R@,$GNULIB_STRTOK_R,;t t
22078s,@GNULIB_MBSLEN@,$GNULIB_MBSLEN,;t t
22079s,@GNULIB_MBSNLEN@,$GNULIB_MBSNLEN,;t t
22080s,@GNULIB_MBSCHR@,$GNULIB_MBSCHR,;t t
22081s,@GNULIB_MBSRCHR@,$GNULIB_MBSRCHR,;t t
22082s,@GNULIB_MBSSTR@,$GNULIB_MBSSTR,;t t
22083s,@GNULIB_MBSCASECMP@,$GNULIB_MBSCASECMP,;t t
22084s,@GNULIB_MBSNCASECMP@,$GNULIB_MBSNCASECMP,;t t
22085s,@GNULIB_MBSPCASECMP@,$GNULIB_MBSPCASECMP,;t t
22086s,@GNULIB_MBSCASESTR@,$GNULIB_MBSCASESTR,;t t
22087s,@GNULIB_MBSCSPN@,$GNULIB_MBSCSPN,;t t
22088s,@GNULIB_MBSPBRK@,$GNULIB_MBSPBRK,;t t
22089s,@GNULIB_MBSSPN@,$GNULIB_MBSSPN,;t t
22090s,@GNULIB_MBSSEP@,$GNULIB_MBSSEP,;t t
22091s,@GNULIB_MBSTOK_R@,$GNULIB_MBSTOK_R,;t t
22092s,@GNULIB_STRERROR@,$GNULIB_STRERROR,;t t
22093s,@GNULIB_STRSIGNAL@,$GNULIB_STRSIGNAL,;t t
22094s,@HAVE_DECL_MEMMEM@,$HAVE_DECL_MEMMEM,;t t
22095s,@HAVE_MEMPCPY@,$HAVE_MEMPCPY,;t t
22096s,@HAVE_DECL_MEMRCHR@,$HAVE_DECL_MEMRCHR,;t t
22097s,@HAVE_STPCPY@,$HAVE_STPCPY,;t t
22098s,@HAVE_STPNCPY@,$HAVE_STPNCPY,;t t
22099s,@HAVE_STRCHRNUL@,$HAVE_STRCHRNUL,;t t
22100s,@HAVE_DECL_STRDUP@,$HAVE_DECL_STRDUP,;t t
22101s,@HAVE_STRNDUP@,$HAVE_STRNDUP,;t t
22102s,@HAVE_DECL_STRNDUP@,$HAVE_DECL_STRNDUP,;t t
22103s,@HAVE_DECL_STRNLEN@,$HAVE_DECL_STRNLEN,;t t
22104s,@HAVE_STRPBRK@,$HAVE_STRPBRK,;t t
22105s,@HAVE_STRSEP@,$HAVE_STRSEP,;t t
22106s,@HAVE_STRCASESTR@,$HAVE_STRCASESTR,;t t
22107s,@HAVE_DECL_STRTOK_R@,$HAVE_DECL_STRTOK_R,;t t
22108s,@HAVE_DECL_STRERROR@,$HAVE_DECL_STRERROR,;t t
22109s,@HAVE_DECL_STRSIGNAL@,$HAVE_DECL_STRSIGNAL,;t t
22110s,@REPLACE_STRERROR@,$REPLACE_STRERROR,;t t
22111s,@REPLACE_STRSIGNAL@,$REPLACE_STRSIGNAL,;t t
22112s,@REPLACE_MEMMEM@,$REPLACE_MEMMEM,;t t
22113s,@REPLACE_STRCASESTR@,$REPLACE_STRCASESTR,;t t
22114s,@REPLACE_STRSTR@,$REPLACE_STRSTR,;t t
22115s,@HAVE_LONG_LONG_INT@,$HAVE_LONG_LONG_INT,;t t
22116s,@HAVE_UNSIGNED_LONG_LONG_INT@,$HAVE_UNSIGNED_LONG_LONG_INT,;t t
22117s,@HAVE_INTTYPES_H@,$HAVE_INTTYPES_H,;t t
22118s,@HAVE_SYS_TYPES_H@,$HAVE_SYS_TYPES_H,;t t
22119s,@INCLUDE_NEXT@,$INCLUDE_NEXT,;t t
22120s,@NEXT_STDINT_H@,$NEXT_STDINT_H,;t t
22121s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22122s,@HAVE_SYS_INTTYPES_H@,$HAVE_SYS_INTTYPES_H,;t t
22123s,@HAVE_SYS_BITYPES_H@,$HAVE_SYS_BITYPES_H,;t t
22124s,@BITSIZEOF_PTRDIFF_T@,$BITSIZEOF_PTRDIFF_T,;t t
22125s,@BITSIZEOF_SIG_ATOMIC_T@,$BITSIZEOF_SIG_ATOMIC_T,;t t
22126s,@BITSIZEOF_SIZE_T@,$BITSIZEOF_SIZE_T,;t t
22127s,@BITSIZEOF_WCHAR_T@,$BITSIZEOF_WCHAR_T,;t t
22128s,@BITSIZEOF_WINT_T@,$BITSIZEOF_WINT_T,;t t
22129s,@HAVE_SIGNED_SIG_ATOMIC_T@,$HAVE_SIGNED_SIG_ATOMIC_T,;t t
22130s,@HAVE_SIGNED_WCHAR_T@,$HAVE_SIGNED_WCHAR_T,;t t
22131s,@HAVE_SIGNED_WINT_T@,$HAVE_SIGNED_WINT_T,;t t
22132s,@PTRDIFF_T_SUFFIX@,$PTRDIFF_T_SUFFIX,;t t
22133s,@SIG_ATOMIC_T_SUFFIX@,$SIG_ATOMIC_T_SUFFIX,;t t
22134s,@SIZE_T_SUFFIX@,$SIZE_T_SUFFIX,;t t
22135s,@WCHAR_T_SUFFIX@,$WCHAR_T_SUFFIX,;t t
22136s,@WINT_T_SUFFIX@,$WINT_T_SUFFIX,;t t
22137s,@STDINT_H@,$STDINT_H,;t t
22138s,@NEXT_STRING_H@,$NEXT_STRING_H,;t t
22139s,@GNULIB_WCWIDTH@,$GNULIB_WCWIDTH,;t t
22140s,@HAVE_DECL_WCWIDTH@,$HAVE_DECL_WCWIDTH,;t t
22141s,@REPLACE_WCWIDTH@,$REPLACE_WCWIDTH,;t t
22142s,@WCHAR_H@,$WCHAR_H,;t t
22143s,@HAVE_WCHAR_H@,$HAVE_WCHAR_H,;t t
22144s,@NEXT_WCHAR_H@,$NEXT_WCHAR_H,;t t
22145s,@LIBGNU_LIBDEPS@,$LIBGNU_LIBDEPS,;t t
22146s,@LIBGNU_LTLIBDEPS@,$LIBGNU_LTLIBDEPS,;t t
d5af19ba 22147s,@GNULIB_STDINT_H@,$GNULIB_STDINT_H,;t t
b4e70030 22148s,@PACKAGE@,$PACKAGE,;t t
b4e70030
JB
22149s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22150s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22151s,@INSTALL_DATA@,$INSTALL_DATA,;t t
e28b3332 22152s,@CYGPATH_W@,$CYGPATH_W,;t t
d57a3c85 22153s,@PYTHON2_4@,$PYTHON2_4,;t t
e28b3332
DJ
22154s,@ACLOCAL@,$ACLOCAL,;t t
22155s,@AUTOCONF@,$AUTOCONF,;t t
22156s,@AUTOMAKE@,$AUTOMAKE,;t t
22157s,@AUTOHEADER@,$AUTOHEADER,;t t
22158s,@MAKEINFO@,$MAKEINFO,;t t
22159s,@install_sh@,$install_sh,;t t
22160s,@STRIP@,$STRIP,;t t
22161s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
22162s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
22163s,@mkdir_p@,$mkdir_p,;t t
22164s,@AWK@,$AWK,;t t
e28b3332
DJ
22165s,@AMTAR@,$AMTAR,;t t
22166s,@am__tar@,$am__tar,;t t
22167s,@am__untar@,$am__untar,;t t
e28b3332
DJ
22168s,@am__include@,$am__include,;t t
22169s,@am__quote@,$am__quote,;t t
22170s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
22171s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
22172s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
e28b3332
DJ
22173s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
22174s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
b14b1491
TT
22175s,@DEBUGDIR@,$DEBUGDIR,;t t
22176s,@GDB_DATADIR@,$GDB_DATADIR,;t t
e28b3332
DJ
22177s,@subdirs@,$subdirs,;t t
22178s,@TARGET_OBS@,$TARGET_OBS,;t t
c16158bc
JM
22179s,@PKGVERSION@,$PKGVERSION,;t t
22180s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
22181s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
b4e70030
JB
22182s,@LN_S@,$LN_S,;t t
22183s,@YACC@,$YACC,;t t
22184s,@AR@,$AR,;t t
22185s,@ac_ct_AR@,$ac_ct_AR,;t t
22186s,@DLLTOOL@,$DLLTOOL,;t t
22187s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
22188s,@WINDRES@,$WINDRES,;t t
22189s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t
22190s,@MIG@,$MIG,;t t
22191s,@ac_ct_MIG@,$ac_ct_MIG,;t t
6a30b0a5
AS
22192s,@READLINE@,$READLINE,;t t
22193s,@READLINE_DEPS@,$READLINE_DEPS,;t t
22194s,@READLINE_CFLAGS@,$READLINE_CFLAGS,;t t
3841debe
DJ
22195s,@HAVE_LIBEXPAT@,$HAVE_LIBEXPAT,;t t
22196s,@LIBEXPAT@,$LIBEXPAT,;t t
22197s,@LTLIBEXPAT@,$LTLIBEXPAT,;t t
d57a3c85 22198s,@PYTHON_CFLAGS@,$PYTHON_CFLAGS,;t t
20e95c23 22199s,@ALLOCA@,$ALLOCA,;t t
b4e70030
JB
22200s,@CONFIG_LDFLAGS@,$CONFIG_LDFLAGS,;t t
22201s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
22202s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
b14b1491 22203s,@SYSTEM_GDBINIT@,$SYSTEM_GDBINIT,;t t
b4e70030
JB
22204s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
22205s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t
22206s,@SER_HARDWIRE@,$SER_HARDWIRE,;t t
22207s,@WIN32LIBS@,$WIN32LIBS,;t t
22208s,@LIBGUI@,$LIBGUI,;t t
22209s,@GUI_CFLAGS_X@,$GUI_CFLAGS_X,;t t
22210s,@WIN32LDAPP@,$WIN32LDAPP,;t t
22211s,@TCL_VERSION@,$TCL_VERSION,;t t
5062cc19
KS
22212s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
22213s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
22214s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
22215s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
22216s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
b4e70030 22217s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
5062cc19
KS
22218s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
22219s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
22220s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
22221s,@TCL_INCLUDE@,$TCL_INCLUDE,;t t
22222s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
22223s,@TCL_DEPS@,$TCL_DEPS,;t t
b4e70030 22224s,@TK_VERSION@,$TK_VERSION,;t t
5062cc19
KS
22225s,@TK_BIN_DIR@,$TK_BIN_DIR,;t t
22226s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t
22227s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
22228s,@TK_LIB_FLAG@,$TK_LIB_FLAG,;t t
b4e70030 22229s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
5062cc19
KS
22230s,@TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t
22231s,@TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t
22232s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t
22233s,@TK_INCLUDE@,$TK_INCLUDE,;t t
22234s,@TK_LIBRARY@,$TK_LIBRARY,;t t
22235s,@TK_DEPS@,$TK_DEPS,;t t
22236s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t
b4e70030
JB
22237s,@X_CFLAGS@,$X_CFLAGS,;t t
22238s,@X_LDFLAGS@,$X_LDFLAGS,;t t
22239s,@X_LIBS@,$X_LIBS,;t t
b4e70030
JB
22240s,@GDBTKLIBS@,$GDBTKLIBS,;t t
22241s,@GDBTK_CFLAGS@,$GDBTK_CFLAGS,;t t
22242s,@GDBTK_SRC_DIR@,$GDBTK_SRC_DIR,;t t
9b624dbe
UW
22243s,@SIM@,$SIM,;t t
22244s,@SIM_OBS@,$SIM_OBS,;t t
b4e70030
JB
22245s,@ENABLE_CFLAGS@,$ENABLE_CFLAGS,;t t
22246s,@PROFILE_CFLAGS@,$PROFILE_CFLAGS,;t t
22247s,@CONFIG_OBS@,$CONFIG_OBS,;t t
22248s,@CONFIG_DEPS@,$CONFIG_DEPS,;t t
22249s,@CONFIG_SRCS@,$CONFIG_SRCS,;t t
22250s,@CONFIG_ALL@,$CONFIG_ALL,;t t
22251s,@CONFIG_CLEAN@,$CONFIG_CLEAN,;t t
22252s,@CONFIG_INSTALL@,$CONFIG_INSTALL,;t t
22253s,@CONFIG_UNINSTALL@,$CONFIG_UNINSTALL,;t t
22254s,@target_subdir@,$target_subdir,;t t
22255s,@frags@,$frags,;t t
cfd53605 22256s,@GDB_NM_FILE@,$GDB_NM_FILE,;t t
89a34d1b
JM
22257s,@datarootdir@,$datarootdir,;t t
22258s,@docdir@,$docdir,;t t
22259s,@htmldir@,$htmldir,;t t
22260s,@pdfdir@,$pdfdir,;t t
b4e70030
JB
22261s,@LIBOBJS@,$LIBOBJS,;t t
22262s,@LTLIBOBJS@,$LTLIBOBJS,;t t
783e057b
DJ
22263s,@gl_LIBOBJS@,$gl_LIBOBJS,;t t
22264s,@gl_LTLIBOBJS@,$gl_LTLIBOBJS,;t t
22265s,@gltests_LIBOBJS@,$gltests_LIBOBJS,;t t
22266s,@gltests_LTLIBOBJS@,$gltests_LTLIBOBJS,;t t
b4e70030
JB
22267/@host_makefile_frag@/r $host_makefile_frag
22268s,@host_makefile_frag@,,;t t
b4e70030
JB
22269CEOF
22270
22271_ACEOF
22272
22273 cat >>$CONFIG_STATUS <<\_ACEOF
22274 # Split the substitutions into bite-sized pieces for seds with
22275 # small command number limits, like on Digital OSF/1 and HP-UX.
22276 ac_max_sed_lines=48
22277 ac_sed_frag=1 # Number of current file.
22278 ac_beg=1 # First line for current file.
22279 ac_end=$ac_max_sed_lines # Line after last line for current file.
22280 ac_more_lines=:
22281 ac_sed_cmds=
22282 while $ac_more_lines; do
22283 if test $ac_beg -gt 1; then
22284 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22285 else
22286 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
4e8d927d 22287 fi
b4e70030
JB
22288 if test ! -s $tmp/subs.frag; then
22289 ac_more_lines=false
22290 else
22291 # The purpose of the label and of the branching condition is to
22292 # speed up the sed processing (if there are no `@' at all, there
22293 # is no need to browse any of the substitutions).
22294 # These are the two extra sed commands mentioned above.
22295 (echo ':t
22296 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22297 if test -z "$ac_sed_cmds"; then
22298 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22299 else
22300 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22301 fi
22302 ac_sed_frag=`expr $ac_sed_frag + 1`
22303 ac_beg=$ac_end
22304 ac_end=`expr $ac_end + $ac_max_sed_lines`
22305 fi
22306 done
22307 if test -z "$ac_sed_cmds"; then
22308 ac_sed_cmds=cat
22309 fi
22310fi # test -n "$CONFIG_FILES"
4e8d927d 22311
b4e70030
JB
22312_ACEOF
22313cat >>$CONFIG_STATUS <<\_ACEOF
22314for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22315 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22316 case $ac_file in
22317 - | *:- | *:-:* ) # input from stdin
22318 cat >$tmp/stdin
22319 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22320 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22321 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22322 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22323 * ) ac_file_in=$ac_file.in ;;
c906108c
SS
22324 esac
22325
b4e70030
JB
22326 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22327 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
bec39cab
AC
22328$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22329 X"$ac_file" : 'X\(//\)[^/]' \| \
22330 X"$ac_file" : 'X\(//\)$' \| \
b4e70030
JB
22331 X"$ac_file" : 'X\(/\)' \| \
22332 . : '\(.\)' 2>/dev/null ||
bec39cab 22333echo X"$ac_file" |
b4e70030
JB
22334 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22335 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22336 /^X\(\/\/\)$/{ s//\1/; q; }
22337 /^X\(\/\).*/{ s//\1/; q; }
22338 s/.*/./; q'`
22339 { if $as_mkdir_p; then
22340 mkdir -p "$ac_dir"
22341 else
22342 as_dir="$ac_dir"
bec39cab 22343 as_dirs=
b4e70030
JB
22344 while test ! -d "$as_dir"; do
22345 as_dirs="$as_dir $as_dirs"
22346 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
22347$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22348 X"$as_dir" : 'X\(//\)[^/]' \| \
22349 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
22350 X"$as_dir" : 'X\(/\)' \| \
22351 . : '\(.\)' 2>/dev/null ||
bec39cab 22352echo X"$as_dir" |
b4e70030
JB
22353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22354 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22355 /^X\(\/\/\)$/{ s//\1/; q; }
22356 /^X\(\/\).*/{ s//\1/; q; }
22357 s/.*/./; q'`
bec39cab 22358 done
b4e70030
JB
22359 test ! -n "$as_dirs" || mkdir $as_dirs
22360 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22361echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 22362 { (exit 1); exit 1; }; }; }
b4e70030 22363
bec39cab
AC
22364 ac_builddir=.
22365
b4e70030 22366if test "$ac_dir" != .; then
bec39cab 22367 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
22368 # A "../" for each directory in $ac_dir_suffix.
22369 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22370else
22371 ac_dir_suffix= ac_top_builddir=
22372fi
bec39cab
AC
22373
22374case $srcdir in
b4e70030 22375 .) # No --srcdir option. We are building in place.
bec39cab 22376 ac_srcdir=.
b4e70030
JB
22377 if test -z "$ac_top_builddir"; then
22378 ac_top_srcdir=.
22379 else
22380 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22381 fi ;;
22382 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 22383 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
22384 ac_top_srcdir=$srcdir ;;
22385 *) # Relative path.
22386 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22387 ac_top_srcdir=$ac_top_builddir$srcdir ;;
bec39cab
AC
22388esac
22389
b4e70030
JB
22390# Do not use `cd foo && pwd` to compute absolute paths, because
22391# the directories may not exist.
22392case `pwd` in
22393.) ac_abs_builddir="$ac_dir";;
22394*)
22395 case "$ac_dir" in
22396 .) ac_abs_builddir=`pwd`;;
22397 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22398 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22399 esac;;
22400esac
22401case $ac_abs_builddir in
22402.) ac_abs_top_builddir=${ac_top_builddir}.;;
22403*)
22404 case ${ac_top_builddir}. in
22405 .) ac_abs_top_builddir=$ac_abs_builddir;;
22406 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22407 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22408 esac;;
22409esac
22410case $ac_abs_builddir in
22411.) ac_abs_srcdir=$ac_srcdir;;
22412*)
22413 case $ac_srcdir in
22414 .) ac_abs_srcdir=$ac_abs_builddir;;
22415 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22416 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22417 esac;;
22418esac
22419case $ac_abs_builddir in
22420.) ac_abs_top_srcdir=$ac_top_srcdir;;
22421*)
22422 case $ac_top_srcdir in
22423 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22424 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22425 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22426 esac;;
22427esac
c906108c 22428
c906108c 22429
bec39cab
AC
22430 case $INSTALL in
22431 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
b4e70030 22432 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
c906108c 22433 esac
121ce6e5 22434
b4e70030
JB
22435 if test x"$ac_file" != x-; then
22436 { echo "$as_me:$LINENO: creating $ac_file" >&5
22437echo "$as_me: creating $ac_file" >&6;}
22438 rm -f "$ac_file"
22439 fi
22440 # Let's still pretend it is `configure' which instantiates (i.e., don't
22441 # use $as_me), people would be surprised to read:
22442 # /* config.h. Generated by config.status. */
22443 if test x"$ac_file" = x-; then
22444 configure_input=
22445 else
22446 configure_input="$ac_file. "
22447 fi
22448 configure_input=$configure_input"Generated from `echo $ac_file_in |
22449 sed 's,.*/,,'` by configure."
22450
22451 # First look for the input files in the build tree, otherwise in the
22452 # src tree.
22453 ac_file_inputs=`IFS=:
22454 for f in $ac_file_in; do
22455 case $f in
22456 -) echo $tmp/stdin ;;
22457 [\\/$]*)
22458 # Absolute (can't be DOS-style, as IFS=:)
22459 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22460echo "$as_me: error: cannot find input file: $f" >&2;}
22461 { (exit 1); exit 1; }; }
22462 echo "$f";;
22463 *) # Relative
22464 if test -f "$f"; then
22465 # Build tree
22466 echo "$f"
22467 elif test -f "$srcdir/$f"; then
22468 # Source tree
22469 echo "$srcdir/$f"
22470 else
22471 # /dev/null tree
22472 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22473echo "$as_me: error: cannot find input file: $f" >&2;}
22474 { (exit 1); exit 1; }; }
22475 fi;;
22476 esac
22477 done` || { (exit 1); exit 1; }
4e8d927d 22478_ACEOF
bec39cab
AC
22479cat >>$CONFIG_STATUS <<_ACEOF
22480 sed "$ac_vpsub
22481$extrasub
22482_ACEOF
22483cat >>$CONFIG_STATUS <<\_ACEOF
22484:t
22485/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b4e70030
JB
22486s,@configure_input@,$configure_input,;t t
22487s,@srcdir@,$ac_srcdir,;t t
22488s,@abs_srcdir@,$ac_abs_srcdir,;t t
22489s,@top_srcdir@,$ac_top_srcdir,;t t
22490s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22491s,@builddir@,$ac_builddir,;t t
22492s,@abs_builddir@,$ac_abs_builddir,;t t
22493s,@top_builddir@,$ac_top_builddir,;t t
22494s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22495s,@INSTALL@,$ac_INSTALL,;t t
22496" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22497 rm -f $tmp/stdin
22498 if test x"$ac_file" != x-; then
22499 mv $tmp/out $ac_file
22500 else
22501 cat $tmp/out
22502 rm -f $tmp/out
22503 fi
22504
22505done
22506_ACEOF
22507cat >>$CONFIG_STATUS <<\_ACEOF
22508
22509#
22510# CONFIG_HEADER section.
22511#
22512
22513# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22514# NAME is the cpp macro being defined and VALUE is the value it is being given.
22515#
22516# ac_d sets the value in "#define NAME VALUE" lines.
22517ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22518ac_dB='[ ].*$,\1#\2'
22519ac_dC=' '
22520ac_dD=',;t'
22521# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22522ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
22523ac_uB='$,\1#\2define\3'
22524ac_uC=' '
22525ac_uD=',;t'
22526
22527for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22528 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
bec39cab 22529 case $ac_file in
b4e70030
JB
22530 - | *:- | *:-:* ) # input from stdin
22531 cat >$tmp/stdin
22532 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22533 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22534 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22535 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22536 * ) ac_file_in=$ac_file.in ;;
c906108c 22537 esac
b4e70030
JB
22538
22539 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22540echo "$as_me: creating $ac_file" >&6;}
22541
22542 # First look for the input files in the build tree, otherwise in the
22543 # src tree.
22544 ac_file_inputs=`IFS=:
22545 for f in $ac_file_in; do
22546 case $f in
22547 -) echo $tmp/stdin ;;
22548 [\\/$]*)
22549 # Absolute (can't be DOS-style, as IFS=:)
22550 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22551echo "$as_me: error: cannot find input file: $f" >&2;}
22552 { (exit 1); exit 1; }; }
22553 # Do quote $f, to prevent DOS paths from being IFS'd.
22554 echo "$f";;
22555 *) # Relative
22556 if test -f "$f"; then
22557 # Build tree
22558 echo "$f"
22559 elif test -f "$srcdir/$f"; then
22560 # Source tree
22561 echo "$srcdir/$f"
22562 else
22563 # /dev/null tree
22564 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22565echo "$as_me: error: cannot find input file: $f" >&2;}
22566 { (exit 1); exit 1; }; }
22567 fi;;
22568 esac
22569 done` || { (exit 1); exit 1; }
22570 # Remove the trailing spaces.
22571 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
22572
22573_ACEOF
22574
22575# Transform confdefs.h into two sed scripts, `conftest.defines' and
22576# `conftest.undefs', that substitutes the proper values into
22577# config.h.in to produce config.h. The first handles `#define'
22578# templates, and the second `#undef' templates.
22579# And first: Protect against being on the right side of a sed subst in
22580# config.status. Protect against being in an unquoted here document
22581# in config.status.
22582rm -f conftest.defines conftest.undefs
22583# Using a here document instead of a string reduces the quoting nightmare.
22584# Putting comments in sed scripts is not portable.
22585#
22586# `end' is used to avoid that the second main sed command (meant for
22587# 0-ary CPP macros) applies to n-ary macro definitions.
22588# See the Autoconf documentation for `clear'.
22589cat >confdef2sed.sed <<\_ACEOF
22590s/[\\&,]/\\&/g
22591s,[\\$`],\\&,g
22592t clear
22593: clear
22594s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
22595t end
22596s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
22597: end
22598_ACEOF
22599# If some macros were called several times there might be several times
22600# the same #defines, which is useless. Nevertheless, we may not want to
22601# sort them, since we want the *last* AC-DEFINE to be honored.
22602uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22603sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22604rm -f confdef2sed.sed
22605
22606# This sed command replaces #undef with comments. This is necessary, for
c906108c
SS
22607# example, in the case of _POSIX_SOURCE, which is predefined and required
22608# on some systems where configure will not decide to define it.
b4e70030
JB
22609cat >>conftest.undefs <<\_ACEOF
22610s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
22611_ACEOF
22612
22613# Break up conftest.defines because some shells have a limit on the size
22614# of here documents, and old seds have small limits too (100 cmds).
22615echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
22616echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
22617echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22618echo ' :' >>$CONFIG_STATUS
22619rm -f conftest.tail
22620while grep . conftest.defines >/dev/null
bec39cab 22621do
b4e70030
JB
22622 # Write a limited-size here document to $tmp/defines.sed.
22623 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22624 # Speed up: don't consider the non `#define' lines.
22625 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
22626 # Work around the forget-to-reset-the-flag bug.
22627 echo 't clr' >>$CONFIG_STATUS
22628 echo ': clr' >>$CONFIG_STATUS
22629 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
bec39cab 22630 echo 'CEOF
b4e70030
JB
22631 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22632 rm -f $tmp/in
22633 mv $tmp/out $tmp/in
22634' >>$CONFIG_STATUS
22635 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
bec39cab
AC
22636 rm -f conftest.defines
22637 mv conftest.tail conftest.defines
22638done
b4e70030
JB
22639rm -f conftest.defines
22640echo ' fi # grep' >>$CONFIG_STATUS
22641echo >>$CONFIG_STATUS
22642
22643# Break up conftest.undefs because some shells have a limit on the size
22644# of here documents, and old seds have small limits too (100 cmds).
22645echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22646rm -f conftest.tail
22647while grep . conftest.undefs >/dev/null
22648do
22649 # Write a limited-size here document to $tmp/undefs.sed.
22650 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22651 # Speed up: don't consider the non `#undef'
22652 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
22653 # Work around the forget-to-reset-the-flag bug.
22654 echo 't clr' >>$CONFIG_STATUS
22655 echo ': clr' >>$CONFIG_STATUS
22656 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22657 echo 'CEOF
22658 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22659 rm -f $tmp/in
22660 mv $tmp/out $tmp/in
22661' >>$CONFIG_STATUS
22662 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22663 rm -f conftest.undefs
22664 mv conftest.tail conftest.undefs
22665done
22666rm -f conftest.undefs
bec39cab
AC
22667
22668cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030
JB
22669 # Let's still pretend it is `configure' which instantiates (i.e., don't
22670 # use $as_me), people would be surprised to read:
22671 # /* config.h. Generated by config.status. */
22672 if test x"$ac_file" = x-; then
22673 echo "/* Generated by configure. */" >$tmp/config.h
22674 else
22675 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
22676 fi
22677 cat $tmp/in >>$tmp/config.h
22678 rm -f $tmp/in
bec39cab 22679 if test x"$ac_file" != x-; then
b4e70030 22680 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
bec39cab
AC
22681 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22682echo "$as_me: $ac_file is unchanged" >&6;}
22683 else
b4e70030
JB
22684 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22685$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22686 X"$ac_file" : 'X\(//\)[^/]' \| \
22687 X"$ac_file" : 'X\(//\)$' \| \
22688 X"$ac_file" : 'X\(/\)' \| \
22689 . : '\(.\)' 2>/dev/null ||
22690echo X"$ac_file" |
22691 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22692 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22693 /^X\(\/\/\)$/{ s//\1/; q; }
22694 /^X\(\/\).*/{ s//\1/; q; }
22695 s/.*/./; q'`
22696 { if $as_mkdir_p; then
22697 mkdir -p "$ac_dir"
22698 else
22699 as_dir="$ac_dir"
22700 as_dirs=
22701 while test ! -d "$as_dir"; do
22702 as_dirs="$as_dir $as_dirs"
22703 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22704$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22705 X"$as_dir" : 'X\(//\)[^/]' \| \
22706 X"$as_dir" : 'X\(//\)$' \| \
22707 X"$as_dir" : 'X\(/\)' \| \
22708 . : '\(.\)' 2>/dev/null ||
22709echo X"$as_dir" |
22710 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22711 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22712 /^X\(\/\/\)$/{ s//\1/; q; }
22713 /^X\(\/\).*/{ s//\1/; q; }
22714 s/.*/./; q'`
22715 done
22716 test ! -n "$as_dirs" || mkdir $as_dirs
22717 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22718echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22719 { (exit 1); exit 1; }; }; }
22720
bec39cab 22721 rm -f $ac_file
b4e70030 22722 mv $tmp/config.h $ac_file
bec39cab
AC
22723 fi
22724 else
b4e70030
JB
22725 cat $tmp/config.h
22726 rm -f $tmp/config.h
bec39cab 22727 fi
e28b3332
DJ
22728# Compute $ac_file's index in $config_headers.
22729_am_stamp_count=1
22730for _am_header in $config_headers :; do
22731 case $_am_header in
22732 $ac_file | $ac_file:* )
22733 break ;;
22734 * )
22735 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
22736 esac
22737done
22738echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
22739$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22740 X$ac_file : 'X\(//\)[^/]' \| \
22741 X$ac_file : 'X\(//\)$' \| \
22742 X$ac_file : 'X\(/\)' \| \
22743 . : '\(.\)' 2>/dev/null ||
22744echo X$ac_file |
22745 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22746 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22747 /^X\(\/\/\)$/{ s//\1/; q; }
22748 /^X\(\/\).*/{ s//\1/; q; }
22749 s/.*/./; q'`/stamp-h$_am_stamp_count
b4e70030
JB
22750done
22751_ACEOF
22752cat >>$CONFIG_STATUS <<\_ACEOF
22753
22754#
22755# CONFIG_LINKS section.
22756#
22757
22758for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
22759 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22760 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c906108c 22761
b4e70030
JB
22762 { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
22763echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
c906108c
SS
22764
22765 if test ! -r $srcdir/$ac_source; then
bec39cab
AC
22766 { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
22767echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
22768 { (exit 1); exit 1; }; }
c906108c 22769 fi
b4e70030
JB
22770 rm -f $ac_dest
22771
22772 # Make relative symlinks.
22773 ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
22774$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22775 X"$ac_dest" : 'X\(//\)[^/]' \| \
22776 X"$ac_dest" : 'X\(//\)$' \| \
22777 X"$ac_dest" : 'X\(/\)' \| \
22778 . : '\(.\)' 2>/dev/null ||
22779echo X"$ac_dest" |
22780 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22781 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22782 /^X\(\/\/\)$/{ s//\1/; q; }
22783 /^X\(\/\).*/{ s//\1/; q; }
22784 s/.*/./; q'`
22785 { if $as_mkdir_p; then
22786 mkdir -p "$ac_dest_dir"
22787 else
22788 as_dir="$ac_dest_dir"
22789 as_dirs=
22790 while test ! -d "$as_dir"; do
22791 as_dirs="$as_dir $as_dirs"
22792 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22793$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22794 X"$as_dir" : 'X\(//\)[^/]' \| \
22795 X"$as_dir" : 'X\(//\)$' \| \
22796 X"$as_dir" : 'X\(/\)' \| \
22797 . : '\(.\)' 2>/dev/null ||
22798echo X"$as_dir" |
22799 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22800 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22801 /^X\(\/\/\)$/{ s//\1/; q; }
22802 /^X\(\/\).*/{ s//\1/; q; }
22803 s/.*/./; q'`
22804 done
22805 test ! -n "$as_dirs" || mkdir $as_dirs
22806 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
22807echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
22808 { (exit 1); exit 1; }; }; }
22809
22810 ac_builddir=.
22811
22812if test "$ac_dest_dir" != .; then
22813 ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
22814 # A "../" for each directory in $ac_dir_suffix.
22815 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22816else
22817 ac_dir_suffix= ac_top_builddir=
22818fi
22819
22820case $srcdir in
22821 .) # No --srcdir option. We are building in place.
22822 ac_srcdir=.
22823 if test -z "$ac_top_builddir"; then
22824 ac_top_srcdir=.
22825 else
22826 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22827 fi ;;
22828 [\\/]* | ?:[\\/]* ) # Absolute path.
22829 ac_srcdir=$srcdir$ac_dir_suffix;
22830 ac_top_srcdir=$srcdir ;;
22831 *) # Relative path.
22832 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22833 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22834esac
22835
22836# Do not use `cd foo && pwd` to compute absolute paths, because
22837# the directories may not exist.
22838case `pwd` in
22839.) ac_abs_builddir="$ac_dest_dir";;
22840*)
22841 case "$ac_dest_dir" in
22842 .) ac_abs_builddir=`pwd`;;
22843 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
22844 *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
22845 esac;;
22846esac
22847case $ac_abs_builddir in
22848.) ac_abs_top_builddir=${ac_top_builddir}.;;
22849*)
22850 case ${ac_top_builddir}. in
22851 .) ac_abs_top_builddir=$ac_abs_builddir;;
22852 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22853 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22854 esac;;
22855esac
22856case $ac_abs_builddir in
22857.) ac_abs_srcdir=$ac_srcdir;;
22858*)
22859 case $ac_srcdir in
22860 .) ac_abs_srcdir=$ac_abs_builddir;;
22861 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22862 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22863 esac;;
22864esac
22865case $ac_abs_builddir in
22866.) ac_abs_top_srcdir=$ac_top_srcdir;;
22867*)
22868 case $ac_top_srcdir in
22869 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22870 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22871 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22872 esac;;
22873esac
22874
bec39cab
AC
22875
22876 case $srcdir in
22877 [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
b4e70030 22878 *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
c906108c 22879 esac
b4e70030
JB
22880
22881 # Try a symlink, then a hard link, then a copy.
22882 ln -s $ac_rel_source $ac_dest 2>/dev/null ||
22883 ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
22884 cp -p $srcdir/$ac_source $ac_dest ||
22885 { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
22886echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
bec39cab 22887 { (exit 1); exit 1; }; }
b4e70030
JB
22888done
22889_ACEOF
22890cat >>$CONFIG_STATUS <<\_ACEOF
22891
22892#
22893# CONFIG_COMMANDS section.
22894#
22895for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22896 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22897 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22898 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
22899$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22900 X"$ac_dest" : 'X\(//\)[^/]' \| \
22901 X"$ac_dest" : 'X\(//\)$' \| \
22902 X"$ac_dest" : 'X\(/\)' \| \
22903 . : '\(.\)' 2>/dev/null ||
22904echo X"$ac_dest" |
22905 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22906 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22907 /^X\(\/\/\)$/{ s//\1/; q; }
22908 /^X\(\/\).*/{ s//\1/; q; }
22909 s/.*/./; q'`
22910 { if $as_mkdir_p; then
22911 mkdir -p "$ac_dir"
22912 else
22913 as_dir="$ac_dir"
22914 as_dirs=
22915 while test ! -d "$as_dir"; do
22916 as_dirs="$as_dir $as_dirs"
22917 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22918$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22919 X"$as_dir" : 'X\(//\)[^/]' \| \
22920 X"$as_dir" : 'X\(//\)$' \| \
22921 X"$as_dir" : 'X\(/\)' \| \
22922 . : '\(.\)' 2>/dev/null ||
22923echo X"$as_dir" |
22924 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22925 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22926 /^X\(\/\/\)$/{ s//\1/; q; }
22927 /^X\(\/\).*/{ s//\1/; q; }
22928 s/.*/./; q'`
22929 done
22930 test ! -n "$as_dirs" || mkdir $as_dirs
22931 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22932echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22933 { (exit 1); exit 1; }; }; }
22934
22935 ac_builddir=.
22936
22937if test "$ac_dir" != .; then
22938 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22939 # A "../" for each directory in $ac_dir_suffix.
22940 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22941else
22942 ac_dir_suffix= ac_top_builddir=
22943fi
22944
22945case $srcdir in
22946 .) # No --srcdir option. We are building in place.
22947 ac_srcdir=.
22948 if test -z "$ac_top_builddir"; then
22949 ac_top_srcdir=.
22950 else
22951 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22952 fi ;;
22953 [\\/]* | ?:[\\/]* ) # Absolute path.
22954 ac_srcdir=$srcdir$ac_dir_suffix;
22955 ac_top_srcdir=$srcdir ;;
22956 *) # Relative path.
22957 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22958 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22959esac
22960
22961# Do not use `cd foo && pwd` to compute absolute paths, because
22962# the directories may not exist.
22963case `pwd` in
22964.) ac_abs_builddir="$ac_dir";;
22965*)
22966 case "$ac_dir" in
22967 .) ac_abs_builddir=`pwd`;;
22968 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22969 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22970 esac;;
22971esac
22972case $ac_abs_builddir in
22973.) ac_abs_top_builddir=${ac_top_builddir}.;;
22974*)
22975 case ${ac_top_builddir}. in
22976 .) ac_abs_top_builddir=$ac_abs_builddir;;
22977 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22978 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22979 esac;;
22980esac
22981case $ac_abs_builddir in
22982.) ac_abs_srcdir=$ac_srcdir;;
22983*)
22984 case $ac_srcdir in
22985 .) ac_abs_srcdir=$ac_abs_builddir;;
22986 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22987 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22988 esac;;
22989esac
22990case $ac_abs_builddir in
22991.) ac_abs_top_srcdir=$ac_top_srcdir;;
22992*)
22993 case $ac_top_srcdir in
22994 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22995 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22996 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22997 esac;;
22998esac
bec39cab 22999
bec39cab 23000
b4e70030
JB
23001 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
23002echo "$as_me: executing $ac_dest commands" >&6;}
23003 case $ac_dest in
a417dc56 23004 depdir ) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
e28b3332
DJ
23005 depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
23006 # Strip MF so we end up with the name of the file.
23007 mf=`echo "$mf" | sed -e 's/:.*$//'`
23008 # Check whether this is an Automake generated Makefile or not.
23009 # We used to match only the files named `Makefile.in', but
23010 # some people rename them; so instead we look at the file content.
23011 # Grep'ing the first line is not enough: some people post-process
23012 # each Makefile.in and add a new line on top of each file to say so.
23013 # So let's grep whole file.
23014 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
23015 dirpart=`(dirname "$mf") 2>/dev/null ||
23016$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23017 X"$mf" : 'X\(//\)[^/]' \| \
23018 X"$mf" : 'X\(//\)$' \| \
23019 X"$mf" : 'X\(/\)' \| \
23020 . : '\(.\)' 2>/dev/null ||
23021echo X"$mf" |
23022 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23023 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23024 /^X\(\/\/\)$/{ s//\1/; q; }
23025 /^X\(\/\).*/{ s//\1/; q; }
23026 s/.*/./; q'`
23027 else
23028 continue
23029 fi
23030 # Extract the definition of DEPDIR, am__include, and am__quote
23031 # from the Makefile without running `make'.
23032 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
23033 test -z "$DEPDIR" && continue
23034 am__include=`sed -n 's/^am__include = //p' < "$mf"`
23035 test -z "am__include" && continue
23036 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
23037 # When using ansi2knr, U may be empty or an underscore; expand it
23038 U=`sed -n 's/^U = //p' < "$mf"`
23039 # Find all dependency output files, they are included files with
23040 # $(DEPDIR) in their names. We invoke sed twice because it is the
23041 # simplest approach to changing $(DEPDIR) to its actual value in the
23042 # expansion.
23043 for file in `sed -n "
23044 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
23045 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
23046 # Make sure the directory exists.
23047 test -f "$dirpart/$file" && continue
23048 fdir=`(dirname "$file") 2>/dev/null ||
23049$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23050 X"$file" : 'X\(//\)[^/]' \| \
23051 X"$file" : 'X\(//\)$' \| \
23052 X"$file" : 'X\(/\)' \| \
23053 . : '\(.\)' 2>/dev/null ||
23054echo X"$file" |
23055 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23056 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23057 /^X\(\/\/\)$/{ s//\1/; q; }
23058 /^X\(\/\).*/{ s//\1/; q; }
23059 s/.*/./; q'`
23060 { if $as_mkdir_p; then
23061 mkdir -p $dirpart/$fdir
23062 else
23063 as_dir=$dirpart/$fdir
23064 as_dirs=
23065 while test ! -d "$as_dir"; do
23066 as_dirs="$as_dir $as_dirs"
23067 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23068$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23069 X"$as_dir" : 'X\(//\)[^/]' \| \
23070 X"$as_dir" : 'X\(//\)$' \| \
23071 X"$as_dir" : 'X\(/\)' \| \
23072 . : '\(.\)' 2>/dev/null ||
23073echo X"$as_dir" |
23074 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23075 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23076 /^X\(\/\/\)$/{ s//\1/; q; }
23077 /^X\(\/\).*/{ s//\1/; q; }
23078 s/.*/./; q'`
23079 done
23080 test ! -n "$as_dirs" || mkdir $as_dirs
23081 fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
23082echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
23083 { (exit 1); exit 1; }; }; }
23084
23085 # echo "creating $dirpart/$file"
23086 echo '# dummy' > "$dirpart/$file"
23087 done
23088done
4e8d927d 23089 ;;
b4e70030 23090 default )
c906108c
SS
23091case x$CONFIG_HEADERS in
23092xconfig.h:config.in)
23093echo > stamp-h ;;
23094esac
bec39cab
AC
23095 ;;
23096 esac
b4e70030
JB
23097done
23098_ACEOF
c906108c 23099
b4e70030 23100cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
23101
23102{ (exit 0); exit 0; }
23103_ACEOF
c906108c 23104chmod +x $CONFIG_STATUS
bec39cab
AC
23105ac_clean_files=$ac_clean_files_save
23106
23107
23108# configure is writing to config.log, and then calls config.status.
23109# config.status does its own redirection, appending to config.log.
23110# Unfortunately, on DOS this fails, as config.log is still kept open
23111# by configure, so config.status won't be able to write to it; its
23112# output is simply discarded. So we exec the FD to /dev/null,
23113# effectively closing config.log, so it can be properly (re)opened and
23114# appended to by config.status. When coming back to configure, we
23115# need to make the FD available again.
23116if test "$no_create" != yes; then
23117 ac_cs_success=:
23118 ac_config_status_args=
23119 test "$silent" = yes &&
23120 ac_config_status_args="$ac_config_status_args --quiet"
23121 exec 5>/dev/null
23122 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23123 exec 5>>config.log
23124 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23125 # would make configure fail if this is the last instruction.
23126 $ac_cs_success || { (exit 1); exit 1; }
23127fi
c906108c 23128
bec39cab 23129#
fdc59709 23130# CONFIG_SUBDIRS section, as fixed in confsubdir.m4.
bec39cab 23131#
c906108c
SS
23132if test "$no_recursion" != yes; then
23133
23134 # Remove --cache-file and --srcdir arguments so they do not pile up.
23135 ac_sub_configure_args=
23136 ac_prev=
fdc59709
PB
23137 eval "set x $ac_configure_args"
23138 shift
23139 for ac_arg
23140 do
c906108c
SS
23141 if test -n "$ac_prev"; then
23142 ac_prev=
23143 continue
23144 fi
bec39cab 23145 case $ac_arg in
c906108c
SS
23146 -cache-file | --cache-file | --cache-fil | --cache-fi \
23147 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
23148 ac_prev=cache_file ;;
23149 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
23150 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
23151 | --c=*)
23152 ;;
23153 --config-cache | -C)
c906108c
SS
23154 ;;
23155 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
23156 ac_prev=srcdir ;;
23157 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
23158 ;;
bec39cab
AC
23159 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
23160 ac_prev=prefix ;;
23161 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
23162 ;;
fdc59709
PB
23163 *)
23164 case $ac_arg in
23165 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
23166 esac
23167 ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
c906108c
SS
23168 esac
23169 done
23170
bec39cab
AC
23171 # Always prepend --prefix to ensure using the same prefix
23172 # in subdir configurations.
fdc59709
PB
23173 ac_arg="--prefix=$prefix"
23174 case $ac_arg in
23175 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
23176 esac
23177 ac_sub_configure_args="$ac_arg $ac_sub_configure_args"
bec39cab 23178
b4e70030 23179 ac_popdir=`pwd`
bec39cab 23180 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
23181
23182 # Do not complain, so a configure script can configure whichever
23183 # parts of a large source tree are present.
fdc59709 23184 test -d "$srcdir/$ac_dir" || continue
c906108c 23185
b4e70030
JB
23186 { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
23187echo "$as_me: configuring in $ac_dir" >&6;}
23188 { if $as_mkdir_p; then
23189 mkdir -p "$ac_dir"
23190 else
23191 as_dir="$ac_dir"
bec39cab 23192 as_dirs=
b4e70030
JB
23193 while test ! -d "$as_dir"; do
23194 as_dirs="$as_dir $as_dirs"
23195 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
23196$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23197 X"$as_dir" : 'X\(//\)[^/]' \| \
23198 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
23199 X"$as_dir" : 'X\(/\)' \| \
23200 . : '\(.\)' 2>/dev/null ||
bec39cab 23201echo X"$as_dir" |
b4e70030
JB
23202 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23203 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23204 /^X\(\/\/\)$/{ s//\1/; q; }
23205 /^X\(\/\).*/{ s//\1/; q; }
23206 s/.*/./; q'`
bec39cab 23207 done
b4e70030
JB
23208 test ! -n "$as_dirs" || mkdir $as_dirs
23209 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23210echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 23211 { (exit 1); exit 1; }; }; }
b4e70030 23212
bec39cab
AC
23213 ac_builddir=.
23214
b4e70030 23215if test "$ac_dir" != .; then
bec39cab 23216 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
23217 # A "../" for each directory in $ac_dir_suffix.
23218 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23219else
23220 ac_dir_suffix= ac_top_builddir=
23221fi
bec39cab
AC
23222
23223case $srcdir in
b4e70030 23224 .) # No --srcdir option. We are building in place.
bec39cab 23225 ac_srcdir=.
b4e70030
JB
23226 if test -z "$ac_top_builddir"; then
23227 ac_top_srcdir=.
23228 else
23229 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23230 fi ;;
23231 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 23232 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
23233 ac_top_srcdir=$srcdir ;;
23234 *) # Relative path.
23235 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23236 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23237esac
23238
23239# Do not use `cd foo && pwd` to compute absolute paths, because
23240# the directories may not exist.
23241case `pwd` in
23242.) ac_abs_builddir="$ac_dir";;
23243*)
23244 case "$ac_dir" in
23245 .) ac_abs_builddir=`pwd`;;
23246 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23247 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23248 esac;;
23249esac
23250case $ac_abs_builddir in
23251.) ac_abs_top_builddir=${ac_top_builddir}.;;
23252*)
23253 case ${ac_top_builddir}. in
23254 .) ac_abs_top_builddir=$ac_abs_builddir;;
23255 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23256 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23257 esac;;
23258esac
23259case $ac_abs_builddir in
23260.) ac_abs_srcdir=$ac_srcdir;;
23261*)
23262 case $ac_srcdir in
23263 .) ac_abs_srcdir=$ac_abs_builddir;;
23264 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23265 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23266 esac;;
23267esac
23268case $ac_abs_builddir in
23269.) ac_abs_top_srcdir=$ac_top_srcdir;;
23270*)
23271 case $ac_top_srcdir in
23272 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23273 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23274 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23275 esac;;
bec39cab 23276esac
c906108c 23277
c906108c 23278
fdc59709 23279 cd "$ac_dir"
c906108c
SS
23280
23281 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
23282 if test -f "$ac_srcdir/configure.gnu"; then
23283 ac_sub_configure=$ac_srcdir/configure.gnu
23284 elif test -f "$ac_srcdir/configure"; then
23285 ac_sub_configure=$ac_srcdir/configure
23286 elif test -f "$ac_srcdir/configure.in"; then
23287 # This should be Cygnus configure.
23288 ac_sub_configure=$ac_aux_dir/configure
c906108c 23289 else
bec39cab
AC
23290 { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
23291echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
23292 ac_sub_configure=
23293 fi
23294
23295 # The recursion is here.
23296 if test -n "$ac_sub_configure"; then
c906108c 23297 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
23298 case $cache_file in
23299 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
b4e70030
JB
23300 *) # Relative path.
23301 ac_sub_cache_file=$ac_top_builddir$cache_file ;;
c906108c 23302 esac
c906108c 23303
fdc59709
PB
23304 { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
23305echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 23306 # The eval makes quoting arguments work.
fdc59709
PB
23307 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
23308 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
bec39cab
AC
23309 { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
23310echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
23311 { (exit 1); exit 1; }; }
c906108c
SS
23312 fi
23313
fdc59709 23314 cd "$ac_popdir"
c906108c
SS
23315 done
23316fi
23317
23318
23319exit 0
This page took 2.197613 seconds and 4 git commands to generate.