gdb
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
b4e70030 3# Generated by GNU Autoconf 2.59.
c906108c 4#
b4e70030 5# Copyright (C) 2003 Free Software Foundation, Inc.
c906108c
SS
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
bec39cab
AC
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
b4e70030
JB
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
bec39cab
AC
21fi
22DUALCASE=1; export DUALCASE # for MKS sh
23
24# Support unset when possible.
25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
b4e70030 33$as_unset ENV MAIL MAILPATH
bec39cab
AC
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45 eval $as_var=C; export $as_var
46 else
b4e70030 47 $as_unset $as_var
bec39cab
AC
48 fi
49done
50
51# Required to use basename.
b4e70030 52if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
53 as_expr=expr
54else
55 as_expr=false
56fi
57
b4e70030 58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
bec39cab
AC
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
b4e70030 66as_me=`$as_basename "$0" ||
bec39cab
AC
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
bec39cab 71echo X/"$0" |
b4e70030
JB
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
bec39cab 76
4e8d927d 77
b4e70030
JB
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 85
b4e70030
JB
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
96 rm -f conf$$.sh
4e8d927d
DJ
97fi
98
4e8d927d 99
b4e70030
JB
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
4e8d927d 116
b4e70030
JB
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
bec39cab 130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
b4e70030 131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab
AC
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
b4e70030
JB
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
bec39cab 137 /*)
b4e70030 138 if ("$as_dir/$as_base" -c '
4e8d927d
DJ
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
b4e70030 141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
4e8d927d 142 test "x$as_lineno_1" != "x$as_lineno_2" &&
b4e70030
JB
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
bec39cab
AC
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
b4e70030
JB
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
bec39cab 162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b4e70030
JB
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
bec39cab
AC
165 sed '
166 N
b4e70030
JB
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
bec39cab 170 t loop
b4e70030
JB
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
bec39cab 173 ' >$as_me.lineno &&
b4e70030 174 chmod +x $as_me.lineno ||
bec39cab
AC
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
b4e70030
JB
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
bec39cab
AC
182 # Exit status is that of the last command.
183 exit
184}
185
186
b4e70030
JB
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
bec39cab
AC
192esac
193
b4e70030 194if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030
JB
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
bec39cab 207 as_ln_s='cp -p'
b4e70030
JB
208 else
209 as_ln_s='ln -s'
210 fi
bec39cab
AC
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
b4e70030 216rm -f conf$$ conf$$.exe conf$$.file
bec39cab
AC
217
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
221 test -d ./-p && rmdir ./-p
222 as_mkdir_p=false
223fi
224
b4e70030 225as_executable_p="test -f"
bec39cab
AC
226
227# Sed expression to map a string onto a valid CPP name.
228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
229
230# Sed expression to map a string onto a valid variable name.
231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
232
233
b4e70030
JB
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
241$as_unset CDPATH
bec39cab 242
c906108c 243
bec39cab
AC
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
b4e70030
JB
249exec 6>&1
250
bec39cab
AC
251#
252# Initializations.
253#
c906108c 254ac_default_prefix=/usr/local
bec39cab
AC
255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
b4e70030
JB
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
bec39cab
AC
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="main.c"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
b4e70030
JB
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
bec39cab
AC
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
783e057b
DJ
312gl_header_list=
313ac_subdirs_all="$ac_subdirs_all doc testsuite"
b4e70030
JB
314ac_subdirs_all="$ac_subdirs_all gdbtk"
315ac_subdirs_all="$ac_subdirs_all multi-ice"
316ac_subdirs_all="$ac_subdirs_all gdbserver"
fc3b640d 317ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP RANLIB ac_ct_RANLIB build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os am__leading_dot DEPDIR CCDEPMODE MAKE GMAKE_TRUE GMAKE_FALSE SET_MAKE USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT localedir GL_COND_LIBTOOL_TRUE GL_COND_LIBTOOL_FALSE GNULIB_MEMMEM GNULIB_MEMPCPY GNULIB_MEMRCHR GNULIB_STPCPY GNULIB_STPNCPY GNULIB_STRCHRNUL GNULIB_STRDUP GNULIB_STRNDUP GNULIB_STRNLEN GNULIB_STRPBRK GNULIB_STRSEP GNULIB_STRSTR GNULIB_STRCASESTR GNULIB_STRTOK_R GNULIB_MBSLEN GNULIB_MBSNLEN GNULIB_MBSCHR GNULIB_MBSRCHR GNULIB_MBSSTR GNULIB_MBSCASECMP GNULIB_MBSNCASECMP GNULIB_MBSPCASECMP GNULIB_MBSCASESTR GNULIB_MBSCSPN GNULIB_MBSPBRK GNULIB_MBSSPN GNULIB_MBSSEP GNULIB_MBSTOK_R GNULIB_STRERROR GNULIB_STRSIGNAL HAVE_DECL_MEMMEM HAVE_MEMPCPY HAVE_DECL_MEMRCHR HAVE_STPCPY HAVE_STPNCPY HAVE_STRCHRNUL HAVE_DECL_STRDUP HAVE_STRNDUP HAVE_DECL_STRNDUP HAVE_DECL_STRNLEN HAVE_STRPBRK HAVE_STRSEP HAVE_STRCASESTR HAVE_DECL_STRTOK_R HAVE_DECL_STRERROR HAVE_DECL_STRSIGNAL REPLACE_STRERROR REPLACE_STRSIGNAL REPLACE_MEMMEM REPLACE_STRCASESTR REPLACE_STRSTR HAVE_LONG_LONG_INT HAVE_UNSIGNED_LONG_LONG_INT HAVE_INTTYPES_H HAVE_SYS_TYPES_H INCLUDE_NEXT NEXT_STDINT_H HAVE_STDINT_H HAVE_SYS_INTTYPES_H HAVE_SYS_BITYPES_H BITSIZEOF_PTRDIFF_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_WCHAR_T BITSIZEOF_WINT_T HAVE_SIGNED_SIG_ATOMIC_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_WINT_T PTRDIFF_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX WCHAR_T_SUFFIX WINT_T_SUFFIX STDINT_H NEXT_STRING_H GNULIB_WCWIDTH HAVE_DECL_WCWIDTH REPLACE_WCWIDTH WCHAR_H HAVE_WCHAR_H NEXT_WCHAR_H LIBGNU_LIBDEPS LIBGNU_LTLIBDEPS GNULIB_STDINT_H PACKAGE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK AMTAR am__tar am__untar am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH am__fastdepCC_TRUE am__fastdepCC_FALSE subdirs TARGET_OBS PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI LN_S YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG READLINE READLINE_DEPS READLINE_CFLAGS HAVE_LIBEXPAT LIBEXPAT LTLIBEXPAT PYTHON_CFLAGS ALLOCA CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDE TCL_LIBRARY TCL_DEPS TK_VERSION TK_BIN_DIR TK_SRC_DIR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_INCLUDE TK_LIBRARY TK_DEPS TK_XINCLUDES X_CFLAGS X_LDFLAGS X_LIBS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR SIM SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags nm_h LIBOBJS LTLIBOBJS gl_LIBOBJS gl_LTLIBOBJS gltests_LIBOBJS gltests_LTLIBOBJS'
a4ce5b0d 318ac_subst_files='host_makefile_frag'
d5af19ba 319ac_pwd=`pwd`
c906108c
SS
320
321# Initialize some variables set by options.
bec39cab
AC
322ac_init_help=
323ac_init_version=false
c906108c
SS
324# The variables have the same names as the options, with
325# dashes changed to underlines.
bec39cab 326cache_file=/dev/null
c906108c 327exec_prefix=NONE
c906108c 328no_create=
c906108c
SS
329no_recursion=
330prefix=NONE
331program_prefix=NONE
332program_suffix=NONE
333program_transform_name=s,x,x,
334silent=
335site=
336srcdir=
c906108c
SS
337verbose=
338x_includes=NONE
339x_libraries=NONE
bec39cab
AC
340
341# Installation directory options.
342# These are left unexpanded so users can "make install exec_prefix=/foo"
343# and all the variables that are supposed to be based on exec_prefix
344# by default will actually change.
345# Use braces instead of parens because sh, perl, etc. also accept them.
c906108c
SS
346bindir='${exec_prefix}/bin'
347sbindir='${exec_prefix}/sbin'
348libexecdir='${exec_prefix}/libexec'
b4e70030 349datadir='${prefix}/share'
c906108c
SS
350sysconfdir='${prefix}/etc'
351sharedstatedir='${prefix}/com'
352localstatedir='${prefix}/var'
b4e70030 353libdir='${exec_prefix}/lib'
c906108c
SS
354includedir='${prefix}/include'
355oldincludedir='/usr/include'
b4e70030
JB
356infodir='${prefix}/info'
357mandir='${prefix}/man'
c906108c 358
c906108c
SS
359ac_prev=
360for ac_option
361do
c906108c
SS
362 # If the previous option needs an argument, assign it.
363 if test -n "$ac_prev"; then
b4e70030 364 eval "$ac_prev=\$ac_option"
c906108c
SS
365 ac_prev=
366 continue
367 fi
368
b4e70030 369 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
c906108c
SS
370
371 # Accept the important Cygnus configure options, so we can diagnose typos.
372
b4e70030 373 case $ac_option in
c906108c
SS
374
375 -bindir | --bindir | --bindi | --bind | --bin | --bi)
376 ac_prev=bindir ;;
377 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 378 bindir=$ac_optarg ;;
c906108c
SS
379
380 -build | --build | --buil | --bui | --bu)
bec39cab 381 ac_prev=build_alias ;;
c906108c 382 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 383 build_alias=$ac_optarg ;;
c906108c
SS
384
385 -cache-file | --cache-file | --cache-fil | --cache-fi \
386 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
387 ac_prev=cache_file ;;
388 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
389 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
390 cache_file=$ac_optarg ;;
391
392 --config-cache | -C)
393 cache_file=config.cache ;;
c906108c 394
b4e70030 395 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
c906108c 396 ac_prev=datadir ;;
b4e70030
JB
397 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
398 | --da=*)
bec39cab 399 datadir=$ac_optarg ;;
c906108c
SS
400
401 -disable-* | --disable-*)
bec39cab 402 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 403 # Reject names that are not valid shell variable names.
bec39cab
AC
404 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
406 { (exit 1); exit 1; }; }
407 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
b4e70030 408 eval "enable_$ac_feature=no" ;;
c906108c
SS
409
410 -enable-* | --enable-*)
bec39cab 411 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 412 # Reject names that are not valid shell variable names.
bec39cab
AC
413 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
414 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
415 { (exit 1); exit 1; }; }
416 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
b4e70030
JB
417 case $ac_option in
418 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
419 *) ac_optarg=yes ;;
420 esac
421 eval "enable_$ac_feature='$ac_optarg'" ;;
c906108c
SS
422
423 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
424 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
425 | --exec | --exe | --ex)
426 ac_prev=exec_prefix ;;
427 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
428 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
429 | --exec=* | --exe=* | --ex=*)
bec39cab 430 exec_prefix=$ac_optarg ;;
c906108c
SS
431
432 -gas | --gas | --ga | --g)
433 # Obsolete; use --with-gas.
434 with_gas=yes ;;
435
bec39cab
AC
436 -help | --help | --hel | --he | -h)
437 ac_init_help=long ;;
438 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
439 ac_init_help=recursive ;;
440 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
441 ac_init_help=short ;;
c906108c
SS
442
443 -host | --host | --hos | --ho)
bec39cab 444 ac_prev=host_alias ;;
c906108c 445 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 446 host_alias=$ac_optarg ;;
c906108c
SS
447
448 -includedir | --includedir | --includedi | --included | --include \
449 | --includ | --inclu | --incl | --inc)
450 ac_prev=includedir ;;
451 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
452 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 453 includedir=$ac_optarg ;;
c906108c
SS
454
455 -infodir | --infodir | --infodi | --infod | --info | --inf)
456 ac_prev=infodir ;;
457 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 458 infodir=$ac_optarg ;;
c906108c
SS
459
460 -libdir | --libdir | --libdi | --libd)
461 ac_prev=libdir ;;
462 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 463 libdir=$ac_optarg ;;
c906108c
SS
464
465 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
466 | --libexe | --libex | --libe)
467 ac_prev=libexecdir ;;
468 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
469 | --libexe=* | --libex=* | --libe=*)
bec39cab 470 libexecdir=$ac_optarg ;;
c906108c
SS
471
472 -localstatedir | --localstatedir | --localstatedi | --localstated \
b4e70030
JB
473 | --localstate | --localstat | --localsta | --localst \
474 | --locals | --local | --loca | --loc | --lo)
c906108c
SS
475 ac_prev=localstatedir ;;
476 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
b4e70030
JB
477 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
478 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
bec39cab 479 localstatedir=$ac_optarg ;;
c906108c
SS
480
481 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
482 ac_prev=mandir ;;
483 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 484 mandir=$ac_optarg ;;
c906108c
SS
485
486 -nfp | --nfp | --nf)
487 # Obsolete; use --without-fp.
488 with_fp=no ;;
489
490 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 491 | --no-cr | --no-c | -n)
c906108c
SS
492 no_create=yes ;;
493
494 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
495 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
496 no_recursion=yes ;;
497
498 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
499 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
500 | --oldin | --oldi | --old | --ol | --o)
501 ac_prev=oldincludedir ;;
502 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
503 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
504 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 505 oldincludedir=$ac_optarg ;;
c906108c
SS
506
507 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
508 ac_prev=prefix ;;
509 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 510 prefix=$ac_optarg ;;
c906108c
SS
511
512 -program-prefix | --program-prefix | --program-prefi | --program-pref \
513 | --program-pre | --program-pr | --program-p)
514 ac_prev=program_prefix ;;
515 -program-prefix=* | --program-prefix=* | --program-prefi=* \
516 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 517 program_prefix=$ac_optarg ;;
c906108c
SS
518
519 -program-suffix | --program-suffix | --program-suffi | --program-suff \
520 | --program-suf | --program-su | --program-s)
521 ac_prev=program_suffix ;;
522 -program-suffix=* | --program-suffix=* | --program-suffi=* \
523 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 524 program_suffix=$ac_optarg ;;
c906108c
SS
525
526 -program-transform-name | --program-transform-name \
527 | --program-transform-nam | --program-transform-na \
528 | --program-transform-n | --program-transform- \
529 | --program-transform | --program-transfor \
530 | --program-transfo | --program-transf \
531 | --program-trans | --program-tran \
532 | --progr-tra | --program-tr | --program-t)
533 ac_prev=program_transform_name ;;
534 -program-transform-name=* | --program-transform-name=* \
535 | --program-transform-nam=* | --program-transform-na=* \
536 | --program-transform-n=* | --program-transform-=* \
537 | --program-transform=* | --program-transfor=* \
538 | --program-transfo=* | --program-transf=* \
539 | --program-trans=* | --program-tran=* \
540 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 541 program_transform_name=$ac_optarg ;;
c906108c
SS
542
543 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
544 | -silent | --silent | --silen | --sile | --sil)
545 silent=yes ;;
546
547 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
548 ac_prev=sbindir ;;
549 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
550 | --sbi=* | --sb=*)
bec39cab 551 sbindir=$ac_optarg ;;
c906108c
SS
552
553 -sharedstatedir | --sharedstatedir | --sharedstatedi \
554 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
555 | --sharedst | --shareds | --shared | --share | --shar \
556 | --sha | --sh)
557 ac_prev=sharedstatedir ;;
558 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
559 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
560 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
561 | --sha=* | --sh=*)
bec39cab 562 sharedstatedir=$ac_optarg ;;
c906108c
SS
563
564 -site | --site | --sit)
565 ac_prev=site ;;
566 -site=* | --site=* | --sit=*)
bec39cab 567 site=$ac_optarg ;;
3ace7edb 568
c906108c
SS
569 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
570 ac_prev=srcdir ;;
571 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 572 srcdir=$ac_optarg ;;
c906108c
SS
573
574 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
575 | --syscon | --sysco | --sysc | --sys | --sy)
576 ac_prev=sysconfdir ;;
577 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
578 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 579 sysconfdir=$ac_optarg ;;
c906108c
SS
580
581 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 582 ac_prev=target_alias ;;
c906108c 583 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 584 target_alias=$ac_optarg ;;
c906108c
SS
585
586 -v | -verbose | --verbose | --verbos | --verbo | --verb)
587 verbose=yes ;;
588
bec39cab
AC
589 -version | --version | --versio | --versi | --vers | -V)
590 ac_init_version=: ;;
c906108c
SS
591
592 -with-* | --with-*)
bec39cab 593 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 594 # Reject names that are not valid shell variable names.
bec39cab
AC
595 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
596 { echo "$as_me: error: invalid package name: $ac_package" >&2
597 { (exit 1); exit 1; }; }
c906108c 598 ac_package=`echo $ac_package| sed 's/-/_/g'`
b4e70030
JB
599 case $ac_option in
600 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
601 *) ac_optarg=yes ;;
602 esac
603 eval "with_$ac_package='$ac_optarg'" ;;
c906108c
SS
604
605 -without-* | --without-*)
bec39cab 606 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 607 # Reject names that are not valid shell variable names.
bec39cab
AC
608 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
609 { echo "$as_me: error: invalid package name: $ac_package" >&2
610 { (exit 1); exit 1; }; }
611 ac_package=`echo $ac_package | sed 's/-/_/g'`
b4e70030 612 eval "with_$ac_package=no" ;;
c906108c
SS
613
614 --x)
615 # Obsolete; use --with-x.
616 with_x=yes ;;
617
618 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
619 | --x-incl | --x-inc | --x-in | --x-i)
620 ac_prev=x_includes ;;
621 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
622 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 623 x_includes=$ac_optarg ;;
c906108c
SS
624
625 -x-libraries | --x-libraries | --x-librarie | --x-librari \
626 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
627 ac_prev=x_libraries ;;
628 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
629 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 630 x_libraries=$ac_optarg ;;
c906108c 631
bec39cab
AC
632 -*) { echo "$as_me: error: unrecognized option: $ac_option
633Try \`$0 --help' for more information." >&2
634 { (exit 1); exit 1; }; }
c906108c
SS
635 ;;
636
bec39cab
AC
637 *=*)
638 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
639 # Reject names that are not valid shell variable names.
640 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
641 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
642 { (exit 1); exit 1; }; }
b4e70030
JB
643 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
644 eval "$ac_envvar='$ac_optarg'"
bec39cab
AC
645 export $ac_envvar ;;
646
c906108c 647 *)
bec39cab
AC
648 # FIXME: should be removed in autoconf 3.0.
649 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
650 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
651 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
652 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
653 ;;
654
655 esac
656done
657
658if test -n "$ac_prev"; then
bec39cab
AC
659 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
660 { echo "$as_me: error: missing argument to $ac_option" >&2
661 { (exit 1); exit 1; }; }
c906108c 662fi
c906108c 663
b4e70030
JB
664# Be sure to have absolute paths.
665for ac_var in exec_prefix prefix
c906108c 666do
b4e70030 667 eval ac_val=$`echo $ac_var`
bec39cab 668 case $ac_val in
b4e70030
JB
669 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
670 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
671 { (exit 1); exit 1; }; };;
672 esac
673done
674
675# Be sure to have absolute paths.
676for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
677 localstatedir libdir includedir oldincludedir infodir mandir
678do
679 eval ac_val=$`echo $ac_var`
680 case $ac_val in
681 [\\/$]* | ?:[\\/]* ) ;;
682 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
683 { (exit 1); exit 1; }; };;
c906108c
SS
684 esac
685done
686
bec39cab
AC
687# There might be people who depend on the old broken behavior: `$host'
688# used to hold the argument of --host etc.
689# FIXME: To remove some day.
690build=$build_alias
691host=$host_alias
692target=$target_alias
693
694# FIXME: To remove some day.
695if test "x$host_alias" != x; then
696 if test "x$build_alias" = x; then
697 cross_compiling=maybe
698 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
699 If a cross compiler is detected then cross compile mode will be used." >&2
700 elif test "x$build_alias" != "x$host_alias"; then
701 cross_compiling=yes
702 fi
703fi
c906108c 704
bec39cab
AC
705ac_tool_prefix=
706test -n "$host_alias" && ac_tool_prefix=$host_alias-
707
708test "$silent" = yes && exec 6>/dev/null
c906108c 709
c906108c
SS
710
711# Find the source files, if location was not specified.
712if test -z "$srcdir"; then
713 ac_srcdir_defaulted=yes
b4e70030
JB
714 # Try the directory containing this script, then its parent.
715 ac_confdir=`(dirname "$0") 2>/dev/null ||
bec39cab
AC
716$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
717 X"$0" : 'X\(//\)[^/]' \| \
718 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
719 X"$0" : 'X\(/\)' \| \
720 . : '\(.\)' 2>/dev/null ||
bec39cab 721echo X"$0" |
b4e70030
JB
722 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
723 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
724 /^X\(\/\/\)$/{ s//\1/; q; }
725 /^X\(\/\).*/{ s//\1/; q; }
726 s/.*/./; q'`
c906108c 727 srcdir=$ac_confdir
b4e70030 728 if test ! -r $srcdir/$ac_unique_file; then
c906108c
SS
729 srcdir=..
730 fi
731else
732 ac_srcdir_defaulted=no
733fi
b4e70030
JB
734if test ! -r $srcdir/$ac_unique_file; then
735 if test "$ac_srcdir_defaulted" = yes; then
736 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
737 { (exit 1); exit 1; }; }
738 else
739 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
bec39cab 740 { (exit 1); exit 1; }; }
b4e70030 741 fi
c906108c 742fi
b4e70030
JB
743(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
744 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
bec39cab 745 { (exit 1); exit 1; }; }
b4e70030
JB
746srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
747ac_env_build_alias_set=${build_alias+set}
748ac_env_build_alias_value=$build_alias
749ac_cv_env_build_alias_set=${build_alias+set}
750ac_cv_env_build_alias_value=$build_alias
751ac_env_host_alias_set=${host_alias+set}
752ac_env_host_alias_value=$host_alias
753ac_cv_env_host_alias_set=${host_alias+set}
754ac_cv_env_host_alias_value=$host_alias
755ac_env_target_alias_set=${target_alias+set}
756ac_env_target_alias_value=$target_alias
757ac_cv_env_target_alias_set=${target_alias+set}
758ac_cv_env_target_alias_value=$target_alias
759ac_env_CC_set=${CC+set}
760ac_env_CC_value=$CC
761ac_cv_env_CC_set=${CC+set}
762ac_cv_env_CC_value=$CC
763ac_env_CFLAGS_set=${CFLAGS+set}
764ac_env_CFLAGS_value=$CFLAGS
765ac_cv_env_CFLAGS_set=${CFLAGS+set}
766ac_cv_env_CFLAGS_value=$CFLAGS
767ac_env_LDFLAGS_set=${LDFLAGS+set}
768ac_env_LDFLAGS_value=$LDFLAGS
769ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
770ac_cv_env_LDFLAGS_value=$LDFLAGS
771ac_env_CPPFLAGS_set=${CPPFLAGS+set}
772ac_env_CPPFLAGS_value=$CPPFLAGS
773ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
774ac_cv_env_CPPFLAGS_value=$CPPFLAGS
775ac_env_CPP_set=${CPP+set}
776ac_env_CPP_value=$CPP
777ac_cv_env_CPP_set=${CPP+set}
778ac_cv_env_CPP_value=$CPP
c906108c 779
bec39cab
AC
780#
781# Report the --help message.
782#
783if test "$ac_init_help" = "long"; then
784 # Omit some internal or obsolete options to make the list less imposing.
785 # This message is too long to be a string in the A/UX 3.1 sh.
786 cat <<_ACEOF
787\`configure' configures this package to adapt to many kinds of systems.
788
789Usage: $0 [OPTION]... [VAR=VALUE]...
790
791To assign environment variables (e.g., CC, CFLAGS...), specify them as
792VAR=VALUE. See below for descriptions of some of the useful variables.
793
794Defaults for the options are specified in brackets.
795
796Configuration:
797 -h, --help display this help and exit
798 --help=short display options specific to this package
799 --help=recursive display the short help of all the included packages
800 -V, --version display version information and exit
801 -q, --quiet, --silent do not print \`checking...' messages
802 --cache-file=FILE cache test results in FILE [disabled]
803 -C, --config-cache alias for \`--cache-file=config.cache'
804 -n, --no-create do not create output files
805 --srcdir=DIR find the sources in DIR [configure dir or \`..']
806
b4e70030
JB
807_ACEOF
808
809 cat <<_ACEOF
bec39cab
AC
810Installation directories:
811 --prefix=PREFIX install architecture-independent files in PREFIX
812 [$ac_default_prefix]
813 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
814 [PREFIX]
815
816By default, \`make install' will install all the files in
817\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
818an installation prefix other than \`$ac_default_prefix' using \`--prefix',
819for instance \`--prefix=\$HOME'.
820
821For better control, use the options below.
822
823Fine tuning of the installation directories:
824 --bindir=DIR user executables [EPREFIX/bin]
825 --sbindir=DIR system admin executables [EPREFIX/sbin]
826 --libexecdir=DIR program executables [EPREFIX/libexec]
b4e70030 827 --datadir=DIR read-only architecture-independent data [PREFIX/share]
bec39cab
AC
828 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
829 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
830 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
831 --libdir=DIR object code libraries [EPREFIX/lib]
832 --includedir=DIR C header files [PREFIX/include]
833 --oldincludedir=DIR C header files for non-gcc [/usr/include]
b4e70030
JB
834 --infodir=DIR info documentation [PREFIX/info]
835 --mandir=DIR man documentation [PREFIX/man]
bec39cab
AC
836_ACEOF
837
838 cat <<\_ACEOF
839
840Program names:
841 --program-prefix=PREFIX prepend PREFIX to installed program names
842 --program-suffix=SUFFIX append SUFFIX to installed program names
843 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
844
845X features:
846 --x-includes=DIR X include files are in DIR
847 --x-libraries=DIR X library files are in DIR
848
849System types:
850 --build=BUILD configure for building on BUILD [guessed]
851 --host=HOST cross-compile to build programs to run on HOST [BUILD]
852 --target=TARGET configure for building compilers for TARGET [HOST]
853_ACEOF
854fi
855
856if test -n "$ac_init_help"; then
857
858 cat <<\_ACEOF
859
860Optional Features:
861 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
862 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
863 --enable-maintainer-mode enable make rules and dependencies not useful
864 (and sometimes confusing) to the casual installer
e28b3332
DJ
865 --disable-dependency-tracking speeds up one-time build
866 --enable-dependency-tracking do not reject slow dependency extractors
d0c678e6 867 --enable-targets alternative target configurations
c0993dbe 868 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
869 --disable-gdbcli disable command-line interface (CLI)
870 --disable-gdbmi disable machine-interface (MI)
871 --enable-tui enable full-screen terminal user interface (TUI)
872 --enable-gdbtk enable gdbtk graphical user interface (GUI)
873 --enable-profiling enable profiling of GDB
3841debe 874 --disable-rpath do not hardcode runtime library paths
094a342e 875 --enable-werror treat compile warnings as errors
bec39cab
AC
876 --enable-build-warnings Enable build-time compiler warnings if gcc is used
877 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used
878 --enable-sim Link gdb with simulator
879 --enable-multi-ice build the multi-ice-gdb-server
880
881Optional Packages:
882 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
883 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
bec39cab
AC
884 --with-separate-debug-dir=path Look for global separate debug info in this path LIBDIR/debug
885 --with-libunwind Use libunwind frame unwinding support
cb01cfba
JB
886 --with-curses use the curses library instead of the termcap
887 library
c16158bc
JM
888 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
889 --with-bugurl=URL Direct users to URL to report a bug
6c7a06a3 890 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
6a30b0a5 891 --with-system-readline use installed readline library
5c39566f 892 --with-expat include expat support (auto/yes/no)
3841debe
DJ
893 --with-gnu-ld assume the C compiler uses GNU ld default=no
894 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
895 --without-libexpat-prefix don't search for libexpat in includedir and libdir
d57a3c85 896 --with-python include python support (auto/yes/no/<path>)
bec39cab
AC
897 --without-included-regex don't use included regex; this is the default
898 on systems with version 2 of the GNU C library
899 (use with caution on other system)
900 --with-sysroot=DIR Search for usr/lib et al within DIR.
16e7150e 901 --with-system-gdbinit=file Automatically load a system-wide gdbinit file
5062cc19
KS
902 --with-tcl directory containing tcl configuration (tclConfig.sh)
903 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 904 --with-x use the X Window System
bec39cab
AC
905
906Some influential environment variables:
907 CC C compiler command
908 CFLAGS C compiler flags
909 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
910 nonstandard directory <lib dir>
b4e70030
JB
911 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
912 headers in a nonstandard directory <include dir>
bec39cab
AC
913 CPP C preprocessor
914
915Use these variables to override the choices made by `configure' or to help
916it to find libraries and programs with nonstandard names/locations.
917
918_ACEOF
919fi
920
921if test "$ac_init_help" = "recursive"; then
922 # If there are subdirs, report their specific --help.
b4e70030 923 ac_popdir=`pwd`
bec39cab
AC
924 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
925 test -d $ac_dir || continue
926 ac_builddir=.
927
b4e70030 928if test "$ac_dir" != .; then
bec39cab 929 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
930 # A "../" for each directory in $ac_dir_suffix.
931 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
932else
933 ac_dir_suffix= ac_top_builddir=
934fi
bec39cab
AC
935
936case $srcdir in
b4e70030 937 .) # No --srcdir option. We are building in place.
bec39cab 938 ac_srcdir=.
b4e70030
JB
939 if test -z "$ac_top_builddir"; then
940 ac_top_srcdir=.
941 else
942 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
943 fi ;;
944 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 945 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
946 ac_top_srcdir=$srcdir ;;
947 *) # Relative path.
948 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
949 ac_top_srcdir=$ac_top_builddir$srcdir ;;
950esac
951
952# Do not use `cd foo && pwd` to compute absolute paths, because
953# the directories may not exist.
954case `pwd` in
955.) ac_abs_builddir="$ac_dir";;
956*)
957 case "$ac_dir" in
958 .) ac_abs_builddir=`pwd`;;
959 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
960 *) ac_abs_builddir=`pwd`/"$ac_dir";;
961 esac;;
962esac
963case $ac_abs_builddir in
964.) ac_abs_top_builddir=${ac_top_builddir}.;;
965*)
966 case ${ac_top_builddir}. in
967 .) ac_abs_top_builddir=$ac_abs_builddir;;
968 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
969 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
970 esac;;
971esac
972case $ac_abs_builddir in
973.) ac_abs_srcdir=$ac_srcdir;;
974*)
975 case $ac_srcdir in
976 .) ac_abs_srcdir=$ac_abs_builddir;;
977 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
978 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
979 esac;;
980esac
981case $ac_abs_builddir in
982.) ac_abs_top_srcdir=$ac_top_srcdir;;
983*)
984 case $ac_top_srcdir in
985 .) ac_abs_top_srcdir=$ac_abs_builddir;;
986 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
987 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
988 esac;;
bec39cab
AC
989esac
990
b4e70030
JB
991 cd $ac_dir
992 # Check for guested configure; otherwise get Cygnus style configure.
bec39cab 993 if test -f $ac_srcdir/configure.gnu; then
b4e70030 994 echo
bec39cab
AC
995 $SHELL $ac_srcdir/configure.gnu --help=recursive
996 elif test -f $ac_srcdir/configure; then
b4e70030 997 echo
bec39cab 998 $SHELL $ac_srcdir/configure --help=recursive
b4e70030
JB
999 elif test -f $ac_srcdir/configure.ac ||
1000 test -f $ac_srcdir/configure.in; then
1001 echo
1002 $ac_configure --help
3ace7edb 1003 else
bec39cab 1004 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b4e70030
JB
1005 fi
1006 cd $ac_popdir
bec39cab
AC
1007 done
1008fi
1009
b4e70030 1010test -n "$ac_init_help" && exit 0
bec39cab
AC
1011if $ac_init_version; then
1012 cat <<\_ACEOF
1013
b4e70030 1014Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
1015This configure script is free software; the Free Software Foundation
1016gives unlimited permission to copy, distribute and modify it.
1017_ACEOF
b4e70030 1018 exit 0
bec39cab 1019fi
b4e70030
JB
1020exec 5>config.log
1021cat >&5 <<_ACEOF
bec39cab
AC
1022This file contains any messages produced by compilers while
1023running configure, to aid debugging if configure makes a mistake.
1024
1025It was created by $as_me, which was
b4e70030 1026generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
1027
1028 $ $0 $@
1029
1030_ACEOF
1031{
1032cat <<_ASUNAME
1033## --------- ##
1034## Platform. ##
1035## --------- ##
1036
1037hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1038uname -m = `(uname -m) 2>/dev/null || echo unknown`
1039uname -r = `(uname -r) 2>/dev/null || echo unknown`
1040uname -s = `(uname -s) 2>/dev/null || echo unknown`
1041uname -v = `(uname -v) 2>/dev/null || echo unknown`
1042
1043/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1044/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1045
1046/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1047/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1048/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b4e70030 1049hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
bec39cab
AC
1050/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1051/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1052/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1053
1054_ASUNAME
1055
1056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1057for as_dir in $PATH
1058do
1059 IFS=$as_save_IFS
1060 test -z "$as_dir" && as_dir=.
1061 echo "PATH: $as_dir"
1062done
1063
1064} >&5
1065
1066cat >&5 <<_ACEOF
1067
1068
1069## ----------- ##
1070## Core tests. ##
1071## ----------- ##
1072
1073_ACEOF
1074
1075
1076# Keep a trace of the command line.
1077# Strip out --no-create and --no-recursion so they do not pile up.
1078# Strip out --silent because we don't want to record it for future runs.
1079# Also quote any args containing shell meta-characters.
1080# Make two passes to allow for proper duplicate-argument suppression.
1081ac_configure_args=
1082ac_configure_args0=
1083ac_configure_args1=
1084ac_sep=
1085ac_must_keep_next=false
1086for ac_pass in 1 2
1087do
1088 for ac_arg
1089 do
1090 case $ac_arg in
1091 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1092 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1093 | -silent | --silent | --silen | --sile | --sil)
1094 continue ;;
b4e70030 1095 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
bec39cab
AC
1096 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1097 esac
1098 case $ac_pass in
1099 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1100 2)
1101 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1102 if test $ac_must_keep_next = true; then
1103 ac_must_keep_next=false # Got value, back to normal.
1104 else
1105 case $ac_arg in
1106 *=* | --config-cache | -C | -disable-* | --disable-* \
1107 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1108 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1109 | -with-* | --with-* | -without-* | --without-* | --x)
1110 case "$ac_configure_args0 " in
1111 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1112 esac
1113 ;;
1114 -* ) ac_must_keep_next=true ;;
1115 esac
1116 fi
1117 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1118 # Get rid of the leading space.
1119 ac_sep=" "
1120 ;;
1121 esac
1122 done
1123done
1124$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1125$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1126
1127# When interrupted or exit'd, cleanup temporary files, and complete
1128# config.log. We remove comments because anyway the quotes in there
1129# would cause problems or look ugly.
b4e70030
JB
1130# WARNING: Be sure not to use single quotes in there, as some shells,
1131# such as our DU 5.0 friend, will then `close' the trap.
bec39cab
AC
1132trap 'exit_status=$?
1133 # Save into config.log some information that might help in debugging.
1134 {
1135 echo
1136
1137 cat <<\_ASBOX
1138## ---------------- ##
1139## Cache variables. ##
1140## ---------------- ##
1141_ASBOX
1142 echo
1143 # The following way of writing the cache mishandles newlines in values,
b4e70030 1144{
bec39cab 1145 (set) 2>&1 |
b4e70030
JB
1146 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1147 *ac_space=\ *)
bec39cab 1148 sed -n \
b4e70030
JB
1149 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1150 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1151 ;;
bec39cab 1152 *)
b4e70030
JB
1153 sed -n \
1154 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 1155 ;;
b4e70030
JB
1156 esac;
1157}
bec39cab
AC
1158 echo
1159
1160 cat <<\_ASBOX
1161## ----------------- ##
1162## Output variables. ##
1163## ----------------- ##
1164_ASBOX
1165 echo
1166 for ac_var in $ac_subst_vars
1167 do
b4e70030
JB
1168 eval ac_val=$`echo $ac_var`
1169 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1170 done | sort
1171 echo
1172
1173 if test -n "$ac_subst_files"; then
1174 cat <<\_ASBOX
b4e70030
JB
1175## ------------- ##
1176## Output files. ##
1177## ------------- ##
bec39cab
AC
1178_ASBOX
1179 echo
1180 for ac_var in $ac_subst_files
1181 do
b4e70030
JB
1182 eval ac_val=$`echo $ac_var`
1183 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1184 done | sort
1185 echo
1186 fi
1187
1188 if test -s confdefs.h; then
1189 cat <<\_ASBOX
1190## ----------- ##
1191## confdefs.h. ##
1192## ----------- ##
1193_ASBOX
1194 echo
b4e70030 1195 sed "/^$/d" confdefs.h | sort
bec39cab 1196 echo
3ace7edb 1197 fi
bec39cab
AC
1198 test "$ac_signal" != 0 &&
1199 echo "$as_me: caught signal $ac_signal"
1200 echo "$as_me: exit $exit_status"
1201 } >&5
b4e70030
JB
1202 rm -f core *.core &&
1203 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
bec39cab 1204 exit $exit_status
b4e70030 1205 ' 0
bec39cab
AC
1206for ac_signal in 1 2 13 15; do
1207 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1208done
1209ac_signal=0
1210
1211# confdefs.h avoids OS command line length limits that DEFS can exceed.
b4e70030
JB
1212rm -rf conftest* confdefs.h
1213# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1214echo >confdefs.h
bec39cab
AC
1215
1216# Predefined preprocessor variables.
1217
1218cat >>confdefs.h <<_ACEOF
1219#define PACKAGE_NAME "$PACKAGE_NAME"
1220_ACEOF
1221
1222
1223cat >>confdefs.h <<_ACEOF
1224#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1225_ACEOF
1226
1227
1228cat >>confdefs.h <<_ACEOF
1229#define PACKAGE_VERSION "$PACKAGE_VERSION"
1230_ACEOF
1231
1232
1233cat >>confdefs.h <<_ACEOF
1234#define PACKAGE_STRING "$PACKAGE_STRING"
1235_ACEOF
1236
1237
1238cat >>confdefs.h <<_ACEOF
1239#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1240_ACEOF
1241
1242
1243# Let the site file select an alternate cache file if it wants to.
1244# Prefer explicitly selected file to automatically selected ones.
b4e70030
JB
1245if test -z "$CONFIG_SITE"; then
1246 if test "x$prefix" != xNONE; then
1247 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1248 else
1249 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1250 fi
c906108c 1251fi
b4e70030 1252for ac_site_file in $CONFIG_SITE; do
c906108c 1253 if test -r "$ac_site_file"; then
bec39cab
AC
1254 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1255echo "$as_me: loading site script $ac_site_file" >&6;}
1256 sed 's/^/| /' "$ac_site_file" >&5
c906108c
SS
1257 . "$ac_site_file"
1258 fi
1259done
1260
1261if test -r "$cache_file"; then
bec39cab
AC
1262 # Some versions of bash will fail to source /dev/null (special
1263 # files actually), so we avoid doing that.
1264 if test -f "$cache_file"; then
1265 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1266echo "$as_me: loading cache $cache_file" >&6;}
1267 case $cache_file in
1268 [\\/]* | ?:[\\/]* ) . $cache_file;;
1269 *) . ./$cache_file;;
1270 esac
1271 fi
c906108c 1272else
bec39cab
AC
1273 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1274echo "$as_me: creating cache $cache_file" >&6;}
1275 >$cache_file
1276fi
1277
1278# Check that the precious variables saved in the cache have kept the same
1279# value.
1280ac_cache_corrupted=false
b4e70030
JB
1281for ac_var in `(set) 2>&1 |
1282 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
bec39cab
AC
1283 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1284 eval ac_new_set=\$ac_env_${ac_var}_set
b4e70030
JB
1285 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1286 eval ac_new_val="\$ac_env_${ac_var}_value"
bec39cab
AC
1287 case $ac_old_set,$ac_new_set in
1288 set,)
1289 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1290echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1291 ac_cache_corrupted=: ;;
1292 ,set)
1293 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1294echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1295 ac_cache_corrupted=: ;;
1296 ,);;
1297 *)
1298 if test "x$ac_old_val" != "x$ac_new_val"; then
fdc59709
PB
1299 # differences in whitespace do not lead to failure.
1300 ac_old_val_w=`echo x $ac_old_val`
1301 ac_new_val_w=`echo x $ac_new_val`
1302 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1303 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
bec39cab 1304echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
fdc59709
PB
1305 ac_cache_corrupted=:
1306 else
1307 { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1308echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1309 eval $ac_var=\$ac_old_val
1310 fi
1311 { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1312echo "$as_me: former value: \`$ac_old_val'" >&2;}
1313 { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1314echo "$as_me: current value: \`$ac_new_val'" >&2;}
bec39cab
AC
1315 fi;;
1316 esac
1317 # Pass precious variables to config.status.
1318 if test "$ac_new_set" = set; then
1319 case $ac_new_val in
b4e70030
JB
1320 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1321 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
1322 *) ac_arg=$ac_var=$ac_new_val ;;
1323 esac
1324 case " $ac_configure_args " in
1325 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1326 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1327 esac
1328 fi
1329done
1330if $ac_cache_corrupted; then
d5af19ba
DJ
1331 { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1332echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1333 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1334echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1335 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1336echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1337 { (exit 1); exit 1; }; }
c906108c
SS
1338fi
1339
b4e70030
JB
1340ac_ext=c
1341ac_cpp='$CPP $CPPFLAGS'
1342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1344ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c
SS
1345
1346
783e057b
DJ
1347gl_header_list="$gl_header_list stdint.h"
1348gl_header_list="$gl_header_list wchar.h"
1349gl_header_list="$gl_header_list string.h"
bec39cab
AC
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
bec39cab 1366
d5af19ba
DJ
1367
1368
1369
b4e70030
JB
1370 ac_config_headers="$ac_config_headers config.h:config.in"
1371
1372echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1373echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
1374 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
413ccac7 1375if test "${enable_maintainer_mode+set}" = set; then
b4e70030
JB
1376 enableval="$enable_maintainer_mode"
1377 USE_MAINTAINER_MODE=$enableval
413ccac7
AC
1378else
1379 USE_MAINTAINER_MODE=no
b4e70030
JB
1380fi;
1381 echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
1382echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
413ccac7 1383
413ccac7
AC
1384
1385if test $USE_MAINTAINER_MODE = yes; then
1386 MAINTAINER_MODE_TRUE=
1387 MAINTAINER_MODE_FALSE='#'
1388else
1389 MAINTAINER_MODE_TRUE='#'
1390 MAINTAINER_MODE_FALSE=
1391fi
85981d60 1392
413ccac7 1393 MAINT=$MAINTAINER_MODE_TRUE
413ccac7 1394
c906108c 1395
bec39cab
AC
1396
1397ac_ext=c
1398ac_cpp='$CPP $CPPFLAGS'
1399ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1400ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1401ac_compiler_gnu=$ac_cv_c_compiler_gnu
1402if test -n "$ac_tool_prefix"; then
1403 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1404set dummy ${ac_tool_prefix}gcc; ac_word=$2
b4e70030
JB
1405echo "$as_me:$LINENO: checking for $ac_word" >&5
1406echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1407if test "${ac_cv_prog_CC+set}" = set; then
1408 echo $ECHO_N "(cached) $ECHO_C" >&6
1409else
1410 if test -n "$CC"; then
1411 ac_cv_prog_CC="$CC" # Let the user override the test.
1412else
1413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1414for as_dir in $PATH
1415do
1416 IFS=$as_save_IFS
1417 test -z "$as_dir" && as_dir=.
1418 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1419 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1420 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1421 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1422 break 2
1423 fi
1424done
1425done
1426
1427fi
1428fi
1429CC=$ac_cv_prog_CC
1430if test -n "$CC"; then
b4e70030
JB
1431 echo "$as_me:$LINENO: result: $CC" >&5
1432echo "${ECHO_T}$CC" >&6
bec39cab 1433else
b4e70030
JB
1434 echo "$as_me:$LINENO: result: no" >&5
1435echo "${ECHO_T}no" >&6
bec39cab
AC
1436fi
1437
1438fi
1439if test -z "$ac_cv_prog_CC"; then
1440 ac_ct_CC=$CC
1441 # Extract the first word of "gcc", so it can be a program name with args.
c906108c 1442set dummy gcc; ac_word=$2
b4e70030
JB
1443echo "$as_me:$LINENO: checking for $ac_word" >&5
1444echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1445if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1446 echo $ECHO_N "(cached) $ECHO_C" >&6
1447else
1448 if test -n "$ac_ct_CC"; then
1449 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1450else
1451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1452for as_dir in $PATH
1453do
1454 IFS=$as_save_IFS
1455 test -z "$as_dir" && as_dir=.
1456 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1457 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1458 ac_cv_prog_ac_ct_CC="gcc"
1459 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1460 break 2
1461 fi
1462done
1463done
1464
1465fi
1466fi
1467ac_ct_CC=$ac_cv_prog_ac_ct_CC
1468if test -n "$ac_ct_CC"; then
b4e70030
JB
1469 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1470echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1471else
b4e70030
JB
1472 echo "$as_me:$LINENO: result: no" >&5
1473echo "${ECHO_T}no" >&6
bec39cab
AC
1474fi
1475
b4e70030 1476 CC=$ac_ct_CC
bec39cab
AC
1477else
1478 CC="$ac_cv_prog_CC"
1479fi
1480
1481if test -z "$CC"; then
b4e70030
JB
1482 if test -n "$ac_tool_prefix"; then
1483 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
bec39cab 1484set dummy ${ac_tool_prefix}cc; ac_word=$2
b4e70030
JB
1485echo "$as_me:$LINENO: checking for $ac_word" >&5
1486echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1487if test "${ac_cv_prog_CC+set}" = set; then
1488 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1489else
1490 if test -n "$CC"; then
1491 ac_cv_prog_CC="$CC" # Let the user override the test.
1492else
bec39cab
AC
1493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1494for as_dir in $PATH
1495do
1496 IFS=$as_save_IFS
1497 test -z "$as_dir" && as_dir=.
1498 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1499 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1500 ac_cv_prog_CC="${ac_tool_prefix}cc"
1501 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1502 break 2
1503 fi
1504done
1505done
1506
c906108c
SS
1507fi
1508fi
bec39cab 1509CC=$ac_cv_prog_CC
c906108c 1510if test -n "$CC"; then
b4e70030
JB
1511 echo "$as_me:$LINENO: result: $CC" >&5
1512echo "${ECHO_T}$CC" >&6
c906108c 1513else
b4e70030
JB
1514 echo "$as_me:$LINENO: result: no" >&5
1515echo "${ECHO_T}no" >&6
c906108c
SS
1516fi
1517
b4e70030
JB
1518fi
1519if test -z "$ac_cv_prog_CC"; then
1520 ac_ct_CC=$CC
1521 # Extract the first word of "cc", so it can be a program name with args.
1522set dummy cc; ac_word=$2
1523echo "$as_me:$LINENO: checking for $ac_word" >&5
1524echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1525if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1526 echo $ECHO_N "(cached) $ECHO_C" >&6
1527else
1528 if test -n "$ac_ct_CC"; then
1529 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1530else
1531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1532for as_dir in $PATH
1533do
1534 IFS=$as_save_IFS
1535 test -z "$as_dir" && as_dir=.
1536 for ac_exec_ext in '' $ac_executable_extensions; do
1537 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1538 ac_cv_prog_ac_ct_CC="cc"
1539 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1540 break 2
4e8d927d 1541 fi
b4e70030
JB
1542done
1543done
1544
1545fi
1546fi
1547ac_ct_CC=$ac_cv_prog_ac_ct_CC
1548if test -n "$ac_ct_CC"; then
1549 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1550echo "${ECHO_T}$ac_ct_CC" >&6
1551else
1552 echo "$as_me:$LINENO: result: no" >&5
1553echo "${ECHO_T}no" >&6
1554fi
1555
1556 CC=$ac_ct_CC
1557else
1558 CC="$ac_cv_prog_CC"
1559fi
1560
bec39cab 1561fi
c906108c
SS
1562if test -z "$CC"; then
1563 # Extract the first word of "cc", so it can be a program name with args.
1564set dummy cc; ac_word=$2
b4e70030
JB
1565echo "$as_me:$LINENO: checking for $ac_word" >&5
1566echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1567if test "${ac_cv_prog_CC+set}" = set; then
1568 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1569else
1570 if test -n "$CC"; then
1571 ac_cv_prog_CC="$CC" # Let the user override the test.
1572else
c906108c 1573 ac_prog_rejected=no
bec39cab
AC
1574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1575for as_dir in $PATH
1576do
1577 IFS=$as_save_IFS
1578 test -z "$as_dir" && as_dir=.
1579 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1580 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1581 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1582 ac_prog_rejected=yes
1583 continue
1584 fi
1585 ac_cv_prog_CC="cc"
1586 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1587 break 2
1588 fi
1589done
1590done
1591
c906108c
SS
1592if test $ac_prog_rejected = yes; then
1593 # We found a bogon in the path, so make sure we never use it.
1594 set dummy $ac_cv_prog_CC
1595 shift
bec39cab 1596 if test $# != 0; then
c906108c
SS
1597 # We chose a different compiler from the bogus one.
1598 # However, it has the same basename, so the bogon will be chosen
1599 # first if we set CC to just the basename; use the full file name.
1600 shift
bec39cab 1601 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
1602 fi
1603fi
1604fi
1605fi
bec39cab 1606CC=$ac_cv_prog_CC
c906108c 1607if test -n "$CC"; then
b4e70030
JB
1608 echo "$as_me:$LINENO: result: $CC" >&5
1609echo "${ECHO_T}$CC" >&6
c906108c 1610else
b4e70030
JB
1611 echo "$as_me:$LINENO: result: no" >&5
1612echo "${ECHO_T}no" >&6
c906108c
SS
1613fi
1614
bec39cab
AC
1615fi
1616if test -z "$CC"; then
1617 if test -n "$ac_tool_prefix"; then
b4e70030 1618 for ac_prog in cl
bec39cab
AC
1619 do
1620 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1621set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b4e70030
JB
1622echo "$as_me:$LINENO: checking for $ac_word" >&5
1623echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1624if test "${ac_cv_prog_CC+set}" = set; then
1625 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1626else
1627 if test -n "$CC"; then
1628 ac_cv_prog_CC="$CC" # Let the user override the test.
1629else
bec39cab
AC
1630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1631for as_dir in $PATH
1632do
1633 IFS=$as_save_IFS
1634 test -z "$as_dir" && as_dir=.
1635 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1636 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1637 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1638 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1639 break 2
1640 fi
1641done
1642done
1643
c906108c
SS
1644fi
1645fi
bec39cab 1646CC=$ac_cv_prog_CC
c906108c 1647if test -n "$CC"; then
b4e70030
JB
1648 echo "$as_me:$LINENO: result: $CC" >&5
1649echo "${ECHO_T}$CC" >&6
c906108c 1650else
b4e70030
JB
1651 echo "$as_me:$LINENO: result: no" >&5
1652echo "${ECHO_T}no" >&6
c906108c 1653fi
bec39cab
AC
1654
1655 test -n "$CC" && break
1656 done
1657fi
1658if test -z "$CC"; then
1659 ac_ct_CC=$CC
b4e70030 1660 for ac_prog in cl
bec39cab
AC
1661do
1662 # Extract the first word of "$ac_prog", so it can be a program name with args.
1663set dummy $ac_prog; ac_word=$2
b4e70030
JB
1664echo "$as_me:$LINENO: checking for $ac_word" >&5
1665echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1666if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1667 echo $ECHO_N "(cached) $ECHO_C" >&6
1668else
1669 if test -n "$ac_ct_CC"; then
1670 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1671else
1672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1673for as_dir in $PATH
1674do
1675 IFS=$as_save_IFS
1676 test -z "$as_dir" && as_dir=.
1677 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1678 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1679 ac_cv_prog_ac_ct_CC="$ac_prog"
1680 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1681 break 2
c906108c 1682 fi
bec39cab
AC
1683done
1684done
1685
1686fi
1687fi
1688ac_ct_CC=$ac_cv_prog_ac_ct_CC
1689if test -n "$ac_ct_CC"; then
b4e70030
JB
1690 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1691echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1692else
b4e70030
JB
1693 echo "$as_me:$LINENO: result: no" >&5
1694echo "${ECHO_T}no" >&6
c906108c
SS
1695fi
1696
bec39cab
AC
1697 test -n "$ac_ct_CC" && break
1698done
c906108c 1699
b4e70030 1700 CC=$ac_ct_CC
bec39cab
AC
1701fi
1702
1703fi
1704
1705
d5af19ba
DJ
1706test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1707echo "$as_me: error: in \`$ac_pwd':" >&2;}
1708{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
bec39cab
AC
1709See \`config.log' for more details." >&5
1710echo "$as_me: error: no acceptable C compiler found in \$PATH
1711See \`config.log' for more details." >&2;}
d5af19ba 1712 { (exit 1); exit 1; }; }; }
bec39cab
AC
1713
1714# Provide some information about the compiler.
b4e70030
JB
1715echo "$as_me:$LINENO:" \
1716 "checking for C compiler version" >&5
bec39cab 1717ac_compiler=`set X $ac_compile; echo $2`
b4e70030
JB
1718{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1719 (eval $ac_compiler --version </dev/null >&5) 2>&5
bec39cab
AC
1720 ac_status=$?
1721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1722 (exit $ac_status); }
b4e70030
JB
1723{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1724 (eval $ac_compiler -v </dev/null >&5) 2>&5
bec39cab
AC
1725 ac_status=$?
1726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1727 (exit $ac_status); }
b4e70030
JB
1728{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1729 (eval $ac_compiler -V </dev/null >&5) 2>&5
bec39cab
AC
1730 ac_status=$?
1731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1732 (exit $ac_status); }
1733
1734cat >conftest.$ac_ext <<_ACEOF
1735/* confdefs.h. */
1736_ACEOF
1737cat confdefs.h >>conftest.$ac_ext
1738cat >>conftest.$ac_ext <<_ACEOF
1739/* end confdefs.h. */
1740
1741int
1742main ()
1743{
1744
1745 ;
1746 return 0;
1747}
1748_ACEOF
1749ac_clean_files_save=$ac_clean_files
b4e70030 1750ac_clean_files="$ac_clean_files a.out a.exe b.out"
bec39cab
AC
1751# Try to create an executable without -o first, disregard a.out.
1752# It will help us diagnose broken compilers, and finding out an intuition
1753# of exeext.
b4e70030
JB
1754echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1755echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
bec39cab
AC
1756ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1757if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1758 (eval $ac_link_default) 2>&5
1759 ac_status=$?
1760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1761 (exit $ac_status); }; then
b4e70030
JB
1762 # Find the output, starting from the most likely. This scheme is
1763# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1764# resort.
1765
1766# Be careful to initialize this variable, since it used to be cached.
1767# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1768ac_cv_exeext=
1769# b.out is created by i960 compilers.
1770for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
bec39cab
AC
1771do
1772 test -f "$ac_file" || continue
1773 case $ac_file in
b4e70030
JB
1774 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1775 ;;
1776 conftest.$ac_ext )
1777 # This is the source file.
1778 ;;
1779 [ab].out )
1780 # We found the default executable, but exeext='' is most
1781 # certainly right.
1782 break;;
1783 *.* )
1784 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1785 # FIXME: I believe we export ac_cv_exeext for Libtool,
1786 # but it would be cool to find out if it's true. Does anybody
1787 # maintain Libtool? --akim.
1788 export ac_cv_exeext
1789 break;;
1790 * )
1791 break;;
bec39cab
AC
1792 esac
1793done
1794else
1795 echo "$as_me: failed program was:" >&5
1796sed 's/^/| /' conftest.$ac_ext >&5
1797
d5af19ba
DJ
1798{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1799echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1800{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1801See \`config.log' for more details." >&5
1802echo "$as_me: error: C compiler cannot create executables
1803See \`config.log' for more details." >&2;}
d5af19ba 1804 { (exit 77); exit 77; }; }; }
bec39cab
AC
1805fi
1806
b4e70030
JB
1807ac_exeext=$ac_cv_exeext
1808echo "$as_me:$LINENO: result: $ac_file" >&5
1809echo "${ECHO_T}$ac_file" >&6
1810
1811# Check the compiler produces executables we can run. If not, either
bec39cab 1812# the compiler is broken, or we cross compile.
b4e70030
JB
1813echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1814echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
bec39cab
AC
1815# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1816# If not cross compiling, check that we can run a simple program.
1817if test "$cross_compiling" != yes; then
1818 if { ac_try='./$ac_file'
1819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1820 (eval $ac_try) 2>&5
1821 ac_status=$?
1822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1823 (exit $ac_status); }; }; then
1824 cross_compiling=no
c906108c 1825 else
bec39cab
AC
1826 if test "$cross_compiling" = maybe; then
1827 cross_compiling=yes
1828 else
d5af19ba
DJ
1829 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1830echo "$as_me: error: in \`$ac_pwd':" >&2;}
1831{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
bec39cab
AC
1832If you meant to cross compile, use \`--host'.
1833See \`config.log' for more details." >&5
1834echo "$as_me: error: cannot run C compiled programs.
1835If you meant to cross compile, use \`--host'.
1836See \`config.log' for more details." >&2;}
d5af19ba 1837 { (exit 1); exit 1; }; }; }
bec39cab 1838 fi
c906108c 1839 fi
bec39cab 1840fi
b4e70030
JB
1841echo "$as_me:$LINENO: result: yes" >&5
1842echo "${ECHO_T}yes" >&6
bec39cab 1843
b4e70030
JB
1844rm -f a.out a.exe conftest$ac_cv_exeext b.out
1845ac_clean_files=$ac_clean_files_save
1846# Check the compiler produces executables we can run. If not, either
1847# the compiler is broken, or we cross compile.
1848echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1849echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1850echo "$as_me:$LINENO: result: $cross_compiling" >&5
1851echo "${ECHO_T}$cross_compiling" >&6
4e8d927d 1852
b4e70030
JB
1853echo "$as_me:$LINENO: checking for suffix of executables" >&5
1854echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1855if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
bec39cab
AC
1856 (eval $ac_link) 2>&5
1857 ac_status=$?
1858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1859 (exit $ac_status); }; then
b4e70030
JB
1860 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1861# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1862# work properly (i.e., refer to `conftest.exe'), while it won't with
1863# `rm'.
1864for ac_file in conftest.exe conftest conftest.*; do
1865 test -f "$ac_file" || continue
1866 case $ac_file in
1867 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1868 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1869 export ac_cv_exeext
1870 break;;
1871 * ) break;;
1872 esac
1873done
c906108c 1874else
d5af19ba
DJ
1875 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1876echo "$as_me: error: in \`$ac_pwd':" >&2;}
1877{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
bec39cab
AC
1878See \`config.log' for more details." >&5
1879echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1880See \`config.log' for more details." >&2;}
d5af19ba 1881 { (exit 1); exit 1; }; }; }
c906108c 1882fi
c906108c 1883
b4e70030
JB
1884rm -f conftest$ac_cv_exeext
1885echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1886echo "${ECHO_T}$ac_cv_exeext" >&6
c906108c 1887
b4e70030 1888rm -f conftest.$ac_ext
bec39cab
AC
1889EXEEXT=$ac_cv_exeext
1890ac_exeext=$EXEEXT
b4e70030
JB
1891echo "$as_me:$LINENO: checking for suffix of object files" >&5
1892echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
bec39cab
AC
1893if test "${ac_cv_objext+set}" = set; then
1894 echo $ECHO_N "(cached) $ECHO_C" >&6
1895else
b4e70030
JB
1896 cat >conftest.$ac_ext <<_ACEOF
1897/* confdefs.h. */
1898_ACEOF
1899cat confdefs.h >>conftest.$ac_ext
1900cat >>conftest.$ac_ext <<_ACEOF
1901/* end confdefs.h. */
1902
1903int
1904main ()
1905{
1906
1907 ;
1908 return 0;
1909}
1910_ACEOF
1911rm -f conftest.o conftest.obj
bec39cab
AC
1912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1913 (eval $ac_compile) 2>&5
1914 ac_status=$?
1915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1916 (exit $ac_status); }; then
b4e70030 1917 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
bec39cab 1918 case $ac_file in
b4e70030 1919 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
bec39cab
AC
1920 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1921 break;;
1922 esac
1923done
c906108c 1924else
bec39cab
AC
1925 echo "$as_me: failed program was:" >&5
1926sed 's/^/| /' conftest.$ac_ext >&5
1927
d5af19ba
DJ
1928{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1929echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1930{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1931See \`config.log' for more details." >&5
1932echo "$as_me: error: cannot compute suffix of object files: cannot compile
1933See \`config.log' for more details." >&2;}
d5af19ba 1934 { (exit 1); exit 1; }; }; }
c906108c
SS
1935fi
1936
b4e70030 1937rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 1938fi
b4e70030
JB
1939echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1940echo "${ECHO_T}$ac_cv_objext" >&6
bec39cab
AC
1941OBJEXT=$ac_cv_objext
1942ac_objext=$OBJEXT
b4e70030
JB
1943echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1944echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
bec39cab
AC
1945if test "${ac_cv_c_compiler_gnu+set}" = set; then
1946 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 1947else
bec39cab
AC
1948 cat >conftest.$ac_ext <<_ACEOF
1949/* confdefs.h. */
1950_ACEOF
1951cat confdefs.h >>conftest.$ac_ext
1952cat >>conftest.$ac_ext <<_ACEOF
1953/* end confdefs.h. */
1954
1955int
1956main ()
1957{
1958#ifndef __GNUC__
1959 choke me
1960#endif
1961
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966rm -f conftest.$ac_objext
1967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1968 (eval $ac_compile) 2>conftest.er1
1969 ac_status=$?
1970 grep -v '^ *+' conftest.er1 >conftest.err
1971 rm -f conftest.er1
1972 cat conftest.err >&5
1973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1974 (exit $ac_status); } &&
b4e70030
JB
1975 { ac_try='test -z "$ac_c_werror_flag"
1976 || test ! -s conftest.err'
bec39cab
AC
1977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1978 (eval $ac_try) 2>&5
1979 ac_status=$?
1980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1981 (exit $ac_status); }; } &&
1982 { ac_try='test -s conftest.$ac_objext'
1983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1984 (eval $ac_try) 2>&5
1985 ac_status=$?
1986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1987 (exit $ac_status); }; }; then
1988 ac_compiler_gnu=yes
1989else
1990 echo "$as_me: failed program was:" >&5
1991sed 's/^/| /' conftest.$ac_ext >&5
1992
b4e70030 1993ac_compiler_gnu=no
bec39cab
AC
1994fi
1995rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1996ac_cv_c_compiler_gnu=$ac_compiler_gnu
1997
1998fi
b4e70030
JB
1999echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2000echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
bec39cab
AC
2001GCC=`test $ac_compiler_gnu = yes && echo yes`
2002ac_test_CFLAGS=${CFLAGS+set}
2003ac_save_CFLAGS=$CFLAGS
b4e70030
JB
2004CFLAGS="-g"
2005echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2006echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
bec39cab
AC
2007if test "${ac_cv_prog_cc_g+set}" = set; then
2008 echo $ECHO_N "(cached) $ECHO_C" >&6
2009else
b4e70030 2010 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
2011/* confdefs.h. */
2012_ACEOF
2013cat confdefs.h >>conftest.$ac_ext
2014cat >>conftest.$ac_ext <<_ACEOF
2015/* end confdefs.h. */
2016
2017int
2018main ()
2019{
2020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025rm -f conftest.$ac_objext
2026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2027 (eval $ac_compile) 2>conftest.er1
2028 ac_status=$?
2029 grep -v '^ *+' conftest.er1 >conftest.err
2030 rm -f conftest.er1
2031 cat conftest.err >&5
2032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2033 (exit $ac_status); } &&
b4e70030
JB
2034 { ac_try='test -z "$ac_c_werror_flag"
2035 || test ! -s conftest.err'
bec39cab
AC
2036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2037 (eval $ac_try) 2>&5
2038 ac_status=$?
2039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2040 (exit $ac_status); }; } &&
2041 { ac_try='test -s conftest.$ac_objext'
2042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2043 (eval $ac_try) 2>&5
2044 ac_status=$?
2045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2046 (exit $ac_status); }; }; then
c906108c
SS
2047 ac_cv_prog_cc_g=yes
2048else
bec39cab
AC
2049 echo "$as_me: failed program was:" >&5
2050sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2051
b4e70030 2052ac_cv_prog_cc_g=no
4e8d927d 2053fi
bec39cab
AC
2054rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2055fi
b4e70030
JB
2056echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2057echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c906108c 2058if test "$ac_test_CFLAGS" = set; then
bec39cab 2059 CFLAGS=$ac_save_CFLAGS
c906108c
SS
2060elif test $ac_cv_prog_cc_g = yes; then
2061 if test "$GCC" = yes; then
2062 CFLAGS="-g -O2"
2063 else
2064 CFLAGS="-g"
2065 fi
2066else
2067 if test "$GCC" = yes; then
2068 CFLAGS="-O2"
2069 else
2070 CFLAGS=
2071 fi
2072fi
b4e70030
JB
2073echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2074echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2075if test "${ac_cv_prog_cc_stdc+set}" = set; then
bec39cab
AC
2076 echo $ECHO_N "(cached) $ECHO_C" >&6
2077else
b4e70030 2078 ac_cv_prog_cc_stdc=no
bec39cab
AC
2079ac_save_CC=$CC
2080cat >conftest.$ac_ext <<_ACEOF
2081/* confdefs.h. */
2082_ACEOF
2083cat confdefs.h >>conftest.$ac_ext
2084cat >>conftest.$ac_ext <<_ACEOF
2085/* end confdefs.h. */
c906108c
SS
2086#include <stdarg.h>
2087#include <stdio.h>
2088#include <sys/types.h>
2089#include <sys/stat.h>
2090/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2091struct buf { int x; };
2092FILE * (*rcsopen) (struct buf *, struct stat *, int);
2093static char *e (p, i)
2094 char **p;
2095 int i;
2096{
2097 return p[i];
2098}
2099static char *f (char * (*g) (char **, int), char **p, ...)
2100{
2101 char *s;
2102 va_list v;
2103 va_start (v,p);
2104 s = g (p, va_arg (v,int));
2105 va_end (v);
2106 return s;
2107}
bec39cab
AC
2108
2109/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2110 function prototypes and stuff, but not '\xHH' hex character constants.
2111 These don't provoke an error unfortunately, instead are silently treated
b4e70030 2112 as 'x'. The following induces an error, until -std1 is added to get
bec39cab
AC
2113 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2114 array size at least. It's necessary to write '\x00'==0 to get something
b4e70030 2115 that's true only with -std1. */
bec39cab
AC
2116int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2117
c906108c
SS
2118int test (int i, double x);
2119struct s1 {int (*f) (int a);};
2120struct s2 {int (*f) (double a);};
2121int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2122int argc;
2123char **argv;
bec39cab
AC
2124int
2125main ()
2126{
c906108c 2127return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
2128 ;
2129 return 0;
2130}
2131_ACEOF
b4e70030
JB
2132# Don't try gcc -ansi; that turns off useful extensions and
2133# breaks some systems' header files.
2134# AIX -qlanglvl=ansi
2135# Ultrix and OSF/1 -std1
2136# HP-UX 10.20 and later -Ae
2137# HP-UX older versions -Aa -D_HPUX_SOURCE
2138# SVR4 -Xc -D__EXTENSIONS__
2139for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
2140do
2141 CC="$ac_save_CC $ac_arg"
2142 rm -f conftest.$ac_objext
2143if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2144 (eval $ac_compile) 2>conftest.er1
2145 ac_status=$?
2146 grep -v '^ *+' conftest.er1 >conftest.err
2147 rm -f conftest.er1
2148 cat conftest.err >&5
2149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2150 (exit $ac_status); } &&
b4e70030
JB
2151 { ac_try='test -z "$ac_c_werror_flag"
2152 || test ! -s conftest.err'
bec39cab
AC
2153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2154 (eval $ac_try) 2>&5
2155 ac_status=$?
2156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2157 (exit $ac_status); }; } &&
2158 { ac_try='test -s conftest.$ac_objext'
2159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2160 (eval $ac_try) 2>&5
2161 ac_status=$?
2162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2163 (exit $ac_status); }; }; then
b4e70030
JB
2164 ac_cv_prog_cc_stdc=$ac_arg
2165break
c906108c 2166else
bec39cab
AC
2167 echo "$as_me: failed program was:" >&5
2168sed 's/^/| /' conftest.$ac_ext >&5
2169
c906108c 2170fi
bec39cab 2171rm -f conftest.err conftest.$ac_objext
c906108c 2172done
b4e70030 2173rm -f conftest.$ac_ext conftest.$ac_objext
bec39cab 2174CC=$ac_save_CC
c906108c
SS
2175
2176fi
b4e70030
JB
2177
2178case "x$ac_cv_prog_cc_stdc" in
2179 x|xno)
2180 echo "$as_me:$LINENO: result: none needed" >&5
2181echo "${ECHO_T}none needed" >&6 ;;
bec39cab 2182 *)
b4e70030
JB
2183 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2184echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2185 CC="$CC $ac_cv_prog_cc_stdc" ;;
c906108c
SS
2186esac
2187
b4e70030
JB
2188# Some people use a C++ compiler to compile C. Since we use `exit',
2189# in C++ we need to declare it. In case someone uses the same compiler
2190# for both compiling C and C++ we need to have the C++ compiler decide
2191# the declaration of exit, since it's the most demanding environment.
2192cat >conftest.$ac_ext <<_ACEOF
2193#ifndef __cplusplus
2194 choke me
2195#endif
2196_ACEOF
2197rm -f conftest.$ac_objext
2198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2199 (eval $ac_compile) 2>conftest.er1
2200 ac_status=$?
2201 grep -v '^ *+' conftest.er1 >conftest.err
2202 rm -f conftest.er1
2203 cat conftest.err >&5
2204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2205 (exit $ac_status); } &&
2206 { ac_try='test -z "$ac_c_werror_flag"
2207 || test ! -s conftest.err'
2208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2209 (eval $ac_try) 2>&5
2210 ac_status=$?
2211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2212 (exit $ac_status); }; } &&
2213 { ac_try='test -s conftest.$ac_objext'
2214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2215 (eval $ac_try) 2>&5
2216 ac_status=$?
2217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2218 (exit $ac_status); }; }; then
2219 for ac_declaration in \
2220 '' \
2221 'extern "C" void std::exit (int) throw (); using std::exit;' \
2222 'extern "C" void std::exit (int); using std::exit;' \
2223 'extern "C" void exit (int) throw ();' \
2224 'extern "C" void exit (int);' \
2225 'void exit (int);'
2226do
2227 cat >conftest.$ac_ext <<_ACEOF
2228/* confdefs.h. */
2229_ACEOF
2230cat confdefs.h >>conftest.$ac_ext
2231cat >>conftest.$ac_ext <<_ACEOF
2232/* end confdefs.h. */
2233$ac_declaration
2234#include <stdlib.h>
2235int
2236main ()
2237{
2238exit (42);
2239 ;
2240 return 0;
2241}
2242_ACEOF
2243rm -f conftest.$ac_objext
2244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2245 (eval $ac_compile) 2>conftest.er1
2246 ac_status=$?
2247 grep -v '^ *+' conftest.er1 >conftest.err
2248 rm -f conftest.er1
2249 cat conftest.err >&5
2250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2251 (exit $ac_status); } &&
2252 { ac_try='test -z "$ac_c_werror_flag"
2253 || test ! -s conftest.err'
2254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2255 (eval $ac_try) 2>&5
2256 ac_status=$?
2257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2258 (exit $ac_status); }; } &&
2259 { ac_try='test -s conftest.$ac_objext'
2260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2261 (eval $ac_try) 2>&5
2262 ac_status=$?
2263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2264 (exit $ac_status); }; }; then
2265 :
2266else
2267 echo "$as_me: failed program was:" >&5
2268sed 's/^/| /' conftest.$ac_ext >&5
2269
2270continue
2271fi
2272rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2273 cat >conftest.$ac_ext <<_ACEOF
2274/* confdefs.h. */
2275_ACEOF
2276cat confdefs.h >>conftest.$ac_ext
2277cat >>conftest.$ac_ext <<_ACEOF
2278/* end confdefs.h. */
2279$ac_declaration
2280int
2281main ()
2282{
2283exit (42);
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288rm -f conftest.$ac_objext
2289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2290 (eval $ac_compile) 2>conftest.er1
2291 ac_status=$?
2292 grep -v '^ *+' conftest.er1 >conftest.err
2293 rm -f conftest.er1
2294 cat conftest.err >&5
2295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2296 (exit $ac_status); } &&
2297 { ac_try='test -z "$ac_c_werror_flag"
2298 || test ! -s conftest.err'
2299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2300 (eval $ac_try) 2>&5
2301 ac_status=$?
2302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2303 (exit $ac_status); }; } &&
2304 { ac_try='test -s conftest.$ac_objext'
2305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2306 (eval $ac_try) 2>&5
2307 ac_status=$?
2308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2309 (exit $ac_status); }; }; then
2310 break
2311else
2312 echo "$as_me: failed program was:" >&5
2313sed 's/^/| /' conftest.$ac_ext >&5
2314
2315fi
2316rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2317done
2318rm -f conftest*
2319if test -n "$ac_declaration"; then
2320 echo '#ifdef __cplusplus' >>confdefs.h
2321 echo $ac_declaration >>confdefs.h
2322 echo '#endif' >>confdefs.h
2323fi
2324
2325else
2326 echo "$as_me: failed program was:" >&5
2327sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2328
b4e70030
JB
2329fi
2330rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
2331ac_ext=c
2332ac_cpp='$CPP $CPPFLAGS'
2333ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2334ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2335ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 2336
60ca704f 2337
bec39cab
AC
2338cat >>confdefs.h <<\_ACEOF
2339#define _GNU_SOURCE 1
2340_ACEOF
c906108c
SS
2341
2342
8bb2c122 2343
bec39cab
AC
2344ac_ext=c
2345ac_cpp='$CPP $CPPFLAGS'
2346ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2347ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2348ac_compiler_gnu=$ac_cv_c_compiler_gnu
b4e70030
JB
2349echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2350echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
bec39cab
AC
2351# On Suns, sometimes $CPP names a directory.
2352if test -n "$CPP" && test -d "$CPP"; then
2353 CPP=
8bb2c122 2354fi
bec39cab
AC
2355if test -z "$CPP"; then
2356 if test "${ac_cv_prog_CPP+set}" = set; then
2357 echo $ECHO_N "(cached) $ECHO_C" >&6
2358else
2359 # Double quotes because CPP needs to be expanded
2360 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2361 do
2362 ac_preproc_ok=false
2363for ac_c_preproc_warn_flag in '' yes
2364do
2365 # Use a header file that comes with gcc, so configuring glibc
2366 # with a fresh cross-compiler works.
2367 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2368 # <limits.h> exists even on freestanding compilers.
2369 # On the NeXT, cc -E runs the code through the compiler's parser,
2370 # not just through cpp. "Syntax error" is here to catch this case.
2371 cat >conftest.$ac_ext <<_ACEOF
2372/* confdefs.h. */
2373_ACEOF
2374cat confdefs.h >>conftest.$ac_ext
2375cat >>conftest.$ac_ext <<_ACEOF
2376/* end confdefs.h. */
2377#ifdef __STDC__
2378# include <limits.h>
2379#else
2380# include <assert.h>
2381#endif
2382 Syntax error
2383_ACEOF
2384if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2385 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2386 ac_status=$?
2387 grep -v '^ *+' conftest.er1 >conftest.err
2388 rm -f conftest.er1
2389 cat conftest.err >&5
2390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2391 (exit $ac_status); } >/dev/null; then
2392 if test -s conftest.err; then
2393 ac_cpp_err=$ac_c_preproc_warn_flag
2394 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2395 else
2396 ac_cpp_err=
2397 fi
8bb2c122 2398else
bec39cab 2399 ac_cpp_err=yes
8bb2c122 2400fi
bec39cab
AC
2401if test -z "$ac_cpp_err"; then
2402 :
8bb2c122 2403else
bec39cab
AC
2404 echo "$as_me: failed program was:" >&5
2405sed 's/^/| /' conftest.$ac_ext >&5
2406
2407 # Broken: fails on valid input.
2408continue
2409fi
2410rm -f conftest.err conftest.$ac_ext
2411
b4e70030 2412 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2413 # can be detected and how.
2414 cat >conftest.$ac_ext <<_ACEOF
2415/* confdefs.h. */
2416_ACEOF
2417cat confdefs.h >>conftest.$ac_ext
2418cat >>conftest.$ac_ext <<_ACEOF
2419/* end confdefs.h. */
2420#include <ac_nonexistent.h>
2421_ACEOF
2422if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2423 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2424 ac_status=$?
2425 grep -v '^ *+' conftest.er1 >conftest.err
2426 rm -f conftest.er1
2427 cat conftest.err >&5
2428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2429 (exit $ac_status); } >/dev/null; then
2430 if test -s conftest.err; then
2431 ac_cpp_err=$ac_c_preproc_warn_flag
2432 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2433 else
2434 ac_cpp_err=
2435 fi
8bb2c122 2436else
bec39cab 2437 ac_cpp_err=yes
8bb2c122 2438fi
bec39cab
AC
2439if test -z "$ac_cpp_err"; then
2440 # Broken: success on invalid input.
2441continue
8bb2c122 2442else
bec39cab
AC
2443 echo "$as_me: failed program was:" >&5
2444sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 2445
bec39cab
AC
2446 # Passes both tests.
2447ac_preproc_ok=:
2448break
8bb2c122 2449fi
bec39cab 2450rm -f conftest.err conftest.$ac_ext
8bb2c122 2451
bec39cab
AC
2452done
2453# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2454rm -f conftest.err conftest.$ac_ext
2455if $ac_preproc_ok; then
2456 break
2457fi
8bb2c122 2458
bec39cab
AC
2459 done
2460 ac_cv_prog_CPP=$CPP
ddc9cd0f 2461
c906108c 2462fi
bec39cab
AC
2463 CPP=$ac_cv_prog_CPP
2464else
2465 ac_cv_prog_CPP=$CPP
c906108c 2466fi
b4e70030
JB
2467echo "$as_me:$LINENO: result: $CPP" >&5
2468echo "${ECHO_T}$CPP" >&6
bec39cab
AC
2469ac_preproc_ok=false
2470for ac_c_preproc_warn_flag in '' yes
2471do
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
2474 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2475 # <limits.h> exists even on freestanding compilers.
2476 # On the NeXT, cc -E runs the code through the compiler's parser,
2477 # not just through cpp. "Syntax error" is here to catch this case.
2478 cat >conftest.$ac_ext <<_ACEOF
2479/* confdefs.h. */
2480_ACEOF
2481cat confdefs.h >>conftest.$ac_ext
2482cat >>conftest.$ac_ext <<_ACEOF
2483/* end confdefs.h. */
2484#ifdef __STDC__
2485# include <limits.h>
2486#else
2487# include <assert.h>
2488#endif
2489 Syntax error
2490_ACEOF
2491if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2492 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2493 ac_status=$?
2494 grep -v '^ *+' conftest.er1 >conftest.err
2495 rm -f conftest.er1
2496 cat conftest.err >&5
2497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2498 (exit $ac_status); } >/dev/null; then
2499 if test -s conftest.err; then
2500 ac_cpp_err=$ac_c_preproc_warn_flag
2501 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2502 else
2503 ac_cpp_err=
2504 fi
c906108c 2505else
bec39cab 2506 ac_cpp_err=yes
c906108c 2507fi
bec39cab
AC
2508if test -z "$ac_cpp_err"; then
2509 :
c906108c 2510else
bec39cab
AC
2511 echo "$as_me: failed program was:" >&5
2512sed 's/^/| /' conftest.$ac_ext >&5
2513
2514 # Broken: fails on valid input.
2515continue
2516fi
2517rm -f conftest.err conftest.$ac_ext
2518
b4e70030 2519 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2520 # can be detected and how.
2521 cat >conftest.$ac_ext <<_ACEOF
2522/* confdefs.h. */
2523_ACEOF
2524cat confdefs.h >>conftest.$ac_ext
2525cat >>conftest.$ac_ext <<_ACEOF
2526/* end confdefs.h. */
2527#include <ac_nonexistent.h>
2528_ACEOF
2529if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2530 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2531 ac_status=$?
2532 grep -v '^ *+' conftest.er1 >conftest.err
2533 rm -f conftest.er1
2534 cat conftest.err >&5
2535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2536 (exit $ac_status); } >/dev/null; then
2537 if test -s conftest.err; then
2538 ac_cpp_err=$ac_c_preproc_warn_flag
2539 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2540 else
2541 ac_cpp_err=
2542 fi
c906108c 2543else
bec39cab 2544 ac_cpp_err=yes
c906108c 2545fi
bec39cab
AC
2546if test -z "$ac_cpp_err"; then
2547 # Broken: success on invalid input.
2548continue
c906108c 2549else
bec39cab
AC
2550 echo "$as_me: failed program was:" >&5
2551sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2552
bec39cab
AC
2553 # Passes both tests.
2554ac_preproc_ok=:
2555break
c906108c 2556fi
bec39cab 2557rm -f conftest.err conftest.$ac_ext
c906108c 2558
bec39cab
AC
2559done
2560# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2561rm -f conftest.err conftest.$ac_ext
2562if $ac_preproc_ok; then
c906108c
SS
2563 :
2564else
d5af19ba
DJ
2565 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2566echo "$as_me: error: in \`$ac_pwd':" >&2;}
2567{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
bec39cab
AC
2568See \`config.log' for more details." >&5
2569echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2570See \`config.log' for more details." >&2;}
d5af19ba 2571 { (exit 1); exit 1; }; }; }
c906108c 2572fi
c906108c 2573
bec39cab
AC
2574ac_ext=c
2575ac_cpp='$CPP $CPPFLAGS'
2576ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2577ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2578ac_compiler_gnu=$ac_cv_c_compiler_gnu
2579
2580
b4e70030
JB
2581echo "$as_me:$LINENO: checking for egrep" >&5
2582echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2583if test "${ac_cv_prog_egrep+set}" = set; then
4e8d927d
DJ
2584 echo $ECHO_N "(cached) $ECHO_C" >&6
2585else
b4e70030
JB
2586 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2587 then ac_cv_prog_egrep='grep -E'
2588 else ac_cv_prog_egrep='egrep'
bec39cab 2589 fi
4e8d927d 2590fi
b4e70030
JB
2591echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2592echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2593 EGREP=$ac_cv_prog_egrep
c906108c 2594
bec39cab
AC
2595
2596
b4e70030
JB
2597echo "$as_me:$LINENO: checking for AIX" >&5
2598echo $ECHO_N "checking for AIX... $ECHO_C" >&6
bec39cab
AC
2599cat >conftest.$ac_ext <<_ACEOF
2600/* confdefs.h. */
2601_ACEOF
2602cat confdefs.h >>conftest.$ac_ext
2603cat >>conftest.$ac_ext <<_ACEOF
2604/* end confdefs.h. */
2605#ifdef _AIX
2606 yes
2607#endif
2608
2609_ACEOF
c906108c 2610if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 2611 $EGREP "yes" >/dev/null 2>&1; then
b4e70030
JB
2612 echo "$as_me:$LINENO: result: yes" >&5
2613echo "${ECHO_T}yes" >&6
bec39cab
AC
2614cat >>confdefs.h <<\_ACEOF
2615#define _ALL_SOURCE 1
2616_ACEOF
2617
c906108c 2618else
b4e70030
JB
2619 echo "$as_me:$LINENO: result: no" >&5
2620echo "${ECHO_T}no" >&6
c906108c
SS
2621fi
2622rm -f conftest*
2623
c906108c 2624
b4e70030
JB
2625echo "$as_me:$LINENO: checking for library containing strerror" >&5
2626echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
bec39cab
AC
2627if test "${ac_cv_search_strerror+set}" = set; then
2628 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2629else
bec39cab 2630 ac_func_search_save_LIBS=$LIBS
b4e70030 2631ac_cv_search_strerror=no
bec39cab
AC
2632cat >conftest.$ac_ext <<_ACEOF
2633/* confdefs.h. */
2634_ACEOF
2635cat confdefs.h >>conftest.$ac_ext
2636cat >>conftest.$ac_ext <<_ACEOF
2637/* end confdefs.h. */
c906108c 2638
b4e70030 2639/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
2640#ifdef __cplusplus
2641extern "C"
2642#endif
b4e70030
JB
2643/* We use char because int might match the return type of a gcc2
2644 builtin and then its argument prototype would still apply. */
bec39cab
AC
2645char strerror ();
2646int
2647main ()
2648{
b4e70030 2649strerror ();
bec39cab
AC
2650 ;
2651 return 0;
2652}
2653_ACEOF
b4e70030 2654rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
2655if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2656 (eval $ac_link) 2>conftest.er1
2657 ac_status=$?
2658 grep -v '^ *+' conftest.er1 >conftest.err
2659 rm -f conftest.er1
2660 cat conftest.err >&5
2661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2662 (exit $ac_status); } &&
b4e70030
JB
2663 { ac_try='test -z "$ac_c_werror_flag"
2664 || test ! -s conftest.err'
bec39cab
AC
2665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2666 (eval $ac_try) 2>&5
2667 ac_status=$?
2668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2669 (exit $ac_status); }; } &&
2670 { ac_try='test -s conftest$ac_exeext'
2671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2672 (eval $ac_try) 2>&5
2673 ac_status=$?
2674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2675 (exit $ac_status); }; }; then
b4e70030 2676 ac_cv_search_strerror="none required"
c906108c 2677else
bec39cab
AC
2678 echo "$as_me: failed program was:" >&5
2679sed 's/^/| /' conftest.$ac_ext >&5
c906108c
SS
2680
2681fi
bec39cab 2682rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
2683 conftest$ac_exeext conftest.$ac_ext
2684if test "$ac_cv_search_strerror" = no; then
2685 for ac_lib in cposix; do
2686 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
2687 cat >conftest.$ac_ext <<_ACEOF
2688/* confdefs.h. */
2689_ACEOF
2690cat confdefs.h >>conftest.$ac_ext
2691cat >>conftest.$ac_ext <<_ACEOF
2692/* end confdefs.h. */
2693
2694/* Override any gcc2 internal prototype to avoid an error. */
2695#ifdef __cplusplus
2696extern "C"
2697#endif
2698/* We use char because int might match the return type of a gcc2
2699 builtin and then its argument prototype would still apply. */
2700char strerror ();
2701int
2702main ()
2703{
2704strerror ();
2705 ;
2706 return 0;
2707}
2708_ACEOF
2709rm -f conftest.$ac_objext conftest$ac_exeext
2710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2711 (eval $ac_link) 2>conftest.er1
2712 ac_status=$?
2713 grep -v '^ *+' conftest.er1 >conftest.err
2714 rm -f conftest.er1
2715 cat conftest.err >&5
2716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2717 (exit $ac_status); } &&
2718 { ac_try='test -z "$ac_c_werror_flag"
2719 || test ! -s conftest.err'
2720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2721 (eval $ac_try) 2>&5
2722 ac_status=$?
2723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2724 (exit $ac_status); }; } &&
2725 { ac_try='test -s conftest$ac_exeext'
2726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2727 (eval $ac_try) 2>&5
2728 ac_status=$?
2729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2730 (exit $ac_status); }; }; then
2731 ac_cv_search_strerror="-l$ac_lib"
2732break
4e8d927d 2733else
b4e70030
JB
2734 echo "$as_me: failed program was:" >&5
2735sed 's/^/| /' conftest.$ac_ext >&5
2736
2737fi
2738rm -f conftest.err conftest.$ac_objext \
2739 conftest$ac_exeext conftest.$ac_ext
2740 done
c906108c 2741fi
bec39cab 2742LIBS=$ac_func_search_save_LIBS
c906108c 2743fi
b4e70030
JB
2744echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
2745echo "${ECHO_T}$ac_cv_search_strerror" >&6
2746if test "$ac_cv_search_strerror" != no; then
2747 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
bec39cab 2748
c906108c
SS
2749fi
2750
783e057b
DJ
2751if test -n "$ac_tool_prefix"; then
2752 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2753set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2754echo "$as_me:$LINENO: checking for $ac_word" >&5
2755echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2756if test "${ac_cv_prog_RANLIB+set}" = set; then
2757 echo $ECHO_N "(cached) $ECHO_C" >&6
2758else
2759 if test -n "$RANLIB"; then
2760 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2761else
2762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2763for as_dir in $PATH
2764do
2765 IFS=$as_save_IFS
2766 test -z "$as_dir" && as_dir=.
2767 for ac_exec_ext in '' $ac_executable_extensions; do
2768 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2769 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2770 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2771 break 2
2772 fi
2773done
2774done
c906108c 2775
783e057b
DJ
2776fi
2777fi
2778RANLIB=$ac_cv_prog_RANLIB
2779if test -n "$RANLIB"; then
2780 echo "$as_me:$LINENO: result: $RANLIB" >&5
2781echo "${ECHO_T}$RANLIB" >&6
2782else
2783 echo "$as_me:$LINENO: result: no" >&5
2784echo "${ECHO_T}no" >&6
2785fi
bec39cab 2786
783e057b
DJ
2787fi
2788if test -z "$ac_cv_prog_RANLIB"; then
2789 ac_ct_RANLIB=$RANLIB
2790 # Extract the first word of "ranlib", so it can be a program name with args.
2791set dummy ranlib; ac_word=$2
2792echo "$as_me:$LINENO: checking for $ac_word" >&5
2793echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2794if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
bec39cab 2795 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2796else
783e057b
DJ
2797 if test -n "$ac_ct_RANLIB"; then
2798 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2799else
2800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2801for as_dir in $PATH
bec39cab 2802do
783e057b
DJ
2803 IFS=$as_save_IFS
2804 test -z "$as_dir" && as_dir=.
2805 for ac_exec_ext in '' $ac_executable_extensions; do
2806 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2807 ac_cv_prog_ac_ct_RANLIB="ranlib"
2808 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2809 break 2
2810 fi
2811done
2812done
2813
2814 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2815fi
2816fi
2817ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2818if test -n "$ac_ct_RANLIB"; then
2819 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2820echo "${ECHO_T}$ac_ct_RANLIB" >&6
2821else
2822 echo "$as_me:$LINENO: result: no" >&5
2823echo "${ECHO_T}no" >&6
2824fi
2825
2826 RANLIB=$ac_ct_RANLIB
2827else
2828 RANLIB="$ac_cv_prog_RANLIB"
2829fi
2830
2831echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2832echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2833if test "${ac_cv_header_stdc+set}" = set; then
2834 echo $ECHO_N "(cached) $ECHO_C" >&6
2835else
bec39cab
AC
2836 cat >conftest.$ac_ext <<_ACEOF
2837/* confdefs.h. */
2838_ACEOF
2839cat confdefs.h >>conftest.$ac_ext
2840cat >>conftest.$ac_ext <<_ACEOF
2841/* end confdefs.h. */
783e057b 2842#include <stdlib.h>
bec39cab 2843#include <stdarg.h>
783e057b
DJ
2844#include <string.h>
2845#include <float.h>
c906108c 2846
bec39cab
AC
2847int
2848main ()
2849{
c906108c 2850
bec39cab
AC
2851 ;
2852 return 0;
2853}
2854_ACEOF
2855rm -f conftest.$ac_objext
2856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2857 (eval $ac_compile) 2>conftest.er1
2858 ac_status=$?
2859 grep -v '^ *+' conftest.er1 >conftest.err
2860 rm -f conftest.er1
2861 cat conftest.err >&5
2862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2863 (exit $ac_status); } &&
b4e70030
JB
2864 { ac_try='test -z "$ac_c_werror_flag"
2865 || test ! -s conftest.err'
bec39cab
AC
2866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2867 (eval $ac_try) 2>&5
2868 ac_status=$?
2869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2870 (exit $ac_status); }; } &&
2871 { ac_try='test -s conftest.$ac_objext'
2872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2873 (eval $ac_try) 2>&5
2874 ac_status=$?
2875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2876 (exit $ac_status); }; }; then
783e057b 2877 ac_cv_header_stdc=yes
c906108c 2878else
bec39cab
AC
2879 echo "$as_me: failed program was:" >&5
2880sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2881
783e057b 2882ac_cv_header_stdc=no
c906108c 2883fi
bec39cab 2884rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 2885
783e057b
DJ
2886if test $ac_cv_header_stdc = yes; then
2887 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2888 cat >conftest.$ac_ext <<_ACEOF
2889/* confdefs.h. */
2890_ACEOF
2891cat confdefs.h >>conftest.$ac_ext
2892cat >>conftest.$ac_ext <<_ACEOF
2893/* end confdefs.h. */
2894#include <string.h>
c906108c 2895
783e057b
DJ
2896_ACEOF
2897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2898 $EGREP "memchr" >/dev/null 2>&1; then
2899 :
c906108c 2900else
783e057b 2901 ac_cv_header_stdc=no
c906108c 2902fi
783e057b 2903rm -f conftest*
c906108c
SS
2904
2905fi
2906
783e057b
DJ
2907if test $ac_cv_header_stdc = yes; then
2908 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2909 cat >conftest.$ac_ext <<_ACEOF
2910/* confdefs.h. */
2911_ACEOF
2912cat confdefs.h >>conftest.$ac_ext
2913cat >>conftest.$ac_ext <<_ACEOF
2914/* end confdefs.h. */
2915#include <stdlib.h>
bec39cab 2916
783e057b
DJ
2917_ACEOF
2918if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2919 $EGREP "free" >/dev/null 2>&1; then
2920 :
bec39cab 2921else
783e057b 2922 ac_cv_header_stdc=no
bec39cab 2923fi
783e057b 2924rm -f conftest*
bec39cab
AC
2925
2926fi
bec39cab 2927
783e057b
DJ
2928if test $ac_cv_header_stdc = yes; then
2929 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2930 if test "$cross_compiling" = yes; then
2931 :
bec39cab 2932else
783e057b
DJ
2933 cat >conftest.$ac_ext <<_ACEOF
2934/* confdefs.h. */
2935_ACEOF
2936cat confdefs.h >>conftest.$ac_ext
2937cat >>conftest.$ac_ext <<_ACEOF
2938/* end confdefs.h. */
2939#include <ctype.h>
2940#if ((' ' & 0x0FF) == 0x020)
2941# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2942# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2943#else
2944# define ISLOWER(c) \
2945 (('a' <= (c) && (c) <= 'i') \
2946 || ('j' <= (c) && (c) <= 'r') \
2947 || ('s' <= (c) && (c) <= 'z'))
2948# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2949#endif
2950
2951#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2952int
2953main ()
2954{
2955 int i;
2956 for (i = 0; i < 256; i++)
2957 if (XOR (islower (i), ISLOWER (i))
2958 || toupper (i) != TOUPPER (i))
2959 exit(2);
2960 exit (0);
2961}
2962_ACEOF
2963rm -f conftest$ac_exeext
2964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2965 (eval $ac_link) 2>&5
2966 ac_status=$?
2967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2968 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2970 (eval $ac_try) 2>&5
2971 ac_status=$?
2972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2973 (exit $ac_status); }; }; then
2974 :
2975else
2976 echo "$as_me: program exited with status $ac_status" >&5
2977echo "$as_me: failed program was:" >&5
2978sed 's/^/| /' conftest.$ac_ext >&5
2979
2980( exit $ac_status )
2981ac_cv_header_stdc=no
2982fi
2983rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2984fi
2985fi
2986fi
2987echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2988echo "${ECHO_T}$ac_cv_header_stdc" >&6
2989if test $ac_cv_header_stdc = yes; then
2990
2991cat >>confdefs.h <<\_ACEOF
2992#define STDC_HEADERS 1
2993_ACEOF
2994
2995fi
2996
2997# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3008 inttypes.h stdint.h unistd.h
3009do
3010as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3011echo "$as_me:$LINENO: checking for $ac_header" >&5
3012echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3013if eval "test \"\${$as_ac_Header+set}\" = set"; then
3014 echo $ECHO_N "(cached) $ECHO_C" >&6
3015else
3016 cat >conftest.$ac_ext <<_ACEOF
3017/* confdefs.h. */
3018_ACEOF
3019cat confdefs.h >>conftest.$ac_ext
3020cat >>conftest.$ac_ext <<_ACEOF
3021/* end confdefs.h. */
3022$ac_includes_default
3023
3024#include <$ac_header>
3025_ACEOF
3026rm -f conftest.$ac_objext
3027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3028 (eval $ac_compile) 2>conftest.er1
3029 ac_status=$?
3030 grep -v '^ *+' conftest.er1 >conftest.err
3031 rm -f conftest.er1
3032 cat conftest.err >&5
3033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3034 (exit $ac_status); } &&
3035 { ac_try='test -z "$ac_c_werror_flag"
3036 || test ! -s conftest.err'
3037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3038 (eval $ac_try) 2>&5
3039 ac_status=$?
3040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3041 (exit $ac_status); }; } &&
3042 { ac_try='test -s conftest.$ac_objext'
3043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3044 (eval $ac_try) 2>&5
3045 ac_status=$?
3046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3047 (exit $ac_status); }; }; then
3048 eval "$as_ac_Header=yes"
3049else
3050 echo "$as_me: failed program was:" >&5
3051sed 's/^/| /' conftest.$ac_ext >&5
3052
3053eval "$as_ac_Header=no"
3054fi
3055rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3056fi
3057echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3058echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3059if test `eval echo '${'$as_ac_Header'}'` = yes; then
3060 cat >>confdefs.h <<_ACEOF
3061#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3062_ACEOF
3063
3064fi
3065
3066done
3067
3068
3069
3070 if test "${ac_cv_header_minix_config_h+set}" = set; then
3071 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3072echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3073if test "${ac_cv_header_minix_config_h+set}" = set; then
3074 echo $ECHO_N "(cached) $ECHO_C" >&6
3075fi
3076echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3077echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3078else
3079 # Is the header compilable?
3080echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3081echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3082cat >conftest.$ac_ext <<_ACEOF
3083/* confdefs.h. */
3084_ACEOF
3085cat confdefs.h >>conftest.$ac_ext
3086cat >>conftest.$ac_ext <<_ACEOF
3087/* end confdefs.h. */
3088$ac_includes_default
3089#include <minix/config.h>
3090_ACEOF
3091rm -f conftest.$ac_objext
3092if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3093 (eval $ac_compile) 2>conftest.er1
3094 ac_status=$?
3095 grep -v '^ *+' conftest.er1 >conftest.err
3096 rm -f conftest.er1
3097 cat conftest.err >&5
3098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3099 (exit $ac_status); } &&
3100 { ac_try='test -z "$ac_c_werror_flag"
3101 || test ! -s conftest.err'
3102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3103 (eval $ac_try) 2>&5
3104 ac_status=$?
3105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3106 (exit $ac_status); }; } &&
3107 { ac_try='test -s conftest.$ac_objext'
3108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3109 (eval $ac_try) 2>&5
3110 ac_status=$?
3111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3112 (exit $ac_status); }; }; then
3113 ac_header_compiler=yes
3114else
3115 echo "$as_me: failed program was:" >&5
3116sed 's/^/| /' conftest.$ac_ext >&5
3117
3118ac_header_compiler=no
3119fi
3120rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3121echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3122echo "${ECHO_T}$ac_header_compiler" >&6
3123
3124# Is the header present?
3125echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3126echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3127cat >conftest.$ac_ext <<_ACEOF
3128/* confdefs.h. */
3129_ACEOF
3130cat confdefs.h >>conftest.$ac_ext
3131cat >>conftest.$ac_ext <<_ACEOF
3132/* end confdefs.h. */
3133#include <minix/config.h>
3134_ACEOF
3135if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3136 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3137 ac_status=$?
3138 grep -v '^ *+' conftest.er1 >conftest.err
3139 rm -f conftest.er1
3140 cat conftest.err >&5
3141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3142 (exit $ac_status); } >/dev/null; then
3143 if test -s conftest.err; then
3144 ac_cpp_err=$ac_c_preproc_warn_flag
3145 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3146 else
3147 ac_cpp_err=
3148 fi
3149else
3150 ac_cpp_err=yes
3151fi
3152if test -z "$ac_cpp_err"; then
3153 ac_header_preproc=yes
3154else
3155 echo "$as_me: failed program was:" >&5
3156sed 's/^/| /' conftest.$ac_ext >&5
3157
3158 ac_header_preproc=no
3159fi
3160rm -f conftest.err conftest.$ac_ext
3161echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3162echo "${ECHO_T}$ac_header_preproc" >&6
3163
3164# So? What about this header?
3165case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3166 yes:no: )
3167 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3168echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3169 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
3170echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
3171 ac_header_preproc=yes
3172 ;;
3173 no:yes:* )
3174 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3175echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3176 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3177echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3178 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
3179echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
3180 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
3181echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
3182 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3183echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3184 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
3185echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
3186 (
3187 cat <<\_ASBOX
3188## ------------------------------------------ ##
3189## Report this to the AC_PACKAGE_NAME lists. ##
3190## ------------------------------------------ ##
3191_ASBOX
3192 ) |
3193 sed "s/^/$as_me: WARNING: /" >&2
3194 ;;
3195esac
3196echo "$as_me:$LINENO: checking for minix/config.h" >&5
3197echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3198if test "${ac_cv_header_minix_config_h+set}" = set; then
3199 echo $ECHO_N "(cached) $ECHO_C" >&6
3200else
3201 ac_cv_header_minix_config_h=$ac_header_preproc
3202fi
3203echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3204echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3205
3206fi
3207if test $ac_cv_header_minix_config_h = yes; then
3208 MINIX=yes
3209else
3210 MINIX=
3211fi
3212
3213
3214 if test "$MINIX" = yes; then
3215
3216cat >>confdefs.h <<\_ACEOF
3217#define _POSIX_SOURCE 1
3218_ACEOF
3219
3220
3221cat >>confdefs.h <<\_ACEOF
3222#define _POSIX_1_SOURCE 2
3223_ACEOF
3224
3225
3226cat >>confdefs.h <<\_ACEOF
3227#define _MINIX 1
3228_ACEOF
3229
3230 fi
3231
3232
3233
3234 echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
3235echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
3236if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
3237 echo $ECHO_N "(cached) $ECHO_C" >&6
3238else
3239 cat >conftest.$ac_ext <<_ACEOF
3240/* confdefs.h. */
3241_ACEOF
3242cat confdefs.h >>conftest.$ac_ext
3243cat >>conftest.$ac_ext <<_ACEOF
3244/* end confdefs.h. */
3245
3246# define __EXTENSIONS__ 1
3247 $ac_includes_default
3248int
3249main ()
3250{
3251
3252 ;
3253 return 0;
3254}
3255_ACEOF
3256rm -f conftest.$ac_objext
3257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3258 (eval $ac_compile) 2>conftest.er1
3259 ac_status=$?
3260 grep -v '^ *+' conftest.er1 >conftest.err
3261 rm -f conftest.er1
3262 cat conftest.err >&5
3263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3264 (exit $ac_status); } &&
3265 { ac_try='test -z "$ac_c_werror_flag"
3266 || test ! -s conftest.err'
3267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3268 (eval $ac_try) 2>&5
3269 ac_status=$?
3270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3271 (exit $ac_status); }; } &&
3272 { ac_try='test -s conftest.$ac_objext'
3273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3274 (eval $ac_try) 2>&5
3275 ac_status=$?
3276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3277 (exit $ac_status); }; }; then
3278 ac_cv_safe_to_define___extensions__=yes
3279else
3280 echo "$as_me: failed program was:" >&5
3281sed 's/^/| /' conftest.$ac_ext >&5
3282
3283ac_cv_safe_to_define___extensions__=no
3284fi
3285rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3286fi
3287echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
3288echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
3289 test $ac_cv_safe_to_define___extensions__ = yes &&
3290 cat >>confdefs.h <<\_ACEOF
3291#define __EXTENSIONS__ 1
3292_ACEOF
3293
3294 cat >>confdefs.h <<\_ACEOF
3295#define _ALL_SOURCE 1
3296_ACEOF
3297
3298 cat >>confdefs.h <<\_ACEOF
3299#define _GNU_SOURCE 1
3300_ACEOF
3301
3302 cat >>confdefs.h <<\_ACEOF
3303#define _POSIX_PTHREAD_SEMANTICS 1
3304_ACEOF
3305
3306 cat >>confdefs.h <<\_ACEOF
3307#define _TANDEM_SOURCE 1
3308_ACEOF
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5
3320echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
3321if test "${am_cv_prog_cc_stdc+set}" = set; then
3322 echo $ECHO_N "(cached) $ECHO_C" >&6
3323else
3324 am_cv_prog_cc_stdc=no
3325ac_save_CC="$CC"
3326# Don't try gcc -ansi; that turns off useful extensions and
3327# breaks some systems' header files.
3328# AIX -qlanglvl=ansi
3329# Ultrix and OSF/1 -std1
3330# HP-UX 10.20 and later -Ae
3331# HP-UX older versions -Aa -D_HPUX_SOURCE
3332# SVR4 -Xc -D__EXTENSIONS__
3333for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3334do
3335 CC="$ac_save_CC $ac_arg"
3336 cat >conftest.$ac_ext <<_ACEOF
3337/* confdefs.h. */
3338_ACEOF
3339cat confdefs.h >>conftest.$ac_ext
3340cat >>conftest.$ac_ext <<_ACEOF
3341/* end confdefs.h. */
3342#include <stdarg.h>
3343#include <stdio.h>
3344#include <sys/types.h>
3345#include <sys/stat.h>
3346/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3347struct buf { int x; };
3348FILE * (*rcsopen) (struct buf *, struct stat *, int);
3349static char *e (p, i)
3350 char **p;
3351 int i;
3352{
3353 return p[i];
3354}
3355static char *f (char * (*g) (char **, int), char **p, ...)
3356{
3357 char *s;
3358 va_list v;
3359 va_start (v,p);
3360 s = g (p, va_arg (v,int));
3361 va_end (v);
3362 return s;
3363}
3364int test (int i, double x);
3365struct s1 {int (*f) (int a);};
3366struct s2 {int (*f) (double a);};
3367int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3368int argc;
3369char **argv;
3370
3371int
3372main ()
3373{
3374
3375return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3376
3377 ;
3378 return 0;
3379}
3380_ACEOF
3381rm -f conftest.$ac_objext
3382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3383 (eval $ac_compile) 2>conftest.er1
3384 ac_status=$?
3385 grep -v '^ *+' conftest.er1 >conftest.err
3386 rm -f conftest.er1
3387 cat conftest.err >&5
3388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3389 (exit $ac_status); } &&
3390 { ac_try='test -z "$ac_c_werror_flag"
3391 || test ! -s conftest.err'
3392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3393 (eval $ac_try) 2>&5
3394 ac_status=$?
3395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3396 (exit $ac_status); }; } &&
3397 { ac_try='test -s conftest.$ac_objext'
3398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3399 (eval $ac_try) 2>&5
3400 ac_status=$?
3401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3402 (exit $ac_status); }; }; then
3403 am_cv_prog_cc_stdc="$ac_arg"; break
3404else
3405 echo "$as_me: failed program was:" >&5
3406sed 's/^/| /' conftest.$ac_ext >&5
3407
3408fi
3409rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3410done
3411CC="$ac_save_CC"
3412
3413fi
3414
3415if test -z "$am_cv_prog_cc_stdc"; then
3416 echo "$as_me:$LINENO: result: none needed" >&5
3417echo "${ECHO_T}none needed" >&6
3418else
3419 echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5
3420echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6
3421fi
3422case "x$am_cv_prog_cc_stdc" in
3423 x|xno) ;;
3424 *) CC="$CC $am_cv_prog_cc_stdc" ;;
3425esac
3426
3427
3428ac_aux_dir=
3429for ac_dir in .. $srcdir/..; do
3430 if test -f $ac_dir/install-sh; then
3431 ac_aux_dir=$ac_dir
3432 ac_install_sh="$ac_aux_dir/install-sh -c"
3433 break
3434 elif test -f $ac_dir/install.sh; then
3435 ac_aux_dir=$ac_dir
3436 ac_install_sh="$ac_aux_dir/install.sh -c"
3437 break
3438 elif test -f $ac_dir/shtool; then
3439 ac_aux_dir=$ac_dir
3440 ac_install_sh="$ac_aux_dir/shtool install -c"
3441 break
3442 fi
3443done
3444if test -z "$ac_aux_dir"; then
3445 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5
3446echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;}
3447 { (exit 1); exit 1; }; }
3448fi
3449ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3450ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3451ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
3452
3453# Make sure we can run config.sub.
3454$ac_config_sub sun4 >/dev/null 2>&1 ||
3455 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
3456echo "$as_me: error: cannot run $ac_config_sub" >&2;}
3457 { (exit 1); exit 1; }; }
3458
3459echo "$as_me:$LINENO: checking build system type" >&5
3460echo $ECHO_N "checking build system type... $ECHO_C" >&6
3461if test "${ac_cv_build+set}" = set; then
3462 echo $ECHO_N "(cached) $ECHO_C" >&6
3463else
3464 ac_cv_build_alias=$build_alias
3465test -z "$ac_cv_build_alias" &&
3466 ac_cv_build_alias=`$ac_config_guess`
3467test -z "$ac_cv_build_alias" &&
3468 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
3469echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
3470 { (exit 1); exit 1; }; }
3471ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
3472 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
3473echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
3474 { (exit 1); exit 1; }; }
3475
3476fi
3477echo "$as_me:$LINENO: result: $ac_cv_build" >&5
3478echo "${ECHO_T}$ac_cv_build" >&6
3479build=$ac_cv_build
3480build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3481build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3482build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3483
3484
3485echo "$as_me:$LINENO: checking host system type" >&5
3486echo $ECHO_N "checking host system type... $ECHO_C" >&6
3487if test "${ac_cv_host+set}" = set; then
3488 echo $ECHO_N "(cached) $ECHO_C" >&6
3489else
3490 ac_cv_host_alias=$host_alias
3491test -z "$ac_cv_host_alias" &&
3492 ac_cv_host_alias=$ac_cv_build_alias
3493ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
3494 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
3495echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
3496 { (exit 1); exit 1; }; }
3497
3498fi
3499echo "$as_me:$LINENO: result: $ac_cv_host" >&5
3500echo "${ECHO_T}$ac_cv_host" >&6
3501host=$ac_cv_host
3502host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3503host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3504host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3505
3506
3507echo "$as_me:$LINENO: checking target system type" >&5
3508echo $ECHO_N "checking target system type... $ECHO_C" >&6
3509if test "${ac_cv_target+set}" = set; then
3510 echo $ECHO_N "(cached) $ECHO_C" >&6
3511else
3512 ac_cv_target_alias=$target_alias
3513test "x$ac_cv_target_alias" = "x" &&
b4e70030
JB
3514 ac_cv_target_alias=$ac_cv_host_alias
3515ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
3516 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
3517echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
bec39cab
AC
3518 { (exit 1); exit 1; }; }
3519
3520fi
783e057b
DJ
3521echo "$as_me:$LINENO: result: $ac_cv_target" >&5
3522echo "${ECHO_T}$ac_cv_target" >&6
3523target=$ac_cv_target
3524target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3525target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3526target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3527
3528
3529# The aliases save the names the user supplied, while $host etc.
3530# will get canonicalized.
3531test -n "$target_alias" &&
3532 test "$program_prefix$program_suffix$program_transform_name" = \
3533 NONENONEs,x,x, &&
3534 program_prefix=${target_alias}-
3535
a417dc56
RW
3536# Dependency checking.
3537rm -rf .tst 2>/dev/null
3538mkdir .tst 2>/dev/null
3539if test -d .tst; then
3540 am__leading_dot=.
3541else
3542 am__leading_dot=_
3543fi
3544rmdir .tst 2>/dev/null
3545
3546DEPDIR="${am__leading_dot}deps"
3547
3548 ac_config_commands="$ac_config_commands depdir"
3549
3550
3551depcc="$CC" am_compiler_list=
3552
3553am_depcomp=$ac_aux_dir/depcomp
3554echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
3555echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
3556if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
3557 echo $ECHO_N "(cached) $ECHO_C" >&6
3558else
3559 if test -f "$am_depcomp"; then
3560 # We make a subdir and do the tests there. Otherwise we can end up
3561 # making bogus files that we don't know about and never remove. For
3562 # instance it was reported that on HP-UX the gcc test will end up
3563 # making a dummy file named `D' -- because `-MD' means `put the output
3564 # in D'.
3565 mkdir conftest.dir
3566 # Copy depcomp to subdir because otherwise we won't find it if we're
3567 # using a relative directory.
3568 cp "$am_depcomp" conftest.dir
3569 cd conftest.dir
3570 # We will build objects and dependencies in a subdirectory because
3571 # it helps to detect inapplicable dependency modes. For instance
3572 # both Tru64's cc and ICC support -MD to output dependencies as a
3573 # side effect of compilation, but ICC will put the dependencies in
3574 # the current directory while Tru64 will put them in the object
3575 # directory.
3576 mkdir sub
3577
3578 am_cv_CC_dependencies_compiler_type=none
3579 if test "$am_compiler_list" = ""; then
3580 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3581 fi
3582 for depmode in $am_compiler_list; do
3583 if test $depmode = none; then break; fi
3584
3585 echo "$as_me:$LINENO: trying $depmode" >&5
3586 # Setup a source with many dependencies, because some compilers
3587 # like to wrap large dependency lists on column 80 (with \), and
3588 # we should not choose a depcomp mode which is confused by this.
3589 #
3590 # We need to recreate these files for each test, as the compiler may
3591 # overwrite some of them when testing with obscure command lines.
3592 # This happens at least with the AIX C compiler.
3593 : > sub/conftest.c
3594 for i in 1 2 3 4 5 6; do
3595 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3596 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3597 # Solaris 8's {/usr,}/bin/sh.
3598 touch sub/conftst$i.h
3599 done
3600 echo "include sub/conftest.Po" > confmf
3601
3602 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3603 # mode. It turns out that the SunPro C++ compiler does not properly
3604 # handle `-M -o', and we need to detect this.
3605 depcmd="depmode=$depmode \
3606 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
3607 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3608 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
3609 echo "| $depcmd" | sed -e 's/ */ /g' >&5
3610 if env $depcmd > conftest.err 2>&1 &&
3611 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
3612 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
3613 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
3614 # icc doesn't choke on unknown options, it will just issue warnings
3615 # or remarks (even with -Werror). So we grep stderr for any message
3616 # that says an option was ignored or not supported.
3617 # When given -MP, icc 7.0 and 7.1 complain thusly:
3618 # icc: Command line warning: ignoring option '-M'; no argument required
3619 # The diagnosis changed in icc 8.0:
3620 # icc: Command line remark: option '-MP' not supported
3621 if (grep 'ignoring option' conftest.err ||
3622 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3623 am_cv_CC_dependencies_compiler_type=$depmode
3624 echo "$as_me:$LINENO: success" >&5
3625 break
3626 fi
3627 fi
3628 echo "$as_me:$LINENO: failure, diagnostics are:" >&5
3629 sed -e 's/^/| /' < conftest.err >&5
3630 done
3631
3632 cd ..
3633 rm -rf conftest.dir
3634else
3635 am_cv_CC_dependencies_compiler_type=none
3636fi
3637
3638fi
3639echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3640echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
3641if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
3642then { { echo "$as_me:$LINENO: error: no usable dependency style found" >&5
3643echo "$as_me: error: no usable dependency style found" >&2;}
3644 { (exit 1); exit 1; }; }
3645else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3646
3647fi
3648
3649
3650# Check for the 'make' the user wants to use.
3651for ac_prog in make
3652do
3653 # Extract the first word of "$ac_prog", so it can be a program name with args.
3654set dummy $ac_prog; ac_word=$2
3655echo "$as_me:$LINENO: checking for $ac_word" >&5
3656echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3657if test "${ac_cv_prog_MAKE+set}" = set; then
3658 echo $ECHO_N "(cached) $ECHO_C" >&6
3659else
3660 if test -n "$MAKE"; then
3661 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
3662else
3663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3664for as_dir in $PATH
3665do
3666 IFS=$as_save_IFS
3667 test -z "$as_dir" && as_dir=.
3668 for ac_exec_ext in '' $ac_executable_extensions; do
3669 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3670 ac_cv_prog_MAKE="$ac_prog"
3671 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3672 break 2
3673 fi
3674done
3675done
3676
3677fi
3678fi
3679MAKE=$ac_cv_prog_MAKE
3680if test -n "$MAKE"; then
3681 echo "$as_me:$LINENO: result: $MAKE" >&5
3682echo "${ECHO_T}$MAKE" >&6
3683else
3684 echo "$as_me:$LINENO: result: no" >&5
3685echo "${ECHO_T}no" >&6
3686fi
3687
3688 test -n "$MAKE" && break
3689done
3690
3691MAKE_IS_GNU=
3692case "`$MAKE --version 2>&1 | sed 1q`" in
3693 *GNU*)
3694 MAKE_IS_GNU=yes
3695 ;;
3696esac
3697
3698
3699if test "$MAKE_IS_GNU" = yes; then
3700 GMAKE_TRUE=
3701 GMAKE_FALSE='#'
3702else
3703 GMAKE_TRUE='#'
3704 GMAKE_FALSE=
3705fi
3706
3707echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3708echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3709set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3710if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3711 echo $ECHO_N "(cached) $ECHO_C" >&6
3712else
3713 cat >conftest.make <<\_ACEOF
3714all:
3715 @echo 'ac_maketemp="$(MAKE)"'
3716_ACEOF
3717# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3718eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3719if test -n "$ac_maketemp"; then
3720 eval ac_cv_prog_make_${ac_make}_set=yes
3721else
3722 eval ac_cv_prog_make_${ac_make}_set=no
3723fi
3724rm -f conftest.make
3725fi
3726if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3727 echo "$as_me:$LINENO: result: yes" >&5
3728echo "${ECHO_T}yes" >&6
3729 SET_MAKE=
3730else
3731 echo "$as_me:$LINENO: result: no" >&5
3732echo "${ECHO_T}no" >&6
3733 SET_MAKE="MAKE=${MAKE-make}"
3734fi
3735
3736
783e057b
DJ
3737
3738CONFIG_OBS=
3739CONFIG_DEPS=
3740CONFIG_SRCS=
3741ENABLE_CFLAGS=
3742
3743CONFIG_ALL=
3744CONFIG_CLEAN=
3745CONFIG_INSTALL=
3746CONFIG_UNINSTALL=
3747
3748# If we haven't got the data from the intl directory,
3749# assume NLS is disabled.
3750USE_NLS=no
3751LIBINTL=
3752LIBINTL_DEP=
3753INCINTL=
3754XGETTEXT=
3755GMSGFMT=
3756POSUB=
3757
3758if test -f ../intl/config.intl; then
3759 . ../intl/config.intl
3760fi
3761echo "$as_me:$LINENO: checking whether NLS is requested" >&5
3762echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
3763if test x"$USE_NLS" != xyes; then
3764 echo "$as_me:$LINENO: result: no" >&5
3765echo "${ECHO_T}no" >&6
3766else
3767 echo "$as_me:$LINENO: result: yes" >&5
3768echo "${ECHO_T}yes" >&6
3769
3770cat >>confdefs.h <<\_ACEOF
3771#define ENABLE_NLS 1
3772_ACEOF
3773
3774
3775 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
3776echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
3777 # Look for .po and .gmo files in the source directory.
3778 CATALOGS=
3779 XLINGUAS=
3780 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
3781 # If there aren't any .gmo files the shell will give us the
3782 # literal string "../path/to/srcdir/po/*.gmo" which has to be
3783 # weeded out.
3784 case "$cat" in *\**)
3785 continue;;
3786 esac
3787 # The quadruple backslash is collapsed to a double backslash
3788 # by the backticks, then collapsed again by the double quotes,
3789 # leaving us with one backslash in the sed expression (right
3790 # before the dot that mustn't act as a wildcard).
3791 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
3792 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
3793 # The user is allowed to set LINGUAS to a list of languages to
3794 # install catalogs for. If it's empty that means "all of them."
3795 if test "x$LINGUAS" = x; then
3796 CATALOGS="$CATALOGS $cat"
3797 XLINGUAS="$XLINGUAS $lang"
3798 else
3799 case "$LINGUAS" in *$lang*)
3800 CATALOGS="$CATALOGS $cat"
3801 XLINGUAS="$XLINGUAS $lang"
3802 ;;
3803 esac
3804 fi
3805 done
3806 LINGUAS="$XLINGUAS"
3807 echo "$as_me:$LINENO: result: $LINGUAS" >&5
3808echo "${ECHO_T}$LINGUAS" >&6
3809
3810
3811 DATADIRNAME=share
3812
3813 INSTOBJEXT=.mo
3814
3815 GENCAT=gencat
3816
3817 CATOBJEXT=.gmo
3818
3819fi
3820
3821localedir='${datadir}/locale'
3822
3823
3824if test x"$USE_NLS" = xyes; then
3825 CONFIG_ALL="$CONFIG_ALL all-po"
3826 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
3827 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
3828 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
3829fi
3830
3831
3832 GNULIB_MEMMEM=0;
3833 GNULIB_MEMPCPY=0;
3834 GNULIB_MEMRCHR=0;
3835 GNULIB_STPCPY=0;
3836 GNULIB_STPNCPY=0;
3837 GNULIB_STRCHRNUL=0;
3838 GNULIB_STRDUP=0;
3839 GNULIB_STRNDUP=0;
3840 GNULIB_STRNLEN=0;
3841 GNULIB_STRPBRK=0;
3842 GNULIB_STRSEP=0;
3843 GNULIB_STRSTR=0;
3844 GNULIB_STRCASESTR=0;
3845 GNULIB_STRTOK_R=0;
3846 GNULIB_MBSLEN=0;
3847 GNULIB_MBSNLEN=0;
3848 GNULIB_MBSCHR=0;
3849 GNULIB_MBSRCHR=0;
3850 GNULIB_MBSSTR=0;
3851 GNULIB_MBSCASECMP=0;
3852 GNULIB_MBSNCASECMP=0;
3853 GNULIB_MBSPCASECMP=0;
3854 GNULIB_MBSCASESTR=0;
3855 GNULIB_MBSCSPN=0;
3856 GNULIB_MBSPBRK=0;
3857 GNULIB_MBSSPN=0;
3858 GNULIB_MBSSEP=0;
3859 GNULIB_MBSTOK_R=0;
3860 GNULIB_STRERROR=0;
3861 GNULIB_STRSIGNAL=0;
3862 HAVE_DECL_MEMMEM=1;
3863 HAVE_MEMPCPY=1;
3864 HAVE_DECL_MEMRCHR=1;
3865 HAVE_STPCPY=1;
3866 HAVE_STPNCPY=1;
3867 HAVE_STRCHRNUL=1;
3868 HAVE_DECL_STRDUP=1;
3869 HAVE_STRNDUP=1;
3870 HAVE_DECL_STRNDUP=1;
3871 HAVE_DECL_STRNLEN=1;
3872 HAVE_STRPBRK=1;
3873 HAVE_STRSEP=1;
3874 HAVE_STRCASESTR=1;
3875 HAVE_DECL_STRTOK_R=1;
3876 HAVE_DECL_STRERROR=1;
3877 HAVE_DECL_STRSIGNAL=1;
3878 REPLACE_STRERROR=0;
3879 REPLACE_STRSIGNAL=0;
3880 REPLACE_MEMMEM=0;
3881 REPLACE_STRCASESTR=0;
3882 REPLACE_STRSTR=0;
3883
3884
3885 echo "$as_me:$LINENO: checking whether memmem is declared" >&5
3886echo $ECHO_N "checking whether memmem is declared... $ECHO_C" >&6
3887if test "${ac_cv_have_decl_memmem+set}" = set; then
3888 echo $ECHO_N "(cached) $ECHO_C" >&6
3889else
3890 cat >conftest.$ac_ext <<_ACEOF
3891/* confdefs.h. */
3892_ACEOF
3893cat confdefs.h >>conftest.$ac_ext
3894cat >>conftest.$ac_ext <<_ACEOF
3895/* end confdefs.h. */
3896$ac_includes_default
3897int
3898main ()
3899{
3900#ifndef memmem
3901 char *p = (char *) memmem;
3902#endif
3903
3904 ;
3905 return 0;
3906}
3907_ACEOF
3908rm -f conftest.$ac_objext
3909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3910 (eval $ac_compile) 2>conftest.er1
3911 ac_status=$?
3912 grep -v '^ *+' conftest.er1 >conftest.err
3913 rm -f conftest.er1
3914 cat conftest.err >&5
3915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3916 (exit $ac_status); } &&
3917 { ac_try='test -z "$ac_c_werror_flag"
3918 || test ! -s conftest.err'
3919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3920 (eval $ac_try) 2>&5
3921 ac_status=$?
3922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3923 (exit $ac_status); }; } &&
3924 { ac_try='test -s conftest.$ac_objext'
3925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3926 (eval $ac_try) 2>&5
3927 ac_status=$?
3928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3929 (exit $ac_status); }; }; then
3930 ac_cv_have_decl_memmem=yes
3931else
3932 echo "$as_me: failed program was:" >&5
3933sed 's/^/| /' conftest.$ac_ext >&5
3934
3935ac_cv_have_decl_memmem=no
3936fi
3937rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3938fi
3939echo "$as_me:$LINENO: result: $ac_cv_have_decl_memmem" >&5
3940echo "${ECHO_T}$ac_cv_have_decl_memmem" >&6
3941if test $ac_cv_have_decl_memmem = yes; then
3942
3943cat >>confdefs.h <<_ACEOF
3944#define HAVE_DECL_MEMMEM 1
3945_ACEOF
3946
3947
3948else
3949 cat >>confdefs.h <<_ACEOF
3950#define HAVE_DECL_MEMMEM 0
3951_ACEOF
3952
3953
3954fi
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970for ac_func in memmem
3971do
3972as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3973echo "$as_me:$LINENO: checking for $ac_func" >&5
3974echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3975if eval "test \"\${$as_ac_var+set}\" = set"; then
3976 echo $ECHO_N "(cached) $ECHO_C" >&6
3977else
3978 cat >conftest.$ac_ext <<_ACEOF
3979/* confdefs.h. */
3980_ACEOF
3981cat confdefs.h >>conftest.$ac_ext
3982cat >>conftest.$ac_ext <<_ACEOF
3983/* end confdefs.h. */
3984/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
3985 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3986#define $ac_func innocuous_$ac_func
3987
3988/* System header to define __stub macros and hopefully few prototypes,
3989 which can conflict with char $ac_func (); below.
3990 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3991 <limits.h> exists even on freestanding compilers. */
3992
3993#ifdef __STDC__
3994# include <limits.h>
3995#else
3996# include <assert.h>
3997#endif
3998
3999#undef $ac_func
4000
4001/* Override any gcc2 internal prototype to avoid an error. */
4002#ifdef __cplusplus
4003extern "C"
4004{
4005#endif
4006/* We use char because int might match the return type of a gcc2
4007 builtin and then its argument prototype would still apply. */
4008char $ac_func ();
4009/* The GNU C library defines this for functions which it implements
4010 to always fail with ENOSYS. Some functions are actually named
4011 something starting with __ and the normal name is an alias. */
4012#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4013choke me
4014#else
4015char (*f) () = $ac_func;
4016#endif
4017#ifdef __cplusplus
4018}
4019#endif
4020
4021int
4022main ()
4023{
4024return f != $ac_func;
4025 ;
4026 return 0;
4027}
4028_ACEOF
4029rm -f conftest.$ac_objext conftest$ac_exeext
4030if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4031 (eval $ac_link) 2>conftest.er1
4032 ac_status=$?
4033 grep -v '^ *+' conftest.er1 >conftest.err
4034 rm -f conftest.er1
4035 cat conftest.err >&5
4036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4037 (exit $ac_status); } &&
4038 { ac_try='test -z "$ac_c_werror_flag"
4039 || test ! -s conftest.err'
4040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4041 (eval $ac_try) 2>&5
4042 ac_status=$?
4043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4044 (exit $ac_status); }; } &&
4045 { ac_try='test -s conftest$ac_exeext'
4046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4047 (eval $ac_try) 2>&5
4048 ac_status=$?
4049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4050 (exit $ac_status); }; }; then
4051 eval "$as_ac_var=yes"
4052else
4053 echo "$as_me: failed program was:" >&5
4054sed 's/^/| /' conftest.$ac_ext >&5
4055
4056eval "$as_ac_var=no"
4057fi
4058rm -f conftest.err conftest.$ac_objext \
4059 conftest$ac_exeext conftest.$ac_ext
4060fi
4061echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4062echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4063if test `eval echo '${'$as_ac_var'}'` = yes; then
4064 cat >>confdefs.h <<_ACEOF
4065#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4066_ACEOF
4067
4068else
4069
4070 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4071
4072fi
4073done
4074
4075
4076
4077 :
4078
4079
4080
4081
4082
4083 if test $ac_cv_have_decl_memmem = no; then
4084 HAVE_DECL_MEMMEM=0
4085 fi
4086 :
4087
4088
4089 echo "$as_me:$LINENO: checking for long long int" >&5
4090echo $ECHO_N "checking for long long int... $ECHO_C" >&6
4091if test "${ac_cv_type_long_long_int+set}" = set; then
4092 echo $ECHO_N "(cached) $ECHO_C" >&6
4093else
4094 cat >conftest.$ac_ext <<_ACEOF
4095
4096 /* confdefs.h. */
4097_ACEOF
4098cat confdefs.h >>conftest.$ac_ext
4099cat >>conftest.$ac_ext <<_ACEOF
4100/* end confdefs.h. */
4101/* For now, do not test the preprocessor; as of 2007 there are too many
4102 implementations with broken preprocessors. Perhaps this can
4103 be revisited in 2012. In the meantime, code should not expect
4104 #if to work with literals wider than 32 bits. */
4105 /* Test literals. */
4106 long long int ll = 9223372036854775807ll;
4107 long long int nll = -9223372036854775807LL;
4108 unsigned long long int ull = 18446744073709551615ULL;
4109 /* Test constant expressions. */
4110 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4111 ? 1 : -1)];
4112 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4113 ? 1 : -1)];
4114 int i = 63;
4115int
4116main ()
4117{
4118/* Test availability of runtime routines for shift and division. */
4119 long long int llmax = 9223372036854775807ll;
4120 unsigned long long int ullmax = 18446744073709551615ull;
4121 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4122 | (llmax / ll) | (llmax % ll)
4123 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4124 | (ullmax / ull) | (ullmax % ull));
4125 ;
4126 return 0;
4127}
4128
4129_ACEOF
4130rm -f conftest.$ac_objext conftest$ac_exeext
4131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4132 (eval $ac_link) 2>conftest.er1
4133 ac_status=$?
4134 grep -v '^ *+' conftest.er1 >conftest.err
4135 rm -f conftest.er1
4136 cat conftest.err >&5
4137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4138 (exit $ac_status); } &&
4139 { ac_try='test -z "$ac_c_werror_flag"
4140 || test ! -s conftest.err'
4141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4142 (eval $ac_try) 2>&5
4143 ac_status=$?
4144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4145 (exit $ac_status); }; } &&
4146 { ac_try='test -s conftest$ac_exeext'
4147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4148 (eval $ac_try) 2>&5
4149 ac_status=$?
4150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4151 (exit $ac_status); }; }; then
4152 if test "$cross_compiling" = yes; then
4153 ac_cv_type_long_long_int=yes
4154else
4155 cat >conftest.$ac_ext <<_ACEOF
4156/* confdefs.h. */
4157_ACEOF
4158cat confdefs.h >>conftest.$ac_ext
4159cat >>conftest.$ac_ext <<_ACEOF
4160/* end confdefs.h. */
4161#include <limits.h>
4162 #ifndef LLONG_MAX
4163 # define HALF \
4164 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4165 # define LLONG_MAX (HALF - 1 + HALF)
4166 #endif
4167int
4168main ()
4169{
4170long long int n = 1;
4171 int i;
4172 for (i = 0; ; i++)
4173 {
4174 long long int m = n << i;
4175 if (m >> i != n)
4176 return 1;
4177 if (LLONG_MAX / 2 < m)
4178 break;
4179 }
4180 return 0;
4181 ;
4182 return 0;
4183}
4184_ACEOF
4185rm -f conftest$ac_exeext
4186if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4187 (eval $ac_link) 2>&5
4188 ac_status=$?
4189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4190 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4192 (eval $ac_try) 2>&5
4193 ac_status=$?
4194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195 (exit $ac_status); }; }; then
4196 ac_cv_type_long_long_int=yes
4197else
4198 echo "$as_me: program exited with status $ac_status" >&5
4199echo "$as_me: failed program was:" >&5
4200sed 's/^/| /' conftest.$ac_ext >&5
4201
4202( exit $ac_status )
4203ac_cv_type_long_long_int=no
4204fi
4205rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4206fi
4207else
4208 echo "$as_me: failed program was:" >&5
4209sed 's/^/| /' conftest.$ac_ext >&5
4210
4211ac_cv_type_long_long_int=no
4212fi
4213rm -f conftest.err conftest.$ac_objext \
4214 conftest$ac_exeext conftest.$ac_ext
4215fi
4216echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
4217echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
4218 if test $ac_cv_type_long_long_int = yes; then
4219
4220cat >>confdefs.h <<\_ACEOF
4221#define HAVE_LONG_LONG_INT 1
4222_ACEOF
4223
4224 fi
4225
4226
4227 echo "$as_me:$LINENO: checking for unsigned long long int" >&5
4228echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6
4229if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
4230 echo $ECHO_N "(cached) $ECHO_C" >&6
4231else
4232 cat >conftest.$ac_ext <<_ACEOF
4233
4234 /* confdefs.h. */
4235_ACEOF
4236cat confdefs.h >>conftest.$ac_ext
4237cat >>conftest.$ac_ext <<_ACEOF
4238/* end confdefs.h. */
4239/* For now, do not test the preprocessor; as of 2007 there are too many
4240 implementations with broken preprocessors. Perhaps this can
4241 be revisited in 2012. In the meantime, code should not expect
4242 #if to work with literals wider than 32 bits. */
4243 /* Test literals. */
4244 long long int ll = 9223372036854775807ll;
4245 long long int nll = -9223372036854775807LL;
4246 unsigned long long int ull = 18446744073709551615ULL;
4247 /* Test constant expressions. */
4248 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4249 ? 1 : -1)];
4250 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4251 ? 1 : -1)];
4252 int i = 63;
4253int
4254main ()
4255{
4256/* Test availability of runtime routines for shift and division. */
4257 long long int llmax = 9223372036854775807ll;
4258 unsigned long long int ullmax = 18446744073709551615ull;
4259 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4260 | (llmax / ll) | (llmax % ll)
4261 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4262 | (ullmax / ull) | (ullmax % ull));
4263 ;
4264 return 0;
4265}
4266
4267_ACEOF
4268rm -f conftest.$ac_objext conftest$ac_exeext
4269if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4270 (eval $ac_link) 2>conftest.er1
4271 ac_status=$?
4272 grep -v '^ *+' conftest.er1 >conftest.err
4273 rm -f conftest.er1
4274 cat conftest.err >&5
4275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4276 (exit $ac_status); } &&
4277 { ac_try='test -z "$ac_c_werror_flag"
4278 || test ! -s conftest.err'
4279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4280 (eval $ac_try) 2>&5
4281 ac_status=$?
4282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4283 (exit $ac_status); }; } &&
4284 { ac_try='test -s conftest$ac_exeext'
4285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4286 (eval $ac_try) 2>&5
4287 ac_status=$?
4288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4289 (exit $ac_status); }; }; then
4290 ac_cv_type_unsigned_long_long_int=yes
4291else
4292 echo "$as_me: failed program was:" >&5
4293sed 's/^/| /' conftest.$ac_ext >&5
4294
4295ac_cv_type_unsigned_long_long_int=no
4296fi
4297rm -f conftest.err conftest.$ac_objext \
4298 conftest$ac_exeext conftest.$ac_ext
4299fi
4300echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
4301echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6
4302 if test $ac_cv_type_unsigned_long_long_int = yes; then
4303
4304cat >>confdefs.h <<\_ACEOF
4305#define HAVE_UNSIGNED_LONG_LONG_INT 1
4306_ACEOF
4307
4308 fi
4309
4310
4311
4312 echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5
4313echo $ECHO_N "checking whether the preprocessor supports include_next... $ECHO_C" >&6
4314if test "${gl_cv_have_include_next+set}" = set; then
4315 echo $ECHO_N "(cached) $ECHO_C" >&6
4316else
4317 rm -rf conftestd1 conftestd2
4318 mkdir conftestd1 conftestd2
4319 cat <<EOF > conftestd1/conftest.h
4320#define DEFINED_IN_CONFTESTD1
4321#include_next <conftest.h>
4322#ifdef DEFINED_IN_CONFTESTD2
4323int foo;
4324#else
4325#error "include_next doesn't work"
4326#endif
4327EOF
4328 cat <<EOF > conftestd2/conftest.h
4329#ifndef DEFINED_IN_CONFTESTD1
4330#error "include_next test doesn't work"
4331#endif
4332#define DEFINED_IN_CONFTESTD2
4333EOF
4334 save_CPPFLAGS="$CPPFLAGS"
4335 CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
4336 cat >conftest.$ac_ext <<_ACEOF
4337#include <conftest.h>
4338_ACEOF
4339rm -f conftest.$ac_objext
4340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4341 (eval $ac_compile) 2>conftest.er1
4342 ac_status=$?
4343 grep -v '^ *+' conftest.er1 >conftest.err
4344 rm -f conftest.er1
4345 cat conftest.err >&5
4346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4347 (exit $ac_status); } &&
4348 { ac_try='test -z "$ac_c_werror_flag"
4349 || test ! -s conftest.err'
4350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4351 (eval $ac_try) 2>&5
4352 ac_status=$?
4353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4354 (exit $ac_status); }; } &&
4355 { ac_try='test -s conftest.$ac_objext'
4356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4357 (eval $ac_try) 2>&5
4358 ac_status=$?
4359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4360 (exit $ac_status); }; }; then
4361 gl_cv_have_include_next=yes
4362else
4363 echo "$as_me: failed program was:" >&5
4364sed 's/^/| /' conftest.$ac_ext >&5
4365
4366gl_cv_have_include_next=no
4367fi
4368rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4369 CPPFLAGS="$save_CPPFLAGS"
4370 rm -rf conftestd1 conftestd2
4371
4372fi
4373echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5
4374echo "${ECHO_T}$gl_cv_have_include_next" >&6
4375 if test $gl_cv_have_include_next = yes; then
4376
4377
4378cat >>confdefs.h <<\_ACEOF
4379#define HAVE_INCLUDE_NEXT 1
4380_ACEOF
4381
4382
4383 INCLUDE_NEXT=include_next
4384 else
4385 INCLUDE_NEXT=include
4386 fi
4387
4388
4389
4390
4391
4392
4393
4394for ac_header in $gl_header_list
4395do
4396as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4397if eval "test \"\${$as_ac_Header+set}\" = set"; then
4398 echo "$as_me:$LINENO: checking for $ac_header" >&5
4399echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4400if eval "test \"\${$as_ac_Header+set}\" = set"; then
4401 echo $ECHO_N "(cached) $ECHO_C" >&6
4402fi
4403echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4404echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4405else
4406 # Is the header compilable?
4407echo "$as_me:$LINENO: checking $ac_header usability" >&5
4408echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4409cat >conftest.$ac_ext <<_ACEOF
4410/* confdefs.h. */
4411_ACEOF
4412cat confdefs.h >>conftest.$ac_ext
4413cat >>conftest.$ac_ext <<_ACEOF
4414/* end confdefs.h. */
4415$ac_includes_default
4416#include <$ac_header>
4417_ACEOF
4418rm -f conftest.$ac_objext
4419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4420 (eval $ac_compile) 2>conftest.er1
4421 ac_status=$?
4422 grep -v '^ *+' conftest.er1 >conftest.err
4423 rm -f conftest.er1
4424 cat conftest.err >&5
4425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4426 (exit $ac_status); } &&
4427 { ac_try='test -z "$ac_c_werror_flag"
4428 || test ! -s conftest.err'
4429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4430 (eval $ac_try) 2>&5
4431 ac_status=$?
4432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4433 (exit $ac_status); }; } &&
4434 { ac_try='test -s conftest.$ac_objext'
4435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4436 (eval $ac_try) 2>&5
4437 ac_status=$?
4438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4439 (exit $ac_status); }; }; then
4440 ac_header_compiler=yes
4441else
4442 echo "$as_me: failed program was:" >&5
4443sed 's/^/| /' conftest.$ac_ext >&5
4444
4445ac_header_compiler=no
4446fi
4447rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4448echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4449echo "${ECHO_T}$ac_header_compiler" >&6
4450
4451# Is the header present?
4452echo "$as_me:$LINENO: checking $ac_header presence" >&5
4453echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4454cat >conftest.$ac_ext <<_ACEOF
4455/* confdefs.h. */
4456_ACEOF
4457cat confdefs.h >>conftest.$ac_ext
4458cat >>conftest.$ac_ext <<_ACEOF
4459/* end confdefs.h. */
4460#include <$ac_header>
4461_ACEOF
4462if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4463 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4464 ac_status=$?
4465 grep -v '^ *+' conftest.er1 >conftest.err
4466 rm -f conftest.er1
4467 cat conftest.err >&5
4468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4469 (exit $ac_status); } >/dev/null; then
4470 if test -s conftest.err; then
4471 ac_cpp_err=$ac_c_preproc_warn_flag
4472 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4473 else
4474 ac_cpp_err=
4475 fi
4476else
4477 ac_cpp_err=yes
4478fi
4479if test -z "$ac_cpp_err"; then
4480 ac_header_preproc=yes
4481else
4482 echo "$as_me: failed program was:" >&5
4483sed 's/^/| /' conftest.$ac_ext >&5
4484
4485 ac_header_preproc=no
4486fi
4487rm -f conftest.err conftest.$ac_ext
4488echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4489echo "${ECHO_T}$ac_header_preproc" >&6
4490
4491# So? What about this header?
4492case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4493 yes:no: )
4494 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4495echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4496 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4497echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4498 ac_header_preproc=yes
4499 ;;
4500 no:yes:* )
4501 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4502echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4503 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4504echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4505 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4506echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4507 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4508echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4509 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4510echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4511 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4512echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4513 (
4514 cat <<\_ASBOX
4515## ------------------------------------------ ##
4516## Report this to the AC_PACKAGE_NAME lists. ##
4517## ------------------------------------------ ##
4518_ASBOX
4519 ) |
4520 sed "s/^/$as_me: WARNING: /" >&2
4521 ;;
4522esac
4523echo "$as_me:$LINENO: checking for $ac_header" >&5
4524echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4525if eval "test \"\${$as_ac_Header+set}\" = set"; then
4526 echo $ECHO_N "(cached) $ECHO_C" >&6
4527else
4528 eval "$as_ac_Header=\$ac_header_preproc"
4529fi
4530echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4531echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4532
4533fi
4534if test `eval echo '${'$as_ac_Header'}'` = yes; then
4535 cat >>confdefs.h <<_ACEOF
4536#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4537_ACEOF
4538
4539fi
4540
4541done
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
4555echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6
4556if test "${ac_cv_c_restrict+set}" = set; then
4557 echo $ECHO_N "(cached) $ECHO_C" >&6
4558else
4559 ac_cv_c_restrict=no
4560 # The order here caters to the fact that C++ does not require restrict.
4561 for ac_kw in __restrict __restrict__ _Restrict restrict; do
4562 cat >conftest.$ac_ext <<_ACEOF
4563/* confdefs.h. */
4564_ACEOF
4565cat confdefs.h >>conftest.$ac_ext
4566cat >>conftest.$ac_ext <<_ACEOF
4567/* end confdefs.h. */
4568typedef int * int_ptr;
4569 int foo (int_ptr $ac_kw ip) {
4570 return ip[0];
4571 }
4572int
4573main ()
4574{
4575int s[1];
4576 int * $ac_kw t = s;
4577 t[0] = 0;
4578 return foo(t)
4579 ;
4580 return 0;
4581}
4582_ACEOF
4583rm -f conftest.$ac_objext
4584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4585 (eval $ac_compile) 2>conftest.er1
4586 ac_status=$?
4587 grep -v '^ *+' conftest.er1 >conftest.err
4588 rm -f conftest.er1
4589 cat conftest.err >&5
4590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4591 (exit $ac_status); } &&
4592 { ac_try='test -z "$ac_c_werror_flag"
4593 || test ! -s conftest.err'
4594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4595 (eval $ac_try) 2>&5
4596 ac_status=$?
4597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4598 (exit $ac_status); }; } &&
4599 { ac_try='test -s conftest.$ac_objext'
4600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4601 (eval $ac_try) 2>&5
4602 ac_status=$?
4603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4604 (exit $ac_status); }; }; then
4605 ac_cv_c_restrict=$ac_kw
4606else
4607 echo "$as_me: failed program was:" >&5
4608sed 's/^/| /' conftest.$ac_ext >&5
4609
4610fi
4611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4612 test "$ac_cv_c_restrict" != no && break
4613 done
4614
4615fi
4616echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5
4617echo "${ECHO_T}$ac_cv_c_restrict" >&6
4618
4619
4620 case $ac_cv_c_restrict in
4621 restrict) ;;
4622 no) cat >>confdefs.h <<\_ACEOF
4623#define restrict
4624_ACEOF
4625 ;;
4626 *) cat >>confdefs.h <<_ACEOF
4627#define restrict $ac_cv_c_restrict
4628_ACEOF
4629 ;;
4630 esac
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644 :
4645
4646
4647
4648
4649
4650
4651
4652 if test $gl_cv_have_include_next = yes; then
4653 gl_cv_next_string_h='<'string.h'>'
4654 else
4655 echo "$as_me:$LINENO: checking absolute name of <string.h>" >&5
4656echo $ECHO_N "checking absolute name of <string.h>... $ECHO_C" >&6
4657if test "${gl_cv_next_string_h+set}" = set; then
4658 echo $ECHO_N "(cached) $ECHO_C" >&6
4659else
4660
4661 if test $ac_cv_header_string_h = yes; then
4662 cat >conftest.$ac_ext <<_ACEOF
4663/* confdefs.h. */
4664_ACEOF
4665cat confdefs.h >>conftest.$ac_ext
4666cat >>conftest.$ac_ext <<_ACEOF
4667/* end confdefs.h. */
4668#include <string.h>
4669
4670_ACEOF
4671 gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4672 sed -n '\#/string.h#{
4673 s#.*"\(.*/string.h\)".*#\1#
4674 s#^/[^/]#//&#
4675 p
4676 q
4677 }'`'"'
4678 else
4679 gl_cv_next_string_h='<'string.h'>'
4680 fi
4681
4682fi
4683echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5
4684echo "${ECHO_T}$gl_cv_next_string_h" >&6
4685 fi
4686 NEXT_STRING_H=$gl_cv_next_string_h
4687
4688
4689
4690
4691
4692 GNULIB_WCWIDTH=0;
4693 HAVE_DECL_WCWIDTH=1;
4694 REPLACE_WCWIDTH=0;
4695 WCHAR_H=
4696
4697
4698
4699
4700
4701if false; then
4702 GL_COND_LIBTOOL_TRUE=
4703 GL_COND_LIBTOOL_FALSE='#'
4704else
4705 GL_COND_LIBTOOL_TRUE='#'
4706 GL_COND_LIBTOOL_FALSE=
4707fi
4708
4709 gl_cond_libtool=false
4710 gl_libdeps=
4711 gl_ltlibdeps=
4712
4713
4714
4715 gl_source_base='gnulib'
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725for ac_func in memchr
4726do
4727as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4728echo "$as_me:$LINENO: checking for $ac_func" >&5
4729echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4730if eval "test \"\${$as_ac_var+set}\" = set"; then
4731 echo $ECHO_N "(cached) $ECHO_C" >&6
4732else
4733 cat >conftest.$ac_ext <<_ACEOF
4734/* confdefs.h. */
4735_ACEOF
4736cat confdefs.h >>conftest.$ac_ext
4737cat >>conftest.$ac_ext <<_ACEOF
4738/* end confdefs.h. */
4739/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4740 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4741#define $ac_func innocuous_$ac_func
4742
4743/* System header to define __stub macros and hopefully few prototypes,
4744 which can conflict with char $ac_func (); below.
4745 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4746 <limits.h> exists even on freestanding compilers. */
4747
4748#ifdef __STDC__
4749# include <limits.h>
4750#else
4751# include <assert.h>
4752#endif
4753
4754#undef $ac_func
4755
4756/* Override any gcc2 internal prototype to avoid an error. */
4757#ifdef __cplusplus
4758extern "C"
4759{
4760#endif
4761/* We use char because int might match the return type of a gcc2
4762 builtin and then its argument prototype would still apply. */
4763char $ac_func ();
4764/* The GNU C library defines this for functions which it implements
4765 to always fail with ENOSYS. Some functions are actually named
4766 something starting with __ and the normal name is an alias. */
4767#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4768choke me
4769#else
4770char (*f) () = $ac_func;
4771#endif
4772#ifdef __cplusplus
4773}
4774#endif
4775
4776int
4777main ()
4778{
4779return f != $ac_func;
4780 ;
4781 return 0;
4782}
4783_ACEOF
4784rm -f conftest.$ac_objext conftest$ac_exeext
4785if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4786 (eval $ac_link) 2>conftest.er1
4787 ac_status=$?
4788 grep -v '^ *+' conftest.er1 >conftest.err
4789 rm -f conftest.er1
4790 cat conftest.err >&5
4791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4792 (exit $ac_status); } &&
4793 { ac_try='test -z "$ac_c_werror_flag"
4794 || test ! -s conftest.err'
4795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4796 (eval $ac_try) 2>&5
4797 ac_status=$?
4798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4799 (exit $ac_status); }; } &&
4800 { ac_try='test -s conftest$ac_exeext'
4801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4802 (eval $ac_try) 2>&5
4803 ac_status=$?
4804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4805 (exit $ac_status); }; }; then
4806 eval "$as_ac_var=yes"
4807else
4808 echo "$as_me: failed program was:" >&5
4809sed 's/^/| /' conftest.$ac_ext >&5
4810
4811eval "$as_ac_var=no"
4812fi
4813rm -f conftest.err conftest.$ac_objext \
4814 conftest$ac_exeext conftest.$ac_ext
4815fi
4816echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4817echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4818if test `eval echo '${'$as_ac_var'}'` = yes; then
4819 cat >>confdefs.h <<_ACEOF
4820#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4821_ACEOF
4822
4823else
4824
4825 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4826
4827fi
4828done
4829
4830
4831 if test $ac_cv_func_memchr = no; then
4832
4833
4834for ac_header in bp-sym.h
4835do
4836as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4837if eval "test \"\${$as_ac_Header+set}\" = set"; then
4838 echo "$as_me:$LINENO: checking for $ac_header" >&5
4839echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4840if eval "test \"\${$as_ac_Header+set}\" = set"; then
4841 echo $ECHO_N "(cached) $ECHO_C" >&6
4842fi
4843echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4844echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4845else
4846 # Is the header compilable?
4847echo "$as_me:$LINENO: checking $ac_header usability" >&5
4848echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4849cat >conftest.$ac_ext <<_ACEOF
4850/* confdefs.h. */
4851_ACEOF
4852cat confdefs.h >>conftest.$ac_ext
4853cat >>conftest.$ac_ext <<_ACEOF
4854/* end confdefs.h. */
4855$ac_includes_default
4856#include <$ac_header>
4857_ACEOF
4858rm -f conftest.$ac_objext
4859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4860 (eval $ac_compile) 2>conftest.er1
4861 ac_status=$?
4862 grep -v '^ *+' conftest.er1 >conftest.err
4863 rm -f conftest.er1
4864 cat conftest.err >&5
4865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4866 (exit $ac_status); } &&
4867 { ac_try='test -z "$ac_c_werror_flag"
4868 || test ! -s conftest.err'
4869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4870 (eval $ac_try) 2>&5
4871 ac_status=$?
4872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4873 (exit $ac_status); }; } &&
4874 { ac_try='test -s conftest.$ac_objext'
4875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4876 (eval $ac_try) 2>&5
4877 ac_status=$?
4878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4879 (exit $ac_status); }; }; then
4880 ac_header_compiler=yes
4881else
4882 echo "$as_me: failed program was:" >&5
4883sed 's/^/| /' conftest.$ac_ext >&5
4884
4885ac_header_compiler=no
4886fi
4887rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4888echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4889echo "${ECHO_T}$ac_header_compiler" >&6
4890
4891# Is the header present?
4892echo "$as_me:$LINENO: checking $ac_header presence" >&5
4893echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4894cat >conftest.$ac_ext <<_ACEOF
4895/* confdefs.h. */
4896_ACEOF
4897cat confdefs.h >>conftest.$ac_ext
4898cat >>conftest.$ac_ext <<_ACEOF
4899/* end confdefs.h. */
4900#include <$ac_header>
4901_ACEOF
4902if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4903 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4904 ac_status=$?
4905 grep -v '^ *+' conftest.er1 >conftest.err
4906 rm -f conftest.er1
4907 cat conftest.err >&5
4908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4909 (exit $ac_status); } >/dev/null; then
4910 if test -s conftest.err; then
4911 ac_cpp_err=$ac_c_preproc_warn_flag
4912 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4913 else
4914 ac_cpp_err=
4915 fi
4916else
4917 ac_cpp_err=yes
4918fi
4919if test -z "$ac_cpp_err"; then
4920 ac_header_preproc=yes
4921else
4922 echo "$as_me: failed program was:" >&5
4923sed 's/^/| /' conftest.$ac_ext >&5
4924
4925 ac_header_preproc=no
4926fi
4927rm -f conftest.err conftest.$ac_ext
4928echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4929echo "${ECHO_T}$ac_header_preproc" >&6
4930
4931# So? What about this header?
4932case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4933 yes:no: )
4934 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4935echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4936 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4937echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4938 ac_header_preproc=yes
4939 ;;
4940 no:yes:* )
4941 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4942echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4943 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4944echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4945 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4946echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4947 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4948echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4949 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4950echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4951 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4952echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4953 (
4954 cat <<\_ASBOX
4955## ------------------------------------------ ##
4956## Report this to the AC_PACKAGE_NAME lists. ##
4957## ------------------------------------------ ##
4958_ASBOX
4959 ) |
4960 sed "s/^/$as_me: WARNING: /" >&2
4961 ;;
4962esac
4963echo "$as_me:$LINENO: checking for $ac_header" >&5
4964echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4965if eval "test \"\${$as_ac_Header+set}\" = set"; then
4966 echo $ECHO_N "(cached) $ECHO_C" >&6
4967else
4968 eval "$as_ac_Header=\$ac_header_preproc"
4969fi
4970echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4971echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4972
4973fi
4974if test `eval echo '${'$as_ac_Header'}'` = yes; then
4975 cat >>confdefs.h <<_ACEOF
4976#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4977_ACEOF
4978
4979fi
4980
4981done
4982
4983
4984 fi
4985
4986
4987 echo "$as_me:$LINENO: checking for working memcmp" >&5
4988echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
4989if test "${ac_cv_func_memcmp_working+set}" = set; then
4990 echo $ECHO_N "(cached) $ECHO_C" >&6
4991else
4992 if test "$cross_compiling" = yes; then
4993 ac_cv_func_memcmp_working=no
4994else
4995 cat >conftest.$ac_ext <<_ACEOF
4996/* confdefs.h. */
4997_ACEOF
4998cat confdefs.h >>conftest.$ac_ext
4999cat >>conftest.$ac_ext <<_ACEOF
5000/* end confdefs.h. */
5001$ac_includes_default
5002int
5003main ()
5004{
5005
5006 /* Some versions of memcmp are not 8-bit clean. */
5007 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
5008 if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
5009 exit (1);
5010
5011 /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
5012 or more and with at least one buffer not starting on a 4-byte boundary.
5013 William Lewis provided this test program. */
5014 {
5015 char foo[21];
5016 char bar[21];
5017 int i;
5018 for (i = 0; i < 4; i++)
5019 {
5020 char *a = foo + i;
5021 char *b = bar + i;
5022 strcpy (a, "--------01111111");
5023 strcpy (b, "--------10000000");
5024 if (memcmp (a, b, 16) >= 0)
5025 exit (1);
5026 }
5027 exit (0);
5028 }
5029
5030 ;
5031 return 0;
5032}
5033_ACEOF
5034rm -f conftest$ac_exeext
5035if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5036 (eval $ac_link) 2>&5
5037 ac_status=$?
5038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5039 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5041 (eval $ac_try) 2>&5
5042 ac_status=$?
5043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5044 (exit $ac_status); }; }; then
5045 ac_cv_func_memcmp_working=yes
5046else
5047 echo "$as_me: program exited with status $ac_status" >&5
5048echo "$as_me: failed program was:" >&5
5049sed 's/^/| /' conftest.$ac_ext >&5
5050
5051( exit $ac_status )
5052ac_cv_func_memcmp_working=no
5053fi
5054rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5055fi
5056fi
5057echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
5058echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
5059test $ac_cv_func_memcmp_working = no &&
5060
5061
5062
5063
5064
5065
5066 gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext"
5067
5068
5069 if test $ac_cv_func_memcmp_working = no; then
5070
5071cat >>confdefs.h <<\_ACEOF
5072#define memcmp rpl_memcmp
5073_ACEOF
5074
5075 :
5076 fi
5077
5078
5079
5080 if test $ac_cv_have_decl_memmem = yes; then
5081 echo "$as_me:$LINENO: checking whether memmem works in linear time" >&5
5082echo $ECHO_N "checking whether memmem works in linear time... $ECHO_C" >&6
5083if test "${gl_cv_func_memmem_works+set}" = set; then
5084 echo $ECHO_N "(cached) $ECHO_C" >&6
5085else
5086 if test "$cross_compiling" = yes; then
5087 gl_cv_func_memmem_works="guessing no"
5088else
5089 cat >conftest.$ac_ext <<_ACEOF
5090/* confdefs.h. */
5091_ACEOF
5092cat confdefs.h >>conftest.$ac_ext
5093cat >>conftest.$ac_ext <<_ACEOF
5094/* end confdefs.h. */
5095
5096#include <string.h> /* for memmem */
5097#include <stdlib.h> /* for malloc */
5098#include <unistd.h> /* for alarm */
5099
5100int
5101main ()
5102{
5103size_t m = 1000000;
5104 char *haystack = (char *) malloc (2 * m + 1);
5105 char *needle = (char *) malloc (m + 1);
5106 void *result = 0;
5107 /* Failure to compile this test due to missing alarm is okay,
5108 since all such platforms (mingw) also lack memmem. */
5109 alarm (5);
5110 /* Check for quadratic performance. */
5111 if (haystack && needle)
5112 {
5113 memset (haystack, 'A', 2 * m);
5114 haystack[2 * m] = 'B';
5115 memset (needle, 'A', m);
5116 needle[m] = 'B';
5117 result = memmem (haystack, 2 * m + 1, needle, m + 1);
5118 }
5119 /* Check for empty needle behavior. */
5120 return !result || !memmem ("a", 1, 0, 0);
5121 ;
5122 return 0;
5123}
5124_ACEOF
5125rm -f conftest$ac_exeext
5126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5127 (eval $ac_link) 2>&5
5128 ac_status=$?
5129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5130 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5132 (eval $ac_try) 2>&5
5133 ac_status=$?
5134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5135 (exit $ac_status); }; }; then
5136 gl_cv_func_memmem_works=yes
5137else
5138 echo "$as_me: program exited with status $ac_status" >&5
5139echo "$as_me: failed program was:" >&5
5140sed 's/^/| /' conftest.$ac_ext >&5
5141
5142( exit $ac_status )
5143gl_cv_func_memmem_works=no
5144fi
5145rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5146fi
5147fi
5148echo "$as_me:$LINENO: result: $gl_cv_func_memmem_works" >&5
5149echo "${ECHO_T}$gl_cv_func_memmem_works" >&6
5150 if test "$gl_cv_func_memmem_works" != yes; then
5151 REPLACE_MEMMEM=1
5152
5153
5154
5155
5156
5157
5158
5159 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
5160
5161 fi
5162 fi
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176for ac_func in memmem
5177do
5178as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5179echo "$as_me:$LINENO: checking for $ac_func" >&5
5180echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5181if eval "test \"\${$as_ac_var+set}\" = set"; then
5182 echo $ECHO_N "(cached) $ECHO_C" >&6
5183else
5184 cat >conftest.$ac_ext <<_ACEOF
5185/* confdefs.h. */
5186_ACEOF
5187cat confdefs.h >>conftest.$ac_ext
5188cat >>conftest.$ac_ext <<_ACEOF
5189/* end confdefs.h. */
5190/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5191 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5192#define $ac_func innocuous_$ac_func
5193
5194/* System header to define __stub macros and hopefully few prototypes,
5195 which can conflict with char $ac_func (); below.
5196 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5197 <limits.h> exists even on freestanding compilers. */
5198
5199#ifdef __STDC__
5200# include <limits.h>
5201#else
5202# include <assert.h>
5203#endif
5204
5205#undef $ac_func
5206
5207/* Override any gcc2 internal prototype to avoid an error. */
5208#ifdef __cplusplus
5209extern "C"
5210{
5211#endif
5212/* We use char because int might match the return type of a gcc2
5213 builtin and then its argument prototype would still apply. */
5214char $ac_func ();
5215/* The GNU C library defines this for functions which it implements
5216 to always fail with ENOSYS. Some functions are actually named
5217 something starting with __ and the normal name is an alias. */
5218#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5219choke me
5220#else
5221char (*f) () = $ac_func;
5222#endif
5223#ifdef __cplusplus
5224}
5225#endif
5226
5227int
5228main ()
5229{
5230return f != $ac_func;
5231 ;
5232 return 0;
5233}
5234_ACEOF
5235rm -f conftest.$ac_objext conftest$ac_exeext
5236if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5237 (eval $ac_link) 2>conftest.er1
5238 ac_status=$?
5239 grep -v '^ *+' conftest.er1 >conftest.err
5240 rm -f conftest.er1
5241 cat conftest.err >&5
5242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5243 (exit $ac_status); } &&
5244 { ac_try='test -z "$ac_c_werror_flag"
5245 || test ! -s conftest.err'
5246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5247 (eval $ac_try) 2>&5
5248 ac_status=$?
5249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5250 (exit $ac_status); }; } &&
5251 { ac_try='test -s conftest$ac_exeext'
5252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5253 (eval $ac_try) 2>&5
5254 ac_status=$?
5255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5256 (exit $ac_status); }; }; then
5257 eval "$as_ac_var=yes"
5258else
5259 echo "$as_me: failed program was:" >&5
5260sed 's/^/| /' conftest.$ac_ext >&5
5261
5262eval "$as_ac_var=no"
5263fi
5264rm -f conftest.err conftest.$ac_objext \
5265 conftest$ac_exeext conftest.$ac_ext
5266fi
5267echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5268echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5269if test `eval echo '${'$as_ac_var'}'` = yes; then
5270 cat >>confdefs.h <<_ACEOF
5271#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5272_ACEOF
5273
5274else
5275
5276 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5277
5278fi
5279done
5280
5281
5282
5283 :
5284
5285
5286
5287
5288
5289 if test $ac_cv_have_decl_memmem = no; then
5290 HAVE_DECL_MEMMEM=0
5291 fi
5292 :
5293
5294
5295
5296 GNULIB_MEMMEM=1
5297
5298
5299
5300
5301 if test $ac_cv_type_long_long_int = yes; then
5302 HAVE_LONG_LONG_INT=1
5303 else
5304 HAVE_LONG_LONG_INT=0
5305 fi
5306
5307
5308 if test $ac_cv_type_unsigned_long_long_int = yes; then
5309 HAVE_UNSIGNED_LONG_LONG_INT=1
5310 else
5311 HAVE_UNSIGNED_LONG_LONG_INT=0
5312 fi
5313
5314
5315 if test $ac_cv_header_inttypes_h = yes; then
5316 HAVE_INTTYPES_H=1
5317 else
5318 HAVE_INTTYPES_H=0
5319 fi
5320
5321
5322 if test $ac_cv_header_sys_types_h = yes; then
5323 HAVE_SYS_TYPES_H=1
5324 else
5325 HAVE_SYS_TYPES_H=0
5326 fi
5327
5328
5329
5330
5331
5332 :
5333
5334
5335
5336
5337
5338
5339
5340 if test $gl_cv_have_include_next = yes; then
5341 gl_cv_next_stdint_h='<'stdint.h'>'
5342 else
5343 echo "$as_me:$LINENO: checking absolute name of <stdint.h>" >&5
5344echo $ECHO_N "checking absolute name of <stdint.h>... $ECHO_C" >&6
5345if test "${gl_cv_next_stdint_h+set}" = set; then
5346 echo $ECHO_N "(cached) $ECHO_C" >&6
5347else
5348
5349 if test $ac_cv_header_stdint_h = yes; then
5350 cat >conftest.$ac_ext <<_ACEOF
5351/* confdefs.h. */
5352_ACEOF
5353cat confdefs.h >>conftest.$ac_ext
5354cat >>conftest.$ac_ext <<_ACEOF
5355/* end confdefs.h. */
5356#include <stdint.h>
5357
5358_ACEOF
5359 gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5360 sed -n '\#/stdint.h#{
5361 s#.*"\(.*/stdint.h\)".*#\1#
5362 s#^/[^/]#//&#
5363 p
5364 q
5365 }'`'"'
5366 else
5367 gl_cv_next_stdint_h='<'stdint.h'>'
5368 fi
5369
5370fi
5371echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5
5372echo "${ECHO_T}$gl_cv_next_stdint_h" >&6
5373 fi
5374 NEXT_STDINT_H=$gl_cv_next_stdint_h
5375
5376
5377
5378 if test $ac_cv_header_stdint_h = yes; then
5379 HAVE_STDINT_H=1
5380 else
5381 HAVE_STDINT_H=0
5382 fi
5383
5384
5385 if test $ac_cv_header_stdint_h = yes; then
5386 echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5
5387echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6
5388if test "${gl_cv_header_working_stdint_h+set}" = set; then
5389 echo $ECHO_N "(cached) $ECHO_C" >&6
5390else
5391 gl_cv_header_working_stdint_h=no
5392 cat >conftest.$ac_ext <<_ACEOF
5393
5394 /* confdefs.h. */
5395_ACEOF
5396cat confdefs.h >>conftest.$ac_ext
5397cat >>conftest.$ac_ext <<_ACEOF
5398/* end confdefs.h. */
5399
5400#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
5401#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
5402#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5403#include <stdint.h>
5404/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
5405#if !(defined WCHAR_MIN && defined WCHAR_MAX)
5406#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
5407#endif
5408
5409
5410 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5411 included before <wchar.h>. */
5412 #include <stddef.h>
5413 #include <signal.h>
5414 #if HAVE_WCHAR_H
5415 # include <stdio.h>
5416 # include <time.h>
5417 # include <wchar.h>
5418 #endif
5419
5420
5421#ifdef INT8_MAX
5422int8_t a1 = INT8_MAX;
5423int8_t a1min = INT8_MIN;
5424#endif
5425#ifdef INT16_MAX
5426int16_t a2 = INT16_MAX;
5427int16_t a2min = INT16_MIN;
5428#endif
5429#ifdef INT32_MAX
5430int32_t a3 = INT32_MAX;
5431int32_t a3min = INT32_MIN;
5432#endif
5433#ifdef INT64_MAX
5434int64_t a4 = INT64_MAX;
5435int64_t a4min = INT64_MIN;
5436#endif
5437#ifdef UINT8_MAX
5438uint8_t b1 = UINT8_MAX;
5439#else
5440typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
5441#endif
5442#ifdef UINT16_MAX
5443uint16_t b2 = UINT16_MAX;
5444#endif
5445#ifdef UINT32_MAX
5446uint32_t b3 = UINT32_MAX;
5447#endif
5448#ifdef UINT64_MAX
5449uint64_t b4 = UINT64_MAX;
5450#endif
5451int_least8_t c1 = INT8_C (0x7f);
5452int_least8_t c1max = INT_LEAST8_MAX;
5453int_least8_t c1min = INT_LEAST8_MIN;
5454int_least16_t c2 = INT16_C (0x7fff);
5455int_least16_t c2max = INT_LEAST16_MAX;
5456int_least16_t c2min = INT_LEAST16_MIN;
5457int_least32_t c3 = INT32_C (0x7fffffff);
5458int_least32_t c3max = INT_LEAST32_MAX;
5459int_least32_t c3min = INT_LEAST32_MIN;
5460int_least64_t c4 = INT64_C (0x7fffffffffffffff);
5461int_least64_t c4max = INT_LEAST64_MAX;
5462int_least64_t c4min = INT_LEAST64_MIN;
5463uint_least8_t d1 = UINT8_C (0xff);
5464uint_least8_t d1max = UINT_LEAST8_MAX;
5465uint_least16_t d2 = UINT16_C (0xffff);
5466uint_least16_t d2max = UINT_LEAST16_MAX;
5467uint_least32_t d3 = UINT32_C (0xffffffff);
5468uint_least32_t d3max = UINT_LEAST32_MAX;
5469uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
5470uint_least64_t d4max = UINT_LEAST64_MAX;
5471int_fast8_t e1 = INT_FAST8_MAX;
5472int_fast8_t e1min = INT_FAST8_MIN;
5473int_fast16_t e2 = INT_FAST16_MAX;
5474int_fast16_t e2min = INT_FAST16_MIN;
5475int_fast32_t e3 = INT_FAST32_MAX;
5476int_fast32_t e3min = INT_FAST32_MIN;
5477int_fast64_t e4 = INT_FAST64_MAX;
5478int_fast64_t e4min = INT_FAST64_MIN;
5479uint_fast8_t f1 = UINT_FAST8_MAX;
5480uint_fast16_t f2 = UINT_FAST16_MAX;
5481uint_fast32_t f3 = UINT_FAST32_MAX;
5482uint_fast64_t f4 = UINT_FAST64_MAX;
5483#ifdef INTPTR_MAX
5484intptr_t g = INTPTR_MAX;
5485intptr_t gmin = INTPTR_MIN;
5486#endif
5487#ifdef UINTPTR_MAX
5488uintptr_t h = UINTPTR_MAX;
5489#endif
5490intmax_t i = INTMAX_MAX;
5491uintmax_t j = UINTMAX_MAX;
5492
5493#include <limits.h> /* for CHAR_BIT */
5494#define TYPE_MINIMUM(t) \
5495 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
5496#define TYPE_MAXIMUM(t) \
5497 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
5498struct s {
5499 int check_PTRDIFF:
5500 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
5501 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
5502 ? 1 : -1;
5503 /* Detect bug in FreeBSD 6.0 / ia64. */
5504 int check_SIG_ATOMIC:
5505 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
5506 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
5507 ? 1 : -1;
5508 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
5509 int check_WCHAR:
5510 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
5511 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
5512 ? 1 : -1;
5513 /* Detect bug in mingw. */
5514 int check_WINT:
5515 WINT_MIN == TYPE_MINIMUM (wint_t)
5516 && WINT_MAX == TYPE_MAXIMUM (wint_t)
5517 ? 1 : -1;
5518
5519 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
5520 int check_UINT8_C:
5521 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
5522 int check_UINT16_C:
5523 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
5524
5525 /* Detect bugs in OpenBSD 3.9 stdint.h. */
5526#ifdef UINT8_MAX
5527 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
5528#endif
5529#ifdef UINT16_MAX
5530 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
5531#endif
5532#ifdef UINT32_MAX
5533 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
5534#endif
5535#ifdef UINT64_MAX
5536 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
5537#endif
5538 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
5539 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
5540 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
5541 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
5542 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
5543 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
5544 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
5545 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
5546 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
5547 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
5548 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
5549};
5550
5551int
5552main ()
5553{
5554
5555 ;
5556 return 0;
5557}
5558_ACEOF
5559rm -f conftest.$ac_objext
5560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5561 (eval $ac_compile) 2>conftest.er1
5562 ac_status=$?
5563 grep -v '^ *+' conftest.er1 >conftest.err
5564 rm -f conftest.er1
5565 cat conftest.err >&5
5566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5567 (exit $ac_status); } &&
5568 { ac_try='test -z "$ac_c_werror_flag"
5569 || test ! -s conftest.err'
5570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5571 (eval $ac_try) 2>&5
5572 ac_status=$?
5573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5574 (exit $ac_status); }; } &&
5575 { ac_try='test -s conftest.$ac_objext'
5576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5577 (eval $ac_try) 2>&5
5578 ac_status=$?
5579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5580 (exit $ac_status); }; }; then
5581 gl_cv_header_working_stdint_h=yes
5582else
5583 echo "$as_me: failed program was:" >&5
5584sed 's/^/| /' conftest.$ac_ext >&5
5585
5586fi
5587rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5588fi
5589echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5
5590echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6
5591 fi
5592 if test "$gl_cv_header_working_stdint_h" = yes; then
5593 STDINT_H=
5594 else
5595
5596
5597for ac_header in sys/inttypes.h sys/bitypes.h
5598do
5599as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5600if eval "test \"\${$as_ac_Header+set}\" = set"; then
5601 echo "$as_me:$LINENO: checking for $ac_header" >&5
5602echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5603if eval "test \"\${$as_ac_Header+set}\" = set"; then
5604 echo $ECHO_N "(cached) $ECHO_C" >&6
5605fi
5606echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5607echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5608else
5609 # Is the header compilable?
5610echo "$as_me:$LINENO: checking $ac_header usability" >&5
5611echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5612cat >conftest.$ac_ext <<_ACEOF
5613/* confdefs.h. */
5614_ACEOF
5615cat confdefs.h >>conftest.$ac_ext
5616cat >>conftest.$ac_ext <<_ACEOF
5617/* end confdefs.h. */
5618$ac_includes_default
5619#include <$ac_header>
5620_ACEOF
5621rm -f conftest.$ac_objext
5622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5623 (eval $ac_compile) 2>conftest.er1
5624 ac_status=$?
5625 grep -v '^ *+' conftest.er1 >conftest.err
5626 rm -f conftest.er1
5627 cat conftest.err >&5
5628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5629 (exit $ac_status); } &&
5630 { ac_try='test -z "$ac_c_werror_flag"
5631 || test ! -s conftest.err'
5632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5633 (eval $ac_try) 2>&5
5634 ac_status=$?
5635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5636 (exit $ac_status); }; } &&
5637 { ac_try='test -s conftest.$ac_objext'
5638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5639 (eval $ac_try) 2>&5
5640 ac_status=$?
5641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5642 (exit $ac_status); }; }; then
5643 ac_header_compiler=yes
5644else
5645 echo "$as_me: failed program was:" >&5
5646sed 's/^/| /' conftest.$ac_ext >&5
5647
5648ac_header_compiler=no
5649fi
5650rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5651echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5652echo "${ECHO_T}$ac_header_compiler" >&6
5653
5654# Is the header present?
5655echo "$as_me:$LINENO: checking $ac_header presence" >&5
5656echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5657cat >conftest.$ac_ext <<_ACEOF
5658/* confdefs.h. */
5659_ACEOF
5660cat confdefs.h >>conftest.$ac_ext
5661cat >>conftest.$ac_ext <<_ACEOF
5662/* end confdefs.h. */
5663#include <$ac_header>
5664_ACEOF
5665if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5666 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5667 ac_status=$?
5668 grep -v '^ *+' conftest.er1 >conftest.err
5669 rm -f conftest.er1
5670 cat conftest.err >&5
5671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672 (exit $ac_status); } >/dev/null; then
5673 if test -s conftest.err; then
5674 ac_cpp_err=$ac_c_preproc_warn_flag
5675 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5676 else
5677 ac_cpp_err=
5678 fi
5679else
5680 ac_cpp_err=yes
5681fi
5682if test -z "$ac_cpp_err"; then
5683 ac_header_preproc=yes
5684else
5685 echo "$as_me: failed program was:" >&5
5686sed 's/^/| /' conftest.$ac_ext >&5
5687
5688 ac_header_preproc=no
5689fi
5690rm -f conftest.err conftest.$ac_ext
5691echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5692echo "${ECHO_T}$ac_header_preproc" >&6
5693
5694# So? What about this header?
5695case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5696 yes:no: )
5697 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5698echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5699 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5700echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5701 ac_header_preproc=yes
5702 ;;
5703 no:yes:* )
5704 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5705echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5706 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5707echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5708 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5709echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5710 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5711echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5712 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5713echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5714 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5715echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5716 (
5717 cat <<\_ASBOX
5718## ------------------------------------------ ##
5719## Report this to the AC_PACKAGE_NAME lists. ##
5720## ------------------------------------------ ##
5721_ASBOX
5722 ) |
5723 sed "s/^/$as_me: WARNING: /" >&2
5724 ;;
5725esac
5726echo "$as_me:$LINENO: checking for $ac_header" >&5
5727echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5728if eval "test \"\${$as_ac_Header+set}\" = set"; then
5729 echo $ECHO_N "(cached) $ECHO_C" >&6
5730else
5731 eval "$as_ac_Header=\$ac_header_preproc"
5732fi
5733echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5734echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5735
5736fi
5737if test `eval echo '${'$as_ac_Header'}'` = yes; then
5738 cat >>confdefs.h <<_ACEOF
5739#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5740_ACEOF
5741
5742fi
5743
5744done
5745
5746 if test $ac_cv_header_sys_inttypes_h = yes; then
5747 HAVE_SYS_INTTYPES_H=1
5748 else
5749 HAVE_SYS_INTTYPES_H=0
5750 fi
5751
5752 if test $ac_cv_header_sys_bitypes_h = yes; then
5753 HAVE_SYS_BITYPES_H=1
5754 else
5755 HAVE_SYS_BITYPES_H=0
5756 fi
5757
5758
5759
5760 :
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
5776 echo "$as_me:$LINENO: checking for bit size of $gltype" >&5
5777echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6
5778if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\" = set"; then
5779 echo $ECHO_N "(cached) $ECHO_C" >&6
5780else
5781 if test "$cross_compiling" = yes; then
5782 # Depending upon the size, compute the lo and hi bounds.
5783cat >conftest.$ac_ext <<_ACEOF
5784/* confdefs.h. */
5785_ACEOF
5786cat confdefs.h >>conftest.$ac_ext
5787cat >>conftest.$ac_ext <<_ACEOF
5788/* end confdefs.h. */
5789
5790 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5791 included before <wchar.h>. */
5792 #include <stddef.h>
5793 #include <signal.h>
5794 #if HAVE_WCHAR_H
5795 # include <stdio.h>
5796 # include <time.h>
5797 # include <wchar.h>
5798 #endif
5799
5800#include <limits.h>
5801int
5802main ()
5803{
5804static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)];
5805test_array [0] = 0
5806
5807 ;
5808 return 0;
5809}
5810_ACEOF
5811rm -f conftest.$ac_objext
5812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5813 (eval $ac_compile) 2>conftest.er1
5814 ac_status=$?
5815 grep -v '^ *+' conftest.er1 >conftest.err
5816 rm -f conftest.er1
5817 cat conftest.err >&5
5818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5819 (exit $ac_status); } &&
5820 { ac_try='test -z "$ac_c_werror_flag"
5821 || test ! -s conftest.err'
5822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5823 (eval $ac_try) 2>&5
5824 ac_status=$?
5825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826 (exit $ac_status); }; } &&
5827 { ac_try='test -s conftest.$ac_objext'
5828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5829 (eval $ac_try) 2>&5
5830 ac_status=$?
5831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832 (exit $ac_status); }; }; then
5833 ac_lo=0 ac_mid=0
5834 while :; do
5835 cat >conftest.$ac_ext <<_ACEOF
5836/* confdefs.h. */
5837_ACEOF
5838cat confdefs.h >>conftest.$ac_ext
5839cat >>conftest.$ac_ext <<_ACEOF
5840/* end confdefs.h. */
5841
5842 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5843 included before <wchar.h>. */
5844 #include <stddef.h>
5845 #include <signal.h>
5846 #if HAVE_WCHAR_H
5847 # include <stdio.h>
5848 # include <time.h>
5849 # include <wchar.h>
5850 #endif
5851
5852#include <limits.h>
5853int
5854main ()
5855{
5856static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
5857test_array [0] = 0
5858
5859 ;
5860 return 0;
5861}
5862_ACEOF
5863rm -f conftest.$ac_objext
5864if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5865 (eval $ac_compile) 2>conftest.er1
5866 ac_status=$?
5867 grep -v '^ *+' conftest.er1 >conftest.err
5868 rm -f conftest.er1
5869 cat conftest.err >&5
5870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5871 (exit $ac_status); } &&
5872 { ac_try='test -z "$ac_c_werror_flag"
5873 || test ! -s conftest.err'
5874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5875 (eval $ac_try) 2>&5
5876 ac_status=$?
5877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5878 (exit $ac_status); }; } &&
5879 { ac_try='test -s conftest.$ac_objext'
5880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5881 (eval $ac_try) 2>&5
5882 ac_status=$?
5883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5884 (exit $ac_status); }; }; then
5885 ac_hi=$ac_mid; break
5886else
5887 echo "$as_me: failed program was:" >&5
5888sed 's/^/| /' conftest.$ac_ext >&5
5889
5890ac_lo=`expr $ac_mid + 1`
5891 if test $ac_lo -le $ac_mid; then
5892 ac_lo= ac_hi=
5893 break
5894 fi
5895 ac_mid=`expr 2 '*' $ac_mid + 1`
5896fi
5897rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5898 done
5899else
5900 echo "$as_me: failed program was:" >&5
5901sed 's/^/| /' conftest.$ac_ext >&5
5902
5903cat >conftest.$ac_ext <<_ACEOF
5904/* confdefs.h. */
5905_ACEOF
5906cat confdefs.h >>conftest.$ac_ext
5907cat >>conftest.$ac_ext <<_ACEOF
5908/* end confdefs.h. */
5909
5910 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5911 included before <wchar.h>. */
5912 #include <stddef.h>
5913 #include <signal.h>
5914 #if HAVE_WCHAR_H
5915 # include <stdio.h>
5916 # include <time.h>
5917 # include <wchar.h>
5918 #endif
5919
5920#include <limits.h>
5921int
5922main ()
5923{
5924static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)];
5925test_array [0] = 0
5926
5927 ;
5928 return 0;
5929}
5930_ACEOF
5931rm -f conftest.$ac_objext
5932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5933 (eval $ac_compile) 2>conftest.er1
5934 ac_status=$?
5935 grep -v '^ *+' conftest.er1 >conftest.err
5936 rm -f conftest.er1
5937 cat conftest.err >&5
5938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5939 (exit $ac_status); } &&
5940 { ac_try='test -z "$ac_c_werror_flag"
5941 || test ! -s conftest.err'
5942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5943 (eval $ac_try) 2>&5
5944 ac_status=$?
5945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5946 (exit $ac_status); }; } &&
5947 { ac_try='test -s conftest.$ac_objext'
5948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5949 (eval $ac_try) 2>&5
5950 ac_status=$?
5951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5952 (exit $ac_status); }; }; then
5953 ac_hi=-1 ac_mid=-1
5954 while :; do
5955 cat >conftest.$ac_ext <<_ACEOF
5956/* confdefs.h. */
5957_ACEOF
5958cat confdefs.h >>conftest.$ac_ext
5959cat >>conftest.$ac_ext <<_ACEOF
5960/* end confdefs.h. */
5961
5962 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5963 included before <wchar.h>. */
5964 #include <stddef.h>
5965 #include <signal.h>
5966 #if HAVE_WCHAR_H
5967 # include <stdio.h>
5968 # include <time.h>
5969 # include <wchar.h>
5970 #endif
5971
5972#include <limits.h>
5973int
5974main ()
5975{
5976static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)];
5977test_array [0] = 0
5978
5979 ;
5980 return 0;
5981}
5982_ACEOF
5983rm -f conftest.$ac_objext
5984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5985 (eval $ac_compile) 2>conftest.er1
5986 ac_status=$?
5987 grep -v '^ *+' conftest.er1 >conftest.err
5988 rm -f conftest.er1
5989 cat conftest.err >&5
5990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5991 (exit $ac_status); } &&
5992 { ac_try='test -z "$ac_c_werror_flag"
5993 || test ! -s conftest.err'
5994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5995 (eval $ac_try) 2>&5
5996 ac_status=$?
5997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5998 (exit $ac_status); }; } &&
5999 { ac_try='test -s conftest.$ac_objext'
6000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6001 (eval $ac_try) 2>&5
6002 ac_status=$?
6003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6004 (exit $ac_status); }; }; then
6005 ac_lo=$ac_mid; break
6006else
6007 echo "$as_me: failed program was:" >&5
6008sed 's/^/| /' conftest.$ac_ext >&5
6009
6010ac_hi=`expr '(' $ac_mid ')' - 1`
6011 if test $ac_mid -le $ac_hi; then
6012 ac_lo= ac_hi=
6013 break
6014 fi
6015 ac_mid=`expr 2 '*' $ac_mid`
6016fi
6017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6018 done
6019else
6020 echo "$as_me: failed program was:" >&5
6021sed 's/^/| /' conftest.$ac_ext >&5
6022
6023ac_lo= ac_hi=
6024fi
6025rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6026fi
6027rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6028# Binary search between lo and hi bounds.
6029while test "x$ac_lo" != "x$ac_hi"; do
6030 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6031 cat >conftest.$ac_ext <<_ACEOF
6032/* confdefs.h. */
6033_ACEOF
6034cat confdefs.h >>conftest.$ac_ext
6035cat >>conftest.$ac_ext <<_ACEOF
6036/* end confdefs.h. */
6037
6038 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6039 included before <wchar.h>. */
6040 #include <stddef.h>
6041 #include <signal.h>
6042 #if HAVE_WCHAR_H
6043 # include <stdio.h>
6044 # include <time.h>
6045 # include <wchar.h>
6046 #endif
6047
6048#include <limits.h>
6049int
6050main ()
6051{
6052static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
6053test_array [0] = 0
6054
6055 ;
6056 return 0;
6057}
6058_ACEOF
6059rm -f conftest.$ac_objext
6060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6061 (eval $ac_compile) 2>conftest.er1
6062 ac_status=$?
6063 grep -v '^ *+' conftest.er1 >conftest.err
6064 rm -f conftest.er1
6065 cat conftest.err >&5
6066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6067 (exit $ac_status); } &&
6068 { ac_try='test -z "$ac_c_werror_flag"
6069 || test ! -s conftest.err'
6070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6071 (eval $ac_try) 2>&5
6072 ac_status=$?
6073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6074 (exit $ac_status); }; } &&
6075 { ac_try='test -s conftest.$ac_objext'
6076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6077 (eval $ac_try) 2>&5
6078 ac_status=$?
6079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6080 (exit $ac_status); }; }; then
6081 ac_hi=$ac_mid
6082else
6083 echo "$as_me: failed program was:" >&5
6084sed 's/^/| /' conftest.$ac_ext >&5
6085
6086ac_lo=`expr '(' $ac_mid ')' + 1`
6087fi
6088rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6089done
6090case $ac_lo in
6091?*) result=$ac_lo;;
6092'') result=unknown ;;
6093esac
6094else
6095 if test "$cross_compiling" = yes; then
d5af19ba
DJ
6096 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6097echo "$as_me: error: in \`$ac_pwd':" >&2;}
6098{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
783e057b
DJ
6099See \`config.log' for more details." >&5
6100echo "$as_me: error: cannot run test program while cross compiling
6101See \`config.log' for more details." >&2;}
d5af19ba 6102 { (exit 1); exit 1; }; }; }
783e057b
DJ
6103else
6104 cat >conftest.$ac_ext <<_ACEOF
6105/* confdefs.h. */
6106_ACEOF
6107cat confdefs.h >>conftest.$ac_ext
6108cat >>conftest.$ac_ext <<_ACEOF
6109/* end confdefs.h. */
6110
6111 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6112 included before <wchar.h>. */
6113 #include <stddef.h>
6114 #include <signal.h>
6115 #if HAVE_WCHAR_H
6116 # include <stdio.h>
6117 # include <time.h>
6118 # include <wchar.h>
6119 #endif
6120
6121#include <limits.h>
6122long longval () { return sizeof ($gltype) * CHAR_BIT; }
6123unsigned long ulongval () { return sizeof ($gltype) * CHAR_BIT; }
6124#include <stdio.h>
6125#include <stdlib.h>
6126int
6127main ()
6128{
6129
6130 FILE *f = fopen ("conftest.val", "w");
6131 if (! f)
6132 exit (1);
6133 if ((sizeof ($gltype) * CHAR_BIT) < 0)
6134 {
6135 long i = longval ();
6136 if (i != (sizeof ($gltype) * CHAR_BIT))
6137 exit (1);
6138 fprintf (f, "%ld\n", i);
6139 }
6140 else
6141 {
6142 unsigned long i = ulongval ();
6143 if (i != (sizeof ($gltype) * CHAR_BIT))
6144 exit (1);
6145 fprintf (f, "%lu\n", i);
6146 }
6147 exit (ferror (f) || fclose (f) != 0);
6148
6149 ;
6150 return 0;
6151}
6152_ACEOF
6153rm -f conftest$ac_exeext
6154if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6155 (eval $ac_link) 2>&5
6156 ac_status=$?
6157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6158 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6160 (eval $ac_try) 2>&5
6161 ac_status=$?
6162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6163 (exit $ac_status); }; }; then
6164 result=`cat conftest.val`
6165else
6166 echo "$as_me: program exited with status $ac_status" >&5
6167echo "$as_me: failed program was:" >&5
6168sed 's/^/| /' conftest.$ac_ext >&5
6169
6170( exit $ac_status )
6171result=unknown
6172fi
6173rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6174fi
6175fi
6176rm -f conftest.val
6177 eval gl_cv_bitsizeof_${gltype}=\$result
c906108c 6178
783e057b
DJ
6179fi
6180echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&5
6181echo "${ECHO_T}`eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&6
6182 eval result=\$gl_cv_bitsizeof_${gltype}
6183 if test $result = unknown; then
6184 result=0
6185 fi
6186 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6187 cat >>confdefs.h <<_ACEOF
6188#define BITSIZEOF_${GLTYPE} $result
6189_ACEOF
c906108c 6190
783e057b
DJ
6191 eval BITSIZEOF_${GLTYPE}=\$result
6192 done
c906108c 6193
c906108c 6194
c906108c 6195
bec39cab 6196
3841debe 6197
783e057b
DJ
6198
6199
6200 for gltype in sig_atomic_t wchar_t wint_t ; do
6201 echo "$as_me:$LINENO: checking whether $gltype is signed" >&5
6202echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6
6203if eval "test \"\${gl_cv_type_${gltype}_signed+set}\" = set"; then
6204 echo $ECHO_N "(cached) $ECHO_C" >&6
6205else
6206 cat >conftest.$ac_ext <<_ACEOF
6207/* confdefs.h. */
6208_ACEOF
6209cat confdefs.h >>conftest.$ac_ext
6210cat >>conftest.$ac_ext <<_ACEOF
6211/* end confdefs.h. */
6212
6213 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6214 included before <wchar.h>. */
6215 #include <stddef.h>
6216 #include <signal.h>
6217 #if HAVE_WCHAR_H
6218 # include <stdio.h>
6219 # include <time.h>
6220 # include <wchar.h>
6221 #endif
6222
6223 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6224int
6225main ()
6226{
6227
6228 ;
6229 return 0;
6230}
6231_ACEOF
6232rm -f conftest.$ac_objext
6233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6234 (eval $ac_compile) 2>conftest.er1
6235 ac_status=$?
6236 grep -v '^ *+' conftest.er1 >conftest.err
6237 rm -f conftest.er1
6238 cat conftest.err >&5
6239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6240 (exit $ac_status); } &&
6241 { ac_try='test -z "$ac_c_werror_flag"
6242 || test ! -s conftest.err'
6243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6244 (eval $ac_try) 2>&5
6245 ac_status=$?
6246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6247 (exit $ac_status); }; } &&
6248 { ac_try='test -s conftest.$ac_objext'
6249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6250 (eval $ac_try) 2>&5
6251 ac_status=$?
6252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6253 (exit $ac_status); }; }; then
6254 result=yes
6255else
6256 echo "$as_me: failed program was:" >&5
6257sed 's/^/| /' conftest.$ac_ext >&5
6258
6259result=no
20e95c23 6260fi
783e057b
DJ
6261rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6262 eval gl_cv_type_${gltype}_signed=\$result
6263
6264fi
6265echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&5
6266echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&6
6267 eval result=\$gl_cv_type_${gltype}_signed
6268 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6269 if test "$result" = yes; then
6270 cat >>confdefs.h <<_ACEOF
6271#define HAVE_SIGNED_${GLTYPE} 1
6272_ACEOF
6273
6274 eval HAVE_SIGNED_${GLTYPE}=1
6275 else
6276 eval HAVE_SIGNED_${GLTYPE}=0
6277 fi
6278 done
6279
6280
6281 gl_cv_type_ptrdiff_t_signed=yes
6282 gl_cv_type_size_t_signed=no
6283
6284
6285
6286
6287
6288
6289
6290 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
6291 echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5
6292echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6
6293if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\" = set"; then
6294 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 6295else
783e057b
DJ
6296 eval gl_cv_type_${gltype}_suffix=no
6297 eval result=\$gl_cv_type_${gltype}_signed
6298 if test "$result" = yes; then
6299 glsufu=
6300 else
6301 glsufu=u
6302 fi
6303 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6304 case $glsuf in
6305 '') gltype1='int';;
6306 l) gltype1='long int';;
6307 ll) gltype1='long long int';;
6308 i64) gltype1='__int64';;
6309 u) gltype1='unsigned int';;
6310 ul) gltype1='unsigned long int';;
6311 ull) gltype1='unsigned long long int';;
6312 ui64)gltype1='unsigned __int64';;
6313 esac
6314 cat >conftest.$ac_ext <<_ACEOF
6315/* confdefs.h. */
6316_ACEOF
6317cat confdefs.h >>conftest.$ac_ext
6318cat >>conftest.$ac_ext <<_ACEOF
6319/* end confdefs.h. */
6320
6321 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6322 included before <wchar.h>. */
6323 #include <stddef.h>
6324 #include <signal.h>
6325 #if HAVE_WCHAR_H
6326 # include <stdio.h>
6327 # include <time.h>
6328 # include <wchar.h>
6329 #endif
6330
6331 extern $gltype foo;
6332 extern $gltype1 foo;
6333int
6334main ()
6335{
6336
6337 ;
6338 return 0;
6339}
6340_ACEOF
6341rm -f conftest.$ac_objext
6342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6343 (eval $ac_compile) 2>conftest.er1
6344 ac_status=$?
6345 grep -v '^ *+' conftest.er1 >conftest.err
6346 rm -f conftest.er1
6347 cat conftest.err >&5
6348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6349 (exit $ac_status); } &&
6350 { ac_try='test -z "$ac_c_werror_flag"
6351 || test ! -s conftest.err'
6352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6353 (eval $ac_try) 2>&5
6354 ac_status=$?
6355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6356 (exit $ac_status); }; } &&
6357 { ac_try='test -s conftest.$ac_objext'
6358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6359 (eval $ac_try) 2>&5
6360 ac_status=$?
6361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6362 (exit $ac_status); }; }; then
6363 eval gl_cv_type_${gltype}_suffix=\$glsuf
6364else
6365 echo "$as_me: failed program was:" >&5
6366sed 's/^/| /' conftest.$ac_ext >&5
6367
6368fi
6369rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6370 eval result=\$gl_cv_type_${gltype}_suffix
6371 test "$result" != no && break
6372 done
6373fi
6374echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&5
6375echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&6
6376 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6377 eval result=\$gl_cv_type_${gltype}_suffix
6378 test "$result" = no && result=
6379 eval ${GLTYPE}_SUFFIX=\$result
6380 cat >>confdefs.h <<_ACEOF
6381#define ${GLTYPE}_SUFFIX $result
6382_ACEOF
6383
6384 done
6385
6386
6387
6388 STDINT_H=stdint.h
6389 fi
6390
6391
6392
6393
6394
6395
6396
6397 echo "$as_me:$LINENO: checking whether <wchar.h> is standalone" >&5
6398echo $ECHO_N "checking whether <wchar.h> is standalone... $ECHO_C" >&6
6399if test "${gl_cv_header_wchar_h_standalone+set}" = set; then
6400 echo $ECHO_N "(cached) $ECHO_C" >&6
6401else
6402 cat >conftest.$ac_ext <<_ACEOF
6403#include <wchar.h>
6404wchar_t w;
6405_ACEOF
6406rm -f conftest.$ac_objext
6407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6408 (eval $ac_compile) 2>conftest.er1
6409 ac_status=$?
6410 grep -v '^ *+' conftest.er1 >conftest.err
6411 rm -f conftest.er1
6412 cat conftest.err >&5
6413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6414 (exit $ac_status); } &&
6415 { ac_try='test -z "$ac_c_werror_flag"
6416 || test ! -s conftest.err'
6417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6418 (eval $ac_try) 2>&5
6419 ac_status=$?
6420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6421 (exit $ac_status); }; } &&
6422 { ac_try='test -s conftest.$ac_objext'
6423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6424 (eval $ac_try) 2>&5
6425 ac_status=$?
6426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6427 (exit $ac_status); }; }; then
6428 gl_cv_header_wchar_h_standalone=yes
6429else
6430 echo "$as_me: failed program was:" >&5
6431sed 's/^/| /' conftest.$ac_ext >&5
6432
6433gl_cv_header_wchar_h_standalone=no
6434fi
6435rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6436fi
6437echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5
6438echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6
6439 if test $gl_cv_header_wchar_h_standalone != yes; then
6440 WCHAR_H=wchar.h
6441 fi
6442
6443
6444 :
6445
6446
6447
6448
6449
6450 if test $ac_cv_header_wchar_h = yes; then
6451 HAVE_WCHAR_H=1
6452 else
6453 HAVE_WCHAR_H=0
6454 fi
6455
6456
6457
6458
6459 :
6460
6461
6462
6463
6464
6465
6466
6467 if test $gl_cv_have_include_next = yes; then
6468 gl_cv_next_wchar_h='<'wchar.h'>'
6469 else
6470 echo "$as_me:$LINENO: checking absolute name of <wchar.h>" >&5
6471echo $ECHO_N "checking absolute name of <wchar.h>... $ECHO_C" >&6
6472if test "${gl_cv_next_wchar_h+set}" = set; then
6473 echo $ECHO_N "(cached) $ECHO_C" >&6
6474else
6475
6476 if test $ac_cv_header_wchar_h = yes; then
6477 cat >conftest.$ac_ext <<_ACEOF
6478/* confdefs.h. */
6479_ACEOF
6480cat confdefs.h >>conftest.$ac_ext
6481cat >>conftest.$ac_ext <<_ACEOF
6482/* end confdefs.h. */
6483#include <wchar.h>
6484
6485_ACEOF
6486 gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6487 sed -n '\#/wchar.h#{
6488 s#.*"\(.*/wchar.h\)".*#\1#
6489 s#^/[^/]#//&#
6490 p
6491 q
6492 }'`'"'
6493 else
6494 gl_cv_next_wchar_h='<'wchar.h'>'
6495 fi
6496
6497fi
6498echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5
6499echo "${ECHO_T}$gl_cv_next_wchar_h" >&6
6500 fi
6501 NEXT_WCHAR_H=$gl_cv_next_wchar_h
6502
c906108c 6503
c906108c 6504
c906108c 6505
c906108c 6506
c906108c 6507
c906108c 6508
c906108c 6509
783e057b
DJ
6510 gltests_libdeps=
6511 gltests_ltlibdeps=
20e95c23 6512
20e95c23 6513
20e95c23 6514
783e057b 6515 gl_source_base='tests'
c906108c 6516
bec39cab 6517
bec39cab 6518
783e057b
DJ
6519
6520 LIBGNU_LIBDEPS="$gl_libdeps"
6521
6522 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
6523
6524
e28b3332 6525
d5af19ba
DJ
6526# For Makefile dependencies.
6527GNULIB_STDINT_H=
6528if test x"$STDINT_H" != x; then
6529 GNULIB_STDINT_H=gnulib/$STDINT_H
6530fi
6531
6532
bec39cab
AC
6533PACKAGE=gdb
6534
6535cat >>confdefs.h <<_ACEOF
6536#define PACKAGE "$PACKAGE"
6537_ACEOF
6538
6539
6540
e28b3332
DJ
6541# GDB does not use automake, but gnulib does. This line lets us
6542# generate its Makefile.in.
6543am__api_version="1.9"
6544# Find a good install program. We prefer a C program (faster),
6545# so one script is as good as another. But avoid the broken or
6546# incompatible versions:
6547# SysV /etc/install, /usr/sbin/install
6548# SunOS /usr/etc/install
6549# IRIX /sbin/install
6550# AIX /bin/install
6551# AmigaOS /C/install, which installs bootblocks on floppy discs
6552# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6553# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6554# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6555# OS/2's system install, which has a completely different semantic
6556# ./install, which can be erroneously created by make from ./install.sh.
85541719 6557# Reject install programs that cannot install multiple files.
e28b3332
DJ
6558echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
6559echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
6560if test -z "$INSTALL"; then
6561if test "${ac_cv_path_install+set}" = set; then
6562 echo $ECHO_N "(cached) $ECHO_C" >&6
6563else
6564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6565for as_dir in $PATH
6566do
6567 IFS=$as_save_IFS
6568 test -z "$as_dir" && as_dir=.
6569 # Account for people who put trailing slashes in PATH elements.
6570case $as_dir/ in
6571 ./ | .// | /cC/* | \
6572 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6573 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
6574 /usr/ucb/* ) ;;
6575 *)
6576 # OSF1 and SCO ODT 3.0 have their own names for install.
6577 # Don't use installbsd from OSF since it installs stuff as root
6578 # by default.
6579 for ac_prog in ginstall scoinst install; do
6580 for ac_exec_ext in '' $ac_executable_extensions; do
6581 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6582 if test $ac_prog = install &&
6583 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6584 # AIX install. It has an incompatible calling convention.
6585 :
6586 elif test $ac_prog = install &&
6587 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6588 # program-specific install script used by HP pwplus--don't use.
6589 :
6590 else
85541719
DE
6591 rm -rf conftest.one conftest.two conftest.dir
6592 echo one > conftest.one
6593 echo two > conftest.two
6594 mkdir conftest.dir
6595 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6596 test -s conftest.one && test -s conftest.two &&
6597 test -s conftest.dir/conftest.one &&
6598 test -s conftest.dir/conftest.two
6599 then
6600 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6601 break 3
6602 fi
e28b3332
DJ
6603 fi
6604 fi
6605 done
6606 done
6607 ;;
6608esac
6609done
6610
85541719 6611rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
6612
6613fi
6614 if test "${ac_cv_path_install+set}" = set; then
6615 INSTALL=$ac_cv_path_install
6616 else
85541719
DE
6617 # As a last resort, use the slow shell script. Don't cache a
6618 # value for INSTALL within a source directory, because that will
e28b3332 6619 # break other packages using the cache if that directory is
85541719 6620 # removed, or if the value is a relative name.
e28b3332
DJ
6621 INSTALL=$ac_install_sh
6622 fi
6623fi
6624echo "$as_me:$LINENO: result: $INSTALL" >&5
6625echo "${ECHO_T}$INSTALL" >&6
6626
6627# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6628# It thinks the first close brace ends the variable substitution.
6629test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6630
6631test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6632
6633test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6634
6635echo "$as_me:$LINENO: checking whether build environment is sane" >&5
6636echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
6637# Just in case
6638sleep 1
6639echo timestamp > conftest.file
6640# Do `set' in a subshell so we don't clobber the current shell's
6641# arguments. Must try -L first in case configure is actually a
6642# symlink; some systems play weird games with the mod time of symlinks
6643# (eg FreeBSD returns the mod time of the symlink's containing
6644# directory).
6645if (
6646 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6647 if test "$*" = "X"; then
6648 # -L didn't work.
6649 set X `ls -t $srcdir/configure conftest.file`
6650 fi
6651 rm -f conftest.file
6652 if test "$*" != "X $srcdir/configure conftest.file" \
6653 && test "$*" != "X conftest.file $srcdir/configure"; then
6654
6655 # If neither matched, then we have a broken ls. This can happen
6656 # if, for instance, CONFIG_SHELL is bash and it inherits a
6657 # broken ls alias from the environment. This has actually
6658 # happened. Such a system could not be considered "sane".
6659 { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
6660alias in your environment" >&5
6661echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
6662alias in your environment" >&2;}
6663 { (exit 1); exit 1; }; }
6664 fi
6665
6666 test "$2" = conftest.file
6667 )
6668then
6669 # Ok.
6670 :
6671else
6672 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
6673Check your system clock" >&5
6674echo "$as_me: error: newly created file is older than distributed files!
6675Check your system clock" >&2;}
6676 { (exit 1); exit 1; }; }
6677fi
6678echo "$as_me:$LINENO: result: yes" >&5
6679echo "${ECHO_T}yes" >&6
6680test "$program_prefix" != NONE &&
6681 program_transform_name="s,^,$program_prefix,;$program_transform_name"
6682# Use a double $ so make ignores it.
6683test "$program_suffix" != NONE &&
6684 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
6685# Double any \ or $. echo might interpret backslashes.
6686# By default was `s,x,x', remove it if useless.
6687cat <<\_ACEOF >conftest.sed
6688s/[\\$]/&&/g;s/;s,x,x,$//
6689_ACEOF
6690program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
6691rm conftest.sed
6692
6693# expand $ac_aux_dir to an absolute path
6694am_aux_dir=`cd $ac_aux_dir && pwd`
6695
6696test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6697# Use eval to expand $SHELL
6698if eval "$MISSING --run true"; then
6699 am_missing_run="$MISSING --run "
6700else
6701 am_missing_run=
6702 { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
6703echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
6704fi
6705
6706if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6707 # We used to keeping the `.' as first argument, in order to
6708 # allow $(mkdir_p) to be used without argument. As in
6709 # $(mkdir_p) $(somedir)
6710 # where $(somedir) is conditionally defined. However this is wrong
6711 # for two reasons:
6712 # 1. if the package is installed by a user who cannot write `.'
6713 # make install will fail,
6714 # 2. the above comment should most certainly read
6715 # $(mkdir_p) $(DESTDIR)$(somedir)
6716 # so it does not work when $(somedir) is undefined and
6717 # $(DESTDIR) is not.
6718 # To support the latter case, we have to write
6719 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6720 # so the `.' trick is pointless.
6721 mkdir_p='mkdir -p --'
6722else
6723 # On NextStep and OpenStep, the `mkdir' command does not
6724 # recognize any option. It will interpret all options as
6725 # directories to create, and then abort because `.' already
6726 # exists.
6727 for d in ./-p ./--version;
6728 do
6729 test -d $d && rmdir $d
6730 done
6731 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6732 if test -f "$ac_aux_dir/mkinstalldirs"; then
6733 mkdir_p='$(mkinstalldirs)'
6734 else
6735 mkdir_p='$(install_sh) -d'
6736 fi
6737fi
6738
6739for ac_prog in gawk mawk nawk awk
6740do
6741 # Extract the first word of "$ac_prog", so it can be a program name with args.
6742set dummy $ac_prog; ac_word=$2
6743echo "$as_me:$LINENO: checking for $ac_word" >&5
6744echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6745if test "${ac_cv_prog_AWK+set}" = set; then
6746 echo $ECHO_N "(cached) $ECHO_C" >&6
6747else
6748 if test -n "$AWK"; then
6749 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6750else
6751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6752for as_dir in $PATH
6753do
6754 IFS=$as_save_IFS
6755 test -z "$as_dir" && as_dir=.
6756 for ac_exec_ext in '' $ac_executable_extensions; do
6757 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6758 ac_cv_prog_AWK="$ac_prog"
6759 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6760 break 2
6761 fi
6762done
6763done
6764
6765fi
6766fi
6767AWK=$ac_cv_prog_AWK
6768if test -n "$AWK"; then
6769 echo "$as_me:$LINENO: result: $AWK" >&5
6770echo "${ECHO_T}$AWK" >&6
6771else
6772 echo "$as_me:$LINENO: result: no" >&5
6773echo "${ECHO_T}no" >&6
6774fi
6775
6776 test -n "$AWK" && break
6777done
6778
e28b3332
DJ
6779 ac_config_commands="$ac_config_commands depfiles"
6780
6781
6782am_make=${MAKE-make}
6783cat > confinc << 'END'
6784am__doit:
6785 @echo done
6786.PHONY: am__doit
6787END
6788# If we don't find an include directive, just comment out the code.
6789echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
6790echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
6791am__include="#"
6792am__quote=
6793_am_result=none
6794# First try GNU make style include.
6795echo "include confinc" > confmf
6796# We grep out `Entering directory' and `Leaving directory'
6797# messages which can occur if `w' ends up in MAKEFLAGS.
6798# In particular we don't look at `^make:' because GNU make might
6799# be invoked under some other name (usually "gmake"), in which
6800# case it prints its new name instead of `make'.
6801if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6802 am__include=include
6803 am__quote=
6804 _am_result=GNU
6805fi
6806# Now try BSD make style include.
6807if test "$am__include" = "#"; then
6808 echo '.include "confinc"' > confmf
6809 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6810 am__include=.include
6811 am__quote="\""
6812 _am_result=BSD
6813 fi
6814fi
6815
6816
6817echo "$as_me:$LINENO: result: $_am_result" >&5
6818echo "${ECHO_T}$_am_result" >&6
6819rm -f confinc confmf
6820
6821# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
6822if test "${enable_dependency_tracking+set}" = set; then
6823 enableval="$enable_dependency_tracking"
6824
6825fi;
6826if test "x$enable_dependency_tracking" != xno; then
6827 am_depcomp="$ac_aux_dir/depcomp"
6828 AMDEPBACKSLASH='\'
6829fi
6830
6831
6832if test "x$enable_dependency_tracking" != xno; then
6833 AMDEP_TRUE=
6834 AMDEP_FALSE='#'
6835else
6836 AMDEP_TRUE='#'
6837 AMDEP_FALSE=
6838fi
6839
6840
6841
6842# test to see if srcdir already configured
6843if test "`cd $srcdir && pwd`" != "`pwd`" &&
6844 test -f $srcdir/config.status; then
6845 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
6846echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
6847 { (exit 1); exit 1; }; }
6848fi
6849
6850# test whether we have cygpath
6851if test -z "$CYGPATH_W"; then
6852 if (cygpath --version) >/dev/null 2>/dev/null; then
6853 CYGPATH_W='cygpath -w'
6854 else
6855 CYGPATH_W=echo
6856 fi
6857fi
6858
6859
6860# Define the identity of the package.
6861 PACKAGE=gdb
6862 VERSION=UNUSED-VERSION
6863
6864
6865# Some tools Automake needs.
6866
6867ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6868
6869
6870AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6871
6872
6873AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6874
6875
6876AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6877
6878
6879MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6880
6881install_sh=${install_sh-"$am_aux_dir/install-sh"}
6882
6883# Installed binaries are usually stripped using `strip' when the user
6884# run `make install-strip'. However `strip' might not be the right
6885# tool to use in cross-compilation environments, therefore Automake
6886# will honor the `STRIP' environment variable to overrule this program.
6887if test "$cross_compiling" != no; then
6888 if test -n "$ac_tool_prefix"; then
6889 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6890set dummy ${ac_tool_prefix}strip; ac_word=$2
6891echo "$as_me:$LINENO: checking for $ac_word" >&5
6892echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6893if test "${ac_cv_prog_STRIP+set}" = set; then
6894 echo $ECHO_N "(cached) $ECHO_C" >&6
6895else
6896 if test -n "$STRIP"; then
6897 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6898else
6899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6900for as_dir in $PATH
6901do
6902 IFS=$as_save_IFS
6903 test -z "$as_dir" && as_dir=.
6904 for ac_exec_ext in '' $ac_executable_extensions; do
6905 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6906 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6907 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6908 break 2
6909 fi
6910done
6911done
6912
6913fi
6914fi
6915STRIP=$ac_cv_prog_STRIP
6916if test -n "$STRIP"; then
6917 echo "$as_me:$LINENO: result: $STRIP" >&5
6918echo "${ECHO_T}$STRIP" >&6
6919else
6920 echo "$as_me:$LINENO: result: no" >&5
6921echo "${ECHO_T}no" >&6
6922fi
6923
6924fi
6925if test -z "$ac_cv_prog_STRIP"; then
6926 ac_ct_STRIP=$STRIP
6927 # Extract the first word of "strip", so it can be a program name with args.
6928set dummy strip; ac_word=$2
6929echo "$as_me:$LINENO: checking for $ac_word" >&5
6930echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6931if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6932 echo $ECHO_N "(cached) $ECHO_C" >&6
6933else
6934 if test -n "$ac_ct_STRIP"; then
6935 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6936else
6937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6938for as_dir in $PATH
6939do
6940 IFS=$as_save_IFS
6941 test -z "$as_dir" && as_dir=.
6942 for ac_exec_ext in '' $ac_executable_extensions; do
6943 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6944 ac_cv_prog_ac_ct_STRIP="strip"
6945 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6946 break 2
6947 fi
6948done
6949done
6950
6951 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
6952fi
6953fi
6954ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6955if test -n "$ac_ct_STRIP"; then
6956 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6957echo "${ECHO_T}$ac_ct_STRIP" >&6
6958else
6959 echo "$as_me:$LINENO: result: no" >&5
6960echo "${ECHO_T}no" >&6
6961fi
6962
6963 STRIP=$ac_ct_STRIP
6964else
6965 STRIP="$ac_cv_prog_STRIP"
6966fi
6967
6968fi
6969INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
6970
6971# We need awk for the "check" target. The system "awk" is bad on
6972# some platforms.
6973# Always define AMTAR for backward compatibility.
6974
6975AMTAR=${AMTAR-"${am_missing_run}tar"}
6976
6977am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
6978
6979
6980
6981
6982depcc="$CC" am_compiler_list=
6983
6984echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
6985echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
6986if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
6987 echo $ECHO_N "(cached) $ECHO_C" >&6
6988else
6989 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6990 # We make a subdir and do the tests there. Otherwise we can end up
6991 # making bogus files that we don't know about and never remove. For
6992 # instance it was reported that on HP-UX the gcc test will end up
6993 # making a dummy file named `D' -- because `-MD' means `put the output
6994 # in D'.
6995 mkdir conftest.dir
6996 # Copy depcomp to subdir because otherwise we won't find it if we're
6997 # using a relative directory.
6998 cp "$am_depcomp" conftest.dir
6999 cd conftest.dir
7000 # We will build objects and dependencies in a subdirectory because
7001 # it helps to detect inapplicable dependency modes. For instance
7002 # both Tru64's cc and ICC support -MD to output dependencies as a
7003 # side effect of compilation, but ICC will put the dependencies in
7004 # the current directory while Tru64 will put them in the object
7005 # directory.
7006 mkdir sub
7007
7008 am_cv_CC_dependencies_compiler_type=none
7009 if test "$am_compiler_list" = ""; then
7010 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7011 fi
7012 for depmode in $am_compiler_list; do
7013 # Setup a source with many dependencies, because some compilers
7014 # like to wrap large dependency lists on column 80 (with \), and
7015 # we should not choose a depcomp mode which is confused by this.
7016 #
7017 # We need to recreate these files for each test, as the compiler may
7018 # overwrite some of them when testing with obscure command lines.
7019 # This happens at least with the AIX C compiler.
7020 : > sub/conftest.c
7021 for i in 1 2 3 4 5 6; do
7022 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7023 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7024 # Solaris 8's {/usr,}/bin/sh.
7025 touch sub/conftst$i.h
7026 done
7027 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7028
7029 case $depmode in
7030 nosideeffect)
7031 # after this tag, mechanisms are not by side-effect, so they'll
7032 # only be used when explicitly requested
7033 if test "x$enable_dependency_tracking" = xyes; then
7034 continue
7035 else
7036 break
7037 fi
7038 ;;
7039 none) break ;;
7040 esac
7041 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7042 # mode. It turns out that the SunPro C++ compiler does not properly
7043 # handle `-M -o', and we need to detect this.
7044 if depmode=$depmode \
7045 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7046 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7047 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7048 >/dev/null 2>conftest.err &&
7049 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7050 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7051 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7052 # icc doesn't choke on unknown options, it will just issue warnings
7053 # or remarks (even with -Werror). So we grep stderr for any message
7054 # that says an option was ignored or not supported.
7055 # When given -MP, icc 7.0 and 7.1 complain thusly:
7056 # icc: Command line warning: ignoring option '-M'; no argument required
7057 # The diagnosis changed in icc 8.0:
7058 # icc: Command line remark: option '-MP' not supported
7059 if (grep 'ignoring option' conftest.err ||
7060 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7061 am_cv_CC_dependencies_compiler_type=$depmode
7062 break
7063 fi
7064 fi
7065 done
7066
7067 cd ..
7068 rm -rf conftest.dir
7069else
7070 am_cv_CC_dependencies_compiler_type=none
7071fi
7072
7073fi
7074echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
7075echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
7076CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7077
7078
7079
7080if
7081 test "x$enable_dependency_tracking" != xno \
7082 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7083 am__fastdepCC_TRUE=
7084 am__fastdepCC_FALSE='#'
7085else
7086 am__fastdepCC_TRUE='#'
7087 am__fastdepCC_FALSE=
7088fi
7089
7090
7091
7092
bec39cab
AC
7093debugdir=${libdir}/debug
7094
7095
b4e70030 7096# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
bec39cab 7097if test "${with_separate_debug_dir+set}" = set; then
783e057b
DJ
7098 withval="$with_separate_debug_dir"
7099 debugdir="${withval}"
7100fi;
20e95c23 7101
20e95c23 7102
783e057b
DJ
7103 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7104 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7105 ac_define_dir=`eval echo $debugdir`
7106 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7107
783e057b
DJ
7108cat >>confdefs.h <<_ACEOF
7109#define DEBUGDIR "$ac_define_dir"
20e95c23 7110_ACEOF
20e95c23 7111
20e95c23 7112
783e057b 7113#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
20e95c23 7114
783e057b
DJ
7115if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7116 if test "x$prefix" = xNONE; then
7117 test_prefix=/usr/local
7118 else
7119 test_prefix=$prefix
7120 fi
20e95c23 7121else
783e057b 7122 test_prefix=$exec_prefix
20e95c23 7123fi
783e057b
DJ
7124case ${debugdir} in
7125"${test_prefix}"|"${test_prefix}/"*|\
7126'${exec_prefix}'|'${exec_prefix}/'*)
20e95c23
DJ
7127
7128cat >>confdefs.h <<\_ACEOF
783e057b 7129#define DEBUGDIR_RELOCATABLE 1
20e95c23
DJ
7130_ACEOF
7131
783e057b
DJ
7132 ;;
7133esac
7134
20e95c23 7135
20e95c23 7136
783e057b 7137subdirs="$subdirs doc testsuite"
20e95c23
DJ
7138
7139
783e057b
DJ
7140# Check whether to support alternative target configurations
7141# Check whether --enable-targets or --disable-targets was given.
7142if test "${enable_targets+set}" = set; then
7143 enableval="$enable_targets"
7144 case "${enableval}" in
7145 yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
7146echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
7147 { (exit 1); exit 1; }; }
7148 ;;
7149 no) enable_targets= ;;
7150 *) enable_targets=$enableval ;;
7151esac
7152fi;
20e95c23 7153
783e057b
DJ
7154# Check whether to enable 64-bit support on 32-bit hosts
7155# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
7156if test "${enable_64_bit_bfd+set}" = set; then
7157 enableval="$enable_64_bit_bfd"
7158 case "${enableval}" in
7159 yes) want64=true ;;
7160 no) want64=false ;;
7161 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
7162echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
7163 { (exit 1); exit 1; }; } ;;
7164esac
7165else
7166 want64=false
7167fi;
7168# Provide defaults for some variables set by the per-host and per-target
7169# configuration.
7170gdb_host_obs=posix-hdep.o
20e95c23 7171
783e057b
DJ
7172if test "${target}" = "${host}"; then
7173 gdb_native=yes
7174else
7175 gdb_native=no
7176fi
20e95c23 7177
783e057b 7178. $srcdir/configure.host
20e95c23 7179
783e057b 7180# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 7181
783e057b
DJ
7182TARGET_OBS=
7183all_targets=
20e95c23 7184
783e057b 7185for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 7186do
783e057b
DJ
7187 if test "$targ_alias" = "all"; then
7188 all_targets=true
7189 else
7190 # Canonicalize the secondary target names.
7191 result=`$ac_config_sub $targ_alias 2>/dev/null`
7192 if test -n "$result"; then
7193 targ=$result
7194 else
7195 targ=$targ_alias
7196 fi
20e95c23 7197
783e057b 7198 . ${srcdir}/configure.tgt
20e95c23 7199
783e057b
DJ
7200 # Target-specific object files
7201 for i in ${gdb_target_obs}; do
7202 case " $TARGET_OBS " in
7203 *" ${i} "*) ;;
7204 *)
7205 TARGET_OBS="$TARGET_OBS ${i}"
7206 ;;
7207 esac
7208 done
20e95c23 7209
783e057b
DJ
7210 # Check whether this target needs 64-bit CORE_ADDR
7211 if test x${want64} = xfalse; then
7212 . ${srcdir}/../bfd/config.bfd
7213 fi
7214 fi
20e95c23
DJ
7215done
7216
783e057b
DJ
7217if test x${all_targets} = xtrue; then
7218
7219 # We want all 64-bit targets if we either:
7220 # - run on a 64-bit host or
7221 # - already require 64-bit support for some other target or
7222 # - the --enable-64-bit-bfd option was supplied
7223 # Otherwise we only support all 32-bit targets.
7224 #
7225 # NOTE: This test must be in sync with the corresponding
7226 # tests in BFD!
20e95c23 7227
783e057b
DJ
7228 if test x${want64} = xfalse; then
7229 echo "$as_me:$LINENO: checking for long" >&5
c0993dbe
UW
7230echo $ECHO_N "checking for long... $ECHO_C" >&6
7231if test "${ac_cv_type_long+set}" = set; then
7232 echo $ECHO_N "(cached) $ECHO_C" >&6
7233else
7234 cat >conftest.$ac_ext <<_ACEOF
7235/* confdefs.h. */
7236_ACEOF
7237cat confdefs.h >>conftest.$ac_ext
7238cat >>conftest.$ac_ext <<_ACEOF
7239/* end confdefs.h. */
7240$ac_includes_default
7241int
7242main ()
7243{
7244if ((long *) 0)
7245 return 0;
7246if (sizeof (long))
7247 return 0;
7248 ;
7249 return 0;
7250}
7251_ACEOF
7252rm -f conftest.$ac_objext
7253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7254 (eval $ac_compile) 2>conftest.er1
7255 ac_status=$?
7256 grep -v '^ *+' conftest.er1 >conftest.err
7257 rm -f conftest.er1
7258 cat conftest.err >&5
7259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7260 (exit $ac_status); } &&
7261 { ac_try='test -z "$ac_c_werror_flag"
7262 || test ! -s conftest.err'
7263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7264 (eval $ac_try) 2>&5
7265 ac_status=$?
7266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7267 (exit $ac_status); }; } &&
7268 { ac_try='test -s conftest.$ac_objext'
7269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7270 (eval $ac_try) 2>&5
7271 ac_status=$?
7272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7273 (exit $ac_status); }; }; then
7274 ac_cv_type_long=yes
7275else
7276 echo "$as_me: failed program was:" >&5
7277sed 's/^/| /' conftest.$ac_ext >&5
7278
7279ac_cv_type_long=no
7280fi
7281rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7282fi
7283echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7284echo "${ECHO_T}$ac_cv_type_long" >&6
7285
7286echo "$as_me:$LINENO: checking size of long" >&5
7287echo $ECHO_N "checking size of long... $ECHO_C" >&6
7288if test "${ac_cv_sizeof_long+set}" = set; then
7289 echo $ECHO_N "(cached) $ECHO_C" >&6
7290else
7291 if test "$ac_cv_type_long" = yes; then
7292 # The cast to unsigned long works around a bug in the HP C Compiler
7293 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7294 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7295 # This bug is HP SR number 8606223364.
7296 if test "$cross_compiling" = yes; then
7297 # Depending upon the size, compute the lo and hi bounds.
7298cat >conftest.$ac_ext <<_ACEOF
7299/* confdefs.h. */
7300_ACEOF
7301cat confdefs.h >>conftest.$ac_ext
7302cat >>conftest.$ac_ext <<_ACEOF
7303/* end confdefs.h. */
7304$ac_includes_default
7305int
7306main ()
7307{
7308static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
7309test_array [0] = 0
7310
7311 ;
7312 return 0;
7313}
7314_ACEOF
7315rm -f conftest.$ac_objext
7316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7317 (eval $ac_compile) 2>conftest.er1
7318 ac_status=$?
7319 grep -v '^ *+' conftest.er1 >conftest.err
7320 rm -f conftest.er1
7321 cat conftest.err >&5
7322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7323 (exit $ac_status); } &&
7324 { ac_try='test -z "$ac_c_werror_flag"
7325 || test ! -s conftest.err'
7326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7327 (eval $ac_try) 2>&5
7328 ac_status=$?
7329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7330 (exit $ac_status); }; } &&
7331 { ac_try='test -s conftest.$ac_objext'
7332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7333 (eval $ac_try) 2>&5
7334 ac_status=$?
7335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7336 (exit $ac_status); }; }; then
7337 ac_lo=0 ac_mid=0
7338 while :; do
7339 cat >conftest.$ac_ext <<_ACEOF
7340/* confdefs.h. */
7341_ACEOF
7342cat confdefs.h >>conftest.$ac_ext
7343cat >>conftest.$ac_ext <<_ACEOF
7344/* end confdefs.h. */
7345$ac_includes_default
7346int
7347main ()
7348{
7349static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7350test_array [0] = 0
7351
7352 ;
7353 return 0;
7354}
7355_ACEOF
7356rm -f conftest.$ac_objext
7357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7358 (eval $ac_compile) 2>conftest.er1
7359 ac_status=$?
7360 grep -v '^ *+' conftest.er1 >conftest.err
7361 rm -f conftest.er1
7362 cat conftest.err >&5
7363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7364 (exit $ac_status); } &&
7365 { ac_try='test -z "$ac_c_werror_flag"
7366 || test ! -s conftest.err'
7367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7368 (eval $ac_try) 2>&5
7369 ac_status=$?
7370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7371 (exit $ac_status); }; } &&
7372 { ac_try='test -s conftest.$ac_objext'
7373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7374 (eval $ac_try) 2>&5
7375 ac_status=$?
7376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7377 (exit $ac_status); }; }; then
7378 ac_hi=$ac_mid; break
7379else
7380 echo "$as_me: failed program was:" >&5
7381sed 's/^/| /' conftest.$ac_ext >&5
7382
7383ac_lo=`expr $ac_mid + 1`
7384 if test $ac_lo -le $ac_mid; then
7385 ac_lo= ac_hi=
7386 break
7387 fi
7388 ac_mid=`expr 2 '*' $ac_mid + 1`
7389fi
7390rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7391 done
7392else
7393 echo "$as_me: failed program was:" >&5
7394sed 's/^/| /' conftest.$ac_ext >&5
7395
7396cat >conftest.$ac_ext <<_ACEOF
7397/* confdefs.h. */
7398_ACEOF
7399cat confdefs.h >>conftest.$ac_ext
7400cat >>conftest.$ac_ext <<_ACEOF
7401/* end confdefs.h. */
7402$ac_includes_default
7403int
7404main ()
7405{
7406static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
7407test_array [0] = 0
7408
7409 ;
7410 return 0;
7411}
7412_ACEOF
7413rm -f conftest.$ac_objext
7414if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7415 (eval $ac_compile) 2>conftest.er1
7416 ac_status=$?
7417 grep -v '^ *+' conftest.er1 >conftest.err
7418 rm -f conftest.er1
7419 cat conftest.err >&5
7420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7421 (exit $ac_status); } &&
7422 { ac_try='test -z "$ac_c_werror_flag"
7423 || test ! -s conftest.err'
7424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7425 (eval $ac_try) 2>&5
7426 ac_status=$?
7427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7428 (exit $ac_status); }; } &&
7429 { ac_try='test -s conftest.$ac_objext'
7430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7431 (eval $ac_try) 2>&5
7432 ac_status=$?
7433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7434 (exit $ac_status); }; }; then
7435 ac_hi=-1 ac_mid=-1
7436 while :; do
7437 cat >conftest.$ac_ext <<_ACEOF
7438/* confdefs.h. */
7439_ACEOF
7440cat confdefs.h >>conftest.$ac_ext
7441cat >>conftest.$ac_ext <<_ACEOF
7442/* end confdefs.h. */
7443$ac_includes_default
7444int
7445main ()
7446{
7447static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
7448test_array [0] = 0
7449
7450 ;
7451 return 0;
7452}
7453_ACEOF
7454rm -f conftest.$ac_objext
7455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7456 (eval $ac_compile) 2>conftest.er1
7457 ac_status=$?
7458 grep -v '^ *+' conftest.er1 >conftest.err
7459 rm -f conftest.er1
7460 cat conftest.err >&5
7461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7462 (exit $ac_status); } &&
7463 { ac_try='test -z "$ac_c_werror_flag"
7464 || test ! -s conftest.err'
7465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7466 (eval $ac_try) 2>&5
7467 ac_status=$?
7468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7469 (exit $ac_status); }; } &&
7470 { ac_try='test -s conftest.$ac_objext'
7471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7472 (eval $ac_try) 2>&5
7473 ac_status=$?
7474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7475 (exit $ac_status); }; }; then
7476 ac_lo=$ac_mid; break
7477else
7478 echo "$as_me: failed program was:" >&5
7479sed 's/^/| /' conftest.$ac_ext >&5
7480
7481ac_hi=`expr '(' $ac_mid ')' - 1`
7482 if test $ac_mid -le $ac_hi; then
7483 ac_lo= ac_hi=
7484 break
7485 fi
7486 ac_mid=`expr 2 '*' $ac_mid`
7487fi
7488rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7489 done
7490else
7491 echo "$as_me: failed program was:" >&5
7492sed 's/^/| /' conftest.$ac_ext >&5
7493
7494ac_lo= ac_hi=
7495fi
7496rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7497fi
7498rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7499# Binary search between lo and hi bounds.
7500while test "x$ac_lo" != "x$ac_hi"; do
7501 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7502 cat >conftest.$ac_ext <<_ACEOF
7503/* confdefs.h. */
7504_ACEOF
7505cat confdefs.h >>conftest.$ac_ext
7506cat >>conftest.$ac_ext <<_ACEOF
7507/* end confdefs.h. */
7508$ac_includes_default
7509int
7510main ()
7511{
7512static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7513test_array [0] = 0
7514
7515 ;
7516 return 0;
7517}
7518_ACEOF
7519rm -f conftest.$ac_objext
7520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7521 (eval $ac_compile) 2>conftest.er1
7522 ac_status=$?
7523 grep -v '^ *+' conftest.er1 >conftest.err
7524 rm -f conftest.er1
7525 cat conftest.err >&5
7526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7527 (exit $ac_status); } &&
7528 { ac_try='test -z "$ac_c_werror_flag"
7529 || test ! -s conftest.err'
7530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7531 (eval $ac_try) 2>&5
7532 ac_status=$?
7533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7534 (exit $ac_status); }; } &&
7535 { ac_try='test -s conftest.$ac_objext'
7536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7537 (eval $ac_try) 2>&5
7538 ac_status=$?
7539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7540 (exit $ac_status); }; }; then
7541 ac_hi=$ac_mid
7542else
7543 echo "$as_me: failed program was:" >&5
7544sed 's/^/| /' conftest.$ac_ext >&5
7545
7546ac_lo=`expr '(' $ac_mid ')' + 1`
7547fi
7548rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7549done
7550case $ac_lo in
7551?*) ac_cv_sizeof_long=$ac_lo;;
d5af19ba
DJ
7552'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7553echo "$as_me: error: in \`$ac_pwd':" >&2;}
7554{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
c0993dbe
UW
7555See \`config.log' for more details." >&5
7556echo "$as_me: error: cannot compute sizeof (long), 77
7557See \`config.log' for more details." >&2;}
d5af19ba 7558 { (exit 1); exit 1; }; }; } ;;
c0993dbe
UW
7559esac
7560else
7561 if test "$cross_compiling" = yes; then
d5af19ba
DJ
7562 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7563echo "$as_me: error: in \`$ac_pwd':" >&2;}
7564{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
c0993dbe
UW
7565See \`config.log' for more details." >&5
7566echo "$as_me: error: cannot run test program while cross compiling
7567See \`config.log' for more details." >&2;}
d5af19ba 7568 { (exit 1); exit 1; }; }; }
c0993dbe
UW
7569else
7570 cat >conftest.$ac_ext <<_ACEOF
7571/* confdefs.h. */
7572_ACEOF
7573cat confdefs.h >>conftest.$ac_ext
7574cat >>conftest.$ac_ext <<_ACEOF
7575/* end confdefs.h. */
7576$ac_includes_default
7577long longval () { return (long) (sizeof (long)); }
7578unsigned long ulongval () { return (long) (sizeof (long)); }
7579#include <stdio.h>
7580#include <stdlib.h>
7581int
7582main ()
7583{
7584
7585 FILE *f = fopen ("conftest.val", "w");
7586 if (! f)
7587 exit (1);
7588 if (((long) (sizeof (long))) < 0)
7589 {
7590 long i = longval ();
7591 if (i != ((long) (sizeof (long))))
7592 exit (1);
7593 fprintf (f, "%ld\n", i);
7594 }
7595 else
7596 {
7597 unsigned long i = ulongval ();
7598 if (i != ((long) (sizeof (long))))
7599 exit (1);
7600 fprintf (f, "%lu\n", i);
7601 }
7602 exit (ferror (f) || fclose (f) != 0);
7603
7604 ;
7605 return 0;
7606}
7607_ACEOF
7608rm -f conftest$ac_exeext
7609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7610 (eval $ac_link) 2>&5
7611 ac_status=$?
7612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7613 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7615 (eval $ac_try) 2>&5
7616 ac_status=$?
7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7618 (exit $ac_status); }; }; then
7619 ac_cv_sizeof_long=`cat conftest.val`
7620else
7621 echo "$as_me: program exited with status $ac_status" >&5
7622echo "$as_me: failed program was:" >&5
7623sed 's/^/| /' conftest.$ac_ext >&5
7624
7625( exit $ac_status )
d5af19ba
DJ
7626{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7627echo "$as_me: error: in \`$ac_pwd':" >&2;}
c0993dbe
UW
7628{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7629See \`config.log' for more details." >&5
7630echo "$as_me: error: cannot compute sizeof (long), 77
7631See \`config.log' for more details." >&2;}
d5af19ba 7632 { (exit 1); exit 1; }; }; }
c0993dbe
UW
7633fi
7634rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7635fi
7636fi
7637rm -f conftest.val
7638else
7639 ac_cv_sizeof_long=0
7640fi
7641fi
7642echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7643echo "${ECHO_T}$ac_cv_sizeof_long" >&6
7644cat >>confdefs.h <<_ACEOF
7645#define SIZEOF_LONG $ac_cv_sizeof_long
7646_ACEOF
7647
7648
7649 if test "x${ac_cv_sizeof_long}" = "x8"; then
7650 want64=true
7651 fi
7652 fi
7653 if test x${want64} = xtrue; then
7654 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
7655 else
7656 TARGET_OBS='$(ALL_TARGET_OBS)'
7657 fi
7658fi
7659
7660
7661
7662# For other settings, only the main target counts.
7663gdb_sim=
7664gdb_osabi=
7665build_gdbserver=
7666targ=$target; . ${srcdir}/configure.tgt
7667
7668# Fetch the default architecture and default target vector from BFD.
7669targ=$target; . $srcdir/../bfd/config.bfd
7670
7671# We only want the first architecture, so strip off the others if
7672# there is more than one.
7673targ_archs=`echo $targ_archs | sed 's/ .*//'`
7674
7675if test "x$targ_archs" != x; then
7676
7677cat >>confdefs.h <<_ACEOF
7678#define DEFAULT_BFD_ARCH $targ_archs
7679_ACEOF
7680
7681fi
7682if test "x$targ_defvec" != x; then
7683
7684cat >>confdefs.h <<_ACEOF
7685#define DEFAULT_BFD_VEC $targ_defvec
7686_ACEOF
7687
7688fi
7689
c0993dbe
UW
7690# The CLI cannot be disabled yet, but may be in the future.
7691
7692# Enable CLI.
7693# Check whether --enable-gdbcli or --disable-gdbcli was given.
7694if test "${enable_gdbcli+set}" = set; then
7695 enableval="$enable_gdbcli"
7696 case $enableval in
7697 yes)
7698 ;;
7699 no)
7700 { { echo "$as_me:$LINENO: error: the command-line interface cannot be disabled yet" >&5
7701echo "$as_me: error: the command-line interface cannot be disabled yet" >&2;}
7702 { (exit 1); exit 1; }; } ;;
7703 *)
7704 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbcli" >&5
7705echo "$as_me: error: bad value $enableval for --enable-gdbcli" >&2;}
7706 { (exit 1); exit 1; }; } ;;
7707 esac
7708else
7709 enable_gdbcli=yes
7710fi;
7711if test x"$enable_gdbcli" = xyes; then
7712 if test -d $srcdir/cli; then
7713 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
7714 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
7715 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
7716 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
7717 fi
7718fi
7719
7720# Enable MI.
7721# Check whether --enable-gdbmi or --disable-gdbmi was given.
7722if test "${enable_gdbmi+set}" = set; then
7723 enableval="$enable_gdbmi"
7724 case $enableval in
7725 yes | no)
7726 ;;
7727 *)
7728 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbmi" >&5
7729echo "$as_me: error: bad value $enableval for --enable-gdbmi" >&2;}
7730 { (exit 1); exit 1; }; } ;;
7731 esac
7732else
7733 enable_gdbmi=yes
7734fi;
7735if test x"$enable_gdbmi" = xyes; then
7736 if test -d $srcdir/mi; then
7737 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
7738 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
7739 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
7740 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
7741 fi
7742fi
7743
7744# Enable TUI.
7745# Check whether --enable-tui or --disable-tui was given.
7746if test "${enable_tui+set}" = set; then
7747 enableval="$enable_tui"
7748 case $enableval in
3ca64bd3 7749 yes | no | auto)
c0993dbe
UW
7750 ;;
7751 *)
7752 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tui" >&5
7753echo "$as_me: error: bad value $enableval for --enable-tui" >&2;}
7754 { (exit 1); exit 1; }; } ;;
7755 esac
7756else
3ca64bd3 7757 enable_tui=auto
c0993dbe
UW
7758fi;
7759
7760# Enable gdbtk.
7761# Check whether --enable-gdbtk or --disable-gdbtk was given.
7762if test "${enable_gdbtk+set}" = set; then
7763 enableval="$enable_gdbtk"
7764 case $enableval in
7765 yes | no)
7766 ;;
7767 *)
7768 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbtk" >&5
7769echo "$as_me: error: bad value $enableval for --enable-gdbtk" >&2;}
7770 { (exit 1); exit 1; }; } ;;
7771 esac
7772else
5062cc19 7773 if test -d $srcdir/gdbtk; then
c0993dbe
UW
7774 enable_gdbtk=yes
7775 else
7776 enable_gdbtk=no
7777 fi
7778fi;
7779# We unconditionally disable gdbtk tests on selected platforms.
7780case $host_os in
7781 go32* | windows*)
7782 { echo "$as_me:$LINENO: WARNING: gdbtk isn't supported on $host; disabling" >&5
7783echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
7784 enable_gdbtk=no ;;
7785esac
7786
7787# Libunwind support.
bec39cab 7788
b4e70030 7789# Check whether --with-libunwind or --without-libunwind was given.
bec39cab 7790if test "${with_libunwind+set}" = set; then
b4e70030
JB
7791 withval="$with_libunwind"
7792 case "${withval}" in
bec39cab
AC
7793 yes) enable_libunwind=yes ;;
7794 no) enable_libunwind=no ;;
7795 *) { { echo "$as_me:$LINENO: error: bad value ${withval} for GDB with-libunwind option" >&5
7796echo "$as_me: error: bad value ${withval} for GDB with-libunwind option" >&2;}
7797 { (exit 1); exit 1; }; } ;;
7798esac
7799else
7800
7801
a9322a30
TT
7802
7803for ac_header in libunwind.h libunwind-ia64.h
bec39cab
AC
7804do
7805as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7806if eval "test \"\${$as_ac_Header+set}\" = set"; then
7807 echo "$as_me:$LINENO: checking for $ac_header" >&5
7808echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7809if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7810 echo $ECHO_N "(cached) $ECHO_C" >&6
7811fi
b4e70030
JB
7812echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7813echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7814else
7815 # Is the header compilable?
b4e70030
JB
7816echo "$as_me:$LINENO: checking $ac_header usability" >&5
7817echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7818cat >conftest.$ac_ext <<_ACEOF
7819/* confdefs.h. */
7820_ACEOF
7821cat confdefs.h >>conftest.$ac_ext
7822cat >>conftest.$ac_ext <<_ACEOF
7823/* end confdefs.h. */
7824$ac_includes_default
7825#include <$ac_header>
7826_ACEOF
7827rm -f conftest.$ac_objext
7828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7829 (eval $ac_compile) 2>conftest.er1
7830 ac_status=$?
7831 grep -v '^ *+' conftest.er1 >conftest.err
7832 rm -f conftest.er1
7833 cat conftest.err >&5
7834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7835 (exit $ac_status); } &&
b4e70030
JB
7836 { ac_try='test -z "$ac_c_werror_flag"
7837 || test ! -s conftest.err'
bec39cab
AC
7838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7839 (eval $ac_try) 2>&5
7840 ac_status=$?
7841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7842 (exit $ac_status); }; } &&
7843 { ac_try='test -s conftest.$ac_objext'
7844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7845 (eval $ac_try) 2>&5
7846 ac_status=$?
7847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7848 (exit $ac_status); }; }; then
7849 ac_header_compiler=yes
7850else
7851 echo "$as_me: failed program was:" >&5
7852sed 's/^/| /' conftest.$ac_ext >&5
7853
b4e70030 7854ac_header_compiler=no
bec39cab
AC
7855fi
7856rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
7857echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7858echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
7859
7860# Is the header present?
b4e70030
JB
7861echo "$as_me:$LINENO: checking $ac_header presence" >&5
7862echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
7863cat >conftest.$ac_ext <<_ACEOF
7864/* confdefs.h. */
7865_ACEOF
7866cat confdefs.h >>conftest.$ac_ext
7867cat >>conftest.$ac_ext <<_ACEOF
7868/* end confdefs.h. */
7869#include <$ac_header>
7870_ACEOF
7871if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7872 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7873 ac_status=$?
7874 grep -v '^ *+' conftest.er1 >conftest.err
7875 rm -f conftest.er1
7876 cat conftest.err >&5
7877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7878 (exit $ac_status); } >/dev/null; then
7879 if test -s conftest.err; then
7880 ac_cpp_err=$ac_c_preproc_warn_flag
7881 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7882 else
7883 ac_cpp_err=
7884 fi
7885else
7886 ac_cpp_err=yes
7887fi
7888if test -z "$ac_cpp_err"; then
7889 ac_header_preproc=yes
7890else
7891 echo "$as_me: failed program was:" >&5
7892sed 's/^/| /' conftest.$ac_ext >&5
7893
7894 ac_header_preproc=no
7895fi
7896rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7897echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7898echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
7899
7900# So? What about this header?
7901case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7902 yes:no: )
7903 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7904echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7905 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7906echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7907 ac_header_preproc=yes
7908 ;;
7909 no:yes:* )
7910 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7911echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7912 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7913echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7914 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7915echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7916 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7917echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7918 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7919echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7920 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7921echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
7922 (
7923 cat <<\_ASBOX
7924## ------------------------------------------ ##
7925## Report this to the AC_PACKAGE_NAME lists. ##
7926## ------------------------------------------ ##
7927_ASBOX
7928 ) |
7929 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
7930 ;;
7931esac
b4e70030
JB
7932echo "$as_me:$LINENO: checking for $ac_header" >&5
7933echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7934if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7935 echo $ECHO_N "(cached) $ECHO_C" >&6
7936else
7937 eval "$as_ac_Header=\$ac_header_preproc"
7938fi
b4e70030
JB
7939echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7940echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7941
7942fi
7943if test `eval echo '${'$as_ac_Header'}'` = yes; then
7944 cat >>confdefs.h <<_ACEOF
7945#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7946_ACEOF
7947
7948fi
7949
7950done
7951
a9322a30
TT
7952 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
7953 enable_libunwind=yes;
7954 fi
7955
7956fi;
7957
7958if test x"$enable_libunwind" = xyes; then
7959
bec39cab 7960
a9322a30 7961for ac_header in libunwind.h libunwind-ia64.h
bec39cab
AC
7962do
7963as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7964if eval "test \"\${$as_ac_Header+set}\" = set"; then
7965 echo "$as_me:$LINENO: checking for $ac_header" >&5
7966echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7967if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7968 echo $ECHO_N "(cached) $ECHO_C" >&6
7969fi
b4e70030
JB
7970echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7971echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7972else
7973 # Is the header compilable?
b4e70030
JB
7974echo "$as_me:$LINENO: checking $ac_header usability" >&5
7975echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7976cat >conftest.$ac_ext <<_ACEOF
7977/* confdefs.h. */
7978_ACEOF
7979cat confdefs.h >>conftest.$ac_ext
7980cat >>conftest.$ac_ext <<_ACEOF
7981/* end confdefs.h. */
7982$ac_includes_default
7983#include <$ac_header>
7984_ACEOF
7985rm -f conftest.$ac_objext
7986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7987 (eval $ac_compile) 2>conftest.er1
7988 ac_status=$?
7989 grep -v '^ *+' conftest.er1 >conftest.err
7990 rm -f conftest.er1
7991 cat conftest.err >&5
7992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7993 (exit $ac_status); } &&
b4e70030
JB
7994 { ac_try='test -z "$ac_c_werror_flag"
7995 || test ! -s conftest.err'
bec39cab
AC
7996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7997 (eval $ac_try) 2>&5
7998 ac_status=$?
7999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8000 (exit $ac_status); }; } &&
8001 { ac_try='test -s conftest.$ac_objext'
8002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8003 (eval $ac_try) 2>&5
8004 ac_status=$?
8005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8006 (exit $ac_status); }; }; then
8007 ac_header_compiler=yes
8008else
8009 echo "$as_me: failed program was:" >&5
8010sed 's/^/| /' conftest.$ac_ext >&5
8011
b4e70030 8012ac_header_compiler=no
bec39cab
AC
8013fi
8014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8015echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8016echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8017
8018# Is the header present?
b4e70030
JB
8019echo "$as_me:$LINENO: checking $ac_header presence" >&5
8020echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8021cat >conftest.$ac_ext <<_ACEOF
8022/* confdefs.h. */
8023_ACEOF
8024cat confdefs.h >>conftest.$ac_ext
8025cat >>conftest.$ac_ext <<_ACEOF
8026/* end confdefs.h. */
8027#include <$ac_header>
8028_ACEOF
8029if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8030 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8031 ac_status=$?
8032 grep -v '^ *+' conftest.er1 >conftest.err
8033 rm -f conftest.er1
8034 cat conftest.err >&5
8035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8036 (exit $ac_status); } >/dev/null; then
8037 if test -s conftest.err; then
8038 ac_cpp_err=$ac_c_preproc_warn_flag
8039 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8040 else
8041 ac_cpp_err=
8042 fi
8043else
8044 ac_cpp_err=yes
8045fi
8046if test -z "$ac_cpp_err"; then
8047 ac_header_preproc=yes
8048else
8049 echo "$as_me: failed program was:" >&5
8050sed 's/^/| /' conftest.$ac_ext >&5
8051
8052 ac_header_preproc=no
8053fi
8054rm -f conftest.err conftest.$ac_ext
b4e70030
JB
8055echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8056echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
8057
8058# So? What about this header?
8059case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8060 yes:no: )
8061 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8062echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8063 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8064echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8065 ac_header_preproc=yes
8066 ;;
8067 no:yes:* )
8068 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8069echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8070 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8071echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8072 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8073echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8074 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8075echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8076 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8077echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8078 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8079echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8080 (
8081 cat <<\_ASBOX
8082## ------------------------------------------ ##
8083## Report this to the AC_PACKAGE_NAME lists. ##
8084## ------------------------------------------ ##
8085_ASBOX
8086 ) |
8087 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8088 ;;
8089esac
b4e70030
JB
8090echo "$as_me:$LINENO: checking for $ac_header" >&5
8091echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8092if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8093 echo $ECHO_N "(cached) $ECHO_C" >&6
8094else
8095 eval "$as_ac_Header=\$ac_header_preproc"
8096fi
b4e70030
JB
8097echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8098echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8099
8100fi
8101if test `eval echo '${'$as_ac_Header'}'` = yes; then
8102 cat >>confdefs.h <<_ACEOF
8103#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8104_ACEOF
8105
8106fi
8107
8108done
8109
bec39cab 8110
a9322a30
TT
8111cat >>confdefs.h <<\_ACEOF
8112#define HAVE_LIBUNWIND 1
8113_ACEOF
8114
8115 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8116 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8117 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8118fi
8119
cb01cfba
JB
8120opt_curses=no
8121
8122# Check whether --with-curses or --without-curses was given.
8123if test "${with_curses+set}" = set; then
8124 withval="$with_curses"
8125 opt_curses=$withval
8126fi;
8127
76a39ba7 8128prefer_curses=no
cb01cfba 8129if test "$opt_curses" = "yes"; then
76a39ba7 8130 prefer_curses=yes
cb01cfba
JB
8131fi
8132
a9322a30
TT
8133# Profiling support.
8134# Check whether --enable-profiling or --disable-profiling was given.
8135if test "${enable_profiling+set}" = set; then
8136 enableval="$enable_profiling"
8137 case $enableval in
8138 yes | no)
8139 ;;
8140 *)
8141 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-profile" >&5
8142echo "$as_me: error: bad value $enableval for --enable-profile" >&2;}
8143 { (exit 1); exit 1; }; } ;;
8144 esac
8145else
8146 enable_profiling=no
b4e70030 8147fi;
bec39cab 8148
bec39cab 8149
a9322a30
TT
8150
8151for ac_func in monstartup _mcleanup
bec39cab 8152do
a9322a30
TT
8153as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8154echo "$as_me:$LINENO: checking for $ac_func" >&5
8155echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8156if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 8157 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8158else
a9322a30 8159 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8160/* confdefs.h. */
8161_ACEOF
8162cat confdefs.h >>conftest.$ac_ext
8163cat >>conftest.$ac_ext <<_ACEOF
8164/* end confdefs.h. */
a9322a30
TT
8165/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8166 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8167#define $ac_func innocuous_$ac_func
8168
8169/* System header to define __stub macros and hopefully few prototypes,
8170 which can conflict with char $ac_func (); below.
8171 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8172 <limits.h> exists even on freestanding compilers. */
8173
8174#ifdef __STDC__
8175# include <limits.h>
8176#else
8177# include <assert.h>
8178#endif
8179
8180#undef $ac_func
8181
8182/* Override any gcc2 internal prototype to avoid an error. */
8183#ifdef __cplusplus
8184extern "C"
8185{
8186#endif
8187/* We use char because int might match the return type of a gcc2
8188 builtin and then its argument prototype would still apply. */
8189char $ac_func ();
8190/* The GNU C library defines this for functions which it implements
8191 to always fail with ENOSYS. Some functions are actually named
8192 something starting with __ and the normal name is an alias. */
8193#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8194choke me
8195#else
8196char (*f) () = $ac_func;
8197#endif
8198#ifdef __cplusplus
8199}
8200#endif
8201
8202int
8203main ()
8204{
8205return f != $ac_func;
8206 ;
8207 return 0;
8208}
bec39cab 8209_ACEOF
a9322a30
TT
8210rm -f conftest.$ac_objext conftest$ac_exeext
8211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8212 (eval $ac_link) 2>conftest.er1
bec39cab
AC
8213 ac_status=$?
8214 grep -v '^ *+' conftest.er1 >conftest.err
8215 rm -f conftest.er1
8216 cat conftest.err >&5
8217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8218 (exit $ac_status); } &&
b4e70030
JB
8219 { ac_try='test -z "$ac_c_werror_flag"
8220 || test ! -s conftest.err'
bec39cab
AC
8221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8222 (eval $ac_try) 2>&5
8223 ac_status=$?
8224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8225 (exit $ac_status); }; } &&
a9322a30 8226 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
8227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8228 (eval $ac_try) 2>&5
8229 ac_status=$?
8230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8231 (exit $ac_status); }; }; then
a9322a30 8232 eval "$as_ac_var=yes"
bec39cab
AC
8233else
8234 echo "$as_me: failed program was:" >&5
8235sed 's/^/| /' conftest.$ac_ext >&5
8236
a9322a30 8237eval "$as_ac_var=no"
bec39cab 8238fi
a9322a30
TT
8239rm -f conftest.err conftest.$ac_objext \
8240 conftest$ac_exeext conftest.$ac_ext
bec39cab 8241fi
a9322a30
TT
8242echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8243echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8244if test `eval echo '${'$as_ac_var'}'` = yes; then
bec39cab 8245 cat >>confdefs.h <<_ACEOF
a9322a30 8246#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab
AC
8247_ACEOF
8248
8249fi
bec39cab
AC
8250done
8251
a9322a30
TT
8252echo "$as_me:$LINENO: checking for _etext" >&5
8253echo $ECHO_N "checking for _etext... $ECHO_C" >&6
8254if test "${ac_cv_var__etext+set}" = set; then
bec39cab 8255 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8256else
a9322a30 8257 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8258/* confdefs.h. */
8259_ACEOF
8260cat confdefs.h >>conftest.$ac_ext
8261cat >>conftest.$ac_ext <<_ACEOF
8262/* end confdefs.h. */
a9322a30
TT
8263#include <stdlib.h>
8264extern char _etext;
8265
8266int
8267main ()
8268{
8269free (&_etext);
8270 ;
8271 return 0;
8272}
bec39cab 8273_ACEOF
a9322a30
TT
8274rm -f conftest.$ac_objext conftest$ac_exeext
8275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8276 (eval $ac_link) 2>conftest.er1
bec39cab
AC
8277 ac_status=$?
8278 grep -v '^ *+' conftest.er1 >conftest.err
8279 rm -f conftest.er1
8280 cat conftest.err >&5
8281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8282 (exit $ac_status); } &&
b4e70030
JB
8283 { ac_try='test -z "$ac_c_werror_flag"
8284 || test ! -s conftest.err'
bec39cab
AC
8285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8286 (eval $ac_try) 2>&5
8287 ac_status=$?
8288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8289 (exit $ac_status); }; } &&
a9322a30 8290 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
8291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8292 (eval $ac_try) 2>&5
8293 ac_status=$?
8294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8295 (exit $ac_status); }; }; then
a9322a30 8296 ac_cv_var__etext=yes
bec39cab
AC
8297else
8298 echo "$as_me: failed program was:" >&5
8299sed 's/^/| /' conftest.$ac_ext >&5
8300
a9322a30 8301ac_cv_var__etext=no
bec39cab 8302fi
a9322a30
TT
8303rm -f conftest.err conftest.$ac_objext \
8304 conftest$ac_exeext conftest.$ac_ext
bec39cab 8305fi
a9322a30
TT
8306echo "$as_me:$LINENO: result: $ac_cv_var__etext" >&5
8307echo "${ECHO_T}$ac_cv_var__etext" >&6
8308if test $ac_cv_var__etext = yes; then
60ca704f
SE
8309
8310cat >>confdefs.h <<\_ACEOF
a9322a30 8311#define HAVE__ETEXT 1
bec39cab
AC
8312_ACEOF
8313
bec39cab 8314fi
a9322a30
TT
8315echo "$as_me:$LINENO: checking for etext" >&5
8316echo $ECHO_N "checking for etext... $ECHO_C" >&6
8317if test "${ac_cv_var_etext+set}" = set; then
bec39cab
AC
8318 echo $ECHO_N "(cached) $ECHO_C" >&6
8319else
8320 cat >conftest.$ac_ext <<_ACEOF
8321/* confdefs.h. */
8322_ACEOF
8323cat confdefs.h >>conftest.$ac_ext
8324cat >>conftest.$ac_ext <<_ACEOF
8325/* end confdefs.h. */
a9322a30
TT
8326#include <stdlib.h>
8327extern char etext;
bec39cab
AC
8328
8329int
8330main ()
8331{
a9322a30 8332free (&etext);
bec39cab
AC
8333 ;
8334 return 0;
8335}
8336_ACEOF
8337rm -f conftest.$ac_objext conftest$ac_exeext
8338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8339 (eval $ac_link) 2>conftest.er1
8340 ac_status=$?
8341 grep -v '^ *+' conftest.er1 >conftest.err
8342 rm -f conftest.er1
8343 cat conftest.err >&5
8344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8345 (exit $ac_status); } &&
b4e70030
JB
8346 { ac_try='test -z "$ac_c_werror_flag"
8347 || test ! -s conftest.err'
bec39cab
AC
8348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8349 (eval $ac_try) 2>&5
8350 ac_status=$?
8351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8352 (exit $ac_status); }; } &&
8353 { ac_try='test -s conftest$ac_exeext'
8354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8355 (eval $ac_try) 2>&5
8356 ac_status=$?
8357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8358 (exit $ac_status); }; }; then
a9322a30 8359 ac_cv_var_etext=yes
bec39cab
AC
8360else
8361 echo "$as_me: failed program was:" >&5
8362sed 's/^/| /' conftest.$ac_ext >&5
8363
a9322a30 8364ac_cv_var_etext=no
bec39cab
AC
8365fi
8366rm -f conftest.err conftest.$ac_objext \
8367 conftest$ac_exeext conftest.$ac_ext
8368fi
a9322a30
TT
8369echo "$as_me:$LINENO: result: $ac_cv_var_etext" >&5
8370echo "${ECHO_T}$ac_cv_var_etext" >&6
8371if test $ac_cv_var_etext = yes; then
8372
8373cat >>confdefs.h <<\_ACEOF
8374#define HAVE_ETEXT 1
bec39cab
AC
8375_ACEOF
8376
8377fi
a9322a30
TT
8378if test "$enable_profiling" = yes ; then
8379 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
8380 { { echo "$as_me:$LINENO: error: --enable-profiling requires monstartup and _mcleanup" >&5
8381echo "$as_me: error: --enable-profiling requires monstartup and _mcleanup" >&2;}
8382 { (exit 1); exit 1; }; }
8383 fi
8384 PROFILE_CFLAGS=-pg
8385 OLD_CFLAGS="$CFLAGS"
8386 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8387
a9322a30
TT
8388 echo "$as_me:$LINENO: checking whether $CC supports -pg" >&5
8389echo $ECHO_N "checking whether $CC supports -pg... $ECHO_C" >&6
8390if test "${ac_cv_cc_supports_pg+set}" = set; then
bec39cab
AC
8391 echo $ECHO_N "(cached) $ECHO_C" >&6
8392else
8393 cat >conftest.$ac_ext <<_ACEOF
8394/* confdefs.h. */
8395_ACEOF
8396cat confdefs.h >>conftest.$ac_ext
8397cat >>conftest.$ac_ext <<_ACEOF
8398/* end confdefs.h. */
bec39cab
AC
8399
8400int
8401main ()
8402{
a9322a30 8403int x;
bec39cab
AC
8404 ;
8405 return 0;
8406}
8407_ACEOF
a9322a30
TT
8408rm -f conftest.$ac_objext
8409if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8410 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
8411 ac_status=$?
8412 grep -v '^ *+' conftest.er1 >conftest.err
8413 rm -f conftest.er1
8414 cat conftest.err >&5
8415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8416 (exit $ac_status); } &&
b4e70030
JB
8417 { ac_try='test -z "$ac_c_werror_flag"
8418 || test ! -s conftest.err'
bec39cab
AC
8419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8420 (eval $ac_try) 2>&5
8421 ac_status=$?
8422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8423 (exit $ac_status); }; } &&
a9322a30 8424 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
8425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8426 (eval $ac_try) 2>&5
8427 ac_status=$?
8428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8429 (exit $ac_status); }; }; then
a9322a30 8430 ac_cv_cc_supports_pg=yes
bec39cab
AC
8431else
8432 echo "$as_me: failed program was:" >&5
8433sed 's/^/| /' conftest.$ac_ext >&5
8434
a9322a30 8435ac_cv_cc_supports_pg=no
bec39cab 8436fi
a9322a30 8437rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8438fi
a9322a30
TT
8439echo "$as_me:$LINENO: result: $ac_cv_cc_supports_pg" >&5
8440echo "${ECHO_T}$ac_cv_cc_supports_pg" >&6
bec39cab 8441
a9322a30
TT
8442 if test $ac_cv_cc_supports_pg = no; then
8443 { { echo "$as_me:$LINENO: error: --enable-profiling requires a compiler which supports -pg" >&5
8444echo "$as_me: error: --enable-profiling requires a compiler which supports -pg" >&2;}
8445 { (exit 1); exit 1; }; }
8446 fi
bec39cab 8447
a9322a30 8448 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8449fi
8450
c16158bc
JM
8451
8452
8453# Check whether --with-pkgversion or --without-pkgversion was given.
8454if test "${with_pkgversion+set}" = set; then
8455 withval="$with_pkgversion"
8456 case "$withval" in
8457 yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
8458echo "$as_me: error: package version not specified" >&2;}
8459 { (exit 1); exit 1; }; } ;;
8460 no) PKGVERSION= ;;
8461 *) PKGVERSION="($withval) " ;;
8462 esac
8463else
8464 PKGVERSION="(GDB) "
8465
8466fi;
8467
8468
8469
8470
8471# Check whether --with-bugurl or --without-bugurl was given.
8472if test "${with_bugurl+set}" = set; then
8473 withval="$with_bugurl"
8474 case "$withval" in
8475 yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
8476echo "$as_me: error: bug URL not specified" >&2;}
8477 { (exit 1); exit 1; }; } ;;
8478 no) BUGURL=
8479 ;;
8480 *) BUGURL="$withval"
8481 ;;
8482 esac
8483else
8484 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8485
8486fi;
8487 case ${BUGURL} in
8488 "")
8489 REPORT_BUGS_TO=
8490 REPORT_BUGS_TEXI=
8491 ;;
8492 *)
8493 REPORT_BUGS_TO="<$BUGURL>"
8494 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8495 ;;
8496 esac;
8497
8498
8499
8500
8501cat >>confdefs.h <<_ACEOF
8502#define PKGVERSION "$PKGVERSION"
8503_ACEOF
8504
8505
8506cat >>confdefs.h <<_ACEOF
8507#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8508_ACEOF
8509
8510
bec39cab
AC
8511# --------------------- #
8512# Checks for programs. #
8513# --------------------- #
8514
8515for ac_prog in gawk mawk nawk awk
8516do
8517 # Extract the first word of "$ac_prog", so it can be a program name with args.
8518set dummy $ac_prog; ac_word=$2
b4e70030
JB
8519echo "$as_me:$LINENO: checking for $ac_word" >&5
8520echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8521if test "${ac_cv_prog_AWK+set}" = set; then
8522 echo $ECHO_N "(cached) $ECHO_C" >&6
8523else
8524 if test -n "$AWK"; then
8525 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8526else
8527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8528for as_dir in $PATH
8529do
8530 IFS=$as_save_IFS
8531 test -z "$as_dir" && as_dir=.
8532 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8533 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8534 ac_cv_prog_AWK="$ac_prog"
8535 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8536 break 2
8537 fi
8538done
8539done
8540
8541fi
8542fi
8543AWK=$ac_cv_prog_AWK
8544if test -n "$AWK"; then
b4e70030
JB
8545 echo "$as_me:$LINENO: result: $AWK" >&5
8546echo "${ECHO_T}$AWK" >&6
bec39cab 8547else
b4e70030
JB
8548 echo "$as_me:$LINENO: result: no" >&5
8549echo "${ECHO_T}no" >&6
bec39cab
AC
8550fi
8551
8552 test -n "$AWK" && break
8553done
8554
8555# Find a good install program. We prefer a C program (faster),
8556# so one script is as good as another. But avoid the broken or
8557# incompatible versions:
8558# SysV /etc/install, /usr/sbin/install
8559# SunOS /usr/etc/install
8560# IRIX /sbin/install
8561# AIX /bin/install
8562# AmigaOS /C/install, which installs bootblocks on floppy discs
8563# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8564# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8565# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8566# OS/2's system install, which has a completely different semantic
8567# ./install, which can be erroneously created by make from ./install.sh.
85541719 8568# Reject install programs that cannot install multiple files.
b4e70030
JB
8569echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
8570echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
bec39cab
AC
8571if test -z "$INSTALL"; then
8572if test "${ac_cv_path_install+set}" = set; then
8573 echo $ECHO_N "(cached) $ECHO_C" >&6
8574else
8575 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8576for as_dir in $PATH
8577do
8578 IFS=$as_save_IFS
8579 test -z "$as_dir" && as_dir=.
8580 # Account for people who put trailing slashes in PATH elements.
8581case $as_dir/ in
8582 ./ | .// | /cC/* | \
8583 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8584 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
8585 /usr/ucb/* ) ;;
c906108c 8586 *)
bec39cab
AC
8587 # OSF1 and SCO ODT 3.0 have their own names for install.
8588 # Don't use installbsd from OSF since it installs stuff as root
8589 # by default.
8590 for ac_prog in ginstall scoinst install; do
8591 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8592 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
bec39cab
AC
8593 if test $ac_prog = install &&
8594 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8595 # AIX install. It has an incompatible calling convention.
8596 :
8597 elif test $ac_prog = install &&
8598 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8599 # program-specific install script used by HP pwplus--don't use.
8600 :
8601 else
85541719
DE
8602 rm -rf conftest.one conftest.two conftest.dir
8603 echo one > conftest.one
8604 echo two > conftest.two
8605 mkdir conftest.dir
8606 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
8607 test -s conftest.one && test -s conftest.two &&
8608 test -s conftest.dir/conftest.one &&
8609 test -s conftest.dir/conftest.two
8610 then
8611 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8612 break 3
8613 fi
bec39cab
AC
8614 fi
8615 fi
8616 done
8617 done
8618 ;;
c906108c 8619esac
bec39cab
AC
8620done
8621
85541719 8622rm -rf conftest.one conftest.two conftest.dir
bec39cab
AC
8623
8624fi
8625 if test "${ac_cv_path_install+set}" = set; then
8626 INSTALL=$ac_cv_path_install
8627 else
85541719
DE
8628 # As a last resort, use the slow shell script. Don't cache a
8629 # value for INSTALL within a source directory, because that will
bec39cab 8630 # break other packages using the cache if that directory is
85541719 8631 # removed, or if the value is a relative name.
bec39cab
AC
8632 INSTALL=$ac_install_sh
8633 fi
8634fi
b4e70030
JB
8635echo "$as_me:$LINENO: result: $INSTALL" >&5
8636echo "${ECHO_T}$INSTALL" >&6
bec39cab
AC
8637
8638# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8639# It thinks the first close brace ends the variable substitution.
8640test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8641
8642test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8643
8644test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8645
b4e70030
JB
8646echo "$as_me:$LINENO: checking whether ln -s works" >&5
8647echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
bec39cab
AC
8648LN_S=$as_ln_s
8649if test "$LN_S" = "ln -s"; then
b4e70030
JB
8650 echo "$as_me:$LINENO: result: yes" >&5
8651echo "${ECHO_T}yes" >&6
bec39cab 8652else
b4e70030
JB
8653 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
8654echo "${ECHO_T}no, using $LN_S" >&6
bec39cab
AC
8655fi
8656
8657if test -n "$ac_tool_prefix"; then
8658 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8659set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b4e70030
JB
8660echo "$as_me:$LINENO: checking for $ac_word" >&5
8661echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8662if test "${ac_cv_prog_RANLIB+set}" = set; then
8663 echo $ECHO_N "(cached) $ECHO_C" >&6
8664else
8665 if test -n "$RANLIB"; then
8666 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8667else
8668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8669for as_dir in $PATH
8670do
8671 IFS=$as_save_IFS
8672 test -z "$as_dir" && as_dir=.
8673 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8674 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8675 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8676 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8677 break 2
8678 fi
8679done
8680done
8681
8682fi
8683fi
8684RANLIB=$ac_cv_prog_RANLIB
8685if test -n "$RANLIB"; then
b4e70030
JB
8686 echo "$as_me:$LINENO: result: $RANLIB" >&5
8687echo "${ECHO_T}$RANLIB" >&6
bec39cab 8688else
b4e70030
JB
8689 echo "$as_me:$LINENO: result: no" >&5
8690echo "${ECHO_T}no" >&6
bec39cab
AC
8691fi
8692
8693fi
8694if test -z "$ac_cv_prog_RANLIB"; then
8695 ac_ct_RANLIB=$RANLIB
8696 # Extract the first word of "ranlib", so it can be a program name with args.
8697set dummy ranlib; ac_word=$2
b4e70030
JB
8698echo "$as_me:$LINENO: checking for $ac_word" >&5
8699echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8700if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8701 echo $ECHO_N "(cached) $ECHO_C" >&6
8702else
8703 if test -n "$ac_ct_RANLIB"; then
8704 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8705else
8706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8707for as_dir in $PATH
8708do
8709 IFS=$as_save_IFS
8710 test -z "$as_dir" && as_dir=.
8711 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8712 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8713 ac_cv_prog_ac_ct_RANLIB="ranlib"
8714 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8715 break 2
8716 fi
8717done
8718done
8719
b4e70030 8720 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
bec39cab
AC
8721fi
8722fi
8723ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8724if test -n "$ac_ct_RANLIB"; then
b4e70030
JB
8725 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8726echo "${ECHO_T}$ac_ct_RANLIB" >&6
bec39cab 8727else
b4e70030
JB
8728 echo "$as_me:$LINENO: result: no" >&5
8729echo "${ECHO_T}no" >&6
bec39cab
AC
8730fi
8731
b4e70030 8732 RANLIB=$ac_ct_RANLIB
bec39cab
AC
8733else
8734 RANLIB="$ac_cv_prog_RANLIB"
8735fi
8736
8737for ac_prog in 'bison -y' byacc
8738do
8739 # Extract the first word of "$ac_prog", so it can be a program name with args.
8740set dummy $ac_prog; ac_word=$2
b4e70030
JB
8741echo "$as_me:$LINENO: checking for $ac_word" >&5
8742echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8743if test "${ac_cv_prog_YACC+set}" = set; then
8744 echo $ECHO_N "(cached) $ECHO_C" >&6
8745else
8746 if test -n "$YACC"; then
8747 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8748else
8749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8750for as_dir in $PATH
8751do
8752 IFS=$as_save_IFS
8753 test -z "$as_dir" && as_dir=.
8754 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8755 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8756 ac_cv_prog_YACC="$ac_prog"
8757 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8758 break 2
8759 fi
8760done
8761done
8762
8763fi
8764fi
8765YACC=$ac_cv_prog_YACC
8766if test -n "$YACC"; then
b4e70030
JB
8767 echo "$as_me:$LINENO: result: $YACC" >&5
8768echo "${ECHO_T}$YACC" >&6
bec39cab 8769else
b4e70030
JB
8770 echo "$as_me:$LINENO: result: no" >&5
8771echo "${ECHO_T}no" >&6
bec39cab
AC
8772fi
8773
8774 test -n "$YACC" && break
8775done
8776test -n "$YACC" || YACC="yacc"
8777
8778
8779if test -n "$ac_tool_prefix"; then
8780 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8781set dummy ${ac_tool_prefix}ar; ac_word=$2
b4e70030
JB
8782echo "$as_me:$LINENO: checking for $ac_word" >&5
8783echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8784if test "${ac_cv_prog_AR+set}" = set; then
8785 echo $ECHO_N "(cached) $ECHO_C" >&6
8786else
8787 if test -n "$AR"; then
8788 ac_cv_prog_AR="$AR" # Let the user override the test.
8789else
8790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8791for as_dir in $PATH
8792do
8793 IFS=$as_save_IFS
8794 test -z "$as_dir" && as_dir=.
8795 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8796 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8797 ac_cv_prog_AR="${ac_tool_prefix}ar"
8798 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8799 break 2
8800 fi
8801done
8802done
8803
8804fi
8805fi
8806AR=$ac_cv_prog_AR
8807if test -n "$AR"; then
b4e70030
JB
8808 echo "$as_me:$LINENO: result: $AR" >&5
8809echo "${ECHO_T}$AR" >&6
bec39cab 8810else
b4e70030
JB
8811 echo "$as_me:$LINENO: result: no" >&5
8812echo "${ECHO_T}no" >&6
bec39cab
AC
8813fi
8814
8815fi
8816if test -z "$ac_cv_prog_AR"; then
8817 ac_ct_AR=$AR
8818 # Extract the first word of "ar", so it can be a program name with args.
8819set dummy ar; ac_word=$2
b4e70030
JB
8820echo "$as_me:$LINENO: checking for $ac_word" >&5
8821echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8822if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
8823 echo $ECHO_N "(cached) $ECHO_C" >&6
8824else
8825 if test -n "$ac_ct_AR"; then
8826 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8827else
8828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8829for as_dir in $PATH
8830do
8831 IFS=$as_save_IFS
8832 test -z "$as_dir" && as_dir=.
8833 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8834 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8835 ac_cv_prog_ac_ct_AR="ar"
8836 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8837 break 2
8838 fi
8839done
8840done
8841
8842fi
8843fi
8844ac_ct_AR=$ac_cv_prog_ac_ct_AR
8845if test -n "$ac_ct_AR"; then
b4e70030
JB
8846 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
8847echo "${ECHO_T}$ac_ct_AR" >&6
bec39cab 8848else
b4e70030
JB
8849 echo "$as_me:$LINENO: result: no" >&5
8850echo "${ECHO_T}no" >&6
bec39cab
AC
8851fi
8852
b4e70030 8853 AR=$ac_ct_AR
bec39cab
AC
8854else
8855 AR="$ac_cv_prog_AR"
8856fi
8857
8858if test -n "$ac_tool_prefix"; then
8859 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8860set dummy ${ac_tool_prefix}dlltool; ac_word=$2
b4e70030
JB
8861echo "$as_me:$LINENO: checking for $ac_word" >&5
8862echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8863if test "${ac_cv_prog_DLLTOOL+set}" = set; then
8864 echo $ECHO_N "(cached) $ECHO_C" >&6
8865else
8866 if test -n "$DLLTOOL"; then
8867 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8868else
8869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8870for as_dir in $PATH
8871do
8872 IFS=$as_save_IFS
8873 test -z "$as_dir" && as_dir=.
8874 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8875 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8876 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8877 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8878 break 2
8879 fi
8880done
8881done
8882
8883fi
8884fi
8885DLLTOOL=$ac_cv_prog_DLLTOOL
8886if test -n "$DLLTOOL"; then
b4e70030
JB
8887 echo "$as_me:$LINENO: result: $DLLTOOL" >&5
8888echo "${ECHO_T}$DLLTOOL" >&6
bec39cab 8889else
b4e70030
JB
8890 echo "$as_me:$LINENO: result: no" >&5
8891echo "${ECHO_T}no" >&6
bec39cab
AC
8892fi
8893
8894fi
8895if test -z "$ac_cv_prog_DLLTOOL"; then
8896 ac_ct_DLLTOOL=$DLLTOOL
8897 # Extract the first word of "dlltool", so it can be a program name with args.
8898set dummy dlltool; ac_word=$2
b4e70030
JB
8899echo "$as_me:$LINENO: checking for $ac_word" >&5
8900echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8901if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
8902 echo $ECHO_N "(cached) $ECHO_C" >&6
8903else
8904 if test -n "$ac_ct_DLLTOOL"; then
8905 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8906else
8907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8908for as_dir in $PATH
8909do
8910 IFS=$as_save_IFS
8911 test -z "$as_dir" && as_dir=.
8912 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8913 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8914 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8915 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8916 break 2
8917 fi
8918done
8919done
8920
8921fi
8922fi
8923ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8924if test -n "$ac_ct_DLLTOOL"; then
b4e70030
JB
8925 echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
8926echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
bec39cab 8927else
b4e70030
JB
8928 echo "$as_me:$LINENO: result: no" >&5
8929echo "${ECHO_T}no" >&6
bec39cab
AC
8930fi
8931
b4e70030 8932 DLLTOOL=$ac_ct_DLLTOOL
bec39cab
AC
8933else
8934 DLLTOOL="$ac_cv_prog_DLLTOOL"
8935fi
8936
8937if test -n "$ac_tool_prefix"; then
8938 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8939set dummy ${ac_tool_prefix}windres; ac_word=$2
b4e70030
JB
8940echo "$as_me:$LINENO: checking for $ac_word" >&5
8941echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8942if test "${ac_cv_prog_WINDRES+set}" = set; then
8943 echo $ECHO_N "(cached) $ECHO_C" >&6
8944else
8945 if test -n "$WINDRES"; then
8946 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8947else
8948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8949for as_dir in $PATH
8950do
8951 IFS=$as_save_IFS
8952 test -z "$as_dir" && as_dir=.
8953 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8954 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8955 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
8956 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8957 break 2
8958 fi
8959done
8960done
8961
8962fi
8963fi
8964WINDRES=$ac_cv_prog_WINDRES
8965if test -n "$WINDRES"; then
b4e70030
JB
8966 echo "$as_me:$LINENO: result: $WINDRES" >&5
8967echo "${ECHO_T}$WINDRES" >&6
bec39cab 8968else
b4e70030
JB
8969 echo "$as_me:$LINENO: result: no" >&5
8970echo "${ECHO_T}no" >&6
bec39cab
AC
8971fi
8972
8973fi
8974if test -z "$ac_cv_prog_WINDRES"; then
8975 ac_ct_WINDRES=$WINDRES
8976 # Extract the first word of "windres", so it can be a program name with args.
8977set dummy windres; ac_word=$2
b4e70030
JB
8978echo "$as_me:$LINENO: checking for $ac_word" >&5
8979echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8980if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
8981 echo $ECHO_N "(cached) $ECHO_C" >&6
8982else
8983 if test -n "$ac_ct_WINDRES"; then
8984 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8985else
8986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8987for as_dir in $PATH
8988do
8989 IFS=$as_save_IFS
8990 test -z "$as_dir" && as_dir=.
8991 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8992 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8993 ac_cv_prog_ac_ct_WINDRES="windres"
8994 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8995 break 2
8996 fi
8997done
8998done
8999
9000fi
9001fi
9002ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9003if test -n "$ac_ct_WINDRES"; then
b4e70030
JB
9004 echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
9005echo "${ECHO_T}$ac_ct_WINDRES" >&6
bec39cab 9006else
b4e70030
JB
9007 echo "$as_me:$LINENO: result: no" >&5
9008echo "${ECHO_T}no" >&6
c906108c 9009fi
bec39cab 9010
b4e70030 9011 WINDRES=$ac_ct_WINDRES
c906108c 9012else
bec39cab 9013 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
9014fi
9015
bec39cab
AC
9016
9017# Needed for GNU/Hurd.
9018if test -n "$ac_tool_prefix"; then
9019 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
9020set dummy ${ac_tool_prefix}mig; ac_word=$2
b4e70030
JB
9021echo "$as_me:$LINENO: checking for $ac_word" >&5
9022echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9023if test "${ac_cv_prog_MIG+set}" = set; then
9024 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 9025else
bec39cab
AC
9026 if test -n "$MIG"; then
9027 ac_cv_prog_MIG="$MIG" # Let the user override the test.
9028else
9029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9030for as_dir in $PATH
9031do
9032 IFS=$as_save_IFS
9033 test -z "$as_dir" && as_dir=.
9034 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9035 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9036 ac_cv_prog_MIG="${ac_tool_prefix}mig"
9037 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9038 break 2
9039 fi
9040done
9041done
9042
c906108c 9043fi
bec39cab
AC
9044fi
9045MIG=$ac_cv_prog_MIG
9046if test -n "$MIG"; then
b4e70030
JB
9047 echo "$as_me:$LINENO: result: $MIG" >&5
9048echo "${ECHO_T}$MIG" >&6
c906108c 9049else
b4e70030
JB
9050 echo "$as_me:$LINENO: result: no" >&5
9051echo "${ECHO_T}no" >&6
c906108c
SS
9052fi
9053
bec39cab
AC
9054fi
9055if test -z "$ac_cv_prog_MIG"; then
9056 ac_ct_MIG=$MIG
9057 # Extract the first word of "mig", so it can be a program name with args.
9058set dummy mig; ac_word=$2
b4e70030
JB
9059echo "$as_me:$LINENO: checking for $ac_word" >&5
9060echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9061if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then
9062 echo $ECHO_N "(cached) $ECHO_C" >&6
9063else
9064 if test -n "$ac_ct_MIG"; then
9065 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
9066else
9067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9068for as_dir in $PATH
9069do
9070 IFS=$as_save_IFS
9071 test -z "$as_dir" && as_dir=.
9072 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9073 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9074 ac_cv_prog_ac_ct_MIG="mig"
9075 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9076 break 2
9077 fi
9078done
9079done
c906108c 9080
bec39cab
AC
9081fi
9082fi
9083ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9084if test -n "$ac_ct_MIG"; then
b4e70030
JB
9085 echo "$as_me:$LINENO: result: $ac_ct_MIG" >&5
9086echo "${ECHO_T}$ac_ct_MIG" >&6
bec39cab 9087else
b4e70030
JB
9088 echo "$as_me:$LINENO: result: no" >&5
9089echo "${ECHO_T}no" >&6
bec39cab 9090fi
c906108c 9091
b4e70030 9092 MIG=$ac_ct_MIG
bec39cab
AC
9093else
9094 MIG="$ac_cv_prog_MIG"
9095fi
c906108c 9096
c906108c 9097
bec39cab
AC
9098# ---------------------- #
9099# Checks for libraries. #
9100# ---------------------- #
c906108c 9101
bec39cab 9102# We might need to link with -lm; most simulators need it.
c906108c 9103
b4e70030
JB
9104echo "$as_me:$LINENO: checking for main in -lm" >&5
9105echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
bec39cab
AC
9106if test "${ac_cv_lib_m_main+set}" = set; then
9107 echo $ECHO_N "(cached) $ECHO_C" >&6
9108else
9109 ac_check_lib_save_LIBS=$LIBS
9110LIBS="-lm $LIBS"
9111cat >conftest.$ac_ext <<_ACEOF
9112/* confdefs.h. */
9113_ACEOF
9114cat confdefs.h >>conftest.$ac_ext
9115cat >>conftest.$ac_ext <<_ACEOF
9116/* end confdefs.h. */
c906108c 9117
c906108c 9118
bec39cab
AC
9119int
9120main ()
9121{
b4e70030 9122main ();
bec39cab
AC
9123 ;
9124 return 0;
9125}
9126_ACEOF
9127rm -f conftest.$ac_objext conftest$ac_exeext
9128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9129 (eval $ac_link) 2>conftest.er1
9130 ac_status=$?
9131 grep -v '^ *+' conftest.er1 >conftest.err
9132 rm -f conftest.er1
9133 cat conftest.err >&5
9134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9135 (exit $ac_status); } &&
b4e70030
JB
9136 { ac_try='test -z "$ac_c_werror_flag"
9137 || test ! -s conftest.err'
bec39cab
AC
9138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9139 (eval $ac_try) 2>&5
9140 ac_status=$?
9141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9142 (exit $ac_status); }; } &&
9143 { ac_try='test -s conftest$ac_exeext'
9144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9145 (eval $ac_try) 2>&5
9146 ac_status=$?
9147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9148 (exit $ac_status); }; }; then
9149 ac_cv_lib_m_main=yes
9150else
9151 echo "$as_me: failed program was:" >&5
9152sed 's/^/| /' conftest.$ac_ext >&5
9153
b4e70030 9154ac_cv_lib_m_main=no
bec39cab
AC
9155fi
9156rm -f conftest.err conftest.$ac_objext \
9157 conftest$ac_exeext conftest.$ac_ext
9158LIBS=$ac_check_lib_save_LIBS
9159fi
b4e70030
JB
9160echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
9161echo "${ECHO_T}$ac_cv_lib_m_main" >&6
bec39cab
AC
9162if test $ac_cv_lib_m_main = yes; then
9163 cat >>confdefs.h <<_ACEOF
9164#define HAVE_LIBM 1
9165_ACEOF
9166
9167 LIBS="-lm $LIBS"
c906108c 9168
c906108c 9169fi
bec39cab
AC
9170
9171
9172# We need to link with -lw to get `wctype' on Solaris before Solaris
9173# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9174# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9175# is known to have this problem). Therefore we avoid libw if we can.
b4e70030
JB
9176echo "$as_me:$LINENO: checking for wctype" >&5
9177echo $ECHO_N "checking for wctype... $ECHO_C" >&6
bec39cab
AC
9178if test "${ac_cv_func_wctype+set}" = set; then
9179 echo $ECHO_N "(cached) $ECHO_C" >&6
9180else
9181 cat >conftest.$ac_ext <<_ACEOF
9182/* confdefs.h. */
9183_ACEOF
9184cat confdefs.h >>conftest.$ac_ext
9185cat >>conftest.$ac_ext <<_ACEOF
9186/* end confdefs.h. */
9187/* Define wctype to an innocuous variant, in case <limits.h> declares wctype.
9188 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9189#define wctype innocuous_wctype
9190
9191/* System header to define __stub macros and hopefully few prototypes,
9192 which can conflict with char wctype (); below.
9193 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9194 <limits.h> exists even on freestanding compilers. */
9195
9196#ifdef __STDC__
9197# include <limits.h>
9198#else
9199# include <assert.h>
9200#endif
9201
9202#undef wctype
9203
b4e70030 9204/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9205#ifdef __cplusplus
9206extern "C"
b4e70030 9207{
bec39cab 9208#endif
b4e70030
JB
9209/* We use char because int might match the return type of a gcc2
9210 builtin and then its argument prototype would still apply. */
bec39cab
AC
9211char wctype ();
9212/* The GNU C library defines this for functions which it implements
9213 to always fail with ENOSYS. Some functions are actually named
9214 something starting with __ and the normal name is an alias. */
b4e70030 9215#if defined (__stub_wctype) || defined (__stub___wctype)
bec39cab 9216choke me
b4e70030
JB
9217#else
9218char (*f) () = wctype;
9219#endif
9220#ifdef __cplusplus
9221}
bec39cab
AC
9222#endif
9223
9224int
9225main ()
9226{
b4e70030 9227return f != wctype;
bec39cab
AC
9228 ;
9229 return 0;
9230}
9231_ACEOF
9232rm -f conftest.$ac_objext conftest$ac_exeext
9233if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9234 (eval $ac_link) 2>conftest.er1
9235 ac_status=$?
9236 grep -v '^ *+' conftest.er1 >conftest.err
9237 rm -f conftest.er1
9238 cat conftest.err >&5
9239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9240 (exit $ac_status); } &&
b4e70030
JB
9241 { ac_try='test -z "$ac_c_werror_flag"
9242 || test ! -s conftest.err'
bec39cab
AC
9243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9244 (eval $ac_try) 2>&5
9245 ac_status=$?
9246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9247 (exit $ac_status); }; } &&
9248 { ac_try='test -s conftest$ac_exeext'
9249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9250 (eval $ac_try) 2>&5
9251 ac_status=$?
9252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9253 (exit $ac_status); }; }; then
9254 ac_cv_func_wctype=yes
9255else
9256 echo "$as_me: failed program was:" >&5
9257sed 's/^/| /' conftest.$ac_ext >&5
9258
b4e70030 9259ac_cv_func_wctype=no
bec39cab
AC
9260fi
9261rm -f conftest.err conftest.$ac_objext \
9262 conftest$ac_exeext conftest.$ac_ext
9263fi
b4e70030
JB
9264echo "$as_me:$LINENO: result: $ac_cv_func_wctype" >&5
9265echo "${ECHO_T}$ac_cv_func_wctype" >&6
bec39cab
AC
9266if test $ac_cv_func_wctype = yes; then
9267 :
c906108c 9268else
c906108c 9269
b4e70030
JB
9270echo "$as_me:$LINENO: checking for wctype in -lw" >&5
9271echo $ECHO_N "checking for wctype in -lw... $ECHO_C" >&6
bec39cab
AC
9272if test "${ac_cv_lib_w_wctype+set}" = set; then
9273 echo $ECHO_N "(cached) $ECHO_C" >&6
9274else
9275 ac_check_lib_save_LIBS=$LIBS
9276LIBS="-lw $LIBS"
9277cat >conftest.$ac_ext <<_ACEOF
9278/* confdefs.h. */
9279_ACEOF
9280cat confdefs.h >>conftest.$ac_ext
9281cat >>conftest.$ac_ext <<_ACEOF
9282/* end confdefs.h. */
c906108c 9283
b4e70030 9284/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9285#ifdef __cplusplus
9286extern "C"
9287#endif
b4e70030
JB
9288/* We use char because int might match the return type of a gcc2
9289 builtin and then its argument prototype would still apply. */
bec39cab
AC
9290char wctype ();
9291int
9292main ()
9293{
b4e70030 9294wctype ();
bec39cab
AC
9295 ;
9296 return 0;
9297}
9298_ACEOF
9299rm -f conftest.$ac_objext conftest$ac_exeext
9300if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9301 (eval $ac_link) 2>conftest.er1
9302 ac_status=$?
9303 grep -v '^ *+' conftest.er1 >conftest.err
9304 rm -f conftest.er1
9305 cat conftest.err >&5
9306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9307 (exit $ac_status); } &&
b4e70030
JB
9308 { ac_try='test -z "$ac_c_werror_flag"
9309 || test ! -s conftest.err'
bec39cab
AC
9310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9311 (eval $ac_try) 2>&5
9312 ac_status=$?
9313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9314 (exit $ac_status); }; } &&
9315 { ac_try='test -s conftest$ac_exeext'
9316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9317 (eval $ac_try) 2>&5
9318 ac_status=$?
9319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9320 (exit $ac_status); }; }; then
9321 ac_cv_lib_w_wctype=yes
9322else
9323 echo "$as_me: failed program was:" >&5
9324sed 's/^/| /' conftest.$ac_ext >&5
9325
b4e70030 9326ac_cv_lib_w_wctype=no
bec39cab
AC
9327fi
9328rm -f conftest.err conftest.$ac_objext \
9329 conftest$ac_exeext conftest.$ac_ext
9330LIBS=$ac_check_lib_save_LIBS
9331fi
b4e70030
JB
9332echo "$as_me:$LINENO: result: $ac_cv_lib_w_wctype" >&5
9333echo "${ECHO_T}$ac_cv_lib_w_wctype" >&6
bec39cab
AC
9334if test $ac_cv_lib_w_wctype = yes; then
9335 cat >>confdefs.h <<_ACEOF
9336#define HAVE_LIBW 1
9337_ACEOF
c906108c 9338
bec39cab 9339 LIBS="-lw $LIBS"
c906108c 9340
bec39cab 9341fi
c906108c 9342
bec39cab 9343fi
c906108c 9344
ddc9cd0f 9345
bec39cab 9346# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
b4e70030
JB
9347echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
9348echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
bec39cab
AC
9349if test "${ac_cv_search_gethostbyname+set}" = set; then
9350 echo $ECHO_N "(cached) $ECHO_C" >&6
9351else
9352 ac_func_search_save_LIBS=$LIBS
b4e70030 9353ac_cv_search_gethostbyname=no
bec39cab
AC
9354cat >conftest.$ac_ext <<_ACEOF
9355/* confdefs.h. */
9356_ACEOF
9357cat confdefs.h >>conftest.$ac_ext
9358cat >>conftest.$ac_ext <<_ACEOF
9359/* end confdefs.h. */
ddc9cd0f 9360
b4e70030 9361/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9362#ifdef __cplusplus
9363extern "C"
9364#endif
b4e70030
JB
9365/* We use char because int might match the return type of a gcc2
9366 builtin and then its argument prototype would still apply. */
bec39cab
AC
9367char gethostbyname ();
9368int
9369main ()
9370{
b4e70030 9371gethostbyname ();
bec39cab
AC
9372 ;
9373 return 0;
9374}
9375_ACEOF
b4e70030 9376rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9377if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9378 (eval $ac_link) 2>conftest.er1
9379 ac_status=$?
9380 grep -v '^ *+' conftest.er1 >conftest.err
9381 rm -f conftest.er1
9382 cat conftest.err >&5
9383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9384 (exit $ac_status); } &&
b4e70030
JB
9385 { ac_try='test -z "$ac_c_werror_flag"
9386 || test ! -s conftest.err'
bec39cab
AC
9387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9388 (eval $ac_try) 2>&5
9389 ac_status=$?
9390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9391 (exit $ac_status); }; } &&
9392 { ac_try='test -s conftest$ac_exeext'
9393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9394 (eval $ac_try) 2>&5
9395 ac_status=$?
9396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9397 (exit $ac_status); }; }; then
b4e70030 9398 ac_cv_search_gethostbyname="none required"
bec39cab
AC
9399else
9400 echo "$as_me: failed program was:" >&5
9401sed 's/^/| /' conftest.$ac_ext >&5
ddc9cd0f 9402
bec39cab
AC
9403fi
9404rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
9405 conftest$ac_exeext conftest.$ac_ext
9406if test "$ac_cv_search_gethostbyname" = no; then
9407 for ac_lib in nsl; do
9408 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9409 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
9410/* confdefs.h. */
9411_ACEOF
9412cat confdefs.h >>conftest.$ac_ext
9413cat >>conftest.$ac_ext <<_ACEOF
9414/* end confdefs.h. */
ddc9cd0f 9415
b4e70030 9416/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9417#ifdef __cplusplus
9418extern "C"
9419#endif
b4e70030
JB
9420/* We use char because int might match the return type of a gcc2
9421 builtin and then its argument prototype would still apply. */
9422char gethostbyname ();
bec39cab
AC
9423int
9424main ()
9425{
b4e70030 9426gethostbyname ();
bec39cab
AC
9427 ;
9428 return 0;
9429}
9430_ACEOF
b4e70030 9431rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9432if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9433 (eval $ac_link) 2>conftest.er1
9434 ac_status=$?
9435 grep -v '^ *+' conftest.er1 >conftest.err
9436 rm -f conftest.er1
9437 cat conftest.err >&5
9438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9439 (exit $ac_status); } &&
b4e70030
JB
9440 { ac_try='test -z "$ac_c_werror_flag"
9441 || test ! -s conftest.err'
bec39cab
AC
9442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9443 (eval $ac_try) 2>&5
9444 ac_status=$?
9445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9446 (exit $ac_status); }; } &&
9447 { ac_try='test -s conftest$ac_exeext'
9448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9449 (eval $ac_try) 2>&5
9450 ac_status=$?
9451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9452 (exit $ac_status); }; }; then
b4e70030
JB
9453 ac_cv_search_gethostbyname="-l$ac_lib"
9454break
bec39cab
AC
9455else
9456 echo "$as_me: failed program was:" >&5
9457sed 's/^/| /' conftest.$ac_ext >&5
9458
9459fi
9460rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
9461 conftest$ac_exeext conftest.$ac_ext
9462 done
bec39cab
AC
9463fi
9464LIBS=$ac_func_search_save_LIBS
9465fi
b4e70030
JB
9466echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
9467echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
9468if test "$ac_cv_search_gethostbyname" != no; then
9469 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
96baa820 9470
bec39cab 9471fi
96baa820 9472
c906108c 9473
b4e70030
JB
9474# Some systems (e.g. Solaris) have `socketpair' in libsocket.
9475echo "$as_me:$LINENO: checking for library containing socketpair" >&5
9476echo $ECHO_N "checking for library containing socketpair... $ECHO_C" >&6
9477if test "${ac_cv_search_socketpair+set}" = set; then
9478 echo $ECHO_N "(cached) $ECHO_C" >&6
9479else
9480 ac_func_search_save_LIBS=$LIBS
9481ac_cv_search_socketpair=no
9482cat >conftest.$ac_ext <<_ACEOF
9483/* confdefs.h. */
9484_ACEOF
9485cat confdefs.h >>conftest.$ac_ext
9486cat >>conftest.$ac_ext <<_ACEOF
9487/* end confdefs.h. */
9488
9489/* Override any gcc2 internal prototype to avoid an error. */
9490#ifdef __cplusplus
9491extern "C"
9492#endif
9493/* We use char because int might match the return type of a gcc2
9494 builtin and then its argument prototype would still apply. */
9495char socketpair ();
9496int
9497main ()
9498{
9499socketpair ();
9500 ;
9501 return 0;
9502}
9503_ACEOF
9504rm -f conftest.$ac_objext conftest$ac_exeext
9505if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9506 (eval $ac_link) 2>conftest.er1
9507 ac_status=$?
9508 grep -v '^ *+' conftest.er1 >conftest.err
9509 rm -f conftest.er1
9510 cat conftest.err >&5
9511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9512 (exit $ac_status); } &&
9513 { ac_try='test -z "$ac_c_werror_flag"
9514 || test ! -s conftest.err'
9515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9516 (eval $ac_try) 2>&5
9517 ac_status=$?
9518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9519 (exit $ac_status); }; } &&
9520 { ac_try='test -s conftest$ac_exeext'
9521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9522 (eval $ac_try) 2>&5
9523 ac_status=$?
9524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9525 (exit $ac_status); }; }; then
9526 ac_cv_search_socketpair="none required"
9527else
9528 echo "$as_me: failed program was:" >&5
9529sed 's/^/| /' conftest.$ac_ext >&5
9530
9531fi
9532rm -f conftest.err conftest.$ac_objext \
9533 conftest$ac_exeext conftest.$ac_ext
9534if test "$ac_cv_search_socketpair" = no; then
9535 for ac_lib in socket; do
9536 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9537 cat >conftest.$ac_ext <<_ACEOF
9538/* confdefs.h. */
9539_ACEOF
9540cat confdefs.h >>conftest.$ac_ext
9541cat >>conftest.$ac_ext <<_ACEOF
9542/* end confdefs.h. */
9543
9544/* Override any gcc2 internal prototype to avoid an error. */
9545#ifdef __cplusplus
9546extern "C"
9547#endif
9548/* We use char because int might match the return type of a gcc2
9549 builtin and then its argument prototype would still apply. */
9550char socketpair ();
9551int
9552main ()
9553{
9554socketpair ();
9555 ;
9556 return 0;
9557}
9558_ACEOF
9559rm -f conftest.$ac_objext conftest$ac_exeext
9560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9561 (eval $ac_link) 2>conftest.er1
9562 ac_status=$?
9563 grep -v '^ *+' conftest.er1 >conftest.err
9564 rm -f conftest.er1
9565 cat conftest.err >&5
9566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9567 (exit $ac_status); } &&
9568 { ac_try='test -z "$ac_c_werror_flag"
9569 || test ! -s conftest.err'
9570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9571 (eval $ac_try) 2>&5
9572 ac_status=$?
9573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9574 (exit $ac_status); }; } &&
9575 { ac_try='test -s conftest$ac_exeext'
9576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9577 (eval $ac_try) 2>&5
9578 ac_status=$?
9579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9580 (exit $ac_status); }; }; then
9581 ac_cv_search_socketpair="-l$ac_lib"
9582break
9583else
9584 echo "$as_me: failed program was:" >&5
9585sed 's/^/| /' conftest.$ac_ext >&5
9586
9587fi
9588rm -f conftest.err conftest.$ac_objext \
9589 conftest$ac_exeext conftest.$ac_ext
9590 done
9591fi
9592LIBS=$ac_func_search_save_LIBS
9593fi
9594echo "$as_me:$LINENO: result: $ac_cv_search_socketpair" >&5
9595echo "${ECHO_T}$ac_cv_search_socketpair" >&6
9596if test "$ac_cv_search_socketpair" != no; then
9597 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
9598
9599fi
9600
9601
233a11ab
CS
9602# Link in zlib if we can. This allows us to read compressed debug sections.
9603echo "$as_me:$LINENO: checking for library containing zlibVersion" >&5
9604echo $ECHO_N "checking for library containing zlibVersion... $ECHO_C" >&6
9605if test "${ac_cv_search_zlibVersion+set}" = set; then
9606 echo $ECHO_N "(cached) $ECHO_C" >&6
9607else
9608 ac_func_search_save_LIBS=$LIBS
9609ac_cv_search_zlibVersion=no
9610cat >conftest.$ac_ext <<_ACEOF
9611/* confdefs.h. */
9612_ACEOF
9613cat confdefs.h >>conftest.$ac_ext
9614cat >>conftest.$ac_ext <<_ACEOF
9615/* end confdefs.h. */
9616
9617/* Override any gcc2 internal prototype to avoid an error. */
9618#ifdef __cplusplus
9619extern "C"
9620#endif
9621/* We use char because int might match the return type of a gcc2
9622 builtin and then its argument prototype would still apply. */
9623char zlibVersion ();
9624int
9625main ()
9626{
9627zlibVersion ();
9628 ;
9629 return 0;
9630}
9631_ACEOF
9632rm -f conftest.$ac_objext conftest$ac_exeext
9633if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9634 (eval $ac_link) 2>conftest.er1
9635 ac_status=$?
9636 grep -v '^ *+' conftest.er1 >conftest.err
9637 rm -f conftest.er1
9638 cat conftest.err >&5
9639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9640 (exit $ac_status); } &&
9641 { ac_try='test -z "$ac_c_werror_flag"
9642 || test ! -s conftest.err'
9643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9644 (eval $ac_try) 2>&5
9645 ac_status=$?
9646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9647 (exit $ac_status); }; } &&
9648 { ac_try='test -s conftest$ac_exeext'
9649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9650 (eval $ac_try) 2>&5
9651 ac_status=$?
9652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9653 (exit $ac_status); }; }; then
9654 ac_cv_search_zlibVersion="none required"
9655else
9656 echo "$as_me: failed program was:" >&5
9657sed 's/^/| /' conftest.$ac_ext >&5
9658
9659fi
9660rm -f conftest.err conftest.$ac_objext \
9661 conftest$ac_exeext conftest.$ac_ext
9662if test "$ac_cv_search_zlibVersion" = no; then
9663 for ac_lib in z; do
9664 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9665 cat >conftest.$ac_ext <<_ACEOF
9666/* confdefs.h. */
9667_ACEOF
9668cat confdefs.h >>conftest.$ac_ext
9669cat >>conftest.$ac_ext <<_ACEOF
9670/* end confdefs.h. */
9671
9672/* Override any gcc2 internal prototype to avoid an error. */
9673#ifdef __cplusplus
9674extern "C"
9675#endif
9676/* We use char because int might match the return type of a gcc2
9677 builtin and then its argument prototype would still apply. */
9678char zlibVersion ();
9679int
9680main ()
9681{
9682zlibVersion ();
9683 ;
9684 return 0;
9685}
9686_ACEOF
9687rm -f conftest.$ac_objext conftest$ac_exeext
9688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9689 (eval $ac_link) 2>conftest.er1
9690 ac_status=$?
9691 grep -v '^ *+' conftest.er1 >conftest.err
9692 rm -f conftest.er1
9693 cat conftest.err >&5
9694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9695 (exit $ac_status); } &&
9696 { ac_try='test -z "$ac_c_werror_flag"
9697 || test ! -s conftest.err'
9698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9699 (eval $ac_try) 2>&5
9700 ac_status=$?
9701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9702 (exit $ac_status); }; } &&
9703 { ac_try='test -s conftest$ac_exeext'
9704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9705 (eval $ac_try) 2>&5
9706 ac_status=$?
9707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9708 (exit $ac_status); }; }; then
9709 ac_cv_search_zlibVersion="-l$ac_lib"
9710break
9711else
9712 echo "$as_me: failed program was:" >&5
9713sed 's/^/| /' conftest.$ac_ext >&5
9714
9715fi
9716rm -f conftest.err conftest.$ac_objext \
9717 conftest$ac_exeext conftest.$ac_ext
9718 done
9719fi
9720LIBS=$ac_func_search_save_LIBS
9721fi
9722echo "$as_me:$LINENO: result: $ac_cv_search_zlibVersion" >&5
9723echo "${ECHO_T}$ac_cv_search_zlibVersion" >&6
9724if test "$ac_cv_search_zlibVersion" != no; then
9725 test "$ac_cv_search_zlibVersion" = "none required" || LIBS="$ac_cv_search_zlibVersion $LIBS"
9726
9727for ac_header in zlib.h
9728do
9729as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9730if eval "test \"\${$as_ac_Header+set}\" = set"; then
9731 echo "$as_me:$LINENO: checking for $ac_header" >&5
9732echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9733if eval "test \"\${$as_ac_Header+set}\" = set"; then
9734 echo $ECHO_N "(cached) $ECHO_C" >&6
9735fi
9736echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9737echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9738else
9739 # Is the header compilable?
9740echo "$as_me:$LINENO: checking $ac_header usability" >&5
9741echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9742cat >conftest.$ac_ext <<_ACEOF
9743/* confdefs.h. */
9744_ACEOF
9745cat confdefs.h >>conftest.$ac_ext
9746cat >>conftest.$ac_ext <<_ACEOF
9747/* end confdefs.h. */
9748$ac_includes_default
9749#include <$ac_header>
9750_ACEOF
9751rm -f conftest.$ac_objext
9752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9753 (eval $ac_compile) 2>conftest.er1
9754 ac_status=$?
9755 grep -v '^ *+' conftest.er1 >conftest.err
9756 rm -f conftest.er1
9757 cat conftest.err >&5
9758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9759 (exit $ac_status); } &&
9760 { ac_try='test -z "$ac_c_werror_flag"
9761 || test ! -s conftest.err'
9762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9763 (eval $ac_try) 2>&5
9764 ac_status=$?
9765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9766 (exit $ac_status); }; } &&
9767 { ac_try='test -s conftest.$ac_objext'
9768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9769 (eval $ac_try) 2>&5
9770 ac_status=$?
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); }; }; then
9773 ac_header_compiler=yes
9774else
9775 echo "$as_me: failed program was:" >&5
9776sed 's/^/| /' conftest.$ac_ext >&5
9777
9778ac_header_compiler=no
9779fi
9780rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9781echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9782echo "${ECHO_T}$ac_header_compiler" >&6
9783
9784# Is the header present?
9785echo "$as_me:$LINENO: checking $ac_header presence" >&5
9786echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9787cat >conftest.$ac_ext <<_ACEOF
9788/* confdefs.h. */
9789_ACEOF
9790cat confdefs.h >>conftest.$ac_ext
9791cat >>conftest.$ac_ext <<_ACEOF
9792/* end confdefs.h. */
9793#include <$ac_header>
9794_ACEOF
9795if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9796 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9797 ac_status=$?
9798 grep -v '^ *+' conftest.er1 >conftest.err
9799 rm -f conftest.er1
9800 cat conftest.err >&5
9801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9802 (exit $ac_status); } >/dev/null; then
9803 if test -s conftest.err; then
9804 ac_cpp_err=$ac_c_preproc_warn_flag
9805 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9806 else
9807 ac_cpp_err=
9808 fi
9809else
9810 ac_cpp_err=yes
9811fi
9812if test -z "$ac_cpp_err"; then
9813 ac_header_preproc=yes
9814else
9815 echo "$as_me: failed program was:" >&5
9816sed 's/^/| /' conftest.$ac_ext >&5
9817
9818 ac_header_preproc=no
9819fi
9820rm -f conftest.err conftest.$ac_ext
9821echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9822echo "${ECHO_T}$ac_header_preproc" >&6
9823
9824# So? What about this header?
9825case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9826 yes:no: )
9827 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9828echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9829 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9830echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9831 ac_header_preproc=yes
9832 ;;
9833 no:yes:* )
9834 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9835echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9836 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9837echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9838 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9839echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9840 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9841echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9842 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9843echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9844 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9845echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9846 (
9847 cat <<\_ASBOX
9848## ------------------------------------------ ##
9849## Report this to the AC_PACKAGE_NAME lists. ##
9850## ------------------------------------------ ##
9851_ASBOX
9852 ) |
9853 sed "s/^/$as_me: WARNING: /" >&2
9854 ;;
9855esac
9856echo "$as_me:$LINENO: checking for $ac_header" >&5
9857echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9858if eval "test \"\${$as_ac_Header+set}\" = set"; then
9859 echo $ECHO_N "(cached) $ECHO_C" >&6
9860else
9861 eval "$as_ac_Header=\$ac_header_preproc"
9862fi
9863echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9864echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9865
9866fi
9867if test `eval echo '${'$as_ac_Header'}'` = yes; then
9868 cat >>confdefs.h <<_ACEOF
9869#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9870_ACEOF
9871
9872fi
9873
9874done
9875
9876fi
9877
9878
77f120bf
JB
9879# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
9880echo "$as_me:$LINENO: checking for library containing dlgetmodinfo" >&5
9881echo $ECHO_N "checking for library containing dlgetmodinfo... $ECHO_C" >&6
9882if test "${ac_cv_search_dlgetmodinfo+set}" = set; then
bec39cab
AC
9883 echo $ECHO_N "(cached) $ECHO_C" >&6
9884else
9885 ac_func_search_save_LIBS=$LIBS
77f120bf 9886ac_cv_search_dlgetmodinfo=no
bec39cab
AC
9887cat >conftest.$ac_ext <<_ACEOF
9888/* confdefs.h. */
9889_ACEOF
9890cat confdefs.h >>conftest.$ac_ext
9891cat >>conftest.$ac_ext <<_ACEOF
9892/* end confdefs.h. */
c906108c 9893
b4e70030 9894/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9895#ifdef __cplusplus
9896extern "C"
9897#endif
b4e70030
JB
9898/* We use char because int might match the return type of a gcc2
9899 builtin and then its argument prototype would still apply. */
77f120bf 9900char dlgetmodinfo ();
bec39cab
AC
9901int
9902main ()
9903{
77f120bf 9904dlgetmodinfo ();
bec39cab
AC
9905 ;
9906 return 0;
9907}
9908_ACEOF
b4e70030 9909rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9910if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9911 (eval $ac_link) 2>conftest.er1
9912 ac_status=$?
9913 grep -v '^ *+' conftest.er1 >conftest.err
9914 rm -f conftest.er1
9915 cat conftest.err >&5
9916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9917 (exit $ac_status); } &&
b4e70030
JB
9918 { ac_try='test -z "$ac_c_werror_flag"
9919 || test ! -s conftest.err'
bec39cab
AC
9920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9921 (eval $ac_try) 2>&5
9922 ac_status=$?
9923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9924 (exit $ac_status); }; } &&
9925 { ac_try='test -s conftest$ac_exeext'
9926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9927 (eval $ac_try) 2>&5
9928 ac_status=$?
9929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9930 (exit $ac_status); }; }; then
77f120bf 9931 ac_cv_search_dlgetmodinfo="none required"
bec39cab
AC
9932else
9933 echo "$as_me: failed program was:" >&5
9934sed 's/^/| /' conftest.$ac_ext >&5
1ba607ad
AC
9935
9936fi
bec39cab 9937rm -f conftest.err conftest.$ac_objext \
b4e70030 9938 conftest$ac_exeext conftest.$ac_ext
77f120bf
JB
9939if test "$ac_cv_search_dlgetmodinfo" = no; then
9940 for ac_lib in dl xpdl; do
b4e70030
JB
9941 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9942 cat >conftest.$ac_ext <<_ACEOF
9943/* confdefs.h. */
9944_ACEOF
9945cat confdefs.h >>conftest.$ac_ext
9946cat >>conftest.$ac_ext <<_ACEOF
9947/* end confdefs.h. */
9948
9949/* Override any gcc2 internal prototype to avoid an error. */
9950#ifdef __cplusplus
9951extern "C"
9952#endif
9953/* We use char because int might match the return type of a gcc2
9954 builtin and then its argument prototype would still apply. */
77f120bf 9955char dlgetmodinfo ();
b4e70030
JB
9956int
9957main ()
9958{
77f120bf 9959dlgetmodinfo ();
b4e70030
JB
9960 ;
9961 return 0;
9962}
9963_ACEOF
9964rm -f conftest.$ac_objext conftest$ac_exeext
9965if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9966 (eval $ac_link) 2>conftest.er1
9967 ac_status=$?
9968 grep -v '^ *+' conftest.er1 >conftest.err
9969 rm -f conftest.er1
9970 cat conftest.err >&5
9971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9972 (exit $ac_status); } &&
9973 { ac_try='test -z "$ac_c_werror_flag"
9974 || test ! -s conftest.err'
9975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9976 (eval $ac_try) 2>&5
9977 ac_status=$?
9978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9979 (exit $ac_status); }; } &&
9980 { ac_try='test -s conftest$ac_exeext'
9981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9982 (eval $ac_try) 2>&5
9983 ac_status=$?
9984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9985 (exit $ac_status); }; }; then
77f120bf 9986 ac_cv_search_dlgetmodinfo="-l$ac_lib"
b4e70030 9987break
4e8d927d 9988else
b4e70030
JB
9989 echo "$as_me: failed program was:" >&5
9990sed 's/^/| /' conftest.$ac_ext >&5
9991
9992fi
9993rm -f conftest.err conftest.$ac_objext \
9994 conftest$ac_exeext conftest.$ac_ext
9995 done
1ba607ad 9996fi
bec39cab
AC
9997LIBS=$ac_func_search_save_LIBS
9998fi
77f120bf
JB
9999echo "$as_me:$LINENO: result: $ac_cv_search_dlgetmodinfo" >&5
10000echo "${ECHO_T}$ac_cv_search_dlgetmodinfo" >&6
10001if test "$ac_cv_search_dlgetmodinfo" != no; then
10002 test "$ac_cv_search_dlgetmodinfo" = "none required" || LIBS="$ac_cv_search_dlgetmodinfo $LIBS"
c906108c 10003
8bb2c122 10004fi
8bb2c122 10005
8bb2c122 10006
77f120bf 10007
77f120bf 10008
6c7a06a3
TT
10009
10010# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10011if test "${with_libiconv_prefix+set}" = set; then
10012 withval="$with_libiconv_prefix"
10013
10014 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
10015 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
10016 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
10017 done
10018
10019fi;
10020
10021 BUILD_LIBICONV_LIBDIR="-L../libiconv/lib/.libs -L../libiconv/lib/_libs"
10022 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
10023
10024 echo "$as_me:$LINENO: checking for iconv" >&5
10025echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10026if test "${am_cv_func_iconv+set}" = set; then
d542061a
UW
10027 echo $ECHO_N "(cached) $ECHO_C" >&6
10028else
6c7a06a3
TT
10029
10030 am_cv_func_iconv="no, consider installing GNU libiconv"
10031 am_cv_lib_iconv=no
10032 am_cv_use_build_libiconv=no
94ae1714 10033 # First, try to find iconv in libc.
6c7a06a3 10034 cat >conftest.$ac_ext <<_ACEOF
d542061a
UW
10035/* confdefs.h. */
10036_ACEOF
10037cat confdefs.h >>conftest.$ac_ext
10038cat >>conftest.$ac_ext <<_ACEOF
10039/* end confdefs.h. */
6c7a06a3
TT
10040#include <stdlib.h>
10041#include <iconv.h>
d542061a
UW
10042int
10043main ()
10044{
6c7a06a3
TT
10045iconv_t cd = iconv_open("","");
10046 iconv(cd,NULL,NULL,NULL,NULL);
10047 iconv_close(cd);
d542061a
UW
10048 ;
10049 return 0;
10050}
10051_ACEOF
10052rm -f conftest.$ac_objext conftest$ac_exeext
10053if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10054 (eval $ac_link) 2>conftest.er1
10055 ac_status=$?
10056 grep -v '^ *+' conftest.er1 >conftest.err
10057 rm -f conftest.er1
10058 cat conftest.err >&5
10059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10060 (exit $ac_status); } &&
10061 { ac_try='test -z "$ac_c_werror_flag"
10062 || test ! -s conftest.err'
10063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10064 (eval $ac_try) 2>&5
10065 ac_status=$?
10066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10067 (exit $ac_status); }; } &&
10068 { ac_try='test -s conftest$ac_exeext'
10069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10070 (eval $ac_try) 2>&5
10071 ac_status=$?
10072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10073 (exit $ac_status); }; }; then
6c7a06a3 10074 am_cv_func_iconv=yes
d542061a
UW
10075else
10076 echo "$as_me: failed program was:" >&5
10077sed 's/^/| /' conftest.$ac_ext >&5
10078
10079fi
10080rm -f conftest.err conftest.$ac_objext \
10081 conftest$ac_exeext conftest.$ac_ext
94ae1714
TT
10082
10083 # If iconv was not in libc, try -liconv. In this case, arrange to
10084 # look in the libiconv prefix, if it was specified by the user.
6c7a06a3 10085 if test "$am_cv_func_iconv" != yes; then
94ae1714 10086 am_save_CPPFLAGS="$CPPFLAGS"
6c7a06a3 10087 am_save_LIBS="$LIBS"
94ae1714
TT
10088 if test -n "$LIBICONV_INCLUDE"; then
10089 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10090 LIBS="$LIBS $LIBICONV_LIBDIR"
10091 fi
6c7a06a3
TT
10092 LIBS="$LIBS -liconv"
10093 cat >conftest.$ac_ext <<_ACEOF
d542061a
UW
10094/* confdefs.h. */
10095_ACEOF
10096cat confdefs.h >>conftest.$ac_ext
10097cat >>conftest.$ac_ext <<_ACEOF
10098/* end confdefs.h. */
6c7a06a3
TT
10099#include <stdlib.h>
10100#include <iconv.h>
d542061a
UW
10101int
10102main ()
10103{
6c7a06a3
TT
10104iconv_t cd = iconv_open("","");
10105 iconv(cd,NULL,NULL,NULL,NULL);
10106 iconv_close(cd);
d542061a
UW
10107 ;
10108 return 0;
10109}
10110_ACEOF
10111rm -f conftest.$ac_objext conftest$ac_exeext
10112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10113 (eval $ac_link) 2>conftest.er1
10114 ac_status=$?
10115 grep -v '^ *+' conftest.er1 >conftest.err
10116 rm -f conftest.er1
10117 cat conftest.err >&5
10118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10119 (exit $ac_status); } &&
10120 { ac_try='test -z "$ac_c_werror_flag"
10121 || test ! -s conftest.err'
10122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10123 (eval $ac_try) 2>&5
10124 ac_status=$?
10125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10126 (exit $ac_status); }; } &&
10127 { ac_try='test -s conftest$ac_exeext'
10128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10129 (eval $ac_try) 2>&5
10130 ac_status=$?
10131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10132 (exit $ac_status); }; }; then
6c7a06a3
TT
10133 am_cv_lib_iconv=yes
10134 am_cv_func_iconv=yes
d542061a
UW
10135else
10136 echo "$as_me: failed program was:" >&5
10137sed 's/^/| /' conftest.$ac_ext >&5
10138
10139fi
10140rm -f conftest.err conftest.$ac_objext \
10141 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10142 LIBS="$am_save_LIBS"
94ae1714 10143 CPPFLAGS="$am_save_CPPFLAGS"
77f120bf 10144 fi
94ae1714
TT
10145
10146 # If that didn't work, try to find libiconv in the build tree.
6c7a06a3
TT
10147 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
10148 am_save_LIBS="$LIBS"
10149 am_save_CPPFLAGS="$CPPFLAGS"
10150 LIBS="$LIBS $BUILD_LIBICONV_LIBDIR -liconv"
10151 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
10152 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
10153/* confdefs.h. */
10154_ACEOF
10155cat confdefs.h >>conftest.$ac_ext
10156cat >>conftest.$ac_ext <<_ACEOF
10157/* end confdefs.h. */
6c7a06a3
TT
10158#include <stdlib.h>
10159#include <iconv.h>
bec39cab
AC
10160int
10161main ()
10162{
6c7a06a3
TT
10163iconv_t cd = iconv_open("","");
10164 iconv(cd,NULL,NULL,NULL,NULL);
10165 iconv_close(cd);
bec39cab
AC
10166 ;
10167 return 0;
10168}
10169_ACEOF
b4e70030 10170rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
10171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10172 (eval $ac_link) 2>conftest.er1
10173 ac_status=$?
10174 grep -v '^ *+' conftest.er1 >conftest.err
10175 rm -f conftest.er1
10176 cat conftest.err >&5
10177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10178 (exit $ac_status); } &&
b4e70030
JB
10179 { ac_try='test -z "$ac_c_werror_flag"
10180 || test ! -s conftest.err'
bec39cab
AC
10181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10182 (eval $ac_try) 2>&5
10183 ac_status=$?
10184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10185 (exit $ac_status); }; } &&
10186 { ac_try='test -s conftest$ac_exeext'
10187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10188 (eval $ac_try) 2>&5
10189 ac_status=$?
10190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10191 (exit $ac_status); }; }; then
94ae1714
TT
10192 am_cv_use_build_libiconv=yes
10193 am_cv_lib_iconv=yes
6c7a06a3 10194 am_cv_func_iconv=yes
627af7ea 10195else
bec39cab
AC
10196 echo "$as_me: failed program was:" >&5
10197sed 's/^/| /' conftest.$ac_ext >&5
627af7ea 10198
627af7ea 10199fi
bec39cab 10200rm -f conftest.err conftest.$ac_objext \
b4e70030 10201 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10202 LIBS="$am_save_LIBS"
fc3b640d 10203 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
10204 fi
10205
10206fi
10207echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
10208echo "${ECHO_T}$am_cv_func_iconv" >&6
94ae1714
TT
10209
10210 # Set the various flags based on the cache variables. We can't rely
10211 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
10212 LIBICONV=
10213 if test "$am_cv_lib_iconv" = yes; then
10214 LIBICONV="-liconv"
94ae1714
TT
10215 else
10216 LIBICONV_LIBDIR=
10217 LIBICONV_INCLUDE=
fc3b640d
TT
10218 fi
10219 if test "$am_cv_use_build_libiconv" = yes; then
10220 LIBICONV_LIBDIR="$BUILD_LIBICONV_LIBDIR"
10221 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
10222 fi
10223 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10224 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 10225
6c7a06a3
TT
10226 if test "$am_cv_func_iconv" = yes; then
10227
10228cat >>confdefs.h <<\_ACEOF
10229#define HAVE_ICONV 1
10230_ACEOF
10231
10232 echo "$as_me:$LINENO: checking for iconv declaration" >&5
10233echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
10234 if test "${am_cv_proto_iconv+set}" = set; then
10235 echo $ECHO_N "(cached) $ECHO_C" >&6
10236else
10237
10238 cat >conftest.$ac_ext <<_ACEOF
b4e70030
JB
10239/* confdefs.h. */
10240_ACEOF
10241cat confdefs.h >>conftest.$ac_ext
10242cat >>conftest.$ac_ext <<_ACEOF
10243/* end confdefs.h. */
10244
6c7a06a3
TT
10245#include <stdlib.h>
10246#include <iconv.h>
10247extern
b4e70030 10248#ifdef __cplusplus
6c7a06a3 10249"C"
b4e70030 10250#endif
6c7a06a3
TT
10251#if defined(__STDC__) || defined(__cplusplus)
10252size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10253#else
10254size_t iconv();
10255#endif
10256
b4e70030
JB
10257int
10258main ()
10259{
6c7a06a3 10260
b4e70030
JB
10261 ;
10262 return 0;
10263}
10264_ACEOF
6c7a06a3
TT
10265rm -f conftest.$ac_objext
10266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10267 (eval $ac_compile) 2>conftest.er1
b4e70030
JB
10268 ac_status=$?
10269 grep -v '^ *+' conftest.er1 >conftest.err
10270 rm -f conftest.er1
10271 cat conftest.err >&5
10272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10273 (exit $ac_status); } &&
10274 { ac_try='test -z "$ac_c_werror_flag"
10275 || test ! -s conftest.err'
10276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10277 (eval $ac_try) 2>&5
10278 ac_status=$?
10279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10280 (exit $ac_status); }; } &&
6c7a06a3 10281 { ac_try='test -s conftest.$ac_objext'
b4e70030
JB
10282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10283 (eval $ac_try) 2>&5
10284 ac_status=$?
10285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10286 (exit $ac_status); }; }; then
6c7a06a3 10287 am_cv_proto_iconv_arg1=""
4e8d927d 10288else
b4e70030
JB
10289 echo "$as_me: failed program was:" >&5
10290sed 's/^/| /' conftest.$ac_ext >&5
10291
6c7a06a3 10292am_cv_proto_iconv_arg1="const"
b4e70030 10293fi
6c7a06a3
TT
10294rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10295 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);"
10296fi
10297
10298 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10299 echo "$as_me:$LINENO: result: ${ac_t:-
10300 }$am_cv_proto_iconv" >&5
10301echo "${ECHO_T}${ac_t:-
10302 }$am_cv_proto_iconv" >&6
10303
10304cat >>confdefs.h <<_ACEOF
10305#define ICONV_CONST $am_cv_proto_iconv_arg1
10306_ACEOF
10307
10308 fi
6c7a06a3
TT
10309
10310
10311# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
10312# There is a very specific comment in /usr/include/curses.h explaining that
10313# termcap routines built into libcurses must not be used.
10314#
10315# The symptoms we observed so far is GDB unexpectedly changing
10316# the terminal settings when tgetent is called - this is particularly
10317# visible as the output is missing carriage returns, and so rapidly
10318# becomes very hard to read.
10319#
10320# The readline configure script has already decided that libtermcap
10321# was enough for its purposes, and so decided to build readline using
10322# libtermcap. Since the TUI mode requires curses, building GDB with
10323# TUI enabled results in both libraries to be used at the same time,
10324# which is not allowed. This basically means that GDB with TUI is
10325# broken on alpha-osf.
10326
10327case $host_os in
10328 alpha*-*-osf* )
10329 if "$enable_tui" = "yes"; then
10330 { { echo "$as_me:$LINENO: error: Building GDB with TUI mode is not supported on this host" >&5
10331echo "$as_me: error: Building GDB with TUI mode is not supported on this host" >&2;}
10332 { (exit 1); exit 1; }; }
10333 fi
10334 if "$enable_tui" = "auto"; then
10335 enable_tui=no
10336 fi
10337 ;;
10338esac
10339
cb01cfba 10340# For the TUI, we need enhanced curses functionality.
bd8a8e1b 10341if test x"$enable_tui" != xno; then
cb01cfba
JB
10342 prefer_curses=yes
10343fi
10344
10345curses_found=no
10346if test x"$prefer_curses" = xyes; then
10347 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
10348 # curses library because the latter might not provide all the
10349 # functionality we need. However, this leads to problems on systems
10350 # where the linker searches /usr/local/lib, but the compiler doesn't
10351 # search /usr/local/include, if ncurses is installed in /usr/local. A
10352 # default installation of ncurses on alpha*-dec-osf* will lead to such
10353 # a situation.
10354 echo "$as_me:$LINENO: checking for library containing waddstr" >&5
6c7a06a3
TT
10355echo $ECHO_N "checking for library containing waddstr... $ECHO_C" >&6
10356if test "${ac_cv_search_waddstr+set}" = set; then
10357 echo $ECHO_N "(cached) $ECHO_C" >&6
10358else
10359 ac_func_search_save_LIBS=$LIBS
10360ac_cv_search_waddstr=no
10361cat >conftest.$ac_ext <<_ACEOF
10362/* confdefs.h. */
10363_ACEOF
10364cat confdefs.h >>conftest.$ac_ext
10365cat >>conftest.$ac_ext <<_ACEOF
10366/* end confdefs.h. */
10367
10368/* Override any gcc2 internal prototype to avoid an error. */
10369#ifdef __cplusplus
10370extern "C"
10371#endif
10372/* We use char because int might match the return type of a gcc2
10373 builtin and then its argument prototype would still apply. */
10374char waddstr ();
10375int
10376main ()
10377{
10378waddstr ();
10379 ;
10380 return 0;
10381}
10382_ACEOF
10383rm -f conftest.$ac_objext conftest$ac_exeext
10384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10385 (eval $ac_link) 2>conftest.er1
10386 ac_status=$?
10387 grep -v '^ *+' conftest.er1 >conftest.err
10388 rm -f conftest.er1
10389 cat conftest.err >&5
10390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10391 (exit $ac_status); } &&
10392 { ac_try='test -z "$ac_c_werror_flag"
10393 || test ! -s conftest.err'
10394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10395 (eval $ac_try) 2>&5
10396 ac_status=$?
10397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10398 (exit $ac_status); }; } &&
10399 { ac_try='test -s conftest$ac_exeext'
10400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10401 (eval $ac_try) 2>&5
10402 ac_status=$?
10403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10404 (exit $ac_status); }; }; then
10405 ac_cv_search_waddstr="none required"
10406else
10407 echo "$as_me: failed program was:" >&5
10408sed 's/^/| /' conftest.$ac_ext >&5
10409
10410fi
10411rm -f conftest.err conftest.$ac_objext \
10412 conftest$ac_exeext conftest.$ac_ext
10413if test "$ac_cv_search_waddstr" = no; then
10414 for ac_lib in ncurses cursesX curses; do
10415 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10416 cat >conftest.$ac_ext <<_ACEOF
10417/* confdefs.h. */
10418_ACEOF
10419cat confdefs.h >>conftest.$ac_ext
10420cat >>conftest.$ac_ext <<_ACEOF
10421/* end confdefs.h. */
10422
10423/* Override any gcc2 internal prototype to avoid an error. */
10424#ifdef __cplusplus
10425extern "C"
10426#endif
10427/* We use char because int might match the return type of a gcc2
10428 builtin and then its argument prototype would still apply. */
10429char waddstr ();
10430int
10431main ()
10432{
10433waddstr ();
10434 ;
10435 return 0;
10436}
10437_ACEOF
10438rm -f conftest.$ac_objext conftest$ac_exeext
10439if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10440 (eval $ac_link) 2>conftest.er1
10441 ac_status=$?
10442 grep -v '^ *+' conftest.er1 >conftest.err
10443 rm -f conftest.er1
10444 cat conftest.err >&5
10445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10446 (exit $ac_status); } &&
10447 { ac_try='test -z "$ac_c_werror_flag"
10448 || test ! -s conftest.err'
10449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10450 (eval $ac_try) 2>&5
10451 ac_status=$?
10452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10453 (exit $ac_status); }; } &&
10454 { ac_try='test -s conftest$ac_exeext'
10455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10456 (eval $ac_try) 2>&5
10457 ac_status=$?
10458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10459 (exit $ac_status); }; }; then
10460 ac_cv_search_waddstr="-l$ac_lib"
10461break
10462else
10463 echo "$as_me: failed program was:" >&5
10464sed 's/^/| /' conftest.$ac_ext >&5
10465
10466fi
10467rm -f conftest.err conftest.$ac_objext \
10468 conftest$ac_exeext conftest.$ac_ext
10469 done
10470fi
10471LIBS=$ac_func_search_save_LIBS
10472fi
10473echo "$as_me:$LINENO: result: $ac_cv_search_waddstr" >&5
10474echo "${ECHO_T}$ac_cv_search_waddstr" >&6
10475if test "$ac_cv_search_waddstr" != no; then
10476 test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
10477
10478fi
10479
10480
cb01cfba
JB
10481 if test "$ac_cv_search_waddstr" != no; then
10482 curses_found=yes
10483 fi
10484fi
10485
10486# Check whether we should enable the TUI, but only do so if we really
10487# can.
10488if test x"$enable_tui" != xno; then
10489 if test -d $srcdir/tui; then
10490 if test "$curses_found" != no; then
6c7a06a3
TT
10491 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
10492 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
10493 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
10494 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
10495 CONFIG_ALL="${CONFIG_ALL} all-tui"
10496 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
10497 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
10498 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
10499 else
10500 if test x"$enable_tui" = xyes; then
10501 { { echo "$as_me:$LINENO: error: no enhanced curses library found; disable TUI" >&5
10502echo "$as_me: error: no enhanced curses library found; disable TUI" >&2;}
10503 { (exit 1); exit 1; }; }
10504 else
10505 { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
10506echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
10507 fi
10508 fi
10509 fi
10510fi
10511
10512# Since GDB uses Readline, we need termcap functionality. In many
10513# cases this will be provided by the curses library, but some systems
10514# have a seperate termcap library, or no curses library at all.
10515
10516case $host_os in
10517 cygwin*)
10518 if test -d $srcdir/libtermcap; then
10519 LIBS="../libtermcap/libtermcap.a $LIBS"
10520 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
10521 fi ;;
10522 go32* | *djgpp*)
10523 ac_cv_search_tgetent="none required"
10524 ;;
10525 *mingw32*)
10526 ac_cv_search_tgetent="none required"
10527 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
10528 ;;
10529esac
10530
10531# These are the libraries checked by Readline.
10532echo "$as_me:$LINENO: checking for library containing tgetent" >&5
10533echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6
10534if test "${ac_cv_search_tgetent+set}" = set; then
10535 echo $ECHO_N "(cached) $ECHO_C" >&6
10536else
10537 ac_func_search_save_LIBS=$LIBS
10538ac_cv_search_tgetent=no
10539cat >conftest.$ac_ext <<_ACEOF
10540/* confdefs.h. */
10541_ACEOF
10542cat confdefs.h >>conftest.$ac_ext
10543cat >>conftest.$ac_ext <<_ACEOF
10544/* end confdefs.h. */
10545
10546/* Override any gcc2 internal prototype to avoid an error. */
10547#ifdef __cplusplus
10548extern "C"
10549#endif
10550/* We use char because int might match the return type of a gcc2
10551 builtin and then its argument prototype would still apply. */
10552char tgetent ();
10553int
10554main ()
10555{
10556tgetent ();
10557 ;
10558 return 0;
10559}
10560_ACEOF
10561rm -f conftest.$ac_objext conftest$ac_exeext
10562if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10563 (eval $ac_link) 2>conftest.er1
10564 ac_status=$?
10565 grep -v '^ *+' conftest.er1 >conftest.err
10566 rm -f conftest.er1
10567 cat conftest.err >&5
10568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10569 (exit $ac_status); } &&
10570 { ac_try='test -z "$ac_c_werror_flag"
10571 || test ! -s conftest.err'
10572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10573 (eval $ac_try) 2>&5
10574 ac_status=$?
10575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10576 (exit $ac_status); }; } &&
10577 { ac_try='test -s conftest$ac_exeext'
10578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10579 (eval $ac_try) 2>&5
10580 ac_status=$?
10581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10582 (exit $ac_status); }; }; then
10583 ac_cv_search_tgetent="none required"
10584else
10585 echo "$as_me: failed program was:" >&5
10586sed 's/^/| /' conftest.$ac_ext >&5
10587
10588fi
10589rm -f conftest.err conftest.$ac_objext \
10590 conftest$ac_exeext conftest.$ac_ext
10591if test "$ac_cv_search_tgetent" = no; then
10592 for ac_lib in termcap tinfo curses ncurses; do
10593 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10594 cat >conftest.$ac_ext <<_ACEOF
10595/* confdefs.h. */
10596_ACEOF
10597cat confdefs.h >>conftest.$ac_ext
10598cat >>conftest.$ac_ext <<_ACEOF
10599/* end confdefs.h. */
10600
10601/* Override any gcc2 internal prototype to avoid an error. */
10602#ifdef __cplusplus
10603extern "C"
10604#endif
10605/* We use char because int might match the return type of a gcc2
10606 builtin and then its argument prototype would still apply. */
10607char tgetent ();
10608int
10609main ()
10610{
10611tgetent ();
10612 ;
10613 return 0;
10614}
10615_ACEOF
10616rm -f conftest.$ac_objext conftest$ac_exeext
10617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10618 (eval $ac_link) 2>conftest.er1
10619 ac_status=$?
10620 grep -v '^ *+' conftest.er1 >conftest.err
10621 rm -f conftest.er1
10622 cat conftest.err >&5
10623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10624 (exit $ac_status); } &&
10625 { ac_try='test -z "$ac_c_werror_flag"
10626 || test ! -s conftest.err'
10627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10628 (eval $ac_try) 2>&5
10629 ac_status=$?
10630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10631 (exit $ac_status); }; } &&
10632 { ac_try='test -s conftest$ac_exeext'
10633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10634 (eval $ac_try) 2>&5
10635 ac_status=$?
10636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10637 (exit $ac_status); }; }; then
10638 ac_cv_search_tgetent="-l$ac_lib"
10639break
10640else
10641 echo "$as_me: failed program was:" >&5
10642sed 's/^/| /' conftest.$ac_ext >&5
10643
10644fi
10645rm -f conftest.err conftest.$ac_objext \
10646 conftest$ac_exeext conftest.$ac_ext
10647 done
10648fi
10649LIBS=$ac_func_search_save_LIBS
10650fi
10651echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5
10652echo "${ECHO_T}$ac_cv_search_tgetent" >&6
10653if test "$ac_cv_search_tgetent" != no; then
10654 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
10655
06825bd1
MK
10656fi
10657
06825bd1 10658
bec39cab
AC
10659if test "$ac_cv_search_tgetent" = no; then
10660 { { echo "$as_me:$LINENO: error: no termcap library found" >&5
10661echo "$as_me: error: no termcap library found" >&2;}
10662 { (exit 1); exit 1; }; }
8ee53726
MK
10663fi
10664
3841debe 10665
6a30b0a5
AS
10666# Check whether --with-system-readline or --without-system-readline was given.
10667if test "${with_system_readline+set}" = set; then
10668 withval="$with_system_readline"
10669
10670fi;
10671
10672if test "$with_system_readline" = yes; then
10673 READLINE=-lreadline
10674 READLINE_DEPS=
10675 READLINE_CFLAGS=
10676else
10677 READLINE='$(READLINE_DIR)/libreadline.a'
10678 READLINE_DEPS='$(READLINE)'
10679 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
10680fi
10681
10682
10683
10684
10685
5c39566f
DJ
10686# Check whether --with-expat or --without-expat was given.
10687if test "${with_expat+set}" = set; then
10688 withval="$with_expat"
10689
10690else
10691 with_expat=auto
10692fi;
10693echo "$as_me:$LINENO: checking whether to use expat" >&5
10694echo $ECHO_N "checking whether to use expat... $ECHO_C" >&6
10695echo "$as_me:$LINENO: result: $with_expat" >&5
10696echo "${ECHO_T}$with_expat" >&6
10697
10698if test "${with_expat}" = no; then
10699 { echo "$as_me:$LINENO: WARNING: expat support disabled; some features may be unavailable." >&5
10700echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
10701 HAVE_LIBEXPAT=no
10702else
10703
3841debe
DJ
10704 if test "X$prefix" = "XNONE"; then
10705 acl_final_prefix="$ac_default_prefix"
10706 else
10707 acl_final_prefix="$prefix"
10708 fi
10709 if test "X$exec_prefix" = "XNONE"; then
10710 acl_final_exec_prefix='${prefix}'
10711 else
10712 acl_final_exec_prefix="$exec_prefix"
10713 fi
10714 acl_save_prefix="$prefix"
10715 prefix="$acl_final_prefix"
10716 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10717 prefix="$acl_save_prefix"
10718
10719
10720# Check whether --with-gnu-ld or --without-gnu-ld was given.
10721if test "${with_gnu_ld+set}" = set; then
10722 withval="$with_gnu_ld"
10723 test "$withval" = no || with_gnu_ld=yes
10724else
10725 with_gnu_ld=no
10726fi;
10727# Prepare PATH_SEPARATOR.
10728# The user is always right.
10729if test "${PATH_SEPARATOR+set}" != set; then
10730 echo "#! /bin/sh" >conf$$.sh
10731 echo "exit 0" >>conf$$.sh
10732 chmod +x conf$$.sh
10733 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10734 PATH_SEPARATOR=';'
10735 else
10736 PATH_SEPARATOR=:
10737 fi
10738 rm -f conf$$.sh
10739fi
10740ac_prog=ld
10741if test "$GCC" = yes; then
10742 # Check if gcc -print-prog-name=ld gives a path.
10743 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10744echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10745 case $host in
10746 *-*-mingw*)
10747 # gcc leaves a trailing carriage return which upsets mingw
10748 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10749 *)
10750 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10751 esac
10752 case $ac_prog in
10753 # Accept absolute paths.
10754 [\\/]* | [A-Za-z]:[\\/]*)
10755 re_direlt='/[^/][^/]*/\.\./'
10756 # Canonicalize the path of ld
10757 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10758 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10759 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10760 done
10761 test -z "$LD" && LD="$ac_prog"
10762 ;;
10763 "")
10764 # If it fails, then pretend we aren't using GCC.
10765 ac_prog=ld
10766 ;;
10767 *)
10768 # If it is relative, then search for the first ld in PATH.
10769 with_gnu_ld=unknown
10770 ;;
10771 esac
10772elif test "$with_gnu_ld" = yes; then
10773 echo "$as_me:$LINENO: checking for GNU ld" >&5
10774echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
10775else
10776 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10777echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
10778fi
10779if test "${acl_cv_path_LD+set}" = set; then
10780 echo $ECHO_N "(cached) $ECHO_C" >&6
10781else
10782 if test -z "$LD"; then
10783 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10784 for ac_dir in $PATH; do
10785 test -z "$ac_dir" && ac_dir=.
10786 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10787 acl_cv_path_LD="$ac_dir/$ac_prog"
10788 # Check to see if the program is GNU ld. I'd rather use --version,
10789 # but apparently some GNU ld's only accept -v.
10790 # Break only if it was the GNU/non-GNU ld that we prefer.
10791 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10792 test "$with_gnu_ld" != no && break
10793 else
10794 test "$with_gnu_ld" != yes && break
10795 fi
10796 fi
10797 done
10798 IFS="$ac_save_ifs"
10799else
10800 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10801fi
10802fi
10803
10804LD="$acl_cv_path_LD"
10805if test -n "$LD"; then
10806 echo "$as_me:$LINENO: result: $LD" >&5
10807echo "${ECHO_T}$LD" >&6
10808else
10809 echo "$as_me:$LINENO: result: no" >&5
10810echo "${ECHO_T}no" >&6
10811fi
10812test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10813echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10814 { (exit 1); exit 1; }; }
10815echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10816echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10817if test "${acl_cv_prog_gnu_ld+set}" = set; then
10818 echo $ECHO_N "(cached) $ECHO_C" >&6
10819else
10820 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10821if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10822 acl_cv_prog_gnu_ld=yes
10823else
10824 acl_cv_prog_gnu_ld=no
10825fi
10826fi
10827echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10828echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10829with_gnu_ld=$acl_cv_prog_gnu_ld
10830
10831
10832
10833 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10834echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10835if test "${acl_cv_rpath+set}" = set; then
10836 echo $ECHO_N "(cached) $ECHO_C" >&6
10837else
10838
10839 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10840 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10841 . ./conftest.sh
10842 rm -f ./conftest.sh
10843 acl_cv_rpath=done
10844
10845fi
10846echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10847echo "${ECHO_T}$acl_cv_rpath" >&6
10848 wl="$acl_cv_wl"
10849 libext="$acl_cv_libext"
10850 shlibext="$acl_cv_shlibext"
10851 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10852 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10853 hardcode_direct="$acl_cv_hardcode_direct"
10854 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10855 # Check whether --enable-rpath or --disable-rpath was given.
10856if test "${enable_rpath+set}" = set; then
10857 enableval="$enable_rpath"
10858 :
10859else
10860 enable_rpath=yes
10861fi;
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871 use_additional=yes
10872
10873 acl_save_prefix="$prefix"
10874 prefix="$acl_final_prefix"
10875 acl_save_exec_prefix="$exec_prefix"
10876 exec_prefix="$acl_final_exec_prefix"
10877
10878 eval additional_includedir=\"$includedir\"
10879 eval additional_libdir=\"$libdir\"
10880
10881 exec_prefix="$acl_save_exec_prefix"
10882 prefix="$acl_save_prefix"
10883
10884
10885# Check whether --with-libexpat-prefix or --without-libexpat-prefix was given.
10886if test "${with_libexpat_prefix+set}" = set; then
10887 withval="$with_libexpat_prefix"
10888
10889 if test "X$withval" = "Xno"; then
10890 use_additional=no
10891 else
10892 if test "X$withval" = "X"; then
10893
10894 acl_save_prefix="$prefix"
10895 prefix="$acl_final_prefix"
10896 acl_save_exec_prefix="$exec_prefix"
10897 exec_prefix="$acl_final_exec_prefix"
10898
10899 eval additional_includedir=\"$includedir\"
10900 eval additional_libdir=\"$libdir\"
10901
10902 exec_prefix="$acl_save_exec_prefix"
10903 prefix="$acl_save_prefix"
10904
10905 else
10906 additional_includedir="$withval/include"
10907 additional_libdir="$withval/lib"
10908 fi
10909 fi
10910
10911fi;
10912 LIBEXPAT=
10913 LTLIBEXPAT=
10914 INCEXPAT=
10915 rpathdirs=
10916 ltrpathdirs=
10917 names_already_handled=
10918 names_next_round='expat '
10919 while test -n "$names_next_round"; do
10920 names_this_round="$names_next_round"
10921 names_next_round=
10922 for name in $names_this_round; do
10923 already_handled=
10924 for n in $names_already_handled; do
10925 if test "$n" = "$name"; then
10926 already_handled=yes
10927 break
10928 fi
10929 done
10930 if test -z "$already_handled"; then
10931 names_already_handled="$names_already_handled $name"
10932 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10933 eval value=\"\$HAVE_LIB$uppername\"
10934 if test -n "$value"; then
10935 if test "$value" = yes; then
10936 eval value=\"\$LIB$uppername\"
10937 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10938 eval value=\"\$LTLIB$uppername\"
10939 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10940 else
10941 :
10942 fi
10943 else
10944 found_dir=
10945 found_la=
10946 found_so=
10947 found_a=
10948 if test $use_additional = yes; then
10949 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10950 found_dir="$additional_libdir"
10951 found_so="$additional_libdir/lib$name.$shlibext"
10952 if test -f "$additional_libdir/lib$name.la"; then
10953 found_la="$additional_libdir/lib$name.la"
10954 fi
10955 else
10956 if test -f "$additional_libdir/lib$name.$libext"; then
10957 found_dir="$additional_libdir"
10958 found_a="$additional_libdir/lib$name.$libext"
10959 if test -f "$additional_libdir/lib$name.la"; then
10960 found_la="$additional_libdir/lib$name.la"
10961 fi
10962 fi
10963 fi
10964 fi
10965 if test "X$found_dir" = "X"; then
10966 for x in $LDFLAGS $LTLIBEXPAT; do
10967
10968 acl_save_prefix="$prefix"
10969 prefix="$acl_final_prefix"
10970 acl_save_exec_prefix="$exec_prefix"
10971 exec_prefix="$acl_final_exec_prefix"
10972 eval x=\"$x\"
10973 exec_prefix="$acl_save_exec_prefix"
10974 prefix="$acl_save_prefix"
10975
10976 case "$x" in
10977 -L*)
10978 dir=`echo "X$x" | sed -e 's/^X-L//'`
10979 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10980 found_dir="$dir"
10981 found_so="$dir/lib$name.$shlibext"
10982 if test -f "$dir/lib$name.la"; then
10983 found_la="$dir/lib$name.la"
10984 fi
10985 else
10986 if test -f "$dir/lib$name.$libext"; then
10987 found_dir="$dir"
10988 found_a="$dir/lib$name.$libext"
10989 if test -f "$dir/lib$name.la"; then
10990 found_la="$dir/lib$name.la"
10991 fi
10992 fi
10993 fi
10994 ;;
10995 esac
10996 if test "X$found_dir" != "X"; then
10997 break
10998 fi
10999 done
11000 fi
11001 if test "X$found_dir" != "X"; then
11002 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
11003 if test "X$found_so" != "X"; then
11004 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11005 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11006 else
11007 haveit=
11008 for x in $ltrpathdirs; do
11009 if test "X$x" = "X$found_dir"; then
11010 haveit=yes
11011 break
11012 fi
11013 done
11014 if test -z "$haveit"; then
11015 ltrpathdirs="$ltrpathdirs $found_dir"
11016 fi
11017 if test "$hardcode_direct" = yes; then
11018 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11019 else
11020 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11021 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11022 haveit=
11023 for x in $rpathdirs; do
11024 if test "X$x" = "X$found_dir"; then
11025 haveit=yes
11026 break
11027 fi
11028 done
11029 if test -z "$haveit"; then
11030 rpathdirs="$rpathdirs $found_dir"
11031 fi
11032 else
11033 haveit=
11034 for x in $LDFLAGS $LIBEXPAT; do
11035
11036 acl_save_prefix="$prefix"
11037 prefix="$acl_final_prefix"
11038 acl_save_exec_prefix="$exec_prefix"
11039 exec_prefix="$acl_final_exec_prefix"
11040 eval x=\"$x\"
11041 exec_prefix="$acl_save_exec_prefix"
11042 prefix="$acl_save_prefix"
11043
11044 if test "X$x" = "X-L$found_dir"; then
11045 haveit=yes
11046 break
11047 fi
11048 done
11049 if test -z "$haveit"; then
11050 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
11051 fi
11052 if test "$hardcode_minus_L" != no; then
11053 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11054 else
11055 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11056 fi
11057 fi
11058 fi
11059 fi
11060 else
11061 if test "X$found_a" != "X"; then
11062 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
11063 else
11064 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
11065 fi
11066 fi
11067 additional_includedir=
11068 case "$found_dir" in
11069 */lib | */lib/)
11070 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11071 additional_includedir="$basedir/include"
11072 ;;
11073 esac
11074 if test "X$additional_includedir" != "X"; then
11075 if test "X$additional_includedir" != "X/usr/include"; then
11076 haveit=
11077 if test "X$additional_includedir" = "X/usr/local/include"; then
11078 if test -n "$GCC"; then
11079 case $host_os in
11080 linux*) haveit=yes;;
11081 esac
11082 fi
11083 fi
11084 if test -z "$haveit"; then
11085 for x in $CPPFLAGS $INCEXPAT; do
11086
11087 acl_save_prefix="$prefix"
11088 prefix="$acl_final_prefix"
11089 acl_save_exec_prefix="$exec_prefix"
11090 exec_prefix="$acl_final_exec_prefix"
11091 eval x=\"$x\"
11092 exec_prefix="$acl_save_exec_prefix"
11093 prefix="$acl_save_prefix"
11094
11095 if test "X$x" = "X-I$additional_includedir"; then
11096 haveit=yes
11097 break
11098 fi
11099 done
11100 if test -z "$haveit"; then
11101 if test -d "$additional_includedir"; then
11102 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
11103 fi
11104 fi
11105 fi
11106 fi
11107 fi
11108 if test -n "$found_la"; then
11109 save_libdir="$libdir"
11110 case "$found_la" in
11111 */* | *\\*) . "$found_la" ;;
11112 *) . "./$found_la" ;;
11113 esac
11114 libdir="$save_libdir"
11115 for dep in $dependency_libs; do
11116 case "$dep" in
11117 -L*)
11118 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11119 if test "X$additional_libdir" != "X/usr/lib"; then
11120 haveit=
11121 if test "X$additional_libdir" = "X/usr/local/lib"; then
11122 if test -n "$GCC"; then
11123 case $host_os in
11124 linux*) haveit=yes;;
11125 esac
11126 fi
11127 fi
11128 if test -z "$haveit"; then
11129 haveit=
11130 for x in $LDFLAGS $LIBEXPAT; do
11131
11132 acl_save_prefix="$prefix"
11133 prefix="$acl_final_prefix"
11134 acl_save_exec_prefix="$exec_prefix"
11135 exec_prefix="$acl_final_exec_prefix"
11136 eval x=\"$x\"
11137 exec_prefix="$acl_save_exec_prefix"
11138 prefix="$acl_save_prefix"
11139
11140 if test "X$x" = "X-L$additional_libdir"; then
11141 haveit=yes
11142 break
11143 fi
11144 done
11145 if test -z "$haveit"; then
11146 if test -d "$additional_libdir"; then
11147 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
11148 fi
11149 fi
11150 haveit=
11151 for x in $LDFLAGS $LTLIBEXPAT; do
11152
11153 acl_save_prefix="$prefix"
11154 prefix="$acl_final_prefix"
11155 acl_save_exec_prefix="$exec_prefix"
11156 exec_prefix="$acl_final_exec_prefix"
11157 eval x=\"$x\"
11158 exec_prefix="$acl_save_exec_prefix"
11159 prefix="$acl_save_prefix"
11160
11161 if test "X$x" = "X-L$additional_libdir"; then
11162 haveit=yes
11163 break
11164 fi
11165 done
11166 if test -z "$haveit"; then
11167 if test -d "$additional_libdir"; then
11168 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
11169 fi
11170 fi
11171 fi
11172 fi
11173 ;;
11174 -R*)
11175 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11176 if test "$enable_rpath" != no; then
11177 haveit=
11178 for x in $rpathdirs; do
11179 if test "X$x" = "X$dir"; then
11180 haveit=yes
11181 break
11182 fi
11183 done
11184 if test -z "$haveit"; then
11185 rpathdirs="$rpathdirs $dir"
11186 fi
11187 haveit=
11188 for x in $ltrpathdirs; do
11189 if test "X$x" = "X$dir"; then
11190 haveit=yes
11191 break
11192 fi
11193 done
11194 if test -z "$haveit"; then
11195 ltrpathdirs="$ltrpathdirs $dir"
11196 fi
11197 fi
11198 ;;
11199 -l*)
11200 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11201 ;;
11202 *.la)
11203 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11204 ;;
11205 *)
11206 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
11207 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
11208 ;;
11209 esac
11210 done
11211 fi
11212 else
11213 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11214 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
11215 fi
11216 fi
11217 fi
11218 done
11219 done
11220 if test "X$rpathdirs" != "X"; then
11221 if test -n "$hardcode_libdir_separator"; then
11222 alldirs=
11223 for found_dir in $rpathdirs; do
11224 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11225 done
11226 acl_save_libdir="$libdir"
11227 libdir="$alldirs"
11228 eval flag=\"$hardcode_libdir_flag_spec\"
11229 libdir="$acl_save_libdir"
11230 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
11231 else
11232 for found_dir in $rpathdirs; do
11233 acl_save_libdir="$libdir"
11234 libdir="$found_dir"
11235 eval flag=\"$hardcode_libdir_flag_spec\"
11236 libdir="$acl_save_libdir"
11237 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
11238 done
11239 fi
11240 fi
11241 if test "X$ltrpathdirs" != "X"; then
11242 for found_dir in $ltrpathdirs; do
11243 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
11244 done
11245 fi
11246
11247
11248 ac_save_CPPFLAGS="$CPPFLAGS"
11249
11250 for element in $INCEXPAT; do
11251 haveit=
11252 for x in $CPPFLAGS; do
11253
11254 acl_save_prefix="$prefix"
11255 prefix="$acl_final_prefix"
11256 acl_save_exec_prefix="$exec_prefix"
11257 exec_prefix="$acl_final_exec_prefix"
11258 eval x=\"$x\"
11259 exec_prefix="$acl_save_exec_prefix"
11260 prefix="$acl_save_prefix"
11261
11262 if test "X$x" = "X$element"; then
11263 haveit=yes
11264 break
11265 fi
11266 done
11267 if test -z "$haveit"; then
11268 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11269 fi
11270 done
11271
11272
11273 echo "$as_me:$LINENO: checking for libexpat" >&5
11274echo $ECHO_N "checking for libexpat... $ECHO_C" >&6
11275if test "${ac_cv_libexpat+set}" = set; then
11276 echo $ECHO_N "(cached) $ECHO_C" >&6
11277else
11278
11279 ac_save_LIBS="$LIBS"
11280 LIBS="$LIBS $LIBEXPAT"
11281 cat >conftest.$ac_ext <<_ACEOF
11282/* confdefs.h. */
11283_ACEOF
11284cat confdefs.h >>conftest.$ac_ext
11285cat >>conftest.$ac_ext <<_ACEOF
11286/* end confdefs.h. */
11287#include "expat.h"
11288int
11289main ()
11290{
11291XML_Parser p = XML_ParserCreate (0);
11292 ;
11293 return 0;
11294}
11295_ACEOF
11296rm -f conftest.$ac_objext conftest$ac_exeext
11297if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11298 (eval $ac_link) 2>conftest.er1
11299 ac_status=$?
11300 grep -v '^ *+' conftest.er1 >conftest.err
11301 rm -f conftest.er1
11302 cat conftest.err >&5
11303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11304 (exit $ac_status); } &&
11305 { ac_try='test -z "$ac_c_werror_flag"
11306 || test ! -s conftest.err'
11307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11308 (eval $ac_try) 2>&5
11309 ac_status=$?
11310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11311 (exit $ac_status); }; } &&
11312 { ac_try='test -s conftest$ac_exeext'
11313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11314 (eval $ac_try) 2>&5
11315 ac_status=$?
11316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11317 (exit $ac_status); }; }; then
11318 ac_cv_libexpat=yes
11319else
11320 echo "$as_me: failed program was:" >&5
11321sed 's/^/| /' conftest.$ac_ext >&5
11322
11323ac_cv_libexpat=no
11324fi
11325rm -f conftest.err conftest.$ac_objext \
11326 conftest$ac_exeext conftest.$ac_ext
11327 LIBS="$ac_save_LIBS"
11328
11329fi
11330echo "$as_me:$LINENO: result: $ac_cv_libexpat" >&5
11331echo "${ECHO_T}$ac_cv_libexpat" >&6
11332 if test "$ac_cv_libexpat" = yes; then
11333 HAVE_LIBEXPAT=yes
11334
11335cat >>confdefs.h <<\_ACEOF
11336#define HAVE_LIBEXPAT 1
11337_ACEOF
11338
11339 echo "$as_me:$LINENO: checking how to link with libexpat" >&5
11340echo $ECHO_N "checking how to link with libexpat... $ECHO_C" >&6
11341 echo "$as_me:$LINENO: result: $LIBEXPAT" >&5
11342echo "${ECHO_T}$LIBEXPAT" >&6
11343 else
11344 HAVE_LIBEXPAT=no
11345 CPPFLAGS="$ac_save_CPPFLAGS"
11346 LIBEXPAT=
11347 LTLIBEXPAT=
11348 fi
11349
11350
11351
11352
11353
11354
5c39566f
DJ
11355 if test "$HAVE_LIBEXPAT" != yes; then
11356 if test "$with_expat" = yes; then
11357 { { echo "$as_me:$LINENO: error: expat is missing or unusable" >&5
11358echo "$as_me: error: expat is missing or unusable" >&2;}
11359 { (exit 1); exit 1; }; }
11360 else
11361 { echo "$as_me:$LINENO: WARNING: expat is missing or unusable; some features may be unavailable." >&5
11362echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
11363 fi
11364 else
11365 save_LIBS=$LIBS
11366 LIBS="$LIBS $LIBEXPAT"
ca4ca11e
DJ
11367
11368for ac_func in XML_StopParser
11369do
11370as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11371echo "$as_me:$LINENO: checking for $ac_func" >&5
11372echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11373if eval "test \"\${$as_ac_var+set}\" = set"; then
11374 echo $ECHO_N "(cached) $ECHO_C" >&6
11375else
11376 cat >conftest.$ac_ext <<_ACEOF
11377/* confdefs.h. */
11378_ACEOF
11379cat confdefs.h >>conftest.$ac_ext
11380cat >>conftest.$ac_ext <<_ACEOF
11381/* end confdefs.h. */
11382/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11383 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11384#define $ac_func innocuous_$ac_func
11385
11386/* System header to define __stub macros and hopefully few prototypes,
11387 which can conflict with char $ac_func (); below.
11388 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11389 <limits.h> exists even on freestanding compilers. */
11390
11391#ifdef __STDC__
11392# include <limits.h>
11393#else
11394# include <assert.h>
11395#endif
11396
11397#undef $ac_func
11398
11399/* Override any gcc2 internal prototype to avoid an error. */
11400#ifdef __cplusplus
11401extern "C"
11402{
11403#endif
11404/* We use char because int might match the return type of a gcc2
11405 builtin and then its argument prototype would still apply. */
11406char $ac_func ();
11407/* The GNU C library defines this for functions which it implements
11408 to always fail with ENOSYS. Some functions are actually named
11409 something starting with __ and the normal name is an alias. */
11410#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11411choke me
11412#else
11413char (*f) () = $ac_func;
11414#endif
11415#ifdef __cplusplus
11416}
11417#endif
11418
11419int
11420main ()
11421{
11422return f != $ac_func;
11423 ;
11424 return 0;
11425}
11426_ACEOF
11427rm -f conftest.$ac_objext conftest$ac_exeext
11428if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11429 (eval $ac_link) 2>conftest.er1
11430 ac_status=$?
11431 grep -v '^ *+' conftest.er1 >conftest.err
11432 rm -f conftest.er1
11433 cat conftest.err >&5
11434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11435 (exit $ac_status); } &&
11436 { ac_try='test -z "$ac_c_werror_flag"
11437 || test ! -s conftest.err'
11438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11439 (eval $ac_try) 2>&5
11440 ac_status=$?
11441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11442 (exit $ac_status); }; } &&
11443 { ac_try='test -s conftest$ac_exeext'
11444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11445 (eval $ac_try) 2>&5
11446 ac_status=$?
11447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11448 (exit $ac_status); }; }; then
11449 eval "$as_ac_var=yes"
11450else
11451 echo "$as_me: failed program was:" >&5
11452sed 's/^/| /' conftest.$ac_ext >&5
11453
11454eval "$as_ac_var=no"
11455fi
11456rm -f conftest.err conftest.$ac_objext \
11457 conftest$ac_exeext conftest.$ac_ext
11458fi
11459echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11460echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11461if test `eval echo '${'$as_ac_var'}'` = yes; then
11462 cat >>confdefs.h <<_ACEOF
11463#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11464_ACEOF
11465
11466fi
11467done
11468
5c39566f
DJ
11469 LIBS=$save_LIBS
11470 fi
3841debe
DJ
11471fi
11472
d57a3c85
TJB
11473
11474
11475
11476# Check whether --with-python or --without-python was given.
11477if test "${with_python+set}" = set; then
11478 withval="$with_python"
11479
11480else
11481 with_python=auto
11482fi;
11483echo "$as_me:$LINENO: checking whether to use python" >&5
11484echo $ECHO_N "checking whether to use python... $ECHO_C" >&6
11485echo "$as_me:$LINENO: result: $with_python" >&5
11486echo "${ECHO_T}$with_python" >&6
11487
11488if test "${with_python}" = no; then
11489 { echo "$as_me:$LINENO: WARNING: python support disabled; some features may be unavailable." >&5
11490echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11491 have_libpython=no
11492else
11493 case "${with_python}" in
11494 yes | auto)
11495 # Leave as empty, use defaults.
11496 python_includes=
11497 python_libs=
11498 ;;
11499 /*)
11500 python_includes="-I${with_python}/include"
11501 python_libs="-L${with_python}/lib"
11502 ;;
11503 *)
11504 { { echo "$as_me:$LINENO: error: invalid value for --with-python" >&5
11505echo "$as_me: error: invalid value for --with-python" >&2;}
11506 { (exit 1); exit 1; }; }
11507 ;;
11508 esac
11509
11510 save_CPPFLAGS=$CPPFLAGS
11511 CPPFLAGS="$CPPFLAGS ${python_includes}"
11512 save_LIBS=$LIBS
11513 LIBS="$LIBS ${python_libs}"
11514 have_libpython=no
11515 if test "${have_libpython}" = no; then
11516
11517 version=python2.6
11518
11519
11520 HAVE_LIBPYTHON2_6=no
11521 echo "$as_me:$LINENO: checking for ${version}" >&5
11522echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11523 save_LIBS=$LIBS
11524 LIBS="$LIBS -l${version}"
11525 cat >conftest.$ac_ext <<_ACEOF
11526/* confdefs.h. */
11527_ACEOF
11528cat confdefs.h >>conftest.$ac_ext
11529cat >>conftest.$ac_ext <<_ACEOF
11530/* end confdefs.h. */
11531#include "${version}/Python.h"
11532int
11533main ()
11534{
11535Py_Initialize ();
11536 ;
11537 return 0;
11538}
11539_ACEOF
11540rm -f conftest.$ac_objext conftest$ac_exeext
11541if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11542 (eval $ac_link) 2>conftest.er1
11543 ac_status=$?
11544 grep -v '^ *+' conftest.er1 >conftest.err
11545 rm -f conftest.er1
11546 cat conftest.err >&5
11547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11548 (exit $ac_status); } &&
11549 { ac_try='test -z "$ac_c_werror_flag"
11550 || test ! -s conftest.err'
11551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11552 (eval $ac_try) 2>&5
11553 ac_status=$?
11554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11555 (exit $ac_status); }; } &&
11556 { ac_try='test -s conftest$ac_exeext'
11557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11558 (eval $ac_try) 2>&5
11559 ac_status=$?
11560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11561 (exit $ac_status); }; }; then
11562 HAVE_LIBPYTHON2_6=yes
11563 have_libpython=yes
11564else
11565 echo "$as_me: failed program was:" >&5
11566sed 's/^/| /' conftest.$ac_ext >&5
11567
11568LIBS=$save_LIBS
11569fi
11570rm -f conftest.err conftest.$ac_objext \
11571 conftest$ac_exeext conftest.$ac_ext
11572 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_6" >&5
11573echo "${ECHO_T}$HAVE_LIBPYTHON2_6" >&6
11574
11575 if test "${HAVE_LIBPYTHON2_6}" = yes; then
11576
11577cat >>confdefs.h <<\_ACEOF
11578#define HAVE_LIBPYTHON2_6 1
11579_ACEOF
11580
11581 fi
11582 fi
11583 if test ${have_libpython} = no; then
11584
11585 version=python2.5
11586
11587
11588 HAVE_LIBPYTHON2_5=no
11589 echo "$as_me:$LINENO: checking for ${version}" >&5
11590echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11591 save_LIBS=$LIBS
11592 LIBS="$LIBS -l${version}"
11593 cat >conftest.$ac_ext <<_ACEOF
11594/* confdefs.h. */
11595_ACEOF
11596cat confdefs.h >>conftest.$ac_ext
11597cat >>conftest.$ac_ext <<_ACEOF
11598/* end confdefs.h. */
11599#include "${version}/Python.h"
11600int
11601main ()
11602{
11603Py_Initialize ();
11604 ;
11605 return 0;
11606}
11607_ACEOF
11608rm -f conftest.$ac_objext conftest$ac_exeext
11609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11610 (eval $ac_link) 2>conftest.er1
11611 ac_status=$?
11612 grep -v '^ *+' conftest.er1 >conftest.err
11613 rm -f conftest.er1
11614 cat conftest.err >&5
11615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11616 (exit $ac_status); } &&
11617 { ac_try='test -z "$ac_c_werror_flag"
11618 || test ! -s conftest.err'
11619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11620 (eval $ac_try) 2>&5
11621 ac_status=$?
11622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11623 (exit $ac_status); }; } &&
11624 { ac_try='test -s conftest$ac_exeext'
11625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11626 (eval $ac_try) 2>&5
11627 ac_status=$?
11628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11629 (exit $ac_status); }; }; then
11630 HAVE_LIBPYTHON2_5=yes
11631 have_libpython=yes
11632else
11633 echo "$as_me: failed program was:" >&5
11634sed 's/^/| /' conftest.$ac_ext >&5
11635
11636LIBS=$save_LIBS
11637fi
11638rm -f conftest.err conftest.$ac_objext \
11639 conftest$ac_exeext conftest.$ac_ext
11640 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_5" >&5
11641echo "${ECHO_T}$HAVE_LIBPYTHON2_5" >&6
11642
11643 if test "${HAVE_LIBPYTHON2_5}" = yes; then
11644
11645cat >>confdefs.h <<\_ACEOF
11646#define HAVE_LIBPYTHON2_5 1
11647_ACEOF
11648
11649 fi
11650 fi
11651 if test ${have_libpython} = no; then
11652
11653 version=python2.4
11654
11655
11656 HAVE_LIBPYTHON2_4=no
11657 echo "$as_me:$LINENO: checking for ${version}" >&5
11658echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11659 save_LIBS=$LIBS
11660 LIBS="$LIBS -l${version}"
11661 cat >conftest.$ac_ext <<_ACEOF
11662/* confdefs.h. */
11663_ACEOF
11664cat confdefs.h >>conftest.$ac_ext
11665cat >>conftest.$ac_ext <<_ACEOF
11666/* end confdefs.h. */
11667#include "${version}/Python.h"
11668int
11669main ()
11670{
11671Py_Initialize ();
11672 ;
11673 return 0;
11674}
11675_ACEOF
11676rm -f conftest.$ac_objext conftest$ac_exeext
11677if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11678 (eval $ac_link) 2>conftest.er1
11679 ac_status=$?
11680 grep -v '^ *+' conftest.er1 >conftest.err
11681 rm -f conftest.er1
11682 cat conftest.err >&5
11683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11684 (exit $ac_status); } &&
11685 { ac_try='test -z "$ac_c_werror_flag"
11686 || test ! -s conftest.err'
11687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11688 (eval $ac_try) 2>&5
11689 ac_status=$?
11690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11691 (exit $ac_status); }; } &&
11692 { ac_try='test -s conftest$ac_exeext'
11693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11694 (eval $ac_try) 2>&5
11695 ac_status=$?
11696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11697 (exit $ac_status); }; }; then
11698 HAVE_LIBPYTHON2_4=yes
11699 have_libpython=yes
11700else
11701 echo "$as_me: failed program was:" >&5
11702sed 's/^/| /' conftest.$ac_ext >&5
11703
11704LIBS=$save_LIBS
11705fi
11706rm -f conftest.err conftest.$ac_objext \
11707 conftest$ac_exeext conftest.$ac_ext
11708 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_4" >&5
11709echo "${ECHO_T}$HAVE_LIBPYTHON2_4" >&6
11710
11711 if test "${HAVE_LIBPYTHON2_4}" = yes; then
11712
11713cat >>confdefs.h <<\_ACEOF
11714#define HAVE_LIBPYTHON2_4 1
11715_ACEOF
11716
11717 fi
11718 fi
11719 if test ${have_libpython} = no; then
11720 case "${with_python}" in
11721 yes)
11722 { { echo "$as_me:$LINENO: error: python is missing or unusable" >&5
11723echo "$as_me: error: python is missing or unusable" >&2;}
11724 { (exit 1); exit 1; }; }
11725 ;;
11726 auto)
11727 { echo "$as_me:$LINENO: WARNING: python is missing or unusable; some features may be unavailable." >&5
11728echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11729 ;;
11730 *)
11731 { { echo "$as_me:$LINENO: error: no usable python found at ${with_python}" >&5
11732echo "$as_me: error: no usable python found at ${with_python}" >&2;}
11733 { (exit 1); exit 1; }; }
11734 ;;
11735 esac
11736 CPPFLAGS=$save_CPPFLAGS
11737 LIBS=$save_LIBS
11738 fi
11739fi
11740
11741if test "${have_libpython}" = yes; then
11742
11743cat >>confdefs.h <<\_ACEOF
11744#define HAVE_PYTHON 1
11745_ACEOF
11746
11747 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11748 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11749 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11750 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11751
11752 # Flags needed to compile Python code (taken from python-config --cflags).
11753 # We cannot call python-config directly because it will output whatever was
11754 # used when compiling the Python interpreter itself, including flags which
11755 # would make the python-related objects be compiled differently from the
11756 # rest of GDB (e.g., -O2 and -fPIC).
11757 if test "${GCC}" = yes; then
11758 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11759 fi
11760
11761 if test "x${tentative_python_cflags}" != x; then
11762 echo "$as_me:$LINENO: checking compiler flags for python code" >&5
11763echo $ECHO_N "checking compiler flags for python code... $ECHO_C" >&6
11764 for flag in ${tentative_python_cflags}; do
11765 # Check that the compiler accepts it
11766 saved_CFLAGS="$CFLAGS"
11767 CFLAGS="$CFLAGS $flag"
11768 cat >conftest.$ac_ext <<_ACEOF
11769/* confdefs.h. */
11770_ACEOF
11771cat confdefs.h >>conftest.$ac_ext
11772cat >>conftest.$ac_ext <<_ACEOF
11773/* end confdefs.h. */
11774
11775int
11776main ()
11777{
11778
11779 ;
11780 return 0;
11781}
11782_ACEOF
11783rm -f conftest.$ac_objext
11784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11785 (eval $ac_compile) 2>conftest.er1
11786 ac_status=$?
11787 grep -v '^ *+' conftest.er1 >conftest.err
11788 rm -f conftest.er1
11789 cat conftest.err >&5
11790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11791 (exit $ac_status); } &&
11792 { ac_try='test -z "$ac_c_werror_flag"
11793 || test ! -s conftest.err'
11794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11795 (eval $ac_try) 2>&5
11796 ac_status=$?
11797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11798 (exit $ac_status); }; } &&
11799 { ac_try='test -s conftest.$ac_objext'
11800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11801 (eval $ac_try) 2>&5
11802 ac_status=$?
11803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11804 (exit $ac_status); }; }; then
11805 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11806else
11807 echo "$as_me: failed program was:" >&5
11808sed 's/^/| /' conftest.$ac_ext >&5
11809
11810fi
11811rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11812 CFLAGS="$saved_CFLAGS"
11813 done
11814 echo "$as_me:$LINENO: result: ${PYTHON_CFLAGS}" >&5
11815echo "${ECHO_T}${PYTHON_CFLAGS}" >&6
11816 fi
11817else
a08702d6 11818 # Even if Python support is not compiled in, we need to have these files
d57a3c85 11819 # included in order to recognize the GDB command "python".
a08702d6
TJB
11820 CONFIG_OBS="$CONFIG_OBS python.o python-value.o"
11821 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c"
d57a3c85
TJB
11822fi
11823
11824
bec39cab
AC
11825# ------------------------- #
11826# Checks for header files. #
11827# ------------------------- #
8ee53726 11828
0e5d83e3 11829
bec39cab
AC
11830
11831
11832
11833
11834ac_header_dirent=no
11835for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11836 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
b4e70030
JB
11837echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
11838echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11839if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
11840 echo $ECHO_N "(cached) $ECHO_C" >&6
11841else
11842 cat >conftest.$ac_ext <<_ACEOF
11843/* confdefs.h. */
11844_ACEOF
11845cat confdefs.h >>conftest.$ac_ext
11846cat >>conftest.$ac_ext <<_ACEOF
11847/* end confdefs.h. */
11848#include <sys/types.h>
0e5d83e3 11849#include <$ac_hdr>
bec39cab
AC
11850
11851int
11852main ()
11853{
11854if ((DIR *) 0)
11855return 0;
11856 ;
11857 return 0;
11858}
11859_ACEOF
11860rm -f conftest.$ac_objext
11861if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11862 (eval $ac_compile) 2>conftest.er1
11863 ac_status=$?
11864 grep -v '^ *+' conftest.er1 >conftest.err
11865 rm -f conftest.er1
11866 cat conftest.err >&5
11867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11868 (exit $ac_status); } &&
b4e70030
JB
11869 { ac_try='test -z "$ac_c_werror_flag"
11870 || test ! -s conftest.err'
bec39cab
AC
11871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11872 (eval $ac_try) 2>&5
11873 ac_status=$?
11874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11875 (exit $ac_status); }; } &&
11876 { ac_try='test -s conftest.$ac_objext'
11877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11878 (eval $ac_try) 2>&5
11879 ac_status=$?
11880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11881 (exit $ac_status); }; }; then
11882 eval "$as_ac_Header=yes"
11883else
11884 echo "$as_me: failed program was:" >&5
11885sed 's/^/| /' conftest.$ac_ext >&5
11886
b4e70030 11887eval "$as_ac_Header=no"
bec39cab
AC
11888fi
11889rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11890fi
b4e70030
JB
11891echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11892echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
11893if test `eval echo '${'$as_ac_Header'}'` = yes; then
11894 cat >>confdefs.h <<_ACEOF
11895#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11896_ACEOF
11897
11898ac_header_dirent=$ac_hdr; break
0e5d83e3 11899fi
0e5d83e3 11900
bec39cab
AC
11901done
11902# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11903if test $ac_header_dirent = dirent.h; then
b4e70030
JB
11904 echo "$as_me:$LINENO: checking for library containing opendir" >&5
11905echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
11906if test "${ac_cv_search_opendir+set}" = set; then
11907 echo $ECHO_N "(cached) $ECHO_C" >&6
11908else
11909 ac_func_search_save_LIBS=$LIBS
b4e70030 11910ac_cv_search_opendir=no
bec39cab
AC
11911cat >conftest.$ac_ext <<_ACEOF
11912/* confdefs.h. */
11913_ACEOF
11914cat confdefs.h >>conftest.$ac_ext
11915cat >>conftest.$ac_ext <<_ACEOF
11916/* end confdefs.h. */
0e5d83e3 11917
b4e70030 11918/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
11919#ifdef __cplusplus
11920extern "C"
11921#endif
b4e70030
JB
11922/* We use char because int might match the return type of a gcc2
11923 builtin and then its argument prototype would still apply. */
bec39cab
AC
11924char opendir ();
11925int
11926main ()
11927{
b4e70030 11928opendir ();
bec39cab
AC
11929 ;
11930 return 0;
11931}
11932_ACEOF
b4e70030 11933rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
11934if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11935 (eval $ac_link) 2>conftest.er1
11936 ac_status=$?
11937 grep -v '^ *+' conftest.er1 >conftest.err
11938 rm -f conftest.er1
11939 cat conftest.err >&5
11940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11941 (exit $ac_status); } &&
b4e70030
JB
11942 { ac_try='test -z "$ac_c_werror_flag"
11943 || test ! -s conftest.err'
bec39cab
AC
11944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11945 (eval $ac_try) 2>&5
11946 ac_status=$?
11947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11948 (exit $ac_status); }; } &&
11949 { ac_try='test -s conftest$ac_exeext'
11950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11951 (eval $ac_try) 2>&5
11952 ac_status=$?
11953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11954 (exit $ac_status); }; }; then
b4e70030 11955 ac_cv_search_opendir="none required"
bec39cab
AC
11956else
11957 echo "$as_me: failed program was:" >&5
11958sed 's/^/| /' conftest.$ac_ext >&5
11959
11960fi
bec39cab 11961rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
11962 conftest$ac_exeext conftest.$ac_ext
11963if test "$ac_cv_search_opendir" = no; then
11964 for ac_lib in dir; do
11965 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11966 cat >conftest.$ac_ext <<_ACEOF
11967/* confdefs.h. */
11968_ACEOF
11969cat confdefs.h >>conftest.$ac_ext
11970cat >>conftest.$ac_ext <<_ACEOF
11971/* end confdefs.h. */
11972
11973/* Override any gcc2 internal prototype to avoid an error. */
11974#ifdef __cplusplus
11975extern "C"
11976#endif
11977/* We use char because int might match the return type of a gcc2
11978 builtin and then its argument prototype would still apply. */
11979char opendir ();
11980int
11981main ()
11982{
11983opendir ();
11984 ;
11985 return 0;
11986}
11987_ACEOF
11988rm -f conftest.$ac_objext conftest$ac_exeext
11989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11990 (eval $ac_link) 2>conftest.er1
11991 ac_status=$?
11992 grep -v '^ *+' conftest.er1 >conftest.err
11993 rm -f conftest.er1
11994 cat conftest.err >&5
11995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11996 (exit $ac_status); } &&
11997 { ac_try='test -z "$ac_c_werror_flag"
11998 || test ! -s conftest.err'
11999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12000 (eval $ac_try) 2>&5
12001 ac_status=$?
12002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12003 (exit $ac_status); }; } &&
12004 { ac_try='test -s conftest$ac_exeext'
12005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12006 (eval $ac_try) 2>&5
12007 ac_status=$?
12008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12009 (exit $ac_status); }; }; then
12010 ac_cv_search_opendir="-l$ac_lib"
12011break
4e8d927d 12012else
b4e70030
JB
12013 echo "$as_me: failed program was:" >&5
12014sed 's/^/| /' conftest.$ac_ext >&5
12015
12016fi
12017rm -f conftest.err conftest.$ac_objext \
12018 conftest$ac_exeext conftest.$ac_ext
12019 done
0e5d83e3 12020fi
bec39cab 12021LIBS=$ac_func_search_save_LIBS
0e5d83e3 12022fi
b4e70030
JB
12023echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
12024echo "${ECHO_T}$ac_cv_search_opendir" >&6
12025if test "$ac_cv_search_opendir" != no; then
12026 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
0e5d83e3 12027
0e5d83e3
JJ
12028fi
12029
d28f9cdf 12030else
b4e70030
JB
12031 echo "$as_me:$LINENO: checking for library containing opendir" >&5
12032echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
12033if test "${ac_cv_search_opendir+set}" = set; then
12034 echo $ECHO_N "(cached) $ECHO_C" >&6
12035else
12036 ac_func_search_save_LIBS=$LIBS
b4e70030 12037ac_cv_search_opendir=no
bec39cab
AC
12038cat >conftest.$ac_ext <<_ACEOF
12039/* confdefs.h. */
12040_ACEOF
12041cat confdefs.h >>conftest.$ac_ext
12042cat >>conftest.$ac_ext <<_ACEOF
12043/* end confdefs.h. */
d28f9cdf 12044
b4e70030 12045/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
12046#ifdef __cplusplus
12047extern "C"
d28f9cdf 12048#endif
b4e70030
JB
12049/* We use char because int might match the return type of a gcc2
12050 builtin and then its argument prototype would still apply. */
bec39cab
AC
12051char opendir ();
12052int
12053main ()
12054{
b4e70030 12055opendir ();
bec39cab
AC
12056 ;
12057 return 0;
12058}
12059_ACEOF
b4e70030 12060rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
12061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12062 (eval $ac_link) 2>conftest.er1
12063 ac_status=$?
12064 grep -v '^ *+' conftest.er1 >conftest.err
12065 rm -f conftest.er1
12066 cat conftest.err >&5
12067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12068 (exit $ac_status); } &&
b4e70030
JB
12069 { ac_try='test -z "$ac_c_werror_flag"
12070 || test ! -s conftest.err'
bec39cab
AC
12071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12072 (eval $ac_try) 2>&5
12073 ac_status=$?
12074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12075 (exit $ac_status); }; } &&
12076 { ac_try='test -s conftest$ac_exeext'
12077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12078 (eval $ac_try) 2>&5
12079 ac_status=$?
12080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12081 (exit $ac_status); }; }; then
b4e70030 12082 ac_cv_search_opendir="none required"
d28f9cdf 12083else
bec39cab
AC
12084 echo "$as_me: failed program was:" >&5
12085sed 's/^/| /' conftest.$ac_ext >&5
12086
d28f9cdf 12087fi
bec39cab 12088rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
12089 conftest$ac_exeext conftest.$ac_ext
12090if test "$ac_cv_search_opendir" = no; then
12091 for ac_lib in x; do
12092 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12093 cat >conftest.$ac_ext <<_ACEOF
12094/* confdefs.h. */
12095_ACEOF
12096cat confdefs.h >>conftest.$ac_ext
12097cat >>conftest.$ac_ext <<_ACEOF
12098/* end confdefs.h. */
12099
12100/* Override any gcc2 internal prototype to avoid an error. */
12101#ifdef __cplusplus
12102extern "C"
12103#endif
12104/* We use char because int might match the return type of a gcc2
12105 builtin and then its argument prototype would still apply. */
12106char opendir ();
12107int
12108main ()
12109{
12110opendir ();
12111 ;
12112 return 0;
12113}
12114_ACEOF
12115rm -f conftest.$ac_objext conftest$ac_exeext
12116if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12117 (eval $ac_link) 2>conftest.er1
12118 ac_status=$?
12119 grep -v '^ *+' conftest.er1 >conftest.err
12120 rm -f conftest.er1
12121 cat conftest.err >&5
12122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12123 (exit $ac_status); } &&
12124 { ac_try='test -z "$ac_c_werror_flag"
12125 || test ! -s conftest.err'
12126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12127 (eval $ac_try) 2>&5
12128 ac_status=$?
12129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12130 (exit $ac_status); }; } &&
12131 { ac_try='test -s conftest$ac_exeext'
12132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12133 (eval $ac_try) 2>&5
12134 ac_status=$?
12135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12136 (exit $ac_status); }; }; then
12137 ac_cv_search_opendir="-l$ac_lib"
12138break
4e8d927d 12139else
b4e70030
JB
12140 echo "$as_me: failed program was:" >&5
12141sed 's/^/| /' conftest.$ac_ext >&5
12142
12143fi
12144rm -f conftest.err conftest.$ac_objext \
12145 conftest$ac_exeext conftest.$ac_ext
12146 done
bec39cab
AC
12147fi
12148LIBS=$ac_func_search_save_LIBS
d28f9cdf 12149fi
b4e70030
JB
12150echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
12151echo "${ECHO_T}$ac_cv_search_opendir" >&6
12152if test "$ac_cv_search_opendir" != no; then
12153 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
d28f9cdf 12154
d28f9cdf
DJ
12155fi
12156
bec39cab 12157fi
b0b1c2c0 12158
b4e70030
JB
12159echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
12160echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
bec39cab
AC
12161if test "${ac_cv_header_stat_broken+set}" = set; then
12162 echo $ECHO_N "(cached) $ECHO_C" >&6
b0b1c2c0 12163else
bec39cab
AC
12164 cat >conftest.$ac_ext <<_ACEOF
12165/* confdefs.h. */
12166_ACEOF
12167cat confdefs.h >>conftest.$ac_ext
12168cat >>conftest.$ac_ext <<_ACEOF
12169/* end confdefs.h. */
12170#include <sys/types.h>
12171#include <sys/stat.h>
b0b1c2c0 12172
b4e70030 12173#if defined(S_ISBLK) && defined(S_IFDIR)
bec39cab
AC
12174# if S_ISBLK (S_IFDIR)
12175You lose.
12176# endif
12177#endif
b0b1c2c0 12178
b4e70030 12179#if defined(S_ISBLK) && defined(S_IFCHR)
bec39cab
AC
12180# if S_ISBLK (S_IFCHR)
12181You lose.
12182# endif
12183#endif
d28f9cdf 12184
b4e70030 12185#if defined(S_ISLNK) && defined(S_IFREG)
bec39cab
AC
12186# if S_ISLNK (S_IFREG)
12187You lose.
12188# endif
12189#endif
d28f9cdf 12190
b4e70030 12191#if defined(S_ISSOCK) && defined(S_IFREG)
bec39cab
AC
12192# if S_ISSOCK (S_IFREG)
12193You lose.
12194# endif
12195#endif
12196
12197_ACEOF
12198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12199 $EGREP "You lose" >/dev/null 2>&1; then
12200 ac_cv_header_stat_broken=yes
d28f9cdf 12201else
bec39cab 12202 ac_cv_header_stat_broken=no
d28f9cdf
DJ
12203fi
12204rm -f conftest*
d28f9cdf 12205
d28f9cdf 12206fi
b4e70030
JB
12207echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
12208echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
bec39cab 12209if test $ac_cv_header_stat_broken = yes; then
d28f9cdf 12210
bec39cab
AC
12211cat >>confdefs.h <<\_ACEOF
12212#define STAT_MACROS_BROKEN 1
12213_ACEOF
8bb2c122 12214
7a292a7a 12215fi
bec39cab 12216
b4e70030
JB
12217echo "$as_me:$LINENO: checking for ANSI C header files" >&5
12218echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
bec39cab
AC
12219if test "${ac_cv_header_stdc+set}" = set; then
12220 echo $ECHO_N "(cached) $ECHO_C" >&6
7a292a7a 12221else
bec39cab
AC
12222 cat >conftest.$ac_ext <<_ACEOF
12223/* confdefs.h. */
12224_ACEOF
12225cat confdefs.h >>conftest.$ac_ext
12226cat >>conftest.$ac_ext <<_ACEOF
12227/* end confdefs.h. */
12228#include <stdlib.h>
12229#include <stdarg.h>
12230#include <string.h>
12231#include <float.h>
7a292a7a 12232
bec39cab
AC
12233int
12234main ()
12235{
7a292a7a 12236
bec39cab
AC
12237 ;
12238 return 0;
12239}
12240_ACEOF
12241rm -f conftest.$ac_objext
12242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12243 (eval $ac_compile) 2>conftest.er1
12244 ac_status=$?
12245 grep -v '^ *+' conftest.er1 >conftest.err
12246 rm -f conftest.er1
12247 cat conftest.err >&5
12248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12249 (exit $ac_status); } &&
b4e70030
JB
12250 { ac_try='test -z "$ac_c_werror_flag"
12251 || test ! -s conftest.err'
bec39cab
AC
12252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12253 (eval $ac_try) 2>&5
12254 ac_status=$?
12255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12256 (exit $ac_status); }; } &&
12257 { ac_try='test -s conftest.$ac_objext'
12258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12259 (eval $ac_try) 2>&5
12260 ac_status=$?
12261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12262 (exit $ac_status); }; }; then
12263 ac_cv_header_stdc=yes
c906108c 12264else
bec39cab
AC
12265 echo "$as_me: failed program was:" >&5
12266sed 's/^/| /' conftest.$ac_ext >&5
c906108c 12267
b4e70030 12268ac_cv_header_stdc=no
c906108c 12269fi
bec39cab 12270rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12271
bec39cab
AC
12272if test $ac_cv_header_stdc = yes; then
12273 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12274 cat >conftest.$ac_ext <<_ACEOF
12275/* confdefs.h. */
12276_ACEOF
12277cat confdefs.h >>conftest.$ac_ext
12278cat >>conftest.$ac_ext <<_ACEOF
12279/* end confdefs.h. */
12280#include <string.h>
c906108c 12281
bec39cab
AC
12282_ACEOF
12283if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12284 $EGREP "memchr" >/dev/null 2>&1; then
12285 :
8bb2c122 12286else
bec39cab 12287 ac_cv_header_stdc=no
8bb2c122 12288fi
bec39cab
AC
12289rm -f conftest*
12290
c906108c
SS
12291fi
12292
bec39cab
AC
12293if test $ac_cv_header_stdc = yes; then
12294 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12295 cat >conftest.$ac_ext <<_ACEOF
12296/* confdefs.h. */
12297_ACEOF
12298cat confdefs.h >>conftest.$ac_ext
12299cat >>conftest.$ac_ext <<_ACEOF
12300/* end confdefs.h. */
12301#include <stdlib.h>
12302
12303_ACEOF
12304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12305 $EGREP "free" >/dev/null 2>&1; then
12306 :
c906108c 12307else
bec39cab 12308 ac_cv_header_stdc=no
c906108c 12309fi
bec39cab
AC
12310rm -f conftest*
12311
c906108c
SS
12312fi
12313
bec39cab
AC
12314if test $ac_cv_header_stdc = yes; then
12315 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12316 if test "$cross_compiling" = yes; then
12317 :
c906108c 12318else
bec39cab
AC
12319 cat >conftest.$ac_ext <<_ACEOF
12320/* confdefs.h. */
12321_ACEOF
12322cat confdefs.h >>conftest.$ac_ext
12323cat >>conftest.$ac_ext <<_ACEOF
12324/* end confdefs.h. */
12325#include <ctype.h>
12326#if ((' ' & 0x0FF) == 0x020)
12327# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12328# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12329#else
12330# define ISLOWER(c) \
12331 (('a' <= (c) && (c) <= 'i') \
12332 || ('j' <= (c) && (c) <= 'r') \
12333 || ('s' <= (c) && (c) <= 'z'))
12334# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12335#endif
12336
12337#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12338int
12339main ()
12340{
12341 int i;
12342 for (i = 0; i < 256; i++)
12343 if (XOR (islower (i), ISLOWER (i))
12344 || toupper (i) != TOUPPER (i))
b4e70030
JB
12345 exit(2);
12346 exit (0);
bec39cab
AC
12347}
12348_ACEOF
12349rm -f conftest$ac_exeext
12350if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12351 (eval $ac_link) 2>&5
12352 ac_status=$?
12353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12354 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12356 (eval $ac_try) 2>&5
12357 ac_status=$?
12358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12359 (exit $ac_status); }; }; then
12360 :
12361else
12362 echo "$as_me: program exited with status $ac_status" >&5
12363echo "$as_me: failed program was:" >&5
12364sed 's/^/| /' conftest.$ac_ext >&5
12365
12366( exit $ac_status )
12367ac_cv_header_stdc=no
c906108c 12368fi
b4e70030 12369rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 12370fi
c906108c 12371fi
bec39cab 12372fi
b4e70030
JB
12373echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
12374echo "${ECHO_T}$ac_cv_header_stdc" >&6
bec39cab 12375if test $ac_cv_header_stdc = yes; then
c906108c 12376
bec39cab
AC
12377cat >>confdefs.h <<\_ACEOF
12378#define STDC_HEADERS 1
12379_ACEOF
c906108c 12380
bec39cab 12381fi
8bb2c122 12382
a9322a30
TT
12383# elf_hp.h is for HP/UX 64-bit shared library support.
12384# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
12385# unconditionally, so what's the point in checking these?
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
bec39cab 12403
a9322a30
TT
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
a8111142 12420
a9322a30
TT
12421
12422
12423for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12424 thread_db.h gnu/libc-version.h signal.h stddef.h \
12425 stdlib.h string.h memory.h strings.h sys/fault.h \
12426 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12427 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12428 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
12429 sys/types.h sys/wait.h wait.h termios.h termio.h \
a8111142 12430 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
bec39cab
AC
12431do
12432as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12433if eval "test \"\${$as_ac_Header+set}\" = set"; then
12434 echo "$as_me:$LINENO: checking for $ac_header" >&5
12435echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12436if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
12437 echo $ECHO_N "(cached) $ECHO_C" >&6
12438fi
b4e70030
JB
12439echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12440echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12441else
12442 # Is the header compilable?
b4e70030
JB
12443echo "$as_me:$LINENO: checking $ac_header usability" >&5
12444echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
12445cat >conftest.$ac_ext <<_ACEOF
12446/* confdefs.h. */
12447_ACEOF
12448cat confdefs.h >>conftest.$ac_ext
12449cat >>conftest.$ac_ext <<_ACEOF
12450/* end confdefs.h. */
12451$ac_includes_default
12452#include <$ac_header>
12453_ACEOF
12454rm -f conftest.$ac_objext
12455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12456 (eval $ac_compile) 2>conftest.er1
12457 ac_status=$?
12458 grep -v '^ *+' conftest.er1 >conftest.err
12459 rm -f conftest.er1
12460 cat conftest.err >&5
12461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12462 (exit $ac_status); } &&
b4e70030
JB
12463 { ac_try='test -z "$ac_c_werror_flag"
12464 || test ! -s conftest.err'
bec39cab
AC
12465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12466 (eval $ac_try) 2>&5
12467 ac_status=$?
12468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12469 (exit $ac_status); }; } &&
12470 { ac_try='test -s conftest.$ac_objext'
12471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12472 (eval $ac_try) 2>&5
12473 ac_status=$?
12474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12475 (exit $ac_status); }; }; then
12476 ac_header_compiler=yes
12477else
12478 echo "$as_me: failed program was:" >&5
12479sed 's/^/| /' conftest.$ac_ext >&5
12480
b4e70030 12481ac_header_compiler=no
bec39cab
AC
12482fi
12483rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
12484echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12485echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
12486
12487# Is the header present?
b4e70030
JB
12488echo "$as_me:$LINENO: checking $ac_header presence" >&5
12489echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
12490cat >conftest.$ac_ext <<_ACEOF
12491/* confdefs.h. */
12492_ACEOF
12493cat confdefs.h >>conftest.$ac_ext
12494cat >>conftest.$ac_ext <<_ACEOF
12495/* end confdefs.h. */
12496#include <$ac_header>
12497_ACEOF
12498if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12499 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12500 ac_status=$?
12501 grep -v '^ *+' conftest.er1 >conftest.err
12502 rm -f conftest.er1
12503 cat conftest.err >&5
12504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12505 (exit $ac_status); } >/dev/null; then
12506 if test -s conftest.err; then
12507 ac_cpp_err=$ac_c_preproc_warn_flag
12508 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12509 else
12510 ac_cpp_err=
12511 fi
c906108c 12512else
bec39cab 12513 ac_cpp_err=yes
c906108c 12514fi
bec39cab
AC
12515if test -z "$ac_cpp_err"; then
12516 ac_header_preproc=yes
c906108c 12517else
bec39cab
AC
12518 echo "$as_me: failed program was:" >&5
12519sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 12520
bec39cab
AC
12521 ac_header_preproc=no
12522fi
12523rm -f conftest.err conftest.$ac_ext
b4e70030
JB
12524echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12525echo "${ECHO_T}$ac_header_preproc" >&6
c906108c 12526
bec39cab
AC
12527# So? What about this header?
12528case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12529 yes:no: )
12530 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12531echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12532 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12533echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12534 ac_header_preproc=yes
12535 ;;
12536 no:yes:* )
12537 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12538echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12539 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12540echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12541 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12542echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12543 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12544echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12545 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12546echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12547 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12548echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
12549 (
12550 cat <<\_ASBOX
12551## ------------------------------------------ ##
12552## Report this to the AC_PACKAGE_NAME lists. ##
12553## ------------------------------------------ ##
12554_ASBOX
12555 ) |
12556 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
12557 ;;
12558esac
b4e70030
JB
12559echo "$as_me:$LINENO: checking for $ac_header" >&5
12560echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12561if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12562 echo $ECHO_N "(cached) $ECHO_C" >&6
95ca63c4 12563else
bec39cab 12564 eval "$as_ac_Header=\$ac_header_preproc"
95ca63c4 12565fi
b4e70030
JB
12566echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12567echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 12568
95ca63c4 12569fi
bec39cab
AC
12570if test `eval echo '${'$as_ac_Header'}'` = yes; then
12571 cat >>confdefs.h <<_ACEOF
12572#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12573_ACEOF
12574
95ca63c4
CF
12575fi
12576
bec39cab 12577done
95ca63c4
CF
12578
12579
7cb9022a 12580for ac_header in link.h
bec39cab
AC
12581do
12582as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12583echo "$as_me:$LINENO: checking for $ac_header" >&5
12584echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12585if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12586 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12587else
7cb9022a 12588 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12589/* confdefs.h. */
12590_ACEOF
12591cat confdefs.h >>conftest.$ac_ext
12592cat >>conftest.$ac_ext <<_ACEOF
12593/* end confdefs.h. */
7cb9022a
MK
12594#if HAVE_SYS_TYPES_H
12595# include <sys/types.h>
12596#endif
12597#if HAVE_NLIST_H
12598# include <nlist.h>
12599#endif
12600
12601
bec39cab
AC
12602#include <$ac_header>
12603_ACEOF
12604rm -f conftest.$ac_objext
12605if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12606 (eval $ac_compile) 2>conftest.er1
12607 ac_status=$?
12608 grep -v '^ *+' conftest.er1 >conftest.err
12609 rm -f conftest.er1
12610 cat conftest.err >&5
12611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12612 (exit $ac_status); } &&
b4e70030
JB
12613 { ac_try='test -z "$ac_c_werror_flag"
12614 || test ! -s conftest.err'
bec39cab
AC
12615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12616 (eval $ac_try) 2>&5
12617 ac_status=$?
12618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12619 (exit $ac_status); }; } &&
12620 { ac_try='test -s conftest.$ac_objext'
12621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12622 (eval $ac_try) 2>&5
12623 ac_status=$?
12624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12625 (exit $ac_status); }; }; then
7cb9022a 12626 eval "$as_ac_Header=yes"
bec39cab
AC
12627else
12628 echo "$as_me: failed program was:" >&5
12629sed 's/^/| /' conftest.$ac_ext >&5
12630
b4e70030 12631eval "$as_ac_Header=no"
bec39cab
AC
12632fi
12633rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12634fi
b4e70030
JB
12635echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12636echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12637if test `eval echo '${'$as_ac_Header'}'` = yes; then
12638 cat >>confdefs.h <<_ACEOF
12639#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12640_ACEOF
95ca63c4 12641
bec39cab 12642fi
95ca63c4 12643
bec39cab 12644done
95ca63c4 12645
c906108c 12646
a9322a30 12647for ac_header in sys/proc.h
bec39cab
AC
12648do
12649as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a9322a30 12650echo "$as_me:$LINENO: checking for $ac_header" >&5
b4e70030
JB
12651echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12652if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12653 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12654else
a9322a30 12655 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12656/* confdefs.h. */
12657_ACEOF
12658cat confdefs.h >>conftest.$ac_ext
12659cat >>conftest.$ac_ext <<_ACEOF
12660/* end confdefs.h. */
a9322a30
TT
12661#if HAVE_SYS_PARAM_H
12662# include <sys/param.h>
12663#endif
12664
12665
bec39cab
AC
12666#include <$ac_header>
12667_ACEOF
12668rm -f conftest.$ac_objext
12669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12670 (eval $ac_compile) 2>conftest.er1
12671 ac_status=$?
12672 grep -v '^ *+' conftest.er1 >conftest.err
12673 rm -f conftest.er1
12674 cat conftest.err >&5
12675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12676 (exit $ac_status); } &&
b4e70030
JB
12677 { ac_try='test -z "$ac_c_werror_flag"
12678 || test ! -s conftest.err'
bec39cab
AC
12679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12680 (eval $ac_try) 2>&5
12681 ac_status=$?
12682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12683 (exit $ac_status); }; } &&
12684 { ac_try='test -s conftest.$ac_objext'
12685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12686 (eval $ac_try) 2>&5
12687 ac_status=$?
12688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12689 (exit $ac_status); }; }; then
a9322a30 12690 eval "$as_ac_Header=yes"
bec39cab
AC
12691else
12692 echo "$as_me: failed program was:" >&5
12693sed 's/^/| /' conftest.$ac_ext >&5
12694
a9322a30 12695eval "$as_ac_Header=no"
bec39cab
AC
12696fi
12697rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12698fi
12699echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12700echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12701if test `eval echo '${'$as_ac_Header'}'` = yes; then
12702 cat >>confdefs.h <<_ACEOF
12703#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12704_ACEOF
bec39cab 12705
a9322a30
TT
12706fi
12707
12708done
12709
12710
12711for ac_header in sys/user.h
12712do
12713as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12714echo "$as_me:$LINENO: checking for $ac_header" >&5
12715echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12716if eval "test \"\${$as_ac_Header+set}\" = set"; then
12717 echo $ECHO_N "(cached) $ECHO_C" >&6
12718else
12719 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12720/* confdefs.h. */
12721_ACEOF
12722cat confdefs.h >>conftest.$ac_ext
12723cat >>conftest.$ac_ext <<_ACEOF
12724/* end confdefs.h. */
a9322a30
TT
12725#if HAVE_SYS_PARAM_H
12726# include <sys/param.h>
12727#endif
12728
12729
bec39cab
AC
12730#include <$ac_header>
12731_ACEOF
a9322a30
TT
12732rm -f conftest.$ac_objext
12733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12734 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
12735 ac_status=$?
12736 grep -v '^ *+' conftest.er1 >conftest.err
12737 rm -f conftest.er1
12738 cat conftest.err >&5
12739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
12740 (exit $ac_status); } &&
12741 { ac_try='test -z "$ac_c_werror_flag"
12742 || test ! -s conftest.err'
12743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12744 (eval $ac_try) 2>&5
12745 ac_status=$?
12746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747 (exit $ac_status); }; } &&
12748 { ac_try='test -s conftest.$ac_objext'
12749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12750 (eval $ac_try) 2>&5
12751 ac_status=$?
12752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12753 (exit $ac_status); }; }; then
12754 eval "$as_ac_Header=yes"
bec39cab
AC
12755else
12756 echo "$as_me: failed program was:" >&5
12757sed 's/^/| /' conftest.$ac_ext >&5
12758
a9322a30 12759eval "$as_ac_Header=no"
75c6e08a 12760fi
a9322a30
TT
12761rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12762fi
12763echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12764echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12765if test `eval echo '${'$as_ac_Header'}'` = yes; then
12766 cat >>confdefs.h <<_ACEOF
12767#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12768_ACEOF
bec39cab 12769
bec39cab 12770fi
bec39cab 12771
a9322a30
TT
12772done
12773
12774
12775# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
12776# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
12777# think that we don't have <curses.h> if we're using GCC.
12778case $host_os in
12779 solaris2.[789])
12780 if test "$GCC" = yes; then
12781
12782cat >>confdefs.h <<\_ACEOF
12783#define _MSE_INT_H 1
bec39cab 12784_ACEOF
75c6e08a 12785
a9322a30
TT
12786 fi ;;
12787esac
12788
75c6e08a
MK
12789
12790
12791
9a156167 12792
a9322a30 12793for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
bec39cab
AC
12794do
12795as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12796if eval "test \"\${$as_ac_Header+set}\" = set"; then
12797 echo "$as_me:$LINENO: checking for $ac_header" >&5
12798echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12799if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
12800 echo $ECHO_N "(cached) $ECHO_C" >&6
12801fi
b4e70030
JB
12802echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12803echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12804else
12805 # Is the header compilable?
b4e70030
JB
12806echo "$as_me:$LINENO: checking $ac_header usability" >&5
12807echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
12808cat >conftest.$ac_ext <<_ACEOF
12809/* confdefs.h. */
12810_ACEOF
12811cat confdefs.h >>conftest.$ac_ext
12812cat >>conftest.$ac_ext <<_ACEOF
12813/* end confdefs.h. */
12814$ac_includes_default
12815#include <$ac_header>
12816_ACEOF
12817rm -f conftest.$ac_objext
12818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12819 (eval $ac_compile) 2>conftest.er1
12820 ac_status=$?
12821 grep -v '^ *+' conftest.er1 >conftest.err
12822 rm -f conftest.er1
12823 cat conftest.err >&5
12824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12825 (exit $ac_status); } &&
b4e70030
JB
12826 { ac_try='test -z "$ac_c_werror_flag"
12827 || test ! -s conftest.err'
bec39cab
AC
12828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12829 (eval $ac_try) 2>&5
12830 ac_status=$?
12831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12832 (exit $ac_status); }; } &&
12833 { ac_try='test -s conftest.$ac_objext'
12834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12835 (eval $ac_try) 2>&5
12836 ac_status=$?
12837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12838 (exit $ac_status); }; }; then
12839 ac_header_compiler=yes
12840else
12841 echo "$as_me: failed program was:" >&5
12842sed 's/^/| /' conftest.$ac_ext >&5
12843
b4e70030 12844ac_header_compiler=no
bec39cab
AC
12845fi
12846rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
12847echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12848echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
12849
12850# Is the header present?
b4e70030
JB
12851echo "$as_me:$LINENO: checking $ac_header presence" >&5
12852echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
12853cat >conftest.$ac_ext <<_ACEOF
12854/* confdefs.h. */
12855_ACEOF
12856cat confdefs.h >>conftest.$ac_ext
12857cat >>conftest.$ac_ext <<_ACEOF
12858/* end confdefs.h. */
12859#include <$ac_header>
12860_ACEOF
12861if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12862 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12863 ac_status=$?
12864 grep -v '^ *+' conftest.er1 >conftest.err
12865 rm -f conftest.er1
12866 cat conftest.err >&5
12867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12868 (exit $ac_status); } >/dev/null; then
12869 if test -s conftest.err; then
12870 ac_cpp_err=$ac_c_preproc_warn_flag
12871 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12872 else
12873 ac_cpp_err=
12874 fi
9a156167 12875else
bec39cab 12876 ac_cpp_err=yes
9a156167 12877fi
bec39cab
AC
12878if test -z "$ac_cpp_err"; then
12879 ac_header_preproc=yes
12880else
12881 echo "$as_me: failed program was:" >&5
12882sed 's/^/| /' conftest.$ac_ext >&5
9a156167 12883
bec39cab 12884 ac_header_preproc=no
9a156167 12885fi
bec39cab 12886rm -f conftest.err conftest.$ac_ext
b4e70030
JB
12887echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12888echo "${ECHO_T}$ac_header_preproc" >&6
9a156167 12889
bec39cab
AC
12890# So? What about this header?
12891case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12892 yes:no: )
12893 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12894echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12895 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12896echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12897 ac_header_preproc=yes
12898 ;;
12899 no:yes:* )
12900 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12901echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12902 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12903echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12904 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12905echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12906 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12907echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12908 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12909echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12910 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12911echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
12912 (
12913 cat <<\_ASBOX
12914## ------------------------------------------ ##
12915## Report this to the AC_PACKAGE_NAME lists. ##
12916## ------------------------------------------ ##
12917_ASBOX
12918 ) |
12919 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
12920 ;;
12921esac
b4e70030
JB
12922echo "$as_me:$LINENO: checking for $ac_header" >&5
12923echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12924if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12925 echo $ECHO_N "(cached) $ECHO_C" >&6
9a156167 12926else
bec39cab 12927 eval "$as_ac_Header=\$ac_header_preproc"
9a156167 12928fi
b4e70030
JB
12929echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12930echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9a156167 12931
bec39cab
AC
12932fi
12933if test `eval echo '${'$as_ac_Header'}'` = yes; then
12934 cat >>confdefs.h <<_ACEOF
12935#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12936_ACEOF
9a156167 12937
bec39cab 12938fi
9a156167 12939
bec39cab 12940done
9a156167 12941
9a156167 12942
a9322a30 12943for ac_header in term.h
bec39cab
AC
12944do
12945as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a9322a30 12946echo "$as_me:$LINENO: checking for $ac_header" >&5
b4e70030
JB
12947echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12948if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12949 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12950else
a9322a30 12951 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12952/* confdefs.h. */
12953_ACEOF
12954cat confdefs.h >>conftest.$ac_ext
12955cat >>conftest.$ac_ext <<_ACEOF
436868fb 12956/* end confdefs.h. */
a9322a30
TT
12957#if HAVE_CURSES_H
12958# include <curses.h>
12959#endif
12960
12961
436868fb
DP
12962#include <$ac_header>
12963_ACEOF
12964rm -f conftest.$ac_objext
12965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12966 (eval $ac_compile) 2>conftest.er1
12967 ac_status=$?
12968 grep -v '^ *+' conftest.er1 >conftest.err
12969 rm -f conftest.er1
12970 cat conftest.err >&5
12971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12972 (exit $ac_status); } &&
12973 { ac_try='test -z "$ac_c_werror_flag"
12974 || test ! -s conftest.err'
12975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12976 (eval $ac_try) 2>&5
12977 ac_status=$?
12978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12979 (exit $ac_status); }; } &&
12980 { ac_try='test -s conftest.$ac_objext'
12981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12982 (eval $ac_try) 2>&5
12983 ac_status=$?
12984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12985 (exit $ac_status); }; }; then
a9322a30 12986 eval "$as_ac_Header=yes"
436868fb
DP
12987else
12988 echo "$as_me: failed program was:" >&5
12989sed 's/^/| /' conftest.$ac_ext >&5
12990
a9322a30 12991eval "$as_ac_Header=no"
436868fb
DP
12992fi
12993rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12994fi
12995echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12996echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12997if test `eval echo '${'$as_ac_Header'}'` = yes; then
12998 cat >>confdefs.h <<_ACEOF
12999#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13000_ACEOF
436868fb 13001
a9322a30
TT
13002fi
13003
13004done
13005
13006
13007# ------------------------- #
13008# Checks for declarations. #
13009# ------------------------- #
13010
13011echo "$as_me:$LINENO: checking whether free is declared" >&5
13012echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
13013if test "${ac_cv_have_decl_free+set}" = set; then
13014 echo $ECHO_N "(cached) $ECHO_C" >&6
13015else
13016 cat >conftest.$ac_ext <<_ACEOF
436868fb
DP
13017/* confdefs.h. */
13018_ACEOF
13019cat confdefs.h >>conftest.$ac_ext
13020cat >>conftest.$ac_ext <<_ACEOF
13021/* end confdefs.h. */
a9322a30
TT
13022$ac_includes_default
13023int
13024main ()
13025{
13026#ifndef free
13027 char *p = (char *) free;
13028#endif
13029
13030 ;
13031 return 0;
13032}
436868fb 13033_ACEOF
a9322a30
TT
13034rm -f conftest.$ac_objext
13035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13036 (eval $ac_compile) 2>conftest.er1
436868fb
DP
13037 ac_status=$?
13038 grep -v '^ *+' conftest.er1 >conftest.err
13039 rm -f conftest.er1
13040 cat conftest.err >&5
13041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13042 (exit $ac_status); } &&
13043 { ac_try='test -z "$ac_c_werror_flag"
13044 || test ! -s conftest.err'
13045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13046 (eval $ac_try) 2>&5
13047 ac_status=$?
13048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13049 (exit $ac_status); }; } &&
13050 { ac_try='test -s conftest.$ac_objext'
13051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13052 (eval $ac_try) 2>&5
13053 ac_status=$?
13054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13055 (exit $ac_status); }; }; then
13056 ac_cv_have_decl_free=yes
436868fb
DP
13057else
13058 echo "$as_me: failed program was:" >&5
13059sed 's/^/| /' conftest.$ac_ext >&5
13060
a9322a30 13061ac_cv_have_decl_free=no
436868fb 13062fi
a9322a30 13063rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
436868fb 13064fi
a9322a30
TT
13065echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
13066echo "${ECHO_T}$ac_cv_have_decl_free" >&6
13067if test $ac_cv_have_decl_free = yes; then
436868fb 13068
a9322a30
TT
13069cat >>confdefs.h <<_ACEOF
13070#define HAVE_DECL_FREE 1
436868fb
DP
13071_ACEOF
13072
436868fb 13073
a9322a30
TT
13074else
13075 cat >>confdefs.h <<_ACEOF
13076#define HAVE_DECL_FREE 0
13077_ACEOF
436868fb
DP
13078
13079
436868fb 13080fi
a9322a30
TT
13081echo "$as_me:$LINENO: checking whether malloc is declared" >&5
13082echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
13083if test "${ac_cv_have_decl_malloc+set}" = set; then
13084 echo $ECHO_N "(cached) $ECHO_C" >&6
436868fb 13085else
a9322a30 13086 cat >conftest.$ac_ext <<_ACEOF
436868fb
DP
13087/* confdefs.h. */
13088_ACEOF
13089cat confdefs.h >>conftest.$ac_ext
13090cat >>conftest.$ac_ext <<_ACEOF
bec39cab
AC
13091/* end confdefs.h. */
13092$ac_includes_default
a9322a30
TT
13093int
13094main ()
13095{
13096#ifndef malloc
13097 char *p = (char *) malloc;
13098#endif
13099
13100 ;
13101 return 0;
13102}
bec39cab
AC
13103_ACEOF
13104rm -f conftest.$ac_objext
13105if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13106 (eval $ac_compile) 2>conftest.er1
13107 ac_status=$?
13108 grep -v '^ *+' conftest.er1 >conftest.err
13109 rm -f conftest.er1
13110 cat conftest.err >&5
13111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13112 (exit $ac_status); } &&
b4e70030
JB
13113 { ac_try='test -z "$ac_c_werror_flag"
13114 || test ! -s conftest.err'
bec39cab
AC
13115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13116 (eval $ac_try) 2>&5
13117 ac_status=$?
13118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13119 (exit $ac_status); }; } &&
13120 { ac_try='test -s conftest.$ac_objext'
13121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13122 (eval $ac_try) 2>&5
13123 ac_status=$?
13124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13125 (exit $ac_status); }; }; then
a9322a30 13126 ac_cv_have_decl_malloc=yes
bec39cab
AC
13127else
13128 echo "$as_me: failed program was:" >&5
13129sed 's/^/| /' conftest.$ac_ext >&5
13130
a9322a30 13131ac_cv_have_decl_malloc=no
bec39cab
AC
13132fi
13133rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13134fi
13135echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
13136echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
13137if test $ac_cv_have_decl_malloc = yes; then
bec39cab 13138
a9322a30
TT
13139cat >>confdefs.h <<_ACEOF
13140#define HAVE_DECL_MALLOC 1
bec39cab 13141_ACEOF
9a156167 13142
9a156167
MK
13143
13144else
bec39cab 13145 cat >>confdefs.h <<_ACEOF
a9322a30 13146#define HAVE_DECL_MALLOC 0
bec39cab 13147_ACEOF
9a156167 13148
c890192f 13149
bec39cab 13150fi
a9322a30
TT
13151echo "$as_me:$LINENO: checking whether realloc is declared" >&5
13152echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
13153if test "${ac_cv_have_decl_realloc+set}" = set; then
13154 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13155else
a9322a30 13156 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13157/* confdefs.h. */
13158_ACEOF
13159cat confdefs.h >>conftest.$ac_ext
13160cat >>conftest.$ac_ext <<_ACEOF
13161/* end confdefs.h. */
13162$ac_includes_default
a9322a30
TT
13163int
13164main ()
13165{
13166#ifndef realloc
13167 char *p = (char *) realloc;
13168#endif
13169
13170 ;
13171 return 0;
13172}
bec39cab
AC
13173_ACEOF
13174rm -f conftest.$ac_objext
13175if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13176 (eval $ac_compile) 2>conftest.er1
13177 ac_status=$?
13178 grep -v '^ *+' conftest.er1 >conftest.err
13179 rm -f conftest.er1
13180 cat conftest.err >&5
13181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13182 (exit $ac_status); } &&
b4e70030
JB
13183 { ac_try='test -z "$ac_c_werror_flag"
13184 || test ! -s conftest.err'
bec39cab
AC
13185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13186 (eval $ac_try) 2>&5
13187 ac_status=$?
13188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13189 (exit $ac_status); }; } &&
13190 { ac_try='test -s conftest.$ac_objext'
13191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13192 (eval $ac_try) 2>&5
13193 ac_status=$?
13194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13195 (exit $ac_status); }; }; then
a9322a30 13196 ac_cv_have_decl_realloc=yes
bec39cab
AC
13197else
13198 echo "$as_me: failed program was:" >&5
13199sed 's/^/| /' conftest.$ac_ext >&5
13200
a9322a30 13201ac_cv_have_decl_realloc=no
bec39cab
AC
13202fi
13203rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13204fi
13205echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
13206echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
13207if test $ac_cv_have_decl_realloc = yes; then
bec39cab 13208
a9322a30
TT
13209cat >>confdefs.h <<_ACEOF
13210#define HAVE_DECL_REALLOC 1
bec39cab 13211_ACEOF
bec39cab 13212
bec39cab 13213
c890192f 13214else
bec39cab 13215 cat >>confdefs.h <<_ACEOF
a9322a30 13216#define HAVE_DECL_REALLOC 0
bec39cab 13217_ACEOF
c890192f 13218
bec39cab 13219
bec39cab 13220fi
a9322a30
TT
13221echo "$as_me:$LINENO: checking whether strerror is declared" >&5
13222echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
13223if test "${ac_cv_have_decl_strerror+set}" = set; then
13224 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13225else
a9322a30 13226 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13227/* confdefs.h. */
13228_ACEOF
13229cat confdefs.h >>conftest.$ac_ext
13230cat >>conftest.$ac_ext <<_ACEOF
13231/* end confdefs.h. */
13232$ac_includes_default
a9322a30
TT
13233int
13234main ()
13235{
13236#ifndef strerror
13237 char *p = (char *) strerror;
13238#endif
13239
13240 ;
13241 return 0;
13242}
bec39cab
AC
13243_ACEOF
13244rm -f conftest.$ac_objext
13245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13246 (eval $ac_compile) 2>conftest.er1
13247 ac_status=$?
13248 grep -v '^ *+' conftest.er1 >conftest.err
13249 rm -f conftest.er1
13250 cat conftest.err >&5
13251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13252 (exit $ac_status); } &&
b4e70030
JB
13253 { ac_try='test -z "$ac_c_werror_flag"
13254 || test ! -s conftest.err'
bec39cab
AC
13255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13256 (eval $ac_try) 2>&5
13257 ac_status=$?
13258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13259 (exit $ac_status); }; } &&
13260 { ac_try='test -s conftest.$ac_objext'
13261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13262 (eval $ac_try) 2>&5
13263 ac_status=$?
13264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13265 (exit $ac_status); }; }; then
a9322a30 13266 ac_cv_have_decl_strerror=yes
bec39cab
AC
13267else
13268 echo "$as_me: failed program was:" >&5
13269sed 's/^/| /' conftest.$ac_ext >&5
13270
a9322a30 13271ac_cv_have_decl_strerror=no
bec39cab
AC
13272fi
13273rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13274fi
13275echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
13276echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
13277if test $ac_cv_have_decl_strerror = yes; then
bec39cab 13278
a9322a30
TT
13279cat >>confdefs.h <<_ACEOF
13280#define HAVE_DECL_STRERROR 1
bec39cab 13281_ACEOF
bec39cab 13282
bec39cab 13283
9a156167 13284else
bec39cab 13285 cat >>confdefs.h <<_ACEOF
a9322a30 13286#define HAVE_DECL_STRERROR 0
bec39cab 13287_ACEOF
9a156167 13288
06825bd1 13289
bec39cab 13290fi
a9322a30
TT
13291echo "$as_me:$LINENO: checking whether strstr is declared" >&5
13292echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
13293if test "${ac_cv_have_decl_strstr+set}" = set; then
13294 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13295else
a9322a30 13296 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13297/* confdefs.h. */
13298_ACEOF
13299cat confdefs.h >>conftest.$ac_ext
13300cat >>conftest.$ac_ext <<_ACEOF
13301/* end confdefs.h. */
13302$ac_includes_default
a9322a30
TT
13303int
13304main ()
13305{
13306#ifndef strstr
13307 char *p = (char *) strstr;
13308#endif
13309
13310 ;
13311 return 0;
13312}
bec39cab
AC
13313_ACEOF
13314rm -f conftest.$ac_objext
13315if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13316 (eval $ac_compile) 2>conftest.er1
13317 ac_status=$?
13318 grep -v '^ *+' conftest.er1 >conftest.err
13319 rm -f conftest.er1
13320 cat conftest.err >&5
13321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13322 (exit $ac_status); } &&
b4e70030
JB
13323 { ac_try='test -z "$ac_c_werror_flag"
13324 || test ! -s conftest.err'
bec39cab
AC
13325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13326 (eval $ac_try) 2>&5
13327 ac_status=$?
13328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13329 (exit $ac_status); }; } &&
13330 { ac_try='test -s conftest.$ac_objext'
13331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13332 (eval $ac_try) 2>&5
13333 ac_status=$?
13334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13335 (exit $ac_status); }; }; then
a9322a30 13336 ac_cv_have_decl_strstr=yes
bec39cab
AC
13337else
13338 echo "$as_me: failed program was:" >&5
13339sed 's/^/| /' conftest.$ac_ext >&5
13340
a9322a30 13341ac_cv_have_decl_strstr=no
bec39cab
AC
13342fi
13343rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13344fi
13345echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
13346echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
13347if test $ac_cv_have_decl_strstr = yes; then
bec39cab 13348
a9322a30
TT
13349cat >>confdefs.h <<_ACEOF
13350#define HAVE_DECL_STRSTR 1
bec39cab 13351_ACEOF
bec39cab 13352
bec39cab 13353
bec39cab 13354else
bec39cab 13355 cat >>confdefs.h <<_ACEOF
a9322a30 13356#define HAVE_DECL_STRSTR 0
bec39cab 13357_ACEOF
06825bd1 13358
bec39cab 13359
bec39cab 13360fi
a9322a30
TT
13361echo "$as_me:$LINENO: checking whether getopt is declared" >&5
13362echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
13363if test "${ac_cv_have_decl_getopt+set}" = set; then
13364 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13365else
a9322a30 13366 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13367/* confdefs.h. */
13368_ACEOF
13369cat confdefs.h >>conftest.$ac_ext
13370cat >>conftest.$ac_ext <<_ACEOF
13371/* end confdefs.h. */
13372$ac_includes_default
a9322a30
TT
13373int
13374main ()
13375{
13376#ifndef getopt
13377 char *p = (char *) getopt;
13378#endif
13379
13380 ;
13381 return 0;
13382}
bec39cab
AC
13383_ACEOF
13384rm -f conftest.$ac_objext
13385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13386 (eval $ac_compile) 2>conftest.er1
13387 ac_status=$?
13388 grep -v '^ *+' conftest.er1 >conftest.err
13389 rm -f conftest.er1
13390 cat conftest.err >&5
13391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13392 (exit $ac_status); } &&
b4e70030
JB
13393 { ac_try='test -z "$ac_c_werror_flag"
13394 || test ! -s conftest.err'
bec39cab
AC
13395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13396 (eval $ac_try) 2>&5
13397 ac_status=$?
13398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399 (exit $ac_status); }; } &&
13400 { ac_try='test -s conftest.$ac_objext'
13401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13402 (eval $ac_try) 2>&5
13403 ac_status=$?
13404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13405 (exit $ac_status); }; }; then
a9322a30 13406 ac_cv_have_decl_getopt=yes
bec39cab
AC
13407else
13408 echo "$as_me: failed program was:" >&5
13409sed 's/^/| /' conftest.$ac_ext >&5
13410
a9322a30 13411ac_cv_have_decl_getopt=no
bec39cab
AC
13412fi
13413rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13414fi
13415echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
13416echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
13417if test $ac_cv_have_decl_getopt = yes; then
bec39cab 13418
a9322a30
TT
13419cat >>confdefs.h <<_ACEOF
13420#define HAVE_DECL_GETOPT 1
bec39cab 13421_ACEOF
5ee754fc 13422
bec39cab 13423
5ee754fc 13424else
bec39cab 13425 cat >>confdefs.h <<_ACEOF
a9322a30 13426#define HAVE_DECL_GETOPT 0
bec39cab 13427_ACEOF
c906108c 13428
bec39cab 13429
bec39cab 13430fi
a9322a30
TT
13431echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
13432echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
13433if test "${ac_cv_have_decl_snprintf+set}" = set; then
13434 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13435else
a9322a30 13436 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13437/* confdefs.h. */
13438_ACEOF
13439cat confdefs.h >>conftest.$ac_ext
13440cat >>conftest.$ac_ext <<_ACEOF
13441/* end confdefs.h. */
13442$ac_includes_default
a9322a30
TT
13443int
13444main ()
13445{
13446#ifndef snprintf
13447 char *p = (char *) snprintf;
13448#endif
13449
13450 ;
13451 return 0;
13452}
bec39cab
AC
13453_ACEOF
13454rm -f conftest.$ac_objext
13455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13456 (eval $ac_compile) 2>conftest.er1
13457 ac_status=$?
13458 grep -v '^ *+' conftest.er1 >conftest.err
13459 rm -f conftest.er1
13460 cat conftest.err >&5
13461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13462 (exit $ac_status); } &&
b4e70030
JB
13463 { ac_try='test -z "$ac_c_werror_flag"
13464 || test ! -s conftest.err'
bec39cab
AC
13465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13466 (eval $ac_try) 2>&5
13467 ac_status=$?
13468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13469 (exit $ac_status); }; } &&
13470 { ac_try='test -s conftest.$ac_objext'
13471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13472 (eval $ac_try) 2>&5
13473 ac_status=$?
13474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13475 (exit $ac_status); }; }; then
a9322a30 13476 ac_cv_have_decl_snprintf=yes
bec39cab
AC
13477else
13478 echo "$as_me: failed program was:" >&5
13479sed 's/^/| /' conftest.$ac_ext >&5
13480
a9322a30 13481ac_cv_have_decl_snprintf=no
bec39cab
AC
13482fi
13483rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13484fi
13485echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
13486echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
13487if test $ac_cv_have_decl_snprintf = yes; then
bec39cab 13488
a9322a30
TT
13489cat >>confdefs.h <<_ACEOF
13490#define HAVE_DECL_SNPRINTF 1
bec39cab 13491_ACEOF
c906108c
SS
13492
13493
9608ab8b 13494else
bec39cab 13495 cat >>confdefs.h <<_ACEOF
a9322a30 13496#define HAVE_DECL_SNPRINTF 0
bec39cab 13497_ACEOF
5ee754fc 13498
5ee754fc 13499
bec39cab 13500fi
a9322a30
TT
13501echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
13502echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
13503if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
13504 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13505else
a9322a30 13506 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13507/* confdefs.h. */
13508_ACEOF
13509cat confdefs.h >>conftest.$ac_ext
13510cat >>conftest.$ac_ext <<_ACEOF
13511/* end confdefs.h. */
13512$ac_includes_default
a9322a30
TT
13513int
13514main ()
13515{
13516#ifndef vsnprintf
13517 char *p = (char *) vsnprintf;
13518#endif
13519
13520 ;
13521 return 0;
13522}
bec39cab
AC
13523_ACEOF
13524rm -f conftest.$ac_objext
13525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13526 (eval $ac_compile) 2>conftest.er1
13527 ac_status=$?
13528 grep -v '^ *+' conftest.er1 >conftest.err
13529 rm -f conftest.er1
13530 cat conftest.err >&5
13531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13532 (exit $ac_status); } &&
b4e70030
JB
13533 { ac_try='test -z "$ac_c_werror_flag"
13534 || test ! -s conftest.err'
bec39cab
AC
13535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13536 (eval $ac_try) 2>&5
13537 ac_status=$?
13538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13539 (exit $ac_status); }; } &&
13540 { ac_try='test -s conftest.$ac_objext'
13541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13542 (eval $ac_try) 2>&5
13543 ac_status=$?
13544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13545 (exit $ac_status); }; }; then
a9322a30 13546 ac_cv_have_decl_vsnprintf=yes
bec39cab
AC
13547else
13548 echo "$as_me: failed program was:" >&5
13549sed 's/^/| /' conftest.$ac_ext >&5
13550
a9322a30 13551ac_cv_have_decl_vsnprintf=no
bec39cab
AC
13552fi
13553rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13554fi
13555echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
13556echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
13557if test $ac_cv_have_decl_vsnprintf = yes; then
bec39cab 13558
a9322a30
TT
13559cat >>confdefs.h <<_ACEOF
13560#define HAVE_DECL_VSNPRINTF 1
bec39cab 13561_ACEOF
5ee754fc 13562
5ee754fc 13563
5ee754fc 13564else
bec39cab 13565 cat >>confdefs.h <<_ACEOF
a9322a30 13566#define HAVE_DECL_VSNPRINTF 0
bec39cab 13567_ACEOF
5ee754fc 13568
a9322a30 13569
5ee754fc
MK
13570fi
13571
bec39cab
AC
13572
13573
a8111142
TT
13574 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
13575echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
13576if test "${am_cv_val_LC_MESSAGES+set}" = set; then
13577 echo $ECHO_N "(cached) $ECHO_C" >&6
13578else
13579 cat >conftest.$ac_ext <<_ACEOF
13580/* confdefs.h. */
13581_ACEOF
13582cat confdefs.h >>conftest.$ac_ext
13583cat >>conftest.$ac_ext <<_ACEOF
13584/* end confdefs.h. */
13585#include <locale.h>
13586int
13587main ()
13588{
13589return LC_MESSAGES
13590 ;
13591 return 0;
13592}
13593_ACEOF
13594rm -f conftest.$ac_objext conftest$ac_exeext
13595if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13596 (eval $ac_link) 2>conftest.er1
13597 ac_status=$?
13598 grep -v '^ *+' conftest.er1 >conftest.err
13599 rm -f conftest.er1
13600 cat conftest.err >&5
13601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13602 (exit $ac_status); } &&
13603 { ac_try='test -z "$ac_c_werror_flag"
13604 || test ! -s conftest.err'
13605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13606 (eval $ac_try) 2>&5
13607 ac_status=$?
13608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13609 (exit $ac_status); }; } &&
13610 { ac_try='test -s conftest$ac_exeext'
13611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13612 (eval $ac_try) 2>&5
13613 ac_status=$?
13614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13615 (exit $ac_status); }; }; then
13616 am_cv_val_LC_MESSAGES=yes
13617else
13618 echo "$as_me: failed program was:" >&5
13619sed 's/^/| /' conftest.$ac_ext >&5
13620
13621am_cv_val_LC_MESSAGES=no
13622fi
13623rm -f conftest.err conftest.$ac_objext \
13624 conftest$ac_exeext conftest.$ac_ext
13625fi
13626echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
13627echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
13628 if test $am_cv_val_LC_MESSAGES = yes; then
13629
13630cat >>confdefs.h <<\_ACEOF
13631#define HAVE_LC_MESSAGES 1
13632_ACEOF
13633
13634 fi
13635
13636
a9322a30
TT
13637# ----------------------- #
13638# Checks for structures. #
13639# ----------------------- #
13640
13641echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13642echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13643if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
bec39cab 13644 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13645else
a9322a30 13646 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13647/* confdefs.h. */
13648_ACEOF
13649cat confdefs.h >>conftest.$ac_ext
13650cat >>conftest.$ac_ext <<_ACEOF
13651/* end confdefs.h. */
13652$ac_includes_default
a9322a30
TT
13653int
13654main ()
13655{
13656static struct stat ac_aggr;
13657if (ac_aggr.st_blocks)
13658return 0;
13659 ;
13660 return 0;
13661}
bec39cab
AC
13662_ACEOF
13663rm -f conftest.$ac_objext
13664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13665 (eval $ac_compile) 2>conftest.er1
13666 ac_status=$?
13667 grep -v '^ *+' conftest.er1 >conftest.err
13668 rm -f conftest.er1
13669 cat conftest.err >&5
13670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13671 (exit $ac_status); } &&
b4e70030
JB
13672 { ac_try='test -z "$ac_c_werror_flag"
13673 || test ! -s conftest.err'
bec39cab
AC
13674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13675 (eval $ac_try) 2>&5
13676 ac_status=$?
13677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13678 (exit $ac_status); }; } &&
13679 { ac_try='test -s conftest.$ac_objext'
13680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13681 (eval $ac_try) 2>&5
13682 ac_status=$?
13683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13684 (exit $ac_status); }; }; then
a9322a30 13685 ac_cv_member_struct_stat_st_blocks=yes
bec39cab
AC
13686else
13687 echo "$as_me: failed program was:" >&5
13688sed 's/^/| /' conftest.$ac_ext >&5
13689
bec39cab
AC
13690cat >conftest.$ac_ext <<_ACEOF
13691/* confdefs.h. */
13692_ACEOF
13693cat confdefs.h >>conftest.$ac_ext
13694cat >>conftest.$ac_ext <<_ACEOF
13695/* end confdefs.h. */
a9322a30
TT
13696$ac_includes_default
13697int
13698main ()
13699{
13700static struct stat ac_aggr;
13701if (sizeof ac_aggr.st_blocks)
13702return 0;
13703 ;
13704 return 0;
13705}
bec39cab 13706_ACEOF
a9322a30
TT
13707rm -f conftest.$ac_objext
13708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13709 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
13710 ac_status=$?
13711 grep -v '^ *+' conftest.er1 >conftest.err
13712 rm -f conftest.er1
13713 cat conftest.err >&5
13714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13715 (exit $ac_status); } &&
13716 { ac_try='test -z "$ac_c_werror_flag"
13717 || test ! -s conftest.err'
13718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13719 (eval $ac_try) 2>&5
13720 ac_status=$?
13721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13722 (exit $ac_status); }; } &&
13723 { ac_try='test -s conftest.$ac_objext'
13724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13725 (eval $ac_try) 2>&5
13726 ac_status=$?
13727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13728 (exit $ac_status); }; }; then
13729 ac_cv_member_struct_stat_st_blocks=yes
bec39cab
AC
13730else
13731 echo "$as_me: failed program was:" >&5
13732sed 's/^/| /' conftest.$ac_ext >&5
5ee754fc 13733
a9322a30 13734ac_cv_member_struct_stat_st_blocks=no
5ee754fc 13735fi
a9322a30 13736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13737fi
a9322a30 13738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13739fi
a9322a30
TT
13740echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13741echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13742if test $ac_cv_member_struct_stat_st_blocks = yes; then
5ee754fc 13743
a9322a30
TT
13744cat >>confdefs.h <<_ACEOF
13745#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13746_ACEOF
5ee754fc 13747
5ee754fc 13748
bec39cab 13749fi
a9322a30
TT
13750echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13751echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13752if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13753 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13754else
a9322a30 13755 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13756/* confdefs.h. */
13757_ACEOF
13758cat confdefs.h >>conftest.$ac_ext
13759cat >>conftest.$ac_ext <<_ACEOF
13760/* end confdefs.h. */
13761$ac_includes_default
a9322a30
TT
13762int
13763main ()
13764{
13765static struct stat ac_aggr;
13766if (ac_aggr.st_blksize)
13767return 0;
13768 ;
13769 return 0;
13770}
bec39cab
AC
13771_ACEOF
13772rm -f conftest.$ac_objext
13773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13774 (eval $ac_compile) 2>conftest.er1
13775 ac_status=$?
13776 grep -v '^ *+' conftest.er1 >conftest.err
13777 rm -f conftest.er1
13778 cat conftest.err >&5
13779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13780 (exit $ac_status); } &&
b4e70030
JB
13781 { ac_try='test -z "$ac_c_werror_flag"
13782 || test ! -s conftest.err'
bec39cab
AC
13783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13784 (eval $ac_try) 2>&5
13785 ac_status=$?
13786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13787 (exit $ac_status); }; } &&
13788 { ac_try='test -s conftest.$ac_objext'
13789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13790 (eval $ac_try) 2>&5
13791 ac_status=$?
13792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13793 (exit $ac_status); }; }; then
a9322a30 13794 ac_cv_member_struct_stat_st_blksize=yes
bec39cab
AC
13795else
13796 echo "$as_me: failed program was:" >&5
13797sed 's/^/| /' conftest.$ac_ext >&5
13798
7eb368b3
NR
13799cat >conftest.$ac_ext <<_ACEOF
13800/* confdefs.h. */
13801_ACEOF
13802cat confdefs.h >>conftest.$ac_ext
13803cat >>conftest.$ac_ext <<_ACEOF
13804/* end confdefs.h. */
13805$ac_includes_default
a9322a30
TT
13806int
13807main ()
13808{
13809static struct stat ac_aggr;
13810if (sizeof ac_aggr.st_blksize)
13811return 0;
13812 ;
13813 return 0;
13814}
7eb368b3
NR
13815_ACEOF
13816rm -f conftest.$ac_objext
13817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13818 (eval $ac_compile) 2>conftest.er1
13819 ac_status=$?
13820 grep -v '^ *+' conftest.er1 >conftest.err
13821 rm -f conftest.er1
13822 cat conftest.err >&5
13823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13824 (exit $ac_status); } &&
13825 { ac_try='test -z "$ac_c_werror_flag"
13826 || test ! -s conftest.err'
13827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13828 (eval $ac_try) 2>&5
13829 ac_status=$?
13830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13831 (exit $ac_status); }; } &&
13832 { ac_try='test -s conftest.$ac_objext'
13833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13834 (eval $ac_try) 2>&5
13835 ac_status=$?
13836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13837 (exit $ac_status); }; }; then
a9322a30 13838 ac_cv_member_struct_stat_st_blksize=yes
7eb368b3
NR
13839else
13840 echo "$as_me: failed program was:" >&5
13841sed 's/^/| /' conftest.$ac_ext >&5
13842
a9322a30 13843ac_cv_member_struct_stat_st_blksize=no
7eb368b3
NR
13844fi
13845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7eb368b3 13846fi
a9322a30 13847rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7eb368b3 13848fi
a9322a30
TT
13849echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13850echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13851if test $ac_cv_member_struct_stat_st_blksize = yes; then
7eb368b3 13852
a9322a30
TT
13853cat >>confdefs.h <<_ACEOF
13854#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
13855_ACEOF
13856
a9322a30 13857
7eb368b3
NR
13858fi
13859
7eb368b3 13860
a9322a30
TT
13861# ------------------ #
13862# Checks for types. #
13863# ------------------ #
7eb368b3 13864
a9322a30
TT
13865echo "$as_me:$LINENO: checking return type of signal handlers" >&5
13866echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13867if test "${ac_cv_type_signal+set}" = set; then
bec39cab 13868 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13869else
7cb9022a 13870 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13871/* confdefs.h. */
13872_ACEOF
13873cat confdefs.h >>conftest.$ac_ext
13874cat >>conftest.$ac_ext <<_ACEOF
13875/* end confdefs.h. */
a9322a30
TT
13876#include <sys/types.h>
13877#include <signal.h>
13878#ifdef signal
13879# undef signal
13880#endif
13881#ifdef __cplusplus
13882extern "C" void (*signal (int, void (*)(int)))(int);
13883#else
13884void (*signal ()) ();
7cb9022a
MK
13885#endif
13886
a9322a30
TT
13887int
13888main ()
13889{
13890int i;
13891 ;
13892 return 0;
13893}
bec39cab
AC
13894_ACEOF
13895rm -f conftest.$ac_objext
13896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13897 (eval $ac_compile) 2>conftest.er1
13898 ac_status=$?
13899 grep -v '^ *+' conftest.er1 >conftest.err
13900 rm -f conftest.er1
13901 cat conftest.err >&5
13902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13903 (exit $ac_status); } &&
b4e70030
JB
13904 { ac_try='test -z "$ac_c_werror_flag"
13905 || test ! -s conftest.err'
bec39cab
AC
13906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13907 (eval $ac_try) 2>&5
13908 ac_status=$?
13909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13910 (exit $ac_status); }; } &&
13911 { ac_try='test -s conftest.$ac_objext'
13912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13913 (eval $ac_try) 2>&5
13914 ac_status=$?
13915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13916 (exit $ac_status); }; }; then
a9322a30 13917 ac_cv_type_signal=void
bec39cab
AC
13918else
13919 echo "$as_me: failed program was:" >&5
13920sed 's/^/| /' conftest.$ac_ext >&5
13921
a9322a30 13922ac_cv_type_signal=int
bec39cab
AC
13923fi
13924rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13925fi
a9322a30
TT
13926echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
13927echo "${ECHO_T}$ac_cv_type_signal" >&6
bec39cab 13928
a9322a30
TT
13929cat >>confdefs.h <<_ACEOF
13930#define RETSIGTYPE $ac_cv_type_signal
13931_ACEOF
5ee754fc 13932
bec39cab 13933
a9322a30
TT
13934echo "$as_me:$LINENO: checking for socklen_t" >&5
13935echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
13936if test "${ac_cv_type_socklen_t+set}" = set; then
bec39cab 13937 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13938else
a9322a30 13939 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13940/* confdefs.h. */
13941_ACEOF
13942cat confdefs.h >>conftest.$ac_ext
13943cat >>conftest.$ac_ext <<_ACEOF
13944/* end confdefs.h. */
a9322a30
TT
13945#include <sys/types.h>
13946#include <sys/socket.h>
13947
13948
13949int
13950main ()
13951{
13952if ((socklen_t *) 0)
13953 return 0;
13954if (sizeof (socklen_t))
13955 return 0;
13956 ;
13957 return 0;
13958}
bec39cab
AC
13959_ACEOF
13960rm -f conftest.$ac_objext
13961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13962 (eval $ac_compile) 2>conftest.er1
13963 ac_status=$?
13964 grep -v '^ *+' conftest.er1 >conftest.err
13965 rm -f conftest.er1
13966 cat conftest.err >&5
13967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13968 (exit $ac_status); } &&
b4e70030
JB
13969 { ac_try='test -z "$ac_c_werror_flag"
13970 || test ! -s conftest.err'
bec39cab
AC
13971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13972 (eval $ac_try) 2>&5
13973 ac_status=$?
13974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13975 (exit $ac_status); }; } &&
13976 { ac_try='test -s conftest.$ac_objext'
13977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13978 (eval $ac_try) 2>&5
13979 ac_status=$?
13980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13981 (exit $ac_status); }; }; then
a9322a30 13982 ac_cv_type_socklen_t=yes
bec39cab
AC
13983else
13984 echo "$as_me: failed program was:" >&5
13985sed 's/^/| /' conftest.$ac_ext >&5
13986
a9322a30 13987ac_cv_type_socklen_t=no
bec39cab
AC
13988fi
13989rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13990fi
13991echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
13992echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
13993if test $ac_cv_type_socklen_t = yes; then
bec39cab 13994
a9322a30
TT
13995cat >>confdefs.h <<_ACEOF
13996#define HAVE_SOCKLEN_T 1
13997_ACEOF
13998
13999
14000fi
14001
14002
14003# ------------------------------------- #
14004# Checks for compiler characteristics. #
14005# ------------------------------------- #
14006
14007echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14008echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14009if test "${ac_cv_c_const+set}" = set; then
14010 echo $ECHO_N "(cached) $ECHO_C" >&6
14011else
14012 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14013/* confdefs.h. */
14014_ACEOF
14015cat confdefs.h >>conftest.$ac_ext
14016cat >>conftest.$ac_ext <<_ACEOF
14017/* end confdefs.h. */
a9322a30
TT
14018
14019int
14020main ()
14021{
14022/* FIXME: Include the comments suggested by Paul. */
14023#ifndef __cplusplus
14024 /* Ultrix mips cc rejects this. */
14025 typedef int charset[2];
14026 const charset x;
14027 /* SunOS 4.1.1 cc rejects this. */
14028 char const *const *ccp;
14029 char **p;
14030 /* NEC SVR4.0.2 mips cc rejects this. */
14031 struct point {int x, y;};
14032 static struct point const zero = {0,0};
14033 /* AIX XL C 1.02.0.0 rejects this.
14034 It does not let you subtract one const X* pointer from another in
14035 an arm of an if-expression whose if-part is not a constant
14036 expression */
14037 const char *g = "string";
14038 ccp = &g + (g ? g-g : 0);
14039 /* HPUX 7.0 cc rejects these. */
14040 ++ccp;
14041 p = (char**) ccp;
14042 ccp = (char const *const *) p;
14043 { /* SCO 3.2v4 cc rejects this. */
14044 char *t;
14045 char const *s = 0 ? (char *) 0 : (char const *) 0;
14046
14047 *t++ = 0;
14048 }
14049 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14050 int x[] = {25, 17};
14051 const int *foo = &x[0];
14052 ++foo;
14053 }
14054 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14055 typedef const int *iptr;
14056 iptr p = 0;
14057 ++p;
14058 }
14059 { /* AIX XL C 1.02.0.0 rejects this saying
14060 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14061 struct s { int j; const int *ap[3]; };
14062 struct s *b; b->j = 5;
14063 }
14064 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14065 const int foo = 10;
14066 }
14067#endif
14068
14069 ;
14070 return 0;
14071}
bec39cab 14072_ACEOF
a9322a30
TT
14073rm -f conftest.$ac_objext
14074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14075 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14076 ac_status=$?
14077 grep -v '^ *+' conftest.er1 >conftest.err
14078 rm -f conftest.er1
14079 cat conftest.err >&5
14080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
14081 (exit $ac_status); } &&
14082 { ac_try='test -z "$ac_c_werror_flag"
14083 || test ! -s conftest.err'
14084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14085 (eval $ac_try) 2>&5
14086 ac_status=$?
14087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14088 (exit $ac_status); }; } &&
14089 { ac_try='test -s conftest.$ac_objext'
14090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14091 (eval $ac_try) 2>&5
14092 ac_status=$?
14093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14094 (exit $ac_status); }; }; then
14095 ac_cv_c_const=yes
5ee754fc 14096else
bec39cab
AC
14097 echo "$as_me: failed program was:" >&5
14098sed 's/^/| /' conftest.$ac_ext >&5
14099
a9322a30 14100ac_cv_c_const=no
5ee754fc 14101fi
a9322a30 14102rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 14103fi
a9322a30
TT
14104echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14105echo "${ECHO_T}$ac_cv_c_const" >&6
14106if test $ac_cv_c_const = no; then
bec39cab 14107
a9322a30
TT
14108cat >>confdefs.h <<\_ACEOF
14109#define const
bec39cab
AC
14110_ACEOF
14111
5ee754fc 14112fi
bec39cab 14113
a9322a30
TT
14114echo "$as_me:$LINENO: checking for inline" >&5
14115echo $ECHO_N "checking for inline... $ECHO_C" >&6
14116if test "${ac_cv_c_inline+set}" = set; then
bec39cab 14117 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 14118else
a9322a30
TT
14119 ac_cv_c_inline=no
14120for ac_kw in inline __inline__ __inline; do
14121 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14122/* confdefs.h. */
14123_ACEOF
14124cat confdefs.h >>conftest.$ac_ext
14125cat >>conftest.$ac_ext <<_ACEOF
14126/* end confdefs.h. */
a9322a30
TT
14127#ifndef __cplusplus
14128typedef int foo_t;
14129static $ac_kw foo_t static_foo () {return 0; }
14130$ac_kw foo_t foo () {return 0; }
14131#endif
14132
bec39cab
AC
14133_ACEOF
14134rm -f conftest.$ac_objext
14135if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14136 (eval $ac_compile) 2>conftest.er1
14137 ac_status=$?
14138 grep -v '^ *+' conftest.er1 >conftest.err
14139 rm -f conftest.er1
14140 cat conftest.err >&5
14141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14142 (exit $ac_status); } &&
b4e70030
JB
14143 { ac_try='test -z "$ac_c_werror_flag"
14144 || test ! -s conftest.err'
bec39cab
AC
14145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14146 (eval $ac_try) 2>&5
14147 ac_status=$?
14148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14149 (exit $ac_status); }; } &&
14150 { ac_try='test -s conftest.$ac_objext'
14151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14152 (eval $ac_try) 2>&5
14153 ac_status=$?
14154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14155 (exit $ac_status); }; }; then
a9322a30 14156 ac_cv_c_inline=$ac_kw; break
bec39cab
AC
14157else
14158 echo "$as_me: failed program was:" >&5
14159sed 's/^/| /' conftest.$ac_ext >&5
14160
bec39cab
AC
14161fi
14162rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 14163done
bec39cab 14164
5ee754fc 14165fi
a9322a30
TT
14166echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
14167echo "${ECHO_T}$ac_cv_c_inline" >&6
bec39cab 14168
5ee754fc 14169
a9322a30
TT
14170case $ac_cv_c_inline in
14171 inline | yes) ;;
14172 *)
14173 case $ac_cv_c_inline in
14174 no) ac_val=;;
14175 *) ac_val=$ac_cv_c_inline;;
14176 esac
14177 cat >>confdefs.h <<_ACEOF
14178#ifndef __cplusplus
14179#define inline $ac_val
14180#endif
14181_ACEOF
bec39cab
AC
14182 ;;
14183esac
bec39cab 14184
a9322a30
TT
14185echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
14186echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
14187if test "${ac_cv_c_bigendian+set}" = set; then
bec39cab 14188 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 14189else
a9322a30 14190 # See if sys/param.h defines the BYTE_ORDER macro.
bec39cab
AC
14191cat >conftest.$ac_ext <<_ACEOF
14192/* confdefs.h. */
14193_ACEOF
14194cat confdefs.h >>conftest.$ac_ext
14195cat >>conftest.$ac_ext <<_ACEOF
14196/* end confdefs.h. */
a9322a30
TT
14197#include <sys/types.h>
14198#include <sys/param.h>
14199
14200int
14201main ()
14202{
14203#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14204 bogus endian macros
14205#endif
14206
14207 ;
14208 return 0;
14209}
bec39cab
AC
14210_ACEOF
14211rm -f conftest.$ac_objext
14212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14213 (eval $ac_compile) 2>conftest.er1
14214 ac_status=$?
14215 grep -v '^ *+' conftest.er1 >conftest.err
14216 rm -f conftest.er1
14217 cat conftest.err >&5
14218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14219 (exit $ac_status); } &&
b4e70030
JB
14220 { ac_try='test -z "$ac_c_werror_flag"
14221 || test ! -s conftest.err'
bec39cab
AC
14222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14223 (eval $ac_try) 2>&5
14224 ac_status=$?
14225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14226 (exit $ac_status); }; } &&
14227 { ac_try='test -s conftest.$ac_objext'
14228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14229 (eval $ac_try) 2>&5
14230 ac_status=$?
14231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14232 (exit $ac_status); }; }; then
a9322a30 14233 # It does; now see whether it defined to BIG_ENDIAN or not.
bec39cab
AC
14234cat >conftest.$ac_ext <<_ACEOF
14235/* confdefs.h. */
14236_ACEOF
14237cat confdefs.h >>conftest.$ac_ext
14238cat >>conftest.$ac_ext <<_ACEOF
14239/* end confdefs.h. */
a9322a30
TT
14240#include <sys/types.h>
14241#include <sys/param.h>
14242
14243int
14244main ()
14245{
14246#if BYTE_ORDER != BIG_ENDIAN
14247 not big endian
14248#endif
14249
14250 ;
14251 return 0;
14252}
bec39cab 14253_ACEOF
a9322a30
TT
14254rm -f conftest.$ac_objext
14255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14256 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14257 ac_status=$?
14258 grep -v '^ *+' conftest.er1 >conftest.err
14259 rm -f conftest.er1
14260 cat conftest.err >&5
14261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
14262 (exit $ac_status); } &&
14263 { ac_try='test -z "$ac_c_werror_flag"
14264 || test ! -s conftest.err'
14265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14266 (eval $ac_try) 2>&5
14267 ac_status=$?
14268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14269 (exit $ac_status); }; } &&
14270 { ac_try='test -s conftest.$ac_objext'
14271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14272 (eval $ac_try) 2>&5
14273 ac_status=$?
14274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14275 (exit $ac_status); }; }; then
14276 ac_cv_c_bigendian=yes
5ee754fc 14277else
bec39cab
AC
14278 echo "$as_me: failed program was:" >&5
14279sed 's/^/| /' conftest.$ac_ext >&5
14280
a9322a30 14281ac_cv_c_bigendian=no
5ee754fc 14282fi
a9322a30 14283rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14284else
a9322a30
TT
14285 echo "$as_me: failed program was:" >&5
14286sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 14287
a9322a30
TT
14288# It does not; compile a test program.
14289if test "$cross_compiling" = yes; then
14290 # try to guess the endianness by grepping values into an object file
14291 ac_cv_c_bigendian=unknown
14292 cat >conftest.$ac_ext <<_ACEOF
14293/* confdefs.h. */
7eb368b3
NR
14294_ACEOF
14295cat confdefs.h >>conftest.$ac_ext
14296cat >>conftest.$ac_ext <<_ACEOF
14297/* end confdefs.h. */
a9322a30
TT
14298short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14299short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14300void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
14301short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14302short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14303void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
7eb368b3
NR
14304int
14305main ()
14306{
a9322a30 14307 _ascii (); _ebcdic ();
7eb368b3
NR
14308 ;
14309 return 0;
14310}
14311_ACEOF
a9322a30
TT
14312rm -f conftest.$ac_objext
14313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14314 (eval $ac_compile) 2>conftest.er1
7eb368b3
NR
14315 ac_status=$?
14316 grep -v '^ *+' conftest.er1 >conftest.err
14317 rm -f conftest.er1
14318 cat conftest.err >&5
14319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14320 (exit $ac_status); } &&
14321 { ac_try='test -z "$ac_c_werror_flag"
14322 || test ! -s conftest.err'
14323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14324 (eval $ac_try) 2>&5
14325 ac_status=$?
14326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14327 (exit $ac_status); }; } &&
a9322a30 14328 { ac_try='test -s conftest.$ac_objext'
7eb368b3
NR
14329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14330 (eval $ac_try) 2>&5
14331 ac_status=$?
14332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14333 (exit $ac_status); }; }; then
a9322a30
TT
14334 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
14335 ac_cv_c_bigendian=yes
14336fi
14337if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14338 if test "$ac_cv_c_bigendian" = unknown; then
14339 ac_cv_c_bigendian=no
14340 else
14341 # finding both strings is unlikely to happen, but who knows?
14342 ac_cv_c_bigendian=unknown
14343 fi
14344fi
7eb368b3
NR
14345else
14346 echo "$as_me: failed program was:" >&5
14347sed 's/^/| /' conftest.$ac_ext >&5
14348
7eb368b3 14349fi
a9322a30 14350rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
14351else
14352 cat >conftest.$ac_ext <<_ACEOF
14353/* confdefs.h. */
14354_ACEOF
14355cat confdefs.h >>conftest.$ac_ext
14356cat >>conftest.$ac_ext <<_ACEOF
14357/* end confdefs.h. */
d3ea6809
MM
14358int
14359main ()
14360{
a9322a30
TT
14361 /* Are we little or big endian? From Harbison&Steele. */
14362 union
14363 {
14364 long l;
14365 char c[sizeof (long)];
14366 } u;
14367 u.l = 1;
14368 exit (u.c[sizeof (long) - 1] == 1);
d3ea6809
MM
14369}
14370_ACEOF
a9322a30 14371rm -f conftest$ac_exeext
d3ea6809 14372if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30 14373 (eval $ac_link) 2>&5
d3ea6809
MM
14374 ac_status=$?
14375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30 14376 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3ea6809
MM
14377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14378 (eval $ac_try) 2>&5
14379 ac_status=$?
14380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14381 (exit $ac_status); }; }; then
a9322a30 14382 ac_cv_c_bigendian=no
d3ea6809 14383else
a9322a30
TT
14384 echo "$as_me: program exited with status $ac_status" >&5
14385echo "$as_me: failed program was:" >&5
d3ea6809
MM
14386sed 's/^/| /' conftest.$ac_ext >&5
14387
a9322a30
TT
14388( exit $ac_status )
14389ac_cv_c_bigendian=yes
d3ea6809 14390fi
a9322a30 14391rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d3ea6809 14392fi
d3ea6809 14393fi
a9322a30
TT
14394rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14395fi
14396echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
14397echo "${ECHO_T}$ac_cv_c_bigendian" >&6
14398case $ac_cv_c_bigendian in
14399 yes)
14400
14401cat >>confdefs.h <<\_ACEOF
14402#define WORDS_BIGENDIAN 1
14403_ACEOF
14404 ;;
14405 no)
14406 ;;
14407 *)
14408 { { echo "$as_me:$LINENO: error: unknown endianness
14409presetting ac_cv_c_bigendian=no (or yes) will help" >&5
14410echo "$as_me: error: unknown endianness
14411presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
14412 { (exit 1); exit 1; }; } ;;
14413esac
d3ea6809
MM
14414
14415
a9322a30
TT
14416# ------------------------------ #
14417# Checks for library functions. #
14418# ------------------------------ #
d3ea6809 14419
a9322a30
TT
14420# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14421# for constant arguments. Useless!
14422echo "$as_me:$LINENO: checking for working alloca.h" >&5
14423echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
14424if test "${ac_cv_working_alloca_h+set}" = set; then
d3ea6809
MM
14425 echo $ECHO_N "(cached) $ECHO_C" >&6
14426else
14427 cat >conftest.$ac_ext <<_ACEOF
14428/* confdefs.h. */
14429_ACEOF
14430cat confdefs.h >>conftest.$ac_ext
14431cat >>conftest.$ac_ext <<_ACEOF
14432/* end confdefs.h. */
a9322a30 14433#include <alloca.h>
bec39cab
AC
14434int
14435main ()
14436{
a9322a30 14437char *p = (char *) alloca (2 * sizeof (int));
bec39cab
AC
14438 ;
14439 return 0;
14440}
14441_ACEOF
14442rm -f conftest.$ac_objext conftest$ac_exeext
14443if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14444 (eval $ac_link) 2>conftest.er1
14445 ac_status=$?
14446 grep -v '^ *+' conftest.er1 >conftest.err
14447 rm -f conftest.er1
14448 cat conftest.err >&5
14449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14450 (exit $ac_status); } &&
b4e70030
JB
14451 { ac_try='test -z "$ac_c_werror_flag"
14452 || test ! -s conftest.err'
bec39cab
AC
14453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14454 (eval $ac_try) 2>&5
14455 ac_status=$?
14456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14457 (exit $ac_status); }; } &&
14458 { ac_try='test -s conftest$ac_exeext'
14459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14460 (eval $ac_try) 2>&5
14461 ac_status=$?
14462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14463 (exit $ac_status); }; }; then
a9322a30 14464 ac_cv_working_alloca_h=yes
bec39cab
AC
14465else
14466 echo "$as_me: failed program was:" >&5
14467sed 's/^/| /' conftest.$ac_ext >&5
14468
a9322a30 14469ac_cv_working_alloca_h=no
bec39cab
AC
14470fi
14471rm -f conftest.err conftest.$ac_objext \
14472 conftest$ac_exeext conftest.$ac_ext
14473fi
a9322a30
TT
14474echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14475echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
14476if test $ac_cv_working_alloca_h = yes; then
14477
14478cat >>confdefs.h <<\_ACEOF
14479#define HAVE_ALLOCA_H 1
bec39cab 14480_ACEOF
c906108c 14481
c906108c 14482fi
bec39cab 14483
a9322a30
TT
14484echo "$as_me:$LINENO: checking for alloca" >&5
14485echo $ECHO_N "checking for alloca... $ECHO_C" >&6
14486if test "${ac_cv_func_alloca_works+set}" = set; then
bec39cab
AC
14487 echo $ECHO_N "(cached) $ECHO_C" >&6
14488else
14489 cat >conftest.$ac_ext <<_ACEOF
14490/* confdefs.h. */
14491_ACEOF
14492cat confdefs.h >>conftest.$ac_ext
14493cat >>conftest.$ac_ext <<_ACEOF
14494/* end confdefs.h. */
a9322a30
TT
14495#ifdef __GNUC__
14496# define alloca __builtin_alloca
b4e70030 14497#else
a9322a30
TT
14498# ifdef _MSC_VER
14499# include <malloc.h>
14500# define alloca _alloca
14501# else
14502# if HAVE_ALLOCA_H
14503# include <alloca.h>
14504# else
14505# ifdef _AIX
14506 #pragma alloca
14507# else
14508# ifndef alloca /* predefined by HP cc +Olibcalls */
14509char *alloca ();
14510# endif
14511# endif
14512# endif
14513# endif
c906108c 14514#endif
97bf5e38 14515
bec39cab
AC
14516int
14517main ()
14518{
a9322a30 14519char *p = (char *) alloca (1);
bec39cab
AC
14520 ;
14521 return 0;
14522}
14523_ACEOF
14524rm -f conftest.$ac_objext conftest$ac_exeext
14525if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14526 (eval $ac_link) 2>conftest.er1
14527 ac_status=$?
14528 grep -v '^ *+' conftest.er1 >conftest.err
14529 rm -f conftest.er1
14530 cat conftest.err >&5
14531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14532 (exit $ac_status); } &&
b4e70030
JB
14533 { ac_try='test -z "$ac_c_werror_flag"
14534 || test ! -s conftest.err'
bec39cab
AC
14535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14536 (eval $ac_try) 2>&5
14537 ac_status=$?
14538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14539 (exit $ac_status); }; } &&
14540 { ac_try='test -s conftest$ac_exeext'
14541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14542 (eval $ac_try) 2>&5
14543 ac_status=$?
14544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14545 (exit $ac_status); }; }; then
a9322a30 14546 ac_cv_func_alloca_works=yes
bec39cab
AC
14547else
14548 echo "$as_me: failed program was:" >&5
14549sed 's/^/| /' conftest.$ac_ext >&5
14550
a9322a30 14551ac_cv_func_alloca_works=no
bec39cab
AC
14552fi
14553rm -f conftest.err conftest.$ac_objext \
14554 conftest$ac_exeext conftest.$ac_ext
14555fi
a9322a30
TT
14556echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14557echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
14558
14559if test $ac_cv_func_alloca_works = yes; then
14560
14561cat >>confdefs.h <<\_ACEOF
14562#define HAVE_ALLOCA 1
bec39cab 14563_ACEOF
c906108c 14564
a9322a30
TT
14565else
14566 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14567# that cause trouble. Some versions do not even contain alloca or
14568# contain a buggy version. If you still want to use their alloca,
14569# use ar to extract alloca.o from them instead of compiling alloca.c.
14570
14571ALLOCA=alloca.$ac_objext
14572
14573cat >>confdefs.h <<\_ACEOF
14574#define C_ALLOCA 1
14575_ACEOF
c906108c 14576
bec39cab 14577
a9322a30
TT
14578echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14579echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
14580if test "${ac_cv_os_cray+set}" = set; then
14581 echo $ECHO_N "(cached) $ECHO_C" >&6
14582else
14583 cat >conftest.$ac_ext <<_ACEOF
14584/* confdefs.h. */
14585_ACEOF
14586cat confdefs.h >>conftest.$ac_ext
14587cat >>conftest.$ac_ext <<_ACEOF
14588/* end confdefs.h. */
14589#if defined(CRAY) && ! defined(CRAY2)
14590webecray
14591#else
14592wenotbecray
14593#endif
14594
14595_ACEOF
14596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14597 $EGREP "webecray" >/dev/null 2>&1; then
14598 ac_cv_os_cray=yes
14599else
14600 ac_cv_os_cray=no
14601fi
14602rm -f conftest*
14603
14604fi
14605echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14606echo "${ECHO_T}$ac_cv_os_cray" >&6
14607if test $ac_cv_os_cray = yes; then
14608 for ac_func in _getb67 GETB67 getb67; do
14609 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14610echo "$as_me:$LINENO: checking for $ac_func" >&5
14611echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14612if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
14613 echo $ECHO_N "(cached) $ECHO_C" >&6
14614else
14615 cat >conftest.$ac_ext <<_ACEOF
14616/* confdefs.h. */
14617_ACEOF
14618cat confdefs.h >>conftest.$ac_ext
14619cat >>conftest.$ac_ext <<_ACEOF
14620/* end confdefs.h. */
14621/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14622 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14623#define $ac_func innocuous_$ac_func
14624
97bf5e38 14625/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
14626 which can conflict with char $ac_func (); below.
14627 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14628 <limits.h> exists even on freestanding compilers. */
14629
14630#ifdef __STDC__
14631# include <limits.h>
14632#else
14633# include <assert.h>
14634#endif
c906108c 14635
bec39cab 14636#undef $ac_func
97bf5e38 14637
b4e70030 14638/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
14639#ifdef __cplusplus
14640extern "C"
b4e70030 14641{
bec39cab 14642#endif
b4e70030
JB
14643/* We use char because int might match the return type of a gcc2
14644 builtin and then its argument prototype would still apply. */
bec39cab 14645char $ac_func ();
97bf5e38
MK
14646/* The GNU C library defines this for functions which it implements
14647 to always fail with ENOSYS. Some functions are actually named
14648 something starting with __ and the normal name is an alias. */
b4e70030 14649#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
97bf5e38 14650choke me
b4e70030
JB
14651#else
14652char (*f) () = $ac_func;
14653#endif
14654#ifdef __cplusplus
14655}
c906108c 14656#endif
97bf5e38 14657
bec39cab
AC
14658int
14659main ()
14660{
b4e70030 14661return f != $ac_func;
bec39cab
AC
14662 ;
14663 return 0;
14664}
14665_ACEOF
14666rm -f conftest.$ac_objext conftest$ac_exeext
14667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14668 (eval $ac_link) 2>conftest.er1
14669 ac_status=$?
14670 grep -v '^ *+' conftest.er1 >conftest.err
14671 rm -f conftest.er1
14672 cat conftest.err >&5
14673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14674 (exit $ac_status); } &&
b4e70030
JB
14675 { ac_try='test -z "$ac_c_werror_flag"
14676 || test ! -s conftest.err'
bec39cab
AC
14677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14678 (eval $ac_try) 2>&5
14679 ac_status=$?
14680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14681 (exit $ac_status); }; } &&
14682 { ac_try='test -s conftest$ac_exeext'
14683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14684 (eval $ac_try) 2>&5
14685 ac_status=$?
14686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14687 (exit $ac_status); }; }; then
14688 eval "$as_ac_var=yes"
14689else
14690 echo "$as_me: failed program was:" >&5
14691sed 's/^/| /' conftest.$ac_ext >&5
14692
b4e70030 14693eval "$as_ac_var=no"
bec39cab
AC
14694fi
14695rm -f conftest.err conftest.$ac_objext \
14696 conftest$ac_exeext conftest.$ac_ext
14697fi
b4e70030
JB
14698echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14699echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab 14700if test `eval echo '${'$as_ac_var'}'` = yes; then
a9322a30
TT
14701
14702cat >>confdefs.h <<_ACEOF
14703#define CRAY_STACKSEG_END $ac_func
bec39cab 14704_ACEOF
c906108c 14705
a9322a30 14706 break
c906108c
SS
14707fi
14708
a9322a30
TT
14709 done
14710fi
bec39cab 14711
a9322a30
TT
14712echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14713echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
14714if test "${ac_cv_c_stack_direction+set}" = set; then
bec39cab 14715 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
14716else
14717 if test "$cross_compiling" = yes; then
14718 ac_cv_c_stack_direction=0
bec39cab
AC
14719else
14720 cat >conftest.$ac_ext <<_ACEOF
14721/* confdefs.h. */
14722_ACEOF
14723cat confdefs.h >>conftest.$ac_ext
14724cat >>conftest.$ac_ext <<_ACEOF
14725/* end confdefs.h. */
a9322a30
TT
14726int
14727find_stack_direction ()
b4e70030 14728{
a9322a30
TT
14729 static char *addr = 0;
14730 auto char dummy;
14731 if (addr == 0)
14732 {
14733 addr = &dummy;
14734 return find_stack_direction ();
14735 }
14736 else
14737 return (&dummy > addr) ? 1 : -1;
b4e70030 14738}
b757528f 14739
bec39cab
AC
14740int
14741main ()
14742{
a9322a30 14743 exit (find_stack_direction () < 0);
bec39cab
AC
14744}
14745_ACEOF
a9322a30 14746rm -f conftest$ac_exeext
bec39cab 14747if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30
TT
14748 (eval $ac_link) 2>&5
14749 ac_status=$?
14750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14751 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14753 (eval $ac_try) 2>&5
14754 ac_status=$?
14755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14756 (exit $ac_status); }; }; then
14757 ac_cv_c_stack_direction=1
14758else
14759 echo "$as_me: program exited with status $ac_status" >&5
14760echo "$as_me: failed program was:" >&5
14761sed 's/^/| /' conftest.$ac_ext >&5
14762
14763( exit $ac_status )
14764ac_cv_c_stack_direction=-1
14765fi
14766rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14767fi
14768fi
14769echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14770echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
14771
14772cat >>confdefs.h <<_ACEOF
14773#define STACK_DIRECTION $ac_cv_c_stack_direction
14774_ACEOF
14775
14776
14777fi
14778
14779
14780
14781for ac_header in stdlib.h unistd.h
14782do
14783as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14784if eval "test \"\${$as_ac_Header+set}\" = set"; then
14785 echo "$as_me:$LINENO: checking for $ac_header" >&5
14786echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14787if eval "test \"\${$as_ac_Header+set}\" = set"; then
14788 echo $ECHO_N "(cached) $ECHO_C" >&6
14789fi
14790echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14791echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14792else
14793 # Is the header compilable?
14794echo "$as_me:$LINENO: checking $ac_header usability" >&5
14795echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14796cat >conftest.$ac_ext <<_ACEOF
14797/* confdefs.h. */
14798_ACEOF
14799cat confdefs.h >>conftest.$ac_ext
14800cat >>conftest.$ac_ext <<_ACEOF
14801/* end confdefs.h. */
14802$ac_includes_default
14803#include <$ac_header>
14804_ACEOF
14805rm -f conftest.$ac_objext
14806if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14807 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14808 ac_status=$?
14809 grep -v '^ *+' conftest.er1 >conftest.err
14810 rm -f conftest.er1
14811 cat conftest.err >&5
14812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14813 (exit $ac_status); } &&
b4e70030
JB
14814 { ac_try='test -z "$ac_c_werror_flag"
14815 || test ! -s conftest.err'
bec39cab
AC
14816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14817 (eval $ac_try) 2>&5
14818 ac_status=$?
14819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14820 (exit $ac_status); }; } &&
a9322a30 14821 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
14822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14823 (eval $ac_try) 2>&5
14824 ac_status=$?
14825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14826 (exit $ac_status); }; }; then
a9322a30
TT
14827 ac_header_compiler=yes
14828else
14829 echo "$as_me: failed program was:" >&5
14830sed 's/^/| /' conftest.$ac_ext >&5
14831
14832ac_header_compiler=no
14833fi
14834rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14835echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14836echo "${ECHO_T}$ac_header_compiler" >&6
14837
14838# Is the header present?
14839echo "$as_me:$LINENO: checking $ac_header presence" >&5
14840echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14841cat >conftest.$ac_ext <<_ACEOF
14842/* confdefs.h. */
14843_ACEOF
14844cat confdefs.h >>conftest.$ac_ext
14845cat >>conftest.$ac_ext <<_ACEOF
14846/* end confdefs.h. */
14847#include <$ac_header>
14848_ACEOF
14849if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14850 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14851 ac_status=$?
14852 grep -v '^ *+' conftest.er1 >conftest.err
14853 rm -f conftest.er1
14854 cat conftest.err >&5
14855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14856 (exit $ac_status); } >/dev/null; then
14857 if test -s conftest.err; then
14858 ac_cpp_err=$ac_c_preproc_warn_flag
14859 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14860 else
14861 ac_cpp_err=
14862 fi
14863else
14864 ac_cpp_err=yes
14865fi
14866if test -z "$ac_cpp_err"; then
14867 ac_header_preproc=yes
bec39cab
AC
14868else
14869 echo "$as_me: failed program was:" >&5
14870sed 's/^/| /' conftest.$ac_ext >&5
14871
a9322a30
TT
14872 ac_header_preproc=no
14873fi
14874rm -f conftest.err conftest.$ac_ext
14875echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14876echo "${ECHO_T}$ac_header_preproc" >&6
14877
14878# So? What about this header?
14879case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14880 yes:no: )
14881 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14882echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14883 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14884echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14885 ac_header_preproc=yes
14886 ;;
14887 no:yes:* )
14888 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14889echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14890 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14891echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14892 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14893echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14894 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14895echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
14896 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14897echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14898 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14899echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14900 (
14901 cat <<\_ASBOX
14902## ------------------------------------------ ##
14903## Report this to the AC_PACKAGE_NAME lists. ##
14904## ------------------------------------------ ##
14905_ASBOX
14906 ) |
14907 sed "s/^/$as_me: WARNING: /" >&2
14908 ;;
14909esac
14910echo "$as_me:$LINENO: checking for $ac_header" >&5
14911echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14912if eval "test \"\${$as_ac_Header+set}\" = set"; then
14913 echo $ECHO_N "(cached) $ECHO_C" >&6
14914else
14915 eval "$as_ac_Header=\$ac_header_preproc"
bec39cab 14916fi
a9322a30
TT
14917echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14918echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14919
bec39cab 14920fi
a9322a30 14921if test `eval echo '${'$as_ac_Header'}'` = yes; then
bec39cab 14922 cat >>confdefs.h <<_ACEOF
a9322a30 14923#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 14924_ACEOF
b757528f 14925
b757528f 14926fi
bec39cab 14927
a9322a30 14928done
a3828db0 14929
83116857 14930
a9322a30 14931for ac_func in getpagesize
bcb3dc3d 14932do
bec39cab 14933as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14934echo "$as_me:$LINENO: checking for $ac_func" >&5
14935echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14936if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
14937 echo $ECHO_N "(cached) $ECHO_C" >&6
14938else
14939 cat >conftest.$ac_ext <<_ACEOF
14940/* confdefs.h. */
14941_ACEOF
14942cat confdefs.h >>conftest.$ac_ext
14943cat >>conftest.$ac_ext <<_ACEOF
14944/* end confdefs.h. */
14945/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14946 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14947#define $ac_func innocuous_$ac_func
14948
bcb3dc3d 14949/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
14950 which can conflict with char $ac_func (); below.
14951 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14952 <limits.h> exists even on freestanding compilers. */
14953
14954#ifdef __STDC__
14955# include <limits.h>
14956#else
14957# include <assert.h>
14958#endif
bcb3dc3d 14959
bec39cab 14960#undef $ac_func
bcb3dc3d 14961
b4e70030 14962/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
14963#ifdef __cplusplus
14964extern "C"
b4e70030 14965{
bec39cab 14966#endif
b4e70030
JB
14967/* We use char because int might match the return type of a gcc2
14968 builtin and then its argument prototype would still apply. */
bec39cab 14969char $ac_func ();
bcb3dc3d
MK
14970/* The GNU C library defines this for functions which it implements
14971 to always fail with ENOSYS. Some functions are actually named
14972 something starting with __ and the normal name is an alias. */
b4e70030 14973#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
bcb3dc3d 14974choke me
b4e70030
JB
14975#else
14976char (*f) () = $ac_func;
14977#endif
14978#ifdef __cplusplus
14979}
bcb3dc3d
MK
14980#endif
14981
bec39cab
AC
14982int
14983main ()
14984{
b4e70030 14985return f != $ac_func;
bec39cab
AC
14986 ;
14987 return 0;
14988}
14989_ACEOF
14990rm -f conftest.$ac_objext conftest$ac_exeext
14991if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14992 (eval $ac_link) 2>conftest.er1
14993 ac_status=$?
14994 grep -v '^ *+' conftest.er1 >conftest.err
14995 rm -f conftest.er1
14996 cat conftest.err >&5
14997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14998 (exit $ac_status); } &&
b4e70030
JB
14999 { ac_try='test -z "$ac_c_werror_flag"
15000 || test ! -s conftest.err'
bec39cab
AC
15001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15002 (eval $ac_try) 2>&5
15003 ac_status=$?
15004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15005 (exit $ac_status); }; } &&
15006 { ac_try='test -s conftest$ac_exeext'
15007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15008 (eval $ac_try) 2>&5
15009 ac_status=$?
15010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15011 (exit $ac_status); }; }; then
15012 eval "$as_ac_var=yes"
15013else
15014 echo "$as_me: failed program was:" >&5
15015sed 's/^/| /' conftest.$ac_ext >&5
15016
b4e70030 15017eval "$as_ac_var=no"
bec39cab
AC
15018fi
15019rm -f conftest.err conftest.$ac_objext \
15020 conftest$ac_exeext conftest.$ac_ext
15021fi
b4e70030
JB
15022echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15023echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
15024if test `eval echo '${'$as_ac_var'}'` = yes; then
15025 cat >>confdefs.h <<_ACEOF
15026#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15027_ACEOF
bcb3dc3d 15028
bcb3dc3d
MK
15029fi
15030done
15031
a9322a30
TT
15032echo "$as_me:$LINENO: checking for working mmap" >&5
15033echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
15034if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
bec39cab 15035 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
15036else
15037 if test "$cross_compiling" = yes; then
15038 ac_cv_func_mmap_fixed_mapped=no
bec39cab
AC
15039else
15040 cat >conftest.$ac_ext <<_ACEOF
15041/* confdefs.h. */
15042_ACEOF
15043cat confdefs.h >>conftest.$ac_ext
15044cat >>conftest.$ac_ext <<_ACEOF
15045/* end confdefs.h. */
a9322a30
TT
15046$ac_includes_default
15047/* malloc might have been renamed as rpl_malloc. */
15048#undef malloc
bec39cab 15049
a9322a30
TT
15050/* Thanks to Mike Haertel and Jim Avera for this test.
15051 Here is a matrix of mmap possibilities:
15052 mmap private not fixed
15053 mmap private fixed at somewhere currently unmapped
15054 mmap private fixed at somewhere already mapped
15055 mmap shared not fixed
15056 mmap shared fixed at somewhere currently unmapped
15057 mmap shared fixed at somewhere already mapped
15058 For private mappings, we should verify that changes cannot be read()
15059 back from the file, nor mmap's back from the file at a different
15060 address. (There have been systems where private was not correctly
15061 implemented like the infamous i386 svr4.0, and systems where the
15062 VM page cache was not coherent with the file system buffer cache
15063 like early versions of FreeBSD and possibly contemporary NetBSD.)
15064 For shared mappings, we should conversely verify that changes get
15065 propagated back to all the places they're supposed to be.
bec39cab 15066
a9322a30
TT
15067 Grep wants private fixed already mapped.
15068 The main things grep needs to know about mmap are:
15069 * does it exist and is it safe to write into the mmap'd area
15070 * how to use it (BSD variants) */
8b9cf735 15071
a9322a30
TT
15072#include <fcntl.h>
15073#include <sys/mman.h>
8b9cf735 15074
a9322a30
TT
15075#if !STDC_HEADERS && !HAVE_STDLIB_H
15076char *malloc ();
a3828db0
MK
15077#endif
15078
a9322a30
TT
15079/* This mess was copied from the GNU getpagesize.h. */
15080#if !HAVE_GETPAGESIZE
15081/* Assume that all systems that can run configure have sys/param.h. */
15082# if !HAVE_SYS_PARAM_H
15083# define HAVE_SYS_PARAM_H 1
15084# endif
15085
15086# ifdef _SC_PAGESIZE
15087# define getpagesize() sysconf(_SC_PAGESIZE)
15088# else /* no _SC_PAGESIZE */
15089# if HAVE_SYS_PARAM_H
15090# include <sys/param.h>
15091# ifdef EXEC_PAGESIZE
15092# define getpagesize() EXEC_PAGESIZE
15093# else /* no EXEC_PAGESIZE */
15094# ifdef NBPG
15095# define getpagesize() NBPG * CLSIZE
15096# ifndef CLSIZE
15097# define CLSIZE 1
15098# endif /* no CLSIZE */
15099# else /* no NBPG */
15100# ifdef NBPC
15101# define getpagesize() NBPC
15102# else /* no NBPC */
15103# ifdef PAGESIZE
15104# define getpagesize() PAGESIZE
15105# endif /* PAGESIZE */
15106# endif /* no NBPC */
15107# endif /* no NBPG */
15108# endif /* no EXEC_PAGESIZE */
15109# else /* no HAVE_SYS_PARAM_H */
15110# define getpagesize() 8192 /* punt totally */
15111# endif /* no HAVE_SYS_PARAM_H */
15112# endif /* no _SC_PAGESIZE */
15113
15114#endif /* no HAVE_GETPAGESIZE */
15115
bec39cab
AC
15116int
15117main ()
15118{
a9322a30
TT
15119 char *data, *data2, *data3;
15120 int i, pagesize;
15121 int fd;
15122
15123 pagesize = getpagesize ();
15124
15125 /* First, make a file with some known garbage in it. */
15126 data = (char *) malloc (pagesize);
15127 if (!data)
15128 exit (1);
15129 for (i = 0; i < pagesize; ++i)
15130 *(data + i) = rand ();
15131 umask (0);
15132 fd = creat ("conftest.mmap", 0600);
15133 if (fd < 0)
15134 exit (1);
15135 if (write (fd, data, pagesize) != pagesize)
15136 exit (1);
15137 close (fd);
15138
15139 /* Next, try to mmap the file at a fixed address which already has
15140 something else allocated at it. If we can, also make sure that
15141 we see the same garbage. */
15142 fd = open ("conftest.mmap", O_RDWR);
15143 if (fd < 0)
15144 exit (1);
15145 data2 = (char *) malloc (2 * pagesize);
15146 if (!data2)
15147 exit (1);
15148 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
15149 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
15150 MAP_PRIVATE | MAP_FIXED, fd, 0L))
15151 exit (1);
15152 for (i = 0; i < pagesize; ++i)
15153 if (*(data + i) != *(data2 + i))
15154 exit (1);
15155
15156 /* Finally, make sure that changes to the mapped area do not
15157 percolate back to the file as seen by read(). (This is a bug on
15158 some variants of i386 svr4.0.) */
15159 for (i = 0; i < pagesize; ++i)
15160 *(data2 + i) = *(data2 + i) + 1;
15161 data3 = (char *) malloc (pagesize);
15162 if (!data3)
15163 exit (1);
15164 if (read (fd, data3, pagesize) != pagesize)
15165 exit (1);
15166 for (i = 0; i < pagesize; ++i)
15167 if (*(data + i) != *(data3 + i))
15168 exit (1);
15169 close (fd);
15170 exit (0);
bec39cab
AC
15171}
15172_ACEOF
a9322a30 15173rm -f conftest$ac_exeext
a3828db0 15174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30 15175 (eval $ac_link) 2>&5
bec39cab
AC
15176 ac_status=$?
15177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30 15178 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
15179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15180 (eval $ac_try) 2>&5
15181 ac_status=$?
15182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15183 (exit $ac_status); }; }; then
a9322a30 15184 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 15185else
a9322a30
TT
15186 echo "$as_me: program exited with status $ac_status" >&5
15187echo "$as_me: failed program was:" >&5
bec39cab
AC
15188sed 's/^/| /' conftest.$ac_ext >&5
15189
a9322a30
TT
15190( exit $ac_status )
15191ac_cv_func_mmap_fixed_mapped=no
a3828db0 15192fi
a9322a30 15193rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a3828db0 15194fi
a9322a30
TT
15195fi
15196echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
15197echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
15198if test $ac_cv_func_mmap_fixed_mapped = yes; then
15199
15200cat >>confdefs.h <<\_ACEOF
15201#define HAVE_MMAP 1
a3828db0
MK
15202_ACEOF
15203
086ec9eb 15204fi
a9322a30 15205rm -f conftest.mmap
a3828db0 15206
a9322a30
TT
15207echo "$as_me:$LINENO: checking for pid_t" >&5
15208echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15209if test "${ac_cv_type_pid_t+set}" = set; then
a3828db0
MK
15210 echo $ECHO_N "(cached) $ECHO_C" >&6
15211else
15212 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15213/* confdefs.h. */
15214_ACEOF
15215cat confdefs.h >>conftest.$ac_ext
15216cat >>conftest.$ac_ext <<_ACEOF
15217/* end confdefs.h. */
a9322a30 15218$ac_includes_default
bec39cab
AC
15219int
15220main ()
15221{
a9322a30
TT
15222if ((pid_t *) 0)
15223 return 0;
15224if (sizeof (pid_t))
15225 return 0;
bec39cab
AC
15226 ;
15227 return 0;
15228}
15229_ACEOF
a9322a30
TT
15230rm -f conftest.$ac_objext
15231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15232 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
15233 ac_status=$?
15234 grep -v '^ *+' conftest.er1 >conftest.err
15235 rm -f conftest.er1
15236 cat conftest.err >&5
15237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15238 (exit $ac_status); } &&
b4e70030
JB
15239 { ac_try='test -z "$ac_c_werror_flag"
15240 || test ! -s conftest.err'
bec39cab
AC
15241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15242 (eval $ac_try) 2>&5
15243 ac_status=$?
15244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15245 (exit $ac_status); }; } &&
a9322a30 15246 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
15247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15248 (eval $ac_try) 2>&5
15249 ac_status=$?
15250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15251 (exit $ac_status); }; }; then
a9322a30 15252 ac_cv_type_pid_t=yes
086ec9eb 15253else
bec39cab
AC
15254 echo "$as_me: failed program was:" >&5
15255sed 's/^/| /' conftest.$ac_ext >&5
15256
a9322a30 15257ac_cv_type_pid_t=no
086ec9eb 15258fi
a9322a30 15259rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
086ec9eb 15260fi
a9322a30
TT
15261echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
15262echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15263if test $ac_cv_type_pid_t = yes; then
15264 :
15265else
15266
15267cat >>confdefs.h <<_ACEOF
15268#define pid_t int
bec39cab 15269_ACEOF
086ec9eb
MK
15270
15271fi
15272
a3828db0 15273
a9322a30
TT
15274
15275for ac_header in unistd.h vfork.h
a3828db0 15276do
a9322a30
TT
15277as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15278if eval "test \"\${$as_ac_Header+set}\" = set"; then
15279 echo "$as_me:$LINENO: checking for $ac_header" >&5
15280echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15281if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 15282 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
15283fi
15284echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15285echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 15286else
a9322a30
TT
15287 # Is the header compilable?
15288echo "$as_me:$LINENO: checking $ac_header usability" >&5
15289echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15290cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15291/* confdefs.h. */
15292_ACEOF
15293cat confdefs.h >>conftest.$ac_ext
15294cat >>conftest.$ac_ext <<_ACEOF
15295/* end confdefs.h. */
a9322a30
TT
15296$ac_includes_default
15297#include <$ac_header>
bec39cab 15298_ACEOF
a9322a30
TT
15299rm -f conftest.$ac_objext
15300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15301 (eval $ac_compile) 2>conftest.er1
bec39cab 15302 ac_status=$?
a3828db0
MK
15303 grep -v '^ *+' conftest.er1 >conftest.err
15304 rm -f conftest.er1
15305 cat conftest.err >&5
bec39cab 15306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 15307 (exit $ac_status); } &&
b4e70030
JB
15308 { ac_try='test -z "$ac_c_werror_flag"
15309 || test ! -s conftest.err'
a3828db0
MK
15310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15311 (eval $ac_try) 2>&5
15312 ac_status=$?
15313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15314 (exit $ac_status); }; } &&
a9322a30 15315 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
15316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15317 (eval $ac_try) 2>&5
15318 ac_status=$?
15319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15320 (exit $ac_status); }; }; then
a9322a30 15321 ac_header_compiler=yes
c906108c 15322else
a3828db0 15323 echo "$as_me: failed program was:" >&5
bec39cab
AC
15324sed 's/^/| /' conftest.$ac_ext >&5
15325
a9322a30 15326ac_header_compiler=no
97bf5e38 15327fi
a9322a30
TT
15328rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15329echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15330echo "${ECHO_T}$ac_header_compiler" >&6
15331
15332# Is the header present?
15333echo "$as_me:$LINENO: checking $ac_header presence" >&5
15334echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15335cat >conftest.$ac_ext <<_ACEOF
15336/* confdefs.h. */
15337_ACEOF
15338cat confdefs.h >>conftest.$ac_ext
15339cat >>conftest.$ac_ext <<_ACEOF
15340/* end confdefs.h. */
15341#include <$ac_header>
15342_ACEOF
15343if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15344 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15345 ac_status=$?
15346 grep -v '^ *+' conftest.er1 >conftest.err
15347 rm -f conftest.er1
15348 cat conftest.err >&5
15349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15350 (exit $ac_status); } >/dev/null; then
15351 if test -s conftest.err; then
15352 ac_cpp_err=$ac_c_preproc_warn_flag
15353 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15354 else
15355 ac_cpp_err=
15356 fi
15357else
15358 ac_cpp_err=yes
a3828db0 15359fi
a9322a30
TT
15360if test -z "$ac_cpp_err"; then
15361 ac_header_preproc=yes
15362else
15363 echo "$as_me: failed program was:" >&5
15364sed 's/^/| /' conftest.$ac_ext >&5
15365
15366 ac_header_preproc=no
15367fi
15368rm -f conftest.err conftest.$ac_ext
15369echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15370echo "${ECHO_T}$ac_header_preproc" >&6
15371
15372# So? What about this header?
15373case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15374 yes:no: )
15375 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15376echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15377 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15378echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15379 ac_header_preproc=yes
15380 ;;
15381 no:yes:* )
15382 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15383echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15384 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15385echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15386 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15387echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15388 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15389echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
15390 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15391echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15392 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15393echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15394 (
15395 cat <<\_ASBOX
15396## ------------------------------------------ ##
15397## Report this to the AC_PACKAGE_NAME lists. ##
15398## ------------------------------------------ ##
15399_ASBOX
15400 ) |
15401 sed "s/^/$as_me: WARNING: /" >&2
15402 ;;
15403esac
15404echo "$as_me:$LINENO: checking for $ac_header" >&5
15405echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15406if eval "test \"\${$as_ac_Header+set}\" = set"; then
15407 echo $ECHO_N "(cached) $ECHO_C" >&6
15408else
15409 eval "$as_ac_Header=\$ac_header_preproc"
15410fi
15411echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15412echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15413
15414fi
15415if test `eval echo '${'$as_ac_Header'}'` = yes; then
a3828db0 15416 cat >>confdefs.h <<_ACEOF
a9322a30 15417#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 15418_ACEOF
c906108c
SS
15419
15420fi
a9322a30 15421
a3828db0 15422done
c906108c 15423
a3828db0 15424
a9322a30
TT
15425
15426for ac_func in fork vfork
a3828db0
MK
15427do
15428as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15429echo "$as_me:$LINENO: checking for $ac_func" >&5
15430echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15431if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 15432 echo $ECHO_N "(cached) $ECHO_C" >&6
b83266a0 15433else
bec39cab
AC
15434 cat >conftest.$ac_ext <<_ACEOF
15435/* confdefs.h. */
15436_ACEOF
15437cat confdefs.h >>conftest.$ac_ext
15438cat >>conftest.$ac_ext <<_ACEOF
15439/* end confdefs.h. */
a3828db0
MK
15440/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15441 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15442#define $ac_func innocuous_$ac_func
b83266a0 15443
a3828db0
MK
15444/* System header to define __stub macros and hopefully few prototypes,
15445 which can conflict with char $ac_func (); below.
15446 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15447 <limits.h> exists even on freestanding compilers. */
15448
15449#ifdef __STDC__
15450# include <limits.h>
15451#else
15452# include <assert.h>
15453#endif
15454
15455#undef $ac_func
15456
b4e70030 15457/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
15458#ifdef __cplusplus
15459extern "C"
b4e70030 15460{
a3828db0 15461#endif
b4e70030
JB
15462/* We use char because int might match the return type of a gcc2
15463 builtin and then its argument prototype would still apply. */
a3828db0
MK
15464char $ac_func ();
15465/* The GNU C library defines this for functions which it implements
15466 to always fail with ENOSYS. Some functions are actually named
15467 something starting with __ and the normal name is an alias. */
b4e70030 15468#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 15469choke me
b4e70030
JB
15470#else
15471char (*f) () = $ac_func;
15472#endif
15473#ifdef __cplusplus
15474}
a3828db0 15475#endif
97bf5e38 15476
bec39cab
AC
15477int
15478main ()
15479{
b4e70030 15480return f != $ac_func;
bec39cab
AC
15481 ;
15482 return 0;
15483}
15484_ACEOF
a3828db0
MK
15485rm -f conftest.$ac_objext conftest$ac_exeext
15486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15487 (eval $ac_link) 2>conftest.er1
bec39cab
AC
15488 ac_status=$?
15489 grep -v '^ *+' conftest.er1 >conftest.err
15490 rm -f conftest.er1
15491 cat conftest.err >&5
15492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15493 (exit $ac_status); } &&
b4e70030
JB
15494 { ac_try='test -z "$ac_c_werror_flag"
15495 || test ! -s conftest.err'
bec39cab
AC
15496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15497 (eval $ac_try) 2>&5
15498 ac_status=$?
15499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15500 (exit $ac_status); }; } &&
a3828db0 15501 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
15502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15503 (eval $ac_try) 2>&5
15504 ac_status=$?
15505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15506 (exit $ac_status); }; }; then
a3828db0 15507 eval "$as_ac_var=yes"
b83266a0 15508else
bec39cab
AC
15509 echo "$as_me: failed program was:" >&5
15510sed 's/^/| /' conftest.$ac_ext >&5
15511
b4e70030 15512eval "$as_ac_var=no"
b83266a0 15513fi
a3828db0
MK
15514rm -f conftest.err conftest.$ac_objext \
15515 conftest$ac_exeext conftest.$ac_ext
b83266a0 15516fi
b4e70030
JB
15517echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15518echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
15519if test `eval echo '${'$as_ac_var'}'` = yes; then
15520 cat >>confdefs.h <<_ACEOF
15521#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 15522_ACEOF
b83266a0 15523
97bf5e38 15524fi
a3828db0 15525done
b83266a0 15526
a9322a30
TT
15527if test "x$ac_cv_func_fork" = xyes; then
15528 echo "$as_me:$LINENO: checking for working fork" >&5
15529echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15530if test "${ac_cv_func_fork_works+set}" = set; then
15531 echo $ECHO_N "(cached) $ECHO_C" >&6
15532else
15533 if test "$cross_compiling" = yes; then
15534 ac_cv_func_fork_works=cross
15535else
15536 cat >conftest.$ac_ext <<_ACEOF
15537/* By Ruediger Kuhlmann. */
15538 #include <sys/types.h>
15539 #if HAVE_UNISTD_H
15540 # include <unistd.h>
15541 #endif
15542 /* Some systems only have a dummy stub for fork() */
15543 int main ()
15544 {
15545 if (fork() < 0)
15546 exit (1);
15547 exit (0);
15548 }
15549_ACEOF
15550rm -f conftest$ac_exeext
15551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15552 (eval $ac_link) 2>&5
15553 ac_status=$?
15554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15555 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15557 (eval $ac_try) 2>&5
15558 ac_status=$?
15559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15560 (exit $ac_status); }; }; then
15561 ac_cv_func_fork_works=yes
15562else
15563 echo "$as_me: program exited with status $ac_status" >&5
15564echo "$as_me: failed program was:" >&5
15565sed 's/^/| /' conftest.$ac_ext >&5
15566
15567( exit $ac_status )
15568ac_cv_func_fork_works=no
15569fi
15570rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15571fi
15572fi
15573echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
15574echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15575
15576else
15577 ac_cv_func_fork_works=$ac_cv_func_fork
15578fi
15579if test "x$ac_cv_func_fork_works" = xcross; then
15580 case $host in
15581 *-*-amigaos* | *-*-msdosdjgpp*)
15582 # Override, as these systems have only a dummy fork() stub
15583 ac_cv_func_fork_works=no
15584 ;;
15585 *)
15586 ac_cv_func_fork_works=yes
15587 ;;
15588 esac
15589 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15590echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15591fi
15592ac_cv_func_vfork_works=$ac_cv_func_vfork
15593if test "x$ac_cv_func_vfork" = xyes; then
15594 echo "$as_me:$LINENO: checking for working vfork" >&5
15595echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15596if test "${ac_cv_func_vfork_works+set}" = set; then
15597 echo $ECHO_N "(cached) $ECHO_C" >&6
15598else
15599 if test "$cross_compiling" = yes; then
15600 ac_cv_func_vfork_works=cross
15601else
15602 cat >conftest.$ac_ext <<_ACEOF
15603/* confdefs.h. */
15604_ACEOF
15605cat confdefs.h >>conftest.$ac_ext
15606cat >>conftest.$ac_ext <<_ACEOF
15607/* end confdefs.h. */
15608/* Thanks to Paul Eggert for this test. */
15609#include <stdio.h>
15610#include <stdlib.h>
15611#include <sys/types.h>
15612#include <sys/stat.h>
15613#include <sys/wait.h>
15614#if HAVE_UNISTD_H
15615# include <unistd.h>
15616#endif
15617#if HAVE_VFORK_H
15618# include <vfork.h>
15619#endif
15620/* On some sparc systems, changes by the child to local and incoming
15621 argument registers are propagated back to the parent. The compiler
15622 is told about this with #include <vfork.h>, but some compilers
15623 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15624 static variable whose address is put into a register that is
15625 clobbered by the vfork. */
15626static void
15627#ifdef __cplusplus
15628sparc_address_test (int arg)
15629# else
15630sparc_address_test (arg) int arg;
15631#endif
15632{
15633 static pid_t child;
15634 if (!child) {
15635 child = vfork ();
15636 if (child < 0) {
15637 perror ("vfork");
15638 _exit(2);
15639 }
15640 if (!child) {
15641 arg = getpid();
15642 write(-1, "", 0);
15643 _exit (arg);
15644 }
15645 }
15646}
15647
15648int
15649main ()
15650{
15651 pid_t parent = getpid ();
15652 pid_t child;
15653
15654 sparc_address_test (0);
15655
15656 child = vfork ();
15657
15658 if (child == 0) {
15659 /* Here is another test for sparc vfork register problems. This
15660 test uses lots of local variables, at least as many local
15661 variables as main has allocated so far including compiler
15662 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15663 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15664 reuse the register of parent for one of the local variables,
15665 since it will think that parent can't possibly be used any more
15666 in this routine. Assigning to the local variable will thus
15667 munge parent in the parent process. */
15668 pid_t
15669 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15670 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15671 /* Convince the compiler that p..p7 are live; otherwise, it might
15672 use the same hardware register for all 8 local variables. */
15673 if (p != p1 || p != p2 || p != p3 || p != p4
15674 || p != p5 || p != p6 || p != p7)
15675 _exit(1);
15676
15677 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15678 from child file descriptors. If the child closes a descriptor
15679 before it execs or exits, this munges the parent's descriptor
15680 as well. Test for this by closing stdout in the child. */
15681 _exit(close(fileno(stdout)) != 0);
15682 } else {
15683 int status;
15684 struct stat st;
15685
15686 while (wait(&status) != child)
15687 ;
15688 exit(
15689 /* Was there some problem with vforking? */
15690 child < 0
15691
15692 /* Did the child fail? (This shouldn't happen.) */
15693 || status
15694
15695 /* Did the vfork/compiler bug occur? */
15696 || parent != getpid()
15697
15698 /* Did the file descriptor bug occur? */
15699 || fstat(fileno(stdout), &st) != 0
15700 );
15701 }
15702}
15703_ACEOF
15704rm -f conftest$ac_exeext
15705if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15706 (eval $ac_link) 2>&5
15707 ac_status=$?
15708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15709 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15711 (eval $ac_try) 2>&5
15712 ac_status=$?
15713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15714 (exit $ac_status); }; }; then
15715 ac_cv_func_vfork_works=yes
15716else
15717 echo "$as_me: program exited with status $ac_status" >&5
15718echo "$as_me: failed program was:" >&5
15719sed 's/^/| /' conftest.$ac_ext >&5
15720
15721( exit $ac_status )
15722ac_cv_func_vfork_works=no
15723fi
15724rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15725fi
15726fi
15727echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
15728echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15729
15730fi;
15731if test "x$ac_cv_func_fork_works" = xcross; then
15732 ac_cv_func_vfork_works=$ac_cv_func_vfork
15733 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15734echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15735fi
15736
15737if test "x$ac_cv_func_vfork_works" = xyes; then
15738
15739cat >>confdefs.h <<\_ACEOF
15740#define HAVE_WORKING_VFORK 1
15741_ACEOF
15742
15743else
15744
15745cat >>confdefs.h <<\_ACEOF
15746#define vfork fork
15747_ACEOF
15748
15749fi
15750if test "x$ac_cv_func_fork_works" = xyes; then
15751
15752cat >>confdefs.h <<\_ACEOF
15753#define HAVE_WORKING_FORK 1
15754_ACEOF
15755
15756fi
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
a3828db0 15775
fc3b640d 15776
6c7a06a3 15777
a8111142 15778
a9322a30
TT
15779for ac_func in canonicalize_file_name realpath getrusage getuid \
15780 getgid poll pread64 sbrk setpgid setpgrp setsid \
15781 sigaction sigprocmask sigsetmask socketpair syscall \
fc3b640d 15782 ttrace wborder setlocale iconvlist libiconvlist
a3828db0
MK
15783do
15784as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15785echo "$as_me:$LINENO: checking for $ac_func" >&5
15786echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15787if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
15788 echo $ECHO_N "(cached) $ECHO_C" >&6
15789else
15790 cat >conftest.$ac_ext <<_ACEOF
15791/* confdefs.h. */
15792_ACEOF
15793cat confdefs.h >>conftest.$ac_ext
15794cat >>conftest.$ac_ext <<_ACEOF
15795/* end confdefs.h. */
a3828db0
MK
15796/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15797 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15798#define $ac_func innocuous_$ac_func
a4db0f07 15799
a3828db0
MK
15800/* System header to define __stub macros and hopefully few prototypes,
15801 which can conflict with char $ac_func (); below.
15802 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15803 <limits.h> exists even on freestanding compilers. */
15804
15805#ifdef __STDC__
15806# include <limits.h>
15807#else
15808# include <assert.h>
15809#endif
15810
15811#undef $ac_func
15812
b4e70030 15813/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
15814#ifdef __cplusplus
15815extern "C"
b4e70030 15816{
a3828db0 15817#endif
b4e70030
JB
15818/* We use char because int might match the return type of a gcc2
15819 builtin and then its argument prototype would still apply. */
a3828db0
MK
15820char $ac_func ();
15821/* The GNU C library defines this for functions which it implements
15822 to always fail with ENOSYS. Some functions are actually named
15823 something starting with __ and the normal name is an alias. */
b4e70030 15824#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 15825choke me
b4e70030
JB
15826#else
15827char (*f) () = $ac_func;
15828#endif
15829#ifdef __cplusplus
15830}
a3828db0 15831#endif
97bf5e38 15832
bec39cab
AC
15833int
15834main ()
15835{
6c7a06a3
TT
15836return f != $ac_func;
15837 ;
15838 return 0;
15839}
15840_ACEOF
15841rm -f conftest.$ac_objext conftest$ac_exeext
15842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15843 (eval $ac_link) 2>conftest.er1
15844 ac_status=$?
15845 grep -v '^ *+' conftest.er1 >conftest.err
15846 rm -f conftest.er1
15847 cat conftest.err >&5
15848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15849 (exit $ac_status); } &&
15850 { ac_try='test -z "$ac_c_werror_flag"
15851 || test ! -s conftest.err'
15852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15853 (eval $ac_try) 2>&5
15854 ac_status=$?
15855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15856 (exit $ac_status); }; } &&
15857 { ac_try='test -s conftest$ac_exeext'
15858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15859 (eval $ac_try) 2>&5
15860 ac_status=$?
15861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15862 (exit $ac_status); }; }; then
15863 eval "$as_ac_var=yes"
15864else
15865 echo "$as_me: failed program was:" >&5
15866sed 's/^/| /' conftest.$ac_ext >&5
15867
15868eval "$as_ac_var=no"
15869fi
15870rm -f conftest.err conftest.$ac_objext \
15871 conftest$ac_exeext conftest.$ac_ext
15872fi
15873echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15874echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15875if test `eval echo '${'$as_ac_var'}'` = yes; then
15876 cat >>confdefs.h <<_ACEOF
15877#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15878_ACEOF
15879
15880fi
15881done
15882
15883
15884 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
15885echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
15886if test "${am_cv_langinfo_codeset+set}" = set; then
15887 echo $ECHO_N "(cached) $ECHO_C" >&6
15888else
15889 cat >conftest.$ac_ext <<_ACEOF
15890/* confdefs.h. */
15891_ACEOF
15892cat confdefs.h >>conftest.$ac_ext
15893cat >>conftest.$ac_ext <<_ACEOF
15894/* end confdefs.h. */
15895#include <langinfo.h>
15896int
15897main ()
15898{
15899char* cs = nl_langinfo(CODESET);
bec39cab
AC
15900 ;
15901 return 0;
15902}
15903_ACEOF
a3828db0
MK
15904rm -f conftest.$ac_objext conftest$ac_exeext
15905if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15906 (eval $ac_link) 2>conftest.er1
bec39cab
AC
15907 ac_status=$?
15908 grep -v '^ *+' conftest.er1 >conftest.err
15909 rm -f conftest.er1
15910 cat conftest.err >&5
15911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15912 (exit $ac_status); } &&
b4e70030
JB
15913 { ac_try='test -z "$ac_c_werror_flag"
15914 || test ! -s conftest.err'
bec39cab
AC
15915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15916 (eval $ac_try) 2>&5
15917 ac_status=$?
15918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15919 (exit $ac_status); }; } &&
a3828db0 15920 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
15921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15922 (eval $ac_try) 2>&5
15923 ac_status=$?
15924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15925 (exit $ac_status); }; }; then
6c7a06a3 15926 am_cv_langinfo_codeset=yes
a4db0f07 15927else
bec39cab
AC
15928 echo "$as_me: failed program was:" >&5
15929sed 's/^/| /' conftest.$ac_ext >&5
15930
6c7a06a3 15931am_cv_langinfo_codeset=no
a4db0f07 15932fi
a3828db0
MK
15933rm -f conftest.err conftest.$ac_objext \
15934 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 15935
a4db0f07 15936fi
6c7a06a3
TT
15937echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
15938echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
15939 if test $am_cv_langinfo_codeset = yes; then
15940
15941cat >>confdefs.h <<\_ACEOF
15942#define HAVE_LANGINFO_CODESET 1
bec39cab 15943_ACEOF
a4db0f07 15944
6c7a06a3 15945 fi
c906108c 15946
06825bd1 15947
a3828db0
MK
15948# Check the return and argument types of ptrace. No canned test for
15949# this, so roll our own.
15950gdb_ptrace_headers='
15951#if HAVE_SYS_TYPES_H
15952# include <sys/types.h>
15953#endif
15954#if HAVE_SYS_PTRACE_H
15955# include <sys/ptrace.h>
15956#endif
15957#if HAVE_UNISTD_H
15958# include <unistd.h>
15959#endif
15960'
15961# There is no point in checking if we don't have a prototype.
b4e70030
JB
15962echo "$as_me:$LINENO: checking whether ptrace is declared" >&5
15963echo $ECHO_N "checking whether ptrace is declared... $ECHO_C" >&6
a3828db0 15964if test "${ac_cv_have_decl_ptrace+set}" = set; then
bec39cab
AC
15965 echo $ECHO_N "(cached) $ECHO_C" >&6
15966else
15967 cat >conftest.$ac_ext <<_ACEOF
15968/* confdefs.h. */
15969_ACEOF
15970cat confdefs.h >>conftest.$ac_ext
15971cat >>conftest.$ac_ext <<_ACEOF
15972/* end confdefs.h. */
a3828db0
MK
15973$gdb_ptrace_headers
15974
bec39cab
AC
15975int
15976main ()
15977{
a3828db0
MK
15978#ifndef ptrace
15979 char *p = (char *) ptrace;
06825bd1 15980#endif
a3828db0 15981
bec39cab
AC
15982 ;
15983 return 0;
15984}
15985_ACEOF
15986rm -f conftest.$ac_objext
15987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15988 (eval $ac_compile) 2>conftest.er1
15989 ac_status=$?
15990 grep -v '^ *+' conftest.er1 >conftest.err
15991 rm -f conftest.er1
15992 cat conftest.err >&5
15993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15994 (exit $ac_status); } &&
b4e70030
JB
15995 { ac_try='test -z "$ac_c_werror_flag"
15996 || test ! -s conftest.err'
bec39cab
AC
15997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15998 (eval $ac_try) 2>&5
15999 ac_status=$?
16000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16001 (exit $ac_status); }; } &&
16002 { ac_try='test -s conftest.$ac_objext'
16003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16004 (eval $ac_try) 2>&5
16005 ac_status=$?
16006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16007 (exit $ac_status); }; }; then
a3828db0 16008 ac_cv_have_decl_ptrace=yes
06825bd1 16009else
bec39cab
AC
16010 echo "$as_me: failed program was:" >&5
16011sed 's/^/| /' conftest.$ac_ext >&5
16012
b4e70030 16013ac_cv_have_decl_ptrace=no
06825bd1 16014fi
bec39cab 16015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 16016fi
b4e70030
JB
16017echo "$as_me:$LINENO: result: $ac_cv_have_decl_ptrace" >&5
16018echo "${ECHO_T}$ac_cv_have_decl_ptrace" >&6
a3828db0 16019if test $ac_cv_have_decl_ptrace = yes; then
06825bd1 16020
a3828db0
MK
16021cat >>confdefs.h <<_ACEOF
16022#define HAVE_DECL_PTRACE 1
16023_ACEOF
bec39cab 16024
bec39cab 16025
a3828db0
MK
16026else
16027 cat >>confdefs.h <<_ACEOF
16028#define HAVE_DECL_PTRACE 0
bec39cab 16029_ACEOF
06825bd1 16030
a3828db0
MK
16031
16032 : ${gdb_cv_func_ptrace_ret='int'}
16033 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
16034
06825bd1
MK
16035fi
16036
a3828db0 16037
064ef605
DJ
16038# Check return type. Varargs (used on GNU/Linux) conflict with the
16039# empty argument list, so check for that explicitly.
b4e70030
JB
16040echo "$as_me:$LINENO: checking return type of ptrace" >&5
16041echo $ECHO_N "checking return type of ptrace... $ECHO_C" >&6
a3828db0 16042if test "${gdb_cv_func_ptrace_ret+set}" = set; then
bec39cab
AC
16043 echo $ECHO_N "(cached) $ECHO_C" >&6
16044else
16045 cat >conftest.$ac_ext <<_ACEOF
16046/* confdefs.h. */
16047_ACEOF
16048cat confdefs.h >>conftest.$ac_ext
16049cat >>conftest.$ac_ext <<_ACEOF
16050/* end confdefs.h. */
a3828db0 16051$gdb_ptrace_headers
bec39cab
AC
16052int
16053main ()
16054{
064ef605
DJ
16055extern long ptrace (enum __ptrace_request, ...);
16056 ;
16057 return 0;
16058}
16059_ACEOF
16060rm -f conftest.$ac_objext
16061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16062 (eval $ac_compile) 2>conftest.er1
16063 ac_status=$?
16064 grep -v '^ *+' conftest.er1 >conftest.err
16065 rm -f conftest.er1
16066 cat conftest.err >&5
16067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16068 (exit $ac_status); } &&
16069 { ac_try='test -z "$ac_c_werror_flag"
16070 || test ! -s conftest.err'
16071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16072 (eval $ac_try) 2>&5
16073 ac_status=$?
16074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16075 (exit $ac_status); }; } &&
16076 { ac_try='test -s conftest.$ac_objext'
16077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16078 (eval $ac_try) 2>&5
16079 ac_status=$?
16080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16081 (exit $ac_status); }; }; then
16082 gdb_cv_func_ptrace_ret='long'
16083else
16084 echo "$as_me: failed program was:" >&5
16085sed 's/^/| /' conftest.$ac_ext >&5
16086
16087cat >conftest.$ac_ext <<_ACEOF
16088/* confdefs.h. */
16089_ACEOF
16090cat confdefs.h >>conftest.$ac_ext
16091cat >>conftest.$ac_ext <<_ACEOF
16092/* end confdefs.h. */
16093$gdb_ptrace_headers
16094int
16095main ()
16096{
a3828db0 16097extern int ptrace ();
bec39cab
AC
16098 ;
16099 return 0;
16100}
16101_ACEOF
16102rm -f conftest.$ac_objext
16103if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16104 (eval $ac_compile) 2>conftest.er1
16105 ac_status=$?
16106 grep -v '^ *+' conftest.er1 >conftest.err
16107 rm -f conftest.er1
16108 cat conftest.err >&5
16109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16110 (exit $ac_status); } &&
b4e70030
JB
16111 { ac_try='test -z "$ac_c_werror_flag"
16112 || test ! -s conftest.err'
bec39cab
AC
16113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16114 (eval $ac_try) 2>&5
16115 ac_status=$?
16116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16117 (exit $ac_status); }; } &&
16118 { ac_try='test -s conftest.$ac_objext'
16119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16120 (eval $ac_try) 2>&5
16121 ac_status=$?
16122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16123 (exit $ac_status); }; }; then
a3828db0 16124 gdb_cv_func_ptrace_ret='int'
70f9f479 16125else
bec39cab
AC
16126 echo "$as_me: failed program was:" >&5
16127sed 's/^/| /' conftest.$ac_ext >&5
16128
b4e70030 16129gdb_cv_func_ptrace_ret='long'
70f9f479 16130fi
bec39cab 16131rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 16132fi
064ef605
DJ
16133rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16134fi
b4e70030
JB
16135echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_ret" >&5
16136echo "${ECHO_T}$gdb_cv_func_ptrace_ret" >&6
bec39cab 16137
a3828db0
MK
16138cat >>confdefs.h <<_ACEOF
16139#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 16140_ACEOF
70f9f479 16141
a3828db0 16142# Check argument types.
b4e70030
JB
16143echo "$as_me:$LINENO: checking types of arguments for ptrace" >&5
16144echo $ECHO_N "checking types of arguments for ptrace... $ECHO_C" >&6
a3828db0 16145if test "${gdb_cv_func_ptrace_args+set}" = set; then
bec39cab
AC
16146 echo $ECHO_N "(cached) $ECHO_C" >&6
16147else
a3828db0 16148
064ef605
DJ
16149 cat >conftest.$ac_ext <<_ACEOF
16150/* confdefs.h. */
16151_ACEOF
16152cat confdefs.h >>conftest.$ac_ext
16153cat >>conftest.$ac_ext <<_ACEOF
16154/* end confdefs.h. */
16155$gdb_ptrace_headers
16156int
16157main ()
16158{
16159extern long ptrace (enum __ptrace_request, ...);
16160 ;
16161 return 0;
16162}
16163_ACEOF
16164rm -f conftest.$ac_objext
16165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16166 (eval $ac_compile) 2>conftest.er1
16167 ac_status=$?
16168 grep -v '^ *+' conftest.er1 >conftest.err
16169 rm -f conftest.er1
16170 cat conftest.err >&5
16171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16172 (exit $ac_status); } &&
16173 { ac_try='test -z "$ac_c_werror_flag"
16174 || test ! -s conftest.err'
16175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16176 (eval $ac_try) 2>&5
16177 ac_status=$?
16178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16179 (exit $ac_status); }; } &&
16180 { ac_try='test -s conftest.$ac_objext'
16181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16182 (eval $ac_try) 2>&5
16183 ac_status=$?
16184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16185 (exit $ac_status); }; }; then
16186 gdb_cv_func_ptrace_args='int,int,long,long'
16187else
16188 echo "$as_me: failed program was:" >&5
16189sed 's/^/| /' conftest.$ac_ext >&5
16190
16191
a3828db0
MK
16192for gdb_arg1 in 'int' 'long'; do
16193 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 16194 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0
MK
16195 for gdb_arg4 in 'int' 'long'; do
16196 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
16197/* confdefs.h. */
16198_ACEOF
16199cat confdefs.h >>conftest.$ac_ext
16200cat >>conftest.$ac_ext <<_ACEOF
16201/* end confdefs.h. */
a3828db0 16202$gdb_ptrace_headers
bec39cab
AC
16203int
16204main ()
16205{
a3828db0
MK
16206
16207extern $gdb_cv_func_ptrace_ret
16208 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
16209
bec39cab
AC
16210 ;
16211 return 0;
16212}
16213_ACEOF
16214rm -f conftest.$ac_objext
16215if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16216 (eval $ac_compile) 2>conftest.er1
16217 ac_status=$?
16218 grep -v '^ *+' conftest.er1 >conftest.err
16219 rm -f conftest.er1
16220 cat conftest.err >&5
16221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16222 (exit $ac_status); } &&
b4e70030
JB
16223 { ac_try='test -z "$ac_c_werror_flag"
16224 || test ! -s conftest.err'
bec39cab
AC
16225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16226 (eval $ac_try) 2>&5
16227 ac_status=$?
16228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16229 (exit $ac_status); }; } &&
16230 { ac_try='test -s conftest.$ac_objext'
16231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16232 (eval $ac_try) 2>&5
16233 ac_status=$?
16234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16235 (exit $ac_status); }; }; then
a3828db0
MK
16236 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
16237 break 4;
5c7f2947 16238else
bec39cab
AC
16239 echo "$as_me: failed program was:" >&5
16240sed 's/^/| /' conftest.$ac_ext >&5
16241
5c7f2947 16242fi
bec39cab 16243rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
16244 for gdb_arg5 in 'int *' 'int' 'long'; do
16245 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
16246/* confdefs.h. */
16247_ACEOF
16248cat confdefs.h >>conftest.$ac_ext
16249cat >>conftest.$ac_ext <<_ACEOF
16250/* end confdefs.h. */
a3828db0 16251$gdb_ptrace_headers
bec39cab
AC
16252int
16253main ()
16254{
a3828db0
MK
16255
16256extern $gdb_cv_func_ptrace_ret
16257 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
16258
bec39cab
AC
16259 ;
16260 return 0;
16261}
16262_ACEOF
16263rm -f conftest.$ac_objext
16264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16265 (eval $ac_compile) 2>conftest.er1
16266 ac_status=$?
16267 grep -v '^ *+' conftest.er1 >conftest.err
16268 rm -f conftest.er1
16269 cat conftest.err >&5
16270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16271 (exit $ac_status); } &&
b4e70030
JB
16272 { ac_try='test -z "$ac_c_werror_flag"
16273 || test ! -s conftest.err'
bec39cab
AC
16274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16275 (eval $ac_try) 2>&5
16276 ac_status=$?
16277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16278 (exit $ac_status); }; } &&
16279 { ac_try='test -s conftest.$ac_objext'
16280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16281 (eval $ac_try) 2>&5
16282 ac_status=$?
16283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16284 (exit $ac_status); }; }; then
a3828db0
MK
16285
16286gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
16287 break 5;
78434e59 16288else
bec39cab
AC
16289 echo "$as_me: failed program was:" >&5
16290sed 's/^/| /' conftest.$ac_ext >&5
16291
78434e59 16292fi
bec39cab 16293rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
16294 done
16295 done
16296 done
16297 done
16298done
16299# Provide a safe default value.
16300: ${gdb_cv_func_ptrace_args='int,int,long,long'}
16301
064ef605
DJ
16302fi
16303rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 16304fi
b4e70030
JB
16305echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_args" >&5
16306echo "${ECHO_T}$gdb_cv_func_ptrace_args" >&6
a3828db0
MK
16307ac_save_IFS=$IFS; IFS=','
16308set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
16309IFS=$ac_save_IFS
16310shift
bec39cab 16311
a3828db0
MK
16312cat >>confdefs.h <<_ACEOF
16313#define PTRACE_TYPE_ARG3 $3
16314_ACEOF
16315
16316if test -n "$5"; then
16317
16318cat >>confdefs.h <<_ACEOF
16319#define PTRACE_TYPE_ARG5 $5
bec39cab 16320_ACEOF
78434e59
MK
16321
16322fi
16323
a3828db0 16324if test "$cross_compiling" = no; then
b4e70030
JB
16325 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
16326echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 16327if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 16328 echo $ECHO_N "(cached) $ECHO_C" >&6
a3828db0
MK
16329else
16330 if test "$cross_compiling" = yes; then
16331 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
16332echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
16333 { (exit 1); exit 1; }; }
bec39cab
AC
16334else
16335 cat >conftest.$ac_ext <<_ACEOF
16336/* confdefs.h. */
16337_ACEOF
16338cat confdefs.h >>conftest.$ac_ext
16339cat >>conftest.$ac_ext <<_ACEOF
16340/* end confdefs.h. */
b4e70030
JB
16341#if HAVE_UNISTD_H
16342# include <unistd.h>
16343#endif
16344
bec39cab
AC
16345int
16346main ()
16347{
a3828db0
MK
16348/* If this system has a BSD-style setpgrp which takes arguments,
16349 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
16350 exit successfully. */
b4e70030 16351 exit (setpgrp (1,1) == -1 ? 0 : 1);
bec39cab
AC
16352 ;
16353 return 0;
16354}
16355_ACEOF
a3828db0
MK
16356rm -f conftest$ac_exeext
16357if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16358 (eval $ac_link) 2>&5
bec39cab
AC
16359 ac_status=$?
16360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 16361 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
16362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16363 (eval $ac_try) 2>&5
16364 ac_status=$?
16365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16366 (exit $ac_status); }; }; then
a3828db0 16367 ac_cv_func_setpgrp_void=no
c906108c 16368else
a3828db0
MK
16369 echo "$as_me: program exited with status $ac_status" >&5
16370echo "$as_me: failed program was:" >&5
bec39cab
AC
16371sed 's/^/| /' conftest.$ac_ext >&5
16372
a3828db0
MK
16373( exit $ac_status )
16374ac_cv_func_setpgrp_void=yes
c906108c 16375fi
b4e70030 16376rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 16377fi
a3828db0 16378fi
b4e70030
JB
16379echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
16380echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0
MK
16381if test $ac_cv_func_setpgrp_void = yes; then
16382
16383cat >>confdefs.h <<\_ACEOF
16384#define SETPGRP_VOID 1
bec39cab 16385_ACEOF
97bf5e38
MK
16386
16387fi
a3828db0
MK
16388
16389else
b4e70030
JB
16390 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
16391echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 16392if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 16393 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 16394else
bec39cab
AC
16395 cat >conftest.$ac_ext <<_ACEOF
16396/* confdefs.h. */
16397_ACEOF
16398cat confdefs.h >>conftest.$ac_ext
16399cat >>conftest.$ac_ext <<_ACEOF
16400/* end confdefs.h. */
a3828db0
MK
16401
16402#include <unistd.h>
16403
bec39cab
AC
16404int
16405main ()
16406{
a3828db0
MK
16407
16408 if (setpgrp(1,1) == -1)
16409 exit (0);
16410 else
16411 exit (1);
16412
bec39cab
AC
16413 ;
16414 return 0;
16415}
16416_ACEOF
16417rm -f conftest.$ac_objext
16418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16419 (eval $ac_compile) 2>conftest.er1
16420 ac_status=$?
16421 grep -v '^ *+' conftest.er1 >conftest.err
16422 rm -f conftest.er1
16423 cat conftest.err >&5
16424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16425 (exit $ac_status); } &&
b4e70030
JB
16426 { ac_try='test -z "$ac_c_werror_flag"
16427 || test ! -s conftest.err'
bec39cab
AC
16428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16429 (eval $ac_try) 2>&5
16430 ac_status=$?
16431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16432 (exit $ac_status); }; } &&
16433 { ac_try='test -s conftest.$ac_objext'
16434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16435 (eval $ac_try) 2>&5
16436 ac_status=$?
16437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16438 (exit $ac_status); }; }; then
a3828db0 16439 ac_cv_func_setpgrp_void=no
c906108c 16440else
bec39cab
AC
16441 echo "$as_me: failed program was:" >&5
16442sed 's/^/| /' conftest.$ac_ext >&5
16443
b4e70030 16444ac_cv_func_setpgrp_void=yes
c906108c 16445fi
bec39cab 16446rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16447fi
b4e70030
JB
16448echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
16449echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0 16450if test $ac_cv_func_setpgrp_void = yes; then
bec39cab 16451 cat >>confdefs.h <<\_ACEOF
a3828db0 16452#define SETPGRP_VOID 1
bec39cab 16453_ACEOF
c3f6f71d 16454
a3828db0 16455fi
c906108c
SS
16456fi
16457
a3828db0
MK
16458# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
16459# since sigsetjmp might only be defined as a macro.
b4e70030
JB
16460echo "$as_me:$LINENO: checking for sigsetjmp" >&5
16461echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
a3828db0 16462if test "${gdb_cv_func_sigsetjmp+set}" = set; then
bec39cab
AC
16463 echo $ECHO_N "(cached) $ECHO_C" >&6
16464else
16465 cat >conftest.$ac_ext <<_ACEOF
16466/* confdefs.h. */
16467_ACEOF
16468cat confdefs.h >>conftest.$ac_ext
16469cat >>conftest.$ac_ext <<_ACEOF
16470/* end confdefs.h. */
a3828db0
MK
16471
16472#include <setjmp.h>
16473
bec39cab
AC
16474int
16475main ()
16476{
a3828db0 16477sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
16478 ;
16479 return 0;
16480}
16481_ACEOF
16482rm -f conftest.$ac_objext
16483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16484 (eval $ac_compile) 2>conftest.er1
16485 ac_status=$?
16486 grep -v '^ *+' conftest.er1 >conftest.err
16487 rm -f conftest.er1
16488 cat conftest.err >&5
16489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16490 (exit $ac_status); } &&
b4e70030
JB
16491 { ac_try='test -z "$ac_c_werror_flag"
16492 || test ! -s conftest.err'
bec39cab
AC
16493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16494 (eval $ac_try) 2>&5
16495 ac_status=$?
16496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16497 (exit $ac_status); }; } &&
16498 { ac_try='test -s conftest.$ac_objext'
16499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16500 (eval $ac_try) 2>&5
16501 ac_status=$?
16502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16503 (exit $ac_status); }; }; then
a3828db0 16504 gdb_cv_func_sigsetjmp=yes
c906108c 16505else
bec39cab
AC
16506 echo "$as_me: failed program was:" >&5
16507sed 's/^/| /' conftest.$ac_ext >&5
16508
b4e70030 16509gdb_cv_func_sigsetjmp=no
c906108c 16510fi
bec39cab 16511rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16512fi
b4e70030
JB
16513echo "$as_me:$LINENO: result: $gdb_cv_func_sigsetjmp" >&5
16514echo "${ECHO_T}$gdb_cv_func_sigsetjmp" >&6
a3828db0 16515if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 16516
a3828db0
MK
16517cat >>confdefs.h <<\_ACEOF
16518#define HAVE_SIGSETJMP 1
bec39cab 16519_ACEOF
c906108c 16520
97bf5e38 16521fi
c906108c 16522
a3828db0
MK
16523# Assume we'll default to using the included libiberty regex.
16524gdb_use_included_regex=yes
16525
16526# However, if the system regex is GNU regex, then default to *not*
16527# using the included regex.
b4e70030
JB
16528echo "$as_me:$LINENO: checking for GNU regex" >&5
16529echo $ECHO_N "checking for GNU regex... $ECHO_C" >&6
a3828db0 16530if test "${gdb_cv_have_gnu_regex+set}" = set; then
bec39cab
AC
16531 echo $ECHO_N "(cached) $ECHO_C" >&6
16532else
16533 cat >conftest.$ac_ext <<_ACEOF
16534/* confdefs.h. */
16535_ACEOF
16536cat confdefs.h >>conftest.$ac_ext
16537cat >>conftest.$ac_ext <<_ACEOF
16538/* end confdefs.h. */
a3828db0 16539#include <gnu-versions.h>
bec39cab
AC
16540int
16541main ()
16542{
a3828db0
MK
16543#define REGEX_INTERFACE_VERSION 1
16544#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
16545# error "Version mismatch"
16546#endif
bec39cab
AC
16547 ;
16548 return 0;
16549}
16550_ACEOF
16551rm -f conftest.$ac_objext
16552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16553 (eval $ac_compile) 2>conftest.er1
16554 ac_status=$?
16555 grep -v '^ *+' conftest.er1 >conftest.err
16556 rm -f conftest.er1
16557 cat conftest.err >&5
16558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16559 (exit $ac_status); } &&
b4e70030
JB
16560 { ac_try='test -z "$ac_c_werror_flag"
16561 || test ! -s conftest.err'
bec39cab
AC
16562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16563 (eval $ac_try) 2>&5
16564 ac_status=$?
16565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16566 (exit $ac_status); }; } &&
16567 { ac_try='test -s conftest.$ac_objext'
16568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16569 (eval $ac_try) 2>&5
16570 ac_status=$?
16571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16572 (exit $ac_status); }; }; then
a3828db0 16573 gdb_cv_have_gnu_regex=yes
c906108c 16574else
bec39cab
AC
16575 echo "$as_me: failed program was:" >&5
16576sed 's/^/| /' conftest.$ac_ext >&5
16577
b4e70030 16578gdb_cv_have_gnu_regex=no
c906108c 16579fi
bec39cab 16580rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16581fi
b4e70030
JB
16582echo "$as_me:$LINENO: result: $gdb_cv_have_gnu_regex" >&5
16583echo "${ECHO_T}$gdb_cv_have_gnu_regex" >&6
a3828db0
MK
16584if test $gdb_cv_have_gnu_regex = yes; then
16585 gdb_use_included_regex=no
16586fi
c906108c 16587
a3828db0 16588
b4e70030 16589# Check whether --with-included-regex or --without-included-regex was given.
a3828db0 16590if test "${with_included_regex+set}" = set; then
b4e70030
JB
16591 withval="$with_included_regex"
16592 gdb_with_regex=$withval
a3828db0
MK
16593else
16594 gdb_with_regex=$gdb_use_included_regex
b4e70030 16595fi;
a3828db0
MK
16596if test "$gdb_with_regex" = yes; then
16597
16598cat >>confdefs.h <<\_ACEOF
16599#define USE_INCLUDED_REGEX 1
bec39cab 16600_ACEOF
c906108c 16601
97bf5e38 16602fi
c906108c 16603
5c45e068 16604# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
b4e70030
JB
16605echo "$as_me:$LINENO: checking for struct thread.td_pcb" >&5
16606echo $ECHO_N "checking for struct thread.td_pcb... $ECHO_C" >&6
5c45e068 16607if test "${ac_cv_member_struct_thread_td_pcb+set}" = set; then
bec39cab
AC
16608 echo $ECHO_N "(cached) $ECHO_C" >&6
16609else
16610 cat >conftest.$ac_ext <<_ACEOF
16611/* confdefs.h. */
16612_ACEOF
16613cat confdefs.h >>conftest.$ac_ext
16614cat >>conftest.$ac_ext <<_ACEOF
16615/* end confdefs.h. */
a3828db0
MK
16616#include <sys/param.h>
16617#include <sys/proc.h>
5c45e068
MK
16618
16619
bec39cab
AC
16620int
16621main ()
16622{
5c45e068
MK
16623static struct thread ac_aggr;
16624if (ac_aggr.td_pcb)
16625return 0;
bec39cab
AC
16626 ;
16627 return 0;
16628}
16629_ACEOF
16630rm -f conftest.$ac_objext
16631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16632 (eval $ac_compile) 2>conftest.er1
16633 ac_status=$?
16634 grep -v '^ *+' conftest.er1 >conftest.err
16635 rm -f conftest.er1
16636 cat conftest.err >&5
16637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16638 (exit $ac_status); } &&
b4e70030
JB
16639 { ac_try='test -z "$ac_c_werror_flag"
16640 || test ! -s conftest.err'
bec39cab
AC
16641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16642 (eval $ac_try) 2>&5
16643 ac_status=$?
16644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16645 (exit $ac_status); }; } &&
16646 { ac_try='test -s conftest.$ac_objext'
16647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16648 (eval $ac_try) 2>&5
16649 ac_status=$?
16650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16651 (exit $ac_status); }; }; then
5c45e068 16652 ac_cv_member_struct_thread_td_pcb=yes
c906108c 16653else
bec39cab
AC
16654 echo "$as_me: failed program was:" >&5
16655sed 's/^/| /' conftest.$ac_ext >&5
16656
b4e70030 16657cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16658/* confdefs.h. */
16659_ACEOF
16660cat confdefs.h >>conftest.$ac_ext
16661cat >>conftest.$ac_ext <<_ACEOF
16662/* end confdefs.h. */
16663#include <sys/param.h>
16664#include <sys/proc.h>
16665
16666
16667int
16668main ()
16669{
16670static struct thread ac_aggr;
16671if (sizeof ac_aggr.td_pcb)
16672return 0;
16673 ;
16674 return 0;
16675}
16676_ACEOF
16677rm -f conftest.$ac_objext
16678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16679 (eval $ac_compile) 2>conftest.er1
16680 ac_status=$?
16681 grep -v '^ *+' conftest.er1 >conftest.err
16682 rm -f conftest.er1
16683 cat conftest.err >&5
16684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16685 (exit $ac_status); } &&
b4e70030
JB
16686 { ac_try='test -z "$ac_c_werror_flag"
16687 || test ! -s conftest.err'
5c45e068
MK
16688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16689 (eval $ac_try) 2>&5
16690 ac_status=$?
16691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16692 (exit $ac_status); }; } &&
16693 { ac_try='test -s conftest.$ac_objext'
16694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16695 (eval $ac_try) 2>&5
16696 ac_status=$?
16697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16698 (exit $ac_status); }; }; then
16699 ac_cv_member_struct_thread_td_pcb=yes
16700else
16701 echo "$as_me: failed program was:" >&5
16702sed 's/^/| /' conftest.$ac_ext >&5
16703
b4e70030 16704ac_cv_member_struct_thread_td_pcb=no
5c45e068
MK
16705fi
16706rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16707fi
bec39cab 16708rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16709fi
b4e70030
JB
16710echo "$as_me:$LINENO: result: $ac_cv_member_struct_thread_td_pcb" >&5
16711echo "${ECHO_T}$ac_cv_member_struct_thread_td_pcb" >&6
5c45e068 16712if test $ac_cv_member_struct_thread_td_pcb = yes; then
c906108c 16713
5c45e068 16714cat >>confdefs.h <<_ACEOF
a3828db0 16715#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 16716_ACEOF
c906108c 16717
5c45e068 16718
97bf5e38 16719fi
c906108c 16720
5c45e068 16721
a3828db0 16722# See if <sys/lwp.h> defines `struct lwp`.
b4e70030
JB
16723echo "$as_me:$LINENO: checking for struct lwp" >&5
16724echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
a3828db0 16725if test "${gdb_cv_struct_lwp+set}" = set; then
bec39cab
AC
16726 echo $ECHO_N "(cached) $ECHO_C" >&6
16727else
16728 cat >conftest.$ac_ext <<_ACEOF
16729/* confdefs.h. */
16730_ACEOF
16731cat confdefs.h >>conftest.$ac_ext
16732cat >>conftest.$ac_ext <<_ACEOF
16733/* end confdefs.h. */
a3828db0
MK
16734#include <sys/param.h>
16735#include <sys/lwp.h>
bec39cab
AC
16736int
16737main ()
16738{
a3828db0 16739struct lwp l;
bec39cab
AC
16740 ;
16741 return 0;
16742}
16743_ACEOF
16744rm -f conftest.$ac_objext
16745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16746 (eval $ac_compile) 2>conftest.er1
16747 ac_status=$?
16748 grep -v '^ *+' conftest.er1 >conftest.err
16749 rm -f conftest.er1
16750 cat conftest.err >&5
16751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16752 (exit $ac_status); } &&
b4e70030
JB
16753 { ac_try='test -z "$ac_c_werror_flag"
16754 || test ! -s conftest.err'
bec39cab
AC
16755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16756 (eval $ac_try) 2>&5
16757 ac_status=$?
16758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16759 (exit $ac_status); }; } &&
16760 { ac_try='test -s conftest.$ac_objext'
16761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16762 (eval $ac_try) 2>&5
16763 ac_status=$?
16764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16765 (exit $ac_status); }; }; then
a3828db0 16766 gdb_cv_struct_lwp=yes
c906108c 16767else
bec39cab
AC
16768 echo "$as_me: failed program was:" >&5
16769sed 's/^/| /' conftest.$ac_ext >&5
16770
b4e70030 16771gdb_cv_struct_lwp=no
c906108c 16772fi
bec39cab 16773rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16774fi
b4e70030
JB
16775echo "$as_me:$LINENO: result: $gdb_cv_struct_lwp" >&5
16776echo "${ECHO_T}$gdb_cv_struct_lwp" >&6
a3828db0 16777if test $gdb_cv_struct_lwp = yes; then
c906108c 16778
a3828db0
MK
16779cat >>confdefs.h <<\_ACEOF
16780#define HAVE_STRUCT_LWP 1
bec39cab 16781_ACEOF
c906108c 16782
97bf5e38 16783fi
c906108c 16784
a3828db0 16785# See if <machine/reg.h> degines `struct reg'.
b4e70030
JB
16786echo "$as_me:$LINENO: checking for struct reg in machine/reg.h" >&5
16787echo $ECHO_N "checking for struct reg in machine/reg.h... $ECHO_C" >&6
a3828db0 16788if test "${gdb_cv_struct_reg+set}" = set; then
bec39cab
AC
16789 echo $ECHO_N "(cached) $ECHO_C" >&6
16790else
16791 cat >conftest.$ac_ext <<_ACEOF
16792/* confdefs.h. */
16793_ACEOF
16794cat confdefs.h >>conftest.$ac_ext
16795cat >>conftest.$ac_ext <<_ACEOF
16796/* end confdefs.h. */
a3828db0
MK
16797#include <sys/types.h>
16798#include <machine/reg.h>
bec39cab
AC
16799int
16800main ()
16801{
a3828db0 16802struct reg r;
bec39cab
AC
16803 ;
16804 return 0;
16805}
16806_ACEOF
16807rm -f conftest.$ac_objext
16808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16809 (eval $ac_compile) 2>conftest.er1
16810 ac_status=$?
16811 grep -v '^ *+' conftest.er1 >conftest.err
16812 rm -f conftest.er1
16813 cat conftest.err >&5
16814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16815 (exit $ac_status); } &&
b4e70030
JB
16816 { ac_try='test -z "$ac_c_werror_flag"
16817 || test ! -s conftest.err'
bec39cab
AC
16818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16819 (eval $ac_try) 2>&5
16820 ac_status=$?
16821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16822 (exit $ac_status); }; } &&
16823 { ac_try='test -s conftest.$ac_objext'
16824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16825 (eval $ac_try) 2>&5
16826 ac_status=$?
16827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16828 (exit $ac_status); }; }; then
a3828db0 16829 gdb_cv_struct_reg=yes
27ca5dad 16830else
bec39cab
AC
16831 echo "$as_me: failed program was:" >&5
16832sed 's/^/| /' conftest.$ac_ext >&5
16833
b4e70030 16834gdb_cv_struct_reg=no
27ca5dad 16835fi
bec39cab 16836rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 16837fi
b4e70030
JB
16838echo "$as_me:$LINENO: result: $gdb_cv_struct_reg" >&5
16839echo "${ECHO_T}$gdb_cv_struct_reg" >&6
a3828db0 16840if test $gdb_cv_struct_reg = yes; then
bec39cab
AC
16841
16842cat >>confdefs.h <<\_ACEOF
a3828db0 16843#define HAVE_STRUCT_REG 1
bec39cab 16844_ACEOF
27ca5dad
MC
16845
16846fi
97bf5e38 16847
a3828db0
MK
16848# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
16849# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
b4e70030
JB
16850echo "$as_me:$LINENO: checking for struct reg.r_fs" >&5
16851echo $ECHO_N "checking for struct reg.r_fs... $ECHO_C" >&6
5c45e068 16852if test "${ac_cv_member_struct_reg_r_fs+set}" = set; then
bec39cab 16853 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16854else
bec39cab
AC
16855 cat >conftest.$ac_ext <<_ACEOF
16856/* confdefs.h. */
16857_ACEOF
16858cat confdefs.h >>conftest.$ac_ext
16859cat >>conftest.$ac_ext <<_ACEOF
16860/* end confdefs.h. */
a3828db0 16861#include <machine/reg.h>
5c45e068
MK
16862
16863int
16864main ()
16865{
16866static struct reg ac_aggr;
16867if (ac_aggr.r_fs)
16868return 0;
16869 ;
16870 return 0;
16871}
16872_ACEOF
16873rm -f conftest.$ac_objext
16874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16875 (eval $ac_compile) 2>conftest.er1
16876 ac_status=$?
16877 grep -v '^ *+' conftest.er1 >conftest.err
16878 rm -f conftest.er1
16879 cat conftest.err >&5
16880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16881 (exit $ac_status); } &&
b4e70030
JB
16882 { ac_try='test -z "$ac_c_werror_flag"
16883 || test ! -s conftest.err'
5c45e068
MK
16884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16885 (eval $ac_try) 2>&5
16886 ac_status=$?
16887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16888 (exit $ac_status); }; } &&
16889 { ac_try='test -s conftest.$ac_objext'
16890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16891 (eval $ac_try) 2>&5
16892 ac_status=$?
16893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16894 (exit $ac_status); }; }; then
16895 ac_cv_member_struct_reg_r_fs=yes
16896else
16897 echo "$as_me: failed program was:" >&5
16898sed 's/^/| /' conftest.$ac_ext >&5
16899
b4e70030 16900cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16901/* confdefs.h. */
16902_ACEOF
16903cat confdefs.h >>conftest.$ac_ext
16904cat >>conftest.$ac_ext <<_ACEOF
16905/* end confdefs.h. */
16906#include <machine/reg.h>
16907
bec39cab
AC
16908int
16909main ()
16910{
5c45e068
MK
16911static struct reg ac_aggr;
16912if (sizeof ac_aggr.r_fs)
16913return 0;
bec39cab
AC
16914 ;
16915 return 0;
16916}
16917_ACEOF
16918rm -f conftest.$ac_objext
16919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16920 (eval $ac_compile) 2>conftest.er1
16921 ac_status=$?
16922 grep -v '^ *+' conftest.er1 >conftest.err
16923 rm -f conftest.er1
16924 cat conftest.err >&5
16925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16926 (exit $ac_status); } &&
b4e70030
JB
16927 { ac_try='test -z "$ac_c_werror_flag"
16928 || test ! -s conftest.err'
bec39cab
AC
16929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16930 (eval $ac_try) 2>&5
16931 ac_status=$?
16932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16933 (exit $ac_status); }; } &&
16934 { ac_try='test -s conftest.$ac_objext'
16935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16936 (eval $ac_try) 2>&5
16937 ac_status=$?
16938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16939 (exit $ac_status); }; }; then
5c45e068 16940 ac_cv_member_struct_reg_r_fs=yes
3862412b 16941else
bec39cab
AC
16942 echo "$as_me: failed program was:" >&5
16943sed 's/^/| /' conftest.$ac_ext >&5
16944
b4e70030 16945ac_cv_member_struct_reg_r_fs=no
3862412b 16946fi
bec39cab 16947rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 16948fi
5c45e068
MK
16949rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16950fi
b4e70030
JB
16951echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_fs" >&5
16952echo "${ECHO_T}$ac_cv_member_struct_reg_r_fs" >&6
5c45e068
MK
16953if test $ac_cv_member_struct_reg_r_fs = yes; then
16954
16955cat >>confdefs.h <<_ACEOF
a3828db0 16956#define HAVE_STRUCT_REG_R_FS 1
bec39cab 16957_ACEOF
3862412b 16958
5c45e068 16959
97bf5e38 16960fi
b4e70030
JB
16961echo "$as_me:$LINENO: checking for struct reg.r_gs" >&5
16962echo $ECHO_N "checking for struct reg.r_gs... $ECHO_C" >&6
5c45e068 16963if test "${ac_cv_member_struct_reg_r_gs+set}" = set; then
bec39cab 16964 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16965else
bec39cab
AC
16966 cat >conftest.$ac_ext <<_ACEOF
16967/* confdefs.h. */
16968_ACEOF
16969cat confdefs.h >>conftest.$ac_ext
16970cat >>conftest.$ac_ext <<_ACEOF
16971/* end confdefs.h. */
a3828db0 16972#include <machine/reg.h>
5c45e068 16973
bec39cab
AC
16974int
16975main ()
16976{
5c45e068
MK
16977static struct reg ac_aggr;
16978if (ac_aggr.r_gs)
16979return 0;
bec39cab
AC
16980 ;
16981 return 0;
16982}
16983_ACEOF
16984rm -f conftest.$ac_objext
16985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16986 (eval $ac_compile) 2>conftest.er1
16987 ac_status=$?
16988 grep -v '^ *+' conftest.er1 >conftest.err
16989 rm -f conftest.er1
16990 cat conftest.err >&5
16991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16992 (exit $ac_status); } &&
b4e70030
JB
16993 { ac_try='test -z "$ac_c_werror_flag"
16994 || test ! -s conftest.err'
bec39cab
AC
16995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16996 (eval $ac_try) 2>&5
16997 ac_status=$?
16998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16999 (exit $ac_status); }; } &&
17000 { ac_try='test -s conftest.$ac_objext'
17001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17002 (eval $ac_try) 2>&5
17003 ac_status=$?
17004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17005 (exit $ac_status); }; }; then
5c45e068 17006 ac_cv_member_struct_reg_r_gs=yes
3862412b 17007else
bec39cab
AC
17008 echo "$as_me: failed program was:" >&5
17009sed 's/^/| /' conftest.$ac_ext >&5
17010
b4e70030 17011cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
17012/* confdefs.h. */
17013_ACEOF
17014cat confdefs.h >>conftest.$ac_ext
17015cat >>conftest.$ac_ext <<_ACEOF
17016/* end confdefs.h. */
17017#include <machine/reg.h>
17018
17019int
17020main ()
17021{
17022static struct reg ac_aggr;
17023if (sizeof ac_aggr.r_gs)
17024return 0;
17025 ;
17026 return 0;
17027}
17028_ACEOF
17029rm -f conftest.$ac_objext
17030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17031 (eval $ac_compile) 2>conftest.er1
17032 ac_status=$?
17033 grep -v '^ *+' conftest.er1 >conftest.err
17034 rm -f conftest.er1
17035 cat conftest.err >&5
17036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17037 (exit $ac_status); } &&
b4e70030
JB
17038 { ac_try='test -z "$ac_c_werror_flag"
17039 || test ! -s conftest.err'
5c45e068
MK
17040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17041 (eval $ac_try) 2>&5
17042 ac_status=$?
17043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17044 (exit $ac_status); }; } &&
17045 { ac_try='test -s conftest.$ac_objext'
17046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17047 (eval $ac_try) 2>&5
17048 ac_status=$?
17049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17050 (exit $ac_status); }; }; then
17051 ac_cv_member_struct_reg_r_gs=yes
17052else
17053 echo "$as_me: failed program was:" >&5
17054sed 's/^/| /' conftest.$ac_ext >&5
17055
b4e70030 17056ac_cv_member_struct_reg_r_gs=no
3862412b 17057fi
bec39cab 17058rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 17059fi
5c45e068
MK
17060rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17061fi
b4e70030
JB
17062echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_gs" >&5
17063echo "${ECHO_T}$ac_cv_member_struct_reg_r_gs" >&6
5c45e068
MK
17064if test $ac_cv_member_struct_reg_r_gs = yes; then
17065
17066cat >>confdefs.h <<_ACEOF
a3828db0 17067#define HAVE_STRUCT_REG_R_GS 1
bec39cab 17068_ACEOF
3862412b 17069
5c45e068 17070
97bf5e38 17071fi
3862412b 17072
5c45e068 17073
a3828db0 17074# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
b4e70030
JB
17075echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
17076echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
a3828db0 17077if test "${gdb_cv_have_ptrace_getregs+set}" = set; then
bec39cab 17078 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 17079else
bec39cab
AC
17080 cat >conftest.$ac_ext <<_ACEOF
17081/* confdefs.h. */
17082_ACEOF
17083cat confdefs.h >>conftest.$ac_ext
17084cat >>conftest.$ac_ext <<_ACEOF
17085/* end confdefs.h. */
a3828db0 17086#include <sys/ptrace.h>
bec39cab
AC
17087int
17088main ()
17089{
a3828db0 17090PTRACE_GETREGS;
bec39cab
AC
17091 ;
17092 return 0;
17093}
17094_ACEOF
17095rm -f conftest.$ac_objext
17096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17097 (eval $ac_compile) 2>conftest.er1
17098 ac_status=$?
17099 grep -v '^ *+' conftest.er1 >conftest.err
17100 rm -f conftest.er1
17101 cat conftest.err >&5
17102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17103 (exit $ac_status); } &&
b4e70030
JB
17104 { ac_try='test -z "$ac_c_werror_flag"
17105 || test ! -s conftest.err'
bec39cab
AC
17106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17107 (eval $ac_try) 2>&5
17108 ac_status=$?
17109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17110 (exit $ac_status); }; } &&
17111 { ac_try='test -s conftest.$ac_objext'
17112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17113 (eval $ac_try) 2>&5
17114 ac_status=$?
17115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17116 (exit $ac_status); }; }; then
a3828db0 17117 gdb_cv_have_ptrace_getregs=yes
451928c5 17118else
bec39cab
AC
17119 echo "$as_me: failed program was:" >&5
17120sed 's/^/| /' conftest.$ac_ext >&5
17121
b4e70030 17122gdb_cv_have_ptrace_getregs=no
451928c5 17123fi
bec39cab 17124rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
17125fi
17126
b4e70030
JB
17127echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getregs" >&5
17128echo "${ECHO_T}$gdb_cv_have_ptrace_getregs" >&6
a3828db0 17129if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f
SE
17130
17131cat >>confdefs.h <<\_ACEOF
a3828db0 17132#define HAVE_PTRACE_GETREGS 1
bec39cab 17133_ACEOF
451928c5 17134
97bf5e38 17135fi
451928c5 17136
a3828db0 17137# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
b4e70030
JB
17138echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5
17139echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6
a3828db0 17140if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then
bec39cab 17141 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 17142else
bec39cab
AC
17143 cat >conftest.$ac_ext <<_ACEOF
17144/* confdefs.h. */
17145_ACEOF
17146cat confdefs.h >>conftest.$ac_ext
17147cat >>conftest.$ac_ext <<_ACEOF
17148/* end confdefs.h. */
a3828db0 17149#include <sys/ptrace.h>
bec39cab
AC
17150int
17151main ()
17152{
a3828db0 17153PTRACE_GETFPXREGS;
bec39cab
AC
17154 ;
17155 return 0;
17156}
17157_ACEOF
17158rm -f conftest.$ac_objext
17159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17160 (eval $ac_compile) 2>conftest.er1
17161 ac_status=$?
17162 grep -v '^ *+' conftest.er1 >conftest.err
17163 rm -f conftest.er1
17164 cat conftest.err >&5
17165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17166 (exit $ac_status); } &&
b4e70030
JB
17167 { ac_try='test -z "$ac_c_werror_flag"
17168 || test ! -s conftest.err'
bec39cab
AC
17169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17170 (eval $ac_try) 2>&5
17171 ac_status=$?
17172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17173 (exit $ac_status); }; } &&
17174 { ac_try='test -s conftest.$ac_objext'
17175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17176 (eval $ac_try) 2>&5
17177 ac_status=$?
17178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17179 (exit $ac_status); }; }; then
a3828db0 17180 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 17181else
bec39cab
AC
17182 echo "$as_me: failed program was:" >&5
17183sed 's/^/| /' conftest.$ac_ext >&5
17184
b4e70030 17185gdb_cv_have_ptrace_getfpxregs=no
451928c5 17186fi
bec39cab 17187rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
17188fi
17189
b4e70030
JB
17190echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getfpxregs" >&5
17191echo "${ECHO_T}$gdb_cv_have_ptrace_getfpxregs" >&6
a3828db0 17192if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f
SE
17193
17194cat >>confdefs.h <<\_ACEOF
a3828db0 17195#define HAVE_PTRACE_GETFPXREGS 1
bec39cab 17196_ACEOF
451928c5 17197
97bf5e38 17198fi
451928c5 17199
a3828db0 17200# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
b4e70030
JB
17201echo "$as_me:$LINENO: checking for PT_GETDBREGS" >&5
17202echo $ECHO_N "checking for PT_GETDBREGS... $ECHO_C" >&6
a3828db0 17203if test "${gdb_cv_have_pt_getdbregs+set}" = set; then
bec39cab 17204 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17205else
bec39cab
AC
17206 cat >conftest.$ac_ext <<_ACEOF
17207/* confdefs.h. */
17208_ACEOF
17209cat confdefs.h >>conftest.$ac_ext
17210cat >>conftest.$ac_ext <<_ACEOF
17211/* end confdefs.h. */
a3828db0
MK
17212#include <sys/types.h>
17213#include <sys/ptrace.h>
bec39cab
AC
17214int
17215main ()
17216{
a3828db0 17217PT_GETDBREGS;
bec39cab
AC
17218 ;
17219 return 0;
17220}
17221_ACEOF
17222rm -f conftest.$ac_objext
17223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17224 (eval $ac_compile) 2>conftest.er1
17225 ac_status=$?
17226 grep -v '^ *+' conftest.er1 >conftest.err
17227 rm -f conftest.er1
17228 cat conftest.err >&5
17229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17230 (exit $ac_status); } &&
b4e70030
JB
17231 { ac_try='test -z "$ac_c_werror_flag"
17232 || test ! -s conftest.err'
bec39cab
AC
17233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17234 (eval $ac_try) 2>&5
17235 ac_status=$?
17236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17237 (exit $ac_status); }; } &&
17238 { ac_try='test -s conftest.$ac_objext'
17239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17240 (eval $ac_try) 2>&5
17241 ac_status=$?
17242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17243 (exit $ac_status); }; }; then
a3828db0 17244 gdb_cv_have_pt_getdbregs=yes
3862412b 17245else
bec39cab
AC
17246 echo "$as_me: failed program was:" >&5
17247sed 's/^/| /' conftest.$ac_ext >&5
17248
b4e70030 17249gdb_cv_have_pt_getdbregs=no
3862412b 17250fi
bec39cab 17251rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
17252fi
17253
b4e70030
JB
17254echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getdbregs" >&5
17255echo "${ECHO_T}$gdb_cv_have_pt_getdbregs" >&6
a3828db0 17256if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f
SE
17257
17258cat >>confdefs.h <<\_ACEOF
a3828db0 17259#define HAVE_PT_GETDBREGS 1
bec39cab 17260_ACEOF
3862412b 17261
97bf5e38 17262fi
3862412b 17263
a3828db0 17264# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
b4e70030
JB
17265echo "$as_me:$LINENO: checking for PT_GETXMMREGS" >&5
17266echo $ECHO_N "checking for PT_GETXMMREGS... $ECHO_C" >&6
a3828db0 17267if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then
bec39cab 17268 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17269else
bec39cab
AC
17270 cat >conftest.$ac_ext <<_ACEOF
17271/* confdefs.h. */
17272_ACEOF
17273cat confdefs.h >>conftest.$ac_ext
17274cat >>conftest.$ac_ext <<_ACEOF
17275/* end confdefs.h. */
a3828db0
MK
17276#include <sys/types.h>
17277#include <sys/ptrace.h>
bec39cab
AC
17278int
17279main ()
17280{
a3828db0 17281PT_GETXMMREGS;
bec39cab
AC
17282 ;
17283 return 0;
17284}
17285_ACEOF
17286rm -f conftest.$ac_objext
17287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17288 (eval $ac_compile) 2>conftest.er1
17289 ac_status=$?
17290 grep -v '^ *+' conftest.er1 >conftest.err
17291 rm -f conftest.er1
17292 cat conftest.err >&5
17293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17294 (exit $ac_status); } &&
b4e70030
JB
17295 { ac_try='test -z "$ac_c_werror_flag"
17296 || test ! -s conftest.err'
bec39cab
AC
17297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17298 (eval $ac_try) 2>&5
17299 ac_status=$?
17300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17301 (exit $ac_status); }; } &&
17302 { ac_try='test -s conftest.$ac_objext'
17303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17304 (eval $ac_try) 2>&5
17305 ac_status=$?
17306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17307 (exit $ac_status); }; }; then
a3828db0 17308 gdb_cv_have_pt_getxmmregs=yes
3862412b 17309else
bec39cab
AC
17310 echo "$as_me: failed program was:" >&5
17311sed 's/^/| /' conftest.$ac_ext >&5
17312
b4e70030 17313gdb_cv_have_pt_getxmmregs=no
3862412b 17314fi
bec39cab 17315rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
17316fi
17317
b4e70030
JB
17318echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getxmmregs" >&5
17319echo "${ECHO_T}$gdb_cv_have_pt_getxmmregs" >&6
a3828db0 17320if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f
SE
17321
17322cat >>confdefs.h <<\_ACEOF
a3828db0 17323#define HAVE_PT_GETXMMREGS 1
bec39cab 17324_ACEOF
3862412b 17325
97bf5e38 17326fi
3862412b 17327
eb368090 17328# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
17329
17330if test "${target}" = "${host}"; then
17331 case "${host}" in
97bf5e38 17332 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f
SE
17333
17334cat >>confdefs.h <<\_ACEOF
97bf5e38 17335#define NEW_PROC_API 1
bec39cab 17336_ACEOF
97bf5e38
MK
17337
17338 ;;
c162e8c9 17339 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f
SE
17340
17341cat >>confdefs.h <<\_ACEOF
97bf5e38 17342#define NEW_PROC_API 1
bec39cab 17343_ACEOF
c960c18f
AC
17344
17345 ;;
17346 mips-sgi-irix5*)
17347 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f
SE
17348
17349cat >>confdefs.h <<\_ACEOF
c960c18f 17350#define _KMEMUSER 1
bec39cab 17351_ACEOF
97bf5e38
MK
17352
17353 ;;
17354 esac
17355fi
17356
17357if test "$ac_cv_header_sys_procfs_h" = yes; then
b4e70030
JB
17358 echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5
17359echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17360 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then
17361 echo $ECHO_N "(cached) $ECHO_C" >&6
17362else
17363 cat >conftest.$ac_ext <<_ACEOF
17364/* confdefs.h. */
17365_ACEOF
17366cat confdefs.h >>conftest.$ac_ext
17367cat >>conftest.$ac_ext <<_ACEOF
17368/* end confdefs.h. */
596c9d4b
KB
17369
17370#define _SYSCALL32
17371#include <sys/procfs.h>
bec39cab
AC
17372int
17373main ()
17374{
97bf5e38 17375pstatus_t avar
bec39cab
AC
17376 ;
17377 return 0;
17378}
17379_ACEOF
17380rm -f conftest.$ac_objext
17381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17382 (eval $ac_compile) 2>conftest.er1
17383 ac_status=$?
17384 grep -v '^ *+' conftest.er1 >conftest.err
17385 rm -f conftest.er1
17386 cat conftest.err >&5
17387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17388 (exit $ac_status); } &&
b4e70030
JB
17389 { ac_try='test -z "$ac_c_werror_flag"
17390 || test ! -s conftest.err'
bec39cab
AC
17391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17392 (eval $ac_try) 2>&5
17393 ac_status=$?
17394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17395 (exit $ac_status); }; } &&
17396 { ac_try='test -s conftest.$ac_objext'
17397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17398 (eval $ac_try) 2>&5
17399 ac_status=$?
17400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17401 (exit $ac_status); }; }; then
97bf5e38 17402 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 17403else
bec39cab
AC
17404 echo "$as_me: failed program was:" >&5
17405sed 's/^/| /' conftest.$ac_ext >&5
17406
b4e70030 17407bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 17408
596c9d4b 17409fi
bec39cab 17410rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17411fi
17412
97bf5e38 17413 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab
AC
17414
17415cat >>confdefs.h <<\_ACEOF
97bf5e38 17416#define HAVE_PSTATUS_T 1
bec39cab 17417_ACEOF
596c9d4b
KB
17418
17419 fi
b4e70030
JB
17420 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
17421echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6
596c9d4b 17422
b4e70030
JB
17423 echo "$as_me:$LINENO: checking for prrun_t in sys/procfs.h" >&5
17424echo $ECHO_N "checking for prrun_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17425 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then
17426 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 17427else
bec39cab
AC
17428 cat >conftest.$ac_ext <<_ACEOF
17429/* confdefs.h. */
17430_ACEOF
17431cat confdefs.h >>conftest.$ac_ext
17432cat >>conftest.$ac_ext <<_ACEOF
17433/* end confdefs.h. */
596c9d4b
KB
17434
17435#define _SYSCALL32
17436#include <sys/procfs.h>
bec39cab
AC
17437int
17438main ()
17439{
97bf5e38 17440prrun_t avar
bec39cab
AC
17441 ;
17442 return 0;
17443}
17444_ACEOF
17445rm -f conftest.$ac_objext
17446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17447 (eval $ac_compile) 2>conftest.er1
17448 ac_status=$?
17449 grep -v '^ *+' conftest.er1 >conftest.err
17450 rm -f conftest.er1
17451 cat conftest.err >&5
17452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17453 (exit $ac_status); } &&
b4e70030
JB
17454 { ac_try='test -z "$ac_c_werror_flag"
17455 || test ! -s conftest.err'
bec39cab
AC
17456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17457 (eval $ac_try) 2>&5
17458 ac_status=$?
17459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17460 (exit $ac_status); }; } &&
17461 { ac_try='test -s conftest.$ac_objext'
17462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17463 (eval $ac_try) 2>&5
17464 ac_status=$?
17465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17466 (exit $ac_status); }; }; then
97bf5e38 17467 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 17468else
bec39cab
AC
17469 echo "$as_me: failed program was:" >&5
17470sed 's/^/| /' conftest.$ac_ext >&5
17471
b4e70030 17472bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 17473
596c9d4b 17474fi
bec39cab 17475rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17476fi
17477
97bf5e38 17478 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab
AC
17479
17480cat >>confdefs.h <<\_ACEOF
97bf5e38 17481#define HAVE_PRRUN_T 1
bec39cab 17482_ACEOF
596c9d4b
KB
17483
17484 fi
b4e70030
JB
17485 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
17486echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prrun_t" >&6
596c9d4b 17487
b4e70030
JB
17488 echo "$as_me:$LINENO: checking for gregset_t in sys/procfs.h" >&5
17489echo $ECHO_N "checking for gregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17490 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then
17491 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 17492else
bec39cab
AC
17493 cat >conftest.$ac_ext <<_ACEOF
17494/* confdefs.h. */
17495_ACEOF
17496cat confdefs.h >>conftest.$ac_ext
17497cat >>conftest.$ac_ext <<_ACEOF
17498/* end confdefs.h. */
596c9d4b
KB
17499
17500#define _SYSCALL32
17501#include <sys/procfs.h>
bec39cab
AC
17502int
17503main ()
17504{
97bf5e38 17505gregset_t avar
bec39cab
AC
17506 ;
17507 return 0;
17508}
17509_ACEOF
17510rm -f conftest.$ac_objext
17511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17512 (eval $ac_compile) 2>conftest.er1
17513 ac_status=$?
17514 grep -v '^ *+' conftest.er1 >conftest.err
17515 rm -f conftest.er1
17516 cat conftest.err >&5
17517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17518 (exit $ac_status); } &&
b4e70030
JB
17519 { ac_try='test -z "$ac_c_werror_flag"
17520 || test ! -s conftest.err'
bec39cab
AC
17521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17522 (eval $ac_try) 2>&5
17523 ac_status=$?
17524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17525 (exit $ac_status); }; } &&
17526 { ac_try='test -s conftest.$ac_objext'
17527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17528 (eval $ac_try) 2>&5
17529 ac_status=$?
17530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17531 (exit $ac_status); }; }; then
97bf5e38 17532 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 17533else
bec39cab
AC
17534 echo "$as_me: failed program was:" >&5
17535sed 's/^/| /' conftest.$ac_ext >&5
17536
b4e70030 17537bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 17538
596c9d4b 17539fi
bec39cab 17540rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17541fi
17542
97bf5e38 17543 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab
AC
17544
17545cat >>confdefs.h <<\_ACEOF
97bf5e38 17546#define HAVE_GREGSET_T 1
bec39cab 17547_ACEOF
596c9d4b
KB
17548
17549 fi
b4e70030
JB
17550 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
17551echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_gregset_t" >&6
451928c5 17552
b4e70030
JB
17553 echo "$as_me:$LINENO: checking for fpregset_t in sys/procfs.h" >&5
17554echo $ECHO_N "checking for fpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17555 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then
17556 echo $ECHO_N "(cached) $ECHO_C" >&6
d84dd0c5 17557else
bec39cab
AC
17558 cat >conftest.$ac_ext <<_ACEOF
17559/* confdefs.h. */
17560_ACEOF
17561cat confdefs.h >>conftest.$ac_ext
17562cat >>conftest.$ac_ext <<_ACEOF
17563/* end confdefs.h. */
97bf5e38
MK
17564
17565#define _SYSCALL32
d84dd0c5 17566#include <sys/procfs.h>
bec39cab
AC
17567int
17568main ()
17569{
97bf5e38 17570fpregset_t avar
bec39cab
AC
17571 ;
17572 return 0;
17573}
17574_ACEOF
17575rm -f conftest.$ac_objext
17576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17577 (eval $ac_compile) 2>conftest.er1
17578 ac_status=$?
17579 grep -v '^ *+' conftest.er1 >conftest.err
17580 rm -f conftest.er1
17581 cat conftest.err >&5
17582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17583 (exit $ac_status); } &&
b4e70030
JB
17584 { ac_try='test -z "$ac_c_werror_flag"
17585 || test ! -s conftest.err'
bec39cab
AC
17586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17587 (eval $ac_try) 2>&5
17588 ac_status=$?
17589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17590 (exit $ac_status); }; } &&
17591 { ac_try='test -s conftest.$ac_objext'
17592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17593 (eval $ac_try) 2>&5
17594 ac_status=$?
17595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17596 (exit $ac_status); }; }; then
97bf5e38 17597 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 17598else
bec39cab
AC
17599 echo "$as_me: failed program was:" >&5
17600sed 's/^/| /' conftest.$ac_ext >&5
17601
b4e70030 17602bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 17603
d84dd0c5 17604fi
bec39cab 17605rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
17606fi
17607
97bf5e38 17608 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab
AC
17609
17610cat >>confdefs.h <<\_ACEOF
97bf5e38 17611#define HAVE_FPREGSET_T 1
bec39cab 17612_ACEOF
d84dd0c5 17613
97bf5e38 17614 fi
b4e70030
JB
17615 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
17616echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_fpregset_t" >&6
d84dd0c5 17617
b4e70030
JB
17618 echo "$as_me:$LINENO: checking for prgregset_t in sys/procfs.h" >&5
17619echo $ECHO_N "checking for prgregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17620 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then
17621 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17622else
bec39cab
AC
17623 cat >conftest.$ac_ext <<_ACEOF
17624/* confdefs.h. */
17625_ACEOF
17626cat confdefs.h >>conftest.$ac_ext
17627cat >>conftest.$ac_ext <<_ACEOF
17628/* end confdefs.h. */
c906108c 17629
97bf5e38
MK
17630#define _SYSCALL32
17631#include <sys/procfs.h>
bec39cab
AC
17632int
17633main ()
17634{
97bf5e38 17635prgregset_t avar
bec39cab
AC
17636 ;
17637 return 0;
17638}
17639_ACEOF
17640rm -f conftest.$ac_objext
17641if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17642 (eval $ac_compile) 2>conftest.er1
17643 ac_status=$?
17644 grep -v '^ *+' conftest.er1 >conftest.err
17645 rm -f conftest.er1
17646 cat conftest.err >&5
17647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17648 (exit $ac_status); } &&
b4e70030
JB
17649 { ac_try='test -z "$ac_c_werror_flag"
17650 || test ! -s conftest.err'
bec39cab
AC
17651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17652 (eval $ac_try) 2>&5
17653 ac_status=$?
17654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17655 (exit $ac_status); }; } &&
17656 { ac_try='test -s conftest.$ac_objext'
17657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17658 (eval $ac_try) 2>&5
17659 ac_status=$?
17660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17661 (exit $ac_status); }; }; then
97bf5e38 17662 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 17663else
bec39cab
AC
17664 echo "$as_me: failed program was:" >&5
17665sed 's/^/| /' conftest.$ac_ext >&5
17666
b4e70030 17667bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 17668
c906108c 17669fi
bec39cab 17670rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17671fi
17672
97bf5e38 17673 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab
AC
17674
17675cat >>confdefs.h <<\_ACEOF
97bf5e38 17676#define HAVE_PRGREGSET_T 1
bec39cab 17677_ACEOF
c906108c 17678
97bf5e38 17679 fi
b4e70030
JB
17680 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
17681echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset_t" >&6
c906108c 17682
b4e70030
JB
17683 echo "$as_me:$LINENO: checking for prfpregset_t in sys/procfs.h" >&5
17684echo $ECHO_N "checking for prfpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17685 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then
17686 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17687else
bec39cab
AC
17688 cat >conftest.$ac_ext <<_ACEOF
17689/* confdefs.h. */
17690_ACEOF
17691cat confdefs.h >>conftest.$ac_ext
17692cat >>conftest.$ac_ext <<_ACEOF
17693/* end confdefs.h. */
97bf5e38
MK
17694
17695#define _SYSCALL32
17696#include <sys/procfs.h>
bec39cab
AC
17697int
17698main ()
17699{
97bf5e38 17700prfpregset_t avar
bec39cab
AC
17701 ;
17702 return 0;
17703}
17704_ACEOF
17705rm -f conftest.$ac_objext
17706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17707 (eval $ac_compile) 2>conftest.er1
17708 ac_status=$?
17709 grep -v '^ *+' conftest.er1 >conftest.err
17710 rm -f conftest.er1
17711 cat conftest.err >&5
17712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17713 (exit $ac_status); } &&
b4e70030
JB
17714 { ac_try='test -z "$ac_c_werror_flag"
17715 || test ! -s conftest.err'
bec39cab
AC
17716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17717 (eval $ac_try) 2>&5
17718 ac_status=$?
17719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17720 (exit $ac_status); }; } &&
17721 { ac_try='test -s conftest.$ac_objext'
17722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17723 (eval $ac_try) 2>&5
17724 ac_status=$?
17725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17726 (exit $ac_status); }; }; then
97bf5e38 17727 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 17728else
bec39cab
AC
17729 echo "$as_me: failed program was:" >&5
17730sed 's/^/| /' conftest.$ac_ext >&5
17731
b4e70030 17732bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 17733
d45fe813 17734fi
bec39cab 17735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17736fi
17737
97bf5e38 17738 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab
AC
17739
17740cat >>confdefs.h <<\_ACEOF
97bf5e38 17741#define HAVE_PRFPREGSET_T 1
bec39cab 17742_ACEOF
d45fe813 17743
97bf5e38 17744 fi
b4e70030
JB
17745 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
17746echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6
d45fe813 17747
b4e70030
JB
17748 echo "$as_me:$LINENO: checking for prgregset32_t in sys/procfs.h" >&5
17749echo $ECHO_N "checking for prgregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17750 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then
17751 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17752else
bec39cab
AC
17753 cat >conftest.$ac_ext <<_ACEOF
17754/* confdefs.h. */
17755_ACEOF
17756cat confdefs.h >>conftest.$ac_ext
17757cat >>conftest.$ac_ext <<_ACEOF
17758/* end confdefs.h. */
97bf5e38
MK
17759
17760#define _SYSCALL32
17761#include <sys/procfs.h>
bec39cab
AC
17762int
17763main ()
17764{
97bf5e38 17765prgregset32_t avar
bec39cab
AC
17766 ;
17767 return 0;
17768}
17769_ACEOF
17770rm -f conftest.$ac_objext
17771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17772 (eval $ac_compile) 2>conftest.er1
17773 ac_status=$?
17774 grep -v '^ *+' conftest.er1 >conftest.err
17775 rm -f conftest.er1
17776 cat conftest.err >&5
17777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17778 (exit $ac_status); } &&
b4e70030
JB
17779 { ac_try='test -z "$ac_c_werror_flag"
17780 || test ! -s conftest.err'
bec39cab
AC
17781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17782 (eval $ac_try) 2>&5
17783 ac_status=$?
17784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17785 (exit $ac_status); }; } &&
17786 { ac_try='test -s conftest.$ac_objext'
17787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17788 (eval $ac_try) 2>&5
17789 ac_status=$?
17790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17791 (exit $ac_status); }; }; then
97bf5e38 17792 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 17793else
bec39cab
AC
17794 echo "$as_me: failed program was:" >&5
17795sed 's/^/| /' conftest.$ac_ext >&5
17796
b4e70030 17797bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 17798
d45fe813 17799fi
bec39cab 17800rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17801fi
17802
97bf5e38 17803 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab
AC
17804
17805cat >>confdefs.h <<\_ACEOF
97bf5e38 17806#define HAVE_PRGREGSET32_T 1
bec39cab 17807_ACEOF
d45fe813 17808
97bf5e38 17809 fi
b4e70030
JB
17810 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
17811echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6
d45fe813 17812
b4e70030
JB
17813 echo "$as_me:$LINENO: checking for prfpregset32_t in sys/procfs.h" >&5
17814echo $ECHO_N "checking for prfpregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17815 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then
17816 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17817else
bec39cab
AC
17818 cat >conftest.$ac_ext <<_ACEOF
17819/* confdefs.h. */
17820_ACEOF
17821cat confdefs.h >>conftest.$ac_ext
17822cat >>conftest.$ac_ext <<_ACEOF
17823/* end confdefs.h. */
97bf5e38
MK
17824
17825#define _SYSCALL32
17826#include <sys/procfs.h>
bec39cab
AC
17827int
17828main ()
17829{
97bf5e38 17830prfpregset32_t avar
bec39cab
AC
17831 ;
17832 return 0;
17833}
17834_ACEOF
17835rm -f conftest.$ac_objext
17836if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17837 (eval $ac_compile) 2>conftest.er1
17838 ac_status=$?
17839 grep -v '^ *+' conftest.er1 >conftest.err
17840 rm -f conftest.er1
17841 cat conftest.err >&5
17842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17843 (exit $ac_status); } &&
b4e70030
JB
17844 { ac_try='test -z "$ac_c_werror_flag"
17845 || test ! -s conftest.err'
bec39cab
AC
17846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17847 (eval $ac_try) 2>&5
17848 ac_status=$?
17849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17850 (exit $ac_status); }; } &&
17851 { ac_try='test -s conftest.$ac_objext'
17852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17853 (eval $ac_try) 2>&5
17854 ac_status=$?
17855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17856 (exit $ac_status); }; }; then
97bf5e38 17857 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 17858else
bec39cab
AC
17859 echo "$as_me: failed program was:" >&5
17860sed 's/^/| /' conftest.$ac_ext >&5
17861
b4e70030 17862bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 17863
d45fe813 17864fi
bec39cab 17865rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17866fi
17867
97bf5e38 17868 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab
AC
17869
17870cat >>confdefs.h <<\_ACEOF
97bf5e38 17871#define HAVE_PRFPREGSET32_T 1
bec39cab 17872_ACEOF
d45fe813 17873
97bf5e38 17874 fi
b4e70030
JB
17875 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
17876echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6
d45fe813 17877
b4e70030
JB
17878 echo "$as_me:$LINENO: checking for lwpid_t in sys/procfs.h" >&5
17879echo $ECHO_N "checking for lwpid_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17880 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then
17881 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17882else
bec39cab
AC
17883 cat >conftest.$ac_ext <<_ACEOF
17884/* confdefs.h. */
17885_ACEOF
17886cat confdefs.h >>conftest.$ac_ext
17887cat >>conftest.$ac_ext <<_ACEOF
17888/* end confdefs.h. */
97bf5e38 17889
d45fe813 17890#define _SYSCALL32
97bf5e38 17891#include <sys/procfs.h>
bec39cab
AC
17892int
17893main ()
17894{
97bf5e38 17895lwpid_t avar
bec39cab
AC
17896 ;
17897 return 0;
17898}
17899_ACEOF
17900rm -f conftest.$ac_objext
17901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17902 (eval $ac_compile) 2>conftest.er1
17903 ac_status=$?
17904 grep -v '^ *+' conftest.er1 >conftest.err
17905 rm -f conftest.er1
17906 cat conftest.err >&5
17907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17908 (exit $ac_status); } &&
b4e70030
JB
17909 { ac_try='test -z "$ac_c_werror_flag"
17910 || test ! -s conftest.err'
bec39cab
AC
17911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17912 (eval $ac_try) 2>&5
17913 ac_status=$?
17914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17915 (exit $ac_status); }; } &&
17916 { ac_try='test -s conftest.$ac_objext'
17917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17918 (eval $ac_try) 2>&5
17919 ac_status=$?
17920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17921 (exit $ac_status); }; }; then
97bf5e38 17922 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 17923else
bec39cab
AC
17924 echo "$as_me: failed program was:" >&5
17925sed 's/^/| /' conftest.$ac_ext >&5
17926
b4e70030 17927bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 17928
d45fe813 17929fi
bec39cab 17930rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17931fi
17932
97bf5e38 17933 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab
AC
17934
17935cat >>confdefs.h <<\_ACEOF
97bf5e38 17936#define HAVE_LWPID_T 1
bec39cab 17937_ACEOF
d45fe813 17938
97bf5e38 17939 fi
b4e70030
JB
17940 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
17941echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpid_t" >&6
c906108c 17942
b4e70030
JB
17943 echo "$as_me:$LINENO: checking for psaddr_t in sys/procfs.h" >&5
17944echo $ECHO_N "checking for psaddr_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17945 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then
17946 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17947else
bec39cab
AC
17948 cat >conftest.$ac_ext <<_ACEOF
17949/* confdefs.h. */
17950_ACEOF
17951cat confdefs.h >>conftest.$ac_ext
17952cat >>conftest.$ac_ext <<_ACEOF
17953/* end confdefs.h. */
c906108c 17954
97bf5e38
MK
17955#define _SYSCALL32
17956#include <sys/procfs.h>
bec39cab
AC
17957int
17958main ()
17959{
97bf5e38 17960psaddr_t avar
bec39cab
AC
17961 ;
17962 return 0;
17963}
17964_ACEOF
17965rm -f conftest.$ac_objext
17966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17967 (eval $ac_compile) 2>conftest.er1
17968 ac_status=$?
17969 grep -v '^ *+' conftest.er1 >conftest.err
17970 rm -f conftest.er1
17971 cat conftest.err >&5
17972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17973 (exit $ac_status); } &&
b4e70030
JB
17974 { ac_try='test -z "$ac_c_werror_flag"
17975 || test ! -s conftest.err'
bec39cab
AC
17976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17977 (eval $ac_try) 2>&5
17978 ac_status=$?
17979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17980 (exit $ac_status); }; } &&
17981 { ac_try='test -s conftest.$ac_objext'
17982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17983 (eval $ac_try) 2>&5
17984 ac_status=$?
17985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17986 (exit $ac_status); }; }; then
97bf5e38 17987 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 17988else
bec39cab
AC
17989 echo "$as_me: failed program was:" >&5
17990sed 's/^/| /' conftest.$ac_ext >&5
17991
b4e70030 17992bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 17993
c906108c 17994fi
bec39cab 17995rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17996fi
17997
97bf5e38 17998 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab
AC
17999
18000cat >>confdefs.h <<\_ACEOF
97bf5e38 18001#define HAVE_PSADDR_T 1
bec39cab 18002_ACEOF
c906108c 18003
97bf5e38 18004 fi
b4e70030
JB
18005 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
18006echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psaddr_t" >&6
c906108c 18007
b4e70030
JB
18008 echo "$as_me:$LINENO: checking for prsysent_t in sys/procfs.h" >&5
18009echo $ECHO_N "checking for prsysent_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18010 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then
18011 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18012else
bec39cab
AC
18013 cat >conftest.$ac_ext <<_ACEOF
18014/* confdefs.h. */
18015_ACEOF
18016cat confdefs.h >>conftest.$ac_ext
18017cat >>conftest.$ac_ext <<_ACEOF
18018/* end confdefs.h. */
c906108c 18019
97bf5e38
MK
18020#define _SYSCALL32
18021#include <sys/procfs.h>
bec39cab
AC
18022int
18023main ()
18024{
97bf5e38 18025prsysent_t avar
bec39cab
AC
18026 ;
18027 return 0;
18028}
18029_ACEOF
18030rm -f conftest.$ac_objext
18031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18032 (eval $ac_compile) 2>conftest.er1
18033 ac_status=$?
18034 grep -v '^ *+' conftest.er1 >conftest.err
18035 rm -f conftest.er1
18036 cat conftest.err >&5
18037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18038 (exit $ac_status); } &&
b4e70030
JB
18039 { ac_try='test -z "$ac_c_werror_flag"
18040 || test ! -s conftest.err'
bec39cab
AC
18041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18042 (eval $ac_try) 2>&5
18043 ac_status=$?
18044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18045 (exit $ac_status); }; } &&
18046 { ac_try='test -s conftest.$ac_objext'
18047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18048 (eval $ac_try) 2>&5
18049 ac_status=$?
18050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18051 (exit $ac_status); }; }; then
97bf5e38 18052 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 18053else
bec39cab
AC
18054 echo "$as_me: failed program was:" >&5
18055sed 's/^/| /' conftest.$ac_ext >&5
18056
b4e70030 18057bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 18058
c906108c 18059fi
bec39cab 18060rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18061fi
18062
97bf5e38 18063 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab
AC
18064
18065cat >>confdefs.h <<\_ACEOF
97bf5e38 18066#define HAVE_PRSYSENT_T 1
bec39cab 18067_ACEOF
c906108c 18068
97bf5e38 18069 fi
b4e70030
JB
18070 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
18071echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prsysent_t" >&6
c906108c 18072
b4e70030
JB
18073 echo "$as_me:$LINENO: checking for pr_sigset_t in sys/procfs.h" >&5
18074echo $ECHO_N "checking for pr_sigset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18075 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then
18076 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18077else
bec39cab
AC
18078 cat >conftest.$ac_ext <<_ACEOF
18079/* confdefs.h. */
18080_ACEOF
18081cat confdefs.h >>conftest.$ac_ext
18082cat >>conftest.$ac_ext <<_ACEOF
18083/* end confdefs.h. */
c906108c 18084
97bf5e38
MK
18085#define _SYSCALL32
18086#include <sys/procfs.h>
bec39cab
AC
18087int
18088main ()
18089{
97bf5e38 18090pr_sigset_t avar
bec39cab
AC
18091 ;
18092 return 0;
18093}
18094_ACEOF
18095rm -f conftest.$ac_objext
18096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18097 (eval $ac_compile) 2>conftest.er1
18098 ac_status=$?
18099 grep -v '^ *+' conftest.er1 >conftest.err
18100 rm -f conftest.er1
18101 cat conftest.err >&5
18102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18103 (exit $ac_status); } &&
b4e70030
JB
18104 { ac_try='test -z "$ac_c_werror_flag"
18105 || test ! -s conftest.err'
bec39cab
AC
18106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18107 (eval $ac_try) 2>&5
18108 ac_status=$?
18109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18110 (exit $ac_status); }; } &&
18111 { ac_try='test -s conftest.$ac_objext'
18112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18113 (eval $ac_try) 2>&5
18114 ac_status=$?
18115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18116 (exit $ac_status); }; }; then
97bf5e38 18117 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 18118else
bec39cab
AC
18119 echo "$as_me: failed program was:" >&5
18120sed 's/^/| /' conftest.$ac_ext >&5
18121
b4e70030 18122bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 18123
c906108c 18124fi
bec39cab 18125rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18126fi
18127
97bf5e38 18128 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab
AC
18129
18130cat >>confdefs.h <<\_ACEOF
97bf5e38 18131#define HAVE_PR_SIGSET_T 1
bec39cab 18132_ACEOF
c906108c 18133
97bf5e38 18134 fi
b4e70030
JB
18135 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
18136echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6
c906108c 18137
b4e70030
JB
18138 echo "$as_me:$LINENO: checking for pr_sigaction64_t in sys/procfs.h" >&5
18139echo $ECHO_N "checking for pr_sigaction64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18140 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then
18141 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18142else
bec39cab
AC
18143 cat >conftest.$ac_ext <<_ACEOF
18144/* confdefs.h. */
18145_ACEOF
18146cat confdefs.h >>conftest.$ac_ext
18147cat >>conftest.$ac_ext <<_ACEOF
18148/* end confdefs.h. */
c906108c 18149
97bf5e38
MK
18150#define _SYSCALL32
18151#include <sys/procfs.h>
bec39cab
AC
18152int
18153main ()
18154{
97bf5e38 18155pr_sigaction64_t avar
bec39cab
AC
18156 ;
18157 return 0;
18158}
18159_ACEOF
18160rm -f conftest.$ac_objext
18161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18162 (eval $ac_compile) 2>conftest.er1
18163 ac_status=$?
18164 grep -v '^ *+' conftest.er1 >conftest.err
18165 rm -f conftest.er1
18166 cat conftest.err >&5
18167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18168 (exit $ac_status); } &&
b4e70030
JB
18169 { ac_try='test -z "$ac_c_werror_flag"
18170 || test ! -s conftest.err'
bec39cab
AC
18171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18172 (eval $ac_try) 2>&5
18173 ac_status=$?
18174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18175 (exit $ac_status); }; } &&
18176 { ac_try='test -s conftest.$ac_objext'
18177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18178 (eval $ac_try) 2>&5
18179 ac_status=$?
18180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18181 (exit $ac_status); }; }; then
97bf5e38 18182 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 18183else
bec39cab
AC
18184 echo "$as_me: failed program was:" >&5
18185sed 's/^/| /' conftest.$ac_ext >&5
18186
b4e70030 18187bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 18188
c906108c 18189fi
bec39cab 18190rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18191fi
18192
97bf5e38 18193 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab
AC
18194
18195cat >>confdefs.h <<\_ACEOF
97bf5e38 18196#define HAVE_PR_SIGACTION64_T 1
bec39cab 18197_ACEOF
c906108c 18198
97bf5e38 18199 fi
b4e70030
JB
18200 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
18201echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6
97bf5e38 18202
b4e70030
JB
18203 echo "$as_me:$LINENO: checking for pr_siginfo64_t in sys/procfs.h" >&5
18204echo $ECHO_N "checking for pr_siginfo64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18205 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then
18206 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18207else
bec39cab
AC
18208 cat >conftest.$ac_ext <<_ACEOF
18209/* confdefs.h. */
18210_ACEOF
18211cat confdefs.h >>conftest.$ac_ext
18212cat >>conftest.$ac_ext <<_ACEOF
18213/* end confdefs.h. */
97bf5e38
MK
18214
18215#define _SYSCALL32
18216#include <sys/procfs.h>
bec39cab
AC
18217int
18218main ()
18219{
97bf5e38 18220pr_siginfo64_t avar
bec39cab
AC
18221 ;
18222 return 0;
18223}
18224_ACEOF
18225rm -f conftest.$ac_objext
18226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18227 (eval $ac_compile) 2>conftest.er1
18228 ac_status=$?
18229 grep -v '^ *+' conftest.er1 >conftest.err
18230 rm -f conftest.er1
18231 cat conftest.err >&5
18232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18233 (exit $ac_status); } &&
b4e70030
JB
18234 { ac_try='test -z "$ac_c_werror_flag"
18235 || test ! -s conftest.err'
bec39cab
AC
18236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18237 (eval $ac_try) 2>&5
18238 ac_status=$?
18239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18240 (exit $ac_status); }; } &&
18241 { ac_try='test -s conftest.$ac_objext'
18242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18243 (eval $ac_try) 2>&5
18244 ac_status=$?
18245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18246 (exit $ac_status); }; }; then
97bf5e38
MK
18247 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
18248else
bec39cab
AC
18249 echo "$as_me: failed program was:" >&5
18250sed 's/^/| /' conftest.$ac_ext >&5
18251
b4e70030 18252bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 18253
97bf5e38 18254fi
bec39cab 18255rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18256fi
c906108c 18257
97bf5e38 18258 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab
AC
18259
18260cat >>confdefs.h <<\_ACEOF
97bf5e38 18261#define HAVE_PR_SIGINFO64_T 1
bec39cab 18262_ACEOF
c906108c 18263
97bf5e38 18264 fi
b4e70030
JB
18265 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
18266echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6
bec39cab
AC
18267
18268
97bf5e38
MK
18269
18270
18271
97bf5e38 18272 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
b4e70030
JB
18273 echo "$as_me:$LINENO: checking whether prfpregset_t type is broken" >&5
18274echo $ECHO_N "checking whether prfpregset_t type is broken... $ECHO_C" >&6
bec39cab
AC
18275 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then
18276 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
18277else
18278 if test "$cross_compiling" = yes; then
97bf5e38 18279 gdb_cv_prfpregset_t_broken=yes
c906108c 18280else
bec39cab
AC
18281 cat >conftest.$ac_ext <<_ACEOF
18282/* confdefs.h. */
18283_ACEOF
18284cat confdefs.h >>conftest.$ac_ext
18285cat >>conftest.$ac_ext <<_ACEOF
18286/* end confdefs.h. */
97bf5e38
MK
18287#include <sys/procfs.h>
18288 int main ()
18289 {
18290 if (sizeof (prfpregset_t) == sizeof (void *))
18291 return 1;
18292 return 0;
18293 }
bec39cab
AC
18294_ACEOF
18295rm -f conftest$ac_exeext
18296if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18297 (eval $ac_link) 2>&5
18298 ac_status=$?
18299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18300 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18302 (eval $ac_try) 2>&5
18303 ac_status=$?
18304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18305 (exit $ac_status); }; }; then
97bf5e38 18306 gdb_cv_prfpregset_t_broken=no
c906108c 18307else
bec39cab
AC
18308 echo "$as_me: program exited with status $ac_status" >&5
18309echo "$as_me: failed program was:" >&5
18310sed 's/^/| /' conftest.$ac_ext >&5
18311
18312( exit $ac_status )
18313gdb_cv_prfpregset_t_broken=yes
c906108c 18314fi
b4e70030 18315rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 18316fi
c906108c
SS
18317fi
18318
b4e70030
JB
18319 echo "$as_me:$LINENO: result: $gdb_cv_prfpregset_t_broken" >&5
18320echo "${ECHO_T}$gdb_cv_prfpregset_t_broken" >&6
97bf5e38 18321 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f
SE
18322
18323cat >>confdefs.h <<\_ACEOF
97bf5e38 18324#define PRFPREGSET_T_BROKEN 1
bec39cab 18325_ACEOF
c906108c 18326
97bf5e38
MK
18327 fi
18328 fi
c906108c 18329
bec39cab 18330
b4e70030
JB
18331 echo "$as_me:$LINENO: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
18332echo $ECHO_N "checking for PIOCSET ioctl entry in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18333 if test "${gdb_cv_have_procfs_piocset+set}" = set; then
18334 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18335else
bec39cab
AC
18336 cat >conftest.$ac_ext <<_ACEOF
18337/* confdefs.h. */
18338_ACEOF
18339cat confdefs.h >>conftest.$ac_ext
18340cat >>conftest.$ac_ext <<_ACEOF
18341/* end confdefs.h. */
97bf5e38
MK
18342#include <unistd.h>
18343#include <sys/types.h>
18344#include <sys/procfs.h>
18345
bec39cab
AC
18346int
18347main ()
18348{
97bf5e38
MK
18349
18350 int dummy;;
18351 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
18352
18353 ;
18354 return 0;
18355}
18356_ACEOF
18357rm -f conftest.$ac_objext
18358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18359 (eval $ac_compile) 2>conftest.er1
18360 ac_status=$?
18361 grep -v '^ *+' conftest.er1 >conftest.err
18362 rm -f conftest.er1
18363 cat conftest.err >&5
18364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18365 (exit $ac_status); } &&
b4e70030
JB
18366 { ac_try='test -z "$ac_c_werror_flag"
18367 || test ! -s conftest.err'
bec39cab
AC
18368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18369 (eval $ac_try) 2>&5
18370 ac_status=$?
18371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18372 (exit $ac_status); }; } &&
18373 { ac_try='test -s conftest.$ac_objext'
18374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18375 (eval $ac_try) 2>&5
18376 ac_status=$?
18377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18378 (exit $ac_status); }; }; then
97bf5e38 18379 gdb_cv_have_procfs_piocset=yes
c906108c 18380else
bec39cab
AC
18381 echo "$as_me: failed program was:" >&5
18382sed 's/^/| /' conftest.$ac_ext >&5
18383
b4e70030 18384gdb_cv_have_procfs_piocset=no
c906108c 18385fi
bec39cab 18386rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18387fi
97bf5e38 18388
b4e70030
JB
18389 echo "$as_me:$LINENO: result: $gdb_cv_have_procfs_piocset" >&5
18390echo "${ECHO_T}$gdb_cv_have_procfs_piocset" >&6
97bf5e38 18391 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f
SE
18392
18393cat >>confdefs.h <<\_ACEOF
97bf5e38 18394#define HAVE_PROCFS_PIOCSET 1
bec39cab 18395_ACEOF
97bf5e38
MK
18396
18397 fi
c906108c 18398fi
c906108c 18399
97bf5e38 18400if test ${host} = ${target} ; then
bec39cab 18401
b4e70030
JB
18402 echo "$as_me:$LINENO: checking for member l_addr in struct link_map" >&5
18403echo $ECHO_N "checking for member l_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
18404 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then
18405 echo $ECHO_N "(cached) $ECHO_C" >&6
18406else
18407 cat >conftest.$ac_ext <<_ACEOF
18408/* confdefs.h. */
18409_ACEOF
18410cat confdefs.h >>conftest.$ac_ext
18411cat >>conftest.$ac_ext <<_ACEOF
18412/* end confdefs.h. */
97bf5e38 18413#include <link.h>
bec39cab
AC
18414int
18415main ()
18416{
97bf5e38 18417struct link_map lm; (void) lm.l_addr;
bec39cab
AC
18418 ;
18419 return 0;
18420}
18421_ACEOF
18422rm -f conftest.$ac_objext
18423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18424 (eval $ac_compile) 2>conftest.er1
18425 ac_status=$?
18426 grep -v '^ *+' conftest.er1 >conftest.err
18427 rm -f conftest.er1
18428 cat conftest.err >&5
18429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18430 (exit $ac_status); } &&
b4e70030
JB
18431 { ac_try='test -z "$ac_c_werror_flag"
18432 || test ! -s conftest.err'
bec39cab
AC
18433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18434 (eval $ac_try) 2>&5
18435 ac_status=$?
18436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18437 (exit $ac_status); }; } &&
18438 { ac_try='test -s conftest.$ac_objext'
18439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18440 (eval $ac_try) 2>&5
18441 ac_status=$?
18442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18443 (exit $ac_status); }; }; then
97bf5e38 18444 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 18445else
bec39cab
AC
18446 echo "$as_me: failed program was:" >&5
18447sed 's/^/| /' conftest.$ac_ext >&5
18448
b4e70030 18449gdb_cv_have_struct_link_map_with_l_members=no
c906108c 18450fi
bec39cab 18451rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18452fi
18453
b4e70030
JB
18454 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
18455echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_l_members" >&6
97bf5e38 18456 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f
SE
18457
18458cat >>confdefs.h <<\_ACEOF
97bf5e38 18459#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
bec39cab 18460_ACEOF
97bf5e38
MK
18461
18462 fi
18463
bec39cab 18464
b4e70030
JB
18465 echo "$as_me:$LINENO: checking for member lm_addr in struct link_map" >&5
18466echo $ECHO_N "checking for member lm_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
18467 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then
18468 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18469else
bec39cab
AC
18470 cat >conftest.$ac_ext <<_ACEOF
18471/* confdefs.h. */
18472_ACEOF
18473cat confdefs.h >>conftest.$ac_ext
18474cat >>conftest.$ac_ext <<_ACEOF
18475/* end confdefs.h. */
97bf5e38
MK
18476#include <sys/types.h>
18477#include <link.h>
bec39cab
AC
18478int
18479main ()
18480{
97bf5e38 18481struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
18482 ;
18483 return 0;
18484}
18485_ACEOF
18486rm -f conftest.$ac_objext
18487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18488 (eval $ac_compile) 2>conftest.er1
18489 ac_status=$?
18490 grep -v '^ *+' conftest.er1 >conftest.err
18491 rm -f conftest.er1
18492 cat conftest.err >&5
18493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18494 (exit $ac_status); } &&
b4e70030
JB
18495 { ac_try='test -z "$ac_c_werror_flag"
18496 || test ! -s conftest.err'
bec39cab
AC
18497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18498 (eval $ac_try) 2>&5
18499 ac_status=$?
18500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18501 (exit $ac_status); }; } &&
18502 { ac_try='test -s conftest.$ac_objext'
18503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18504 (eval $ac_try) 2>&5
18505 ac_status=$?
18506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18507 (exit $ac_status); }; }; then
97bf5e38
MK
18508 gdb_cv_have_struct_link_map_with_lm_members=yes
18509else
bec39cab
AC
18510 echo "$as_me: failed program was:" >&5
18511sed 's/^/| /' conftest.$ac_ext >&5
18512
b4e70030 18513gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 18514fi
bec39cab 18515rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18516fi
c906108c 18517
b4e70030
JB
18518 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
18519echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_lm_members" >&6
97bf5e38 18520 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f
SE
18521
18522cat >>confdefs.h <<\_ACEOF
97bf5e38 18523#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
bec39cab 18524_ACEOF
97bf5e38
MK
18525
18526 fi
18527
bec39cab 18528
b4e70030
JB
18529 echo "$as_me:$LINENO: checking for member som_addr in struct so_map" >&5
18530echo $ECHO_N "checking for member som_addr in struct so_map... $ECHO_C" >&6
bec39cab
AC
18531 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then
18532 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18533else
bec39cab
AC
18534 cat >conftest.$ac_ext <<_ACEOF
18535/* confdefs.h. */
18536_ACEOF
18537cat confdefs.h >>conftest.$ac_ext
18538cat >>conftest.$ac_ext <<_ACEOF
18539/* end confdefs.h. */
97bf5e38
MK
18540#include <sys/types.h>
18541#ifdef HAVE_NLIST_H
18542#include <nlist.h>
18543#endif
18544#include <link.h>
bec39cab
AC
18545int
18546main ()
18547{
97bf5e38 18548struct so_map lm; (void) lm.som_addr;
bec39cab
AC
18549 ;
18550 return 0;
18551}
18552_ACEOF
18553rm -f conftest.$ac_objext
18554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18555 (eval $ac_compile) 2>conftest.er1
18556 ac_status=$?
18557 grep -v '^ *+' conftest.er1 >conftest.err
18558 rm -f conftest.er1
18559 cat conftest.err >&5
18560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18561 (exit $ac_status); } &&
b4e70030
JB
18562 { ac_try='test -z "$ac_c_werror_flag"
18563 || test ! -s conftest.err'
bec39cab
AC
18564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18565 (eval $ac_try) 2>&5
18566 ac_status=$?
18567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18568 (exit $ac_status); }; } &&
18569 { ac_try='test -s conftest.$ac_objext'
18570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18571 (eval $ac_try) 2>&5
18572 ac_status=$?
18573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18574 (exit $ac_status); }; }; then
97bf5e38
MK
18575 gdb_cv_have_struct_so_map_with_som_members=yes
18576else
bec39cab
AC
18577 echo "$as_me: failed program was:" >&5
18578sed 's/^/| /' conftest.$ac_ext >&5
18579
b4e70030 18580gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 18581fi
bec39cab 18582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18583fi
c906108c 18584
b4e70030
JB
18585 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
18586echo "${ECHO_T}$gdb_cv_have_struct_so_map_with_som_members" >&6
97bf5e38 18587 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f
SE
18588
18589cat >>confdefs.h <<\_ACEOF
97bf5e38 18590#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
bec39cab 18591_ACEOF
c906108c 18592
97bf5e38 18593 fi
c906108c 18594
bec39cab 18595
b4e70030
JB
18596 echo "$as_me:$LINENO: checking for struct link_map32 in sys/link.h" >&5
18597echo $ECHO_N "checking for struct link_map32 in sys/link.h... $ECHO_C" >&6
bec39cab
AC
18598 if test "${gdb_cv_have_struct_link_map32+set}" = set; then
18599 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18600else
bec39cab
AC
18601 cat >conftest.$ac_ext <<_ACEOF
18602/* confdefs.h. */
18603_ACEOF
18604cat confdefs.h >>conftest.$ac_ext
18605cat >>conftest.$ac_ext <<_ACEOF
18606/* end confdefs.h. */
97bf5e38
MK
18607#define _SYSCALL32
18608#include <sys/link.h>
bec39cab
AC
18609int
18610main ()
18611{
97bf5e38 18612struct link_map32 l;
bec39cab
AC
18613 ;
18614 return 0;
18615}
18616_ACEOF
18617rm -f conftest.$ac_objext
18618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18619 (eval $ac_compile) 2>conftest.er1
18620 ac_status=$?
18621 grep -v '^ *+' conftest.er1 >conftest.err
18622 rm -f conftest.er1
18623 cat conftest.err >&5
18624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18625 (exit $ac_status); } &&
b4e70030
JB
18626 { ac_try='test -z "$ac_c_werror_flag"
18627 || test ! -s conftest.err'
bec39cab
AC
18628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18629 (eval $ac_try) 2>&5
18630 ac_status=$?
18631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18632 (exit $ac_status); }; } &&
18633 { ac_try='test -s conftest.$ac_objext'
18634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18635 (eval $ac_try) 2>&5
18636 ac_status=$?
18637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18638 (exit $ac_status); }; }; then
97bf5e38
MK
18639 gdb_cv_have_struct_link_map32=yes
18640else
bec39cab
AC
18641 echo "$as_me: failed program was:" >&5
18642sed 's/^/| /' conftest.$ac_ext >&5
18643
b4e70030 18644gdb_cv_have_struct_link_map32=no
97bf5e38 18645fi
bec39cab 18646rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18647fi
c906108c 18648
b4e70030
JB
18649 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map32" >&5
18650echo "${ECHO_T}$gdb_cv_have_struct_link_map32" >&6
97bf5e38 18651 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f
SE
18652
18653cat >>confdefs.h <<\_ACEOF
97bf5e38 18654#define HAVE_STRUCT_LINK_MAP32 1
bec39cab 18655_ACEOF
c906108c 18656
60ca704f
SE
18657
18658cat >>confdefs.h <<\_ACEOF
97bf5e38 18659#define _SYSCALL32 1
bec39cab 18660_ACEOF
c906108c 18661
97bf5e38
MK
18662 fi
18663fi
c906108c 18664
bc8bcb4b 18665# Check if the compiler supports the `long long' type.
c906108c 18666
b4e70030
JB
18667echo "$as_me:$LINENO: checking for long long support in compiler" >&5
18668echo $ECHO_N "checking for long long support in compiler... $ECHO_C" >&6
bec39cab
AC
18669if test "${gdb_cv_c_long_long+set}" = set; then
18670 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18671else
bec39cab
AC
18672 cat >conftest.$ac_ext <<_ACEOF
18673/* confdefs.h. */
18674_ACEOF
18675cat confdefs.h >>conftest.$ac_ext
18676cat >>conftest.$ac_ext <<_ACEOF
18677/* end confdefs.h. */
bc8bcb4b 18678extern long long foo;
bec39cab
AC
18679int
18680main ()
18681{
bc8bcb4b 18682switch (foo & 2) { case 0: return 1; }
bec39cab
AC
18683 ;
18684 return 0;
18685}
18686_ACEOF
18687rm -f conftest.$ac_objext
18688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18689 (eval $ac_compile) 2>conftest.er1
18690 ac_status=$?
18691 grep -v '^ *+' conftest.er1 >conftest.err
18692 rm -f conftest.er1
18693 cat conftest.err >&5
18694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18695 (exit $ac_status); } &&
b4e70030
JB
18696 { ac_try='test -z "$ac_c_werror_flag"
18697 || test ! -s conftest.err'
bec39cab
AC
18698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18699 (eval $ac_try) 2>&5
18700 ac_status=$?
18701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18702 (exit $ac_status); }; } &&
18703 { ac_try='test -s conftest.$ac_objext'
18704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18705 (eval $ac_try) 2>&5
18706 ac_status=$?
18707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18708 (exit $ac_status); }; }; then
97bf5e38
MK
18709 gdb_cv_c_long_long=yes
18710else
bec39cab
AC
18711 echo "$as_me: failed program was:" >&5
18712sed 's/^/| /' conftest.$ac_ext >&5
18713
b4e70030 18714gdb_cv_c_long_long=no
97bf5e38 18715fi
bec39cab 18716rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18717fi
b4e70030
JB
18718echo "$as_me:$LINENO: result: $gdb_cv_c_long_long" >&5
18719echo "${ECHO_T}$gdb_cv_c_long_long" >&6
97bf5e38 18720if test $gdb_cv_c_long_long = yes; then
bc8bcb4b
MK
18721
18722cat >>confdefs.h <<\_ACEOF
97bf5e38 18723#define CC_HAS_LONG_LONG 1
bec39cab 18724_ACEOF
97bf5e38
MK
18725
18726fi
18727
bc8bcb4b 18728# Check if the compiler and runtime support printing long longs.
97bf5e38 18729
b4e70030
JB
18730echo "$as_me:$LINENO: checking for long long support in printf" >&5
18731echo $ECHO_N "checking for long long support in printf... $ECHO_C" >&6
bec39cab
AC
18732if test "${gdb_cv_printf_has_long_long+set}" = set; then
18733 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18734else
18735 if test "$cross_compiling" = yes; then
18736 gdb_cv_printf_has_long_long=no
18737else
bec39cab
AC
18738 cat >conftest.$ac_ext <<_ACEOF
18739/* confdefs.h. */
18740_ACEOF
18741cat confdefs.h >>conftest.$ac_ext
18742cat >>conftest.$ac_ext <<_ACEOF
18743/* end confdefs.h. */
bc8bcb4b
MK
18744$ac_includes_default
18745int
18746main ()
18747{
18748char buf[32];
97bf5e38
MK
18749 long long l = 0;
18750 l = (l << 16) + 0x0123;
18751 l = (l << 16) + 0x4567;
18752 l = (l << 16) + 0x89ab;
18753 l = (l << 16) + 0xcdef;
18754 sprintf (buf, "0x%016llx", l);
18755 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
18756 ;
18757 return 0;
c906108c 18758}
bec39cab
AC
18759_ACEOF
18760rm -f conftest$ac_exeext
18761if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18762 (eval $ac_link) 2>&5
18763 ac_status=$?
18764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18765 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18767 (eval $ac_try) 2>&5
18768 ac_status=$?
18769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18770 (exit $ac_status); }; }; then
97bf5e38
MK
18771 gdb_cv_printf_has_long_long=yes
18772else
bec39cab
AC
18773 echo "$as_me: program exited with status $ac_status" >&5
18774echo "$as_me: failed program was:" >&5
18775sed 's/^/| /' conftest.$ac_ext >&5
18776
18777( exit $ac_status )
18778gdb_cv_printf_has_long_long=no
97bf5e38 18779fi
b4e70030 18780rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 18781fi
97bf5e38 18782fi
b4e70030
JB
18783echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_long" >&5
18784echo "${ECHO_T}$gdb_cv_printf_has_long_long" >&6
97bf5e38 18785if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b
MK
18786
18787cat >>confdefs.h <<\_ACEOF
97bf5e38 18788#define PRINTF_HAS_LONG_LONG 1
bec39cab 18789_ACEOF
97bf5e38
MK
18790
18791fi
97bf5e38 18792
1a619819
LM
18793# Check if the compiler and runtime support printing decfloats.
18794
18795echo "$as_me:$LINENO: checking for decfloat support in printf" >&5
18796echo $ECHO_N "checking for decfloat support in printf... $ECHO_C" >&6
18797if test "${gdb_cv_printf_has_decfloat+set}" = set; then
18798 echo $ECHO_N "(cached) $ECHO_C" >&6
18799else
18800 if test "$cross_compiling" = yes; then
18801 gdb_cv_printf_has_decfloat=no
18802else
18803 cat >conftest.$ac_ext <<_ACEOF
18804/* confdefs.h. */
18805_ACEOF
18806cat confdefs.h >>conftest.$ac_ext
18807cat >>conftest.$ac_ext <<_ACEOF
18808/* end confdefs.h. */
18809$ac_includes_default
18810int
18811main ()
18812{
18813char buf[64];
18814 _Decimal32 d32 = 1.2345df;
18815 _Decimal64 d64 = 1.2345dd;
18816 _Decimal128 d128 = 1.2345dl;
18817 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
18818 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
18819 ;
18820 return 0;
18821}
18822_ACEOF
18823rm -f conftest$ac_exeext
18824if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18825 (eval $ac_link) 2>&5
18826 ac_status=$?
18827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18830 (eval $ac_try) 2>&5
18831 ac_status=$?
18832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18833 (exit $ac_status); }; }; then
18834 gdb_cv_printf_has_decfloat=yes
18835else
18836 echo "$as_me: program exited with status $ac_status" >&5
18837echo "$as_me: failed program was:" >&5
18838sed 's/^/| /' conftest.$ac_ext >&5
18839
18840( exit $ac_status )
18841gdb_cv_printf_has_decfloat=no
18842fi
18843rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18844fi
18845fi
18846echo "$as_me:$LINENO: result: $gdb_cv_printf_has_decfloat" >&5
18847echo "${ECHO_T}$gdb_cv_printf_has_decfloat" >&6
18848if test $gdb_cv_printf_has_decfloat = yes; then
18849
18850cat >>confdefs.h <<\_ACEOF
18851#define PRINTF_HAS_DECFLOAT 1
18852_ACEOF
18853
18854fi
18855
bc8bcb4b
MK
18856# Check if the compiler supports the `long double' type. We can't use
18857# AC_C_LONG_DOUBLE because that one does additional checks on the
18858# constants defined in <float.h> that fail on some systems,
18859# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 18860
b4e70030
JB
18861echo "$as_me:$LINENO: checking for long double support in compiler" >&5
18862echo $ECHO_N "checking for long double support in compiler... $ECHO_C" >&6
bc8bcb4b 18863if test "${gdb_cv_c_long_double+set}" = set; then
bec39cab 18864 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18865else
bec39cab
AC
18866 cat >conftest.$ac_ext <<_ACEOF
18867/* confdefs.h. */
18868_ACEOF
18869cat confdefs.h >>conftest.$ac_ext
18870cat >>conftest.$ac_ext <<_ACEOF
18871/* end confdefs.h. */
97bf5e38 18872long double foo;
bec39cab
AC
18873_ACEOF
18874rm -f conftest.$ac_objext
18875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18876 (eval $ac_compile) 2>conftest.er1
18877 ac_status=$?
18878 grep -v '^ *+' conftest.er1 >conftest.err
18879 rm -f conftest.er1
18880 cat conftest.err >&5
18881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18882 (exit $ac_status); } &&
b4e70030
JB
18883 { ac_try='test -z "$ac_c_werror_flag"
18884 || test ! -s conftest.err'
bec39cab
AC
18885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18886 (eval $ac_try) 2>&5
18887 ac_status=$?
18888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18889 (exit $ac_status); }; } &&
18890 { ac_try='test -s conftest.$ac_objext'
18891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18892 (eval $ac_try) 2>&5
18893 ac_status=$?
18894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18895 (exit $ac_status); }; }; then
bc8bcb4b 18896 gdb_cv_c_long_double=yes
97bf5e38 18897else
bec39cab
AC
18898 echo "$as_me: failed program was:" >&5
18899sed 's/^/| /' conftest.$ac_ext >&5
18900
b4e70030 18901gdb_cv_c_long_double=no
97bf5e38 18902fi
bec39cab 18903rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18904fi
b4e70030
JB
18905echo "$as_me:$LINENO: result: $gdb_cv_c_long_double" >&5
18906echo "${ECHO_T}$gdb_cv_c_long_double" >&6
bc8bcb4b 18907if test $gdb_cv_c_long_double = yes; then
c906108c 18908
bc8bcb4b 18909cat >>confdefs.h <<\_ACEOF
97bf5e38 18910#define HAVE_LONG_DOUBLE 1
bec39cab 18911_ACEOF
97bf5e38
MK
18912
18913fi
18914
bc8bcb4b 18915# Check if the compiler and runtime support printing long doubles.
97bf5e38 18916
b4e70030
JB
18917echo "$as_me:$LINENO: checking for long double support in printf" >&5
18918echo $ECHO_N "checking for long double support in printf... $ECHO_C" >&6
bec39cab
AC
18919if test "${gdb_cv_printf_has_long_double+set}" = set; then
18920 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18921else
18922 if test "$cross_compiling" = yes; then
18923 gdb_cv_printf_has_long_double=no
18924else
bec39cab
AC
18925 cat >conftest.$ac_ext <<_ACEOF
18926/* confdefs.h. */
18927_ACEOF
18928cat confdefs.h >>conftest.$ac_ext
18929cat >>conftest.$ac_ext <<_ACEOF
18930/* end confdefs.h. */
bc8bcb4b
MK
18931$ac_includes_default
18932int
18933main ()
18934{
18935char buf[16];
97bf5e38
MK
18936 long double f = 3.141592653;
18937 sprintf (buf, "%Lg", f);
18938 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
18939 ;
18940 return 0;
97bf5e38 18941}
bec39cab
AC
18942_ACEOF
18943rm -f conftest$ac_exeext
18944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18945 (eval $ac_link) 2>&5
18946 ac_status=$?
18947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18948 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18950 (eval $ac_try) 2>&5
18951 ac_status=$?
18952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18953 (exit $ac_status); }; }; then
97bf5e38 18954 gdb_cv_printf_has_long_double=yes
c906108c 18955else
bec39cab
AC
18956 echo "$as_me: program exited with status $ac_status" >&5
18957echo "$as_me: failed program was:" >&5
18958sed 's/^/| /' conftest.$ac_ext >&5
18959
18960( exit $ac_status )
18961gdb_cv_printf_has_long_double=no
c906108c 18962fi
b4e70030 18963rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 18964fi
c906108c 18965fi
b4e70030
JB
18966echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_double" >&5
18967echo "${ECHO_T}$gdb_cv_printf_has_long_double" >&6
97bf5e38 18968if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b
MK
18969
18970cat >>confdefs.h <<\_ACEOF
97bf5e38 18971#define PRINTF_HAS_LONG_DOUBLE 1
bec39cab 18972_ACEOF
97bf5e38
MK
18973
18974fi
97bf5e38 18975
bc8bcb4b 18976# Check if the compiler and runtime support scanning long doubles.
97bf5e38 18977
b4e70030
JB
18978echo "$as_me:$LINENO: checking for long double support in scanf" >&5
18979echo $ECHO_N "checking for long double support in scanf... $ECHO_C" >&6
bec39cab
AC
18980if test "${gdb_cv_scanf_has_long_double+set}" = set; then
18981 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18982else
18983 if test "$cross_compiling" = yes; then
18984 gdb_cv_scanf_has_long_double=no
18985else
bec39cab
AC
18986 cat >conftest.$ac_ext <<_ACEOF
18987/* confdefs.h. */
18988_ACEOF
18989cat confdefs.h >>conftest.$ac_ext
18990cat >>conftest.$ac_ext <<_ACEOF
18991/* end confdefs.h. */
bc8bcb4b
MK
18992#include <stdio.h>
18993int
18994main ()
18995{
18996char *buf = "3.141592653";
97bf5e38
MK
18997 long double f = 0;
18998 sscanf (buf, "%Lg", &f);
18999 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
19000 ;
19001 return 0;
97bf5e38 19002}
bec39cab
AC
19003_ACEOF
19004rm -f conftest$ac_exeext
19005if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19006 (eval $ac_link) 2>&5
19007 ac_status=$?
19008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19011 (eval $ac_try) 2>&5
19012 ac_status=$?
19013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19014 (exit $ac_status); }; }; then
97bf5e38
MK
19015 gdb_cv_scanf_has_long_double=yes
19016else
bec39cab
AC
19017 echo "$as_me: program exited with status $ac_status" >&5
19018echo "$as_me: failed program was:" >&5
19019sed 's/^/| /' conftest.$ac_ext >&5
19020
19021( exit $ac_status )
19022gdb_cv_scanf_has_long_double=no
97bf5e38 19023fi
b4e70030 19024rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 19025fi
c906108c 19026fi
b4e70030
JB
19027echo "$as_me:$LINENO: result: $gdb_cv_scanf_has_long_double" >&5
19028echo "${ECHO_T}$gdb_cv_scanf_has_long_double" >&6
97bf5e38 19029if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b
MK
19030
19031cat >>confdefs.h <<\_ACEOF
97bf5e38 19032#define SCANF_HAS_LONG_DOUBLE 1
bec39cab 19033_ACEOF
97bf5e38
MK
19034
19035fi
c906108c 19036
438013df
AO
19037case ${host_os} in
19038aix*)
b4e70030
JB
19039 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
19040echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
bec39cab
AC
19041if test "${gdb_cv_bigtoc+set}" = set; then
19042 echo $ECHO_N "(cached) $ECHO_C" >&6
438013df 19043else
bec39cab 19044
438013df
AO
19045 SAVE_LDFLAGS=$LDFLAGS
19046
19047 case $GCC in
19048 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
19049 *) gdb_cv_bigtoc=-bbigtoc ;;
19050 esac
19051
19052 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
bec39cab
AC
19053 cat >conftest.$ac_ext <<_ACEOF
19054/* confdefs.h. */
19055_ACEOF
19056cat confdefs.h >>conftest.$ac_ext
19057cat >>conftest.$ac_ext <<_ACEOF
19058/* end confdefs.h. */
438013df 19059
bec39cab
AC
19060int
19061main ()
19062{
438013df 19063int i;
bec39cab
AC
19064 ;
19065 return 0;
19066}
19067_ACEOF
19068rm -f conftest.$ac_objext conftest$ac_exeext
19069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19070 (eval $ac_link) 2>conftest.er1
19071 ac_status=$?
19072 grep -v '^ *+' conftest.er1 >conftest.err
19073 rm -f conftest.er1
19074 cat conftest.err >&5
19075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19076 (exit $ac_status); } &&
b4e70030
JB
19077 { ac_try='test -z "$ac_c_werror_flag"
19078 || test ! -s conftest.err'
bec39cab
AC
19079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19080 (eval $ac_try) 2>&5
19081 ac_status=$?
19082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19083 (exit $ac_status); }; } &&
19084 { ac_try='test -s conftest$ac_exeext'
19085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19086 (eval $ac_try) 2>&5
19087 ac_status=$?
19088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19089 (exit $ac_status); }; }; then
438013df
AO
19090 :
19091else
bec39cab
AC
19092 echo "$as_me: failed program was:" >&5
19093sed 's/^/| /' conftest.$ac_ext >&5
19094
b4e70030 19095gdb_cv_bigtoc=
438013df 19096fi
bec39cab
AC
19097rm -f conftest.err conftest.$ac_objext \
19098 conftest$ac_exeext conftest.$ac_ext
ec76baa5 19099 LDFLAGS="${SAVE_LDFLAGS}"
438013df 19100
bec39cab 19101fi
b4e70030
JB
19102echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
19103echo "${ECHO_T}$gdb_cv_bigtoc" >&6
438013df
AO
19104 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
19105 ;;
19106esac
19107
c906108c
SS
19108
19109
19110if test ${build} = ${host} -a ${host} = ${target} ; then
19111 case ${host_os} in
19112 hpux*)
b4e70030
JB
19113 echo "$as_me:$LINENO: checking for HPUX/OSF thread support" >&5
19114echo $ECHO_N "checking for HPUX/OSF thread support... $ECHO_C" >&6
c906108c
SS
19115 if test -f /usr/include/dce/cma_config.h ; then
19116 if test "$GCC" = "yes" ; then
b4e70030
JB
19117 echo "$as_me:$LINENO: result: yes" >&5
19118echo "${ECHO_T}yes" >&6
60ca704f
SE
19119
19120cat >>confdefs.h <<\_ACEOF
c906108c 19121#define HAVE_HPUX_THREAD_SUPPORT 1
bec39cab 19122_ACEOF
c906108c 19123
3483b318 19124 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
19125 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
19126 else
b4e70030
JB
19127 echo "$as_me:$LINENO: result: no (suppressed because you are not using GCC)" >&5
19128echo "${ECHO_T}no (suppressed because you are not using GCC)" >&6
c906108c
SS
19129 fi
19130 else
b4e70030
JB
19131 echo "$as_me:$LINENO: result: no" >&5
19132echo "${ECHO_T}no" >&6
c906108c
SS
19133 fi
19134 ;;
19135 solaris*)
d92419e5
JB
19136 # See if thread_db library is around for Solaris thread debugging.
19137 # Note that we must explicitly test for version 1 of the library
19138 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
19139 # the same API.
b4e70030
JB
19140 echo "$as_me:$LINENO: checking for Solaris thread debugging library" >&5
19141echo $ECHO_N "checking for Solaris thread debugging library... $ECHO_C" >&6
c906108c 19142 if test -f /usr/lib/libthread_db.so.1 ; then
b4e70030
JB
19143 echo "$as_me:$LINENO: result: yes" >&5
19144echo "${ECHO_T}yes" >&6
60ca704f
SE
19145
19146cat >>confdefs.h <<\_ACEOF
c906108c 19147#define HAVE_THREAD_DB_LIB 1
bec39cab 19148_ACEOF
c906108c 19149
3483b318 19150 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 19151 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
bec39cab 19152
b4e70030
JB
19153echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19154echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
bec39cab
AC
19155if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19156 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19157else
bec39cab 19158 ac_check_lib_save_LIBS=$LIBS
c906108c 19159LIBS="-ldl $LIBS"
bec39cab
AC
19160cat >conftest.$ac_ext <<_ACEOF
19161/* confdefs.h. */
19162_ACEOF
19163cat confdefs.h >>conftest.$ac_ext
19164cat >>conftest.$ac_ext <<_ACEOF
19165/* end confdefs.h. */
19166
b4e70030 19167/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
19168#ifdef __cplusplus
19169extern "C"
19170#endif
b4e70030
JB
19171/* We use char because int might match the return type of a gcc2
19172 builtin and then its argument prototype would still apply. */
bec39cab
AC
19173char dlopen ();
19174int
19175main ()
19176{
b4e70030 19177dlopen ();
bec39cab
AC
19178 ;
19179 return 0;
19180}
19181_ACEOF
19182rm -f conftest.$ac_objext conftest$ac_exeext
19183if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19184 (eval $ac_link) 2>conftest.er1
19185 ac_status=$?
19186 grep -v '^ *+' conftest.er1 >conftest.err
19187 rm -f conftest.er1
19188 cat conftest.err >&5
19189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19190 (exit $ac_status); } &&
b4e70030
JB
19191 { ac_try='test -z "$ac_c_werror_flag"
19192 || test ! -s conftest.err'
bec39cab
AC
19193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19194 (eval $ac_try) 2>&5
19195 ac_status=$?
19196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19197 (exit $ac_status); }; } &&
19198 { ac_try='test -s conftest$ac_exeext'
19199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19200 (eval $ac_try) 2>&5
19201 ac_status=$?
19202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19203 (exit $ac_status); }; }; then
19204 ac_cv_lib_dl_dlopen=yes
19205else
19206 echo "$as_me: failed program was:" >&5
19207sed 's/^/| /' conftest.$ac_ext >&5
19208
b4e70030 19209ac_cv_lib_dl_dlopen=no
bec39cab
AC
19210fi
19211rm -f conftest.err conftest.$ac_objext \
19212 conftest$ac_exeext conftest.$ac_ext
19213LIBS=$ac_check_lib_save_LIBS
19214fi
b4e70030
JB
19215echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19216echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
bec39cab
AC
19217if test $ac_cv_lib_dl_dlopen = yes; then
19218 cat >>confdefs.h <<_ACEOF
19219#define HAVE_LIBDL 1
19220_ACEOF
c906108c
SS
19221
19222 LIBS="-ldl $LIBS"
19223
c906108c
SS
19224fi
19225
19226 if test "$GCC" = "yes" ; then
19227 # The GNU linker requires the -export-dynamic option to make
19228 # all symbols visible in the dynamic symbol table.
19229 hold_ldflags=$LDFLAGS
b4e70030
JB
19230 echo "$as_me:$LINENO: checking for the ld -export-dynamic flag" >&5
19231echo $ECHO_N "checking for the ld -export-dynamic flag... $ECHO_C" >&6
c906108c 19232 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
bec39cab
AC
19233 cat >conftest.$ac_ext <<_ACEOF
19234/* confdefs.h. */
19235_ACEOF
19236cat confdefs.h >>conftest.$ac_ext
19237cat >>conftest.$ac_ext <<_ACEOF
19238/* end confdefs.h. */
c906108c 19239
bec39cab
AC
19240int
19241main ()
19242{
c906108c 19243int i;
bec39cab
AC
19244 ;
19245 return 0;
19246}
19247_ACEOF
19248rm -f conftest.$ac_objext conftest$ac_exeext
19249if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19250 (eval $ac_link) 2>conftest.er1
19251 ac_status=$?
19252 grep -v '^ *+' conftest.er1 >conftest.err
19253 rm -f conftest.er1
19254 cat conftest.err >&5
19255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19256 (exit $ac_status); } &&
b4e70030
JB
19257 { ac_try='test -z "$ac_c_werror_flag"
19258 || test ! -s conftest.err'
bec39cab
AC
19259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19260 (eval $ac_try) 2>&5
19261 ac_status=$?
19262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19263 (exit $ac_status); }; } &&
19264 { ac_try='test -s conftest$ac_exeext'
19265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19266 (eval $ac_try) 2>&5
19267 ac_status=$?
19268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19269 (exit $ac_status); }; }; then
c906108c
SS
19270 found=yes
19271else
bec39cab
AC
19272 echo "$as_me: failed program was:" >&5
19273sed 's/^/| /' conftest.$ac_ext >&5
19274
b4e70030 19275found=no
c906108c 19276fi
bec39cab
AC
19277rm -f conftest.err conftest.$ac_objext \
19278 conftest$ac_exeext conftest.$ac_ext
c906108c 19279 LDFLAGS=$hold_ldflags
b4e70030
JB
19280 echo "$as_me:$LINENO: result: $found" >&5
19281echo "${ECHO_T}$found" >&6
c906108c
SS
19282 if test $found = yes; then
19283 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
19284 fi
19285 fi
19286 # Sun randomly tweaked the prototypes in <proc_service.h>
19287 # at one point.
b4e70030
JB
19288 echo "$as_me:$LINENO: checking if <proc_service.h> is old" >&5
19289echo $ECHO_N "checking if <proc_service.h> is old... $ECHO_C" >&6
bec39cab
AC
19290 if test "${gdb_cv_proc_service_is_old+set}" = set; then
19291 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19292else
bec39cab
AC
19293
19294 cat >conftest.$ac_ext <<_ACEOF
19295/* confdefs.h. */
19296_ACEOF
19297cat confdefs.h >>conftest.$ac_ext
19298cat >>conftest.$ac_ext <<_ACEOF
19299/* end confdefs.h. */
c906108c
SS
19300
19301 #include <proc_service.h>
19302 ps_err_e ps_pdwrite
19303 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 19304
bec39cab
AC
19305int
19306main ()
19307{
19308
19309 ;
19310 return 0;
19311}
19312_ACEOF
19313rm -f conftest.$ac_objext
19314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19315 (eval $ac_compile) 2>conftest.er1
19316 ac_status=$?
19317 grep -v '^ *+' conftest.er1 >conftest.err
19318 rm -f conftest.er1
19319 cat conftest.err >&5
19320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19321 (exit $ac_status); } &&
b4e70030
JB
19322 { ac_try='test -z "$ac_c_werror_flag"
19323 || test ! -s conftest.err'
bec39cab
AC
19324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19325 (eval $ac_try) 2>&5
19326 ac_status=$?
19327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19328 (exit $ac_status); }; } &&
19329 { ac_try='test -s conftest.$ac_objext'
19330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19331 (eval $ac_try) 2>&5
19332 ac_status=$?
19333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19334 (exit $ac_status); }; }; then
c906108c
SS
19335 gdb_cv_proc_service_is_old=no
19336else
bec39cab
AC
19337 echo "$as_me: failed program was:" >&5
19338sed 's/^/| /' conftest.$ac_ext >&5
19339
b4e70030 19340gdb_cv_proc_service_is_old=yes
c906108c 19341fi
bec39cab
AC
19342rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19343
c906108c
SS
19344fi
19345
b4e70030
JB
19346 echo "$as_me:$LINENO: result: $gdb_cv_proc_service_is_old" >&5
19347echo "${ECHO_T}$gdb_cv_proc_service_is_old" >&6
c906108c 19348 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f
SE
19349
19350cat >>confdefs.h <<\_ACEOF
c906108c 19351#define PROC_SERVICE_IS_OLD 1
bec39cab 19352_ACEOF
c906108c
SS
19353
19354 fi
19355 else
b4e70030
JB
19356 echo "$as_me:$LINENO: result: no" >&5
19357echo "${ECHO_T}no" >&6
c906108c
SS
19358 fi
19359 ;;
d92419e5 19360 aix*)
b4e70030
JB
19361 echo "$as_me:$LINENO: checking for AiX thread debugging library" >&5
19362echo $ECHO_N "checking for AiX thread debugging library... $ECHO_C" >&6
bec39cab
AC
19363 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then
19364 echo $ECHO_N "(cached) $ECHO_C" >&6
19365else
19366 cat >conftest.$ac_ext <<_ACEOF
19367/* confdefs.h. */
19368_ACEOF
19369cat confdefs.h >>conftest.$ac_ext
19370cat >>conftest.$ac_ext <<_ACEOF
19371/* end confdefs.h. */
d92419e5 19372#include <sys/pthdebug.h>
bec39cab
AC
19373int
19374main ()
19375{
d92419e5
JB
19376#ifndef PTHDB_VERSION_3
19377 #error
19378 #endif
bec39cab
AC
19379 ;
19380 return 0;
19381}
19382_ACEOF
19383rm -f conftest.$ac_objext
19384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19385 (eval $ac_compile) 2>conftest.er1
19386 ac_status=$?
19387 grep -v '^ *+' conftest.er1 >conftest.err
19388 rm -f conftest.er1
19389 cat conftest.err >&5
19390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19391 (exit $ac_status); } &&
b4e70030
JB
19392 { ac_try='test -z "$ac_c_werror_flag"
19393 || test ! -s conftest.err'
bec39cab
AC
19394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19395 (eval $ac_try) 2>&5
19396 ac_status=$?
19397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19398 (exit $ac_status); }; } &&
19399 { ac_try='test -s conftest.$ac_objext'
19400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19401 (eval $ac_try) 2>&5
19402 ac_status=$?
19403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19404 (exit $ac_status); }; }; then
d92419e5
JB
19405 gdb_cv_have_aix_thread_debug=yes
19406else
bec39cab
AC
19407 echo "$as_me: failed program was:" >&5
19408sed 's/^/| /' conftest.$ac_ext >&5
19409
b4e70030 19410gdb_cv_have_aix_thread_debug=no
d92419e5 19411fi
bec39cab 19412rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
19413fi
19414
b4e70030
JB
19415 echo "$as_me:$LINENO: result: $gdb_cv_have_aix_thread_debug" >&5
19416echo "${ECHO_T}$gdb_cv_have_aix_thread_debug" >&6
d92419e5
JB
19417 if test $gdb_cv_have_aix_thread_debug = yes; then
19418 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 19419 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
19420 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
19421 fi
19422 ;;
c906108c 19423 esac
bec39cab 19424
c906108c
SS
19425fi
19426
3f47be5c 19427if test "x$ac_cv_header_thread_db_h" = "xyes"; then
b4e70030
JB
19428 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTALLOC" >&5
19429echo $ECHO_N "checking whether <thread_db.h> has TD_NOTALLOC... $ECHO_C" >&6
bec39cab
AC
19430if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then
19431 echo $ECHO_N "(cached) $ECHO_C" >&6
19432else
19433 cat >conftest.$ac_ext <<_ACEOF
19434/* confdefs.h. */
19435_ACEOF
19436cat confdefs.h >>conftest.$ac_ext
19437cat >>conftest.$ac_ext <<_ACEOF
19438/* end confdefs.h. */
3f47be5c 19439#include <thread_db.h>
bec39cab
AC
19440int
19441main ()
19442{
3f47be5c 19443int i = TD_NOTALLOC;
bec39cab
AC
19444 ;
19445 return 0;
19446}
19447_ACEOF
19448rm -f conftest.$ac_objext
19449if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19450 (eval $ac_compile) 2>conftest.er1
19451 ac_status=$?
19452 grep -v '^ *+' conftest.er1 >conftest.err
19453 rm -f conftest.er1
19454 cat conftest.err >&5
19455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19456 (exit $ac_status); } &&
b4e70030
JB
19457 { ac_try='test -z "$ac_c_werror_flag"
19458 || test ! -s conftest.err'
bec39cab
AC
19459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19460 (eval $ac_try) 2>&5
19461 ac_status=$?
19462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19463 (exit $ac_status); }; } &&
19464 { ac_try='test -s conftest.$ac_objext'
19465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19466 (eval $ac_try) 2>&5
19467 ac_status=$?
19468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19469 (exit $ac_status); }; }; then
3f47be5c
EZ
19470 gdb_cv_thread_db_h_has_td_notalloc=yes
19471else
bec39cab
AC
19472 echo "$as_me: failed program was:" >&5
19473sed 's/^/| /' conftest.$ac_ext >&5
19474
b4e70030 19475gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 19476
3f47be5c 19477fi
bec39cab 19478rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 19479
bec39cab 19480fi
b4e70030
JB
19481echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
19482echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notalloc" >&6
59f80f10
DJ
19483 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_VERSION" >&5
19484echo $ECHO_N "checking whether <thread_db.h> has TD_VERSION... $ECHO_C" >&6
19485if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then
19486 echo $ECHO_N "(cached) $ECHO_C" >&6
19487else
19488 cat >conftest.$ac_ext <<_ACEOF
19489/* confdefs.h. */
19490_ACEOF
19491cat confdefs.h >>conftest.$ac_ext
19492cat >>conftest.$ac_ext <<_ACEOF
19493/* end confdefs.h. */
19494#include <thread_db.h>
19495int
19496main ()
19497{
19498int i = TD_VERSION;
19499 ;
19500 return 0;
19501}
19502_ACEOF
19503rm -f conftest.$ac_objext
19504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19505 (eval $ac_compile) 2>conftest.er1
19506 ac_status=$?
19507 grep -v '^ *+' conftest.er1 >conftest.err
19508 rm -f conftest.er1
19509 cat conftest.err >&5
19510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19511 (exit $ac_status); } &&
19512 { ac_try='test -z "$ac_c_werror_flag"
19513 || test ! -s conftest.err'
19514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19515 (eval $ac_try) 2>&5
19516 ac_status=$?
19517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19518 (exit $ac_status); }; } &&
19519 { ac_try='test -s conftest.$ac_objext'
19520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19521 (eval $ac_try) 2>&5
19522 ac_status=$?
19523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19524 (exit $ac_status); }; }; then
19525 gdb_cv_thread_db_h_has_td_version=yes
19526else
19527 echo "$as_me: failed program was:" >&5
19528sed 's/^/| /' conftest.$ac_ext >&5
19529
19530gdb_cv_thread_db_h_has_td_version=no
19531
19532fi
19533rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19534
19535fi
19536echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_version" >&5
19537echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_version" >&6
19538 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTLS" >&5
19539echo $ECHO_N "checking whether <thread_db.h> has TD_NOTLS... $ECHO_C" >&6
19540if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then
19541 echo $ECHO_N "(cached) $ECHO_C" >&6
19542else
19543 cat >conftest.$ac_ext <<_ACEOF
19544/* confdefs.h. */
19545_ACEOF
19546cat confdefs.h >>conftest.$ac_ext
19547cat >>conftest.$ac_ext <<_ACEOF
19548/* end confdefs.h. */
19549#include <thread_db.h>
19550int
19551main ()
19552{
19553int i = TD_NOTLS;
19554 ;
19555 return 0;
19556}
19557_ACEOF
19558rm -f conftest.$ac_objext
19559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19560 (eval $ac_compile) 2>conftest.er1
19561 ac_status=$?
19562 grep -v '^ *+' conftest.er1 >conftest.err
19563 rm -f conftest.er1
19564 cat conftest.err >&5
19565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19566 (exit $ac_status); } &&
19567 { ac_try='test -z "$ac_c_werror_flag"
19568 || test ! -s conftest.err'
19569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19570 (eval $ac_try) 2>&5
19571 ac_status=$?
19572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19573 (exit $ac_status); }; } &&
19574 { ac_try='test -s conftest.$ac_objext'
19575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19576 (eval $ac_try) 2>&5
19577 ac_status=$?
19578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19579 (exit $ac_status); }; }; then
19580 gdb_cv_thread_db_h_has_td_notls=yes
19581else
19582 echo "$as_me: failed program was:" >&5
19583sed 's/^/| /' conftest.$ac_ext >&5
19584
19585gdb_cv_thread_db_h_has_td_notls=no
19586
19587fi
19588rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19589
19590fi
19591echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notls" >&5
19592echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notls" >&6
3f47be5c
EZ
19593fi
19594if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab
AC
19595
19596cat >>confdefs.h <<\_ACEOF
3f47be5c 19597#define THREAD_DB_HAS_TD_NOTALLOC 1
bec39cab 19598_ACEOF
3f47be5c 19599
59f80f10
DJ
19600fi
19601if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
19602
19603cat >>confdefs.h <<\_ACEOF
19604#define THREAD_DB_HAS_TD_VERSION 1
19605_ACEOF
19606
19607fi
19608if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
19609
19610cat >>confdefs.h <<\_ACEOF
19611#define THREAD_DB_HAS_TD_NOTLS 1
19612_ACEOF
19613
3f47be5c
EZ
19614fi
19615
b757528f 19616if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
b4e70030
JB
19617 echo "$as_me:$LINENO: checking whether <sys/syscall.h> has __NR_tkill" >&5
19618echo $ECHO_N "checking whether <sys/syscall.h> has __NR_tkill... $ECHO_C" >&6
bec39cab
AC
19619if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then
19620 echo $ECHO_N "(cached) $ECHO_C" >&6
19621else
19622 cat >conftest.$ac_ext <<_ACEOF
19623/* confdefs.h. */
19624_ACEOF
19625cat confdefs.h >>conftest.$ac_ext
19626cat >>conftest.$ac_ext <<_ACEOF
19627/* end confdefs.h. */
b757528f 19628#include <sys/syscall.h>
bec39cab
AC
19629int
19630main ()
19631{
b757528f 19632int i = __NR_tkill;
bec39cab
AC
19633 ;
19634 return 0;
19635}
19636_ACEOF
19637rm -f conftest.$ac_objext
19638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19639 (eval $ac_compile) 2>conftest.er1
19640 ac_status=$?
19641 grep -v '^ *+' conftest.er1 >conftest.err
19642 rm -f conftest.er1
19643 cat conftest.err >&5
19644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19645 (exit $ac_status); } &&
b4e70030
JB
19646 { ac_try='test -z "$ac_c_werror_flag"
19647 || test ! -s conftest.err'
bec39cab
AC
19648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19649 (eval $ac_try) 2>&5
19650 ac_status=$?
19651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19652 (exit $ac_status); }; } &&
19653 { ac_try='test -s conftest.$ac_objext'
19654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19655 (eval $ac_try) 2>&5
19656 ac_status=$?
19657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19658 (exit $ac_status); }; }; then
b757528f
JJ
19659 gdb_cv_sys_syscall_h_has_tkill=yes
19660else
bec39cab
AC
19661 echo "$as_me: failed program was:" >&5
19662sed 's/^/| /' conftest.$ac_ext >&5
19663
b4e70030 19664gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 19665
b757528f 19666fi
bec39cab 19667rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 19668
bec39cab 19669fi
b4e70030
JB
19670echo "$as_me:$LINENO: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
19671echo "${ECHO_T}$gdb_cv_sys_syscall_h_has_tkill" >&6
b757528f
JJ
19672fi
19673if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab
AC
19674
19675cat >>confdefs.h <<\_ACEOF
b757528f 19676#define HAVE_TKILL_SYSCALL 1
bec39cab 19677_ACEOF
b757528f
JJ
19678
19679fi
19680
10568435
JK
19681echo "$as_me:$LINENO: checking whether ADDR_NO_RANDOMIZE is declared" >&5
19682echo $ECHO_N "checking whether ADDR_NO_RANDOMIZE is declared... $ECHO_C" >&6
19683if test "${ac_cv_have_decl_ADDR_NO_RANDOMIZE+set}" = set; then
19684 echo $ECHO_N "(cached) $ECHO_C" >&6
19685else
19686 cat >conftest.$ac_ext <<_ACEOF
19687/* confdefs.h. */
19688_ACEOF
19689cat confdefs.h >>conftest.$ac_ext
19690cat >>conftest.$ac_ext <<_ACEOF
19691/* end confdefs.h. */
19692#include <sys/personality.h>
19693
19694int
19695main ()
19696{
19697#ifndef ADDR_NO_RANDOMIZE
19698 char *p = (char *) ADDR_NO_RANDOMIZE;
19699#endif
19700
19701 ;
19702 return 0;
19703}
19704_ACEOF
19705rm -f conftest.$ac_objext
19706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19707 (eval $ac_compile) 2>conftest.er1
19708 ac_status=$?
19709 grep -v '^ *+' conftest.er1 >conftest.err
19710 rm -f conftest.er1
19711 cat conftest.err >&5
19712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19713 (exit $ac_status); } &&
19714 { ac_try='test -z "$ac_c_werror_flag"
19715 || test ! -s conftest.err'
19716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19717 (eval $ac_try) 2>&5
19718 ac_status=$?
19719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19720 (exit $ac_status); }; } &&
19721 { ac_try='test -s conftest.$ac_objext'
19722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19723 (eval $ac_try) 2>&5
19724 ac_status=$?
19725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19726 (exit $ac_status); }; }; then
19727 ac_cv_have_decl_ADDR_NO_RANDOMIZE=yes
19728else
19729 echo "$as_me: failed program was:" >&5
19730sed 's/^/| /' conftest.$ac_ext >&5
19731
19732ac_cv_have_decl_ADDR_NO_RANDOMIZE=no
19733fi
19734rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19735fi
19736echo "$as_me:$LINENO: result: $ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&5
19737echo "${ECHO_T}$ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&6
19738if test $ac_cv_have_decl_ADDR_NO_RANDOMIZE = yes; then
19739
19740cat >>confdefs.h <<_ACEOF
19741#define HAVE_DECL_ADDR_NO_RANDOMIZE 1
19742_ACEOF
19743
19744
19745else
19746 cat >>confdefs.h <<_ACEOF
19747#define HAVE_DECL_ADDR_NO_RANDOMIZE 0
19748_ACEOF
19749
19750
19751fi
19752
19753
19754
19755if test "$cross_compiling" = yes; then
19756 cat >conftest.$ac_ext <<_ACEOF
19757/* confdefs.h. */
19758_ACEOF
19759cat confdefs.h >>conftest.$ac_ext
19760cat >>conftest.$ac_ext <<_ACEOF
19761/* end confdefs.h. */
19762#include <sys/personality.h>
19763int
19764main ()
19765{
19766
19767# if !HAVE_DECL_ADDR_NO_RANDOMIZE
19768# define ADDR_NO_RANDOMIZE 0x0040000
19769# endif
19770 /* Test the flag could be set and stays set. */
19771 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19772 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19773 return 1
19774 ;
19775 return 0;
19776}
19777_ACEOF
19778rm -f conftest.$ac_objext conftest$ac_exeext
19779if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19780 (eval $ac_link) 2>conftest.er1
19781 ac_status=$?
19782 grep -v '^ *+' conftest.er1 >conftest.err
19783 rm -f conftest.er1
19784 cat conftest.err >&5
19785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19786 (exit $ac_status); } &&
19787 { ac_try='test -z "$ac_c_werror_flag"
19788 || test ! -s conftest.err'
19789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19790 (eval $ac_try) 2>&5
19791 ac_status=$?
19792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19793 (exit $ac_status); }; } &&
19794 { ac_try='test -s conftest$ac_exeext'
19795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19796 (eval $ac_try) 2>&5
19797 ac_status=$?
19798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19799 (exit $ac_status); }; }; then
19800 have_personality=true
19801else
19802 echo "$as_me: failed program was:" >&5
19803sed 's/^/| /' conftest.$ac_ext >&5
19804
19805have_personality=false
19806fi
19807rm -f conftest.err conftest.$ac_objext \
19808 conftest$ac_exeext conftest.$ac_ext
19809else
19810 cat >conftest.$ac_ext <<_ACEOF
19811/* confdefs.h. */
19812_ACEOF
19813cat confdefs.h >>conftest.$ac_ext
19814cat >>conftest.$ac_ext <<_ACEOF
19815/* end confdefs.h. */
19816#include <sys/personality.h>
19817int
19818main ()
19819{
19820
19821# if !HAVE_DECL_ADDR_NO_RANDOMIZE
19822# define ADDR_NO_RANDOMIZE 0x0040000
19823# endif
19824 /* Test the flag could be set and stays set. */
19825 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19826 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19827 return 1
19828 ;
19829 return 0;
19830}
19831_ACEOF
19832rm -f conftest$ac_exeext
19833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19834 (eval $ac_link) 2>&5
19835 ac_status=$?
19836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19839 (eval $ac_try) 2>&5
19840 ac_status=$?
19841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19842 (exit $ac_status); }; }; then
19843 have_personality=true
19844else
19845 echo "$as_me: program exited with status $ac_status" >&5
19846echo "$as_me: failed program was:" >&5
19847sed 's/^/| /' conftest.$ac_ext >&5
19848
19849( exit $ac_status )
19850have_personality=false
19851fi
19852rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19853fi
19854if $have_personality
19855then
19856
19857cat >>confdefs.h <<\_ACEOF
19858#define HAVE_PERSONALITY 1
19859_ACEOF
19860
19861fi
19862
fb40c209 19863
bec39cab 19864
b4e70030 19865# Check whether --with-sysroot or --without-sysroot was given.
030292b7 19866if test "${with_sysroot+set}" = set; then
b4e70030
JB
19867 withval="$with_sysroot"
19868
030292b7 19869 case ${with_sysroot} in
715d1656 19870 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
19871 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
19872 esac
19873
19874 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
19875
07abfebf
RS
19876 if test "x$prefix" = xNONE; then
19877 test_prefix=/usr/local
19878 else
19879 test_prefix=$prefix
19880 fi
aa28a74e 19881 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 19882 test_exec_prefix=$test_prefix
030292b7 19883 else
07abfebf 19884 test_exec_prefix=$exec_prefix
030292b7
DJ
19885 fi
19886 case ${TARGET_SYSTEM_ROOT} in
715d1656 19887 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
19888 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
19889 '${prefix}'|'${prefix}/'*|\
715d1656 19890 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
19891 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
19892 TARGET_SYSTEM_ROOT_DEFINE="$t"
19893 ;;
19894 esac
19895
19896else
bec39cab 19897
030292b7
DJ
19898 TARGET_SYSTEM_ROOT=
19899 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
19900
b4e70030 19901fi;
030292b7
DJ
19902
19903
19904
16e7150e
JG
19905system_gdbinit=
19906
19907# Check whether --with-system-gdbinit or --without-system-gdbinit was given.
19908if test "${with_system_gdbinit+set}" = set; then
19909 withval="$with_system_gdbinit"
19910 system_gdbinit=${withval}
19911fi;
19912
19913
19914 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
19915 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19916 ac_define_dir=`eval echo $system_gdbinit`
19917 ac_define_dir=`eval echo $ac_define_dir`
19918
19919cat >>confdefs.h <<_ACEOF
19920#define SYSTEM_GDBINIT "$ac_define_dir"
19921_ACEOF
19922
19923
19924
19925if test "x$prefix" = xNONE; then
19926 test_prefix=$ac_default_prefix
19927else
19928 test_prefix=$prefix
19929fi
19930if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
19931 test_exec_prefix=$test_prefix
19932else
19933 test_exec_prefix=$exec_prefix
19934fi
19935case ${system_gdbinit} in
19936 "${test_prefix}"|"${test_prefix}/"*|\
19937 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
19938 '${prefix}'|'${prefix}/'*|\
19939 '${exec_prefix}'|'${exec_prefix}/'*)
19940
19941cat >>confdefs.h <<\_ACEOF
19942#define SYSTEM_GDBINIT_RELOCATABLE 1
19943_ACEOF
19944
19945 ;;
19946esac
19947
b4e70030 19948# Check whether --enable-werror or --disable-werror was given.
094a342e 19949if test "${enable_werror+set}" = set; then
b4e70030
JB
19950 enableval="$enable_werror"
19951 case "${enableval}" in
094a342e
MK
19952 yes | y) ERROR_ON_WARNING="yes" ;;
19953 no | n) ERROR_ON_WARNING="no" ;;
19954 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
19955echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
19956 { (exit 1); exit 1; }; } ;;
19957 esac
b4e70030 19958fi;
094a342e
MK
19959
19960# Enable -Werror by default when using gcc
19961if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
19962 ERROR_ON_WARNING=yes
19963fi
19964
19965WERROR_CFLAGS=""
19966if test "${ERROR_ON_WARNING}" = yes ; then
19967 WERROR_CFLAGS="-Werror"
19968fi
19969
aa79a185
DJ
19970# The entries after -Wno-pointer-sign are disabled warnings which may
19971# be enabled in the future, which can not currently be used to build
19972# GDB.
19973# NOTE: If you change this list, remember to update
3b851bce 19974# gdb/doc/gdbint.texinfo.
aa79a185
DJ
19975build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
19976-Wformat-nonliteral -Wno-pointer-sign \
58b38ee2 19977-Wno-unused -Wno-switch -Wno-char-subscripts"
a3b362c4 19978
3526781e
DJ
19979# Enable -Wno-format by default when using gcc on mingw since many
19980# GCC versions complain about %I64.
19981case "${host}" in
19982 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
19983esac
19984
b4e70030 19985# Check whether --enable-build-warnings or --disable-build-warnings was given.
c906108c 19986if test "${enable_build_warnings+set}" = set; then
b4e70030
JB
19987 enableval="$enable_build_warnings"
19988 case "${enableval}" in
c906108c
SS
19989 yes) ;;
19990 no) build_warnings="-w";;
19991 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
19992 build_warnings="${build_warnings} ${t}";;
19993 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
19994 build_warnings="${t} ${build_warnings}";;
19995 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
19996esac
d4f3574e 19997if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 19998 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 19999fi
b4e70030 20000fi; # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
3b851bce 20001if test "${enable_gdb_build_warnings+set}" = set; then
b4e70030
JB
20002 enableval="$enable_gdb_build_warnings"
20003 case "${enableval}" in
3b851bce
AC
20004 yes) ;;
20005 no) build_warnings="-w";;
20006 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20007 build_warnings="${build_warnings} ${t}";;
20008 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20009 build_warnings="${t} ${build_warnings}";;
20010 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
20011esac
20012if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
20013 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
20014fi
b4e70030 20015fi; WARN_CFLAGS=""
c906108c
SS
20016if test "x${build_warnings}" != x -a "x$GCC" = xyes
20017then
b4e70030
JB
20018 echo "$as_me:$LINENO: checking compiler warning flags" >&5
20019echo $ECHO_N "checking compiler warning flags... $ECHO_C" >&6
746a987d
AC
20020 # Separate out the -Werror flag as some files just cannot be
20021 # compiled with it enabled.
20022 for w in ${build_warnings}; do
20023 case $w in
20024 -Werr*) WERROR_CFLAGS=-Werror ;;
20025 *) # Check that GCC accepts it
4536bbc6
AC
20026 saved_CFLAGS="$CFLAGS"
20027 CFLAGS="$CFLAGS $w"
bec39cab
AC
20028 cat >conftest.$ac_ext <<_ACEOF
20029/* confdefs.h. */
20030_ACEOF
20031cat confdefs.h >>conftest.$ac_ext
20032cat >>conftest.$ac_ext <<_ACEOF
20033/* end confdefs.h. */
4536bbc6 20034
bec39cab
AC
20035int
20036main ()
20037{
4536bbc6 20038
bec39cab
AC
20039 ;
20040 return 0;
20041}
20042_ACEOF
20043rm -f conftest.$ac_objext
20044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20045 (eval $ac_compile) 2>conftest.er1
20046 ac_status=$?
20047 grep -v '^ *+' conftest.er1 >conftest.err
20048 rm -f conftest.er1
20049 cat conftest.err >&5
20050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20051 (exit $ac_status); } &&
b4e70030
JB
20052 { ac_try='test -z "$ac_c_werror_flag"
20053 || test ! -s conftest.err'
bec39cab
AC
20054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20055 (eval $ac_try) 2>&5
20056 ac_status=$?
20057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20058 (exit $ac_status); }; } &&
20059 { ac_try='test -s conftest.$ac_objext'
20060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20061 (eval $ac_try) 2>&5
20062 ac_status=$?
20063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20064 (exit $ac_status); }; }; then
4536bbc6
AC
20065 WARN_CFLAGS="${WARN_CFLAGS} $w"
20066else
bec39cab
AC
20067 echo "$as_me: failed program was:" >&5
20068sed 's/^/| /' conftest.$ac_ext >&5
20069
4536bbc6 20070fi
bec39cab 20071rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 20072 CFLAGS="$saved_CFLAGS"
746a987d
AC
20073 esac
20074 done
aa79a185
DJ
20075 echo "$as_me:$LINENO: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
20076echo "${ECHO_T}${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6
c906108c
SS
20077fi
20078
20079
104c1213 20080
7a292a7a 20081# In the Cygwin environment, we need some additional flags.
b4e70030
JB
20082echo "$as_me:$LINENO: checking for cygwin" >&5
20083echo $ECHO_N "checking for cygwin... $ECHO_C" >&6
bec39cab
AC
20084if test "${gdb_cv_os_cygwin+set}" = set; then
20085 echo $ECHO_N "(cached) $ECHO_C" >&6
20086else
20087 cat >conftest.$ac_ext <<_ACEOF
20088/* confdefs.h. */
20089_ACEOF
20090cat confdefs.h >>conftest.$ac_ext
20091cat >>conftest.$ac_ext <<_ACEOF
20092/* end confdefs.h. */
7a292a7a
SS
20093
20094#if defined (__CYGWIN__) || defined (__CYGWIN32__)
20095lose
20096#endif
bec39cab 20097_ACEOF
7a292a7a 20098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 20099 $EGREP "lose" >/dev/null 2>&1; then
7a292a7a
SS
20100 gdb_cv_os_cygwin=yes
20101else
7a292a7a
SS
20102 gdb_cv_os_cygwin=no
20103fi
20104rm -f conftest*
20105
20106fi
b4e70030
JB
20107echo "$as_me:$LINENO: result: $gdb_cv_os_cygwin" >&5
20108echo "${ECHO_T}$gdb_cv_os_cygwin" >&6
7a292a7a 20109
aff38e61 20110
3eb25fda 20111SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 20112case ${host} in
95cbc983
AC
20113 *go32* ) SER_HARDWIRE=ser-go32.o ;;
20114 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 20115 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
20116esac
20117
20118
cd0fc7c3
SS
20119# libreadline needs libuser32.a in a cygwin environment
20120WIN32LIBS=
20121if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
20122 WIN32LIBS="-luser32"
20123 case "${target}" in
20124 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
20125 ;;
20126 esac
cd0fc7c3 20127fi
c906108c 20128
b4505029
MM
20129# The ser-tcp.c module requires sockets.
20130case ${host} in
20131 *mingw32*)
20132
20133cat >>confdefs.h <<\_ACEOF
20134#define USE_WIN32API 1
20135_ACEOF
20136
20137 WIN32LIBS="$WIN32LIBS -lws2_32"
20138 ;;
20139esac
20140
7a292a7a 20141
31d99776
DJ
20142# Add ELF support to GDB, but only if BFD includes ELF support.
20143OLD_CFLAGS=$CFLAGS
20144OLD_LDFLAGS=$LDFLAGS
20145OLD_LIBS=$LIBS
cab58a69 20146CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 20147LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 20148intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
0f72fb1c 20149LIBS="-lbfd -liberty $intl $LIBS"
31d99776
DJ
20150echo "$as_me:$LINENO: checking for ELF support in BFD" >&5
20151echo $ECHO_N "checking for ELF support in BFD... $ECHO_C" >&6
20152if test "${gdb_cv_var_elf+set}" = set; then
20153 echo $ECHO_N "(cached) $ECHO_C" >&6
20154else
20155 cat >conftest.$ac_ext <<_ACEOF
20156/* confdefs.h. */
20157_ACEOF
20158cat confdefs.h >>conftest.$ac_ext
20159cat >>conftest.$ac_ext <<_ACEOF
20160/* end confdefs.h. */
20161#include <stdlib.h>
20162#include "bfd.h"
20163#include "elf-bfd.h"
20164
20165int
20166main ()
20167{
20168bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
20169 ;
20170 return 0;
20171}
20172_ACEOF
20173rm -f conftest.$ac_objext conftest$ac_exeext
20174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20175 (eval $ac_link) 2>conftest.er1
20176 ac_status=$?
20177 grep -v '^ *+' conftest.er1 >conftest.err
20178 rm -f conftest.er1
20179 cat conftest.err >&5
20180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20181 (exit $ac_status); } &&
20182 { ac_try='test -z "$ac_c_werror_flag"
20183 || test ! -s conftest.err'
20184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20185 (eval $ac_try) 2>&5
20186 ac_status=$?
20187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20188 (exit $ac_status); }; } &&
20189 { ac_try='test -s conftest$ac_exeext'
20190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20191 (eval $ac_try) 2>&5
20192 ac_status=$?
20193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20194 (exit $ac_status); }; }; then
20195 gdb_cv_var_elf=yes
20196else
20197 echo "$as_me: failed program was:" >&5
20198sed 's/^/| /' conftest.$ac_ext >&5
20199
20200gdb_cv_var_elf=no
20201fi
20202rm -f conftest.err conftest.$ac_objext \
20203 conftest$ac_exeext conftest.$ac_ext
20204fi
20205echo "$as_me:$LINENO: result: $gdb_cv_var_elf" >&5
20206echo "${ECHO_T}$gdb_cv_var_elf" >&6
20207if test $gdb_cv_var_elf = yes; then
20208 CONFIG_OBS="$CONFIG_OBS elfread.o"
20209
20210cat >>confdefs.h <<\_ACEOF
20211#define HAVE_ELF 1
20212_ACEOF
20213
20214fi
20215CFLAGS=$OLD_CFLAGS
20216LDFLAGS=$OLD_LDFLAGS
20217LIBS=$OLD_LIBS
20218
121ce6e5
DJ
20219# Add any host-specific objects to GDB.
20220CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
20221
3fc11d3e
JM
20222LIBGUI="../libgui/src/libgui.a"
20223GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
20224
20225
7a292a7a 20226
3fc11d3e
JM
20227WIN32LDAPP=
20228
20229
20230
d91670b9 20231case "${host}" in
686a5eed 20232*-*-cygwin* | *-*-mingw* )
d91670b9
CV
20233 configdir="win"
20234 ;;
20235*)
20236 configdir="unix"
20237 ;;
20238esac
3fc11d3e
JM
20239
20240GDBTKLIBS=
20241if test "${enable_gdbtk}" = "yes"; then
20242
d1c3b63a
KS
20243 # Gdbtk must have an absolute path to srcdir in order to run
20244 # properly when not installed.
20245 here=`pwd`
20246 cd ${srcdir}
20247 GDBTK_SRC_DIR=`pwd`
20248 cd $here
20249
bec39cab 20250
5062cc19
KS
20251 #
20252 # Ok, lets find the tcl configuration
20253 # First, look for one uninstalled.
20254 # the alternative search directory is invoked by --with-tcl
20255 #
3fc11d3e 20256
5062cc19
KS
20257 if test x"${no_tcl}" = x ; then
20258 # we reset no_tcl in case something fails here
20259 no_tcl=true
bec39cab 20260
5062cc19
KS
20261# Check whether --with-tcl or --without-tcl was given.
20262if test "${with_tcl+set}" = set; then
20263 withval="$with_tcl"
b4e70030
JB
20264 with_tclconfig=${withval}
20265fi;
5062cc19 20266 echo "$as_me:$LINENO: checking for Tcl configuration" >&5
b4e70030 20267echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
5062cc19 20268 if test "${ac_cv_c_tclconfig+set}" = set; then
bec39cab 20269 echo $ECHO_N "(cached) $ECHO_C" >&6
3fc11d3e 20270else
bec39cab 20271
3fc11d3e 20272
5062cc19
KS
20273 # First check to see if --with-tcl was specified.
20274 case "${host}" in
20275 *-*-cygwin*) platDir="win" ;;
20276 *) platDir="unix" ;;
20277 esac
20278 if test x"${with_tclconfig}" != x ; then
20279 if test -f "${with_tclconfig}/tclConfig.sh" ; then
20280 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
20281 else
20282 { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
bec39cab
AC
20283echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
20284 { (exit 1); exit 1; }; }
5062cc19
KS
20285 fi
20286 fi
20287
20288 # then check for a private Tcl installation
20289 if test x"${ac_cv_c_tclconfig}" = x ; then
20290 for i in \
20291 ../tcl \
20292 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20293 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
20294 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
20295 ../../tcl \
20296 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20297 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
20298 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
20299 ../../../tcl \
20300 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20301 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
20302 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
20303 if test -f "$i/$platDir/tclConfig.sh" ; then
20304 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
20305 break
20306 fi
20307 done
20308 fi
20309
20310 # on Darwin, check in Framework installation locations
20311 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
20312 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
20313 `ls -d /Library/Frameworks 2>/dev/null` \
20314 `ls -d /Network/Library/Frameworks 2>/dev/null` \
20315 `ls -d /System/Library/Frameworks 2>/dev/null` \
20316 ; do
20317 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
20318 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
20319 break
20320 fi
20321 done
20322 fi
20323
20324 # check in a few common install locations
20325 if test x"${ac_cv_c_tclconfig}" = x ; then
20326 for i in `ls -d ${libdir} 2>/dev/null` \
20327 `ls -d ${exec_prefix}/lib 2>/dev/null` \
20328 `ls -d ${prefix}/lib 2>/dev/null` \
20329 `ls -d /usr/local/lib 2>/dev/null` \
20330 `ls -d /usr/contrib/lib 2>/dev/null` \
20331 `ls -d /usr/lib 2>/dev/null` \
20332 ; do
20333 if test -f "$i/tclConfig.sh" ; then
20334 ac_cv_c_tclconfig=`(cd $i; pwd)`
20335 break
20336 fi
20337 done
20338 fi
3fc11d3e 20339
5062cc19
KS
20340 # check in a few other private locations
20341 if test x"${ac_cv_c_tclconfig}" = x ; then
20342 for i in \
20343 ${srcdir}/../tcl \
20344 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20345 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
20346 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
20347 if test -f "$i/$platDir/tclConfig.sh" ; then
20348 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
20349 break
20350 fi
20351 done
20352 fi
bec39cab 20353
3fc11d3e
JM
20354fi
20355
5062cc19
KS
20356
20357 if test x"${ac_cv_c_tclconfig}" = x ; then
20358 TCL_BIN_DIR="# no Tcl configs found"
20359 { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
bec39cab 20360echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
20361 else
20362 no_tcl=
20363 TCL_BIN_DIR=${ac_cv_c_tclconfig}
20364 echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
20365echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
20366 fi
20367 fi
3fc11d3e 20368
bec39cab 20369
85541719
DE
20370 # If $no_tk is nonempty, then we can't do Tk, and there is no
20371 # point to doing Tcl.
bec39cab 20372
5062cc19
KS
20373 #
20374 # Ok, lets find the tk configuration
20375 # First, look for one uninstalled.
20376 # the alternative search directory is invoked by --with-tk
20377 #
3fc11d3e 20378
5062cc19
KS
20379 if test x"${no_tk}" = x ; then
20380 # we reset no_tk in case something fails here
20381 no_tk=true
bec39cab 20382
5062cc19
KS
20383# Check whether --with-tk or --without-tk was given.
20384if test "${with_tk+set}" = set; then
20385 withval="$with_tk"
20386 with_tkconfig=${withval}
b4e70030 20387fi;
5062cc19
KS
20388 echo "$as_me:$LINENO: checking for Tk configuration" >&5
20389echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6
20390 if test "${ac_cv_c_tkconfig+set}" = set; then
bec39cab
AC
20391 echo $ECHO_N "(cached) $ECHO_C" >&6
20392else
3fc11d3e
JM
20393
20394
5062cc19
KS
20395 # First check to see if --with-tkconfig was specified.
20396 if test x"${with_tkconfig}" != x ; then
20397 if test -f "${with_tkconfig}/tkConfig.sh" ; then
20398 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
20399 else
20400 { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
20401echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
bec39cab 20402 { (exit 1); exit 1; }; }
5062cc19
KS
20403 fi
20404 fi
3fc11d3e 20405
5062cc19
KS
20406 # then check for a private Tk library
20407 case "${host}" in
20408 *-*-cygwin*) platDir="win" ;;
20409 *) platDir="unix" ;;
20410 esac
20411 if test x"${ac_cv_c_tkconfig}" = x ; then
20412 for i in \
20413 ../tk \
20414 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20415 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
20416 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
20417 ../../tk \
20418 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20419 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
20420 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
20421 ../../../tk \
20422 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20423 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
20424 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
20425 if test -f "$i/$platDir/tkConfig.sh" ; then
20426 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20427 break
20428 fi
20429 done
20430 fi
20431
20432 # on Darwin, check in Framework installation locations
20433 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
20434 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
20435 `ls -d /Library/Frameworks 2>/dev/null` \
20436 `ls -d /Network/Library/Frameworks 2>/dev/null` \
20437 `ls -d /System/Library/Frameworks 2>/dev/null` \
20438 ; do
20439 if test -f "$i/Tk.framework/tkConfig.sh" ; then
20440 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
20441 break
20442 fi
20443 done
20444 fi
20445
20446 # check in a few common install locations
20447 if test x"${ac_cv_c_tkconfig}" = x ; then
20448 for i in `ls -d ${libdir} 2>/dev/null` \
20449 `ls -d ${exec_prefix}/lib 2>/dev/null` \
20450 `ls -d ${prefix}/lib 2>/dev/null` \
20451 `ls -d /usr/local/lib 2>/dev/null` \
20452 `ls -d /usr/contrib/lib 2>/dev/null` \
20453 `ls -d /usr/lib 2>/dev/null` \
20454 ; do
20455 if test -f "$i/tkConfig.sh" ; then
20456 ac_cv_c_tkconfig=`(cd $i; pwd)`
20457 break
20458 fi
20459 done
20460 fi
20461 # check in a few other private locations
20462 if test x"${ac_cv_c_tkconfig}" = x ; then
20463 for i in \
20464 ${srcdir}/../tk \
20465 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20466 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
20467 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
20468 if test -f "$i/$platDir/tkConfig.sh" ; then
20469 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20470 break
20471 fi
20472 done
20473 fi
3fc11d3e 20474
3fc11d3e
JM
20475fi
20476
20477
5062cc19
KS
20478 if test x"${ac_cv_c_tkconfig}" = x ; then
20479 TK_BIN_DIR="# no Tk configs found"
20480 { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
20481echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
20482 else
20483 no_tk=
20484 TK_BIN_DIR=${ac_cv_c_tkconfig}
20485 echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
20486echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6
20487 fi
3fc11d3e 20488 fi
dd2504ab 20489
dd2504ab 20490
85541719
DE
20491 if test -z "${no_tcl}" -a -z "${no_tk}"; then
20492
20493 echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
20494echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
20495
20496 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
20497 echo "$as_me:$LINENO: result: loading" >&5
20498echo "${ECHO_T}loading" >&6
20499 . ${TCL_BIN_DIR}/tclConfig.sh
20500 else
20501 echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
20502echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
20503 fi
20504
20505 # eval is required to do the TCL_DBGX substitution
20506 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
20507 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
20508
20509 # If the TCL_BIN_DIR is the build directory (not the install directory),
20510 # then set the common variable name to the value of the build variables.
20511 # For example, the variable TCL_LIB_SPEC will be set to the value
20512 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
20513 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
20514 # installed and uninstalled version of Tcl.
20515 if test -f "${TCL_BIN_DIR}/Makefile" ; then
20516 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
20517 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
20518 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
20519 elif test "`uname -s`" = "Darwin"; then
20520 # If Tcl was built as a framework, attempt to use the libraries
20521 # from the framework at the given location so that linking works
20522 # against Tcl.framework installed in an arbitary location.
20523 case ${TCL_DEFS} in
20524 *TCL_FRAMEWORK*)
20525 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
20526 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
20527 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
20528 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
20529 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
20530 break
20531 fi
20532 done
20533 fi
20534 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
20535 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
20536 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
20537 fi
20538 ;;
20539 esac
20540 fi
20541
20542 # eval is required to do the TCL_DBGX substitution
20543 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
20544 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
20545 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
20546 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562 # Check for in-tree tcl
20563 here=`pwd`
20564 cd ${srcdir}/..
20565 topdir=`pwd`
20566 cd ${here}
20567
20568 intree="no"
20569 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
20570 intree="yes"
20571 fi
20572
20573 # Find Tcl private headers
20574 if test x"${intree}" = xno; then
20575
20576 echo "$as_me:$LINENO: checking for Tcl private headers" >&5
20577echo $ECHO_N "checking for Tcl private headers... $ECHO_C" >&6
20578 private_dir=""
20579 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
20580 if test -f ${dir}/tclInt.h ; then
20581 private_dir=${dir}
20582 fi
20583
20584 if test x"${private_dir}" = x; then
20585 { { echo "$as_me:$LINENO: error: could not find private Tcl headers" >&5
20586echo "$as_me: error: could not find private Tcl headers" >&2;}
20587 { (exit 1); exit 1; }; }
20588 else
20589 TCL_PRIVATE_INCLUDE="-I${private_dir}"
20590 echo "$as_me:$LINENO: result: ${private_dir}" >&5
20591echo "${ECHO_T}${private_dir}" >&6
20592 fi
20593
20594 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
20595 TCL_LIBRARY="${TCL_LIB_SPEC}"
20596 TCL_DEPS=""
20597 else
20598 # If building tcl in the same src tree, private headers
20599 # are not needed, but we need to be sure to use the right
20600 # headers library
20601 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
20602 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
20603 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
20604 fi
20605
20606
20607
20608
20609
5062cc19
KS
20610 echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
20611echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6
dd2504ab 20612
5062cc19
KS
20613 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
20614 echo "$as_me:$LINENO: result: loading" >&5
20615echo "${ECHO_T}loading" >&6
20616 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 20617 else
5062cc19
KS
20618 echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
20619echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
3fc11d3e 20620 fi
bec39cab 20621
5062cc19
KS
20622 # eval is required to do the TK_DBGX substitution
20623 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
20624 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
20625
20626 # If the TK_BIN_DIR is the build directory (not the install directory),
20627 # then set the common variable name to the value of the build variables.
20628 # For example, the variable TK_LIB_SPEC will be set to the value
20629 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
20630 # instead of TK_BUILD_LIB_SPEC since it will work with both an
20631 # installed and uninstalled version of Tcl.
85541719 20632 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
20633 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
20634 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
20635 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
20636 elif test "`uname -s`" = "Darwin"; then
20637 # If Tk was built as a framework, attempt to use the libraries
20638 # from the framework at the given location so that linking works
20639 # against Tk.framework installed in an arbitary location.
20640 case ${TK_DEFS} in
20641 *TK_FRAMEWORK*)
85541719 20642 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
20643 for i in "`cd ${TK_BIN_DIR}; pwd`" \
20644 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
20645 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
20646 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
20647 break
20648 fi
20649 done
20650 fi
85541719 20651 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
20652 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
20653 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
20654 fi
20655 ;;
20656 esac
3fc11d3e
JM
20657 fi
20658
5062cc19
KS
20659 # eval is required to do the TK_DBGX substitution
20660 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
20661 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
20662 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
20663 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 20664
3fc11d3e
JM
20665
20666
bec39cab
AC
20667
20668
20669
20670
20671
20672
20673
3fc11d3e 20674
3fc11d3e 20675
bec39cab 20676
bec39cab 20677
85541719
DE
20678 # Check for in-tree Tk
20679 intree="no"
20680 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
20681 intree="yes"
20682 fi
3fc11d3e 20683
85541719
DE
20684 # Find Tk private headers
20685 if test x"${intree}" = xno; then
3fc11d3e 20686
5062cc19
KS
20687 echo "$as_me:$LINENO: checking for Tk private headers" >&5
20688echo $ECHO_N "checking for Tk private headers... $ECHO_C" >&6
20689 private_dir=""
20690 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
20691 if test -f ${dir}/tkInt.h; then
20692 private_dir=${dir}
3fc11d3e 20693 fi
bec39cab 20694
5062cc19
KS
20695 if test x"${private_dir}" = x; then
20696 { { echo "$as_me:$LINENO: error: could not find Tk private headers" >&5
20697echo "$as_me: error: could not find Tk private headers" >&2;}
20698 { (exit 1); exit 1; }; }
3fc11d3e 20699 else
5062cc19
KS
20700 TK_PRIVATE_INCLUDE="-I${private_dir}"
20701 echo "$as_me:$LINENO: result: ${private_dir}" >&5
20702echo "${ECHO_T}${private_dir}" >&6
3fc11d3e 20703 fi
3fc11d3e 20704
85541719
DE
20705 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
20706 TK_LIBRARY=${TK_LIB_SPEC}
20707 TK_DEPS=""
20708 else
20709 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
20710 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
20711 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
20712 fi
3fc11d3e
JM
20713
20714
3fc11d3e
JM
20715
20716
3fc11d3e 20717
85541719 20718 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 20719
85541719
DE
20720 # Include some libraries that Tcl and Tk want.
20721 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
20722 # Yes, the ordering seems wrong here. But it isn't.
20723 # TK_LIBS is the list of libraries that need to be linked
20724 # after Tcl/Tk. Note that this isn't put into LIBS. If it
20725 # were in LIBS then any link tests after this point would
20726 # try to include things like `$(LIBGUI)', which wouldn't work.
20727 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 20728
85541719
DE
20729 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
20730 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
20731 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
20732 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
20733 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
20734 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
20735 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 20736
85541719
DE
20737 if test x$gdb_cv_os_cygwin = xyes; then
20738 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
20739 WIN32LDAPP="-Wl,--subsystem,console"
20740 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 20741 fi
ffc6a242 20742
b4e70030
JB
20743
20744
20745subdirs="$subdirs gdbtk"
3ace7edb 20746
85541719 20747 fi
3fc11d3e
JM
20748fi
20749
20750
20751
20752
20753
20754
20755
20756
b4e70030
JB
20757echo "$as_me:$LINENO: checking for X" >&5
20758echo $ECHO_N "checking for X... $ECHO_C" >&6
bec39cab 20759
c906108c 20760
b4e70030 20761# Check whether --with-x or --without-x was given.
c906108c 20762if test "${with_x+set}" = set; then
b4e70030 20763 withval="$with_x"
c906108c 20764
b4e70030 20765fi;
c906108c
SS
20766# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20767if test "x$with_x" = xno; then
20768 # The user explicitly disabled X.
20769 have_x=disabled
20770else
20771 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20772 # Both variables are already set.
20773 have_x=yes
20774 else
bec39cab
AC
20775 if test "${ac_cv_have_x+set}" = set; then
20776 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
20777else
20778 # One or both of the vars are not set, and there is no cached value.
bec39cab 20779ac_x_includes=no ac_x_libraries=no
b4e70030 20780rm -fr conftest.dir
bec39cab
AC
20781if mkdir conftest.dir; then
20782 cd conftest.dir
c906108c 20783 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
bec39cab 20784 cat >Imakefile <<'_ACEOF'
c906108c
SS
20785acfindx:
20786 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
bec39cab 20787_ACEOF
b4e70030 20788 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c
SS
20789 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20790 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
20791 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20792 for ac_extension in a so sl; do
20793 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
bec39cab
AC
20794 test -f $ac_im_libdir/libX11.$ac_extension; then
20795 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
20796 fi
20797 done
20798 # Screen out bogus values from the imake configuration. They are
20799 # bogus both because they are the default anyway, and because
20800 # using them would break gcc on systems where it needs fixed includes.
bec39cab 20801 case $ac_im_incroot in
b4e70030 20802 /usr/include) ;;
bec39cab 20803 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 20804 esac
bec39cab 20805 case $ac_im_usrlibdir in
c906108c 20806 /usr/lib | /lib) ;;
bec39cab 20807 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
20808 esac
20809 fi
20810 cd ..
b4e70030 20811 rm -fr conftest.dir
c906108c
SS
20812fi
20813
bec39cab
AC
20814# Standard set of common directories for X headers.
20815# Check X11 before X11Rn because it is often a symlink to the current release.
20816ac_x_header_dirs='
20817/usr/X11/include
20818/usr/X11R6/include
20819/usr/X11R5/include
20820/usr/X11R4/include
20821
20822/usr/include/X11
20823/usr/include/X11R6
20824/usr/include/X11R5
20825/usr/include/X11R4
20826
20827/usr/local/X11/include
20828/usr/local/X11R6/include
20829/usr/local/X11R5/include
20830/usr/local/X11R4/include
20831
20832/usr/local/include/X11
20833/usr/local/include/X11R6
20834/usr/local/include/X11R5
20835/usr/local/include/X11R4
20836
20837/usr/X386/include
20838/usr/x386/include
20839/usr/XFree86/include/X11
20840
20841/usr/include
20842/usr/local/include
20843/usr/unsupported/include
20844/usr/athena/include
20845/usr/local/x11r5/include
20846/usr/lpp/Xamples/include
20847
20848/usr/openwin/include
20849/usr/openwin/share/include'
20850
20851if test "$ac_x_includes" = no; then
59f80f10 20852 # Guess where to find include files, by looking for Intrinsic.h.
c906108c 20853 # First, try using that file with no special directory specified.
bec39cab
AC
20854 cat >conftest.$ac_ext <<_ACEOF
20855/* confdefs.h. */
20856_ACEOF
20857cat confdefs.h >>conftest.$ac_ext
20858cat >>conftest.$ac_ext <<_ACEOF
20859/* end confdefs.h. */
59f80f10 20860#include <X11/Intrinsic.h>
bec39cab
AC
20861_ACEOF
20862if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20863 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20864 ac_status=$?
20865 grep -v '^ *+' conftest.er1 >conftest.err
20866 rm -f conftest.er1
20867 cat conftest.err >&5
20868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20869 (exit $ac_status); } >/dev/null; then
20870 if test -s conftest.err; then
20871 ac_cpp_err=$ac_c_preproc_warn_flag
20872 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20873 else
20874 ac_cpp_err=
20875 fi
20876else
20877 ac_cpp_err=yes
20878fi
20879if test -z "$ac_cpp_err"; then
c906108c
SS
20880 # We can compile using X headers with no special include directory.
20881ac_x_includes=
20882else
bec39cab
AC
20883 echo "$as_me: failed program was:" >&5
20884sed 's/^/| /' conftest.$ac_ext >&5
20885
20886 for ac_dir in $ac_x_header_dirs; do
59f80f10 20887 if test -r "$ac_dir/X11/Intrinsic.h"; then
bec39cab
AC
20888 ac_x_includes=$ac_dir
20889 break
20890 fi
20891done
c906108c 20892fi
bec39cab
AC
20893rm -f conftest.err conftest.$ac_ext
20894fi # $ac_x_includes = no
c906108c 20895
bec39cab 20896if test "$ac_x_libraries" = no; then
c906108c 20897 # Check for the libraries.
c906108c
SS
20898 # See if we find them without any special options.
20899 # Don't add to $LIBS permanently.
bec39cab 20900 ac_save_LIBS=$LIBS
4e8d927d 20901 LIBS="-lXt $LIBS"
bec39cab
AC
20902 cat >conftest.$ac_ext <<_ACEOF
20903/* confdefs.h. */
20904_ACEOF
20905cat confdefs.h >>conftest.$ac_ext
20906cat >>conftest.$ac_ext <<_ACEOF
20907/* end confdefs.h. */
59f80f10 20908#include <X11/Intrinsic.h>
bec39cab
AC
20909int
20910main ()
20911{
59f80f10 20912XtMalloc (0)
bec39cab
AC
20913 ;
20914 return 0;
20915}
20916_ACEOF
20917rm -f conftest.$ac_objext conftest$ac_exeext
20918if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20919 (eval $ac_link) 2>conftest.er1
20920 ac_status=$?
20921 grep -v '^ *+' conftest.er1 >conftest.err
20922 rm -f conftest.er1
20923 cat conftest.err >&5
20924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20925 (exit $ac_status); } &&
b4e70030
JB
20926 { ac_try='test -z "$ac_c_werror_flag"
20927 || test ! -s conftest.err'
bec39cab
AC
20928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20929 (eval $ac_try) 2>&5
20930 ac_status=$?
20931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20932 (exit $ac_status); }; } &&
20933 { ac_try='test -s conftest$ac_exeext'
20934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20935 (eval $ac_try) 2>&5
20936 ac_status=$?
20937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20938 (exit $ac_status); }; }; then
20939 LIBS=$ac_save_LIBS
c906108c
SS
20940# We can link X programs with no special library path.
20941ac_x_libraries=
20942else
bec39cab
AC
20943 echo "$as_me: failed program was:" >&5
20944sed 's/^/| /' conftest.$ac_ext >&5
20945
b4e70030 20946LIBS=$ac_save_LIBS
bec39cab 20947for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 20948do
bec39cab 20949 # Don't even attempt the hair of trying to link an X program!
c906108c 20950 for ac_extension in a so sl; do
b4e70030 20951 if test -r $ac_dir/libXt.$ac_extension; then
c906108c
SS
20952 ac_x_libraries=$ac_dir
20953 break 2
20954 fi
20955 done
20956done
20957fi
bec39cab
AC
20958rm -f conftest.err conftest.$ac_objext \
20959 conftest$ac_exeext conftest.$ac_ext
20960fi # $ac_x_libraries = no
c906108c 20961
bec39cab 20962if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
c906108c
SS
20963 # Didn't find X anywhere. Cache the known absence of X.
20964 ac_cv_have_x="have_x=no"
20965else
20966 # Record where we found X for the cache.
20967 ac_cv_have_x="have_x=yes \
bec39cab 20968 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
c906108c
SS
20969fi
20970fi
bec39cab 20971
c906108c
SS
20972 fi
20973 eval "$ac_cv_have_x"
20974fi # $with_x != no
20975
20976if test "$have_x" != yes; then
b4e70030
JB
20977 echo "$as_me:$LINENO: result: $have_x" >&5
20978echo "${ECHO_T}$have_x" >&6
c906108c
SS
20979 no_x=yes
20980else
20981 # If each of the values was on the command line, it overrides each guess.
20982 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
20983 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
20984 # Update the cache value to reflect the command line values.
20985 ac_cv_have_x="have_x=yes \
20986 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
b4e70030
JB
20987 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
20988echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
c906108c
SS
20989fi
20990
20991
bec39cab 20992# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 20993# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
20994# This code just checks for a few cases where we'd like to ignore those
20995# definitions, even when they're present in the '.mt' file. These cases
20996# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 20997# not part of the source tree.
7a292a7a 20998#
b4e70030 20999# Check whether --enable-sim or --disable-sim was given.
7a292a7a 21000if test "${enable_sim+set}" = set; then
b4e70030
JB
21001 enableval="$enable_sim"
21002 echo "enable_sim = $enable_sim";
7a292a7a
SS
21003 echo "enableval = ${enableval}";
21004 case "${enableval}" in
21005 yes) ignore_sim=false ;;
21006 no) ignore_sim=true ;;
21007 *) ignore_sim=false ;;
21008 esac
21009else
21010 ignore_sim=false
b4e70030 21011fi;
7a292a7a
SS
21012
21013if test ! -d "${srcdir}/../sim"; then
21014 ignore_sim=true
21015fi
21016
9b624dbe
UW
21017SIM=
21018SIM_OBS=
21019if test "${ignore_sim}" = "false"; then
21020 if test x"${gdb_sim}" != x ; then
21021 SIM="${gdb_sim}"
21022 SIM_OBS="remote-sim.o"
60ca704f
SE
21023
21024cat >>confdefs.h <<\_ACEOF
7a292a7a 21025#define WITH_SIM 1
bec39cab 21026_ACEOF
7a292a7a 21027
9b624dbe 21028 fi
7a292a7a
SS
21029fi
21030
21031
21032
c906108c
SS
21033
21034
21035
21036
21037
21038
dfcd3bfb 21039
e56ac5c3
AC
21040
21041
b3a90332
AC
21042
21043
c35f4ffc 21044# List of host floatformats.
bec39cab
AC
21045
21046cat >>confdefs.h <<_ACEOF
c35f4ffc 21047#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 21048_ACEOF
c35f4ffc 21049
bec39cab
AC
21050
21051cat >>confdefs.h <<_ACEOF
c35f4ffc 21052#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
21053_ACEOF
21054
c35f4ffc 21055
bec39cab 21056cat >>confdefs.h <<_ACEOF
c35f4ffc 21057#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 21058_ACEOF
c35f4ffc
AC
21059
21060
c906108c
SS
21061# target_subdir is used by the testsuite to find the target libraries.
21062target_subdir=
21063if test "${host}" != "${target}"; then
21064 target_subdir="${target_alias}/"
21065fi
21066
21067
21068frags=
771b4502 21069if test "${gdb_native}" = "yes"; then
0dad8a66
MK
21070 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
21071 if test ! -f ${host_makefile_frag}; then
bec39cab
AC
21072 { { echo "$as_me:$LINENO: error: \"*** Gdb does not support native target ${host}\"" >&5
21073echo "$as_me: error: \"*** Gdb does not support native target ${host}\"" >&2;}
21074 { (exit 1); exit 1; }; }
0dad8a66
MK
21075 fi
21076 frags="$frags $host_makefile_frag"
21077else
21078 host_makefile_frag=/dev/null
c906108c 21079fi
c906108c 21080
c906108c
SS
21081
21082
21083
771b4502 21084if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
21085# We pick this up from the host configuration file (.mh) because we
21086# do not have a native configuration Makefile fragment.
c906108c
SS
21087nativefile=`sed -n '
21088s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
21089' ${host_makefile_frag}`
c906108c
SS
21090fi
21091
21092
b00a8037 21093if test x"${gdb_osabi}" != x ; then
bec39cab
AC
21094
21095cat >>confdefs.h <<_ACEOF
b00a8037 21096#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 21097_ACEOF
b00a8037
DJ
21098
21099fi
21100
8dcde887 21101# Enable multi-ice-gdb-server.
b4e70030 21102# Check whether --enable-multi-ice or --disable-multi-ice was given.
8dcde887 21103if test "${enable_multi_ice+set}" = set; then
b4e70030
JB
21104 enableval="$enable_multi_ice"
21105 case $enableval in
8dcde887
MK
21106 yes | no)
21107 ;;
bec39cab
AC
21108 *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-multi-ice" >&5
21109echo "$as_me: error: bad value $enableval for --enable-multi-ice" >&2;}
21110 { (exit 1); exit 1; }; } ;;
8dcde887 21111 esac
b4e70030 21112fi;
4e8d927d 21113if test "x$enable_multi_ice" = xyes; then
b4e70030
JB
21114
21115
21116subdirs="$subdirs multi-ice"
3ace7edb 21117
a85f51e7
DJ
21118fi
21119
a13e2c95
UW
21120# We only build gdbserver automatically in a native configuration.
21121if test "$gdb_native" = "yes"; then
b4e70030
JB
21122 echo "$as_me:$LINENO: checking whether gdbserver is supported on this host" >&5
21123echo $ECHO_N "checking whether gdbserver is supported on this host... $ECHO_C" >&6
8dcde887 21124 if test "x$build_gdbserver" = xyes; then
b4e70030
JB
21125 echo "$as_me:$LINENO: result: yes" >&5
21126echo "${ECHO_T}yes" >&6
21127
21128
21129subdirs="$subdirs gdbserver"
3ace7edb 21130
8dcde887 21131 else
b4e70030
JB
21132 echo "$as_me:$LINENO: result: no" >&5
21133echo "${ECHO_T}no" >&6
8dcde887
MK
21134 fi
21135fi
21136
db985757 21137# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 21138# to an empty version.
c906108c
SS
21139
21140files=
21141links=
5a2402b8 21142
c906108c 21143rm -f nm.h
5a2402b8 21144nm_h=""
c906108c 21145if test "${nativefile}" != ""; then
5a2402b8 21146 nm_h=nm.h
0f475e27
AC
21147 case "${nativefile}" in
21148 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
21149 * ) GDB_NM_FILE="${nativefile}"
21150 esac
5a2402b8
AC
21151 files="${files} ${GDB_NM_FILE}"
21152 links="${links} nm.h"
60ca704f
SE
21153
21154cat >>confdefs.h <<_ACEOF
b78960be 21155#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 21156_ACEOF
5a2402b8 21157
c906108c 21158fi
5a2402b8
AC
21159
21160
bec39cab
AC
21161ac_sources="$files"
21162ac_dests="$links"
21163while test -n "$ac_sources"; do
21164 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
21165 set $ac_sources; ac_source=$1; shift; ac_sources=$*
21166 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
21167done
b4e70030 21168 ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
21169
21170
c906108c
SS
21171
21172
c906108c 21173
bec39cab 21174cat >>confdefs.h <<\_ACEOF
6c7a06a3 21175#define GDB_DEFAULT_HOST_CHARSET "UTF-8"
bec39cab
AC
21176_ACEOF
21177
bec39cab 21178
e28b3332 21179 ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
b4e70030 21180 ac_config_commands="$ac_config_commands default"
bec39cab
AC
21181cat >confcache <<\_ACEOF
21182# This file is a shell script that caches the results of configure
21183# tests run on this system so they can be shared between configure
21184# scripts and configure runs, see configure's option --config-cache.
21185# It is not useful on other systems. If it contains results you don't
21186# want to keep, you may remove or edit it.
21187#
21188# config.status only pays attention to the cache file if you give it
21189# the --recheck option to rerun configure.
21190#
21191# `ac_cv_env_foo' variables (set or unset) will be overridden when
21192# loading this file, other *unset* `ac_cv_foo' will be assigned the
21193# following values.
21194
21195_ACEOF
21196
21197# The following way of writing the cache mishandles newlines in values,
21198# but we know of no workaround that is simple, portable, and efficient.
b4e70030 21199# So, don't put newlines in cache variables' values.
bec39cab
AC
21200# Ultrix sh set writes to stderr and can't be redirected directly,
21201# and sets the high bit in the cache file unless we assign to the vars.
b4e70030 21202{
bec39cab 21203 (set) 2>&1 |
b4e70030
JB
21204 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21205 *ac_space=\ *)
bec39cab
AC
21206 # `set' does not quote correctly, so add quotes (double-quote
21207 # substitution turns \\\\ into \\, and sed turns \\ into \).
21208 sed -n \
21209 "s/'/'\\\\''/g;
21210 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b4e70030 21211 ;;
bec39cab
AC
21212 *)
21213 # `set' quotes correctly as required by POSIX, so do not add quotes.
b4e70030
JB
21214 sed -n \
21215 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 21216 ;;
b4e70030
JB
21217 esac;
21218} |
bec39cab
AC
21219 sed '
21220 t clear
b4e70030 21221 : clear
bec39cab
AC
21222 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21223 t end
b4e70030
JB
21224 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21225 : end' >>confcache
bec39cab
AC
21226if diff $cache_file confcache >/dev/null 2>&1; then :; else
21227 if test -w $cache_file; then
b4e70030 21228 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
bec39cab
AC
21229 cat confcache >$cache_file
21230 else
b4e70030 21231 echo "not updating unwritable cache $cache_file"
bec39cab
AC
21232 fi
21233fi
21234rm -f confcache
21235
21236test "x$prefix" = xNONE && prefix=$ac_default_prefix
21237# Let make expand exec_prefix.
21238test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21239
b4e70030
JB
21240# VPATH may cause trouble with some makes, so we remove $(srcdir),
21241# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21242# trailing colons and then remove the whole line if VPATH becomes empty
21243# (actually we leave an empty line to preserve line numbers).
21244if test "x$srcdir" = x.; then
21245 ac_vpsub='/^[ ]*VPATH[ ]*=/{
21246s/:*\$(srcdir):*/:/;
21247s/:*\${srcdir}:*/:/;
21248s/:*@srcdir@:*/:/;
21249s/^\([^=]*=[ ]*\):*/\1/;
21250s/:*$//;
21251s/^[^=]*=[ ]*$//;
21252}'
21253fi
21254
bec39cab
AC
21255DEFS=-DHAVE_CONFIG_H
21256
21257ac_libobjs=
21258ac_ltlibobjs=
21259for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21260 # 1. Remove the extension, and $U if already installed.
b4e70030
JB
21261 ac_i=`echo "$ac_i" |
21262 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
21263 # 2. Add them.
21264 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21265 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
bec39cab
AC
21266done
21267LIBOBJS=$ac_libobjs
21268
21269LTLIBOBJS=$ac_ltlibobjs
21270
21271
85981d60
AC
21272if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
21273 { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
21274Usually this means the macro was only invoked conditionally." >&5
21275echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
21276Usually this means the macro was only invoked conditionally." >&2;}
21277 { (exit 1); exit 1; }; }
21278fi
a417dc56
RW
21279if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
21280 { { echo "$as_me:$LINENO: error: conditional \"GMAKE\" was never defined.
21281Usually this means the macro was only invoked conditionally." >&5
21282echo "$as_me: error: conditional \"GMAKE\" was never defined.
21283Usually this means the macro was only invoked conditionally." >&2;}
21284 { (exit 1); exit 1; }; }
21285fi
783e057b
DJ
21286if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
21287 { { echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21288Usually this means the macro was only invoked conditionally." >&5
21289echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21290Usually this means the macro was only invoked conditionally." >&2;}
21291 { (exit 1); exit 1; }; }
21292fi
21293
21294 gl_libobjs=
21295 gl_ltlibobjs=
21296 if test -n "$gl_LIBOBJS"; then
21297 # Remove the extension.
21298 sed_drop_objext='s/\.o$//;s/\.obj$//'
21299 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21300 gl_libobjs="$gl_libobjs $i.$ac_objext"
21301 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
21302 done
21303 fi
21304 gl_LIBOBJS=$gl_libobjs
21305
21306 gl_LTLIBOBJS=$gl_ltlibobjs
21307
21308
21309
21310 gltests_libobjs=
21311 gltests_ltlibobjs=
21312 if test -n "$gltests_LIBOBJS"; then
21313 # Remove the extension.
21314 sed_drop_objext='s/\.o$//;s/\.obj$//'
21315 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21316 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
21317 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
21318 done
21319 fi
21320 gltests_LIBOBJS=$gltests_libobjs
21321
21322 gltests_LTLIBOBJS=$gltests_ltlibobjs
21323
21324
e28b3332
DJ
21325if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
21326 { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
21327Usually this means the macro was only invoked conditionally." >&5
21328echo "$as_me: error: conditional \"AMDEP\" was never defined.
21329Usually this means the macro was only invoked conditionally." >&2;}
21330 { (exit 1); exit 1; }; }
21331fi
21332if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
21333 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
21334Usually this means the macro was only invoked conditionally." >&5
21335echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
21336Usually this means the macro was only invoked conditionally." >&2;}
21337 { (exit 1); exit 1; }; }
21338fi
bec39cab
AC
21339
21340: ${CONFIG_STATUS=./config.status}
21341ac_clean_files_save=$ac_clean_files
21342ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21343{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21344echo "$as_me: creating $CONFIG_STATUS" >&6;}
21345cat >$CONFIG_STATUS <<_ACEOF
21346#! $SHELL
21347# Generated by $as_me.
21348# Run this file to recreate the current configuration.
21349# Compiler output produced by configure, useful for debugging
21350# configure, is in config.log if it exists.
21351
21352debug=false
21353ac_cs_recheck=false
21354ac_cs_silent=false
21355SHELL=\${CONFIG_SHELL-$SHELL}
21356_ACEOF
21357
21358cat >>$CONFIG_STATUS <<\_ACEOF
21359## --------------------- ##
21360## M4sh Initialization. ##
21361## --------------------- ##
21362
21363# Be Bourne compatible
21364if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21365 emulate sh
21366 NULLCMD=:
21367 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21368 # is contrary to our usage. Disable this feature.
21369 alias -g '${1+"$@"}'='"$@"'
b4e70030
JB
21370elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21371 set -o posix
bec39cab
AC
21372fi
21373DUALCASE=1; export DUALCASE # for MKS sh
21374
21375# Support unset when possible.
21376if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21377 as_unset=unset
21378else
21379 as_unset=false
21380fi
21381
21382
21383# Work around bugs in pre-3.0 UWIN ksh.
b4e70030 21384$as_unset ENV MAIL MAILPATH
bec39cab
AC
21385PS1='$ '
21386PS2='> '
21387PS4='+ '
21388
21389# NLS nuisances.
21390for as_var in \
21391 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21392 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21393 LC_TELEPHONE LC_TIME
21394do
21395 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
21396 eval $as_var=C; export $as_var
21397 else
b4e70030 21398 $as_unset $as_var
bec39cab
AC
21399 fi
21400done
21401
21402# Required to use basename.
b4e70030 21403if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
21404 as_expr=expr
21405else
21406 as_expr=false
21407fi
21408
b4e70030 21409if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
bec39cab
AC
21410 as_basename=basename
21411else
21412 as_basename=false
21413fi
21414
21415
21416# Name of the executable.
b4e70030 21417as_me=`$as_basename "$0" ||
bec39cab
AC
21418$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21419 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
21420 X"$0" : 'X\(/\)$' \| \
21421 . : '\(.\)' 2>/dev/null ||
bec39cab 21422echo X/"$0" |
b4e70030
JB
21423 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21424 /^X\/\(\/\/\)$/{ s//\1/; q; }
21425 /^X\/\(\/\).*/{ s//\1/; q; }
21426 s/.*/./; q'`
bec39cab 21427
b4e70030
JB
21428
21429# PATH needs CR, and LINENO needs CR and PATH.
21430# Avoid depending upon Character Ranges.
21431as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21432as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21433as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21434as_cr_digits='0123456789'
21435as_cr_alnum=$as_cr_Letters$as_cr_digits
21436
21437# The user is always right.
21438if test "${PATH_SEPARATOR+set}" != set; then
21439 echo "#! /bin/sh" >conf$$.sh
21440 echo "exit 0" >>conf$$.sh
21441 chmod +x conf$$.sh
21442 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
21443 PATH_SEPARATOR=';'
21444 else
21445 PATH_SEPARATOR=:
21446 fi
21447 rm -f conf$$.sh
21448fi
bec39cab
AC
21449
21450
b4e70030
JB
21451 as_lineno_1=$LINENO
21452 as_lineno_2=$LINENO
21453 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21454 test "x$as_lineno_1" != "x$as_lineno_2" &&
21455 test "x$as_lineno_3" = "x$as_lineno_2" || {
21456 # Find who we are. Look in the path if we contain no path at all
21457 # relative or not.
21458 case $0 in
21459 *[\\/]* ) as_myself=$0 ;;
21460 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21461for as_dir in $PATH
21462do
21463 IFS=$as_save_IFS
21464 test -z "$as_dir" && as_dir=.
21465 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21466done
bec39cab 21467
b4e70030
JB
21468 ;;
21469 esac
21470 # We did not find ourselves, most probably we were run as `sh COMMAND'
21471 # in which case we are not to be found in the path.
21472 if test "x$as_myself" = x; then
21473 as_myself=$0
21474 fi
21475 if test ! -f "$as_myself"; then
21476 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21477echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21478 { (exit 1); exit 1; }; }
21479 fi
21480 case $CONFIG_SHELL in
21481 '')
21482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21483for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21484do
21485 IFS=$as_save_IFS
21486 test -z "$as_dir" && as_dir=.
21487 for as_base in sh bash ksh sh5; do
21488 case $as_dir in
21489 /*)
21490 if ("$as_dir/$as_base" -c '
bec39cab
AC
21491 as_lineno_1=$LINENO
21492 as_lineno_2=$LINENO
b4e70030 21493 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
bec39cab 21494 test "x$as_lineno_1" != "x$as_lineno_2" &&
b4e70030
JB
21495 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
21496 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21497 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
21498 CONFIG_SHELL=$as_dir/$as_base
21499 export CONFIG_SHELL
21500 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21501 fi;;
21502 esac
21503 done
21504done
21505;;
21506 esac
bec39cab
AC
21507
21508 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21509 # uniformly replaced by the line number. The first 'sed' inserts a
b4e70030
JB
21510 # line-number line before each line; the second 'sed' does the real
21511 # work. The second script uses 'N' to pair each line-number line
21512 # with the numbered line, and appends trailing '-' during
21513 # substitution so that $LINENO is not a special case at line end.
bec39cab 21514 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b4e70030
JB
21515 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
21516 sed '=' <$as_myself |
bec39cab
AC
21517 sed '
21518 N
b4e70030
JB
21519 s,$,-,
21520 : loop
21521 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
bec39cab 21522 t loop
b4e70030
JB
21523 s,-$,,
21524 s,^['$as_cr_digits']*\n,,
bec39cab 21525 ' >$as_me.lineno &&
b4e70030
JB
21526 chmod +x $as_me.lineno ||
21527 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21528echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
bec39cab
AC
21529 { (exit 1); exit 1; }; }
21530
21531 # Don't try to exec as it changes $[0], causing all sort of problems
21532 # (the dirname of $[0] is not the place where we might find the
b4e70030
JB
21533 # original and so on. Autoconf is especially sensible to this).
21534 . ./$as_me.lineno
bec39cab
AC
21535 # Exit status is that of the last command.
21536 exit
21537}
21538
21539
b4e70030
JB
21540case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21541 *c*,-n*) ECHO_N= ECHO_C='
21542' ECHO_T=' ' ;;
21543 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21544 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
bec39cab
AC
21545esac
21546
b4e70030 21547if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
21548 as_expr=expr
21549else
21550 as_expr=false
21551fi
21552
21553rm -f conf$$ conf$$.exe conf$$.file
21554echo >conf$$.file
21555if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030
JB
21556 # We could just check for DJGPP; but this test a) works b) is more generic
21557 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21558 if test -f conf$$.exe; then
21559 # Don't use ln at all; we don't have any links
bec39cab 21560 as_ln_s='cp -p'
b4e70030
JB
21561 else
21562 as_ln_s='ln -s'
21563 fi
bec39cab
AC
21564elif ln conf$$.file conf$$ 2>/dev/null; then
21565 as_ln_s=ln
21566else
21567 as_ln_s='cp -p'
21568fi
b4e70030 21569rm -f conf$$ conf$$.exe conf$$.file
bec39cab
AC
21570
21571if mkdir -p . 2>/dev/null; then
21572 as_mkdir_p=:
21573else
21574 test -d ./-p && rmdir ./-p
21575 as_mkdir_p=false
21576fi
21577
b4e70030 21578as_executable_p="test -f"
bec39cab
AC
21579
21580# Sed expression to map a string onto a valid CPP name.
21581as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21582
21583# Sed expression to map a string onto a valid variable name.
21584as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21585
21586
b4e70030
JB
21587# IFS
21588# We need space, tab and new line, in precisely that order.
21589as_nl='
21590'
21591IFS=" $as_nl"
21592
21593# CDPATH.
21594$as_unset CDPATH
21595
bec39cab
AC
21596exec 6>&1
21597
b4e70030 21598# Open the log real soon, to keep \$[0] and so on meaningful, and to
bec39cab 21599# report actual input values of CONFIG_FILES etc. instead of their
b4e70030
JB
21600# values after options handling. Logging --version etc. is OK.
21601exec 5>>config.log
21602{
21603 echo
21604 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21605## Running $as_me. ##
21606_ASBOX
21607} >&5
21608cat >&5 <<_CSEOF
21609
bec39cab 21610This file was extended by $as_me, which was
b4e70030 21611generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
21612
21613 CONFIG_FILES = $CONFIG_FILES
21614 CONFIG_HEADERS = $CONFIG_HEADERS
21615 CONFIG_LINKS = $CONFIG_LINKS
21616 CONFIG_COMMANDS = $CONFIG_COMMANDS
21617 $ $0 $@
21618
b4e70030
JB
21619_CSEOF
21620echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21621echo >&5
bec39cab
AC
21622_ACEOF
21623
21624# Files that config.status was made for.
b4e70030
JB
21625if test -n "$ac_config_files"; then
21626 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21627fi
234b45d4 21628
b4e70030
JB
21629if test -n "$ac_config_headers"; then
21630 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21631fi
21632
21633if test -n "$ac_config_links"; then
21634 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21635fi
21636
21637if test -n "$ac_config_commands"; then
21638 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21639fi
234b45d4 21640
bec39cab 21641cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030 21642
bec39cab
AC
21643ac_cs_usage="\
21644\`$as_me' instantiates files from templates according to the
21645current configuration.
234b45d4 21646
bec39cab 21647Usage: $0 [OPTIONS] [FILE]...
234b45d4 21648
bec39cab
AC
21649 -h, --help print this help, then exit
21650 -V, --version print version number, then exit
21651 -q, --quiet do not print progress messages
21652 -d, --debug don't remove temporary files
21653 --recheck update $as_me by reconfiguring in the same conditions
21654 --file=FILE[:TEMPLATE]
21655 instantiate the configuration file FILE
21656 --header=FILE[:TEMPLATE]
21657 instantiate the configuration header FILE
234b45d4 21658
bec39cab
AC
21659Configuration files:
21660$config_files
234b45d4 21661
bec39cab
AC
21662Configuration headers:
21663$config_headers
234b45d4 21664
bec39cab
AC
21665Configuration links:
21666$config_links
234b45d4 21667
bec39cab
AC
21668Configuration commands:
21669$config_commands
21670
21671Report bugs to <bug-autoconf@gnu.org>."
4e8d927d 21672_ACEOF
b4e70030 21673
bec39cab
AC
21674cat >>$CONFIG_STATUS <<_ACEOF
21675ac_cs_version="\\
21676config.status
b4e70030 21677configured by $0, generated by GNU Autoconf 2.59,
bec39cab
AC
21678 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21679
b4e70030 21680Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
21681This config.status script is free software; the Free Software Foundation
21682gives unlimited permission to copy, distribute and modify it."
b4e70030
JB
21683srcdir=$srcdir
21684INSTALL="$INSTALL"
bec39cab
AC
21685_ACEOF
21686
21687cat >>$CONFIG_STATUS <<\_ACEOF
21688# If no file are specified by the user, then we need to provide default
21689# value. By we need to know if files were specified by the user.
21690ac_need_defaults=:
21691while test $# != 0
21692do
21693 case $1 in
21694 --*=*)
b4e70030
JB
21695 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21696 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
bec39cab 21697 ac_shift=:
c906108c 21698 ;;
b4e70030 21699 -*)
bec39cab
AC
21700 ac_option=$1
21701 ac_optarg=$2
21702 ac_shift=shift
c906108c 21703 ;;
b4e70030
JB
21704 *) # This is not an option, so the user has probably given explicit
21705 # arguments.
21706 ac_option=$1
21707 ac_need_defaults=false;;
bec39cab 21708 esac
c906108c 21709
bec39cab
AC
21710 case $ac_option in
21711 # Handling of the options.
b4e70030
JB
21712_ACEOF
21713cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
21714 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21715 ac_cs_recheck=: ;;
b4e70030
JB
21716 --version | --vers* | -V )
21717 echo "$ac_cs_version"; exit 0 ;;
21718 --he | --h)
21719 # Conflict between --help and --header
21720 { { echo "$as_me:$LINENO: error: ambiguous option: $1
21721Try \`$0 --help' for more information." >&5
21722echo "$as_me: error: ambiguous option: $1
21723Try \`$0 --help' for more information." >&2;}
21724 { (exit 1); exit 1; }; };;
21725 --help | --hel | -h )
21726 echo "$ac_cs_usage"; exit 0 ;;
21727 --debug | --d* | -d )
bec39cab
AC
21728 debug=: ;;
21729 --file | --fil | --fi | --f )
21730 $ac_shift
21731 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
21732 ac_need_defaults=false;;
21733 --header | --heade | --head | --hea )
21734 $ac_shift
21735 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
21736 ac_need_defaults=false;;
21737 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21738 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21739 ac_cs_silent=: ;;
c906108c 21740
bec39cab 21741 # This is an error.
b4e70030
JB
21742 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21743Try \`$0 --help' for more information." >&5
21744echo "$as_me: error: unrecognized option: $1
21745Try \`$0 --help' for more information." >&2;}
bec39cab 21746 { (exit 1); exit 1; }; } ;;
c906108c 21747
b4e70030 21748 *) ac_config_targets="$ac_config_targets $1" ;;
c906108c 21749
bec39cab
AC
21750 esac
21751 shift
21752done
c906108c 21753
bec39cab 21754ac_configure_extra_args=
c906108c 21755
bec39cab
AC
21756if $ac_cs_silent; then
21757 exec 6>/dev/null
21758 ac_configure_extra_args="$ac_configure_extra_args --silent"
21759fi
c906108c 21760
bec39cab
AC
21761_ACEOF
21762cat >>$CONFIG_STATUS <<_ACEOF
21763if \$ac_cs_recheck; then
b4e70030
JB
21764 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21765 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
bec39cab
AC
21766fi
21767
21768_ACEOF
21769
21770cat >>$CONFIG_STATUS <<_ACEOF
c906108c 21771#
b4e70030 21772# INIT-COMMANDS section.
c906108c 21773#
c906108c 21774
a417dc56 21775ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 21776AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 21777
bec39cab 21778gdb_host_cpu=$gdb_host_cpu
bec39cab
AC
21779nativefile=$nativefile
21780
21781
21782_ACEOF
21783
4e8d927d 21784
b4e70030
JB
21785
21786cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab 21787for ac_config_target in $ac_config_targets
c906108c 21788do
b4e70030
JB
21789 case "$ac_config_target" in
21790 # Handling of arguments.
21791 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21792 ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
e28b3332 21793 "gnulib/Makefile" ) CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
b4e70030 21794 "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
a417dc56 21795 "depdir" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
e28b3332 21796 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
b4e70030
JB
21797 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21798 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
bec39cab
AC
21799 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21800echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21801 { (exit 1); exit 1; }; };;
c906108c
SS
21802 esac
21803done
21804
bec39cab
AC
21805# If the user did not use the arguments to specify the items to instantiate,
21806# then the envvar interface is used. Set only those that are not.
21807# We use the long form for the default assignment because of an extremely
21808# bizarre bug on SunOS 4.1.3.
21809if $ac_need_defaults; then
21810 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21811 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21812 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
21813 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21814fi
21815
b4e70030
JB
21816# Have a temporary directory for convenience. Make it in the build tree
21817# simply because there is no reason to put it here, and in addition,
21818# creating and moving files from /tmp can sometimes cause problems.
21819# Create a temporary directory, and hook for its removal unless debugging.
21820$debug ||
21821{
21822 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21823 trap '{ (exit 1); exit 1; }' 1 2 13 15
21824}
4e8d927d 21825
b4e70030 21826# Create a (secure) tmp directory for tmp files.
4e8d927d 21827
b4e70030
JB
21828{
21829 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
21830 test -n "$tmp" && test -d "$tmp"
21831} ||
21832{
21833 tmp=./confstat$$-$RANDOM
21834 (umask 077 && mkdir $tmp)
21835} ||
21836{
21837 echo "$me: cannot create a temporary directory in ." >&2
21838 { (exit 1); exit 1; }
21839}
4e8d927d 21840
b4e70030 21841_ACEOF
4e8d927d 21842
b4e70030 21843cat >>$CONFIG_STATUS <<_ACEOF
4e8d927d 21844
b4e70030
JB
21845#
21846# CONFIG_FILES section.
21847#
4e8d927d 21848
b4e70030
JB
21849# No need to generate the scripts if there are no CONFIG_FILES.
21850# This happens for instance when ./config.status config.h
21851if test -n "\$CONFIG_FILES"; then
21852 # Protect against being on the right side of a sed subst in config.status.
21853 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21854 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21855s,@SHELL@,$SHELL,;t t
21856s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21857s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21858s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21859s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21860s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21861s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21862s,@exec_prefix@,$exec_prefix,;t t
21863s,@prefix@,$prefix,;t t
21864s,@program_transform_name@,$program_transform_name,;t t
21865s,@bindir@,$bindir,;t t
21866s,@sbindir@,$sbindir,;t t
21867s,@libexecdir@,$libexecdir,;t t
21868s,@datadir@,$datadir,;t t
21869s,@sysconfdir@,$sysconfdir,;t t
21870s,@sharedstatedir@,$sharedstatedir,;t t
21871s,@localstatedir@,$localstatedir,;t t
21872s,@libdir@,$libdir,;t t
21873s,@includedir@,$includedir,;t t
21874s,@oldincludedir@,$oldincludedir,;t t
21875s,@infodir@,$infodir,;t t
21876s,@mandir@,$mandir,;t t
21877s,@build_alias@,$build_alias,;t t
21878s,@host_alias@,$host_alias,;t t
21879s,@target_alias@,$target_alias,;t t
21880s,@DEFS@,$DEFS,;t t
21881s,@ECHO_C@,$ECHO_C,;t t
21882s,@ECHO_N@,$ECHO_N,;t t
21883s,@ECHO_T@,$ECHO_T,;t t
21884s,@LIBS@,$LIBS,;t t
21885s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
21886s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
21887s,@MAINT@,$MAINT,;t t
21888s,@CC@,$CC,;t t
21889s,@CFLAGS@,$CFLAGS,;t t
21890s,@LDFLAGS@,$LDFLAGS,;t t
21891s,@CPPFLAGS@,$CPPFLAGS,;t t
21892s,@ac_ct_CC@,$ac_ct_CC,;t t
21893s,@EXEEXT@,$EXEEXT,;t t
21894s,@OBJEXT@,$OBJEXT,;t t
21895s,@CPP@,$CPP,;t t
21896s,@EGREP@,$EGREP,;t t
783e057b
DJ
21897s,@RANLIB@,$RANLIB,;t t
21898s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
b4e70030
JB
21899s,@build@,$build,;t t
21900s,@build_cpu@,$build_cpu,;t t
21901s,@build_vendor@,$build_vendor,;t t
21902s,@build_os@,$build_os,;t t
21903s,@host@,$host,;t t
21904s,@host_cpu@,$host_cpu,;t t
21905s,@host_vendor@,$host_vendor,;t t
21906s,@host_os@,$host_os,;t t
21907s,@target@,$target,;t t
21908s,@target_cpu@,$target_cpu,;t t
21909s,@target_vendor@,$target_vendor,;t t
21910s,@target_os@,$target_os,;t t
a417dc56
RW
21911s,@am__leading_dot@,$am__leading_dot,;t t
21912s,@DEPDIR@,$DEPDIR,;t t
21913s,@CCDEPMODE@,$CCDEPMODE,;t t
21914s,@MAKE@,$MAKE,;t t
21915s,@GMAKE_TRUE@,$GMAKE_TRUE,;t t
21916s,@GMAKE_FALSE@,$GMAKE_FALSE,;t t
21917s,@SET_MAKE@,$SET_MAKE,;t t
b4e70030 21918s,@USE_NLS@,$USE_NLS,;t t
20e95c23
DJ
21919s,@LIBINTL@,$LIBINTL,;t t
21920s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
21921s,@INCINTL@,$INCINTL,;t t
b4e70030 21922s,@XGETTEXT@,$XGETTEXT,;t t
20e95c23
DJ
21923s,@GMSGFMT@,$GMSGFMT,;t t
21924s,@POSUB@,$POSUB,;t t
b4e70030 21925s,@CATALOGS@,$CATALOGS,;t t
b4e70030 21926s,@DATADIRNAME@,$DATADIRNAME,;t t
b4e70030 21927s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20e95c23
DJ
21928s,@GENCAT@,$GENCAT,;t t
21929s,@CATOBJEXT@,$CATOBJEXT,;t t
b4e70030 21930s,@localedir@,$localedir,;t t
783e057b
DJ
21931s,@GL_COND_LIBTOOL_TRUE@,$GL_COND_LIBTOOL_TRUE,;t t
21932s,@GL_COND_LIBTOOL_FALSE@,$GL_COND_LIBTOOL_FALSE,;t t
21933s,@GNULIB_MEMMEM@,$GNULIB_MEMMEM,;t t
21934s,@GNULIB_MEMPCPY@,$GNULIB_MEMPCPY,;t t
21935s,@GNULIB_MEMRCHR@,$GNULIB_MEMRCHR,;t t
21936s,@GNULIB_STPCPY@,$GNULIB_STPCPY,;t t
21937s,@GNULIB_STPNCPY@,$GNULIB_STPNCPY,;t t
21938s,@GNULIB_STRCHRNUL@,$GNULIB_STRCHRNUL,;t t
21939s,@GNULIB_STRDUP@,$GNULIB_STRDUP,;t t
21940s,@GNULIB_STRNDUP@,$GNULIB_STRNDUP,;t t
21941s,@GNULIB_STRNLEN@,$GNULIB_STRNLEN,;t t
21942s,@GNULIB_STRPBRK@,$GNULIB_STRPBRK,;t t
21943s,@GNULIB_STRSEP@,$GNULIB_STRSEP,;t t
21944s,@GNULIB_STRSTR@,$GNULIB_STRSTR,;t t
21945s,@GNULIB_STRCASESTR@,$GNULIB_STRCASESTR,;t t
21946s,@GNULIB_STRTOK_R@,$GNULIB_STRTOK_R,;t t
21947s,@GNULIB_MBSLEN@,$GNULIB_MBSLEN,;t t
21948s,@GNULIB_MBSNLEN@,$GNULIB_MBSNLEN,;t t
21949s,@GNULIB_MBSCHR@,$GNULIB_MBSCHR,;t t
21950s,@GNULIB_MBSRCHR@,$GNULIB_MBSRCHR,;t t
21951s,@GNULIB_MBSSTR@,$GNULIB_MBSSTR,;t t
21952s,@GNULIB_MBSCASECMP@,$GNULIB_MBSCASECMP,;t t
21953s,@GNULIB_MBSNCASECMP@,$GNULIB_MBSNCASECMP,;t t
21954s,@GNULIB_MBSPCASECMP@,$GNULIB_MBSPCASECMP,;t t
21955s,@GNULIB_MBSCASESTR@,$GNULIB_MBSCASESTR,;t t
21956s,@GNULIB_MBSCSPN@,$GNULIB_MBSCSPN,;t t
21957s,@GNULIB_MBSPBRK@,$GNULIB_MBSPBRK,;t t
21958s,@GNULIB_MBSSPN@,$GNULIB_MBSSPN,;t t
21959s,@GNULIB_MBSSEP@,$GNULIB_MBSSEP,;t t
21960s,@GNULIB_MBSTOK_R@,$GNULIB_MBSTOK_R,;t t
21961s,@GNULIB_STRERROR@,$GNULIB_STRERROR,;t t
21962s,@GNULIB_STRSIGNAL@,$GNULIB_STRSIGNAL,;t t
21963s,@HAVE_DECL_MEMMEM@,$HAVE_DECL_MEMMEM,;t t
21964s,@HAVE_MEMPCPY@,$HAVE_MEMPCPY,;t t
21965s,@HAVE_DECL_MEMRCHR@,$HAVE_DECL_MEMRCHR,;t t
21966s,@HAVE_STPCPY@,$HAVE_STPCPY,;t t
21967s,@HAVE_STPNCPY@,$HAVE_STPNCPY,;t t
21968s,@HAVE_STRCHRNUL@,$HAVE_STRCHRNUL,;t t
21969s,@HAVE_DECL_STRDUP@,$HAVE_DECL_STRDUP,;t t
21970s,@HAVE_STRNDUP@,$HAVE_STRNDUP,;t t
21971s,@HAVE_DECL_STRNDUP@,$HAVE_DECL_STRNDUP,;t t
21972s,@HAVE_DECL_STRNLEN@,$HAVE_DECL_STRNLEN,;t t
21973s,@HAVE_STRPBRK@,$HAVE_STRPBRK,;t t
21974s,@HAVE_STRSEP@,$HAVE_STRSEP,;t t
21975s,@HAVE_STRCASESTR@,$HAVE_STRCASESTR,;t t
21976s,@HAVE_DECL_STRTOK_R@,$HAVE_DECL_STRTOK_R,;t t
21977s,@HAVE_DECL_STRERROR@,$HAVE_DECL_STRERROR,;t t
21978s,@HAVE_DECL_STRSIGNAL@,$HAVE_DECL_STRSIGNAL,;t t
21979s,@REPLACE_STRERROR@,$REPLACE_STRERROR,;t t
21980s,@REPLACE_STRSIGNAL@,$REPLACE_STRSIGNAL,;t t
21981s,@REPLACE_MEMMEM@,$REPLACE_MEMMEM,;t t
21982s,@REPLACE_STRCASESTR@,$REPLACE_STRCASESTR,;t t
21983s,@REPLACE_STRSTR@,$REPLACE_STRSTR,;t t
21984s,@HAVE_LONG_LONG_INT@,$HAVE_LONG_LONG_INT,;t t
21985s,@HAVE_UNSIGNED_LONG_LONG_INT@,$HAVE_UNSIGNED_LONG_LONG_INT,;t t
21986s,@HAVE_INTTYPES_H@,$HAVE_INTTYPES_H,;t t
21987s,@HAVE_SYS_TYPES_H@,$HAVE_SYS_TYPES_H,;t t
21988s,@INCLUDE_NEXT@,$INCLUDE_NEXT,;t t
21989s,@NEXT_STDINT_H@,$NEXT_STDINT_H,;t t
21990s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
21991s,@HAVE_SYS_INTTYPES_H@,$HAVE_SYS_INTTYPES_H,;t t
21992s,@HAVE_SYS_BITYPES_H@,$HAVE_SYS_BITYPES_H,;t t
21993s,@BITSIZEOF_PTRDIFF_T@,$BITSIZEOF_PTRDIFF_T,;t t
21994s,@BITSIZEOF_SIG_ATOMIC_T@,$BITSIZEOF_SIG_ATOMIC_T,;t t
21995s,@BITSIZEOF_SIZE_T@,$BITSIZEOF_SIZE_T,;t t
21996s,@BITSIZEOF_WCHAR_T@,$BITSIZEOF_WCHAR_T,;t t
21997s,@BITSIZEOF_WINT_T@,$BITSIZEOF_WINT_T,;t t
21998s,@HAVE_SIGNED_SIG_ATOMIC_T@,$HAVE_SIGNED_SIG_ATOMIC_T,;t t
21999s,@HAVE_SIGNED_WCHAR_T@,$HAVE_SIGNED_WCHAR_T,;t t
22000s,@HAVE_SIGNED_WINT_T@,$HAVE_SIGNED_WINT_T,;t t
22001s,@PTRDIFF_T_SUFFIX@,$PTRDIFF_T_SUFFIX,;t t
22002s,@SIG_ATOMIC_T_SUFFIX@,$SIG_ATOMIC_T_SUFFIX,;t t
22003s,@SIZE_T_SUFFIX@,$SIZE_T_SUFFIX,;t t
22004s,@WCHAR_T_SUFFIX@,$WCHAR_T_SUFFIX,;t t
22005s,@WINT_T_SUFFIX@,$WINT_T_SUFFIX,;t t
22006s,@STDINT_H@,$STDINT_H,;t t
22007s,@NEXT_STRING_H@,$NEXT_STRING_H,;t t
22008s,@GNULIB_WCWIDTH@,$GNULIB_WCWIDTH,;t t
22009s,@HAVE_DECL_WCWIDTH@,$HAVE_DECL_WCWIDTH,;t t
22010s,@REPLACE_WCWIDTH@,$REPLACE_WCWIDTH,;t t
22011s,@WCHAR_H@,$WCHAR_H,;t t
22012s,@HAVE_WCHAR_H@,$HAVE_WCHAR_H,;t t
22013s,@NEXT_WCHAR_H@,$NEXT_WCHAR_H,;t t
22014s,@LIBGNU_LIBDEPS@,$LIBGNU_LIBDEPS,;t t
22015s,@LIBGNU_LTLIBDEPS@,$LIBGNU_LTLIBDEPS,;t t
d5af19ba 22016s,@GNULIB_STDINT_H@,$GNULIB_STDINT_H,;t t
b4e70030 22017s,@PACKAGE@,$PACKAGE,;t t
b4e70030
JB
22018s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22019s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22020s,@INSTALL_DATA@,$INSTALL_DATA,;t t
e28b3332 22021s,@CYGPATH_W@,$CYGPATH_W,;t t
d57a3c85 22022s,@PYTHON2_4@,$PYTHON2_4,;t t
e28b3332
DJ
22023s,@ACLOCAL@,$ACLOCAL,;t t
22024s,@AUTOCONF@,$AUTOCONF,;t t
22025s,@AUTOMAKE@,$AUTOMAKE,;t t
22026s,@AUTOHEADER@,$AUTOHEADER,;t t
22027s,@MAKEINFO@,$MAKEINFO,;t t
22028s,@install_sh@,$install_sh,;t t
22029s,@STRIP@,$STRIP,;t t
22030s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
22031s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
22032s,@mkdir_p@,$mkdir_p,;t t
22033s,@AWK@,$AWK,;t t
e28b3332
DJ
22034s,@AMTAR@,$AMTAR,;t t
22035s,@am__tar@,$am__tar,;t t
22036s,@am__untar@,$am__untar,;t t
e28b3332
DJ
22037s,@am__include@,$am__include,;t t
22038s,@am__quote@,$am__quote,;t t
22039s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
22040s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
22041s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
e28b3332
DJ
22042s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
22043s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
22044s,@subdirs@,$subdirs,;t t
22045s,@TARGET_OBS@,$TARGET_OBS,;t t
c16158bc
JM
22046s,@PKGVERSION@,$PKGVERSION,;t t
22047s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
22048s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
b4e70030
JB
22049s,@LN_S@,$LN_S,;t t
22050s,@YACC@,$YACC,;t t
22051s,@AR@,$AR,;t t
22052s,@ac_ct_AR@,$ac_ct_AR,;t t
22053s,@DLLTOOL@,$DLLTOOL,;t t
22054s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
22055s,@WINDRES@,$WINDRES,;t t
22056s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t
22057s,@MIG@,$MIG,;t t
22058s,@ac_ct_MIG@,$ac_ct_MIG,;t t
6a30b0a5
AS
22059s,@READLINE@,$READLINE,;t t
22060s,@READLINE_DEPS@,$READLINE_DEPS,;t t
22061s,@READLINE_CFLAGS@,$READLINE_CFLAGS,;t t
3841debe
DJ
22062s,@HAVE_LIBEXPAT@,$HAVE_LIBEXPAT,;t t
22063s,@LIBEXPAT@,$LIBEXPAT,;t t
22064s,@LTLIBEXPAT@,$LTLIBEXPAT,;t t
d57a3c85 22065s,@PYTHON_CFLAGS@,$PYTHON_CFLAGS,;t t
20e95c23 22066s,@ALLOCA@,$ALLOCA,;t t
b4e70030
JB
22067s,@CONFIG_LDFLAGS@,$CONFIG_LDFLAGS,;t t
22068s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
22069s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
22070s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
22071s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t
22072s,@SER_HARDWIRE@,$SER_HARDWIRE,;t t
22073s,@WIN32LIBS@,$WIN32LIBS,;t t
22074s,@LIBGUI@,$LIBGUI,;t t
22075s,@GUI_CFLAGS_X@,$GUI_CFLAGS_X,;t t
22076s,@WIN32LDAPP@,$WIN32LDAPP,;t t
22077s,@TCL_VERSION@,$TCL_VERSION,;t t
5062cc19
KS
22078s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
22079s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
22080s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
22081s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
22082s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
b4e70030 22083s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
5062cc19
KS
22084s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
22085s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
22086s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
22087s,@TCL_INCLUDE@,$TCL_INCLUDE,;t t
22088s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
22089s,@TCL_DEPS@,$TCL_DEPS,;t t
b4e70030 22090s,@TK_VERSION@,$TK_VERSION,;t t
5062cc19
KS
22091s,@TK_BIN_DIR@,$TK_BIN_DIR,;t t
22092s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t
22093s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
22094s,@TK_LIB_FLAG@,$TK_LIB_FLAG,;t t
b4e70030 22095s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
5062cc19
KS
22096s,@TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t
22097s,@TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t
22098s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t
22099s,@TK_INCLUDE@,$TK_INCLUDE,;t t
22100s,@TK_LIBRARY@,$TK_LIBRARY,;t t
22101s,@TK_DEPS@,$TK_DEPS,;t t
22102s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t
b4e70030
JB
22103s,@X_CFLAGS@,$X_CFLAGS,;t t
22104s,@X_LDFLAGS@,$X_LDFLAGS,;t t
22105s,@X_LIBS@,$X_LIBS,;t t
b4e70030
JB
22106s,@GDBTKLIBS@,$GDBTKLIBS,;t t
22107s,@GDBTK_CFLAGS@,$GDBTK_CFLAGS,;t t
22108s,@GDBTK_SRC_DIR@,$GDBTK_SRC_DIR,;t t
9b624dbe
UW
22109s,@SIM@,$SIM,;t t
22110s,@SIM_OBS@,$SIM_OBS,;t t
b4e70030
JB
22111s,@ENABLE_CFLAGS@,$ENABLE_CFLAGS,;t t
22112s,@PROFILE_CFLAGS@,$PROFILE_CFLAGS,;t t
22113s,@CONFIG_OBS@,$CONFIG_OBS,;t t
22114s,@CONFIG_DEPS@,$CONFIG_DEPS,;t t
22115s,@CONFIG_SRCS@,$CONFIG_SRCS,;t t
22116s,@CONFIG_ALL@,$CONFIG_ALL,;t t
22117s,@CONFIG_CLEAN@,$CONFIG_CLEAN,;t t
22118s,@CONFIG_INSTALL@,$CONFIG_INSTALL,;t t
22119s,@CONFIG_UNINSTALL@,$CONFIG_UNINSTALL,;t t
22120s,@target_subdir@,$target_subdir,;t t
22121s,@frags@,$frags,;t t
b4e70030 22122s,@nm_h@,$nm_h,;t t
b4e70030
JB
22123s,@LIBOBJS@,$LIBOBJS,;t t
22124s,@LTLIBOBJS@,$LTLIBOBJS,;t t
783e057b
DJ
22125s,@gl_LIBOBJS@,$gl_LIBOBJS,;t t
22126s,@gl_LTLIBOBJS@,$gl_LTLIBOBJS,;t t
22127s,@gltests_LIBOBJS@,$gltests_LIBOBJS,;t t
22128s,@gltests_LTLIBOBJS@,$gltests_LTLIBOBJS,;t t
b4e70030
JB
22129/@host_makefile_frag@/r $host_makefile_frag
22130s,@host_makefile_frag@,,;t t
b4e70030
JB
22131CEOF
22132
22133_ACEOF
22134
22135 cat >>$CONFIG_STATUS <<\_ACEOF
22136 # Split the substitutions into bite-sized pieces for seds with
22137 # small command number limits, like on Digital OSF/1 and HP-UX.
22138 ac_max_sed_lines=48
22139 ac_sed_frag=1 # Number of current file.
22140 ac_beg=1 # First line for current file.
22141 ac_end=$ac_max_sed_lines # Line after last line for current file.
22142 ac_more_lines=:
22143 ac_sed_cmds=
22144 while $ac_more_lines; do
22145 if test $ac_beg -gt 1; then
22146 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22147 else
22148 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
4e8d927d 22149 fi
b4e70030
JB
22150 if test ! -s $tmp/subs.frag; then
22151 ac_more_lines=false
22152 else
22153 # The purpose of the label and of the branching condition is to
22154 # speed up the sed processing (if there are no `@' at all, there
22155 # is no need to browse any of the substitutions).
22156 # These are the two extra sed commands mentioned above.
22157 (echo ':t
22158 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22159 if test -z "$ac_sed_cmds"; then
22160 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22161 else
22162 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22163 fi
22164 ac_sed_frag=`expr $ac_sed_frag + 1`
22165 ac_beg=$ac_end
22166 ac_end=`expr $ac_end + $ac_max_sed_lines`
22167 fi
22168 done
22169 if test -z "$ac_sed_cmds"; then
22170 ac_sed_cmds=cat
22171 fi
22172fi # test -n "$CONFIG_FILES"
4e8d927d 22173
b4e70030
JB
22174_ACEOF
22175cat >>$CONFIG_STATUS <<\_ACEOF
22176for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22177 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22178 case $ac_file in
22179 - | *:- | *:-:* ) # input from stdin
22180 cat >$tmp/stdin
22181 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22182 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22183 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22184 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22185 * ) ac_file_in=$ac_file.in ;;
c906108c
SS
22186 esac
22187
b4e70030
JB
22188 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22189 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
bec39cab
AC
22190$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22191 X"$ac_file" : 'X\(//\)[^/]' \| \
22192 X"$ac_file" : 'X\(//\)$' \| \
b4e70030
JB
22193 X"$ac_file" : 'X\(/\)' \| \
22194 . : '\(.\)' 2>/dev/null ||
bec39cab 22195echo X"$ac_file" |
b4e70030
JB
22196 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22197 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22198 /^X\(\/\/\)$/{ s//\1/; q; }
22199 /^X\(\/\).*/{ s//\1/; q; }
22200 s/.*/./; q'`
22201 { if $as_mkdir_p; then
22202 mkdir -p "$ac_dir"
22203 else
22204 as_dir="$ac_dir"
bec39cab 22205 as_dirs=
b4e70030
JB
22206 while test ! -d "$as_dir"; do
22207 as_dirs="$as_dir $as_dirs"
22208 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
22209$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22210 X"$as_dir" : 'X\(//\)[^/]' \| \
22211 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
22212 X"$as_dir" : 'X\(/\)' \| \
22213 . : '\(.\)' 2>/dev/null ||
bec39cab 22214echo X"$as_dir" |
b4e70030
JB
22215 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22216 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22217 /^X\(\/\/\)$/{ s//\1/; q; }
22218 /^X\(\/\).*/{ s//\1/; q; }
22219 s/.*/./; q'`
bec39cab 22220 done
b4e70030
JB
22221 test ! -n "$as_dirs" || mkdir $as_dirs
22222 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22223echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 22224 { (exit 1); exit 1; }; }; }
b4e70030 22225
bec39cab
AC
22226 ac_builddir=.
22227
b4e70030 22228if test "$ac_dir" != .; then
bec39cab 22229 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
22230 # A "../" for each directory in $ac_dir_suffix.
22231 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22232else
22233 ac_dir_suffix= ac_top_builddir=
22234fi
bec39cab
AC
22235
22236case $srcdir in
b4e70030 22237 .) # No --srcdir option. We are building in place.
bec39cab 22238 ac_srcdir=.
b4e70030
JB
22239 if test -z "$ac_top_builddir"; then
22240 ac_top_srcdir=.
22241 else
22242 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22243 fi ;;
22244 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 22245 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
22246 ac_top_srcdir=$srcdir ;;
22247 *) # Relative path.
22248 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22249 ac_top_srcdir=$ac_top_builddir$srcdir ;;
bec39cab
AC
22250esac
22251
b4e70030
JB
22252# Do not use `cd foo && pwd` to compute absolute paths, because
22253# the directories may not exist.
22254case `pwd` in
22255.) ac_abs_builddir="$ac_dir";;
22256*)
22257 case "$ac_dir" in
22258 .) ac_abs_builddir=`pwd`;;
22259 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22260 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22261 esac;;
22262esac
22263case $ac_abs_builddir in
22264.) ac_abs_top_builddir=${ac_top_builddir}.;;
22265*)
22266 case ${ac_top_builddir}. in
22267 .) ac_abs_top_builddir=$ac_abs_builddir;;
22268 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22269 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22270 esac;;
22271esac
22272case $ac_abs_builddir in
22273.) ac_abs_srcdir=$ac_srcdir;;
22274*)
22275 case $ac_srcdir in
22276 .) ac_abs_srcdir=$ac_abs_builddir;;
22277 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22278 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22279 esac;;
22280esac
22281case $ac_abs_builddir in
22282.) ac_abs_top_srcdir=$ac_top_srcdir;;
22283*)
22284 case $ac_top_srcdir in
22285 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22286 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22287 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22288 esac;;
22289esac
c906108c 22290
c906108c 22291
bec39cab
AC
22292 case $INSTALL in
22293 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
b4e70030 22294 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
c906108c 22295 esac
121ce6e5 22296
b4e70030
JB
22297 if test x"$ac_file" != x-; then
22298 { echo "$as_me:$LINENO: creating $ac_file" >&5
22299echo "$as_me: creating $ac_file" >&6;}
22300 rm -f "$ac_file"
22301 fi
22302 # Let's still pretend it is `configure' which instantiates (i.e., don't
22303 # use $as_me), people would be surprised to read:
22304 # /* config.h. Generated by config.status. */
22305 if test x"$ac_file" = x-; then
22306 configure_input=
22307 else
22308 configure_input="$ac_file. "
22309 fi
22310 configure_input=$configure_input"Generated from `echo $ac_file_in |
22311 sed 's,.*/,,'` by configure."
22312
22313 # First look for the input files in the build tree, otherwise in the
22314 # src tree.
22315 ac_file_inputs=`IFS=:
22316 for f in $ac_file_in; do
22317 case $f in
22318 -) echo $tmp/stdin ;;
22319 [\\/$]*)
22320 # Absolute (can't be DOS-style, as IFS=:)
22321 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22322echo "$as_me: error: cannot find input file: $f" >&2;}
22323 { (exit 1); exit 1; }; }
22324 echo "$f";;
22325 *) # Relative
22326 if test -f "$f"; then
22327 # Build tree
22328 echo "$f"
22329 elif test -f "$srcdir/$f"; then
22330 # Source tree
22331 echo "$srcdir/$f"
22332 else
22333 # /dev/null tree
22334 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22335echo "$as_me: error: cannot find input file: $f" >&2;}
22336 { (exit 1); exit 1; }; }
22337 fi;;
22338 esac
22339 done` || { (exit 1); exit 1; }
4e8d927d 22340_ACEOF
bec39cab
AC
22341cat >>$CONFIG_STATUS <<_ACEOF
22342 sed "$ac_vpsub
22343$extrasub
22344_ACEOF
22345cat >>$CONFIG_STATUS <<\_ACEOF
22346:t
22347/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b4e70030
JB
22348s,@configure_input@,$configure_input,;t t
22349s,@srcdir@,$ac_srcdir,;t t
22350s,@abs_srcdir@,$ac_abs_srcdir,;t t
22351s,@top_srcdir@,$ac_top_srcdir,;t t
22352s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22353s,@builddir@,$ac_builddir,;t t
22354s,@abs_builddir@,$ac_abs_builddir,;t t
22355s,@top_builddir@,$ac_top_builddir,;t t
22356s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22357s,@INSTALL@,$ac_INSTALL,;t t
22358" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22359 rm -f $tmp/stdin
22360 if test x"$ac_file" != x-; then
22361 mv $tmp/out $ac_file
22362 else
22363 cat $tmp/out
22364 rm -f $tmp/out
22365 fi
22366
22367done
22368_ACEOF
22369cat >>$CONFIG_STATUS <<\_ACEOF
22370
22371#
22372# CONFIG_HEADER section.
22373#
22374
22375# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22376# NAME is the cpp macro being defined and VALUE is the value it is being given.
22377#
22378# ac_d sets the value in "#define NAME VALUE" lines.
22379ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22380ac_dB='[ ].*$,\1#\2'
22381ac_dC=' '
22382ac_dD=',;t'
22383# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22384ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
22385ac_uB='$,\1#\2define\3'
22386ac_uC=' '
22387ac_uD=',;t'
22388
22389for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22390 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
bec39cab 22391 case $ac_file in
b4e70030
JB
22392 - | *:- | *:-:* ) # input from stdin
22393 cat >$tmp/stdin
22394 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22395 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22396 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22397 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22398 * ) ac_file_in=$ac_file.in ;;
c906108c 22399 esac
b4e70030
JB
22400
22401 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22402echo "$as_me: creating $ac_file" >&6;}
22403
22404 # First look for the input files in the build tree, otherwise in the
22405 # src tree.
22406 ac_file_inputs=`IFS=:
22407 for f in $ac_file_in; do
22408 case $f in
22409 -) echo $tmp/stdin ;;
22410 [\\/$]*)
22411 # Absolute (can't be DOS-style, as IFS=:)
22412 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22413echo "$as_me: error: cannot find input file: $f" >&2;}
22414 { (exit 1); exit 1; }; }
22415 # Do quote $f, to prevent DOS paths from being IFS'd.
22416 echo "$f";;
22417 *) # Relative
22418 if test -f "$f"; then
22419 # Build tree
22420 echo "$f"
22421 elif test -f "$srcdir/$f"; then
22422 # Source tree
22423 echo "$srcdir/$f"
22424 else
22425 # /dev/null tree
22426 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22427echo "$as_me: error: cannot find input file: $f" >&2;}
22428 { (exit 1); exit 1; }; }
22429 fi;;
22430 esac
22431 done` || { (exit 1); exit 1; }
22432 # Remove the trailing spaces.
22433 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
22434
22435_ACEOF
22436
22437# Transform confdefs.h into two sed scripts, `conftest.defines' and
22438# `conftest.undefs', that substitutes the proper values into
22439# config.h.in to produce config.h. The first handles `#define'
22440# templates, and the second `#undef' templates.
22441# And first: Protect against being on the right side of a sed subst in
22442# config.status. Protect against being in an unquoted here document
22443# in config.status.
22444rm -f conftest.defines conftest.undefs
22445# Using a here document instead of a string reduces the quoting nightmare.
22446# Putting comments in sed scripts is not portable.
22447#
22448# `end' is used to avoid that the second main sed command (meant for
22449# 0-ary CPP macros) applies to n-ary macro definitions.
22450# See the Autoconf documentation for `clear'.
22451cat >confdef2sed.sed <<\_ACEOF
22452s/[\\&,]/\\&/g
22453s,[\\$`],\\&,g
22454t clear
22455: clear
22456s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
22457t end
22458s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
22459: end
22460_ACEOF
22461# If some macros were called several times there might be several times
22462# the same #defines, which is useless. Nevertheless, we may not want to
22463# sort them, since we want the *last* AC-DEFINE to be honored.
22464uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22465sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22466rm -f confdef2sed.sed
22467
22468# This sed command replaces #undef with comments. This is necessary, for
c906108c
SS
22469# example, in the case of _POSIX_SOURCE, which is predefined and required
22470# on some systems where configure will not decide to define it.
b4e70030
JB
22471cat >>conftest.undefs <<\_ACEOF
22472s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
22473_ACEOF
22474
22475# Break up conftest.defines because some shells have a limit on the size
22476# of here documents, and old seds have small limits too (100 cmds).
22477echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
22478echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
22479echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22480echo ' :' >>$CONFIG_STATUS
22481rm -f conftest.tail
22482while grep . conftest.defines >/dev/null
bec39cab 22483do
b4e70030
JB
22484 # Write a limited-size here document to $tmp/defines.sed.
22485 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22486 # Speed up: don't consider the non `#define' lines.
22487 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
22488 # Work around the forget-to-reset-the-flag bug.
22489 echo 't clr' >>$CONFIG_STATUS
22490 echo ': clr' >>$CONFIG_STATUS
22491 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
bec39cab 22492 echo 'CEOF
b4e70030
JB
22493 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22494 rm -f $tmp/in
22495 mv $tmp/out $tmp/in
22496' >>$CONFIG_STATUS
22497 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
bec39cab
AC
22498 rm -f conftest.defines
22499 mv conftest.tail conftest.defines
22500done
b4e70030
JB
22501rm -f conftest.defines
22502echo ' fi # grep' >>$CONFIG_STATUS
22503echo >>$CONFIG_STATUS
22504
22505# Break up conftest.undefs because some shells have a limit on the size
22506# of here documents, and old seds have small limits too (100 cmds).
22507echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22508rm -f conftest.tail
22509while grep . conftest.undefs >/dev/null
22510do
22511 # Write a limited-size here document to $tmp/undefs.sed.
22512 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22513 # Speed up: don't consider the non `#undef'
22514 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
22515 # Work around the forget-to-reset-the-flag bug.
22516 echo 't clr' >>$CONFIG_STATUS
22517 echo ': clr' >>$CONFIG_STATUS
22518 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22519 echo 'CEOF
22520 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22521 rm -f $tmp/in
22522 mv $tmp/out $tmp/in
22523' >>$CONFIG_STATUS
22524 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22525 rm -f conftest.undefs
22526 mv conftest.tail conftest.undefs
22527done
22528rm -f conftest.undefs
bec39cab
AC
22529
22530cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030
JB
22531 # Let's still pretend it is `configure' which instantiates (i.e., don't
22532 # use $as_me), people would be surprised to read:
22533 # /* config.h. Generated by config.status. */
22534 if test x"$ac_file" = x-; then
22535 echo "/* Generated by configure. */" >$tmp/config.h
22536 else
22537 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
22538 fi
22539 cat $tmp/in >>$tmp/config.h
22540 rm -f $tmp/in
bec39cab 22541 if test x"$ac_file" != x-; then
b4e70030 22542 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
bec39cab
AC
22543 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22544echo "$as_me: $ac_file is unchanged" >&6;}
22545 else
b4e70030
JB
22546 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22547$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22548 X"$ac_file" : 'X\(//\)[^/]' \| \
22549 X"$ac_file" : 'X\(//\)$' \| \
22550 X"$ac_file" : 'X\(/\)' \| \
22551 . : '\(.\)' 2>/dev/null ||
22552echo X"$ac_file" |
22553 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22554 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22555 /^X\(\/\/\)$/{ s//\1/; q; }
22556 /^X\(\/\).*/{ s//\1/; q; }
22557 s/.*/./; q'`
22558 { if $as_mkdir_p; then
22559 mkdir -p "$ac_dir"
22560 else
22561 as_dir="$ac_dir"
22562 as_dirs=
22563 while test ! -d "$as_dir"; do
22564 as_dirs="$as_dir $as_dirs"
22565 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22566$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22567 X"$as_dir" : 'X\(//\)[^/]' \| \
22568 X"$as_dir" : 'X\(//\)$' \| \
22569 X"$as_dir" : 'X\(/\)' \| \
22570 . : '\(.\)' 2>/dev/null ||
22571echo X"$as_dir" |
22572 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22573 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22574 /^X\(\/\/\)$/{ s//\1/; q; }
22575 /^X\(\/\).*/{ s//\1/; q; }
22576 s/.*/./; q'`
22577 done
22578 test ! -n "$as_dirs" || mkdir $as_dirs
22579 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22580echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22581 { (exit 1); exit 1; }; }; }
22582
bec39cab 22583 rm -f $ac_file
b4e70030 22584 mv $tmp/config.h $ac_file
bec39cab
AC
22585 fi
22586 else
b4e70030
JB
22587 cat $tmp/config.h
22588 rm -f $tmp/config.h
bec39cab 22589 fi
e28b3332
DJ
22590# Compute $ac_file's index in $config_headers.
22591_am_stamp_count=1
22592for _am_header in $config_headers :; do
22593 case $_am_header in
22594 $ac_file | $ac_file:* )
22595 break ;;
22596 * )
22597 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
22598 esac
22599done
22600echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
22601$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22602 X$ac_file : 'X\(//\)[^/]' \| \
22603 X$ac_file : 'X\(//\)$' \| \
22604 X$ac_file : 'X\(/\)' \| \
22605 . : '\(.\)' 2>/dev/null ||
22606echo X$ac_file |
22607 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22608 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22609 /^X\(\/\/\)$/{ s//\1/; q; }
22610 /^X\(\/\).*/{ s//\1/; q; }
22611 s/.*/./; q'`/stamp-h$_am_stamp_count
b4e70030
JB
22612done
22613_ACEOF
22614cat >>$CONFIG_STATUS <<\_ACEOF
22615
22616#
22617# CONFIG_LINKS section.
22618#
22619
22620for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
22621 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22622 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c906108c 22623
b4e70030
JB
22624 { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
22625echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
c906108c
SS
22626
22627 if test ! -r $srcdir/$ac_source; then
bec39cab
AC
22628 { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
22629echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
22630 { (exit 1); exit 1; }; }
c906108c 22631 fi
b4e70030
JB
22632 rm -f $ac_dest
22633
22634 # Make relative symlinks.
22635 ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
22636$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22637 X"$ac_dest" : 'X\(//\)[^/]' \| \
22638 X"$ac_dest" : 'X\(//\)$' \| \
22639 X"$ac_dest" : 'X\(/\)' \| \
22640 . : '\(.\)' 2>/dev/null ||
22641echo X"$ac_dest" |
22642 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22643 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22644 /^X\(\/\/\)$/{ s//\1/; q; }
22645 /^X\(\/\).*/{ s//\1/; q; }
22646 s/.*/./; q'`
22647 { if $as_mkdir_p; then
22648 mkdir -p "$ac_dest_dir"
22649 else
22650 as_dir="$ac_dest_dir"
22651 as_dirs=
22652 while test ! -d "$as_dir"; do
22653 as_dirs="$as_dir $as_dirs"
22654 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22655$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22656 X"$as_dir" : 'X\(//\)[^/]' \| \
22657 X"$as_dir" : 'X\(//\)$' \| \
22658 X"$as_dir" : 'X\(/\)' \| \
22659 . : '\(.\)' 2>/dev/null ||
22660echo X"$as_dir" |
22661 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22662 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22663 /^X\(\/\/\)$/{ s//\1/; q; }
22664 /^X\(\/\).*/{ s//\1/; q; }
22665 s/.*/./; q'`
22666 done
22667 test ! -n "$as_dirs" || mkdir $as_dirs
22668 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
22669echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
22670 { (exit 1); exit 1; }; }; }
22671
22672 ac_builddir=.
22673
22674if test "$ac_dest_dir" != .; then
22675 ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
22676 # A "../" for each directory in $ac_dir_suffix.
22677 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22678else
22679 ac_dir_suffix= ac_top_builddir=
22680fi
22681
22682case $srcdir in
22683 .) # No --srcdir option. We are building in place.
22684 ac_srcdir=.
22685 if test -z "$ac_top_builddir"; then
22686 ac_top_srcdir=.
22687 else
22688 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22689 fi ;;
22690 [\\/]* | ?:[\\/]* ) # Absolute path.
22691 ac_srcdir=$srcdir$ac_dir_suffix;
22692 ac_top_srcdir=$srcdir ;;
22693 *) # Relative path.
22694 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22695 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22696esac
22697
22698# Do not use `cd foo && pwd` to compute absolute paths, because
22699# the directories may not exist.
22700case `pwd` in
22701.) ac_abs_builddir="$ac_dest_dir";;
22702*)
22703 case "$ac_dest_dir" in
22704 .) ac_abs_builddir=`pwd`;;
22705 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
22706 *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
22707 esac;;
22708esac
22709case $ac_abs_builddir in
22710.) ac_abs_top_builddir=${ac_top_builddir}.;;
22711*)
22712 case ${ac_top_builddir}. in
22713 .) ac_abs_top_builddir=$ac_abs_builddir;;
22714 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22715 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22716 esac;;
22717esac
22718case $ac_abs_builddir in
22719.) ac_abs_srcdir=$ac_srcdir;;
22720*)
22721 case $ac_srcdir in
22722 .) ac_abs_srcdir=$ac_abs_builddir;;
22723 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22724 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22725 esac;;
22726esac
22727case $ac_abs_builddir in
22728.) ac_abs_top_srcdir=$ac_top_srcdir;;
22729*)
22730 case $ac_top_srcdir in
22731 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22732 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22733 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22734 esac;;
22735esac
22736
bec39cab
AC
22737
22738 case $srcdir in
22739 [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
b4e70030 22740 *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
c906108c 22741 esac
b4e70030
JB
22742
22743 # Try a symlink, then a hard link, then a copy.
22744 ln -s $ac_rel_source $ac_dest 2>/dev/null ||
22745 ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
22746 cp -p $srcdir/$ac_source $ac_dest ||
22747 { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
22748echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
bec39cab 22749 { (exit 1); exit 1; }; }
b4e70030
JB
22750done
22751_ACEOF
22752cat >>$CONFIG_STATUS <<\_ACEOF
22753
22754#
22755# CONFIG_COMMANDS section.
22756#
22757for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22758 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22759 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22760 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
22761$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22762 X"$ac_dest" : 'X\(//\)[^/]' \| \
22763 X"$ac_dest" : 'X\(//\)$' \| \
22764 X"$ac_dest" : 'X\(/\)' \| \
22765 . : '\(.\)' 2>/dev/null ||
22766echo X"$ac_dest" |
22767 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22768 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22769 /^X\(\/\/\)$/{ s//\1/; q; }
22770 /^X\(\/\).*/{ s//\1/; q; }
22771 s/.*/./; q'`
22772 { if $as_mkdir_p; then
22773 mkdir -p "$ac_dir"
22774 else
22775 as_dir="$ac_dir"
22776 as_dirs=
22777 while test ! -d "$as_dir"; do
22778 as_dirs="$as_dir $as_dirs"
22779 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22780$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22781 X"$as_dir" : 'X\(//\)[^/]' \| \
22782 X"$as_dir" : 'X\(//\)$' \| \
22783 X"$as_dir" : 'X\(/\)' \| \
22784 . : '\(.\)' 2>/dev/null ||
22785echo X"$as_dir" |
22786 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22787 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22788 /^X\(\/\/\)$/{ s//\1/; q; }
22789 /^X\(\/\).*/{ s//\1/; q; }
22790 s/.*/./; q'`
22791 done
22792 test ! -n "$as_dirs" || mkdir $as_dirs
22793 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22794echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22795 { (exit 1); exit 1; }; }; }
22796
22797 ac_builddir=.
22798
22799if test "$ac_dir" != .; then
22800 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22801 # A "../" for each directory in $ac_dir_suffix.
22802 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22803else
22804 ac_dir_suffix= ac_top_builddir=
22805fi
22806
22807case $srcdir in
22808 .) # No --srcdir option. We are building in place.
22809 ac_srcdir=.
22810 if test -z "$ac_top_builddir"; then
22811 ac_top_srcdir=.
22812 else
22813 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22814 fi ;;
22815 [\\/]* | ?:[\\/]* ) # Absolute path.
22816 ac_srcdir=$srcdir$ac_dir_suffix;
22817 ac_top_srcdir=$srcdir ;;
22818 *) # Relative path.
22819 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22820 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22821esac
22822
22823# Do not use `cd foo && pwd` to compute absolute paths, because
22824# the directories may not exist.
22825case `pwd` in
22826.) ac_abs_builddir="$ac_dir";;
22827*)
22828 case "$ac_dir" in
22829 .) ac_abs_builddir=`pwd`;;
22830 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22831 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22832 esac;;
22833esac
22834case $ac_abs_builddir in
22835.) ac_abs_top_builddir=${ac_top_builddir}.;;
22836*)
22837 case ${ac_top_builddir}. in
22838 .) ac_abs_top_builddir=$ac_abs_builddir;;
22839 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22840 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22841 esac;;
22842esac
22843case $ac_abs_builddir in
22844.) ac_abs_srcdir=$ac_srcdir;;
22845*)
22846 case $ac_srcdir in
22847 .) ac_abs_srcdir=$ac_abs_builddir;;
22848 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22849 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22850 esac;;
22851esac
22852case $ac_abs_builddir in
22853.) ac_abs_top_srcdir=$ac_top_srcdir;;
22854*)
22855 case $ac_top_srcdir in
22856 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22857 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22858 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22859 esac;;
22860esac
bec39cab 22861
bec39cab 22862
b4e70030
JB
22863 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
22864echo "$as_me: executing $ac_dest commands" >&6;}
22865 case $ac_dest in
a417dc56 22866 depdir ) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
e28b3332
DJ
22867 depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
22868 # Strip MF so we end up with the name of the file.
22869 mf=`echo "$mf" | sed -e 's/:.*$//'`
22870 # Check whether this is an Automake generated Makefile or not.
22871 # We used to match only the files named `Makefile.in', but
22872 # some people rename them; so instead we look at the file content.
22873 # Grep'ing the first line is not enough: some people post-process
22874 # each Makefile.in and add a new line on top of each file to say so.
22875 # So let's grep whole file.
22876 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
22877 dirpart=`(dirname "$mf") 2>/dev/null ||
22878$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22879 X"$mf" : 'X\(//\)[^/]' \| \
22880 X"$mf" : 'X\(//\)$' \| \
22881 X"$mf" : 'X\(/\)' \| \
22882 . : '\(.\)' 2>/dev/null ||
22883echo X"$mf" |
22884 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22885 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22886 /^X\(\/\/\)$/{ s//\1/; q; }
22887 /^X\(\/\).*/{ s//\1/; q; }
22888 s/.*/./; q'`
22889 else
22890 continue
22891 fi
22892 # Extract the definition of DEPDIR, am__include, and am__quote
22893 # from the Makefile without running `make'.
22894 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
22895 test -z "$DEPDIR" && continue
22896 am__include=`sed -n 's/^am__include = //p' < "$mf"`
22897 test -z "am__include" && continue
22898 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
22899 # When using ansi2knr, U may be empty or an underscore; expand it
22900 U=`sed -n 's/^U = //p' < "$mf"`
22901 # Find all dependency output files, they are included files with
22902 # $(DEPDIR) in their names. We invoke sed twice because it is the
22903 # simplest approach to changing $(DEPDIR) to its actual value in the
22904 # expansion.
22905 for file in `sed -n "
22906 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
22907 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
22908 # Make sure the directory exists.
22909 test -f "$dirpart/$file" && continue
22910 fdir=`(dirname "$file") 2>/dev/null ||
22911$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22912 X"$file" : 'X\(//\)[^/]' \| \
22913 X"$file" : 'X\(//\)$' \| \
22914 X"$file" : 'X\(/\)' \| \
22915 . : '\(.\)' 2>/dev/null ||
22916echo X"$file" |
22917 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22918 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22919 /^X\(\/\/\)$/{ s//\1/; q; }
22920 /^X\(\/\).*/{ s//\1/; q; }
22921 s/.*/./; q'`
22922 { if $as_mkdir_p; then
22923 mkdir -p $dirpart/$fdir
22924 else
22925 as_dir=$dirpart/$fdir
22926 as_dirs=
22927 while test ! -d "$as_dir"; do
22928 as_dirs="$as_dir $as_dirs"
22929 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22930$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22931 X"$as_dir" : 'X\(//\)[^/]' \| \
22932 X"$as_dir" : 'X\(//\)$' \| \
22933 X"$as_dir" : 'X\(/\)' \| \
22934 . : '\(.\)' 2>/dev/null ||
22935echo X"$as_dir" |
22936 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22937 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22938 /^X\(\/\/\)$/{ s//\1/; q; }
22939 /^X\(\/\).*/{ s//\1/; q; }
22940 s/.*/./; q'`
22941 done
22942 test ! -n "$as_dirs" || mkdir $as_dirs
22943 fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
22944echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
22945 { (exit 1); exit 1; }; }; }
22946
22947 # echo "creating $dirpart/$file"
22948 echo '# dummy' > "$dirpart/$file"
22949 done
22950done
4e8d927d 22951 ;;
b4e70030 22952 default )
c906108c 22953
db985757 22954sed -e '/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
c906108c
SS
22955mv -f Makefile.tmp Makefile
22956
2acceee2 22957
c906108c
SS
22958case x$CONFIG_HEADERS in
22959xconfig.h:config.in)
22960echo > stamp-h ;;
22961esac
bec39cab
AC
22962 ;;
22963 esac
b4e70030
JB
22964done
22965_ACEOF
c906108c 22966
b4e70030 22967cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
22968
22969{ (exit 0); exit 0; }
22970_ACEOF
c906108c 22971chmod +x $CONFIG_STATUS
bec39cab
AC
22972ac_clean_files=$ac_clean_files_save
22973
22974
22975# configure is writing to config.log, and then calls config.status.
22976# config.status does its own redirection, appending to config.log.
22977# Unfortunately, on DOS this fails, as config.log is still kept open
22978# by configure, so config.status won't be able to write to it; its
22979# output is simply discarded. So we exec the FD to /dev/null,
22980# effectively closing config.log, so it can be properly (re)opened and
22981# appended to by config.status. When coming back to configure, we
22982# need to make the FD available again.
22983if test "$no_create" != yes; then
22984 ac_cs_success=:
22985 ac_config_status_args=
22986 test "$silent" = yes &&
22987 ac_config_status_args="$ac_config_status_args --quiet"
22988 exec 5>/dev/null
22989 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22990 exec 5>>config.log
22991 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22992 # would make configure fail if this is the last instruction.
22993 $ac_cs_success || { (exit 1); exit 1; }
22994fi
c906108c 22995
bec39cab 22996#
fdc59709 22997# CONFIG_SUBDIRS section, as fixed in confsubdir.m4.
bec39cab 22998#
c906108c
SS
22999if test "$no_recursion" != yes; then
23000
23001 # Remove --cache-file and --srcdir arguments so they do not pile up.
23002 ac_sub_configure_args=
23003 ac_prev=
fdc59709
PB
23004 eval "set x $ac_configure_args"
23005 shift
23006 for ac_arg
23007 do
c906108c
SS
23008 if test -n "$ac_prev"; then
23009 ac_prev=
23010 continue
23011 fi
bec39cab 23012 case $ac_arg in
c906108c
SS
23013 -cache-file | --cache-file | --cache-fil | --cache-fi \
23014 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
23015 ac_prev=cache_file ;;
23016 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
23017 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
23018 | --c=*)
23019 ;;
23020 --config-cache | -C)
c906108c
SS
23021 ;;
23022 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
23023 ac_prev=srcdir ;;
23024 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
23025 ;;
bec39cab
AC
23026 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
23027 ac_prev=prefix ;;
23028 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
23029 ;;
fdc59709
PB
23030 *)
23031 case $ac_arg in
23032 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
23033 esac
23034 ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
c906108c
SS
23035 esac
23036 done
23037
bec39cab
AC
23038 # Always prepend --prefix to ensure using the same prefix
23039 # in subdir configurations.
fdc59709
PB
23040 ac_arg="--prefix=$prefix"
23041 case $ac_arg in
23042 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
23043 esac
23044 ac_sub_configure_args="$ac_arg $ac_sub_configure_args"
bec39cab 23045
b4e70030 23046 ac_popdir=`pwd`
bec39cab 23047 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
23048
23049 # Do not complain, so a configure script can configure whichever
23050 # parts of a large source tree are present.
fdc59709 23051 test -d "$srcdir/$ac_dir" || continue
c906108c 23052
b4e70030
JB
23053 { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
23054echo "$as_me: configuring in $ac_dir" >&6;}
23055 { if $as_mkdir_p; then
23056 mkdir -p "$ac_dir"
23057 else
23058 as_dir="$ac_dir"
bec39cab 23059 as_dirs=
b4e70030
JB
23060 while test ! -d "$as_dir"; do
23061 as_dirs="$as_dir $as_dirs"
23062 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
23063$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23064 X"$as_dir" : 'X\(//\)[^/]' \| \
23065 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
23066 X"$as_dir" : 'X\(/\)' \| \
23067 . : '\(.\)' 2>/dev/null ||
bec39cab 23068echo X"$as_dir" |
b4e70030
JB
23069 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23070 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23071 /^X\(\/\/\)$/{ s//\1/; q; }
23072 /^X\(\/\).*/{ s//\1/; q; }
23073 s/.*/./; q'`
bec39cab 23074 done
b4e70030
JB
23075 test ! -n "$as_dirs" || mkdir $as_dirs
23076 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23077echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 23078 { (exit 1); exit 1; }; }; }
b4e70030 23079
bec39cab
AC
23080 ac_builddir=.
23081
b4e70030 23082if test "$ac_dir" != .; then
bec39cab 23083 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
23084 # A "../" for each directory in $ac_dir_suffix.
23085 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23086else
23087 ac_dir_suffix= ac_top_builddir=
23088fi
bec39cab
AC
23089
23090case $srcdir in
b4e70030 23091 .) # No --srcdir option. We are building in place.
bec39cab 23092 ac_srcdir=.
b4e70030
JB
23093 if test -z "$ac_top_builddir"; then
23094 ac_top_srcdir=.
23095 else
23096 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23097 fi ;;
23098 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 23099 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
23100 ac_top_srcdir=$srcdir ;;
23101 *) # Relative path.
23102 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23103 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23104esac
23105
23106# Do not use `cd foo && pwd` to compute absolute paths, because
23107# the directories may not exist.
23108case `pwd` in
23109.) ac_abs_builddir="$ac_dir";;
23110*)
23111 case "$ac_dir" in
23112 .) ac_abs_builddir=`pwd`;;
23113 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23114 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23115 esac;;
23116esac
23117case $ac_abs_builddir in
23118.) ac_abs_top_builddir=${ac_top_builddir}.;;
23119*)
23120 case ${ac_top_builddir}. in
23121 .) ac_abs_top_builddir=$ac_abs_builddir;;
23122 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23123 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23124 esac;;
23125esac
23126case $ac_abs_builddir in
23127.) ac_abs_srcdir=$ac_srcdir;;
23128*)
23129 case $ac_srcdir in
23130 .) ac_abs_srcdir=$ac_abs_builddir;;
23131 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23132 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23133 esac;;
23134esac
23135case $ac_abs_builddir in
23136.) ac_abs_top_srcdir=$ac_top_srcdir;;
23137*)
23138 case $ac_top_srcdir in
23139 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23140 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23141 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23142 esac;;
bec39cab 23143esac
c906108c 23144
c906108c 23145
fdc59709 23146 cd "$ac_dir"
c906108c
SS
23147
23148 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
23149 if test -f "$ac_srcdir/configure.gnu"; then
23150 ac_sub_configure=$ac_srcdir/configure.gnu
23151 elif test -f "$ac_srcdir/configure"; then
23152 ac_sub_configure=$ac_srcdir/configure
23153 elif test -f "$ac_srcdir/configure.in"; then
23154 # This should be Cygnus configure.
23155 ac_sub_configure=$ac_aux_dir/configure
c906108c 23156 else
bec39cab
AC
23157 { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
23158echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
23159 ac_sub_configure=
23160 fi
23161
23162 # The recursion is here.
23163 if test -n "$ac_sub_configure"; then
c906108c 23164 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
23165 case $cache_file in
23166 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
b4e70030
JB
23167 *) # Relative path.
23168 ac_sub_cache_file=$ac_top_builddir$cache_file ;;
c906108c 23169 esac
c906108c 23170
fdc59709
PB
23171 { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
23172echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 23173 # The eval makes quoting arguments work.
fdc59709
PB
23174 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
23175 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
bec39cab
AC
23176 { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
23177echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
23178 { (exit 1); exit 1; }; }
c906108c
SS
23179 fi
23180
fdc59709 23181 cd "$ac_popdir"
c906108c
SS
23182 done
23183fi
23184
23185
23186exit 0
This page took 2.458329 seconds and 4 git commands to generate.